[PATCH] D55864: [elfabi] Write program headers, .dynamic, .dynstr, and .shstrtab

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 15:11:32 PDT 2019


jakehehrlich updated this revision to Diff 198080.
jakehehrlich added a comment.
Herald added a subscriber: hiraditya.

Ok so I went digging on the PT_TLS and tls section issues. Seems like removing both the segment and the section is the right way to go.

llvm-readobj currently checks that SHT_TLS sections are in a PT_TLS so we should either have both or none. lld checks that TLS symbols are TLS consistently across the shared object and the output object so we have to use STT_TLS symbols for them (this is kind of obvious).  I think lld (as you already stated) imposes no other requirements on this tool. Nothing seems to check that STT_TLS symbols are defined inside of of SHF_TLS sections so we should be good to go there.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55864/new/

https://reviews.llvm.org/D55864

Files:
  llvm/include/llvm/TextAPI/ELF/ELFStub.h
  llvm/lib/TextAPI/ELF/TBEHandler.cpp
  llvm/llvm/test/tools/llvm-elfabi/binary-write-neededlibs.test
  llvm/llvm/test/tools/llvm-elfabi/binary-write-pheaders.test
  llvm/llvm/test/tools/llvm-elfabi/binary-write-sheaders.test
  llvm/llvm/test/tools/llvm-elfabi/binary-write-soname.test
  llvm/test/tools/llvm-elfabi/binary-write-neededlibs.test
  llvm/test/tools/llvm-elfabi/binary-write-pheaders.test
  llvm/test/tools/llvm-elfabi/binary-write-sheaders.test
  llvm/test/tools/llvm-elfabi/binary-write-soname.test
  llvm/test/tools/llvm-elfabi/binary-write-symbols.test
  llvm/test/tools/llvm-elfabi/invalid-bin-target.test
  llvm/test/tools/llvm-elfabi/missing-bin-target.test
  llvm/test/tools/llvm-elfabi/write-elf32be-ehdr.test
  llvm/test/tools/llvm-elfabi/write-elf32le-ehdr.test
  llvm/test/tools/llvm-elfabi/write-elf64be-ehdr.test
  llvm/test/tools/llvm-elfabi/write-elf64le-ehdr.test
  llvm/tools/llvm-elfabi/ELFObjHandler.cpp
  llvm/tools/llvm-elfabi/ELFObjHandler.h
  llvm/tools/llvm-elfabi/llvm-elfabi.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55864.198080.patch
Type: text/x-patch
Size: 47972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190503/40f0a2a0/attachment.bin>


More information about the llvm-commits mailing list