summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Factor some code into WriteSection.Rafael Espindola2010-11-101-62/+72
| | | | llvm-svn: 118733
* Update the section index map after we add the medatada sections.Rafael Espindola2010-11-101-0/+4
| | | | llvm-svn: 118728
* Use SectionIndexMap in WriteSymbolTable to make it a little less brittle.Rafael Espindola2010-11-101-16/+17
| | | | llvm-svn: 118725
* Factor some code into ComputeIndexMap.Rafael Espindola2010-11-101-14/+28
| | | | llvm-svn: 118722
* Change the String<size> methods to take a fragment instead of a buffer.Rafael Espindola2010-11-101-77/+40
| | | | llvm-svn: 118709
* Use MCSectionELF in places we know we have an ELF section.Rafael Espindola2010-11-101-6/+6
| | | | llvm-svn: 118699
* Fixed version of 118639 with an extra assert to catch similar problemsRafael Espindola2010-11-091-3/+3
| | | | | | earlier. Implicit bool -> int conversions are evil! llvm-svn: 118651
* Revert previous patch. Missed a case.Rafael Espindola2010-11-091-3/+3
| | | | llvm-svn: 118645
* Remove IsExplicit. It was always false.Rafael Espindola2010-11-091-3/+3
| | | | llvm-svn: 118639
* Implement .weakref.Rafael Espindola2010-11-011-2/+15
| | | | llvm-svn: 117911
* Add support for files with more than 65280 sections. No testcase sinceRafael Espindola2010-10-311-42/+109
| | | | | | it would be a bit too big :-) llvm-svn: 117849
* Be more strict on when we produce an undefined reference. In gas a file withRafael Espindola2010-10-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | just .type foo,@object will produce an undefined reference to foo. On the other hand, a file with just .weakref bar, foo will not. It is somewhat hard to support both in MC since both statements should create the symbols. It should be possible if we really need to by adding to the flags, but hopefully that is not necessary. With this patch we do not produce a undefined reference in any of those cases. The assembly file needs an actual use for the undefined reference to be present. This is in preparation for a patch implementing .weakref. llvm-svn: 117735
* Defined weak symbols should have non-zero value.Rafael Espindola2010-10-281-4/+3
| | | | llvm-svn: 117585
* Fix relocations with renamed symbols.Rafael Espindola2010-10-281-5/+6
| | | | llvm-svn: 117575
* Aliases defined with .symver should copy the binding of the symbols they alias.Rafael Espindola2010-10-281-6/+21
| | | | | | | Move the existing patching for undefined symbols so that all the patching is done in the same function. llvm-svn: 117570
* Implement R_X86_64_DTPOFF32.Rafael Espindola2010-10-281-0/+3
| | | | llvm-svn: 117548
* Implement TLSLD.Rafael Espindola2010-10-281-0/+4
| | | | llvm-svn: 117547
* Implement DTPOFF.Rafael Espindola2010-10-281-0/+4
| | | | llvm-svn: 117546
* Implement TLSLDM.Rafael Espindola2010-10-281-0/+4
| | | | llvm-svn: 117544
* Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.Rafael Espindola2010-10-281-15/+16
| | | | llvm-svn: 117543
* Add support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.Rafael Espindola2010-10-271-0/+17
| | | | llvm-svn: 117494
* Implement R_X86_64_GOTTPOFF, R_X86_64_TLSGD and R_X86_64_TPOFF32.Rafael Espindola2010-10-271-0/+12
| | | | llvm-svn: 117481
* Replace pointer arithmetic with StringRef::substr.Benjamin Kramer2010-10-271-6/+5
| | | | llvm-svn: 117477
* Produce an error for an invalid use of .symver.Rafael Espindola2010-10-271-0/+5
| | | | llvm-svn: 117462
* Symbols defined as the difference of other two end up in the ABS section.Rafael Espindola2010-10-271-5/+2
| | | | llvm-svn: 117451
* Add support for the .symver directive. This is really ugly, but most of it isRafael Espindola2010-10-271-14/+56
| | | | | | contained in the ELF object writer. llvm-svn: 117448
OpenPOWER on IntegriCloud