This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2.25] powerpc: Avoid calling strncmp via PLT on GCC 7
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- Cc: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, <libc-alpha at sourceware dot org>, <segher at kernel dot crashing dot org>, <siddhesh at sourceware dot org>
- Date: Mon, 16 Jan 2017 21:33:47 +0000
- Subject: Re: [PATCH 2.25] powerpc: Avoid calling strncmp via PLT on GCC 7
- Authentication-results: sourceware.org; auth=none
- References: <1484573359-7879-1-git-send-email-tuliom@linux.vnet.ibm.com> <1484599243.15035.1.camel@linux.vnet.ibm.com>
On Mon, 16 Jan 2017, Aaron Sawdey wrote:
> Tulio,
> I'll be posting an updated version of that patch shortly that
> addresses the issues you were seeing. However it adds builtin expansion
> of both strncmp and strcmp so I think your patch needs to add both to
> powerpc/symbol-hacks.h. Here is what I get from check-localplt with
> gcc7 plus this patch:
>
> cat /home/sawdey/src/glibc/build/elf/check-localplt.out
> Extra PLT reference: libc.so: strcmp
> Extra PLT reference: libc.so: strncmp
On further consideration: I don't think addressing this in GCC should be
hard, can't you just look up something like DECL_ASSEMBLER_NAME
(builtin_decl_explicit (BUILT_IN_STRNCMP)) or similar and use that instead
of hardcoded strncmp when generating code?
--
Joseph S. Myers
joseph@codesourcery.com