From b74c5c8fb4de3b2847bc942e57dcf8f0dea705be Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Wed, 13 May 2015 23:58:39 +0200 Subject: fixed libc and 'userspace' --- userspace/sys/Makefile | 41 ++++++++++++++++++++++------------------- userspace/sys/crt0.o | Bin 0 -> 660 bytes userspace/sys/libfool.a | Bin 0 -> 7420 bytes userspace/sys/sys.c | 2 +- userspace/sys/sys.o | Bin 0 -> 3744 bytes userspace/sys/syscalls.o | Bin 0 -> 2948 bytes userspace/sys/termios.h | 2 ++ 7 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 userspace/sys/crt0.o create mode 100644 userspace/sys/libfool.a create mode 100644 userspace/sys/sys.o create mode 100644 userspace/sys/syscalls.o create mode 100644 userspace/sys/termios.h (limited to 'userspace/sys') diff --git a/userspace/sys/Makefile b/userspace/sys/Makefile index 5e217fa..cdcd3b7 100644 --- a/userspace/sys/Makefile +++ b/userspace/sys/Makefile @@ -1,29 +1,32 @@ +SYSROOT=/home/miguel/opt/foolos CC=i686-foolos-gcc CFLAGS= -CFLAGS+=-I../.. CFLAGS+=-w - +CFLAGS+=-I../.. +CFLAGS+=-gstabs OBJECTS=sys.o syscalls.o crt0.o -full: clean library_install crt_install + +full: clean library_install crt_install header_install + all: $(OBJECTS) -library_install: all - mkdir temp - mv *.o temp - cp /home/miguel/temp/sysroot/usr/lib/libc.a . - ar x libc.a - rm libc.a -# rm lib_a-environ.o - cp temp/sys*.o . - ar rs libc.a *.o - mv libc.a /home/miguel/temp/sysroot/usr/lib/libc.a - cp temp/*.o . - rm temp -rf - -crt_install: all - cp crt0.o /home/miguel/temp/sysroot/usr/lib/ +crt0.o: crt0.S + +crt_install: crt0.o + cp crt0.o $(SYSROOT)/usr/lib/ + + +header_install: + cp termios.h $(SYSROOT)/usr/include/sys/ + +libfool.a: sys.o syscalls.o + ar rcs libfool.a sys.o syscalls.o + +library_install: libfool.a + cp libfool.a $(SYSROOT)/usr/lib/ + clean: - -rm *.o + -rm *.o *.a diff --git a/userspace/sys/crt0.o b/userspace/sys/crt0.o new file mode 100644 index 0000000..db292b0 Binary files /dev/null and b/userspace/sys/crt0.o differ diff --git a/userspace/sys/libfool.a b/userspace/sys/libfool.a new file mode 100644 index 0000000..31fee46 Binary files /dev/null and b/userspace/sys/libfool.a differ diff --git a/userspace/sys/sys.c b/userspace/sys/sys.c index 25dff7b..adf6ff9 100644 --- a/userspace/sys/sys.c +++ b/userspace/sys/sys.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include // CODE FOR Stack Smashing Protector, TODO: MOVE / and do not duplicate diff --git a/userspace/sys/sys.o b/userspace/sys/sys.o new file mode 100644 index 0000000..14413b2 Binary files /dev/null and b/userspace/sys/sys.o differ diff --git a/userspace/sys/syscalls.o b/userspace/sys/syscalls.o new file mode 100644 index 0000000..371b8af Binary files /dev/null and b/userspace/sys/syscalls.o differ diff --git a/userspace/sys/termios.h b/userspace/sys/termios.h new file mode 100644 index 0000000..ff1e838 --- /dev/null +++ b/userspace/sys/termios.h @@ -0,0 +1,2 @@ +typedef uint32_t speed_t; +typedef uint32_t DIR; -- cgit v1.2.3