diff options
author | Alan Modra <amodra@gmail.com> | 2005-11-17 00:10:05 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-11-17 00:10:05 +0000 |
commit | 7b986e992e1a3a388ee0ff0749749f063cc971a6 (patch) | |
tree | 6b1aef910942de78a04e976cf0678918f96fe222 /ld/emultempl/ppc64elf.em | |
parent | a0fef31c45cd7738abcdde81ef3a7dcc21203c5a (diff) | |
download | gdb-7b986e992e1a3a388ee0ff0749749f063cc971a6.zip gdb-7b986e992e1a3a388ee0ff0749749f063cc971a6.tar.gz gdb-7b986e992e1a3a388ee0ff0749749f063cc971a6.tar.bz2 |
* ldlang.h (lang_input_section_type): Remove "ifile" field.
(lang_insert_orphan, lang_add_section): Update prototypes.
* ldlang.c (lang_insert_orphan): Remove "file" param.
(lang_add_section): Likewise. Update all callers.
(wild_sort): Get an input section's bfd via "section->owner".
(size_input_section): Access just_syms_flag via bfd usrdata.
(lang_place_orphans): Update ldemul_place_orphan call.
* ldemul.h (ldemul_place_orphan): Remove input_statement param.
(struct ld_emulation_xfer_struct <place_orphan>): Likewise.
* ldemul.c (ldemul_place_orphan): Likewise.
* ldwrite.c (build_link_order): Access just_syms_flag via bfd usrdata.
* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
* emultempl/beos.em (sort_by_file_name): Access bfd by section->owner.
(sort_sections): Likewise.
(place_orphan): Remove "file" param. Adjust lang_add_section call.
* emultempl/elf32.em (place_orphan): Remove "file" param. Adjust
lang_add_section and lang_insert_orphan calls.
* emultempl/hppaelf.em (hppaelf_add_stub_section): Adjust
lang_add_section call.
(build_section_lists): Access just_syms_flag via bfd usrdata.
* emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Adjust
lang_add_section call.
* emultempl/mmo.em (mmo_place_orphan): Remove "file" param. Adjust
lang_add_section and lang_insert_orphan calls.
* emultempl/pe.em (place_orphan): Likewise. Access bfd via section
owner.
* emultempl/ppc64elf.em (ppc_add_stub_section): Adjust
lang_add_section call.
(build_toc_list): Access just_syms_flag via bfd usrdata.
(build_section_lists): Likewise.
* emultempl/xtensaelf.em (elf_xtensa_place_orphan): Remove "file"
param. Adjust place_orphan call.
(ld_build_required_section_dependence): Access bfd via section owner.
Diffstat (limited to 'ld/emultempl/ppc64elf.em')
-rw-r--r-- | ld/emultempl/ppc64elf.em | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index f64a3d2..ea33771 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -235,7 +235,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section) info.input_section = input_section; lang_list_init (&info.add); - lang_add_section (&info.add, stub_sec, os, stub_file); + lang_add_section (&info.add, stub_sec, os); if (info.add.head == NULL) goto err_ret; @@ -277,26 +277,33 @@ gld${EMULATION_NAME}_after_allocation (void) static void build_toc_list (lang_statement_union_type *statement) { - if (statement->header.type == lang_input_section_enum - && !statement->input_section.ifile->just_syms_flag - && (statement->input_section.section->flags & SEC_EXCLUDE) == 0 - && statement->input_section.section->output_section == toc_section) - ppc64_elf_next_toc_section (&link_info, statement->input_section.section); + if (statement->header.type == lang_input_section_enum) + { + asection *i = statement->input_section.section; + + if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag + && (i->flags & SEC_EXCLUDE) == 0 + && i->output_section == toc_section) + ppc64_elf_next_toc_section (&link_info, i); + } } static void build_section_lists (lang_statement_union_type *statement) { - if (statement->header.type == lang_input_section_enum - && !statement->input_section.ifile->just_syms_flag - && (statement->input_section.section->flags & SEC_EXCLUDE) == 0 - && statement->input_section.section->output_section != NULL - && statement->input_section.section->output_section->owner == output_bfd) + if (statement->header.type == lang_input_section_enum) { - if (!ppc64_elf_next_input_section (&link_info, - statement->input_section.section)) - einfo ("%X%P: can not size stub section: %E\n"); + asection *i = statement->input_section.section; + + 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) + { + if (!ppc64_elf_next_input_section (&link_info, i)) + einfo ("%X%P: can not size stub section: %E\n"); + } } } |