* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func

and is_func_descriptor.
	(func_desc_adjust): Hide function code sym in shared libs unless
	there is a matching exported function descriptor sym.
This commit is contained in:
Alan Modra
2002-05-24 04:07:38 +00:00
parent 7f7432881e
commit ea1e4b0d54
2 changed files with 43 additions and 27 deletions

View File

@ -1,3 +1,10 @@
2002-05-24 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
and is_func_descriptor.
(func_desc_adjust): Hide function code sym in shared libs unless
there is a matching exported function descriptor sym.
2002-05-23 Jakub Jelinek <jakub@redhat.com> 2002-05-23 Jakub Jelinek <jakub@redhat.com>
* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
@ -151,9 +158,9 @@
2002-05-15 Nick Clifton <nickc@cambridge.redhat.com> 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
* aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
bfd_bread. bfd_bread.
(xcoff64_core_file_matches_executable_p): Replace bfd_read (xcoff64_core_file_matches_executable_p): Replace bfd_read
with bfd_bread. with bfd_bread.
2002-05-15 Alan Modra <amodra@bigpond.net.au> 2002-05-15 Alan Modra <amodra@bigpond.net.au>
@ -637,7 +644,7 @@
insert_thumb_branch, record_thumb_to_arm_glue): Suppress insert_thumb_branch, record_thumb_to_arm_glue): Suppress
definition of these functions for ARM_WINCE builds as they are definition of these functions for ARM_WINCE builds as they are
not used. not used.
(SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
for ARM_WINCE builds. for ARM_WINCE builds.
2002-04-18 Nick Clifton <nickc@cambridge.redhat.com> 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>

View File

@ -2583,8 +2583,11 @@ ppc64_elf_copy_indirect_symbol (dir, ind)
eind->dyn_relocs = NULL; eind->dyn_relocs = NULL;
} }
edir->is_func |= eind->is_func; /* We don't need to copy is_func and is_func_descriptor; They're
edir->is_func_descriptor |= eind->is_func_descriptor; never set when copy_indirect_symbol is called for indirect
symbols at the add_symbols stage of linking, and they're not
relevant when copy_indirect_symbol is called for weakdefs.
weakdefs are only held for non-function syms. */
_bfd_elf_link_hash_copy_indirect (dir, ind); _bfd_elf_link_hash_copy_indirect (dir, ind);
} }
@ -3236,8 +3239,14 @@ func_desc_adjust (h, inf)
been imported from another library. Function code syms that been imported from another library. Function code syms that
are really in the library we must leave global to prevent the are really in the library we must leave global to prevent the
linker dragging in a definition from a static library. */ linker dragging in a definition from a static library. */
force_local = ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 force_local = (info->shared
&& info->shared); && ((h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0
|| fdh == NULL
|| (fdh->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0
|| (fdh->elf_link_hash_flags
& ELF_LINK_FORCED_LOCAL) != 0));
_bfd_elf_link_hash_hide_symbol (info, h, force_local); _bfd_elf_link_hash_hide_symbol (info, h, force_local);
} }