[PATCH] D29637: [LLD][ELF] Use synthetic section to hold copy relocations
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 06:16:49 PST 2017
peter.smith created this revision.
This changes adds a new synthetic section CopyRelSection to hold the ZI reserved for the result of the copy relocation, moreover the dynamic copy relocation is made relative to the CopyRelSection. Previously we altered the size of the OutputSection and made the copy relocation relative to an offset into the OutputSection. This change has a couple of small benefits:
- All dynamic relocations are now relative to an InputSection, this means we can remove the support for OutputSection relative dynamic relocations, which makes us more robust to changes in section offsets after scanRelocs().
- If assignOffsets() is called on .bss or .bss.rel.ro the offsets and final size of the OutputSection will be correct. Previously the work of scanRelocs() would be destroyed by assignOffsets().
https://reviews.llvm.org/D29637
Files:
ELF/Relocations.cpp
ELF/Symbols.cpp
ELF/Symbols.h
ELF/SyntheticSections.cpp
ELF/SyntheticSections.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29637.87411.patch
Type: text/x-patch
Size: 5903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170207/be915b00/attachment.bin>
More information about the llvm-commits
mailing list