From 05567e3d0b0f3d8811997497aca9cde51100c9ec Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 24 Apr 2013 18:58:14 +0000 Subject: [PATCH] Enable x32 for x86_64-*-elf* This patch enables x32 for x86_64-*-elf* for embedded target and disables rex tests since it uses '/' as prefix separator which is `\' for x86_64-*-elf*. bfd/ * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for x86_64-*-elf*. gas/testsuite/ * gas/i386/rex.d: Skip x86_64-*-elf*. * gas/i386/ilp32/rex.d: Likewise. ld/ * configure.tgt (targ_extra_emuls): Adds elf32_x86_64 for x86_64-*-elf*. (targ_extra_libpath): Likewise. (tdir_elf_i386): Replace x86_64 with i386 for x86_64-*-elf*. --- bfd/ChangeLog | 5 +++++ bfd/config.bfd | 2 +- gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/i386/ilp32/rex.d | 1 + gas/testsuite/gas/i386/rex.d | 1 + ld/ChangeLog | 7 +++++++ ld/configure.tgt | 4 +++- 7 files changed, 23 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fd960e24fc7..103c57c93da 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2013-04-24 H.J. Lu + + * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for + x86_64-*-elf*. + 2013-04-24 Roland McGrath * elf32-arm.c (elf32_arm_allocate_plt_entry): If HTAB->nacl_p, diff --git a/bfd/config.bfd b/bfd/config.bfd index 10820e2cba9..aef60c792b7 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -644,7 +644,7 @@ case "${targ}" in ;; x86_64-*-elf*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec i386coff_vec" + targ_selvecs="bfd_elf32_i386_vec bfd_elf32_x86_64_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" want64=true ;; x86_64-*-dragonfly*) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 546c2ab14ae..48ef178a59b 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-04-24 H.J. Lu + + * gas/i386/rex.d: Skip x86_64-*-elf*. + * gas/i386/ilp32/rex.d: Likewise. + 2013-04-15 Julian Brown * gas/all/gas.exp (sleb128-7): Don't run for tic4x, tic54x. diff --git a/gas/testsuite/gas/i386/ilp32/rex.d b/gas/testsuite/gas/i386/ilp32/rex.d index 7c704c99176..36241c1d067 100644 --- a/gas/testsuite/gas/i386/ilp32/rex.d +++ b/gas/testsuite/gas/i386/ilp32/rex.d @@ -1,6 +1,7 @@ #source: ../rex.s #objdump: -dw #name: x86-64 (ILP32) manual rex prefix use +#not-target: x86_64-*-elf* .*: +file format .* diff --git a/gas/testsuite/gas/i386/rex.d b/gas/testsuite/gas/i386/rex.d index bf783c684f2..3c52e169da7 100644 --- a/gas/testsuite/gas/i386/rex.d +++ b/gas/testsuite/gas/i386/rex.d @@ -1,5 +1,6 @@ #objdump: -dw #name: x86-64 manual rex prefix use +#not-target: x86_64-*-elf* .*: +file format .* diff --git a/ld/ChangeLog b/ld/ChangeLog index 50324372345..5014b5f91ca 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,10 @@ +2013-04-24 H.J. Lu + + * configure.tgt (targ_extra_emuls): Adds elf32_x86_64 for + x86_64-*-elf*. + (targ_extra_libpath): Likewise. + (tdir_elf_i386): Replace x86_64 with i386 for x86_64-*-elf*. + 2013-04-24 Yufeng Zhang * emulparams/aarch64elf.sh: Define ELFSIZE=64. diff --git a/ld/configure.tgt b/ld/configure.tgt index 3b06dd39d3b..cd840e94df4 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -278,7 +278,9 @@ x86_64-*-netbsd*) targ_emul=elf_x86_64 i[3-7]86-*-netware) targ_emul=i386nw ;; i[3-7]86-*-elf*) targ_emul=elf_i386 ;; x86_64-*-elf*) targ_emul=elf_x86_64 - targ_extra_emuls="elf_i386 elf_l1om elf_k1om" + targ_extra_emuls="elf_i386 elf32_x86_64 elf_l1om elf_k1om" + targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om" + tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;; i[3-7]86-*-kaos*) targ_emul=elf_i386 ;; i[3-7]86-*-freebsdaout* | i[3-7]86-*-freebsd[12].* | i[3-7]86-*-freebsd[12]) -- 2.30.2