[PATCH] D62350: [wip] ELF: Create synthetic sections for loadable partitions.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 14:54:50 PDT 2019


pcc created this revision.
pcc added reviewers: ruiu, grimar, MaskRay.
Herald added subscribers: arichardson, emaste, srhines.
Herald added a reviewer: espindola.
Herald added a reviewer: alexshap.
Herald added a project: LLVM.

We create several types of synthetic sections for loadable partitions, including:

- The dynamic symbol table. This allows code outside of the loadable partitions to find entry points with dlsym.
- Creating a dynamic symbol table also requires the creation of several other synthetic sections for the partition, such as the dynamic table and hash table sections.
- The partition's ELF header is represented as a synthetic section in the combined output file, and will be used by llvm-objcopy to extract partitions.

TODO:

- Write tests.

Depends on D60353 <https://reviews.llvm.org/D60353>

Depends on D62349 <https://reviews.llvm.org/D62349>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62350

Files:
  lld/ELF/Arch/X86.cpp
  lld/ELF/Arch/X86_64.cpp
  lld/ELF/InputSection.h
  lld/ELF/LinkerScript.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/SyntheticSections.cpp
  lld/ELF/SyntheticSections.h
  lld/ELF/Thunks.cpp
  lld/ELF/Writer.cpp
  lld/test/ELF/linkerscript/orphan-report.s
  llvm/include/llvm/BinaryFormat/ELF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62350.201079.patch
Type: text/x-patch
Size: 79805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190523/fd953a15/attachment.bin>


More information about the llvm-commits mailing list