/* This file is is generated by a shell script. DO NOT EDIT! */
/* Linux a.out emulation code for ${EMULATION_NAME}
- Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1991-2019 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
input_flags.dynamic = TRUE;
config.has_shared = TRUE;
+ link_info.check_relocs_after_open_input = TRUE;
+ link_info.relro = DEFAULT_LD_Z_RELRO;
}
/* Try to open a dynamic archive. This is where we know that Linux
{
char *string;
- if (! entry->flags.maybe_archive)
+ if (! entry->flags.maybe_archive || entry->flags.full_name_provided)
return FALSE;
string = (char *) xmalloc (strlen (search->name)
static void
gld${EMULATION_NAME}_before_allocation (void)
{
- if (link_info.relocatable)
+ if (bfd_link_relocatable (&link_info))
return;
/* Let the backend work out the sizes of any sections required by
dynamic linking. */
if (! bfd_${EMULATION_NAME}_size_dynamic_sections (link_info.output_bfd,
&link_info))
- einfo ("%P%F: failed to set dynamic section sizes: %E\n");
+ einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
before_allocation_default ();
}
gld${EMULATION_NAME}_get_script (int *isfile)
EOF
-if test -n "$COMPILE_IN"
+if test x"$COMPILE_IN" = xyes
then
# Scripts compiled in.
{
*isfile = 0;
- if (link_info.relocatable && config.build_constructors)
+ if (bfd_link_relocatable (&link_info) && config.build_constructors)
return
EOF
sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
-echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
+echo ' ; else if (bfd_link_relocatable (&link_info)) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
{
*isfile = 1;
- if (link_info.relocatable && config.build_constructors)
+ if (bfd_link_relocatable (&link_info) && config.build_constructors)
return "ldscripts/${EMULATION_NAME}.xu";
- else if (link_info.relocatable)
+ else if (bfd_link_relocatable (&link_info))
return "ldscripts/${EMULATION_NAME}.xr";
else if (!config.text_read_only)
return "ldscripts/${EMULATION_NAME}.xbn";
hll_default,
after_parse_default,
after_open_default,
+ after_check_relocs_default,
after_allocation_default,
set_output_arch_default,
ldemul_default_target,
NULL, /* list options */
NULL, /* recognized file */
NULL, /* find_potential_libraries */
- NULL /* new_vers_pattern */
+ NULL, /* new_vers_pattern */
+ NULL /* extra_map_file_text */
};
EOF