This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 12/15/2016 03:15 PM, Nix wrote:
Possible fix, untested:
diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
index 36908b5..0679354 100644
--- a/sysdeps/generic/symbol-hacks.h
+++ b/sysdeps/generic/symbol-hacks.h
@@ -7,5 +7,7 @@ asm ("memcpy = __GI_memcpy");
/* -fstack-protector generates calls to __stack_chk_fail, which need
similar adjustments to avoid going through the PLT. */
+#if defined __SSP__ || defined __SSP_ALL__ || defined __SSP_STRONG__
asm ("__stack_chk_fail = __stack_chk_fail_local");
#endif
+#endif
The condition looks rather brittle. What if GCC grows an -fstack-protector-light switch and __SSP_LIGHT__ macro?
I wonder if it's better to add something to $(no-stack-protector) and use that in the conditional.
Thanks, Florian
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |