This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Improve performance of strcat
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 7 Aug 2014 13:57:55 +0000
- Subject: Re: [PATCH] Improve performance of strcat
- Authentication-results: sourceware.org; auth=none
- References: <000101cfb243$63a5b1b0$2af11510$ at com> <53E37FB4 dot 5020303 at linux dot vnet dot ibm dot com>
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