From 3aa584adcfa3a1ed4292d99e5fa2a6bc578f8b80 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Oct 2009 01:04:07 -0400 Subject: regex: call memcpy() ourselves 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 --- libc/misc/regex/regex_old.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libc/misc/regex') diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index 3550698d3..cbfb7ae7c 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -8085,7 +8085,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); -- cgit v1.2.3