aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/sunos.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/sunos.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/sunos.em')
-rw-r--r--ld/emultempl/sunos.em37
1 files changed, 20 insertions, 17 deletions
diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em
index 00d949f..6367c3c 100644
--- a/ld/emultempl/sunos.em
+++ b/ld/emultempl/sunos.em
@@ -10,7 +10,7 @@ fragment <<EOF
/* SunOS emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -378,7 +378,7 @@ gld${EMULATION_NAME}_after_open (void)
include another without requiring special action by the person
doing the link. Note that the needed list can actually grow
while we are stepping through this loop. */
- needed = bfd_sunos_get_needed_list (output_bfd, &link_info);
+ needed = bfd_sunos_get_needed_list (link_info.output_bfd, &link_info);
for (l = needed; l != NULL; l = l->next)
{
struct bfd_link_needed_list *ll;
@@ -405,7 +405,7 @@ gld${EMULATION_NAME}_after_open (void)
{
bfd *abfd;
- abfd = bfd_openr (lname, bfd_get_target (output_bfd));
+ abfd = bfd_openr (lname, bfd_get_target (link_info.output_bfd));
if (abfd != NULL)
{
if (! bfd_check_format (abfd, bfd_object))
@@ -555,7 +555,7 @@ gld${EMULATION_NAME}_try_needed (const char *dir, const char *name)
alc = (char *) xmalloc (strlen (dir) + strlen (file) + 2);
sprintf (alc, "%s/%s", dir, file);
free (file);
- abfd = bfd_openr (alc, bfd_get_target (output_bfd));
+ abfd = bfd_openr (alc, bfd_get_target (link_info.output_bfd));
if (abfd == NULL)
return FALSE;
if (! bfd_check_format (abfd, bfd_object))
@@ -715,7 +715,7 @@ gld${EMULATION_NAME}_before_allocation (void)
FALSE);
if (hdyn == NULL)
einfo ("%P%F: bfd_link_hash_lookup: %E\n");
- if (! bfd_sunos_record_link_assignment (output_bfd, &link_info,
+ if (! bfd_sunos_record_link_assignment (link_info.output_bfd, &link_info,
"__DYNAMIC"))
einfo ("%P%F: failed to record assignment to __DYNAMIC: %E\n");
}
@@ -727,8 +727,8 @@ gld${EMULATION_NAME}_before_allocation (void)
/* Let the backend linker work out the sizes of any sections
required by dynamic linking. */
- if (! bfd_sunos_size_dynamic_sections (output_bfd, &link_info, &sdyn,
- &sneed, &srules))
+ if (! bfd_sunos_size_dynamic_sections (link_info.output_bfd, &link_info,
+ &sdyn, &sneed, &srules))
einfo ("%P%F: failed to set dynamic section sizes: %E\n");
if (sneed != NULL)
@@ -847,7 +847,8 @@ gld${EMULATION_NAME}_find_exp_assignment (etree_type *exp)
if (strcmp (exp->assign.dst, ".") != 0)
{
- if (! bfd_sunos_record_link_assignment (output_bfd, &link_info,
+ if (! bfd_sunos_record_link_assignment (link_info.output_bfd,
+ &link_info,
exp->assign.dst))
einfo ("%P%F: failed to record assignment to %s: %E\n",
exp->assign.dst);
@@ -914,12 +915,13 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
Instead, we use offsets, and rely on the BFD backend to
finish the section up correctly. FIXME: Talk about lack of
referential locality. */
- bfd_put_32 (output_bfd, need_pnames - need_contents, need_pinfo);
+ bfd_put_32 (link_info.output_bfd, need_pnames - need_contents,
+ need_pinfo);
if (! inp->is_archive)
{
- bfd_put_32 (output_bfd, (bfd_vma) 0, need_pinfo + 4);
- bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 8);
- bfd_put_16 (output_bfd, (bfd_vma) 0, need_pinfo + 10);
+ bfd_put_32 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 4);
+ bfd_put_16 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 8);
+ bfd_put_16 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 10);
strcpy ((char *) need_pnames, inp->filename);
}
else
@@ -927,22 +929,23 @@ gld${EMULATION_NAME}_set_need (lang_input_statement_type *inp)
char *verstr;
int maj, min;
- bfd_put_32 (output_bfd, (bfd_vma) 0x80000000, need_pinfo + 4);
+ bfd_put_32 (link_info.output_bfd, (bfd_vma) 0x80000000,
+ need_pinfo + 4);
maj = 0;
min = 0;
verstr = strstr (inp->filename, ".so.");
if (verstr != NULL)
sscanf (verstr, ".so.%d.%d", &maj, &min);
- bfd_put_16 (output_bfd, (bfd_vma) maj, need_pinfo + 8);
- bfd_put_16 (output_bfd, (bfd_vma) min, need_pinfo + 10);
+ bfd_put_16 (link_info.output_bfd, (bfd_vma) maj, need_pinfo + 8);
+ bfd_put_16 (link_info.output_bfd, (bfd_vma) min, need_pinfo + 10);
strcpy ((char *) need_pnames, inp->local_sym_name + 2);
}
c = (need_pinfo - need_contents) / NEED_ENTRY_SIZE;
if (c + 1 >= need_entries)
- bfd_put_32 (output_bfd, (bfd_vma) 0, need_pinfo + 12);
+ bfd_put_32 (link_info.output_bfd, (bfd_vma) 0, need_pinfo + 12);
else
- bfd_put_32 (output_bfd, (bfd_vma) (c + 1) * NEED_ENTRY_SIZE,
+ bfd_put_32 (link_info.output_bfd, (bfd_vma) (c + 1) * NEED_ENTRY_SIZE,
need_pinfo + 12);
need_pinfo += NEED_ENTRY_SIZE;