summaryrefslogtreecommitdiff
path: root/libc/string
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-20 00:03:55 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-20 00:03:55 +0000
commit430e386b9e69bf3a71c0e2cc06b7094d53ab6501 (patch)
tree0b17aafc4019eb779c9ed96bcf063c676a6b0a16 /libc/string
parent9b7d191055ade5069c6325fa857e007b4c658b14 (diff)
Strip all object files of all non global symbols and .note and
.comment, saving a lot of space in the resultant binaries... -Erik
Diffstat (limited to 'libc/string')
-rw-r--r--libc/string/Makefile6
-rw-r--r--libc/string/strsignal.c36
2 files changed, 39 insertions, 3 deletions
diff --git a/libc/string/Makefile b/libc/string/Makefile
index 0bdb925fd..39d9f0b5d 100644
--- a/libc/string/Makefile
+++ b/libc/string/Makefile
@@ -47,11 +47,15 @@ ar-target: $(OBJS)
$(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
$(MOBJ1): $(MSRC1)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
-$(OBJS): Makefile
+$(COBJS):
+ $(CC) $(CFLAGS) $< -c $*.c -o $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
clean:
rm -f *.[oa] *~ core
diff --git a/libc/string/strsignal.c b/libc/string/strsignal.c
index e1f7ab129..ff4f69923 100644
--- a/libc/string/strsignal.c
+++ b/libc/string/strsignal.c
@@ -8,8 +8,40 @@
#include <malloc.h>
#include <signal.h>
-extern __const char *__const _sys_siglist[_NSIG];
-extern __const char *__const sys_siglist[_NSIG];
+const char *const sys_siglist[NSIG] = {
+ "Unknown signal",
+ "Hangup",
+ "Interrupt",
+ "Quit",
+ "Illegal instruction",
+ "Trace/breakpoint trap",
+ "IOT trap/Abort",
+ "Bus error",
+ "Floating point exception",
+ "Killed",
+ "User defined signal 1",
+ "Segmentation fault",
+ "User defined signal 2",
+ "Broken pipe",
+ "Alarm clock",
+ "Terminated",
+ "Stack fault",
+ "Child exited",
+ "Continued",
+ "Stopped (signal)",
+ "Stopped",
+ "Stopped (tty input)",
+ "Stopped (tty output)",
+ "Possible I/O",
+ "CPU time limit exceeded",
+ "File size limit exceeded",
+ "Virtual time alarm",
+ "Profile signal",
+ "Window size changed",
+ "File lock lost",
+ "Power failure",
+ "Unused signal"
+};
/********************** Function strsignal ************************************/