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 libgcc]: Adjust cygming-crtbegin code to use weak


2013/3/23 Dave Korn <dave.korn.cygwin@gmail.com>:
> On 23/03/2013 00:08, Kai Tietz wrote:
>> 2013/3/23 Dave Korn <dave.korn.cygwin@gmail.com>:
>
>>>   Also, can you explain the motivation for this change?  I don't see how it's
>>> going to work right; from what I remember, we don't have weak definitions in
>>> PE-COFF, just weak references.  How does the correct definition get chosen
>>> when we may have two definitions in a final link?
>>
>> Well, weak undefs are possible with pe-coff.  We ran into that by
>> porting cygwin to x64.
>> But you are right that pe-coff doesn't support undefines (weak or
>> none-weak) within final-link, so for a weak we need always a default
>> implementation.  This we added here.
>
>   I thought it does (support weak undefines within final link).  Weak
> references with no definition resolve to zero, no?
>
>     cheers,
>       DaveK
>

No, actual they aren't zero value, they are reported as undefined
symbol, which seems to me from perpective of pe-coff weak definition
the right thing to do.

Cheers,
Kai


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