diff options
author | Alan Modra <amodra@gmail.com> | 2005-07-14 13:54:23 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-07-14 13:54:23 +0000 |
commit | a3c2b96af6bbf3ab11d9f5532093c8c3c346df4a (patch) | |
tree | 3dd2957dd59a3b39e4a89b121783842534195ddc /bfd/reloc.c | |
parent | bfaaa3c28b9c0ada4c322c895e4cf1349abfd10d (diff) | |
download | gdb-a3c2b96af6bbf3ab11d9f5532093c8c3c346df4a.zip gdb-a3c2b96af6bbf3ab11d9f5532093c8c3c346df4a.tar.gz gdb-a3c2b96af6bbf3ab11d9f5532093c8c3c346df4a.tar.bz2 |
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.
Diffstat (limited to 'bfd/reloc.c')
-rw-r--r-- | bfd/reloc.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/bfd/reloc.c b/bfd/reloc.c index 1b15e6a..9d10d25 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -4520,27 +4520,6 @@ bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, return TRUE; } -/* Mark sections containing global symbols. This is called through - bfd_link_hash_traverse. */ - -static bfd_boolean -bfd_mark_used_section (struct bfd_link_hash_entry *h, - void *data ATTRIBUTE_UNUSED) -{ - if (h->type == bfd_link_hash_warning) - h = h->u.i.link; - - if (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak) - { - asection *s = h->u.def.section; - if (s != NULL && s->output_section != NULL) - s->output_section->flags |= SEC_KEEP; - } - - return TRUE; -} - /* INTERNAL_FUNCTION bfd_generic_gc_sections @@ -4551,18 +4530,13 @@ SYNOPSIS DESCRIPTION Provides default handling for relaxing for back ends which - don't do section gc -- i.e., does nothing besides the special - case for marking sections having global symbols. + don't do section gc -- i.e., does nothing. */ bfd_boolean bfd_generic_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, - struct bfd_link_info *info) + struct bfd_link_info *info ATTRIBUTE_UNUSED) { - /* If called when info->gc_sections is 0, then mark all sections - containing global symbols with SEC_KEEP. */ - if (!info->gc_sections && !info->relocatable) - bfd_link_hash_traverse (info->hash, bfd_mark_used_section, NULL); return TRUE; } |