diff --git a/LibC/entry.cpp b/LibC/entry.cpp index 37bb9942ae4..c84b819b029 100644 --- a/LibC/entry.cpp +++ b/LibC/entry.cpp @@ -2,7 +2,7 @@ extern "C" int main(int, char**); -extern "C" int elf_entry() +extern "C" int _start() { // FIXME: Pass appropriate argc/argv. main(0, nullptr); diff --git a/Userland/.gitignore b/Userland/.gitignore new file mode 100644 index 00000000000..b28508b26e8 --- /dev/null +++ b/Userland/.gitignore @@ -0,0 +1,2 @@ +id +*.o diff --git a/Userland/Makefile b/Userland/Makefile index 9472b1d436a..89aaa30237b 100644 --- a/Userland/Makefile +++ b/Userland/Makefile @@ -1,6 +1,9 @@ OBJS = \ id.o +APPS = \ + id + ARCH_FLAGS = STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib USERLAND_FLAGS = -ffreestanding -fno-stack-protector -fno-ident @@ -15,9 +18,12 @@ CXXFLAGS = $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(USERLAND_FLAGS) $(FLAVOR_FLA CXX = g++ LD = ld AR = ar -LDFLAGS = -T linker.ld --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now +LDFLAGS = --strip-debug -melf_i386 --gc-sections --build-id=none -z norelro -z now -all: $(OBJS) +all: $(OBJS) $(APPS) + +id: id.o + $(LD) -o $@ $(LDFLAGS) $< ../LibC/LibC.a .cpp.o: @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<