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: Daniel Jacobowitz <drow at false dot org>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Jakub Jelinek <jakub at redhat 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 09:43:08 -0400
- 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> <467FC3A2.5020705@codesourcery.com>
On Mon, Jun 25, 2007 at 09:31:14AM -0400, Mark Mitchell wrote:
> David Edelsohn wrote:
>
> > /* 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?
>
> I was just about to ask that.
>
> It's an intermediate case: more local than default visibility, but not
> *that* local. If the function is defined, then it probably does bind
> locally, in that nothing can come along later and replace the definition
> we saw.
>
> I think the DECL_EXTERNAL case should go before the visibility checks in
> default_binds_local_p_1. A DECL_EXTERNAL entity never binds locally.
That isn't the meaning that most callers of this function want,
however. They want same shared object, which is what it currently
returns; that's what I think of when you ask me if something binds
"locally", too...
--
Daniel Jacobowitz
CodeSourcery