From e5094212dfec9f4caa6ec514019cdae92c163f2d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 21 Jan 2002 10:29:09 +0000 Subject: * elf-bfd.h (elf_backend_data ): Add boolean param. (_bfd_elf_link_hash_hide_symbol): Likewise. * elflink.h (elf_link_add_object_symbols): Adjust call to elf_backend_hide_symbol. (elf_fix_symbol_flags): Likewise. (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather than bfd_alloc. * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param. Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. (clobber_millicode_symbols): Adjust to suit new hide_symbol. * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param and adjust to suit. * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call _bfd_elf_link_hash_hide_symbol rather than duplicating code. * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. --- bfd/elf32-mips.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bfd/elf32-mips.c') diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 41b5909..bdeed28 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -211,7 +211,7 @@ static boolean mips_elf_stub_section_p static int sort_dynamic_relocs PARAMS ((const void *, const void *)); static void _bfd_mips_elf_hide_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean)); static void _bfd_mips_elf_copy_indirect_symbol PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); @@ -4503,9 +4503,10 @@ mips_elf_link_hash_newfunc (entry, table, string) } static void -_bfd_mips_elf_hide_symbol (info, entry) +_bfd_mips_elf_hide_symbol (info, entry, force_local) struct bfd_link_info *info; struct elf_link_hash_entry *entry; + boolean force_local; { bfd *dynobj; asection *got; @@ -4516,10 +4517,7 @@ _bfd_mips_elf_hide_symbol (info, entry) got = bfd_get_section_by_name (dynobj, ".got"); g = (struct mips_got_info *) elf_section_data (got)->tdata; - h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; - h->root.plt.offset = (bfd_vma) -1; - if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0) - h->root.dynindx = -1; + _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local); /* FIXME: Do we allocate too much GOT space here? */ g->local_gotno++; -- cgit v1.1