[git commit 0_9_30] regex: call memcpy() ourselves

Mike Frysinger vapier at gentoo.org
Thu Dec 17 12:42:26 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=9fba128064075335d59d8c943b127fedcd4d6abd
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30

Call the hidden memcpy() ourselves otherwise gcc will emit a call to the
public memcpy() which goes through the PLT.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/misc/regex/regex_old.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index a8a8cc7..309799a 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -8167,7 +8167,8 @@ regexec (
   int len = strlen (string);
   boolean want_reg_info = !preg->no_sub && nmatch > 0;
 
-  private_preg = *preg;
+  /* use hidden memcpy() ourselves rather than gcc calling public memcpy() */
+  memcpy(&private_preg, preg, sizeof(*preg));
 
   private_preg.not_bol = !!(eflags & REG_NOTBOL);
   private_preg.not_eol = !!(eflags & REG_NOTEOL);
-- 
1.6.3.3



More information about the uClibc-cvs mailing list