This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Support x86_64-*-linux-gnux32
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Fri, 4 May 2012 13:03:06 -0700
- Subject: PATCH: Support x86_64-*-linux-gnux32
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
x86_64-*-linux-gnux32 has been used to specify Linux/x32 target.
I checked in this patch to add x86_64-*-linux-gnux32 to binutils
configure target. Tested on Linux/x32.
Thanks.
H.J.
---
gas/
2012-05-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt: Support x86_64-*-linux-gnux32.
ld/
2012-05-04 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt: Support x86_64-*-linux-gnux32.
ld/testsuite/
2012-05-04 H.J. Lu <hongjiu.lu@intel.com>
* ld-elf/eh1.d: Skip x86_64-*-linux-gnux32.
* ld-elf/eh2.d: Likewise.
* ld-elf/eh3.d: Likewise.
* ld-elf/eh4.d: Likewise.
* ld-elfvsb/elfvsb.exp: Xfail x86_64-*-linux-gnux32.
* ld-shared/shared.exp: Likewise.
* ld-ifunc/ifunc-3a-x86.d: Support x86_64-*-linux-gnux32.
diff --git a/gas/configure.tgt b/gas/configure.tgt
index 99de3d7..e07bc55 100644
--- a/gas/configure.tgt
+++ b/gas/configure.tgt
@@ -205,7 +205,10 @@ case ${generic_target} in
i386-*-linux*aout*) fmt=aout em=linux ;;
i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
- i386-*-linux-*) fmt=elf em=linux ;;
+ i386-*-linux-*) fmt=elf em=linux
+ case ${cpu}-${os} in
+ x86_64*-linux-gnux32) arch=x86_64:32 ;;
+ esac ;;
i386-*-lynxos*) fmt=elf em=lynx ;;
i386-*-sysv[45]*) fmt=elf ;;
i386-*-solaris*) fmt=elf em=solaris ;;
diff --git a/ld/configure.tgt b/ld/configure.tgt
index d7ad3ba..4171d8c 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -204,6 +204,11 @@ i[3-7]86-*-linux-*) targ_emul=elf_i386
targ64_extra_libpath=elf_x86_64
targ_extra_libpath=elf32_x86_64
tdir_i386linux=${targ_alias}aout ;;
+x86_64-*-linux-gnux32) targ_emul=elf32_x86_64
+ targ_extra_emuls="elf_x86_64 elf_i386 i386linux elf_l1om"
+ targ_extra_libpath="elf_i386 elf_x86_64 elf_l1om"
+ tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'` ;;
x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_emuls="elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om"
targ_extra_libpath="elf_i386 elf32_x86_64 elf_l1om elf_k1om"
diff --git a/ld/testsuite/ld-elf/eh1.d b/ld/testsuite/ld-elf/eh1.d
index 4455b0d..0fa4146 100644
--- a/ld/testsuite/ld-elf/eh1.d
+++ b/ld/testsuite/ld-elf/eh1.d
@@ -3,6 +3,7 @@
#as: --64
#ld: -melf_x86_64 -Ttext 0x400078
#readelf: -wf
+#notarget: x86_64-*-linux-gnux32
#target: x86_64-*-*
Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-elf/eh2.d b/ld/testsuite/ld-elf/eh2.d
index c5b5a73..c63abb5 100644
--- a/ld/testsuite/ld-elf/eh2.d
+++ b/ld/testsuite/ld-elf/eh2.d
@@ -3,6 +3,7 @@
#as: --64
#ld: -melf_x86_64 -Ttext 0x400078
#readelf: -wf
+#notarget: x86_64-*-linux-gnux32
#target: x86_64-*-*
Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-elf/eh3.d b/ld/testsuite/ld-elf/eh3.d
index b3bd756..3b9ad64 100644
--- a/ld/testsuite/ld-elf/eh3.d
+++ b/ld/testsuite/ld-elf/eh3.d
@@ -3,6 +3,7 @@
#as: --64
#ld: -melf_x86_64 -Ttext 0x400078
#readelf: -wf
+#notarget: x86_64-*-linux-gnux32
#target: x86_64-*-*
Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-elf/eh4.d b/ld/testsuite/ld-elf/eh4.d
index ad4b008..b482d03 100644
--- a/ld/testsuite/ld-elf/eh4.d
+++ b/ld/testsuite/ld-elf/eh4.d
@@ -3,6 +3,7 @@
#as: --64
#ld: -melf_x86_64 -shared -Ttext 0x400
#readelf: -wf
+#notarget: x86_64-*-linux-gnux32
#target: x86_64-*-*
Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-elfvsb/elfvsb.exp b/ld/testsuite/ld-elfvsb/elfvsb.exp
index e2c1b4c..5d97cc8 100644
--- a/ld/testsuite/ld-elfvsb/elfvsb.exp
+++ b/ld/testsuite/ld-elfvsb/elfvsb.exp
@@ -308,6 +308,7 @@ proc visibility_run {visibility} {
if { [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
@@ -351,6 +352,7 @@ proc visibility_run {visibility} {
if { [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
@@ -425,6 +427,7 @@ proc visibility_run {visibility} {
if { [is_elf64 $tmpdir/mainp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
if { ![istarget hppa*64*-*-linux*] } {
setup_xfail "hppa*-*-linux*"
}
diff --git a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
index 24be639..3ff8024 100644
--- a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
@@ -4,5 +4,5 @@
#target: x86_64-*-* i?86-*-*
#...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x240|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x1b0|\+0x240|\+0x1a0|)@plt>
#pass
diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp
index b5ada60..7ec304b 100644
--- a/ld/testsuite/ld-shared/shared.exp
+++ b/ld/testsuite/ld-shared/shared.exp
@@ -240,6 +240,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
if { [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
@@ -265,6 +266,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o]
if { [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"
@@ -320,6 +322,7 @@ if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/m
if { [is_elf64 $tmpdir/mainp.o] } {
setup_xfail "x86_64-*-linux*"
}
+ setup_xfail "x86_64-*-linux-gnux32"
setup_xfail "s390x-*-linux*"
if [ string match $shared_needs_pic "yes" ] {
setup_xfail "arm*-*-linux*"