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:

> In this case I get "ASM: *my_strncmp" from the debug code in the
> compiler when it expands strncmp. But the preprocessed code for
> getttyent.c does not have an __asm directive to tell me this.

It should have such a directive, resulting from the

libc_hidden_builtin_proto (strncmp)

in include/string.h (that is, there should be a first strncmp declaration 
without the asm, and a later one with the asm).

> I'm starting to believe this is possible but I think the glibc code
> doesn't give all the information needed for this yet. Also I can't
> quite see why symbol-hacks.h redefinitions of memcmp/memmov/memset is
> needed unless the compiler is not looking up this asm name elsewhere.

Those are generated without reference to a built-in function at all, which 
is different from the case where a file actually calls strncmp.

-- 
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]