This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ppc64 __attribute__((visibility ("hidden"))) and multiple TOCs
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Alan Modra <amodra at bigpond dot net dot au>, gcc at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Mon, 25 Jun 2007 15:30:59 +0200
- Subject: Re: ppc64 __attribute__((visibility ("hidden"))) and multiple TOCs
- References: <20070625110601.GQ7012@devserv.devel.redhat.com> <467FBAED.7000609@codesourcery.com> <200706251315.l5PDFeQ35784@makai.watson.ibm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jun 25, 2007 at 09:15:40AM -0400, David Edelsohn wrote:
> Emitting a NOP depends on SYMBOL_FLAG_LOCAL.
>
> if (targetm.binds_local_p (decl))
> flags |= SYMBOL_FLAG_LOCAL;
>
> PPC64 uses the default binds_local_p() hook, default_binds_local_p_1():
>
> /* If defined in this object and visibility is not default, must be
> local. */
> else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
> local_p = true;
>
> Why does binds_local_p return true for non-default visibility?
Because local in binds_local_p's definition is "defined in the same
executable or shared library" and that's true for hidden visibility.
ppc64 in this case needs more strict definition of what local is though.
Jakub