Purpose of NULL SHN_ABS symbols for version script nodes?
H.J. Lu
hjl.tools@gmail.com
Mon Oct 18 15:00:15 GMT 2021
On Sun, Oct 17, 2021 at 6:54 AM Alan Modra via Binutils
<binutils@sourceware.org> wrote:
>
> On Fri, Oct 15, 2021 at 05:07:48PM +0300, Raul Tambre via Binutils wrote:
> > What is the reasoning behind GNU ld and gold generating NULL SHN_ABS symbols
> > for version script nodes?
>
> Ulrich Drepper and Eric Youngdale were the designers of the GNU symbol
> versioning scheme. I didn't have anything to do with the design, so I
> can only guess. I suspect they are there so that a program can ask
> "Does this library support version XYZ symbols?" at runtime without
> knowing which set of symbols have a version XYZ.
This may be useful to implement the glibc version check for:
https://sourceware.org/bugzilla/show_bug.cgi?id=27923
> > > I trawled the binutils source code, but didn't manage to find the piece
> > > of code responsible for generating those, nevermind the reasoning or
> > > history.
>
> Search for BSF_GLOBAL in git commit d044b40a4095. There isn't any
> reasoning given there, just a comment
> /* Add a symbol representing this version. */
>
--
H.J.
More information about the Binutils
mailing list