aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ELFWriter.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-04-15Fix a ton of comment typos found by codespell. Patch byChris Lattner1-1/+1
Luis Felipe Strano Moraes! llvm-svn: 129558
2011-04-11Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn'tNick Lewycky1-1/+5
mean that it has to be ConstantArray of ConstantStruct. We might have ConstantAggregateZero, at either level, so don't crash on that. Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so we end up with the two lists appended, each with their "sentinals" on them. Different parts of LLVM treated sentinals differently, so make them all just ignore the single entry and continue on with the rest of the list. llvm-svn: 129307
2011-04-08llvm.global_[cd]tor is defined to be either external, or appending with an arrayNick Lewycky1-11/+9
of { i32, void ()* }. Teach the verifier to verify that, deleting copies of checks strewn about. llvm-svn: 129128
2011-02-14Move broken HasCommonSymbols to ELFWriter.cpp.Rafael Espindola1-1/+13
llvm-svn: 125490
2010-12-10Fixed version of 121434 with no new memory leaks.Rafael Espindola1-1/+2
llvm-svn: 121471
2010-12-10Revert my previous patch to make the valgrind bots happy.Rafael Espindola1-2/+1
llvm-svn: 121461
2010-12-09Initial support for the cfi directives. This is just enough to getRafael Espindola1-1/+2
f: .cfi_startproc nop .cfi_endproc assembled (on ELF). llvm-svn: 121434
2010-08-06Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson1-1/+1
llvm-svn: 110460
2010-08-06Revert r110396 to fix buildbots.Owen Anderson1-1/+1
llvm-svn: 110410
2010-08-05Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson1-1/+1
address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
2010-07-16Get rid of a bunch of duplicated ELF enum values.Eli Friedman1-14/+14
llvm-svn: 108520
2010-04-15Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman1-1/+1
llvm-svn: 101342
2010-04-08Use twines to simplify calls to report_fatal_error. For code size and ↵Benjamin Kramer1-4/+2
readability. llvm-svn: 100756
2010-04-07rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner1-2/+2
llvm-svn: 100709
2010-03-12give Mangler access to TargetData.Chris Lattner1-1/+1
llvm-svn: 98378
2010-03-12make the mangler take an MCContext instead of an MAI.Chris Lattner1-1/+1
No functionality change. llvm-svn: 98363
2010-03-11change MCContext to always have an MCAsmInfo.Chris Lattner1-1/+1
llvm-svn: 98293
2010-02-02remove dead #include, stupid symlinks.Chris Lattner1-1/+0
llvm-svn: 95150
2010-02-02Remove a bunch of stuff around the edges of the ELF writer.Chris Lattner1-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
2010-01-23remove a dead call.Chris Lattner1-4/+0
llvm-svn: 94297
2010-01-17now that mangler is in libtarget, it can use MCAsmInfo instead of clientsChris Lattner1-1/+1
having to pass various fields from it in. Simplify. llvm-svn: 93686
2010-01-16move the mangler into libtarget from vmcore.Chris Lattner1-1/+1
llvm-svn: 93664
2010-01-16remove a couple of actively incorrect uses of getMangledName.Chris Lattner1-4/+6
llvm-svn: 93627
2010-01-04Change errs() to dbgs().David Greene1-1/+1
llvm-svn: 92502
2009-10-05strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner1-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
2009-09-01Fix ELF Writter related memory leaksBruno Cardoso Lopes1-7/+18
llvm-svn: 80717
2009-08-22rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner1-2/+2
llvm-svn: 79777
2009-08-22Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner1-2/+2
llvm-svn: 79763
2009-08-22Convert DOUT to DEBUG(errs()...).Bill Wendling1-6/+5
llvm-svn: 79749
2009-08-14*try* to use a better name to describe how common symbols are marked on the ↵Bruno Cardoso Lopes1-1/+1
elf object file. llvm-svn: 79029
2009-08-13Push LLVMContexts through the IntegerType APIs.Owen Anderson1-7/+9
llvm-svn: 78948
2009-08-13Remove hack used to strip unwanted chars from section nameBruno Cardoso Lopes1-98/+64
Use MCSectionELF methods as much as possible, removing some ELFWriter methods which are now unused llvm-svn: 78940
2009-08-13Change MCSectionELF to represent a section semantically instead ofBruno Cardoso Lopes1-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
2009-08-10Move ConstantExpr handling to ResolveConstantExpr method and alsoBruno Cardoso Lopes1-27/+84
add support for PtrToInt, Add, Mul. llvm-svn: 78552
2009-08-08sink the 'name' and 'isdirective' state out of MCSection into its derived ↵Chris Lattner1-8/+12
classes. This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-) llvm-svn: 78517
2009-08-08ELF improvements:Bruno Cardoso Lopes1-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
2009-08-05- Remove custom handling of jumptables by the elf writter (this wasBruno Cardoso Lopes1-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
2009-08-02remove the dead ELFTargetAsmInfo.h/cpp file. TargetAsmInfoChris Lattner1-1/+1
defaults to being ELF. llvm-svn: 77866
2009-08-01(re)introduce new simpler apis for creation sectionkinds.Chris Lattner1-8/+7
llvm-svn: 77834
2009-08-01Remove "JumpTableDataSection" from TAI, instead, have AsmPrinterChris Lattner1-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
2009-08-01Change SectionKind to be a property that is true of a *section*, itChris Lattner1-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
2009-07-31switch off of 'Section' onto MCSection. We're not properly usingChris Lattner1-2/+3
MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
2009-07-31refactor section construction in TLOF to be through an explicitChris Lattner1-0/+8
initialize method, which can be called when an MCContext is available. llvm-svn: 77687
2009-07-29pass the mangler down into the various SectionForGlobal methods.Chris Lattner1-1/+1
No functionality change. llvm-svn: 77432
2009-07-28Handle null and file symbol on doInitializationBruno Cardoso Lopes1-8/+7
llvm-svn: 77354
2009-07-28Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner1-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
2009-07-27add module identifier to the elf object fileBruno Cardoso Lopes1-3/+8
llvm-svn: 77238
2009-07-27Handle external symbols for ELF and add some static methods to ELFSymBruno Cardoso Lopes1-21/+55
llvm-svn: 77232
2009-07-27Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner1-7/+7
instead and drive things based off of that. llvm-svn: 77184
2009-07-26make SectionKind know whether a symbol is weak or not in additionChris Lattner1-6/+8
to its classification. llvm-svn: 77140