summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ELF.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert r317046, "Object: Move some code from ELF.h into ELF.cpp."Peter Collingbourne2017-11-031-263/+0
| | | | | | | This change resulted in a measured 1.5-2% perf regression linking chrome. llvm-svn: 317371
* Object: Move some code from ELF.h into ELF.cpp.Peter Collingbourne2017-10-311-0/+263
| | | | | | Differential Revision: https://reviews.llvm.org/D39271 llvm-svn: 317046
* ELF: Add support for emitting dynamic relocations in the Android relocation ↵Peter Collingbourne2017-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | packing format. The Android relocation packing format is a more compact format for dynamic relocations in executables and DSOs that is based on delta encoding and SLEBs. An overview of the format can be found in the Android source code: https://android.googlesource.com/platform/bionic/+/refs/heads/master/tools/relocation_packer/src/delta_encoder.h This patch implements relocation packing using that format. This implementation uses a more intelligent algorithm for compressing relative relocations than Android's own relocation packer. As a result it can generally create smaller relocation sections than that packer. If I link Chromium for Android targeting ARM32 I get a .rel.dyn of size 174693 bytes, as compared to 371832 bytes with gold and the Android packer. Differential Revision: https://reviews.llvm.org/D39152 llvm-svn: 316775
* llvm-readobj: Add support for reading relocations in the Android packed format.Peter Collingbourne2017-10-251-0/+90
| | | | | | | | | | | This is in preparation for testing lld's upcoming relocation packing feature (D39152). I have verified that this implementation correctly unpacks the relocations from a Chromium DSO built with gold and the Android relocation packer for ARM32 and ARM64. Differential Revision: https://reviews.llvm.org/D39272 llvm-svn: 316543
* [ARC] Prepare the implementation of relocation for LLDLeslie Zhai2017-09-131-0/+8
| | | | | | | | | | | | Reviewers: ruiu, kparzysz, petecoup, rafael Reviewed By: kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37556 llvm-svn: 313109
* MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table.Peter Collingbourne2017-06-141-0/+1
| | | | | | | | | | | | | | This is part of the ODR checker proposal: http://lists.llvm.org/pipermail/llvm-dev/2017-June/113820.html Per discussion on the gnu-gabi mailing list [1] the section type range 0x6fff4c00..0x6fff4cff is reserved for LLVM. [1] https://sourceware.org/ml/gnu-gabi/2017-q2/msg00030.html Differential Revision: https://reviews.llvm.org/D33978 llvm-svn: 305407
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-071-17/+17
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* Add llvm::object::getELFSectionTypeName().Rafael Espindola2017-05-021-3/+63
| | | | | | | | | | | This is motivated by https://reviews.llvm.org/D32488 where I am trying to add printing of the section type for incompatible sections to LLD error messages. This patch allows us to use the same code in llvm-readobj and LLD instead of duplicating the function inside LLD. Patch by Alexander Richardson! llvm-svn: 301921
* [Object] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-04-241-7/+6
| | | | | | other minor fixes (NFC). llvm-svn: 301275
* [RISCV] Add RISC-V ELF definesAlex Bradbury2016-11-011-0/+7
| | | | | | | | | | Add the necessary definitions for RISC-V ELF files, including relocs. Also make necessary trivial change to ELFYaml, llvm-objdump, and llvm-readobj in order to work with RISC-V ELFs. Differential Revision: https://reviews.llvm.org/D23557 llvm-svn: 285708
* [AVR] Handle AVR relocations when handling ELF filesDylan McKay2016-09-281-0/+7
| | | | llvm-svn: 282586
* BPF: Use official ELF e_machine valueAlexei Starovoitov2016-07-151-0/+6
| | | | | | | | | The same value for EM_BPF is being propagated to glibc, elfutils, and binutils. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 275633
* Support/ELF: Add AMDGPU relocation definitions to match documentationTom Stellard2016-06-171-0/+7
| | | | | | | | | | Reviewers: arsenm, kzhuravl, rafael Subscribers: llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21443 llvm-svn: 273066
* [lanai] Add ELF enum value and relocations.Jacques Pienaar2016-03-011-0/+7
| | | | | | | | | | Add ELF enum value and relocations for Lanai backed. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17008 llvm-svn: 262394
* [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.Dan Gohman2016-01-121-0/+7
| | | | | | | | | A request has been made to the official registry, but an official value is not yet available. This patch uses a temporary value in order to support development. When an official value is recieved, the value of EM_WEBASSEMBLY will be updated. llvm-svn: 257517
* [ELF] elfiamcu triple should imply e_machine == EM_IAMCUMichael Kuperstein2015-11-041-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D14109 llvm-svn: 252043
* Remove duplication of relocation names in lib/Object/ELF.cppTim Northover2014-11-211-742/+14
| | | | | | | | | | We can now use the ELF relocation .def files to create the mapping of relocation numbers to names and avoid having to duplicate the list of relocations. Patch by Will Newton. llvm-svn: 222566
* AArch64: add support for dynamic-loader relocationsTim Northover2014-08-111-0/+11
| | | | | | | | | LLD needs them, and it's good to be able to print them properly when our object dumpers encounter them. Patch by Daniel Stewart. llvm-svn: 215352
* [PowerPC] 32-bit ELF PIC supportHal Finkel2014-07-181-0/+1
| | | | | | | | | | This adds initial support for PPC32 ELF PIC (Position Independent Code; the -fPIC variety), thus rectifying a long-standing deficiency in the PowerPC backend. Patch by Justin Hibbits! llvm-svn: 213427
* [Mips] Add more relocation types and MIPS specific e_flags constants.Simon Atanasyan2014-05-201-0/+10
| | | | llvm-svn: 209201
* [Sparc] Add support for sparc relocation types in ELF object file.Venkatraman Govindaraju2014-01-261-0/+92
| | | | llvm-svn: 200112
* Support for microMIPS TLS relocations.Zoran Jovanovic2013-12-191-0/+2
| | | | llvm-svn: 197685
* Support for microMIPS branch instructions.Zoran Jovanovic2013-11-041-0/+1
| | | | llvm-svn: 193992
* Support for microMIPS jump instructionsZoran Jovanovic2013-10-291-0/+1
| | | | llvm-svn: 193623
* Support for microMIPS relocations 1.Zoran Jovanovic2013-10-231-0/+11
| | | | llvm-svn: 193247
* Add back missing PPC relocation types.Ulrich Weigand2013-08-091-0/+36
| | | | llvm-svn: 188064
* Add missing PPC64 relocation types.Michael J. Spencer2013-08-081-0/+42
| | | | llvm-svn: 188031
* [Object] Split the ELF interface into 3 parts.Michael J. Spencer2013-08-081-0/+623
* ELFTypes.h contains template magic for defining types based on endianess, size, and alignment. * ELFFile.h defines the ELFFile class which provides low level ELF specific access. * ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface. llvm-svn: 188022
OpenPOWER on IntegriCloud