summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ELFCodeEmitter.cpp
Commit message (Collapse)AuthorAge
* Fix asserts in CodeGen from:Richard Trieu2011-09-10
| | | | | | | | | | | | assert("error"); to: assert(0 && "error"); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139449 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of a bunch of duplicated ELF enum values.Eli Friedman2010-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108520 91177308-0d34-0410-b5e6-96231b3b80d8
* getMachineBasicBlockAddress returns a uintptr_t - don't truncateDuncan Sands2010-06-29
| | | | | | | | to unsigned only to extend back to a pointer sized value on the next line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107139 91177308-0d34-0410-b5e6-96231b3b80d8
* prep work to support a future where getJumpTableInfo will returnChris Lattner2010-01-25
| | | | | | | | a null pointer for functions with no jump tables. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94469 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92498 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing includes.David Greene2009-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79476 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove hack used to strip unwanted chars from section nameBruno Cardoso Lopes2009-08-13
| | | | | | | | | Use MCSectionELF methods as much as possible, removing some ELFWriter methods which are now unused git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78940 91177308-0d34-0410-b5e6-96231b3b80d8
* - Remove custom handling of jumptables by the elf writter (this wasBruno Cardoso Lopes2009-08-05
| | | | | | | | | | | | | | a dirty hack and isn't need anymore since the last x86 code emitter patch) - Add a target-dependent modifier to addend calculation - Use R_X86_64_32S relocation for X86::reloc_absolute_word_sext - Use getELFSectionFlags whenever possible - fix getTextSection to use TLOF and emit the right text section - Handle global emission for static ctors, dtors and Type::PointerTyID - Some minor fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78176 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle null and file symbol on doInitializationBruno Cardoso Lopes2009-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77354 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle external symbols for ELF and add some static methods to ELFSymBruno Cardoso Lopes2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77232 91177308-0d34-0410-b5e6-96231b3b80d8
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-25
| | | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ELFCodeEmitter logic to emit the constant pool and jump tables toBruno Cardoso Lopes2009-07-21
| | | | | | | | | their appropriate sections before the code itself. They need to be emitted before the function because on some targets (x86 but not x86_64) the later may reference a JT or CP entry address git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76672 91177308-0d34-0410-b5e6-96231b3b80d8
* Support adding relocations for data sections, handling the cases whereBruno Cardoso Lopes2009-07-21
| | | | | | | | global declared symbols are initialized with references from other global symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76540 91177308-0d34-0410-b5e6-96231b3b80d8
* Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI ↵Bruno Cardoso Lopes2009-07-18
| | | | | | usage inside getSection* functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76347 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a better name for the label relocations while emitting them for Jump TablesBruno Cardoso Lopes2009-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76334 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to properly reference private symbols on relocation entries.Bruno Cardoso Lopes2009-07-18
| | | | | | | | Use proper relocation type to build relocations for JumpTables (rodata sections). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76326 91177308-0d34-0410-b5e6-96231b3b80d8
* use std::vector instead of std::list for both Section and Symbol lists becauseBruno Cardoso Lopes2009-07-15
| | | | | | | we care more about random access than insertion/deletion of elements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75828 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-14
| | | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup the global emission and refactor some codeBruno Cardoso Lopes2009-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75537 91177308-0d34-0410-b5e6-96231b3b80d8
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-11
| | | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed ELFCodeEmitter to inherit from ObjectCodeEmitterBruno Cardoso Lopes2009-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74821 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some code out and support for Jump Table relocationsBruno Cardoso Lopes2009-07-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74760 91177308-0d34-0410-b5e6-96231b3b80d8
* shrinking down #includesBruno Cardoso Lopes2009-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74718 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction ↵Bruno Cardoso Lopes2009-07-02
| | | | | | alignment method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74686 91177308-0d34-0410-b5e6-96231b3b80d8
* Support Constant Pool SectionsBruno Cardoso Lopes2009-06-25
| | | | | | | Add section symbols to the symbol table git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74170 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more methods to gather target specific elf stuffBruno Cardoso Lopes2009-06-22
| | | | | | | | | | Support for .text relocations, implementing TargetELFWriter overloaded methods for x86/x86_64. Use a map to track global values to their symbol table indexes Code cleanup and small fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73894 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce new BinaryObject (blob) class, ELF Writer modified to use it. ↵Bruno Cardoso Lopes2009-06-14
| | | | | | BinaryObject.h by Aaron Gray git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73333 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for ELF VisibilityBruno Cardoso Lopes2009-06-11
| | | | | | | | | | Emission for globals, using the correct data sections Function alignment can be computed for each target using TargetELFWriterInfo Some small fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73201 91177308-0d34-0410-b5e6-96231b3b80d8
* Simple ELF32/64 binary files can now be emitted for x86 and x86_64 withoutBruno Cardoso Lopes2009-06-07
| | | | | | | relocation sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73038 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove elf specific info from ELFWriter.h to Elf.h. Code cleanup and more ↵Bruno Cardoso Lopes2009-06-06
| | | | | | comments added git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72982 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF Code Emitter now uses CurBufferPtr, BufferBegin and BufferEnd, as do JIT andBruno Cardoso Lopes2009-06-05
| | | | | | | | MachO Writer. This will change with the arrival of ObjectCodeEmitter and BinaryObject git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72906 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ELFCodeEmiter stuff to new filesBruno Cardoso Lopes2009-06-03
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72785 91177308-0d34-0410-b5e6-96231b3b80d8