From a3c2b96af6bbf3ab11d9f5532093c8c3c346df4a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 14 Jul 2005 13:54:23 +0000 Subject: bfd/ * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare. (_bfd_elf_provide_section_bound_symbols): Remove param name. Formatting. * bfd-in2.h: Regenerate. * elflink.c (bfd_elf_gc_sections): Don't call generic function. (_bfd_elf_provide_symbol): Formatting. (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just create section relative syms. (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions. * elf32-ppc.c (ppc_elf_set_sdata_syms): Use _bfd_elf_provide_section_bound_symbols. * reloc.c (bfd_mark_used_section): Delete. (bfd_generic_gc_sections): Don't call the above. ld/ * ldlang.c (strip_excluded_output_sections): Don't call bfd_gc_sections. * emultempl/elf32.em (gld*_provide_bound_symbols): Move. (gld*_provide_init_fini_syms): Move. (gld*_before_allocation): Call the above from here.. (gld*_finish): ..not here. Call _bfd_elf_fix_excluded_sec_syms. * emultempl/hppaelf.em (hppaelf_finish): Likewise. * emultempl/ppc64elf.em (ppc_finish): Likewise. --- ld/ldlang.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'ld/ldlang.c') diff --git a/ld/ldlang.c b/ld/ldlang.c index ce178f1..35c5075 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3049,7 +3049,6 @@ void strip_excluded_output_sections (void) { lang_output_section_statement_type *os; - unsigned int gc_sections; /* Run lang_size_sections (if not already done) to ensure that all symbols defined in the linker script are put in the bfd hash @@ -3062,13 +3061,6 @@ strip_excluded_output_sections (void) lang_reset_memory_regions (); } - /* Now call into bfd_gc_sections to mark all sections defining global - symbols with SEC_KEEP. */ - gc_sections = link_info.gc_sections; - link_info.gc_sections = 0; - bfd_gc_sections (output_bfd, &link_info); - link_info.gc_sections = gc_sections; - for (os = &lang_output_section_statement.head->output_section_statement; os != NULL; os = os->next) -- cgit v1.1