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"});
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 <<EOF
+ link_info.emit_hash = FALSE;
+ link_info.emit_gnu_hash = TRUE;
+EOF
+ ;;
+esac
+fragment <<EOF
input_flags.dynamic = ${DYNAMIC_LINK-TRUE};
config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
global HOSTING_EMU
remote_file host delete $target
- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU -o $target -r $objects"]
+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -o $target -r $objects"]
}
# Check to see if ld is being invoked with a non-endian output format
remote_file host delete $target
- return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"]
+ return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv $flags -o $target $objs $libs"]
}
# Link a program using ld, without including any libraries.