This is the mail archive of the 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: [Darwin] Patch, take 2: enable linkonce support for Darwin

On Feb 2, 2004, at 11:11 AM, Jason Merrill wrote:

On Mon, 2 Feb 2004 11:00:26 -0800, Matt Austern <> wrote:

On Feb 2, 2004, at 10:47 AM, Jason Merrill wrote:

On Fri, 30 Jan 2004 17:06:17 -0800, Matt Austern <>

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

Good point. This does work in Apple's locally modified compiler, but
only because of some other changes that we made. I'll have to port
those extra changes over too. There's a fourth version of my patch
in the works... (Yes, it really is better for me to go through the effort
of making -fhidden-one-only work than to remove that feature. Darwin
has enough complicated linker features that something like this is
sometimes an important simplification.)

Also looks like I'd *really* better figure out how to get complicated multi-
file test cases into the dg framework. Here's the sort of test case that I
need to check this sort of thing:

Attachment: eh-hidden-one-only.tar
Description: Unix tar archive

I don't know how to make something like this a dg test case.  If anyone
has advice on that, I'd appreciate it.


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