Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | ARM/MC/ELF relocation "hello world" for movw/movt. | Jason W Kim | 2010-12-01 | 1 | -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 common | Rafael Espindola | 2010-11-28 | 1 | -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 Espindola | 2010-11-24 | 1 | -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 Espindola | 2010-11-24 | 1 | -1/+2 | |
| | | | | | | Patch by David Meyer, I added the test. llvm-svn: 120104 | |||||
* | Fixed some style issues (no _, no spc after !) | Jason W Kim | 2010-11-22 | 1 | -6/+6 | |
| | | | | llvm-svn: 119986 | |||||
* | Make the <ARCH>ELFObjectWriter statics private | Jason W Kim | 2010-11-22 | 1 | -0/+3 | |
| | | | | llvm-svn: 119982 | |||||
* | Fix misplaced statics. | Jason W Kim | 2010-11-22 | 1 | -6/+5 | |
| | | | | llvm-svn: 119981 | |||||
* | Kill trailing whitespace | Jason W Kim | 2010-11-22 | 1 | -3/+3 | |
| | | | | llvm-svn: 119979 | |||||
* | Refactor the ELFRelocationEntry (pull up) and move the arch-specific statics ↵ | Jason W Kim | 2010-11-22 | 1 | -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 Peck | 2010-11-21 | 1 | -2/+140 | |
| | | | | | | perfect yet, but it works for many tests. llvm-svn: 119952 | |||||
* | Handle PCRel relocations with absolute values. Fixes PR8656. | Rafael Espindola | 2010-11-21 | 1 | -9/+23 | |
| | | | | llvm-svn: 119917 | |||||
* | A bit more of gnu as compatibility when handling relocations with aliases. | Rafael Espindola | 2010-11-16 | 1 | -2/+5 | |
| | | | | llvm-svn: 119328 | |||||
* | Fix compiler warnigns. | Benjamin Kramer | 2010-11-15 | 1 | -2/+2 | |
| | | | | llvm-svn: 119175 | |||||
* | Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original | Rafael Espindola | 2010-11-15 | 1 | -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 Kim | 2010-11-15 | 1 | -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) to | Rafael Espindola | 2010-11-14 | 1 | -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 undefined | Rafael Espindola | 2010-11-14 | 1 | -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 of | Rafael Espindola | 2010-11-14 | 1 | -11/+6 | |
| | | | | | | the symbols. llvm-svn: 119022 | |||||
* | MC: Simplify Mach-O and ELF object writer implementations. | Daniel Dunbar | 2010-11-13 | 1 | -133/+85 | |
| | | | | | | - What was I thinking????? llvm-svn: 118992 | |||||
* | MCELF: Copy the symbol name only if we're going to modify it. | Benjamin Kramer | 2010-11-12 | 1 | -9/+8 | |
| | | | | llvm-svn: 118920 | |||||
* | Initial comdat implementation. | Rafael Espindola | 2010-11-11 | 1 | -21/+118 | |
| | | | | llvm-svn: 118805 | |||||
* | Make AliasedSymbol able to handle MCTargetExpr. They can get here if | Rafael Espindola | 2010-11-11 | 1 | -3/+16 | |
| | | | | | | a weakref is used with a VariantKind. llvm-svn: 118798 | |||||
* | Fix the symbol index of weak references. Also make RecordRelocation a bit | Rafael Espindola | 2010-11-11 | 1 | -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 is | Rafael Espindola | 2010-11-11 | 1 | -6/+4 | |
| | | | | | | a leftover from the removal of isExplicit. llvm-svn: 118774 | |||||
* | Factor some code into WriteSection. | Rafael Espindola | 2010-11-10 | 1 | -62/+72 | |
| | | | | llvm-svn: 118733 | |||||
* | Update the section index map after we add the medatada sections. | Rafael Espindola | 2010-11-10 | 1 | -0/+4 | |
| | | | | llvm-svn: 118728 | |||||
* | Use SectionIndexMap in WriteSymbolTable to make it a little less brittle. | Rafael Espindola | 2010-11-10 | 1 | -16/+17 | |
| | | | | llvm-svn: 118725 | |||||
* | Factor some code into ComputeIndexMap. | Rafael Espindola | 2010-11-10 | 1 | -14/+28 | |
| | | | | llvm-svn: 118722 | |||||
* | Change the String<size> methods to take a fragment instead of a buffer. | Rafael Espindola | 2010-11-10 | 1 | -77/+40 | |
| | | | | llvm-svn: 118709 | |||||
* | Use MCSectionELF in places we know we have an ELF section. | Rafael Espindola | 2010-11-10 | 1 | -6/+6 | |
| | | | | llvm-svn: 118699 | |||||
* | Fixed version of 118639 with an extra assert to catch similar problems | Rafael Espindola | 2010-11-09 | 1 | -3/+3 | |
| | | | | | | earlier. Implicit bool -> int conversions are evil! llvm-svn: 118651 | |||||
* | Revert previous patch. Missed a case. | Rafael Espindola | 2010-11-09 | 1 | -3/+3 | |
| | | | | llvm-svn: 118645 | |||||
* | Remove IsExplicit. It was always false. | Rafael Espindola | 2010-11-09 | 1 | -3/+3 | |
| | | | | llvm-svn: 118639 | |||||
* | Implement .weakref. | Rafael Espindola | 2010-11-01 | 1 | -2/+15 | |
| | | | | llvm-svn: 117911 | |||||
* | Add support for files with more than 65280 sections. No testcase since | Rafael Espindola | 2010-10-31 | 1 | -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 with | Rafael Espindola | 2010-10-29 | 1 | -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 Espindola | 2010-10-28 | 1 | -4/+3 | |
| | | | | llvm-svn: 117585 | |||||
* | Fix relocations with renamed symbols. | Rafael Espindola | 2010-10-28 | 1 | -5/+6 | |
| | | | | llvm-svn: 117575 | |||||
* | Aliases defined with .symver should copy the binding of the symbols they alias. | Rafael Espindola | 2010-10-28 | 1 | -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 Espindola | 2010-10-28 | 1 | -0/+3 | |
| | | | | llvm-svn: 117548 | |||||
* | Implement TLSLD. | Rafael Espindola | 2010-10-28 | 1 | -0/+4 | |
| | | | | llvm-svn: 117547 | |||||
* | Implement DTPOFF. | Rafael Espindola | 2010-10-28 | 1 | -0/+4 | |
| | | | | llvm-svn: 117546 | |||||
* | Implement TLSLDM. | Rafael Espindola | 2010-10-28 | 1 | -0/+4 | |
| | | | | llvm-svn: 117544 | |||||
* | Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind. | Rafael Espindola | 2010-10-28 | 1 | -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 Espindola | 2010-10-27 | 1 | -0/+17 | |
| | | | | llvm-svn: 117494 | |||||
* | Implement R_X86_64_GOTTPOFF, R_X86_64_TLSGD and R_X86_64_TPOFF32. | Rafael Espindola | 2010-10-27 | 1 | -0/+12 | |
| | | | | llvm-svn: 117481 | |||||
* | Replace pointer arithmetic with StringRef::substr. | Benjamin Kramer | 2010-10-27 | 1 | -6/+5 | |
| | | | | llvm-svn: 117477 | |||||
* | Produce an error for an invalid use of .symver. | Rafael Espindola | 2010-10-27 | 1 | -0/+5 | |
| | | | | llvm-svn: 117462 | |||||
* | Symbols defined as the difference of other two end up in the ABS section. | Rafael Espindola | 2010-10-27 | 1 | -5/+2 | |
| | | | | llvm-svn: 117451 | |||||
* | Add support for the .symver directive. This is really ugly, but most of it is | Rafael Espindola | 2010-10-27 | 1 | -14/+56 | |
| | | | | | | contained in the ELF object writer. llvm-svn: 117448 |