diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-04-14 16:17:20 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-06-24 13:44:18 -0400 |
commit | d346a5db02fc16263b44eb511fcb260265e3ef77 (patch) | |
tree | 063226819b893487e4d9026ff6623490a2ea1c67 /arch/m68k/lib | |
parent | 9e895ace5d82df8929b16f58e9f515f6d54ab82d (diff) |
m68k: Remove inline strcpy() and strcat() implementations
Gcc may replace calls to standard string functions by open code and/or
calls to other standard string functions. If the replacement function is
not available out-of-line, link errors will happen.
To avoid this, the out-of-line versions were provided by
arch/m68k/lib/string.c, but they were usually not linked in anymore as
typically none of its symbols are referenced by built-in code.
However, if any module would need them, they would not be available.
Hence remove the inline strcpy() and strcat() implementations, remove
arch/m68k/lib/string.c, and let the generic string library code handle it.
Impact on a typical kernel build seems minimal or nonexistent:
- .text : 0x00001000 - 0x002aac74 (2728 KiB)
- .data : 0x002ada48 - 0x00392148 ( 914 KiB)
+ .text : 0x00001000 - 0x002aacf4 (2728 KiB)
+ .data : 0x002adac8 - 0x00392148 ( 914 KiB)
See also commit e00c73ee05dc38ecaccced55d4f5fc58b0b769f7 ("m68k: Remove
inline strlen() implementation").
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/lib')
-rw-r--r-- | arch/m68k/lib/Makefile | 2 | ||||
-rw-r--r-- | arch/m68k/lib/string.c | 22 |
2 files changed, 1 insertions, 23 deletions
diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile index a9d782d34276..fcd8eb1d7c7d 100644 --- a/arch/m68k/lib/Makefile +++ b/arch/m68k/lib/Makefile | |||
@@ -6,7 +6,7 @@ | |||
6 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ | 6 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ |
7 | memcpy.o memset.o memmove.o | 7 | memcpy.o memset.o memmove.o |
8 | 8 | ||
9 | lib-$(CONFIG_MMU) += string.o uaccess.o | 9 | lib-$(CONFIG_MMU) += uaccess.o |
10 | lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += mulsi3.o divsi3.o udivsi3.o | 10 | lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += mulsi3.o divsi3.o udivsi3.o |
11 | lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += modsi3.o umodsi3.o | 11 | lib-$(CONFIG_CPU_HAS_NO_MULDIV64) += modsi3.o umodsi3.o |
12 | 12 | ||
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c deleted file mode 100644 index 4d61fa8a112c..000000000000 --- a/arch/m68k/lib/string.c +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file COPYING in the main directory of this archive | ||
4 | * for more details. | ||
5 | */ | ||
6 | |||
7 | #define __IN_STRING_C | ||
8 | |||
9 | #include <linux/module.h> | ||
10 | #include <linux/string.h> | ||
11 | |||
12 | char *strcpy(char *dest, const char *src) | ||
13 | { | ||
14 | return __kernel_strcpy(dest, src); | ||
15 | } | ||
16 | EXPORT_SYMBOL(strcpy); | ||
17 | |||
18 | char *strcat(char *dest, const char *src) | ||
19 | { | ||
20 | return __kernel_strcpy(dest + strlen(dest), src); | ||
21 | } | ||
22 | EXPORT_SYMBOL(strcat); | ||