[PATCH] Improve performance of strcat
Joseph S. Myers
joseph@codesourcery.com
Thu Aug 7 13:58:00 GMT 2014
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
More information about the Libc-alpha
mailing list