[PATCH] libc.so: Replace nscd_hash.os with libc-nscd_hash.os [BZ #22459]

H.J. Lu hjl.tools@gmail.com
Mon Nov 20 13:02:00 GMT 2017


On Mon, Nov 20, 2017 at 1:02 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 11/19/2017 08:44 PM, H.J. Lu wrote:
>>
>> nscd_hash.os is needed both libc.so as well as nscd.  Since nscd_hash.os
>> is compiled as the part of nscd, when -fstack-protector-all is used,
>> nscd_hash.os calls __stack_chk_fail via PLT, which leads to
>>
>> FAIL: elf/check-localplt
>> Extra PLT reference: libc.so: __stack_chk_fail
>>
>> This patch replaces nscd_hash.os with libc-nscd_hash.os in libc_pic.a
>> to avoid calling __stack_chk_fail via PLT inside of libc.so.
>>
>> Any comments?
>
>
> Considering that nscd/nscd_hash.c is itself another #include wrapper, I
> think it is time to clean this up.
>
> The hash function algorithm is already part of the public ABI because the
> nscd mappings require it, so we might as well export it, which is
> implemented in the attached patch.

Do we need to export it in GLIBC_2.27 space?  I prefer GLIBC_PRIVATE.
Otherwise, it looks good to me.

Thanks.

-- 
H.J.



More information about the Libc-alpha mailing list