[PATCH] D40962: [ELF] When a relocation is out of range print the value and the range

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 09:59:18 PST 2017


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: test/ELF/i386-reloc-16.s:12
 // RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
-// ERROR: relocation R_386_16 out of range
+// ERROR: relocation R_386_16 out of range: 65536 is not in [0,  65535]
 
----------------
Please remove an extra space after "," (you have two spaces after ",").


================
Comment at: test/ELF/i386-reloc-8.s:12
 // RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
-// ERROR: relocation R_386_8 out of range
+// ERROR: relocation R_386_8 out of range: 256 is not in [0,  255]
 
----------------
Ditto


================
Comment at: test/ELF/x86-64-reloc-16.s:12
 // RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
-// ERROR: relocation R_X86_64_16 out of range
+// ERROR: relocation R_X86_64_16 out of range: 65536 is not in [0,  65535]
 
----------------
Ditto


================
Comment at: test/ELF/x86-64-reloc-8.s:12
 // RUN: not ld.lld -shared %t %t2 -o %t4 2>&1 | FileCheck --check-prefix=ERROR %s
-// ERROR: relocation R_X86_64_8 out of range
+// ERROR: relocation R_X86_64_8 out of range: 256 is not in [0,  255]
 
----------------
Ditto


================
Comment at: test/ELF/x86-64-reloc-error.s:9
 
-# CHECK: {{.*}}:(.text+0x1): relocation R_X86_64_32 out of range
-# CHECK: {{.*}}:(.text+0x8): relocation R_X86_64_32S out of range
+# CHECK: {{.*}}:(.text+0x1): relocation R_X86_64_32 out of range: 68719476736 is not in [0,  4294967295]
+# CHECK: {{.*}}:(.text+0x8): relocation R_X86_64_32S out of range: -281474976710656 is not in [-2147483648, 2147483647]
----------------
Ditto


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D40962





More information about the llvm-commits mailing list