mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
merge bitcoin#28783: remove -bind_at_load
usage
This commit is contained in:
parent
019c9dd7f4
commit
d7cb92aa7a
12
configure.ac
12
configure.ac
@ -1047,7 +1047,6 @@ dnl "ad_strip" as the symbol for the entry point.
|
||||
if test x$TARGET_OS = xdarwin; then
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"],, [[$LDFLAG_WERROR]])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"],, [[$LDFLAG_WERROR]])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-bind_at_load]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-bind_at_load"],, [[$LDFLAG_WERROR]])
|
||||
AX_CHECK_LINK_FLAG([[-Wl,-fixup_chains]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-fixup_chains"], [], [[$LDFLAG_WERROR]])
|
||||
fi
|
||||
|
||||
@ -1956,6 +1955,17 @@ case ${OS} in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl An old hack similar to a98356fee to remove hard-coded
|
||||
dnl bind_at_load flag from libtool
|
||||
case $host in
|
||||
*darwin*)
|
||||
AC_MSG_RESULT([Removing -Wl,bind_at_load from libtool.])
|
||||
sed < libtool > libtool-2 '/bind_at_load/d'
|
||||
mv libtool-2 libtool
|
||||
chmod 755 libtool
|
||||
;;
|
||||
esac
|
||||
|
||||
echo
|
||||
echo "Options used to compile and link:"
|
||||
echo " boost process = $with_boost_process"
|
||||
|
@ -129,11 +129,11 @@ class TestSecurityChecks(unittest.TestCase):
|
||||
(1, executable+': failed NOUNDEFS PIE CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
(1, executable+': failed PIE CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
(1, executable+': failed PIE CONTROL_FLOW'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
|
||||
(1, executable+': failed PIE'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-Wl,-bind_at_load','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-pie','-fstack-protector-all', '-fcf-protection=full', '-Wl,-fixup_chains']),
|
||||
(0, ''))
|
||||
else:
|
||||
# arm64 darwin doesn't support non-PIE binaries, control flow or executable stacks
|
||||
@ -143,7 +143,7 @@ class TestSecurityChecks(unittest.TestCase):
|
||||
(1, executable+': failed NOUNDEFS Canary'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-flat_namespace','-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
(1, executable+': failed NOUNDEFS'))
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-bind_at_load','-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
self.assertEqual(call_security_check(cc, source, executable, ['-fstack-protector-all', '-Wl,-fixup_chains']),
|
||||
(0, ''))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user