[PATCH] Enable hidden visibility in libc.a compiled with PIE
Szabolcs Nagy
szabolcs.nagy@arm.com
Mon Aug 21 16:31:00 GMT 2017
On 08/08/17 17:40, H.J. Lu wrote:
> When building libc.a with PIE, enable hidden visibility to allow direct
> access to definitions within libc.a without using GOT.
...
> -#if defined SHARED || defined LIBC_NONSHARED
> +#if defined SHARED || defined LIBC_NONSHARED \
> + || (BUILD_PIE_DEFAULT && IS_IN (libc))
> # define attribute_hidden __attribute__ ((visibility ("hidden")))
btw what happens if this is enabled for non-pie libc.a ?
i'd expect that to work too (it prevents some symbol
interpositions?)
More information about the Libc-alpha
mailing list