summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Set the value of absolute symbols.Roman Divacky2010-12-201-0/+9
| | | | llvm-svn: 122268
* Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola2010-12-181-14/+0
| | | | llvm-svn: 122148
* Remove the MCObjectFormat class.Rafael Espindola2010-12-181-0/+6
| | | | llvm-svn: 122147
* Move some data to the TargetWriter.Rafael Espindola2010-12-181-79/+53
| | | | llvm-svn: 122134
* Store and free the TargetObjectWriter.Rafael Espindola2010-12-171-13/+26
| | | | llvm-svn: 122070
* Stub out explicit MCELFObjectTargetWriter interface.Rafael Espindola2010-12-171-1/+2
| | | | llvm-svn: 122067
* Move createELFObjectWriter to its own header.Rafael Espindola2010-12-171-0/+1
| | | | llvm-svn: 122064
* Use getFixupKindInfo to implement isFixupKindPCRel, ELF version.Rafael Espindola2010-12-171-40/+8
| | | | llvm-svn: 122050
* MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format ↵Daniel Dunbar2010-12-171-2/+11
| | | | | | | | specific hook. - Currently just has stub implementations for Mach-O, ELF, and COFF. llvm-svn: 122037
* MC/Assembler: Strip out object writer arguments, now that it is always availableDaniel Dunbar2010-12-171-1/+1
| | | | | | -- and remove FIXME asking for the same! llvm-svn: 122032
* 1. ARM/MC/ELF: A few more ELF relocs for .oJason W Kim2010-12-161-0/+6
| | | | | | | 2. Fixed EmitLocalCommonSymbol for ELF (Yes, they exist. :) Test added. llvm-svn: 121951
* First cut of ARM/MC/ELF PIC relocations.Jason W Kim2010-12-131-7/+25
| | | | | | Test has fixme, to move to .s -> .o test when AsmParser works better. llvm-svn: 121732
* Thumb unconditional branch binary encoding. rdar://8754994Jim Grosbach2010-12-101-0/+1
| | | | llvm-svn: 121496
* Rename CB/CBZ specific fixup accordingly.Jim Grosbach2010-12-091-1/+1
| | | | llvm-svn: 121404
* ARM/MC/ELF TPsoft is now a proper pseudo inst.Jason W Kim2010-12-081-5/+13
| | | | | | | | | Added test to check bl __aeabi_read_tp gets emitted properly for ELF/ASM as well as ELF/OBJ (including fixup) Also added support for ELF::R_ARM_TLS_IE32 llvm-svn: 121312
* Support the "target" encodings for the CB[N]Z instructions.Bill Wendling2010-12-081-0/+1
| | | | llvm-svn: 121308
* Add support for loading from a constant pool.Bill Wendling2010-12-081-0/+1
| | | | llvm-svn: 121226
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-071-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | actuall addresses in a .o file, so it is better to let the MachO writer compute it. This is good for two reasons. First, areas that shouldn't care about addresses now don't have access to it. Second, the layout of each section is independent. I should use this in a subsequent commit to speed it up. Most of the patch is just removing the section address computation. The two interesting parts are the change on how we handle padding in the end of sections and how MachO can get the address of a-b when a and b are in different sections. Since now the expression evaluation normally doesn't know the section address, it will think that a-b needs relocation and let the MachO writer know. Once it has computed the section addresses, it calls back the expression evaluation with the section addresses to resolve these expressions. The remaining problem is the handling of padding. Currently it will create a special alignment fragment at the end. Since that fragment doesn't update the alignment of the section, it needs the real address to be computed. Since now the layout will not compute a-b with a and b in different sections, the only effect that the special alignment fragment has is update the address size of the section. This can also be done by the MachO writer. llvm-svn: 121076
* Add fixup for Thumb1 BL/BLX instructions.Jim Grosbach2010-12-061-0/+1
| | | | llvm-svn: 121072
* Refactor ELFObjectWriter.Jason W Kim2010-12-061-216/+106
| | | | | | | + ARM/X86/MBlaze now share a common RecordRelocation + ARM/X86/MBlaze arch specific routines are limited to GetRelocType() llvm-svn: 121043
* Remove the getAddress getter, initialize Ordinal in the constructor and useRafael Espindola2010-12-061-1/+1
| | | | | | that on the ELF writer to detect a section we created. llvm-svn: 120981
* Add a getSymbolOffset method and use it in the ELF writer.Rafael Espindola2010-12-061-15/+8
| | | | llvm-svn: 120977
* The sections that the ELF object writer has to create are very simple andRafael Espindola2010-12-021-20/+48
| | | | | | | | contain only data. Handle them specially instead of using AddSectionToTheEnd. This moves a hack from the generic assembler to the elf writer. It is also a bit faster and should make other improvements easier. llvm-svn: 120683
* Add support for binary encoding of ARM 'adr' instructions referencing constantJim Grosbach2010-12-021-2/+3
| | | | | | pool entries (LEApcrel pseudo). Ongoing saga of rdar://8542291. llvm-svn: 120635
* Add correct encodings for STRD and LDRD, including fixup support. ↵Owen Anderson2010-12-011-2/+2
| | | | | | Additionally, update these to unified syntax. llvm-svn: 120589
* Fix a mised reloc rename spot.Jim Grosbach2010-12-011-2/+2
| | | | llvm-svn: 120585
* ARM/MC/ELF relocation "hello world" for movw/movt.Jason W Kim2010-12-011-1/+97
| | | | | | | | | | | Lifted adjustFixupValue() from Darwin for sharing w ELF. Test added TODO: refactor ELFObjectWriter::RecordRelocation more. Possibly share more code with Darwin? Lots more relocations... llvm-svn: 120534
* Define generic 1, 2 and 4 byte pc relative relocations. They are commonRafael Espindola2010-11-281-11/+15
| | | | | | and at least the 4 byte one will be needed to implement the .cfi_* directives. llvm-svn: 120240
* Behave a bit more like gnu as and use the symbol (instead of the section)Rafael Espindola2010-11-241-3/+9
| | | | | | for any relocation to a symbol defined in a tls section. llvm-svn: 120121
* Relocate with the symbol if the relocation is of kind NTPOFF.Rafael Espindola2010-11-241-1/+2
| | | | | | Patch by David Meyer, I added the test. llvm-svn: 120104
* Fixed some style issues (no _, no spc after !)Jason W Kim2010-11-221-6/+6
| | | | llvm-svn: 119986
* Make the <ARCH>ELFObjectWriter statics privateJason W Kim2010-11-221-0/+3
| | | | llvm-svn: 119982
* Fix misplaced statics.Jason W Kim2010-11-221-6/+5
| | | | llvm-svn: 119981
* Kill trailing whitespaceJason W Kim2010-11-221-3/+3
| | | | llvm-svn: 119979
* Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics ↵Jason W Kim2010-11-221-46/+54
| | | | | | | | | | to inside the class where it belongs. Next step is to rationally break apart the RecordRelocation() Probably the step will be to have 1 member function for ech slot of the ELFRelocationEntry() llvm-svn: 119978
* Implement ELF object file writing support for the MBlaze backend. Its not ↵Wesley Peck2010-11-211-2/+140
| | | | | | perfect yet, but it works for many tests. llvm-svn: 119952
* Handle PCRel relocations with absolute values. Fixes PR8656.Rafael Espindola2010-11-211-9/+23
| | | | llvm-svn: 119917
* A bit more of gnu as compatibility when handling relocations with aliases.Rafael Espindola2010-11-161-2/+5
| | | | llvm-svn: 119328
* Fix compiler warnigns.Benjamin Kramer2010-11-151-2/+2
| | | | llvm-svn: 119175
* Change MCExpr::EvaluateAsRelocatableImpl of variables to return the originalRafael Espindola2010-11-151-56/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | variable if recursing fails to simplify it. Factor AliasedSymbol to be a method of MCSymbol. Update MCAssembler::EvaluateFixup to match the change in EvaluateAsRelocatableImpl. Remove the WeakRefExpr hack, as the object writer now sees the weakref with no extra effort needed. Nothing else is using MCTargetExpr, but keep it for now. Now that the ELF writer sees relocations with aliases, handle .weak foo2 foo2: .weak bar2 .set bar2,foo2 .quad bar2 the same way gas does and produce a relocation with bar2. llvm-svn: 119152
* Dovetail with Dan Dunbar's rework of ELFObjectWriter.Jason W Kim2010-11-151-223/+311
| | | | | | | Added 2 new subclasses - X86ELFObjectWriter and ARMELFObectWriter. ARM and X86 require different code for RecordRelocation(), possibly others. llvm-svn: 119149
* Move the logic to decide with which symbol we produce a relocation (if any) toRafael Espindola2010-11-141-27/+44
| | | | | | a central location. This also makes us a bit more compatible with gas. llvm-svn: 119094
* Handle a peculiar comdat case: Creating a section with an undefinedRafael Espindola2010-11-141-29/+47
| | | | | | | signature symbol causes a local symbol to be created unless there is some other use of the symbol. llvm-svn: 119026
* Simplify getSymbolIndexInSymbolTable by setting the actual index ofRafael Espindola2010-11-141-11/+6
| | | | | | the symbols. llvm-svn: 119022
* MC: Simplify Mach-O and ELF object writer implementations.Daniel Dunbar2010-11-131-133/+85
| | | | | | - What was I thinking????? llvm-svn: 118992
* MCELF: Copy the symbol name only if we're going to modify it.Benjamin Kramer2010-11-121-9/+8
| | | | llvm-svn: 118920
* Initial comdat implementation.Rafael Espindola2010-11-111-21/+118
| | | | llvm-svn: 118805
* Make AliasedSymbol able to handle MCTargetExpr. They can get here ifRafael Espindola2010-11-111-3/+16
| | | | | | a weakref is used with a VariantKind. llvm-svn: 118798
* Fix the symbol index of weak references. Also make RecordRelocation a bitRafael Espindola2010-11-111-22/+12
| | | | | | | easier to read by having const references to the symbol, aliased symbol and renamed symbol. llvm-svn: 118793
* Remove some explicit arguments to getELFSection. This isRafael Espindola2010-11-111-6/+4
| | | | | | a leftover from the removal of isExplicit. llvm-svn: 118774
OpenPOWER on IntegriCloud