This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 08/12] De-PLTize __stack_chk_fail internal calls within libc.so.
On 15 Dec 2016, nix@esperi.org.uk verbalised:
> diff --git a/sysdeps/generic/symbol-hacks.h b/sysdeps/generic/symbol-hacks.h
> index 36908b5..15ff56a 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 STACK_PROTECTOR_LEVEL && STACK_PROTECTOR_LEVEL > 0
> asm ("__stack_chk_fail = __stack_chk_fail_local");
> +# endif
> #endif
This causes (minor) problems on SPARC:
Extra PLT reference: libc.so: __stack_chk_fail
Whether we can disregard this, I don't know, but it does feel wrong.