aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-05-25 06:33:51 +0000
committerAlan Modra <amodra@gmail.com>2004-05-25 06:33:51 +0000
commit57ceae9483c03910f7ee7ac66f3cb118c9d7d657 (patch)
treea5653edf9e28f48685a159531cb5d8dc82fedda5 /ld/emultempl
parent81bb3443544bff4a3cc386acc5d4f1a6339967da (diff)
downloadgdb-57ceae9483c03910f7ee7ac66f3cb118c9d7d657.zip
gdb-57ceae9483c03910f7ee7ac66f3cb118c9d7d657.tar.gz
gdb-57ceae9483c03910f7ee7ac66f3cb118c9d7d657.tar.bz2
bfd/
* elflink.c (elf_link_add_object_symbols): Don't set up merge section data here.. * elf.c (_bfd_elf_merge_sections): .. Do it here instead. * merge.c: Formatting. Remove unnecessary casts. Expand bfd_get_section_alignment macro. (struct sec_merge_sec_info): Rename "first" to "first_str". Update use throughout file. (_bfd_add_merge_section): Rename from _bfd_merge_section. Update comment. Abort on dynamic or non-SEC_MERGE input. Don't test section name to determine sinfo group, instead test output section and alignment. (_bfd_merge_sections): Add struct bfd_link_info param. Call _bfd_strip_section_from_output rather than just twiddling flags. * libbfd-in.h (_bfd_add_merge_section): Rename, update comment. (_bfd_merge_sections): Update prototype. * libbfd.h: Regenerate. ld/ * ldlang.c (lang_process): Call bfd_merge_sections later, and only when not a relocatable link. (print_input_section): Handle SEC_EXCLUDE sections. (size_input_section): Don't update dot on SEC_EXCLUDE sections. (lang_do_assignments_1): Likewise. * ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections. * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise. * emultempl/hppaelf.em (build_section_lists): Likewise. * emultempl/ppc64elf.em (build_toc_list): Likewise. (build_section_lists): Likewise.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/armelf.em3
-rw-r--r--ld/emultempl/hppaelf.em1
-rw-r--r--ld/emultempl/ppc64elf.em2
3 files changed, 5 insertions, 1 deletions
diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em
index beeb40c..5505f12 100644
--- a/ld/emultempl/armelf.em
+++ b/ld/emultempl/armelf.em
@@ -67,7 +67,8 @@ static void
arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
{
if (statement->header.type == lang_input_section_enum
- && !statement->input_section.ifile->just_syms_flag)
+ && !statement->input_section.ifile->just_syms_flag
+ && (statement->input_section.section->flags & SEC_EXCLUDE) == 0)
{
asection *i = statement->input_section.section;
asection *output_section = i->output_section;
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index 93e88ad..edd8e01 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -239,6 +239,7 @@ 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)
{
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index 4f408a9..6a60f0c 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -288,6 +288,7 @@ 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);
}
@@ -298,6 +299,7 @@ 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)
{