aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/cpu-i386.c8
-rw-r--r--ld/ChangeLog8
-rw-r--r--ld/configure.tgt4
-rw-r--r--ld/emulparams/elf_x86_64.sh33
5 files changed, 51 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ab7b7d0..01a13ff 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+Mon Mar 18 17:38:03 CET 2002 Jan Hubicka <jh@suse.cz>
+
+ * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
+
2002-03-18 Tom Rix <trix@redhat.com>
* aix5ppc.core.c : New file for AIX 5 64 bit core support.
diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c
index 5110e95..f492827 100644
--- a/bfd/cpu-i386.c
+++ b/bfd/cpu-i386.c
@@ -44,8 +44,8 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
8, /* 8 bits in a byte */
bfd_arch_i386,
bfd_mach_x86_64_intel_syntax,
- "x86-64:intel",
- "x86-64:intel",
+ "i386:intel",
+ "i386:x86-64:intel",
3,
true,
bfd_default_compatible,
@@ -75,8 +75,8 @@ const bfd_arch_info_type bfd_x86_64_arch =
8, /* 8 bits in a byte */
bfd_arch_i386,
bfd_mach_x86_64,
- "x86-64",
- "x86-64",
+ "i386",
+ "i386:x86-64",
3,
true,
bfd_default_compatible,
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b68b47e..378c00d 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,11 @@
+Mon Mar 18 17:38:39 CET 2002 Jan Hubicka <jh@suse.cz>
+ Andreas Jaeger <aj@suse.de>
+ Andreas Schwab <schwab@suse.de>
+
+ * configure.tgt (x86_64-*-linux-gnu*): Configure i386 as native.
+ * elf_x86_64.sh (ARCH): Set to i386:x86-64
+ set libraries to default to lib64 paths.
+
2002-03-18 Tom Rix <trix@redhat.com>
* Makefile.am : Add eaix5ppc and eaix5rs6, AIX 5 support.
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 504c26f..4f75a12 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -145,7 +145,9 @@ i[3456]86-*-linux-gnu*) targ_emul=elf_i386
;;
x86_64-*-linux-gnu*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
- tdir_i386linux=${targ_alias}aout
+ targ_extra_libpath=elf_i386
+ tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
+ tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
;;
i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;;
i[3456]86-*-solaris2*) targ_emul=elf_i386_ldso
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
index 27931c7..4f7433e 100644
--- a/ld/emulparams/elf_x86_64.sh
+++ b/ld/emulparams/elf_x86_64.sh
@@ -4,9 +4,40 @@ OUTPUT_FORMAT="elf64-x86-64"
TEXT_START_ADDR=0x400000
MAXPAGESIZE=0x100000
NONPAGED_TEXT_START_ADDR=0x400000
-ARCH=i386
+ARCH="i386:x86-64"
MACHINE=
NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
NO_SMALL_DATA=yes
+
+if [ "x${host}" = "x${target}" ]; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ # Native, and default or emulation requesting LIB_PATH.
+
+ # Linux modify the default library search path to first include
+ # a 64-bit specific directory.
+ case "$target" in
+ x86_64*-linux*)
+ suffix=64 ;;
+ esac
+
+ if [ -n "${suffix}" ]; then
+
+ LIB_PATH=/lib${suffix}:/lib
+ LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
+ if [ -n "${NATIVE_LIB_DIRS}" ]; then
+ LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s_:_${suffix}:_g`${suffix}:${NATIVE_LIB_DIRS}
+ fi
+ if [ "${libdir}" != /usr/lib ]; then
+ LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
+ fi
+ if [ "${libdir}" != /usr/local/lib ]; then
+ LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
+ fi
+
+ fi
+ ;;
+ esac
+fi