| Issue |
180166
|
| Summary |
MachOObjectfile.cpp wrong values in getDyldChainedFixupTargets() for DYLD_CHAINED_IMPORT_ADDEND64
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
uplifts-fungi68
|
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/MachOObjectFile.cpp#L5290-L5293
The wrong offsets are used for NameOffset and WeakImport. The struct is defined properly here https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/BinaryFormat/MachO.h#L1150-L1172 but when trying to populate the struct, the wrong values are used.
Should be
```
LibOrdinal = getEncodedOrdinal<uint16_t>(RawValue[0] & 0xFFFF);
WeakImport = (RawValue[0] >> 16) & 1;
Reserved = RawValue[0] >> 17;
NameOffset = RawValue[0] >> 32;
Addend = RawValue[1];```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs