summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/ELF/relocation-pc.s
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] Change -long-option to --long-option in tests. NFCFangrui Song2019-05-011-1/+1
| | | | | | | | | | We use both -long-option and --long-option in tests. Switch to --long-option for consistency. In the "llvm-readelf" mode, -long-option is discouraged as it conflicts with grouped short options and it is not accepted by GNU readelf. While updating the tests, change llvm-readobj -s to llvm-readobj -S to reduce confusion ("s" is --section-headers in llvm-readobj but --symbols in llvm-readelf). llvm-svn: 359649
* ELF can handle some relocations of the form -sym + constant.Rafael Espindola2015-11-021-1/+3
| | | | | | | | Remove code that was assuming that this would never work. Thanks to Colin LeMahie for finding and diagnosing the bug. llvm-svn: 251818
* Convert tabs to spaces.Rafael Espindola2015-11-021-2/+2
| | | | llvm-svn: 251817
* Don't constrain the section order in tests that don't depend on it.Rafael Espindola2015-04-291-9/+2
| | | | llvm-svn: 236102
* Update tests to not be as dependent on section numbers.Rafael Espindola2015-04-151-2/+2
| | | | | | | | Many of these predate llvm-readobj. With elf-dump we had to match a relocation to symbol number and symbol number to symbol name or section number. llvm-svn: 235015
* Write the section header in the end.Rafael Espindola2015-04-081-1/+1
| | | | | | | | One could make the argument for writing it immediately after the ELF header, but writing it in the middle of the sections like we were doing just makes it harder for no reason. llvm-svn: 234400
* Completely rewrite ELFObjectWriter::RecordRelocation.Rafael Espindola2014-03-291-2/+2
| | | | | | | | | | | | | | | | | | | I started trying to fix a small issue, but this code has seen a small fix too many. The old code was fairly convoluted. Some of the issues it had: * It failed to check if a symbol difference was in the some section when converting a relocation to pcrel. * It failed to check if the relocation was already pcrel. * The pcrel value computation was wrong in some cases (relocation-pc.s) * It was missing quiet a few cases where it should not convert symbol relocations to section relocations, leaving the backends to patch it up. * It would not propagate the fact that it had changed a relocation to pcrel, requiring a quiet nasty work around in ARM. * It was missing comments. llvm-svn: 205076
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 182908
* Replace coff-/elf-dump with llvm-readobjNico Rieck2013-04-121-27/+26
| | | | llvm-svn: 179361
* Fix the bitwidth of the remaining fields.Rafael Espindola2011-08-041-8/+8
| | | | llvm-svn: 136884
* Change anther counter to decimal.Rafael Espindola2011-08-041-2/+2
| | | | llvm-svn: 136870
* Don't print a counter in hex.Rafael Espindola2011-08-041-1/+1
| | | | llvm-svn: 136869
* Print all the bits in the addend.Rafael Espindola2011-08-041-2/+2
| | | | llvm-svn: 136867
* Update testsRafael Espindola2011-04-071-1/+1
| | | | llvm-svn: 129116
* Write the section table and the section data in the same order thatRafael Espindola2011-03-201-4/+4
| | | | | | | 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
* Handle FK_PCRel_1 and add a test case for this and FK_PCRel_4.Joerg Sonnenberger2011-02-211-0/+33
llvm-svn: 126157
OpenPOWER on IntegriCloud