diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-i386/code16.d | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/code16.t | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/code16.d | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/code16.t | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 1 |
6 files changed, 54 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/code16.d b/ld/testsuite/ld-i386/code16.d new file mode 100644 index 0000000..8b67861 --- /dev/null +++ b/ld/testsuite/ld-i386/code16.d @@ -0,0 +1,19 @@ +#name: i386 R_386_PC16 reloc in 16-bit mode +#as: --32 -mx86-used-note=no --generate-missing-build-notes=no +#source: ${srcdir}/../../../gas/testsuite/gas/i386/code16-2.s +#ld: -T code16.t +#objdump: -dw -Mi8086 + +.*: +file format .* + + +Disassembly of section .text.default_process_op.isra.0: + +0+737c <default_process_op.isra.0>: + +[a-f0-9]+: 66 c3 retl + +Disassembly of section .text.mpt_scsi_process_op: + +0+f869 <mpt_scsi_process_op>: + +[a-f0-9]+: e9 10 7b jmp 737c <default_process_op.isra.0> +#pass diff --git a/ld/testsuite/ld-i386/code16.t b/ld/testsuite/ld-i386/code16.t new file mode 100644 index 0000000..0cf9904 --- /dev/null +++ b/ld/testsuite/ld-i386/code16.t @@ -0,0 +1,7 @@ +OUTPUT_FORMAT("elf32-i386") +OUTPUT_ARCH("i386") +SECTIONS +{ +.text.default_process_op.isra.0 0x737c : { *(.text.default_process_op.isra.0) } +.text.mpt_scsi_process_op 0xf869 : { *(.text.mpt_scsi_process_op) } +} diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index d0b3f69..3d6047b 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -492,6 +492,7 @@ run_dump_test "property-x86-isa2" run_dump_test "property-x86-isa3" run_dump_test "property-x86-isa4" run_dump_test "pr26869" +run_dump_test "code16" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-x86-64/code16.d b/ld/testsuite/ld-x86-64/code16.d new file mode 100644 index 0000000..20096ab --- /dev/null +++ b/ld/testsuite/ld-x86-64/code16.d @@ -0,0 +1,19 @@ +#name: x86-64 R_X86_64_PC16 reloc in 16-bit mode +#as: --64 -mx86-used-note=no --generate-missing-build-notes=no +#source: ${srcdir}/../../../gas/testsuite/gas/i386/code16-2.s +#ld: -T code16.t +#objdump: -dw -Mi8086 + +.*: +file format .* + + +Disassembly of section .text.default_process_op.isra.0: + +0+737c <default_process_op.isra.0>: + +[a-f0-9]+: 66 c3 retl + +Disassembly of section .text.mpt_scsi_process_op: + +0+f869 <mpt_scsi_process_op>: + +[a-f0-9]+: e9 10 7b jmp 737c <default_process_op.isra.0> +#pass diff --git a/ld/testsuite/ld-x86-64/code16.t b/ld/testsuite/ld-x86-64/code16.t new file mode 100644 index 0000000..9ef00a3 --- /dev/null +++ b/ld/testsuite/ld-x86-64/code16.t @@ -0,0 +1,7 @@ +OUTPUT_FORMAT("elf64-x86-64") +OUTPUT_ARCH("i386:x86-64") +SECTIONS +{ +.text.default_process_op.isra.0 0x737c : { *(.text.default_process_op.isra.0) } +.text.mpt_scsi_process_op 0xf869 : { *(.text.mpt_scsi_process_op) } +} diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index 37cf998..8071666 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -474,6 +474,7 @@ run_dump_test "property-x86-isa3" run_dump_test "property-x86-isa3-x32" run_dump_test "property-x86-isa4" run_dump_test "property-x86-isa4-x32" +run_dump_test "code16" if ![istarget "x86_64-*-linux*"] { return |