[PATCH] D53682: [WIP] [llvm-tapi] ELF binary writing initial draft

Armando Montanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 16:26:03 PDT 2018


amontanez created this revision.
Herald added subscribers: llvm-commits, hiraditya, mgorny.

This is a workspace dump of the current progress on llvm-tapi for ELF. Subject to change, open to feedback. Program headers and .dynamic section are not handled in write process yet.

Added:

- ELF binary write support:
  - ELF header
  - Section headers
  - .dynsym, .dynstr, .def (SH_NOBITS), .shstrtab
- Output format selection via a crude flag.
- Additional integration tests.

Fixed:

- ELFArch now conforms directly to the architectures in the ELF namespace.
- Fixed bug where converting to an ELF binary would throw an unsupported error.
- Fixed TBE YAML so that .tbe files with no specified symbols would load correctly.

Changed:

- ELF_DSO file type has been replaced with ELF_[32/64][LE/BE].




Repository:
  rL LLVM

https://reviews.llvm.org/D53682

Files:
  llvm/include/llvm/TAPI/ELFObjHandler.h
  llvm/include/llvm/TAPI/ELFStubFile.h
  llvm/include/llvm/TAPI/ELFTextStubHandler.h
  llvm/include/llvm/TAPI/File.h
  llvm/include/llvm/TAPI/FileHandler.h
  llvm/include/llvm/TAPI/Registry.h
  llvm/lib/CMakeLists.txt
  llvm/lib/LLVMBuild.txt
  llvm/lib/TAPI/CMakeLists.txt
  llvm/lib/TAPI/ELFObjHandler.cpp
  llvm/lib/TAPI/ELFTextStubHandler.cpp
  llvm/lib/TAPI/LLVMBuild.txt
  llvm/lib/TAPI/Registry.cpp
  llvm/test/CMakeLists.txt
  llvm/test/tools/llvm-tapi/basic-elf-read.test
  llvm/test/tools/llvm-tapi/basic-tbe-read.test
  llvm/test/tools/llvm-tapi/read-soname.test
  llvm/test/tools/llvm-tapi/tbe-no-symbols.test
  llvm/test/tools/llvm-tapi/write-ehdr-32be.test
  llvm/test/tools/llvm-tapi/write-ehdr-64le.test
  llvm/test/tools/llvm-tapi/write-syms-64le.test
  llvm/tools/LLVMBuild.txt
  llvm/tools/llvm-tapi/CMakeLists.txt
  llvm/tools/llvm-tapi/LLVMBuild.txt
  llvm/tools/llvm-tapi/llvm-tapi.cpp
  llvm/unittests/CMakeLists.txt
  llvm/unittests/TAPI/CMakeLists.txt
  llvm/unittests/TAPI/ELFTest.cpp
  llvm/unittests/TAPI/YAMLTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53682.171007.patch
Type: text/x-patch
Size: 75530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181024/9119d271/attachment.bin>


More information about the llvm-commits mailing list