Linker scripts
Fangrui Song
maskray@sourceware.org
Sat Jan 17 21:17:23 GMT 2026
On Sat, Jan 17, 2026 at 10:46 AM Gordon Messmer
<gordon.messmer@gmail.com> wrote:
>
> In order to improve RPM dependency generation, I'm proposing that the
> Fedora project more actively encourage library developers to use
> versioned symbols.
>
> In reviewing the documentation, I've realized that there is an option
> whose implications I'm not sure I understand. The GNU Linker manual
> (https://sourceware.org/binutils/docs-2.38/ld.pdf) provides an example
> on paged numbered 84:
>
> VERS_1.2 {
> foo2;
> } VERS_1.1;
>
> And it describes that node as, "the version script defines node
> ‘VERS_1.2’. This node depends upon ‘VERS_1.1’."
>
> What is the practical difference between that and a node that does not
> depend on VERS_1.1? as in:
>
> VERS_1.2 {
> foo2;
> };
>
> What does "depends upon" mean in this context? If there is a difference
> in the resulting shared library, I don't see it.
>
>
I believe the two are identical; the version node following the } is
purely decorative. In fact, the lld linker simply ignores it.
More information about the Binutils
mailing list