From 63340ec1f7c23faff33eb2982971d737823a815c Mon Sep 17 00:00:00 2001 From: avdgrinten Date: Sun, 23 Oct 2016 15:28:17 +0200 Subject: [PATCH] Replace -nostdlib with -nodefaultlibs --- libc/dir.makefile | 2 +- libc/platform/x86_64-managarm/src/entry.cpp | 4 ---- libm/dir.makefile | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libc/dir.makefile b/libc/dir.makefile index a2efd57c..ad63c0c8 100644 --- a/libc/dir.makefile +++ b/libc/dir.makefile @@ -3,7 +3,7 @@ $c_BINDIR := $(BUILD_PATH)/$c/bin $c_LIBRARY_OBJS := -$c_LDFLAGS := -nostdlib +$c_LDFLAGS := -nodefaultlibs $c_TARGETS := clean-$c gen-$c install-$c install-headers-$c $($c_BINDIR)/libc.so diff --git a/libc/platform/x86_64-managarm/src/entry.cpp b/libc/platform/x86_64-managarm/src/entry.cpp index eefdb8db..9553a568 100644 --- a/libc/platform/x86_64-managarm/src/entry.cpp +++ b/libc/platform/x86_64-managarm/src/entry.cpp @@ -51,10 +51,6 @@ LibraryGuard::LibraryGuard() { __mlibc_reinitPosixPipe(); } -// __dso_handle is usually defined in crtbeginS.o -// Since we link with -nostdlib we have to manually define it here -__attribute__ (( visibility("hidden") )) void *__dso_handle; - extern "C" int main(int argc, char *argv[], char *env[]); // not declared in any header diff --git a/libm/dir.makefile b/libm/dir.makefile index ca8609e1..fb39ca53 100644 --- a/libm/dir.makefile +++ b/libm/dir.makefile @@ -5,7 +5,7 @@ $c_OBJDIR := $(BUILD_PATH)/$c/obj $c_LIBRARY_OBJS := $($c_OBJDIR)/dummy.o -$c_LDFLAGS := -nostdlib +$c_LDFLAGS := -nodefaultlibs $c_TARGETS := clean-$c install-$c $($c_BINDIR)/libm.so