diff options
author | Paul Brook <paul@codesourcery.com> | 2007-02-22 17:03:59 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2007-02-22 17:03:59 +0000 |
commit | 6a5bb8757e503d29dd2b0cc656a8747bca71362e (patch) | |
tree | 739be2901b553d31859250350c69dc13a3454070 /bfd/elflink.c | |
parent | 115d86cfaa1c3ecbf7ce54222a7622a2adb994f9 (diff) | |
download | gdb-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/elflink.c')
-rw-r--r-- | bfd/elflink.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 00dd2aa..f7de165 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -10088,10 +10088,6 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* Garbage collect unused sections. */ -typedef asection * (*gc_mark_hook_fn) - (asection *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *, Elf_Internal_Sym *); - /* Default gc_mark_hook. */ asection * @@ -10129,7 +10125,7 @@ _bfd_elf_gc_mark_hook (asection *sec, bfd_boolean _bfd_elf_gc_mark (struct bfd_link_info *info, asection *sec, - gc_mark_hook_fn gc_mark_hook) + elf_gc_mark_hook_fn gc_mark_hook) { bfd_boolean ret; bfd_boolean is_eh; @@ -10498,9 +10494,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) { bfd_boolean ok = TRUE; bfd *sub; - asection * (*gc_mark_hook) - (asection *, struct bfd_link_info *, Elf_Internal_Rela *, - struct elf_link_hash_entry *h, Elf_Internal_Sym *); + elf_gc_mark_hook_fn gc_mark_hook; const struct elf_backend_data *bed = get_elf_backend_data (abfd); if (!bed->can_gc_sections @@ -10547,6 +10541,10 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) return FALSE; } + /* Allow the backend to mark additional target specific sections. */ + if (bed->gc_mark_extra_sections) + bed->gc_mark_extra_sections(info, gc_mark_hook); + /* ... again for sections marked from eh_frame. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next) { |