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] Improve performance of strcat


On Thu, 7 Aug 2014, Adhemerval Zanella wrote:

> > +  strcpy (dest + strlen (dest), src);
> 
> Should it be __strcpy/__strlen ?

As explained in recent discussion, there is no need for use of __* when 
calling functions in ISO C90 that haven't been removed in more recent 
standards (or more generally, when calling function A from function B if 
function A is in all the supported standards containing function B).  You 
do need *_hidden_* for PLT avoidance, but include/string.h already has 
libc_hidden_builtin_proto calls for strcpy and strlen (and if any 
definition of those functions is missing the corresponding 
libc_hidden_builtin_def, there will be an obvious error linking glibc).

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