From 64d03ab565d55c20bfa7267bc669876a8fbea912 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 17 Jan 2006 15:32:41 +0000 Subject: * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref. (bfd_elf_gc_mark_dynamic_ref_symbol): Declare. * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from elf_gc_mark_dynamic_ref_symbol. Make global. (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref. * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define. (elfNN_bed): Init new field. * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define. (ppc64_elf_gc_mark_dynamic_ref): New function. --- bfd/elf-bfd.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bfd/elf-bfd.h') diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 18ccdb5..b81f440 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 Free Software Foundation, Inc. + 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -830,6 +830,11 @@ struct elf_backend_data bfd_boolean (*elf_backend_modify_segment_map) (bfd *, 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); + /* This function is called during section gc to discover the section a particular relocation refers to. */ asection * (*gc_mark_hook) @@ -1808,6 +1813,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 bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol + (struct elf_link_hash_entry *h, void *inf); + extern bfd_boolean bfd_elf_gc_sections (bfd *, struct bfd_link_info *); -- cgit v1.1