feat: implement baremetal GC

fix: pthread gc

fix: xiao-esp32c3 symbol

refactor: use clite memset instead of linking

fix: stack top symbol
This commit is contained in:
Haolan
2025-09-16 09:39:23 +08:00
parent 2f65c98eb4
commit 812dfd45c9
14 changed files with 707 additions and 18 deletions

View File

@@ -753,7 +753,6 @@ func compileExtraFiles(ctx *context, verbose bool) ([]string, error) {
}
func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, global llssa.Package, outputPath string, verbose bool) error {
needRuntime := false
needPyInit := false
pkgsMap := make(map[*packages.Package]*aPackage, len(pkgs))
@@ -998,6 +997,10 @@ define weak void @runtime.init() {
ret void
}
define weak void @initGC() {
ret void
}
; TODO(lijie): workaround for syscall patch
define weak void @"syscall.init"() {
ret void
@@ -1009,6 +1012,7 @@ define weak void @"syscall.init"() {
_llgo_0:
store i32 %%0, ptr @__llgo_argc, align 4
store ptr %%1, ptr @__llgo_argv, align 8
call void @initGC()
%s
%s
%s