summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101342
* Use twines to simplify calls to report_fatal_error. For code size and ↵Benjamin Kramer2010-04-081-4/+2
| | | | | | readability. llvm-svn: 100756
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-2/+2
| | | | llvm-svn: 100709
* give Mangler access to TargetData.Chris Lattner2010-03-121-1/+1
| | | | llvm-svn: 98378
* make the mangler take an MCContext instead of an MAI.Chris Lattner2010-03-121-1/+1
| | | | | | No functionality change. llvm-svn: 98363
* change MCContext to always have an MCAsmInfo.Chris Lattner2010-03-111-1/+1
| | | | llvm-svn: 98293
* remove dead #include, stupid symlinks.Chris Lattner2010-02-021-1/+0
| | | | llvm-svn: 95150
* Remove a bunch of stuff around the edges of the ELF writer.Chris Lattner2010-02-021-9/+0
| | | | | | | Now the only use of the ELF writer is the JIT, which won't be easy to fix in the short term. :( :( llvm-svn: 95148
* remove a dead call.Chris Lattner2010-01-231-4/+0
| | | | llvm-svn: 94297
* now that mangler is in libtarget, it can use MCAsmInfo instead of clientsChris Lattner2010-01-171-1/+1
| | | | | | having to pass various fields from it in. Simplify. llvm-svn: 93686
* move the mangler into libtarget from vmcore.Chris Lattner2010-01-161-1/+1
| | | | llvm-svn: 93664
* remove a couple of actively incorrect uses of getMangledName.Chris Lattner2010-01-161-4/+6
| | | | llvm-svn: 93627
* Change errs() to dbgs().David Greene2010-01-041-1/+1
| | | | llvm-svn: 92502
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-7/+6
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* Fix ELF Writter related memory leaksBruno Cardoso Lopes2009-09-011-7/+18
| | | | llvm-svn: 80717
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-221-2/+2
| | | | llvm-svn: 79777
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-221-2/+2
| | | | llvm-svn: 79763
* Convert DOUT to DEBUG(errs()...).Bill Wendling2009-08-221-6/+5
| | | | llvm-svn: 79749
* *try* to use a better name to describe how common symbols are marked on the ↵Bruno Cardoso Lopes2009-08-141-1/+1
| | | | | | elf object file. llvm-svn: 79029
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-7/+9
| | | | llvm-svn: 78948
* Remove hack used to strip unwanted chars from section nameBruno Cardoso Lopes2009-08-131-98/+64
| | | | | | | Use MCSectionELF methods as much as possible, removing some ELFWriter methods which are now unused llvm-svn: 78940
* Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes2009-08-131-16/+20
| | | | | | | syntactically as a string, very similiar to what Chris did with MachO. The parsing support and validation is not introduced yet. llvm-svn: 78890
* Move ConstantExpr handling to ResolveConstantExpr method and alsoBruno Cardoso Lopes2009-08-101-27/+84
| | | | | | add support for PtrToInt, Add, Mul. llvm-svn: 78552
* sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner2009-08-081-8/+12
| | | | | | | | classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
* ELF improvements:Bruno Cardoso Lopes2009-08-081-53/+87
| | | | | | | | | | | Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr: GetElementPtr and IntToPtr Set SHF_MERGE bit for mergeable strings Avoid zero initialized strings to be classified as a bss symbol Don't allow common symbols to be classified as STB_WEAK Add a constant to be used as a global value offset in data relocations llvm-svn: 78476
* - Remove custom handling of jumptables by the elf writter (this wasBruno Cardoso Lopes2009-08-051-77/+157
| | | | | | | | | | | | 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 llvm-svn: 78176
* remove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfoChris Lattner2009-08-021-1/+1
| | | | | | defaults to being ELF. llvm-svn: 77866
* (re)introduce new simpler apis for creation sectionkinds.Chris Lattner2009-08-011-8/+7
| | | | llvm-svn: 77834
* Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner2009-08-011-2/+8
| | | | | | | | | | | | compute it based on what it knows. As part of this, rename getSectionForMergeableConstant to getSectionForConstant because it works for non-mergable constants also. The only functionality change from this is that Xcore will start dropping its jump tables into readonly section instead of data section in -static mode. This should be fine as the linker resolves the relocations. If this is a problem, let me know and we'll come up with another solution. llvm-svn: 77833
* Change SectionKind to be a property that is true of a *section*, itChris Lattner2009-08-011-6/+6
| | | | | | | | | | | | | | | | | | should have no state that is specific to particular globals in the section. In this case, it means the removal of the "isWeak" and "ExplicitSection" bits. MCSection uses the new form of SectionKind. To handle isWeak, I introduced a new SectionInfo class, which is SectionKind + isWeak, and it is used by the part of the code generator that does classification of a specific global. The ExplicitSection disappears. It is moved onto MCSection as a new "IsDirective" bit. Since the Name of a section is either a section or directive, it makes sense to keep this bit in MCSection. Ultimately the creator of MCSection should canonicalize (e.g.) .text to whatever the actual section is. llvm-svn: 77803
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-311-2/+3
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* refactor section construction in TLOF to be through an explicitChris Lattner2009-07-311-0/+8
| | | | | | initialize method, which can be called when an MCContext is available. llvm-svn: 77687
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-291-1/+1
| | | | | | No functionality change. llvm-svn: 77432
* Handle null and file symbol on doInitializationBruno Cardoso Lopes2009-07-281-8/+7
| | | | llvm-svn: 77354
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-281-2/+10
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* add module identifier to the elf object fileBruno Cardoso Lopes2009-07-271-3/+8
| | | | llvm-svn: 77238
* Handle external symbols for ELF and add some static methods to ELFSymBruno Cardoso Lopes2009-07-271-21/+55
| | | | llvm-svn: 77232
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-271-7/+7
| | | | | | instead and drive things based off of that. llvm-svn: 77184
* make SectionKind know whether a symbol is weak or not in additionChris Lattner2009-07-261-6/+8
| | | | | | to its classification. llvm-svn: 77140
* rename Mergable -> Mergeable and Writable -> WriteableChris Lattner2009-07-261-6/+5
| | | | llvm-svn: 77138
* two files I missed in the last commit.Chris Lattner2009-07-261-6/+6
| | | | llvm-svn: 77137
* simplify getSectionForMergableConstant to take a SectionKind.Chris Lattner2009-07-261-4/+14
| | | | llvm-svn: 77134
* this is (unfortunately) several changes mixed together:Chris Lattner2009-07-251-1/+1
| | | | | | | | | | | | | | 1. Spell SectionFlags::Writeable as "Writable". 2. Add predicates for deriving SectionFlags from SectionKinds. 3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into ELFTargetAsmInfo. 4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the BSS bit set (the real fix for PR4619). 5. Fix isSuitableForBSS to not put globals with explicit sections set in BSS (which was the reason #4 wasn't fixed earlier). 6. Remove my previous hack for PR4619. llvm-svn: 77085
* remove the SelectSectionForMachineConst hook, replacing it withChris Lattner2009-07-221-1/+3
| | | | | | | | a new getSectionForMergableConstant hook. This removes one dependence of TAI on Type, and provides the hook with enough info to make the right decision based on whether the global has relocations etc. llvm-svn: 76705
* Support adding relocations for data sections, handling the cases whereBruno Cardoso Lopes2009-07-211-24/+48
| | | | | | | global declared symbols are initialized with references from other global symbols. llvm-svn: 76540
* For PC relative relocations where symbols are defined in the same section theyBruno Cardoso Lopes2009-07-201-27/+53
| | | | | | | are referenced, ignore the relocation entry and patch the relocatable field with the computed symbol offset directly llvm-svn: 76414
* Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI ↵Bruno Cardoso Lopes2009-07-181-2/+25
| | | | | | usage inside getSection* functions llvm-svn: 76347
* Add support to properly reference private symbols on relocation entries.Bruno Cardoso Lopes2009-07-181-8/+32
| | | | | | | Use proper relocation type to build relocations for JumpTables (rodata sections). llvm-svn: 76326
* revert one of the loops to use indicies over iterators because there are ↵Bruno Cardoso Lopes2009-07-171-4/+3
| | | | | | vector insertions inside the loop llvm-svn: 76195
* Fix coding style issues pointed by Bill.Bruno Cardoso Lopes2009-07-161-18/+19
| | | | llvm-svn: 75898
OpenPOWER on IntegriCloud