summaryrefslogtreecommitdiff
path: root/test/MC/ELF/local-reloc.s
Commit message (Collapse)AuthorAge
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182908 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179361 91177308-0d34-0410-b5e6-96231b3b80d8
* print st_shndx with the correct number of bits.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136880 91177308-0d34-0410-b5e6-96231b3b80d8
* print st_other with the correct number of bits.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136877 91177308-0d34-0410-b5e6-96231b3b80d8
* print st_type with the correct number of bits.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136875 91177308-0d34-0410-b5e6-96231b3b80d8
* Print st_bind with the correct number of bits.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136874 91177308-0d34-0410-b5e6-96231b3b80d8
* Another counter goes decimal.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136871 91177308-0d34-0410-b5e6-96231b3b80d8
* Change anther counter to decimal.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136870 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print a counter in hex.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136869 91177308-0d34-0410-b5e6-96231b3b80d8
* Write the section table and the section data in the same order thatRafael Espindola2011-03-20
| | | | | | | gun as does. This makes it a lot easier to compare the output of both as the addresses are now a lot closer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127972 91177308-0d34-0410-b5e6-96231b3b80d8
* Print all 64bits for st_value and st_size. Adjust tests accordingly.Roman Divacky2010-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122263 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing r116753 r116756 r116777Jason W Kim2010-10-19
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116823 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert 116753 and 116756 to attempt to fix the bots.Eric Christopher2010-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116777 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed elf-dump to output hex format by default.Jason W Kim2010-10-18
| | | | | | | | Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116753 91177308-0d34-0410-b5e6-96231b3b80d8
* Write relocations in the end of the file. This matches what gas does andRafael Espindola2010-09-27
| | | | | | makes files easier to diff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114898 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 114678 and 114667. Reverting them did not fix the bot:Rafael Espindola2010-09-24
| | | | | | http://google1.osuosl.org:8011/builders/llvm-gcc-i386-linux-selfhost/builds/69 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114761 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 114678 and 114667 to see ifRafael Espindola2010-09-24
| | | | | | | | http://google1.osuosl.org:8011/builders/llvm-gcc-i386-linux-selfhost gets happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114742 91177308-0d34-0410-b5e6-96231b3b80d8
* Represent relocations against local symbols as relocations against the sectionRafael Espindola2010-09-23
they are in. Both ways should be equivalent, but gas produces relocations against the section. Roman wrote the patch, I added the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114667 91177308-0d34-0410-b5e6-96231b3b80d8