From 4fa24527c95f3582ec61330240bb2790b588b8d1 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 22 Aug 2005 12:37:37 +0000 Subject: gas/ 2005-08-22 Jan Beulich * config/tc-i386.c (object_64bit): New. (i386_target_format): Initialize it. (output_disp): Use object_64bit for relocation type determination. (output_imm): Likewise. (i386_validate_fix): Likewise. (tc_gen_reloc): Likewise. (lex_got): Likewise. Remove static mode_name. Change array size of gotrel's rel field, and adjust its initializer. Adjust diagnostic. (x86_cons): Use object_64bit for deciding whether quad fields can have relocations. gas/testsuite/ 2005-08-22 Jan Beulich * gas/i386/mixed-mode-reloc.s, gas/i386/mixed-mode-reloc32.d, gas/i386/mixed-mode-reloc64.d: New. * gas/i386/i386.exp: Run new tests. --- gas/testsuite/ChangeLog | 6 ++++++ gas/testsuite/gas/i386/i386.exp | 2 ++ gas/testsuite/gas/i386/mixed-mode-reloc.s | 16 ++++++++++++++++ gas/testsuite/gas/i386/mixed-mode-reloc32.d | 14 ++++++++++++++ gas/testsuite/gas/i386/mixed-mode-reloc64.d | 14 ++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 gas/testsuite/gas/i386/mixed-mode-reloc.s create mode 100644 gas/testsuite/gas/i386/mixed-mode-reloc32.d create mode 100644 gas/testsuite/gas/i386/mixed-mode-reloc64.d (limited to 'gas/testsuite') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index d5860c9..23d5afd 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-08-22 Jan Beulich + + * gas/i386/mixed-mode-reloc.s, gas/i386/mixed-mode-reloc32.d, + gas/i386/mixed-mode-reloc64.d: New. + * gas/i386/i386.exp: Run new tests. + 2005-08-15 Paul Brook * gas/arm/thumb2_it.s: Add more instruction variants. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 8981092..0e3f696 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -107,6 +107,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "bss" run_dump_test "reloc32" run_list_test "reloc32" "--defsym _bad_=1" + run_dump_test "mixed-mode-reloc32" } # This is a PE specific test. @@ -150,6 +151,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t if [is_elf_format] then { run_dump_test "reloc64" run_list_test "reloc64" "--defsym _bad_=1" + run_dump_test "mixed-mode-reloc64" } set ASFLAGS "$old_ASFLAGS" diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc.s b/gas/testsuite/gas/i386/mixed-mode-reloc.s new file mode 100644 index 0000000..1b1a7fe --- /dev/null +++ b/gas/testsuite/gas/i386/mixed-mode-reloc.s @@ -0,0 +1,16 @@ + .text + + .code16 +_start16: +#FIXME movl xtrn@got(%ebx), %eax +#FIXME calll xtrn@plt + + .code32 +_start32: +#FIXME movl xtrn@got(%ebx), %eax + calll xtrn@plt + + .code64 +_start64: + movq xtrn@got(%rbx), %rax + callq xtrn@plt diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc32.d b/gas/testsuite/gas/i386/mixed-mode-reloc32.d new file mode 100644 index 0000000..2dba860 --- /dev/null +++ b/gas/testsuite/gas/i386/mixed-mode-reloc32.d @@ -0,0 +1,14 @@ +#objdump: -r +#source: mixed-mode-reloc.s +#name: x86 mixed mode relocs (32-bit object) + +.*: +file format .*i386.* + +RELOCATION RECORDS FOR \[.text\]: +OFFSET[ ]+TYPE[ ]+VALUE[ ]* +#[0-9a-f]+[ ]+R_386_GOT32[ ]+xtrn[ ]* +#[0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]* +#[0-9a-f]+[ ]+R_386_GOT32[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_386_GOT32[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_386_PLT32[ ]+xtrn[ ]* diff --git a/gas/testsuite/gas/i386/mixed-mode-reloc64.d b/gas/testsuite/gas/i386/mixed-mode-reloc64.d new file mode 100644 index 0000000..9c99eef --- /dev/null +++ b/gas/testsuite/gas/i386/mixed-mode-reloc64.d @@ -0,0 +1,14 @@ +#objdump: -r +#source: mixed-mode-reloc.s +#name: x86 mixed mode relocs (64-bit object) + +.*: +file format .*x86-64.* + +RELOCATION RECORDS FOR \[.text\]: +OFFSET[ ]+TYPE[ ]+VALUE[ ]* +#[0-9a-f]+[ ]+R_X86_64_GOT32[ ]+xtrn[ ]* +#[0-9a-f]+[ ]+R_X86_64_PLT32[ ]+xtrn\+0xf+c[ ]* +#[0-9a-f]+[ ]+R_X86_64_GOT32[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_X86_64_PLT32[ ]+xtrn\+0xf+c[ ]* +[0-9a-f]+[ ]+R_X86_64_GOT32[ ]+xtrn[ ]* +[0-9a-f]+[ ]+R_X86_64_PLT32[ ]+xtrn\+0xf+c[ ]* -- cgit v1.1