x86-64: Add ilp32-12 to check R_X86_64_32 for x32
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 26 May 2021 13:48:20 +0000 (06:48 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 26 May 2021 13:50:20 +0000 (06:50 -0700)
* testsuite/ld-x86-64/ilp32-12.d: New file.
* testsuite/ld-x86-64/ilp32-12.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run ilp32-12.

ld/ChangeLog
ld/testsuite/ld-x86-64/ilp32-12.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/ilp32-12.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp

index 3969b8c80fa288861976e4b43c047c3068ce4ae1..fca75bd71f3e9e6c02b9bc822933807babf25d1e 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-x86-64/ilp32-12.d: New file.
+       * testsuite/ld-x86-64/ilp32-12.s: Likewise.
+       * testsuite/ld-x86-64/x86-64.exp: Run ilp32-12.
+
 2021-05-14  Nelson Chu  <nelson.chu@sifive.com>
 
        * testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
diff --git a/ld/testsuite/ld-x86-64/ilp32-12.d b/ld/testsuite/ld-x86-64/ilp32-12.d
new file mode 100644 (file)
index 0000000..ce7e179
--- /dev/null
@@ -0,0 +1,7 @@
+#as: --x32
+#ld: -shared -melf32_x86_64
+#readelf: -SW
+
+#...
+ +\[ [0-9]\] .debug_loclists .*
+#pass
diff --git a/ld/testsuite/ld-x86-64/ilp32-12.s b/ld/testsuite/ld-x86-64/ilp32-12.s
new file mode 100644 (file)
index 0000000..91473c0
--- /dev/null
@@ -0,0 +1,5 @@
+       .section .rodata
+.L1:
+       .byte   0
+       .section .debug_loclists,"",@progbits
+       .long   .L1 - 0x1dfae
index 17fd10ee121df4a952be3307c40fab7996ecdec0..37cf998252c5eff15eb7c4be8cdb7d7866e3a679 100644 (file)
@@ -521,6 +521,7 @@ run_dump_test "ilp32-8"
 run_dump_test "ilp32-9"
 run_dump_test "ilp32-10"
 run_dump_test "ilp32-11"
+run_dump_test "ilp32-12"
 run_dump_test "ia32-1"
 run_dump_test "ia32-2"
 run_dump_test "ia32-3"