This is the mail archive of the gcc@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: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?


Eric Botcazou <ebotcazou@adacore.com> writes:

>> True, but not, as far as I can see, an explanation for why the symbols
>> are hidden.  Hiding the symbols doesn't fix the problem of having
>> multiple libgcc_eh on those platforms.
>
> Yes, it does, as it prevents libgcc_eh from being linked in shared libraries, 
> thus forcing you to use libgcc_s.so, at least on those platforms.

I'm sorry, I'm sitll missing something. I don't understand how having
hidden symbols prevents libgcc_eh from being linked into shared
libraries.  I mean, what is stopping you (aside from the fact that
libgcc_eh is not compiled with -fPIC).  After all, you can link hidden
symbols into a shared library; the library will use those symbols but
will not expose them for use by other libraries.

And it seems to me that if you link libgcc_eh into your main executable,
then things actually would work if the symbols were not hidden--all the
shared libraries would use the version in the main executable.

Ian


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