Commit Graph

7 Commits

Author SHA1 Message Date
Fangrui Song 4a4ce14eb2 [ELF] Mention symbol name in reportRangeError()
For an out-of-range relocation referencing a non-local symbol, report the symbol name and the object file that defines the symbol. As an example:
```
t.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647]
```
=>
```
t.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647]; references func
>>> defined in t1.o
```

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D73518
2020-01-29 09:38:25 -08:00
Fangrui Song 40a9f2251b [ELF] Replace unused output filenames with /dev/null in tests
Post commit review at rLLD335992

llvm-svn: 336129
2018-07-02 17:48:23 +00:00
Fangrui Song 5ea154402e [ELF] Change test files for style consistency. NFC
* Move `REQUIRES:` line to the top
* llvm-mc ... -o %t -> llvm-mc ... -o %t.o
* Don't check "TEXT" "DATA" columns (they are bfd-style names that do
not fit into llvm well) in llvm-objdump output

llvm-svn: 335498
2018-06-25 17:07:40 +00:00
Alexander Richardson d2481bed05 [ELF] When a relocation is out of range print the value and the range
Reviewers: ruiu, grimar

Reviewed By: ruiu

Subscribers: emaste, nemanjai, javed.absar, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D40962

llvm-svn: 320416
2017-12-11 20:47:21 +00:00
Eugene Leviant 84569e6caa [ELF] Refactor target error messages
Differential revision: https://reviews.llvm.org/D27097

llvm-svn: 288114
2016-11-29 08:05:44 +00:00
Rafael Espindola 715b04eda6 Use defined hidden symbols for out of range tests.
When the symbol can be preempted the error is not entirely accurate.

This just makes upcoming patches more readable.

llvm-svn: 262954
2016-03-08 19:51:58 +00:00
Rui Ueyama 21923996f8 ELF: Do not call fatal() if relocation contraints are not satisfied.
http://reviews.llvm.org/D16648

llvm-svn: 259435
2016-02-01 23:28:21 +00:00