diff -Naur gcc-4.3-20090205.orig/gcc/config/alpha/linux-elf.h gcc-4.3-20090205/gcc/config/alpha/linux-elf.h --- gcc-4.3-20090205.orig/gcc/config/alpha/linux-elf.h 2007-08-02 06:49:31.000000000 -0400 +++ gcc-4.3-20090205/gcc/config/alpha/linux-elf.h 2009-02-07 01:17:36.000000000 -0500 @@ -39,7 +39,7 @@ #define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER -#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ +#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \ %{O*:-O3} %{!O*:-O1} \ %{shared:-shared} \ %{!shared: \ diff -Naur gcc-4.3-20090205.orig/gcc/config/i386/linux.h gcc-4.3-20090205/gcc/config/i386/linux.h --- gcc-4.3-20090205.orig/gcc/config/i386/linux.h 2007-11-27 20:04:27.000000000 -0500 +++ gcc-4.3-20090205/gcc/config/i386/linux.h 2009-02-07 01:17:36.000000000 -0500 @@ -108,7 +108,7 @@ { "dynamic_linker", LINUX_DYNAMIC_LINKER } #undef LINK_SPEC -#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ +#define LINK_SPEC "-m %(link_emulation) --hash-style=gnu -O1 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ diff -Naur gcc-4.3-20090205.orig/gcc/config/i386/linux64.h gcc-4.3-20090205/gcc/config/i386/linux64.h --- gcc-4.3-20090205.orig/gcc/config/i386/linux64.h 2007-08-02 06:49:31.000000000 -0400 +++ gcc-4.3-20090205/gcc/config/i386/linux64.h 1969-12-31 19:00:00.000000000 -0500 @@ -1,110 +0,0 @@ -/* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format. - Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 - Free Software Foundation, Inc. - Contributed by Jan Hubicka , based on linux.h. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -#if TARGET_64BIT_DEFAULT -#define TARGET_VERSION fprintf (stderr, " (x86-64 Linux/ELF)"); -#else -#define TARGET_VERSION fprintf (stderr, " (i386 Linux/ELF)"); -#endif - -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - LINUX_TARGET_OS_CPP_BUILTINS(); \ - } \ - while (0) - -#undef CPP_SPEC -#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" - -/* The svr4 ABI for the i386 says that records and unions are returned - in memory. In the 64bit compilation we will turn this flag off in - override_options, as we never do pcc_struct_return scheme on this target. */ -#undef DEFAULT_PCC_STRUCT_RETURN -#define DEFAULT_PCC_STRUCT_RETURN 1 - -/* We arrange for the whole %fs segment to map the tls area. */ -#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT -#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS - -/* Provide a LINK_SPEC. Here we provide support for the special GCC - options -static and -shared, which allow us to link things in one - of these three modes by applying the appropriate combinations of - options at link-time. - - When the -shared link option is used a final link is not being - done. */ - -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - -#if TARGET_64BIT_DEFAULT -#define SPEC_32 "m32" -#define SPEC_64 "!m32" -#else -#define SPEC_32 "!m64" -#define SPEC_64 "m64" -#endif - -#undef LINK_SPEC -#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ - %{shared:-shared} \ - %{!shared: \ - %{!static: \ - %{rdynamic:-export-dynamic} \ - %{" SPEC_32 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ - %{" SPEC_64 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \ - %{static:-static}}" - -/* Similar to standard Linux, but adding -ffast-math support. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ - %{mpc32:crtprec32.o%s} \ - %{mpc64:crtprec64.o%s} \ - %{mpc80:crtprec80.o%s} \ - %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" - -#if TARGET_64BIT_DEFAULT -#define MULTILIB_DEFAULTS { "m64" } -#else -#define MULTILIB_DEFAULTS { "m32" } -#endif - -/* Put all *tf routines in libgcc. */ -#undef LIBGCC2_HAS_TF_MODE -#define LIBGCC2_HAS_TF_MODE TARGET_64BIT -#define LIBGCC2_TF_CEXT q -#define TF_SIZE 113 - -#undef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 1 - -#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" - -/* This macro may be overridden in i386/k*bsd-gnu.h. */ -#define REG_NAME(reg) reg - -#ifdef TARGET_LIBC_PROVIDES_SSP -/* i386 glibc provides __stack_chk_guard in %gs:0x14, - x86_64 glibc provides it in %fs:0x28. */ -#define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) -#endif diff -Naur gcc-4.3-20090205.orig/gcc/config/i386/linux64.h.rej gcc-4.3-20090205/gcc/config/i386/linux64.h.rej --- gcc-4.3-20090205.orig/gcc/config/i386/linux64.h.rej 1969-12-31 19:00:00.000000000 -0500 +++ gcc-4.3-20090205/gcc/config/i386/linux64.h.rej 2009-02-07 01:17:36.000000000 -0500 @@ -0,0 +1,17 @@ +*************** +*** 53,59 **** + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + + #undef LINK_SPEC +- #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- 53,59 ---- + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + + #undef LINK_SPEC ++ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ diff -Naur gcc-4.3-20090205.orig/gcc/config/ia64/linux.h gcc-4.3-20090205/gcc/config/ia64/linux.h --- gcc-4.3-20090205.orig/gcc/config/ia64/linux.h 2006-12-12 10:15:19.000000000 -0500 +++ gcc-4.3-20090205/gcc/config/ia64/linux.h 2009-02-07 01:17:36.000000000 -0500 @@ -40,7 +40,7 @@ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" #undef LINK_SPEC -#define LINK_SPEC "\ +#define LINK_SPEC "--hash-style=gnu \ %{shared:-shared} \ %{!shared: \ %{!static: \ diff -Naur gcc-4.3-20090205.orig/gcc/config/rs6000/linux64.h gcc-4.3-20090205/gcc/config/rs6000/linux64.h --- gcc-4.3-20090205.orig/gcc/config/rs6000/linux64.h 2007-08-02 06:49:31.000000000 -0400 +++ gcc-4.3-20090205/gcc/config/rs6000/linux64.h 2009-02-07 01:17:36.000000000 -0500 @@ -354,11 +354,11 @@ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ +#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}" -#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ +#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=gnu %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}" diff -Naur gcc-4.3-20090205.orig/gcc/config/rs6000/sysv4.h gcc-4.3-20090205/gcc/config/rs6000/sysv4.h --- gcc-4.3-20090205.orig/gcc/config/rs6000/sysv4.h 2007-08-08 15:33:24.000000000 -0400 +++ gcc-4.3-20090205/gcc/config/rs6000/sysv4.h 2009-02-07 01:17:36.000000000 -0500 @@ -901,7 +901,7 @@ #define LINUX_DYNAMIC_LINKER \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ +#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" diff -Naur gcc-4.3-20090205.orig/gcc/config/s390/linux.h gcc-4.3-20090205/gcc/config/s390/linux.h --- gcc-4.3-20090205.orig/gcc/config/s390/linux.h 2007-08-02 06:49:31.000000000 -0400 +++ gcc-4.3-20090205/gcc/config/s390/linux.h 2009-02-07 01:17:36.000000000 -0500 @@ -77,7 +77,7 @@ #undef LINK_SPEC #define LINK_SPEC \ - "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ + "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \ %{shared:-shared} \ %{!shared: \ %{static:-static} \ diff -Naur gcc-4.3-20090205.orig/gcc/config/sparc/linux.h gcc-4.3-20090205/gcc/config/sparc/linux.h --- gcc-4.3-20090205.orig/gcc/config/sparc/linux.h 2009-01-24 15:49:51.000000000 -0500 +++ gcc-4.3-20090205/gcc/config/sparc/linux.h 2009-02-07 01:17:36.000000000 -0500 @@ -132,7 +132,7 @@ #undef LINK_SPEC -#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ +#define LINK_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \ %{!mno-relax:%{!r:-relax}} \ %{!shared: \ %{!ibcs: \ diff -Naur gcc-4.3-20090205.orig/gcc/config/sparc/linux64.h gcc-4.3-20090205/gcc/config/sparc/linux64.h --- gcc-4.3-20090205.orig/gcc/config/sparc/linux64.h 2009-01-24 15:49:51.000000000 -0500 +++ gcc-4.3-20090205/gcc/config/sparc/linux64.h 2009-02-07 01:17:36.000000000 -0500 @@ -167,7 +167,7 @@ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, -#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ +#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style -Y P,/usr/lib %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ @@ -176,7 +176,7 @@ %{static:-static}}} \ " -#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \ +#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ @@ -257,7 +257,7 @@ #else /* !SPARC_BI_ARCH */ #undef LINK_SPEC -#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \ +#define LINK_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \