diff options
author | Alan Modra <amodra@gmail.com> | 2005-07-08 06:20:16 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-07-08 06:20:16 +0000 |
commit | 32124d5bbfca091d8e4571d53acee5fc2036609b (patch) | |
tree | fde7dd00b557967db400a9c6e3544c3d1d477bd8 /ld/emultempl | |
parent | c456f0829fef883581694547d21b7183cdbaa3d6 (diff) | |
download | fsf-binutils-gdb-32124d5bbfca091d8e4571d53acee5fc2036609b.zip fsf-binutils-gdb-32124d5bbfca091d8e4571d53acee5fc2036609b.tar.gz fsf-binutils-gdb-32124d5bbfca091d8e4571d53acee5fc2036609b.tar.bz2 |
* ldlang.c (wild_sort): Formatting.
(strip_excluded_output_sections): Strip zero size sections here.
* emultempl/elf32.em (gld*_strip_empty_sections): Delete.
(gld*_finish): Don't call the above.
* emultempl/hppaelf.em (hppaelf_finish): Likewise.
* emultempl/ppc64elf.em (ppc_finish): Likewise.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 30 | ||||
-rw-r--r-- | ld/emultempl/hppaelf.em | 1 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 1 |
3 files changed, 0 insertions, 32 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 9248c30..da7af0b 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -61,7 +61,6 @@ static void gld${EMULATION_NAME}_before_allocation (void); static bfd_boolean gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s); static void gld${EMULATION_NAME}_layout_sections_again (void); -static void gld${EMULATION_NAME}_strip_empty_sections (void); static void gld${EMULATION_NAME}_provide_init_fini_syms (void); static void gld${EMULATION_NAME}_finish (void) ATTRIBUTE_UNUSED; @@ -1507,40 +1506,11 @@ gld${EMULATION_NAME}_layout_sections_again (void) } static void -gld${EMULATION_NAME}_strip_empty_sections (void) -{ - if (!link_info.relocatable) - { - lang_output_section_statement_type *os; - - for (os = &lang_output_section_statement.head->output_section_statement; - os != NULL; - os = os->next) - { - asection *s; - - if (os == abs_output_section || os->constraint == -1) - continue; - s = os->bfd_section; - if (s != NULL - && s->size == 0 - && (s->flags & SEC_KEEP) == 0 - && !bfd_section_removed_from_list (output_bfd, s)) - { - bfd_section_list_remove (output_bfd, s); - output_bfd->section_count--; - } - } - } -} - -static void gld${EMULATION_NAME}_finish (void) { if (bfd_elf_discard_info (output_bfd, &link_info)) gld${EMULATION_NAME}_layout_sections_again (); - gld${EMULATION_NAME}_strip_empty_sections (); gld${EMULATION_NAME}_provide_init_fini_syms (); } EOF diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index 5e91fb6..96a98ed 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -305,7 +305,6 @@ hppaelf_finish (void) } } - gld${EMULATION_NAME}_strip_empty_sections (); gld${EMULATION_NAME}_provide_init_fini_syms (); } diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 6eea93d..483d381 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -379,7 +379,6 @@ ppc_finish (void) } ppc64_elf_restore_symbols (&link_info); - gld${EMULATION_NAME}_strip_empty_sections (); gld${EMULATION_NAME}_provide_init_fini_syms (); } |