kill IN_STRING_C (fwd)
Subsystems (2)
PATCH 1/1 kill IN_STRING_C (fwd)
The patch forwarded below still applies and compiles against 2.6.10-rc3-mm1.
With -ffreestanding it shouldn't even cause any problems in case we'd one day drop the -fno-unit-at-a-time (which caused the problems Andi dobserved on X86_64).
Please apply.
----- Forwarded message from Adrian Bunk <[email protected]> -----
Date: Sun, 7 Nov 2004 15:24:45 +0100
From: Adrian Bunk <[email protected]>
To: Andi Kleen <[email protected]>
Cc: [email protected]
Subject: [2.6 patch] kill IN_STRING_C
Hi Andi,
some months ago, you invented a IN_STRING_C with the following comment:
<-- snip -->
gcc 3.4 optimizes sprintf(foo,"%s",string) into strcpy.
Unfortunately that isn't seen by the inliner and linux/i386 has no out-of-line strcpy so you end up with a linker error.
This patch adds out of line copies for most string functions to avoid this.
...
<-- snip -->
I tried 2.6.10-rc1-mm3 with gcc 3.4.2 and the patch below and didn't observe the problems you described.
Can you still reproduce this problem?
If not, I'll suggest to apply the patch below which saves a few kB in lib/string.o .
include/asm-i386/string.h renamed from include/asm-i386/string.h.old +0 -3
@@ -25,7 +25,6 @@/* AK: in fact I bet it would be better to move this stuff all out of line. */ -#if !defined(IN_STRING_C )#define __HAVE_ARCH_STRCPYstatic inline char *strcpy (char * dest,const char *src)
@@ -180,8 +179,6 @@return __res; } -#endif -#define __HAVE_ARCH_STRLENstatic inline size_t strlen (const char * s) {
lib/string.c renamed from lib/string.c.old +0 -2
@@ -19,8 +19,6 @@* - Kissed strtok() goodbye */ -#define IN_STRING_C 1 -#include <linux/types.h> #include <linux/string.h> #include <linux/ctype.h>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----