From: Mike Frysinger Date: Sat, 27 Jan 2007 20:01:08 +0000 (-0500) Subject: gold/ld: enable gnu hash by default X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6c35c40daf508b4f236b870c2b60bfa9b68de9e;p=thirdparty%2Fbinutils-gdb.git gold/ld: enable gnu hash by default Glibc first added .gnu.hash support to glibc-2.5 (released 29 Sep 2006), and gold was first released after that. Let's default the gnu hash style to the new "gnu" rather than the classic sysv. gold/: 2012-02-03 Mike Frysinger * options.h (General_options): Change default to gnu for hash_style. --- diff --git a/gold/options.h b/gold/options.h index b7c725a8253..ef175667124 100644 --- a/gold/options.h +++ b/gold/options.h @@ -921,7 +921,7 @@ class General_options N_("Min fraction of empty buckets in dynamic hash"), N_("FRACTION")); - DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "sysv", + DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "gnu", N_("Dynamic hash style"), N_("[sysv,gnu,both]"), {"sysv", "gnu", "both"}); diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 92b7e4aabd0..ac2090a54eb 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -100,6 +100,19 @@ static void gld${EMULATION_NAME}_before_parse (void) { ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`); +EOF +# Enable gnu hash by default for Linux (non-mips) targets. +# This has been supported since glibc-2.5. +case ${target} in + mips*) ;; + *-*-linux-* | *-*-gnu*) + fragment <