Initial crt0 implementation

Builds but cannot link, missing a lot of symbols
This commit is contained in:
topjohnwu
2024-02-22 16:50:18 -08:00
parent 7e9abe6e90
commit 6d79de7d71
12 changed files with 865 additions and 18 deletions

View File

@@ -4,10 +4,20 @@ APP_CFLAGS := -Wall -Oz -fomit-frame-pointer -flto
APP_LDFLAGS := -flto
APP_CPPFLAGS := -std=c++20
APP_STL := none
APP_PLATFORM := android-23
APP_PLATFORM := android-26
APP_THIN_ARCHIVE := true
APP_STRIP_MODE := none
# magiskinit uses crt0
ifdef B_INIT
# Disable all security and debugging features
APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -U_FORTIFY_SOURCE
# Override output folder to make sure all dependencies are rebuilt with new CFLAGS
NDK_APP_OUT := ./obj/init
endif
# Busybox should use stock libc.a
ifdef B_BB
APP_PLATFORM := android-26