Commit Graph

19 Commits

Author SHA1 Message Date
Nick Lewycky 34fa1684e7 Add support for @GOTPTOFF in i386 mode.
llvm-svn: 132643
2011-06-04 17:38:07 +00:00
Rafael Espindola 9a1a34b105 Update tests
llvm-svn: 129116
2011-04-07 23:51:25 +00:00
Rafael Espindola 1557fd6d39 Write the section table and the section data in the same order that
gun as does. This makes it a lot easier to compare the output of both
as the addresses are now a lot closer.

llvm-svn: 127972
2011-03-20 18:44:20 +00:00
Rafael Espindola af5ab7ad26 Test for push being relaxed.
llvm-svn: 122124
2010-12-18 01:16:59 +00:00
Rafael Espindola 9f75d5df0b Behave a bit more like gnu as and use the symbol (instead of the section)
for any relocation to a symbol defined in a tls section.

llvm-svn: 120121
2010-11-24 21:57:39 +00:00
Rafael Espindola 708ac4d6ad Relocate with the symbol if the relocation is of kind NTPOFF.
Patch by David Meyer, I added the test.

llvm-svn: 120104
2010-11-24 19:23:50 +00:00
Rafael Espindola 26cb15a549 Handle PCRel relocations with absolute values. Fixes PR8656.
llvm-svn: 119917
2010-11-21 00:48:25 +00:00
Rafael Espindola e8f08be11c Implement DTPOFF.
llvm-svn: 117546
2010-10-28 14:48:59 +00:00
Rafael Espindola 6f23eb380d Implement TLSLDM.
llvm-svn: 117544
2010-10-28 14:37:09 +00:00
Rafael Espindola b3b49bbc39 Implement VK_GOTNTPOFF and switch RelocNeedsGOT to use VariantKind.
llvm-svn: 117543
2010-10-28 14:22:44 +00:00
Rafael Espindola f8537165bd Add support for R_386_TLS_GD, R_386_TLS_LE_32, R_386_TLS_IE and R_386_TLS_LE.
llvm-svn: 117494
2010-10-27 21:23:52 +00:00
Jason W Kim e8b3711ae9 Fixing r116753 r116756 r116777
The failures in r116753 r116756 were caused by a python issue -
Python likes to append 'L' suffix to stringified numbers if the number
is larger than a machine int. Unfortunately, this causes a divergence of
behavior between 32 and 64 bit python versions.

I re-crafted elf-dump/common_dump to take care of these issues by:

1. always printing 0x (makes for easy sed/regex)
2. always print fixed length (exactly 2 + numBits/4 digits long)
   by mod ((2^numBits) - 1)
3. left-padded with '0'

There is a residual common routine that is also used by
macho-dump (dataToHex) , so I left the 'section_data' test values alone.

llvm-svn: 116823
2010-10-19 17:39:10 +00:00
Eric Christopher eac5e381cc Speculatively revert 116753 and 116756 to attempt to fix the bots.
llvm-svn: 116777
2010-10-19 00:19:49 +00:00
Jason W Kim eae048885d Changed elf-dump to output hex format by default.
Also updated tests. 

llvm-svn: 116753
2010-10-18 21:32:41 +00:00
Rafael Espindola fba9f74932 Implement R_386_GOT32.
llvm-svn: 116744
2010-10-18 20:47:21 +00:00
Rafael Espindola 0a5314fdb3 Relocate with .bss instead of using the symbol. Matches gas behavior.
llvm-svn: 116741
2010-10-18 20:25:33 +00:00
Rafael Espindola e3dc9e2ea1 Produce ELF::R_386_GOTPC relocations.
llvm-svn: 116728
2010-10-18 18:36:12 +00:00
Rafael Espindola 3521f8467d Produce a R_386_PLT32 when needed. Moved the default cases of switches to the
start for consistency.

llvm-svn: 116715
2010-10-18 16:58:03 +00:00
Rafael Espindola 4464e0858f Handle GOTOFF correctly on i386.
llvm-svn: 116711
2010-10-18 16:38:04 +00:00