Open hebasto opened 1 week ago
Concept ACK.
I think we might be after -Wl,--no-allow-shlib-undefined
, though, and only for the shared lib as that's what we care about. --no-undefined
is strictly stronger, I guess, and should also be satisfied for the binaries. So I suppose the sledgehammer approach here should be fine.
I think we might be after
-Wl,--no-allow-shlib-undefined
...
From my experience, it fails to catch an issue like one I demoed in https://github.com/bitcoin-core/secp256k1/issues/1556.
I think we might be after
-Wl,--no-allow-shlib-undefined
, though, and only for the shared lib as that's what we care about.--no-undefined
is strictly stronger, I guess, and should also be satisfied for the binaries. So I suppose the sledgehammer approach here should be fine.
If https://stackoverflow.com/a/2356407 is right, then --no-undefined
covers objects created by the linker and --no-allow-shlib-undefined
covers shared libraries consumed by the linker.
Concept ACK
Looking for Concept (N)ACKs. Once ACKed, I'll add the same functionality to the Autotools-based build system.
Added a commit for the Autotools-based build system.
I think we need to make add an exception to this if external default callbacks are enabled because the entire point of this option is that the user provides the callbacks at link time.
Right. I did it in CMake, but forgot about it in Autotools. Fixed.
This PR adds the
--no-undefined
option to a linker, which supports it.From the GNU ld docs:
Closes https://github.com/bitcoin-core/secp256k1/issues/1556.
~Looking for Concept (N)ACKs. Once ACKed, I'll add the same functionality to the Autotools-based build system.~