[PATCH] D13621: [ELF2] Sort PPC64 special sections

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 10 10:19:07 PDT 2015


hfinkel created this revision.
hfinkel added reviewers: ruiu, rafael.
hfinkel added a subscriber: llvm-commits.
hfinkel added a project: lld.

PPC64 has several special sections that are intended to be accessed from the TOC base pointer. When a .got is present, the TOC base pointer is .got + 0x8000 (as specified by the ABI). Furthermore, the glibc startup code contains an assumption that a 16-bit relocation can hold the offset from the TOC base value to the beginning of the .toc section. Thus, we need to make sure that .toc appears after .got. This much, at least, is required in practice. The other PPC64 special sections (.toc, .toc1, .opd, etc.) should also be close by to optimize access by smaller TOC-base-pointer offsets.


http://reviews.llvm.org/D13621

Files:
  ELF/Writer.cpp
  test/elf2/basic64be.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13621.37030.patch
Type: text/x-patch
Size: 11507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151010/92dae52a/attachment.bin>


More information about the llvm-commits mailing list