aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/ppc64elf.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/ppc64elf.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/ppc64elf.em')
-rw-r--r--ld/emultempl/ppc64elf.em40
1 files changed, 22 insertions, 18 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index b23ae43..f6af695 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -75,8 +75,8 @@ ppc_create_output_section_statements (void)
extern const bfd_target bfd_elf64_powerpc_vec;
extern const bfd_target bfd_elf64_powerpcle_vec;
- if (link_info.hash->creator != &bfd_elf64_powerpc_vec
- && link_info.hash->creator != &bfd_elf64_powerpcle_vec)
+ if (link_info.output_bfd->xvec != &bfd_elf64_powerpc_vec
+ && link_info.output_bfd->xvec != &bfd_elf64_powerpcle_vec)
return;
link_info.wrap_char = '.';
@@ -84,11 +84,11 @@ ppc_create_output_section_statements (void)
stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum,
NULL);
- stub_file->the_bfd = bfd_create ("linker stubs", output_bfd);
+ stub_file->the_bfd = bfd_create ("linker stubs", link_info.output_bfd);
if (stub_file->the_bfd == NULL
|| !bfd_set_arch_mach (stub_file->the_bfd,
- bfd_get_arch (output_bfd),
- bfd_get_mach (output_bfd)))
+ bfd_get_arch (link_info.output_bfd),
+ bfd_get_mach (link_info.output_bfd)))
{
einfo ("%F%P: can not create BFD %E\n");
return;
@@ -105,10 +105,12 @@ ppc_before_allocation (void)
if (stub_file != NULL)
{
if (!no_opd_opt
- && !ppc64_elf_edit_opd (output_bfd, &link_info, non_overlapping_opd))
+ && !ppc64_elf_edit_opd (link_info.output_bfd, &link_info,
+ non_overlapping_opd))
einfo ("%X%P: can not edit %s %E\n", "opd");
- if (ppc64_elf_tls_setup (output_bfd, &link_info) && !no_tls_opt)
+ if (ppc64_elf_tls_setup (link_info.output_bfd, &link_info)
+ && !no_tls_opt)
{
/* Size the sections. This is premature, but we want to know the
TLS segment layout so that certain optimizations can be done. */
@@ -116,7 +118,7 @@ ppc_before_allocation (void)
expld.dataseg.phase = exp_dataseg_none;
one_lang_size_sections_pass (NULL, TRUE);
- if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
+ if (!ppc64_elf_tls_optimize (link_info.output_bfd, &link_info))
einfo ("%X%P: TLS problem %E\n");
/* We must not cache anything from the preliminary sizing. */
@@ -125,7 +127,7 @@ ppc_before_allocation (void)
if (!no_toc_opt
&& !link_info.relocatable
- && !ppc64_elf_edit_toc (output_bfd, &link_info))
+ && !ppc64_elf_edit_toc (link_info.output_bfd, &link_info))
einfo ("%X%P: can not edit %s %E\n", "toc");
}
@@ -271,7 +273,8 @@ static void
gld${EMULATION_NAME}_after_allocation (void)
{
if (!link_info.relocatable)
- _bfd_set_gp_value (output_bfd, ppc64_elf_toc (output_bfd));
+ _bfd_set_gp_value (link_info.output_bfd,
+ ppc64_elf_toc (link_info.output_bfd));
}
@@ -300,7 +303,7 @@ build_section_lists (lang_statement_union_type *statement)
if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
&& (i->flags & SEC_EXCLUDE) == 0
&& i->output_section != NULL
- && i->output_section->owner == output_bfd)
+ && i->output_section->owner == link_info.output_bfd)
{
if (!ppc64_elf_next_input_section (&link_info, i))
einfo ("%X%P: can not size stub section: %E\n");
@@ -323,29 +326,30 @@ gld${EMULATION_NAME}_finish (void)
ie. doesn't affect any code, so we can delay resizing the
sections. It's likely we'll resize everything in the process of
adding stubs. */
- if (bfd_elf_discard_info (output_bfd, &link_info))
+ if (bfd_elf_discard_info (link_info.output_bfd, &link_info))
need_laying_out = 1;
/* If generating a relocatable output file, then we don't have any
stubs. */
if (stub_file != NULL && !link_info.relocatable)
{
- int ret = ppc64_elf_setup_section_lists (output_bfd, &link_info,
+ int ret = ppc64_elf_setup_section_lists (link_info.output_bfd,
+ &link_info,
no_multi_toc);
if (ret < 0)
einfo ("%X%P: can not size stub section: %E\n");
else if (ret > 0)
{
- toc_section = bfd_get_section_by_name (output_bfd, ".got");
+ toc_section = bfd_get_section_by_name (link_info.output_bfd, ".got");
if (toc_section != NULL)
lang_for_each_statement (build_toc_list);
- ppc64_elf_reinit_toc (output_bfd, &link_info);
+ ppc64_elf_reinit_toc (link_info.output_bfd, &link_info);
lang_for_each_statement (build_section_lists);
/* Call into the BFD backend to do the real work. */
- if (!ppc64_elf_size_stubs (output_bfd,
+ if (!ppc64_elf_size_stubs (link_info.output_bfd,
&link_info,
group_size,
&ppc_add_stub_section,
@@ -359,9 +363,9 @@ gld${EMULATION_NAME}_finish (void)
if (link_info.relocatable)
{
- asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
+ asection *toc = bfd_get_section_by_name (link_info.output_bfd, ".toc");
if (toc != NULL
- && bfd_section_size (output_bfd, toc) > 0x10000)
+ && bfd_section_size (link_info.output_bfd, toc) > 0x10000)
einfo ("%X%P: TOC section size exceeds 64k\n");
}