aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2007-02-22 17:03:59 +0000
committerPaul Brook <paul@codesourcery.com>2007-02-22 17:03:59 +0000
commit6a5bb8757e503d29dd2b0cc656a8747bca71362e (patch)
tree739be2901b553d31859250350c69dc13a3454070 /bfd/elf-bfd.h
parent115d86cfaa1c3ecbf7ce54222a7622a2adb994f9 (diff)
downloadgdb-6a5bb8757e503d29dd2b0cc656a8747bca71362e.zip
gdb-6a5bb8757e503d29dd2b0cc656a8747bca71362e.tar.gz
gdb-6a5bb8757e503d29dd2b0cc656a8747bca71362e.tar.bz2
2007-02-22 Paul Brook <paul@codesourcery.com>
bfd/ * elflink.c (gc_mark_hook_fn): Remove. (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn. (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections. * elf-bfd.h (elf_gc_mark_hook_fn): Define. (elf_backend_data): Add gc_mark_extra_sections. * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default definition. (elfNN_bed): Add elf_backend_gc_mark_extra_sections. * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function. (elf_backend_gc_mark_extra_sections): Define. ld/testsuite/ * ld-arm/arm-elf.exp (armelftests): Add gc-unwind.h. * ld-arm/gc-unwind.s: New file. * ld-arm/gc-unwind.d: New file.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index a0e6391..303b823 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -538,6 +538,10 @@ enum action_discarded
PRETEND = 2
};
+typedef asection * (*elf_gc_mark_hook_fn)
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+
struct elf_backend_data
{
/* The architecture for this backend. */
@@ -843,9 +847,12 @@ struct elf_backend_data
/* This function is called during section gc to discover the section a
particular relocation refers to. */
- asection * (*gc_mark_hook)
- (asection *sec, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *);
+ elf_gc_mark_hook_fn gc_mark_hook;
+
+ /* 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);
/* This function, if defined, is called during the sweep phase of gc
in order that a backend might update any data structures it might