GCC, the GNU linker and the -z extract option

View: New views
2 Messages — Rating Filter:   Alert me  

GCC, the GNU linker and the -z extract option

by eoin :: Rate this Message:

| View Threaded | Show Only this Message

Hi,
     I'm a new poster here. I am porting some Solaris code over to Linux and using the GNU compiler and linker. Now I have a "meta library"(creating a "master" shared object from mayny shared objects) which creates fine in Solaris but in Linux it doesn't create as a meta library - ldd suggests that it depends on the libraries which were previously used to produce the meta library on solaris.
     Looking into this I can see that with every .so we effectively lose the identity and so with a metalibrary what we need to do is to "unravel" the .sos to produce the meta library.
     I do this in Solaris using the -z extract option. I can't see how to do this in Linux using the GNU linker. Anyone any ideas?

Thanks

Re: GCC, the GNU linker and the -z extract option

by H.J. Lu-30 :: Rate this Message:

| View Threaded | Show Only this Message

On Fri, Jul 25, 2008 at 2:06 AM, eoin <eoin.mcquillan@...> wrote:

>
> Hi,
>     I'm a new poster here. I am porting some Solaris code over to Linux and
> using the GNU compiler and linker. Now I have a "meta library"(creating a
> "master" shared object from mayny shared objects) which creates fine in
> Solaris but in Linux it doesn't create as a meta library - ldd suggests that
> it depends on the libraries which were previously used to produce the meta
> library on solaris.
>     Looking into this I can see that with every .so we effectively lose the
> identity and so with a metalibrary what we need to do is to "unravel" the
> .sos to produce the meta library.
>     I do this in Solaris using the -z extract option. I can't see how to do
> this in Linux using the GNU linker. Anyone any ideas?
>

This has nothing to do with gcc. Please ask it on binutils mailing list with
an example.


--
H.J.