NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/58376: Missing DPADD for library version scripts



>Number:         58376
>Category:       lib
>Synopsis:       Missing DPADD for library version scripts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 28 17:35:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The -Wl,--version-script=NetBSD.map Foundation
>Environment:
>Description:
Many (if not most, or even perhaps all) libraries that use version scripts do so by something like

LDFLAGS+=-Wl,--version-script=${.CURDIR}/foo.map

but do nothing to ensure that changes to foo.map trigger relinking, so the libraries can have stale symbol version exports.
>How-To-Repeat:
1. build libcrypto, heimdal, libnetpgpverify, gallium, ...
2. change the version script
3. rebuild
4. observe the changes to the version script do not trigger relinking and are not reflected in the library
>Fix:
Two options:

1. Sprinkle DPADD+= .../foo.map everywhere.
2. Invent a variable in bsd.lib.mk, say VERSIONSCRIPT, which (a) adds the appropriate -Wl,--version-script flag to LDFLAGS, and (b) updates DPADD accordingly.



Home | Main Index | Thread Index | Old Index