This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2.25] powerpc: Avoid calling strncmp via PLT on GCC 7


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]