Re: Shared library linking with external static libraries.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks !

My application links with the shared object, and it runs with no problems !
My symbols appear in "nm -C -g --defined-only" and only the symbols I want !
Nice !

Thanks you so much ! You guys rock !

And now I'll go to the dead-stripping. How can I be sure that unused code
from the external and internal static libraries is not shipped with the
shared object ?

I tried naively to add the "-Wl,-dead-strip" to the gcc -shared command, but
this gave me the warning:

/usr/bin/ld: warning: cannot find entry symbol ad-strip; defaulting to
0000000000071f00

What would gcc need to only pull needed code for the static libs ?

Kind regards,
Florent.



Ian Lance Taylor-3 wrote:
> 
> FloofLeBo <bluswedshooz@xxxxxxxx> writes:
> 
>> Thanks, I'm getting closer to what I want.
>>
>> I've created a simple Version script:
>>
>> [code]
>> VERSION {
>>     {
>>         global:
>>             SomeRootNameSpaceClass*;
>>             SomeOtherRootNameSpaceClass*;
>>             SomeNameSpace::*;
>>             SomeOtherNameSpace::*;
>>         local:
>>             *;
>>     };
>> }
>> [/code]
>>
>> But then, if I try to link with the produced so, i get undefined
>> references
>> to methods that should be exported:
> 
> It looks like you need to use extern "C++" in your version script.  Look
> for extern "lang" in
> http://sourceware.org/binutils/docs-2.20/ld/VERSION.html .
> 
> Ian
> 
> 

-- 
View this message in context: http://old.nabble.com/Shared-library-linking-with-external-static-libraries.-tp29941925p29945444.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux