diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/abs.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/abs.s | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pcrel16.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pcrel16.s | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pcrel8.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pcrel8.s | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/zero.s | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/abs.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pcrel16.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/pcrel8.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 4 |
13 files changed, 81 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index bc42d5a..23659ab 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +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. + 2005-07-14 H.J. Lu <hongjiu.lu@intel.com> * lib/ld-lib.exp (run_ld_link_exec_tests): Ignore assembler diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d new file mode 100644 index 0000000..6293515 --- /dev/null +++ b/ld/testsuite/ld-i386/abs.d @@ -0,0 +1,10 @@ +#name: Absolute non-overflowing relocs +#source: abs.s +#source: zero.s +#ld: +#objdump: -rs + +.*: file format .* + +Contents of section \.text: +[ ][0-9a-f]+ c800fff0 c8000110 c9c3.* diff --git a/ld/testsuite/ld-i386/abs.s b/ld/testsuite/ld-i386/abs.s new file mode 100644 index 0000000..2705950 --- /dev/null +++ b/ld/testsuite/ld-i386/abs.s @@ -0,0 +1,8 @@ + .text + .global _start +_start: + enter $zero + 0xff00, $zero + 0xf0 + enter $zero - 0xff00, $zero - 0xf0 + leave + ret + .p2align 4,0x90 diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 13d8e77..05343f0 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -64,3 +64,7 @@ set i386tests { } run_ld_link_tests $i386tests + +run_dump_test "abs" +run_dump_test "pcrel8" +run_dump_test "pcrel16" diff --git a/ld/testsuite/ld-i386/pcrel16.d b/ld/testsuite/ld-i386/pcrel16.d new file mode 100644 index 0000000..1e8f182 --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel16.d @@ -0,0 +1,3 @@ +#name: PCREL16 overflow +#ld: +#error: .*relocation truncated to fit: R_386_PC16 .* diff --git a/ld/testsuite/ld-i386/pcrel16.s b/ld/testsuite/ld-i386/pcrel16.s new file mode 100644 index 0000000..269d9ca --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel16.s @@ -0,0 +1,11 @@ + .text + .code16 + .global _start, fwd +_start: + jpo fwd + .rept 2500 + testl $0x12345678, %ss:0x76543210(,%eax,4) + .endr +fwd: + leave + ret diff --git a/ld/testsuite/ld-i386/pcrel8.d b/ld/testsuite/ld-i386/pcrel8.d new file mode 100644 index 0000000..ed939a3 --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel8.d @@ -0,0 +1,3 @@ +#name: PCREL8 overflow +#ld: +#error: .*relocation truncated to fit: R_386_PC8 .* diff --git a/ld/testsuite/ld-i386/pcrel8.s b/ld/testsuite/ld-i386/pcrel8.s new file mode 100644 index 0000000..e624aaf --- /dev/null +++ b/ld/testsuite/ld-i386/pcrel8.s @@ -0,0 +1,11 @@ + .text + .code16 + .global _start, fwd +_start: + jcxz fwd + .rept 10 + testl $0x12345678, %ss:0x76543210(,%eax,4) + .endr +fwd: + leave + ret diff --git a/ld/testsuite/ld-i386/zero.s b/ld/testsuite/ld-i386/zero.s new file mode 100644 index 0000000..f716bba --- /dev/null +++ b/ld/testsuite/ld-i386/zero.s @@ -0,0 +1,2 @@ + .global zero + .equiv zero, 0 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" |