[Darwin] Patch, take 2: enable linkonce support for Darwin

Jason Merrill jason@redhat.com
Mon Feb 2 19:12:00 GMT 2004


On Mon, 2 Feb 2004 11:00:26 -0800, Matt Austern <austern@apple.com> wrote:

> On Feb 2, 2004, at 10:47 AM, Jason Merrill wrote:
>
>> On Fri, 30 Jan 2004 17:06:17 -0800, Matt Austern <austern@apple.com>
>> wrote:
>>
>>>>> Finally, one new user-visible feature: -fhidden-weak.  This flag makes
>>>>> the compiler automatically give hidden visibility to symbols that have
>>>>> vague linkage.
>>
>> Sounds like this would block sharing of template instantiations and RTTI
>> information between an executable and a shared library, which would
>> break a lot of code.
>
> Not necessarily as much code as you might think!  Most Unix linkers have
> the property that implicit instantiations are shared between different
> shared libraries, but that's not the way it works on MS-Windows.  Anyone
> who's writing code that's portable between Unix and Windows isn't relying
> on that sort of sharing.

The code may not be, but the compiler is for internal data structures like
RTTI info.  Does throwing an exception between shared objects work with
-fhidden-weak?

Jason



More information about the Gcc-patches mailing list