summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-2/+3
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* Fix a bug in the ELF writer that caused it to produce malformedDan Gohman2008-05-051-1/+1
| | | | | | ELF headers. The ELF writer still isn't generally usable though. llvm-svn: 50652
* Correlate stubs with functions in JIT: when emitting a stub, the JIT tells ↵Nicolas Geoffray2008-04-161-2/+3
| | | | | | | | the memory manager which function the stub will resolve. llvm-svn: 49814
* Use PassManagerBase instead of FunctionPassManager for functionsDan Gohman2008-03-111-2/+2
| | | | | | | | that merely add passes. This allows them to be used with either FunctionPassManager or PassManager, or even with a custom new kind of pass manager. llvm-svn: 48256
* Enable exception handling int JITNicolas Geoffray2008-02-131-0/+15
| | | | llvm-svn: 47079
* Use getPreferredAlignmentLog or getPreferredAlignmentDuncan Sands2008-01-291-1/+1
| | | | | | | to get the alignment of global variables, rather than using hand-made versions. llvm-svn: 46495
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Add explicit keywords, and fix a minor typo that they uncovered.Dan Gohman2007-12-141-1/+1
| | | | llvm-svn: 45034
* Eliminate the remaining uses of getTypeSize. ThisDuncan Sands2007-11-051-1/+1
| | | | | | | | | | | | | | should only effect x86 when using long double. Now 12/16 bytes are output for long double globals (the exact amount depends on the alignment). This brings globals in line with the rest of LLVM: the space reserved for an object is now always the ABI size. One tricky point is that only 10 bytes should be output for long double if it is a field in a packed struct, which is the reason for the additional argument to EmitGlobalConstant. llvm-svn: 43688
* Drop 'const'Devang Patel2007-05-031-1/+1
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-1/+1
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-1/+3
| | | | llvm-svn: 36632
* Generalize TargetData strings, to support more interesting forms of data.Chris Lattner2007-02-141-1/+1
| | | | | | Patch by Scott Michel. llvm-svn: 34266
* Add function to create a file writer.Bill Wendling2007-02-081-1/+15
| | | | llvm-svn: 34031
* Use TargetELFWriterInfo class.Bill Wendling2007-01-271-2/+2
| | | | llvm-svn: 33573
* Teach TargetData to handle 'preferred' alignment for each target, and useChris Lattner2007-01-201-1/+1
| | | | | | these alignment amounts to align scalars when we can. Patch by Scott Michel! llvm-svn: 33409
* Have the OutputBuffer take the is64Bit and isLittleEndian booleans.Bill Wendling2007-01-181-7/+9
| | | | llvm-svn: 33316
* Changed to use the OutputBuffer instead of the methods in MachO and ELFBill Wendling2007-01-171-53/+61
| | | | | | writers. llvm-svn: 33311
* Revert patch.Bill Wendling2007-01-171-66/+50
| | | | llvm-svn: 33298
* Use the methods in the TargetObjInfo object instead of internal methods.Bill Wendling2007-01-171-50/+66
| | | | llvm-svn: 33289
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-4/+3
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* Converted to using llvm streams instead of <iostream>sBill Wendling2006-11-291-2/+3
| | | | llvm-svn: 31992
* Match MachineCodeEmitter changes.Evan Cheng2006-11-161-1/+1
| | | | llvm-svn: 31787
* For PR786:Reid Spencer2006-11-021-1/+0
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Refactor a bunch of includes so that TargetMachine.h doesn't have to includeOwen Anderson2006-05-121-0/+1
| | | | | | | TargetData.h. This should make recompiles a bit faster with my current TargetData tinkering. llvm-svn: 28238
* Suck block address tracking out of targets into the JIT Emitter. ThisChris Lattner2006-05-031-6/+9
| | | | | | | simplifies the MachineCodeEmitter interface just a little bit and makes BasicBlocks work like constant pools and jump tables. llvm-svn: 28082
* Refactor TargetMachine, pushing handling of TargetData into the ↵Owen Anderson2006-05-031-4/+4
| | | | | | | | target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference. This fixes PR 759. llvm-svn: 28074
* Change the BasicBlockAddrs map to be a vector, indexed by MBB number.Chris Lattner2006-05-031-1/+1
| | | | llvm-svn: 28069
* Several related changes:Chris Lattner2006-05-021-4/+6
| | | | | | | | | | | | | 1. Change several methods in the MachineCodeEmitter class to be pure virtual. 2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them from the MachineCodeEmitter interface, and reducing the amount of target- specific code. 3. Change the JITEmitter so that it allocates constantpools and jump tables *right* next to the functions that they belong to, instead of in a separate pool of memory. This makes all memory for a function be contiguous, and means the JITEmitter only tracks one block of memory now. llvm-svn: 28065
* Do not make the JIT memory manager manage the memory for globals. InsteadChris Lattner2006-05-021-4/+0
| | | | | | just have the JIT malloc them. llvm-svn: 28062
* Refactor the machine code emitter interface to pull the pointers for the currentChris Lattner2006-05-021-14/+7
| | | | | | | | | | code emission location into the base class, instead of being in the derived classes. This change means that low-level methods like emitByte/emitWord now are no longer virtual (yaay for speed), and we now have a framework to support growable code segments. This implements feature request #1 of PR469. llvm-svn: 28059
* Remove dead methodChris Lattner2006-05-021-3/+0
| | | | llvm-svn: 28055
* JumpTable support! What this represents is working asm and jit support forNate Begeman2006-04-221-1/+4
| | | | | | | | x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. llvm-svn: 27947
* add these so I can be less naughtyDuraid Madina2005-12-281-0/+1
| | | | llvm-svn: 25034
* nuke blank lineChris Lattner2005-11-101-1/+0
| | | | llvm-svn: 24278
* Fix VC++ constant truncation warning.Jeff Cohen2005-08-191-2/+2
| | | | llvm-svn: 22907
* new is not a valid default anywhere, so make this pure virtualAndrew Lenharth2005-07-281-0/+5
| | | | llvm-svn: 22542
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-13/+13
| | | | llvm-svn: 22523
* Only get the .bss and .data sections when needed instead of unconditionally.Chris Lattner2005-07-161-11/+3
| | | | | | This allows is to not emit empty sections when .data or .bss is not used. llvm-svn: 22457
* Refactor getSection() method to make it easier to use.Chris Lattner2005-07-161-19/+15
| | | | llvm-svn: 22455
* Major refactor of the ELFWriter code. Instead of building up one bigChris Lattner2005-07-161-143/+167
| | | | | | | | | | | vector that represents the .o file at once, build up a vector for each section of the .o file. This is needed because the .o file writer needs to be able to switch between sections as it emits them (e.g. switch between the .text section and the .rel section when emitting code). This patch has no functionality change. llvm-svn: 22453
* Add support for 64-bit elf filesChris Lattner2005-07-121-16/+24
| | | | llvm-svn: 22400
* VC++ demands that the function returns a valueJeff Cohen2005-07-121-0/+1
| | | | llvm-svn: 22393
* Clean up code, no functionality changes.Chris Lattner2005-07-111-50/+68
| | | | llvm-svn: 22382
* Emit a symbol table entry for each function we output to the ELF file. ThisChris Lattner2005-07-111-1/+31
| | | | | | | | | | | | | allows objdump to know which function we are emitting to: 00000000 <foo>: <---- 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret ... and allows .o files to be useful for linking :) llvm-svn: 22378
* add code to emit the .text section to the section header.Chris Lattner2005-07-111-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | | Add a *VERY INITIAL* machine code emitter class. This is enough to take this C function: int foo(int X) { return X +1; } and make objdump produce the following: $ objdump -d t-llvm.o t-llvm.o: file format elf32-i386 Disassembly of section .text: 00000000 <.text>: 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret Anything using branches or refering to the constant pool or requiring relocations will not work yet. llvm-svn: 22375
* Use a name mangler object to uniquify names and remove nonstandardChris Lattner2005-07-111-2/+8
| | | | | | characters from them. llvm-svn: 22371
* Add support for emitting a .data section and .bss section.Chris Lattner2005-07-081-22/+67
| | | | | | Add support for emitting external and .bss symbols. llvm-svn: 22358
* Add support for emitting the symbol table (and its string table) of theChris Lattner2005-07-071-54/+141
| | | | | | | | | | | | | | | | | | | | module to the ELF file. Test it by adding support for emitting common symbols. This allows us to compile this: %X = weak global int 0 %Y = weak global int 0 %Z = weak global int 0 to an elf file that 'readelf's this: Symbol table '.symtab' contains 4 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000004 4 OBJECT GLOBAL DEFAULT COM X 2: 00000004 4 OBJECT GLOBAL DEFAULT COM Y 3: 00000004 4 OBJECT GLOBAL DEFAULT COM Z llvm-svn: 22343
* iniital checkin of ELFWriter implementationChris Lattner2005-06-271-0/+230
For now, the elf writer is only capable of emitting an empty elf file, with a section table and a section table string table. This will be enhanced in the future :) llvm-svn: 22291
OpenPOWER on IntegriCloud