Parse the indirect symbol table and update the indexes of
symbol entries in the table in the writer in case they have
been changed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36817 Build 36816: arc lint + arc unit
Event Timeline
llvm/tools/llvm-objcopy/MachO/MachOReader.cpp | ||
---|---|---|
261–263 | Can this be simplified to a bitmask check? e.g.: if (Index & (MachO::INDIRECT_SYMBOL_LOCAL | MachO::INDIRECT_SYMBOL_ABS) != 0) |
Comment Actions
LGTM, but @alexshap can you review the Mach-O logic?
llvm/tools/llvm-objcopy/MachO/MachOReader.cpp | ||
---|---|---|
262 | For readability, you might want to extract uint32_t AbsOrLocalMask = MachO::INDIRECT_SYMBOL_LOCAL | MachO::INDIRECT_SYMBOL_ABS |
llvm/tools/llvm-objcopy/MachO/Object.h | ||
---|---|---|
116 | I'd extend this comment a little bit by saying that the higher bits of this Index encode that extra information (if it is INDIRECT_SYMBOL_LOCAL or INDIRECT_SYMBOL_ABS), so that there is this extra hidden structure. |
For readability, you might want to extract uint32_t AbsOrLocalMask = MachO::INDIRECT_SYMBOL_LOCAL | MachO::INDIRECT_SYMBOL_ABS