Initial crt0 implementation

Builds but cannot link, missing a lot of symbols
This commit is contained in:
topjohnwu
2024-02-22 21:22:27 -08:00
parent 7e9abe6e90
commit 6d79de7d71
12 changed files with 865 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := crt0
# Manually link the compiler runtime library
LOCAL_compiler_rt := $(shell $(TARGET_CC) -target $(LLVM_TRIPLE)$(TARGET_PLATFORM_LEVEL) --print-libgcc-file-name)
LOCAL_EXPORT_LDFLAGS := -static -nostartfiles -nodefaultlibs $(LOCAL_compiler_rt)
LOCAL_SRC_FILES := \
nolibc.c
include $(BUILD_STATIC_LIBRARY)