From 5061a8853b6f8fb5af87b8ff4a0f7a2460ad333b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 19 Jul 2006 01:50:23 +0000 Subject: bfd/ * bfd-in.h (enum notice_asneeded_action): Define. * bfd-in2.h: Regenerate. * elflink.c (elf_link_add_object_symbols): Call linker "notice" function with NULL name for as-needed handling. ld/ * ld.h (handle_asneeded_cref): Declare. * ldcref.c: Include objalloc.h. (old_table, old_count, old_tab, alloc_mark): New variables. (tabsize, entsize, refsize, old_symcount): Likewise. (add_cref): Use bfd_hash_allocate for refs. (handle_asneeded_cref): New function. * ldmain.c (notice): Call handle_asneeded_cref for NULL name. --- ld/ldmain.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ld/ldmain.c') diff --git a/ld/ldmain.c b/ld/ldmain.c index ec31310..cb56a8d 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -1523,6 +1523,13 @@ notice (struct bfd_link_info *info, asection *section, bfd_vma value) { + if (name == NULL) + { + if (command_line.cref || nocrossref_list != NULL) + return handle_asneeded_cref (abfd, value); + return TRUE; + } + if (! info->notice_all || (info->notice_hash != NULL && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL)) -- cgit v1.1