[PATCH] Add hidden visibility to internal function prototypes

H.J. Lu hjl.tools@gmail.com
Thu Aug 17 18:25:00 GMT 2017


On Thu, Aug 17, 2017 at 5:40 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Aug 17, 2017 at 5:34 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 08/17/2017 02:22 PM, H.J. Lu wrote:
>>> Add hidden visibility to internal function prototypes to allow direct
>>> access to internal functions within libc.a without using GOT when the
>>> compiler defaults to -fPIE.
>>>
>>> Size comparison of elf/ldconfig when the compiler defaults to -fPIE:
>>
>> This is for static linking, right?
>>
>> Is there a reason to restrict this to PIE builds?  Why not use hidden
>> visibility unconditionally?
>>
>
> Yes, there is only used for static PIE build and we can replace
> BUILD_PIE_DEFAULT with !defined SHARED.  But it makes
> no difference for non-PIE static build.
>

Here is the updated patch to add hidden visibility to internal function
prototypes used within libc.a.

Tested on x86-64 and i686 with and without GCC defaulting to PIE.

OK for master?


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-hidden-visibility-to-internal-function-prototype.patch
Type: text/x-patch
Size: 2070 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170817/fa7a9445/attachment.bin>


More information about the Libc-alpha mailing list