diff options
author | Alan Modra <amodra@gmail.com> | 2008-01-15 07:25:49 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-01-15 07:25:49 +0000 |
commit | 74f0fb5065323b33bef71dfcbbd9b595c88c6c0c (patch) | |
tree | 887fac661eca7841cb2e40e01f993da0f5aa02c7 /bfd/elf-bfd.h | |
parent | 5c07affcae1a9698e488eefae0b1eb30d9743657 (diff) | |
download | gdb-74f0fb5065323b33bef71dfcbbd9b595c88c6c0c.zip gdb-74f0fb5065323b33bef71dfcbbd9b595c88c6c0c.tar.gz gdb-74f0fb5065323b33bef71dfcbbd9b595c88c6c0c.tar.bz2 |
bfd/
PR 5604
* elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
names from others.
(_bfd_elf_gc_keep): Declare.
* elfxx-target.h (elf_backend_gc_keep): Define.
(elfNN_bed): Init new field.
* elflink.c (_bfd_elf_gc_keep): New function.
(bfd_elf_gc_sections): Call gc_keep.
* elf64-ppc.c (elf_backend_gc_keep): Define.
(struct _ppc64_elf_section_data): Move .opd related fields to
a struct so they don't occupy the same storage. Adjust accesses
throughout file.
(ppc64_elf_gc_keep): New function, split out from..
(ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
to mark .opd section, just set gc_mark.
(ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
unless we are changing .opd. Test non-NULL opd->adjust at all
accesses throughout file.
* elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
ld/
PR 5604
* ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry
syms to _bfd_elf_gc_keep.
* emultempl/ppc64elf.em (ppc_before_allocation): Don't call
ppc64_elf_edit_opd if no_opd_opt.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 86ddd63..269b115 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1,6 +1,6 @@ /* BFD back-end data structures for ELF files. Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -915,10 +915,15 @@ struct elf_backend_data bfd_boolean (*elf_backend_modify_program_headers) (bfd *, struct bfd_link_info *); + /* This function is called before section garbage collection to + mark entry symbol sections. */ + void (*gc_keep) + (struct bfd_link_info *); + /* This function is called during section garbage collection to mark sections that define global symbols. */ bfd_boolean (*gc_mark_dynamic_ref) - (struct elf_link_hash_entry *h, void *inf); + (struct elf_link_hash_entry *, void *); /* This function is called during section gc to discover the section a particular relocation refers to. */ @@ -927,14 +932,13 @@ struct elf_backend_data /* This function, if defined, is called after the first gc marking pass to allow the backend to mark additional sections. */ bfd_boolean (*gc_mark_extra_sections) - (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook); + (struct bfd_link_info *, elf_gc_mark_hook_fn); /* This function, if defined, is called during the sweep phase of gc in order that a backend might update any data structures it might be maintaining. */ bfd_boolean (*gc_sweep_hook) - (bfd *abfd, struct bfd_link_info *info, asection *o, - const Elf_Internal_Rela *relocs); + (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); /* This function, if defined, is called after the ELF headers have been created. This allows for things like the OS and ABI versions @@ -2034,6 +2038,9 @@ extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn extern bfd_boolean bfd_elf_final_link (bfd *, struct bfd_link_info *); +extern void _bfd_elf_gc_keep + (struct bfd_link_info *info); + extern bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf); |