[all-commits] [llvm/llvm-project] 4a4ce1: [ELF] Mention symbol name in reportRangeError()

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jan 29 09:40:55 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a4ce14eb2c6b35719d57c2c25cbee7e79d19cb0
      https://github.com/llvm/llvm-project/commit/4a4ce14eb2c6b35719d57c2c25cbee7e79d19cb0
  Author: Fangrui Song <maskray at google.com>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M lld/ELF/Relocations.cpp
    M lld/ELF/Target.h
    M lld/test/ELF/aarch64-abs16.s
    M lld/test/ELF/aarch64-abs32.s
    M lld/test/ELF/aarch64-prel16.s
    M lld/test/ELF/aarch64-prel32.s
    M lld/test/ELF/hexagon-jump-error.s
    M lld/test/ELF/i386-reloc-16.s
    M lld/test/ELF/i386-reloc-8.s
    M lld/test/ELF/i386-reloc-range.s
    M lld/test/ELF/ppc64-reloc-addr.s
    M lld/test/ELF/riscv-branch.s
    M lld/test/ELF/riscv-call.s
    M lld/test/ELF/riscv-hi20-lo12.s
    M lld/test/ELF/riscv-jal.s
    M lld/test/ELF/riscv-pcrel-hilo.s
    M lld/test/ELF/x86-64-reloc-error.s
    M lld/test/ELF/x86-64-reloc-error2.s

  Log Message:
  -----------
  [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




More information about the All-commits mailing list