HomeFreeBSD

libdtrace: Change the binding of USDT probe symbols to STB_WEAK

Description

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)

Details

Provenance
markjAuthored on Dec 11 2022, 4:27 PM
Parents
rG561dcc7f3722: jail: fix a NULL pointer derefence in parsing ip6.addr settings.
Branches
Unknown
Tags
Unknown