[PATCH] D33835: [LLD][ELF] Convert Thunks to use InputSectionDescriptions

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 08:21:38 PDT 2017


peter.smith created this revision.
Herald added a subscriber: emaste.

Thunks are now generated per InputSectionDescription instead of per OutputSection. This allows created ThunkSections to be inserted directly into InputSectionDescription.

Changes in this patch:

- Loop over InputSectionDescriptions to find relocations to Thunks
- Generate a ThunkSection per InputSectionDescription
- Remove synchronize() as we no longer need it
- Move fabricateDefaultCommands() before createThunks

This is patch 3/3 of the conversion of ThunkCreator to insert Thunks into InputSectionDescription. The patch is dependent on the previous 2 refactoring patches on ThunkCreator https://reviews.llvm.org/D33832, https://reviews.llvm.org/D33834. In addition it is also dependent on  https://reviews.llvm.org/D33772 SHF_LINK_ORDER sections using InputSectionDescriptions as we need that to be able to remove synchronize().


https://reviews.llvm.org/D33835

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/Relocations.cpp
  ELF/Relocations.h
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33835.101217.patch
Type: text/x-patch
Size: 8074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170602/58f6feb4/attachment.bin>


More information about the llvm-commits mailing list