aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-15 03:35:53 +0000
committerAlan Modra <amodra@gmail.com>2008-02-15 03:35:53 +0000
commitf13a99db51c0ca487f4a0a41b14dc255d386c4ff (patch)
treec5941da40d8747eeb0ded9455c971313d8d2db5f /ld/emultempl/elf32.em
parent54aff08f3b1f29d1a6b262b3143475409909d7b9 (diff)
downloadgdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.zip
gdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.tar.gz
gdb-f13a99db51c0ca487f4a0a41b14dc255d386c4ff.tar.bz2
include/
* bfdlink.h (struct bfd_link_hash_table): Delete creator field. (struct bfd_link_info): Add output_bfd. bfd/ * elflink.c: Replace all accesses to hash->creator field with output_bfd->xvec. * cofflink.c: Likewise. * coff-h8300.c: Likewise. * ecoff.c: Likewise. * elf32-m68hc1x.c: Likewise. * elf32-ppc.c: Likewise. * elf64-alpha.c: Likewise. * elf64-ppc.c: Likewise. * elf64-sparc.c: Likewise. * elfxx-mips.c: Likewise. * i386linux.c: Likewise. * m68klinux.c: Likewise. * sparclinux.c: Likewise. * sunos.c: Likewise. * xcofflink.c: Likewise. * linker.c: Likewise. (_bfd_link_hash_table_init): Don't store creator. ld/ * ldmain.h (output_bfd): Delete. * ldmain.c (output_bfd): Delete. Replace all occurrences of output_bfd with link_info.output_bfd. * ldcref.c: Likewise. * ldctor.c: Likewise. * ldemul.c: Likewise. * ldexp.c: Likewise. * ldfile.c: Likewise. * ldlang.c: Likewise. * ldmisc.c: Likewise. * ldwrite.c: Likewise. * pe-dll.c: Likewise. * emultempl/aix.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/armcoff.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf32.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/irix.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emultempl/z80.em: Likewise. * ldlang.c (open_output): Don't return output, instead write link_info_output_bfd directly. * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator with link_info.output_bfd->xvec. * emultempl/hppaelf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em29
1 files changed, 16 insertions, 13 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 547bc2a..da1bf49 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -307,7 +307,7 @@ gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
const char *soname;
int class;
- abfd = bfd_openr (name, bfd_get_target (output_bfd));
+ abfd = bfd_openr (name, bfd_get_target (link_info.output_bfd));
if (abfd == NULL)
return FALSE;
if (! bfd_check_format (abfd, bfd_object))
@@ -322,7 +322,7 @@ gld${EMULATION_NAME}_try_needed (struct dt_needed *needed,
}
/* For DT_NEEDED, they have to match. */
- if (abfd->xvec != output_bfd->xvec)
+ if (abfd->xvec != link_info.output_bfd->xvec)
{
bfd_close (abfd);
return FALSE;
@@ -1064,7 +1064,7 @@ gld${EMULATION_NAME}_after_open (void)
| SEC_READONLY | SEC_DATA);
if (s != NULL && bfd_set_section_alignment (abfd, s, 2))
{
- struct elf_obj_tdata *t = elf_tdata (output_bfd);
+ struct elf_obj_tdata *t = elf_tdata (link_info.output_bfd);
struct build_id_info *b = xmalloc (sizeof *b);
b->style = link_info.emit_note_gnu_build_id;
b->sec = s;
@@ -1127,7 +1127,7 @@ gld${EMULATION_NAME}_after_open (void)
loop. */
if (!link_info.executable)
return;
- needed = bfd_elf_get_needed_list (output_bfd, &link_info);
+ needed = bfd_elf_get_needed_list (link_info.output_bfd, &link_info);
for (l = needed; l != NULL; l = l->next)
{
struct bfd_link_needed_list *ll;
@@ -1231,7 +1231,7 @@ fi
if [ "x${USE_LIBPATH}" = xyes ] ; then
fragment <<EOF
found = 0;
- rp = bfd_elf_get_runpath_list (output_bfd, &link_info);
+ rp = bfd_elf_get_runpath_list (link_info.output_bfd, &link_info);
for (; !found && rp != NULL; rp = rp->next)
{
char *tmpname = gld${EMULATION_NAME}_add_sysroot (rp->name);
@@ -1322,7 +1322,8 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
will do no harm. */
if (strcmp (exp->assign.dst, ".") != 0)
{
- if (!bfd_elf_record_link_assignment (output_bfd, &link_info,
+ if (!bfd_elf_record_link_assignment (link_info.output_bfd,
+ &link_info,
exp->assign.dst, provide,
exp->assign.hidden))
einfo ("%P%F: failed to record assignment to %s: %E\n",
@@ -1391,7 +1392,7 @@ gld${EMULATION_NAME}_before_allocation (void)
asection *sinterp;
if (link_info.hash->type == bfd_link_elf_hash_table)
- _bfd_elf_tls_setup (output_bfd, &link_info);
+ _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
/* If we are going to make any variable assignments, we need to let
the ELF backend know about them in case the variables are
@@ -1404,7 +1405,7 @@ gld${EMULATION_NAME}_before_allocation (void)
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
if (! (bfd_elf_size_dynamic_sections
- (output_bfd, command_line.soname, rpath,
+ (link_info.output_bfd, command_line.soname, rpath,
command_line.filter_shlib,
(const char * const *) command_line.auxiliary_filters,
&link_info, &sinterp, lang_elf_version_info)))
@@ -1472,7 +1473,7 @@ ${ELF_INTERPRETER_SET_DEFAULT}
before_allocation_default ();
- if (!bfd_elf_size_dynsym_hash_dynstr (output_bfd, &link_info))
+ if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
}
@@ -1710,7 +1711,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
if (os != NULL
&& (os->bfd_section == NULL
|| os->bfd_section->flags == 0
- || (_bfd_elf_match_sections_by_type (output_bfd,
+ || (_bfd_elf_match_sections_by_type (link_info.output_bfd,
os->bfd_section,
s->owner, s)
&& ((s->flags ^ os->bfd_section->flags)
@@ -1801,10 +1802,11 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
/* Choose a unique name for the section. This will be needed if the
same section name appears in the input file with different
loadable or allocatable characteristics. */
- if (bfd_get_section_by_name (output_bfd, secname) != NULL)
+ if (bfd_get_section_by_name (link_info.output_bfd, secname) != NULL)
{
static int count = 1;
- secname = bfd_get_unique_section_name (output_bfd, secname, &count);
+ secname = bfd_get_unique_section_name (link_info.output_bfd,
+ secname, &count);
if (secname == NULL)
einfo ("%F%P: place_orphan failed: %E\n");
}
@@ -1822,7 +1824,8 @@ fragment <<EOF
static void
gld${EMULATION_NAME}_finish (void)
{
- bfd_boolean need_layout = bfd_elf_discard_info (output_bfd, &link_info);
+ bfd_boolean need_layout = bfd_elf_discard_info (link_info.output_bfd,
+ &link_info);
gld${EMULATION_NAME}_map_segments (need_layout);
finish_default ();