This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
powerpc64 dot-sym cleanup
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Sat, 5 Mar 2005 22:13:16 +1030
- Subject: powerpc64 dot-sym cleanup
The other day I noticed that new ABI objects linked against old
libraries result in lots of dynamic undefined dot-symbols in
executables. They aren't needed, so tweak func_desc_adjust to
force them local. The other change in update_plt_info is really just
cosmetic since it doesn't correct any known failures.
* elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
with is_func.
(func_desc_adjust): Force dot-syms local in executables as well
as shared libs.
Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.193
diff -u -p -r1.193 elf64-ppc.c
--- bfd/elf64-ppc.c 28 Feb 2005 23:00:40 -0000 1.193
+++ bfd/elf64-ppc.c 5 Mar 2005 11:38:05 -0000
@@ -4213,7 +4213,9 @@ update_plt_info (bfd *abfd, struct ppc_l
}
ent->plt.refcount += 1;
eh->elf.needs_plt = 1;
- eh->is_func = 1;
+ if (eh->elf.root.root.string[0] == '.'
+ && eh->elf.root.root.string[1] != '\0')
+ eh->is_func = 1;
return TRUE;
}
@@ -5486,12 +5488,10 @@ func_desc_adjust (struct elf_link_hash_e
been imported from another library. Function code syms that
are really in the library we must leave global to prevent the
linker dragging in a definition from a static library. */
- force_local
- = (info->shared
- && (!fh->elf.def_regular
- || fdh == NULL
- || !fdh->elf.def_regular
- || fdh->elf.forced_local));
+ force_local = (!fh->elf.def_regular
+ || fdh == NULL
+ || !fdh->elf.def_regular
+ || fdh->elf.forced_local);
_bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local);
return TRUE;
--
Alan Modra
IBM OzLabs - Linux Technology Centre