This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR32219, weak hidden reference segfault [PING^2]


On Aug 4, 2013, at 8:14 AM, Chung-Lin Tang <cltang@codesourcery.com> wrote:
> On 13/7/15 1:43 AM, Diego Novillo wrote:
>> Could you please repost the patch with its description?  This thread
>> is sufficiently old and noisy that I'm not even sure what the patch
>> does nor why.
> 
> Taking the same example in my first post:
> 
>  Under -fPIC, the code in rtlanal.c:nonzero_address_p() does not properly
> recognize the "PIC-reg + <constant>" form of load as a weak symbol; it
> returns 'true' immediately after seeing the pic-reg indexing, and does
> not test the wrapped symbol for DECL_WEAK.

So, I can't help but think that others would say that looking into an unspec is by nature, the wrong way to do it, unless that code is in the port.

I think the followup from Bernhard points to a better solution, though the wording in the comment was objectionable.  Merely say that the symbol, if weak and not defined, is then not local.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]