aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-07-18 06:23:40 +0000
committerJan Beulich <jbeulich@novell.com>2005-07-18 06:23:40 +0000
commitac2aa337d30099606f140bdf01abaf7e22d68327 (patch)
tree5b93a159b915d5e1eac2c05df448ea798f5b2585 /ld/testsuite/ld-x86-64
parent2dd88dcacfb76d8d119e952beb4fda883fd4afa4 (diff)
downloadgdb-ac2aa337d30099606f140bdf01abaf7e22d68327.zip
gdb-ac2aa337d30099606f140bdf01abaf7e22d68327.tar.gz
gdb-ac2aa337d30099606f140bdf01abaf7e22d68327.tar.bz2
bfd/
2005-07-18 Jan Beulich <jbeulich@novell.com> * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler for R_386_PC16. * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF. ld/testsuite/ 2005-07-18 Jan Beulich <jbeulich@novell.com> * ld-i386/abs.s, ld-i386/zero.s, ld-i386/abs.d, ld-x86-64/abs.d, ld-i386/pcrel16.s, ld-i386/pcrel16.d, ld-x86-64/pcrel16.d, ld-i386/pcrel8.s, ld-i386/pcrel8.d, ld-x86-64/pcrel8.d: New. * ld-i386/i386.exp, ld-x86-64/x86-64.exp: Run new tests.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
-rw-r--r--ld/testsuite/ld-x86-64/abs.d10
-rw-r--r--ld/testsuite/ld-x86-64/pcrel16.d4
-rw-r--r--ld/testsuite/ld-x86-64/pcrel8.d4
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp4
4 files changed, 22 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d
new file mode 100644
index 0000000..b24b018
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/abs.d
@@ -0,0 +1,10 @@
+#name: Absolute non-overflowing relocs
+#source: ../ld-i386/abs.s
+#source: ../ld-i386/zero.s
+#ld:
+#objdump: -rs
+
+.*: file format .*
+
+Contents of section \.text:
+[ ][0-9a-f]+ c800fff0 c8000110 c9c3.*
diff --git a/ld/testsuite/ld-x86-64/pcrel16.d b/ld/testsuite/ld-x86-64/pcrel16.d
new file mode 100644
index 0000000..41da975
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pcrel16.d
@@ -0,0 +1,4 @@
+#name: PCREL16 overflow
+#source: ../ld-i386/pcrel16.s
+#ld:
+#error: .*relocation truncated to fit: R_X86_64_PC16 .*
diff --git a/ld/testsuite/ld-x86-64/pcrel8.d b/ld/testsuite/ld-x86-64/pcrel8.d
new file mode 100644
index 0000000..17a3bba
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pcrel8.d
@@ -0,0 +1,4 @@
+#name: PCREL8 overflow
+#source: ../ld-i386/pcrel8.s
+#ld:
+#error: .*relocation truncated to fit: R_X86_64_PC8 .*
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 6cb309f..409a65d 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -52,3 +52,7 @@ set x86_64tests {
}
run_ld_link_tests $x86_64tests
+
+run_dump_test "abs"
+run_dump_test "pcrel8"
+run_dump_test "pcrel16"