Purpose of NULL SHN_ABS symbols for version script nodes?

Alan Modra amodra@gmail.com
Sun Oct 17 13:54:11 GMT 2021


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.

> > 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.  */ 

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list