summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/i386-reloc-range.s
Commit message (Collapse)AuthorAgeFilesLines
* [ELF][X86] Improve testsFangrui Song2019-08-011-2/+2
| | | | | | | | | | | | * Add --no-show-raw-insn to llvm-objdump -d tests * When linking an executable with %t.so, the path %t.so will be recorded in the DT_NEEDED entry if %t.so doesn't have DT_SONAME. .dynstr will have varying lengths on different systems. Add -soname so that the string in .dynstr is of fixed length to make tests more robust. * Rename i386-tls-initial-exec-local.s to i386-tls-ie-local.s * Refactor tls-initial-exec-local.s to x86-64-tls-ie-local.s llvm-svn: 367533
* [llvm-objdump] Print newlines before and after "Disassembly of section ...:"Fangrui Song2019-05-011-0/+1
| | | | | | | | | | | This improves readability and the behavior is consistent with GNU objdump. The new test test/tools/llvm-objdump/X86/disassemble-section-name.s checks we print newlines before and after "Disassembly of section ...:" Differential Revision: https://reviews.llvm.org/D61127 llvm-svn: 359668
* [ELF] Replace unused output filenames with /dev/null in testsFangrui Song2018-07-021-1/+1
| | | | | | Post commit review at rLLD335992 llvm-svn: 336129
* [ELF] When a relocation is out of range print the value and the rangeAlexander Richardson2017-12-111-1/+1
| | | | | | | | | | | | Reviewers: ruiu, grimar Reviewed By: ruiu Subscribers: emaste, nemanjai, javed.absar, kbarton, llvm-commits Differential Revision: https://reviews.llvm.org/D40962 llvm-svn: 320416
* [LLD] Mark a number of x86 only tests to require x86Jon Chesterfield2017-07-181-0/+1
| | | | | | | | | | | Noticed while testing for an out of tree target. There are probably more tests that should be so marked. I'm not sure who owns these tests so I've added a few names I recognise from the recent history. With advice from probinson, ruiu, rafael and dramatically improved by davidb. Thank you all! Differential Revision: https://reviews.llvm.org/D34685 llvm-svn: 308335
* Relax the overflow checking of R_386_PC16.Rafael Espindola2017-06-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the freebsd early boot code fails to link. The issue reduces to 16 bit code at position 0x7000 wanting to jump to position 0x9000. That is represented in the .o file as a relocation with no symbol and an addend of 0x9000 - 2 (The -2 is because i386 uses the ip after the current instruction for jumps). If the addend is interpreted as signed (it should), it is -28674. In a 32 bit architecture, that is the address 0xffff8ffe. To get there from 0x7000 we have to add 4294909950 (too big) or subtract 57346 (too small). We then produce an error. What lld is missing is the fact that at runtime this will actually be a 16 bit architecture and adding 0x1ffe produces 0x8ffe which is the correct result in 16 bits (-28674). Since we have a 16 bit addend and a 16 bit PC, the relocation can move the PC to any 16 bit address and that is the only thing we really need to check: if the address we are pointing to fits in 16 bits. This is unfortunately hard to do since we have to delay subtracting the PC and if we want to do that outside of Target.cpp, we have to move the overflow check out too. An incomplete patch that tries to do that is at https://reviews.llvm.org/D34070 This patch instead just relaxes the check. Since the value we have is the destination minus the PC and the PC is 16 bits, it should fit in 17 bits if the destination fits in 16 too. bfd had a similar issue for some time and got a similar fix: https://sourceware.org/ml/binutils/2005-08/msg00001.html llvm-svn: 305135
* Fix filename.Rafael Espindola2017-06-091-1/+1
| | | | | | It was passing locally because of a leftover file. llvm-svn: 305042
* Add a test for R_386_PC16 range checking.Rafael Espindola2017-06-091-0/+22
llvm-svn: 305040
OpenPOWER on IntegriCloud