]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libdtrace: Change the binding of USDT probe symbols to STB_WEAK
authorMark Johnston <markj@FreeBSD.org>
Sun, 11 Dec 2022 16:27:22 +0000 (11:27 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 19 Dec 2022 14:56:38 +0000 (09:56 -0500)
commit98492960c3d91de4995ddbf5dc1860c8e57b5951
treefe47a3840f6d34390e45615ab16fd305abb84a37
parent47f21d91808c687e88f7f63930b73a893ce6d2a1
libdtrace: Change the binding of USDT probe symbols to STB_WEAK

Otherwise, if multiple object files contain references to the same
probe, newish lld will refuse to link them by default, raising a
duplicate global symbol definition error.  Previously, duplicate global
symbols with identical absolute st_values were permitted by both lld and
GNU ld.

Since dtrace has no use for probe function symbols after the relocation
performed by dtrace -G, make the symbols weak as well, following a
suggestion from MaskRay.

Reported by: dim
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit be39466a1035ffb13268cd63723e976898e9b91e)
cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c