Depends on D44961
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lld/ELF/Thunks.cpp | ||
---|---|---|
146 ↗ | (On Diff #140014) | auto -> Defined |
346–349 ↗ | (On Diff #140014) | Perhaps a personal preference, but I'd use a temporary variable like this Defined *D = addSymbol(...); D->StOther |= ...; |
lld/ELF/Thunks.h | ||
59 ↗ | (On Diff #140014) | Can you add a comment somewhere why you could have more than one symbol for one thunk? |
lld/ELF/Relocations.cpp | ||
---|---|---|
1361 ↗ | (On Diff #140014) | With assignOffsets() this line may no longer be required. From memory it was used when a thunk was added in a later pass to a pre-existing ThunkSection and if there were no other thunk sections added we reported no addresses changed. It looks like assignOffsets() would catch this. |
lld/ELF/Thunks.h | ||
54 ↗ | (On Diff #140014) | Perhaps getThunkTarget() or getThunkTargetSym() as this would reinforce the 1 target of the Thunk. |
59 ↗ | (On Diff #140014) | I think that the extra symbols are to account for the presence of Arm/Thumb mapping symbols. These are aids for disassembly and aren't part of the interface. There will only ever be one "Thunk Symbol". Perhaps the comment on addSymbols() should say something like "All thunks must define a symbol, known as the thunk symbol, so that we can redirect relocations to it. The thunk may define additional symbols, but these are never targets for relocations. |