summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ELF.h
Commit message (Collapse)AuthorAge
* [Mips] Add more special values for the st_other field in the symbolSimon Atanasyan2014-04-20
| | | | | | table entry for MIPS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206716 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Add initial support for NaN2008 in the back-end.Matheus Almeida2014-04-16
| | | | | | | | | | | | | This is so that EF_MIPS_NAN2008 is set if we are using IEEE 754-2008 NaN encoding (-mnan=2008). This patch also adds support for parsing '.nan legacy' and '.nan 2008' assembly directives. The handling of these directives should match GAS' behaviour i.e., the last directive in use sets the ELF header bit (EF_MIPS_NAN2008). Differential Revision: http://reviews.llvm.org/D3346 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206396 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't relocate with sections if there might be a paired relocation.Rafael Espindola2014-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205240 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Remove R_MIPS_GOT which isn't used and shares the same number as ↵Daniel Sanders2014-03-31
| | | | | | | | | | R_MIPS_GOT16 Unlike my previous commit, don't try to remove the corresponding VK_Mips_GOT yet even though it shares the same assembly text since that is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205196 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r205194 - [mips] Removed R_MIPS_GOT. It's identical to R_MIPS_GOT16.Daniel Sanders2014-03-31
| | | | | | | There's a couple additional bits I missed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205195 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Removed R_MIPS_GOT. It's identical to R_MIPS_GOT16.Daniel Sanders2014-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205194 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add one more MIPS relocation type constant.Simon Atanasyan2014-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203896 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macroAlp Toker2014-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202607 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the missing bits corresponding to .mips_hack_elf_flags.Rafael Espindola2014-01-26
| | | | | | | | | | | | These were: * noreorder handling on the target object streamer and asm parser. * setting the initial flag bits based on the enabled features. * setting the elf header flag for micromips It is *really* depressing I am the one doing this instead of someone at mips actually taking the time to understand the infrastructure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200138 91177308-0d34-0410-b5e6-96231b3b80d8
* removing duplicate enum valueVenkatraman Govindaraju2014-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200104 91177308-0d34-0410-b5e6-96231b3b80d8
* Missing ELF relocations for Sparc.Venkatraman Govindaraju2014-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200103 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF relocation types for sparc.Venkatraman Govindaraju2014-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198565 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for microMIPS TLS relocations.Zoran Jovanovic2013-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197685 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DT_VERSYM dynamic table entry tag definition.Simon Atanasyan2013-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194149 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for microMIPS branch instructions.Zoran Jovanovic2013-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193992 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add more SHF_MIPS_xxx ELF section flags.Simon Atanasyan2013-10-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193713 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for microMIPS jump instructionsZoran Jovanovic2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193623 91177308-0d34-0410-b5e6-96231b3b80d8
* Include missing Compiler.h for using LLVM_ENUM_INT_TYPE.Zonr Chang2013-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193315 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for microMIPS relocations 1.Zoran Jovanovic2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193247 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add MIPS program header types.Simon Atanasyan2013-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192059 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly request unsigned enum types when desiredReid Kleckner2013-09-23
| | | | | | | | | | | | | | | | | | | | | The underlying type of all plain enums in MSVC is 'int', even if the enumerator contains large 32-bit unsigned values or values greater than UINT_MAX. The only way to get a large or unsigned enum type is to request it explicitly with the C++11 strong enum types feature. However, since LLVM isn't C++11 yet, I had to add a conditional LLVM_ENUM_INT_TYPE to Compiler.h to control its usage. The motivating true positive for this change is compiling PointerIntPair with MSVC for win64. The PointerIntMask value is supposed to be pointer sized value of all ones with some low zeros. Instead, it's truncated to 32-bits! We are only saved later because it is sign extended back in the AND with int64_t, and we happen to want all ones. This silences lots of -Wmicrosoft warnings during a clang self-host targeting Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191241 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190769 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-25
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187145 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Use pristine object file while processing relocations.Akira Hatanaka2013-07-24
| | | | | | | | | | | | | | | | | | | | | Similar to ARM change r182800, dynamic linker will read bits/addends from the original object rather than from the object that might have been patched previously. For the purpose of relocations for MCJIT stubs on MIPS, we internally use otherwise unused MIPS relocations. The change also enables MCJIT unit tests for MIPS (EL/BE), and the following two tests now pass: - MCJITTest.return_global and - MCJITTest.multiple_functions. These issues have been tracked as Bug 16250. Patch by Petar Jovanovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187019 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Add support for TLS data relocationsUlrich Weigand2013-07-01
| | | | | | | | | | | | This adds support for TLS data relocations and modifiers: .quad target@dtpmod .quad target@tprel .quad target@dtprel Currently exploited by the asm parser only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185394 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Fix 32-bit PowerPC TLS relocsUlrich Weigand2013-07-01
| | | | | | | | | Some TLS relocs were copied incorrectly from ppc64 to ppc32, and some were missing completely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185390 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @got modifierUlrich Weigand2013-06-25
| | | | | | | | | Add VK_... values and relocation types necessary to support the @got family of modifiers. Used by the asm parser only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184860 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support R_PPC_REL16 family of relocationsUlrich Weigand2013-06-21
| | | | | | | | | | | | | The GNU assembler supports (as extension to the ABI) use of PC-relative relocations in half16 fields, which allows writing code like: li 1, base-. This patch adds support for those relocation types in the assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184552 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support various tls-related modifiersUlrich Weigand2013-06-21
| | | | | | | | | | | | The current code base only supports the minimum set of tls-related relocations and @modifiers that are necessary to support compiler- generated code. This patch extends this to the full set defined in the ABI (and supported by the GNU assembler) for the benefit of the assembler parser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184551 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @higher et.al. modifiersUlrich Weigand2013-06-21
| | | | | | | | | This adds support for the @higher, @highera, @highest, and @highesta modifers, including some missing relocation types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184550 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Support @toc@h modifierUlrich Weigand2013-06-21
| | | | | | | | | This adds the relocation type and other necessary infrastructure to use the @toc@h modifier in the assembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184549 91177308-0d34-0410-b5e6-96231b3b80d8
* [ELF] Add ELFOSABI_GNU.Sean Silva2013-06-05
| | | | | | | ELFOSABI_LINUX is a historical alias for ELFOSABI_GNU according to <http://www.sco.com/developers/gabi/latest/ch4.eheader.html>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183339 91177308-0d34-0410-b5e6-96231b3b80d8
* [Mips] Add Mips specific dynamic table entry tags.Simon Atanasyan2013-05-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182803 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Add some missing PPC64 relocsUlrich Weigand2013-05-08
| | | | | | | | | | | | | | | All R_PPC_... relocs should also be present (using the same number) under the corresponding R_PPC64_... name. The latter were missing for a couple of cases, which this patch adds. This is not a big problem when emitting the reloc, because we can just use the R_PPC_... define instead. But it is a problem when *dumping* relocations e.g. using llvm-readobj, because this will expect only R_PPC64_... values when inspecting a ppc64 ELF file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181451 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add ELF relocation supportRichard Sandiford2013-05-03
| | | | | | | | Another step towards reinstating the SystemZ backend. Tests will be included in the main backend patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181008 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing relocation namesNico Rieck2013-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179358 91177308-0d34-0410-b5e6-96231b3b80d8
* PowerPC: Simplify handling of fixups.Ulrich Weigand2013-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MCTargetDesc/PPCMCCodeEmitter.cpp current has code like: if (isSVR4ABI() && is64BitMode()) Fixups.push_back(MCFixup::Create(0, MO.getExpr(), (MCFixupKind)PPC::fixup_ppc_toc16)); else Fixups.push_back(MCFixup::Create(0, MO.getExpr(), (MCFixupKind)PPC::fixup_ppc_lo16)); This is a problem for the asm parser, since it requires knowledge of the ABI / 64-bit mode to be set up. However, more fundamentally, at this point we shouldn't make such distinctions anyway; in an assembler file, it always ought to be possible to e.g. generate TOC relocations even when the main ABI is one that doesn't use TOC. Fortunately, this is actually completely unnecessary; that code was added to decide whether to generate TOC relocations, but that information is in fact already encoded in the VariantKind of the underlying symbol. This commit therefore merges those fixup types into one, and then decides which relocation to use based on the VariantKind. No changes in generated code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two of the float related ARM-specific entries for e_flags needed forJoerg Sonnenberger2013-03-14
| | | | | | | linkers to interact with GNU ld. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177016 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing relocation for TLS addressing peephole optimization.Bill Schmidt2013-02-25
| | | | | | | Report and fix due to Kai Nacke. Testcase update by me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176029 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF symbol table field st_other support, Jack Carter2013-02-19
| | | | | | | | | | | | | | excluding visibility bits. Mips (o32 abi) specific e_header setting. EF_MIPS_ABI_O32 needs to be set in the ELF header flags for o32 abi output. Contributer: Reed Kotler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175569 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF symbol table field st_other support, Jack Carter2013-02-19
| | | | | | | | | | | | | | excluding visibility bits. Mips (Mips16) specific e_header setting. EF_MIPS_ARCH_ASE_M16 needs to be set in the ELF header flags for Mips16. Contributer: Reed Kotler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175566 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF symbol table field st_other support, Jack Carter2013-02-19
| | | | | | | | | | | | | | | excluding visibility bits. Mips (MicroMips) specific STO handling . The st_other field settig for STO_MIPS_MICROMIPS Contributer: Zoran Jovanovic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175564 91177308-0d34-0410-b5e6-96231b3b80d8
* [ELF] Add STN_UNDEF.Michael J. Spencer2013-02-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175338 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch just fixes up various llvm formattingJack Carter2013-02-12
| | | | | | | | | | | violations such as tabs, blanks at eol and long lines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175007 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch that sets the Mips ELF header flag for Jack Carter2013-02-05
| | | | | | | | | | MicroMips architectures. Contributer: Zoran Jovanovic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174360 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AArch64 as an experimental target.Tim Northover2013-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for AArch64 (ARM's 64-bit architecture) to LLVM in the "experimental" category. Currently, it won't be built unless requested explicitly. This initial commit should have support for: + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions (except the late addition CRC instructions). + CodeGen features required for C++03 and C99. + Compilation for the "small" memory model: code+static data < 4GB. + Absolute and position-independent code. + GNU-style (i.e. "__thread") TLS. + Debugging information. The principal omission, currently, is performance tuning. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch implements runtime ARM specificJack Carter2013-01-30
| | | | | | | | | | setting of ELF header e_flags. Contributer: Jack Carter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173885 91177308-0d34-0410-b5e6-96231b3b80d8
* [ELF] Add R_X86_64_IRELATIVE.Michael J. Spencer2013-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173316 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix truncation of relocation types in Support/ELF.hTim Northover2013-01-22
| | | | | | | This is a follow-up to r171845, which fixes the same issue in the Support code. Only targets with >256 relocations (principally AArch64) should be affected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173151 91177308-0d34-0410-b5e6-96231b3b80d8
* This is a resubmittal. For some reason it broke the bots yesterdayJack Carter2013-01-18
| | | | | | | | | | | | | | | | | | | | | | | | but I cannot reproduce the problem and have scrubed my sources and even tested with llvm-lit -v --vg. Support for Mips register information sections. Mips ELF object files have a section that is dedicated to register use info. Some of this information such as the assumed Global Pointer value is used by the linker in relocation resolution. The register info file is .reginfo in o32 and .MIPS.options in 64 and n32 abi files. This patch contains the changes needed to create the sections, but leaves the actual register accounting for a future patch. Contributer: Jack Carter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172847 91177308-0d34-0410-b5e6-96231b3b80d8