summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/Makefile2
-rw-r--r--payloads/libpayload/libc/string.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index f2f87abc53..8d28c2dcca 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -61,7 +61,7 @@ include $(PLATFORM-y) $(BUILD-y)
INCLUDES := -I./include
INCLUDES += -I$(shell $(CC) -print-search-dirs | head -n 1 | cut -d' ' -f2)include
-CFLAGS := -Werror -fno-stack-protector -nostdinc $(INCLUDES)
+CFLAGS := -Werror -Os -fno-stack-protector -nostdinc $(INCLUDES)
libpayload.a: $(TARGETS-y)
$(AR) rc $@ $(TARGETS-y)
diff --git a/payloads/libpayload/libc/string.c b/payloads/libpayload/libc/string.c
index c9f0603387..f71d1c3af6 100644
--- a/payloads/libpayload/libc/string.c
+++ b/payloads/libpayload/libc/string.c
@@ -142,6 +142,11 @@ char *strncpy(char *d, const char *s, int n)
return d;
}
+char *strcpy(char *d, const char *s)
+{
+ return strncpy(d, s, strlen(s));
+}
+
char *strncat(char *d, const char *s, int n)
{
char *p = d + strlen(d);