Samuel Thibault
2015-Sep-08 16:26 UTC
[Pkg-xen-devel] [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
Ian Campbell, le Tue 08 Sep 2015 17:15:40 +0100, a ?crit :> Is it at all possible (even theoretically) to take a shared library (which > is relocatable as required) and to do a compile time static linking pass on > it? i.e. use libfoo.so but still do static linking?? gcc test.c -o libtest.so -shared -Wl,--relocatable /usr/bin/ld.bfd.real: -r and -shared may not be used together Samuel
Ian Campbell
2015-Sep-08 16:37 UTC
[Pkg-xen-devel] [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
On Tue, 2015-09-08 at 18:26 +0200, Samuel Thibault wrote:> Ian Campbell, le Tue 08 Sep 2015 17:15:40 +0100, a ?crit : > > Is it at all possible (even theoretically) to take a shared library > > (which > > is relocatable as required) and to do a compile time static linking > > pass on > > it? i.e. use libfoo.so but still do static linking? > > ? gcc test.c -o libtest.so -shared -Wl,--relocatable > /usr/bin/ld.bfd.real: -r and -shared may not be used togetherSorry, my suggestion was a bit garbled, to say the least... I meant more "link an application against it statically even though it is a shared library": $ gcc main.c -o myapp.elf -static libfoo.so Where myapp.elf would be statically linked and include the libfoo code directly. Ian.
Samuel Thibault
2015-Sep-08 17:09 UTC
[Pkg-xen-devel] [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
Ian Campbell, le Tue 08 Sep 2015 17:37:21 +0100, a ?crit :> On Tue, 2015-09-08 at 18:26 +0200, Samuel Thibault wrote: > > Ian Campbell, le Tue 08 Sep 2015 17:15:40 +0100, a ?crit : > > > Is it at all possible (even theoretically) to take a shared library > > > (which > > > is relocatable as required) and to do a compile time static linking > > > pass on > > > it? i.e. use libfoo.so but still do static linking? > > > > ? gcc test.c -o libtest.so -shared -Wl,--relocatable > > /usr/bin/ld.bfd.real: -r and -shared may not be used together > > Sorry, my suggestion was a bit garbled, to say the least... I meant more > "link an application against it statically even though it is a shared > library": > > $ gcc main.c -o myapp.elf -static libfoo.soYes, that's what I understood, but the answer is the same: AIUI, once the library is linked, you can not link again with it, because the code has already been specialized. Samuel
Apparently Analagous Threads
- [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
- [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
- [Xen-devel] On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
- On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)
- On distro packaging of stub domains (Re: Notes from Xen BoF at Debconf15)