This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld generates static relocations in shared library
- From: Thomas Schmid <scth2000 at yahoo dot de>
- To: nick clifton <nickc at redhat dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Fri, 6 Sep 2013 14:05:32 +0100 (BST)
- Subject: Re: ld generates static relocations in shared library
- Authentication-results: sourceware.org; auth=none
- References: <1374764028 dot 31727 dot YahooMailNeo at web172604 dot mail dot ir2 dot yahoo dot com> <52173EE8 dot 2040308 at redhat dot com>
- Reply-to: Thomas Schmid <scth2000 at yahoo dot de>
Hello Nick,
> >> >Static relocations are processed by a static linker; they are normally either fully resolved or used to produce dynamic relocations
> >> >for processing by a post-linking step or a dynamic loader. A well formed image will have no static relocations after static linking
> >> >is complete,
> Right - but libso.so is not a fully linked binary. It is a shared
> library that is going to be used as part of another static link operation.
On the one hand, libso.so is used at static link-time of an executable, as you describe.
But on the other hand, libso.so is installed (=loaded) as dynamic library on the target -
and that's the point I don't understand:
What shall the loader do with this static relocations?
Which static relocations can occur in a shared library and must be handled by the loader ?
Thank you for helping,
regards,
Tom