summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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