Skip to content

embed: leak ffi symbol #1570

@luoliwoshang

Description

@luoliwoshang
cl/_testgo/abimethod on  feat/esp32c3-emulator-testgo [$?] via 🐹 v1.24.10 took 12s 
❯ llgo run -target=esp32c3 .
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
WARNING: Using LLGO root for devel: /Users/zhangzhiyang/Documents/Code/goplus/llgo
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'prep_cif.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'types.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'raw_api.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'java_raw_api.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'closures.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'tramp.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'ffi.o' is neither ET_REL nor LLVM bitcode
ld.lld: warning: /opt/homebrew/Cellar/libffi/3.5.2/lib/libffi.a: archive member 'sysv.o' is neither ET_REL nor LLVM bitcode
ld.lld: error: undefined symbol: faccessat
>>> referenced by syscall
>>>               9cbd014dd93f26fc9085bd1be09a6ef49f51e600b0cfe3543b62469d4bc89707-d-3240745933.o:(syscall.Faccessat) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/syscall/a71b5caeda1fcb9153e9b02b57fbc2780726b7e7006703b26deb312316a1880a.a

ld.lld: error: undefined symbol: getrlimit
>>> referenced by syscall
>>>               9cbd014dd93f26fc9085bd1be09a6ef49f51e600b0cfe3543b62469d4bc89707-d-3240745933.o:(syscall.Getrlimit) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/syscall/a71b5caeda1fcb9153e9b02b57fbc2780726b7e7006703b26deb312316a1880a.a

ld.lld: error: undefined symbol: setrlimit
>>> referenced by syscall
>>>               9cbd014dd93f26fc9085bd1be09a6ef49f51e600b0cfe3543b62469d4bc89707-d-3240745933.o:(syscall.setrlimit) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/syscall/a71b5caeda1fcb9153e9b02b57fbc2780726b7e7006703b26deb312316a1880a.a

ld.lld: error: undefined symbol: ffi_closure_alloc
>>> referenced by libffi.c
>>>               6375f4f8097ce5bcada98b0c89d7db5ff58711c7f616bd44c0ea23334be1888d-dlibffi.c.o:(llog_ffi_closure_alloc) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/github.com/goplus/llgo/runtime/internal/clite/ffi/e0d1487dd3ebc4fb95537de60c3404ed4272f36bc7b8f37a315d2364e336836f.a

ld.lld: error: undefined symbol: __sigsetjmp
>>> referenced by reflect
>>>               c60ee5083027f17d467df0769f69de07e45c4f0a762679d9aa4d5b11d27a6fa5-d-1492385551.o:(reflect.closureOf) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/reflect/9698261a9129883b00575fecba1e70381c27497f3ad6e0d5842bb304ed55251e.a
>>> referenced by fmt
>>>               6875765509ccf6e9b5221040825b2f55a5febb36dc73e576349f4f6e9a630e51-d-4018335522.o:(fmt.(*pp).handleMethods) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/fmt/cd8efff8d2a5537644c7ceb5e2b5f0dd486258ab575ea66a7478b86c621a614c.a
>>> referenced by reflect
>>>               c60ee5083027f17d467df0769f69de07e45c4f0a762679d9aa4d5b11d27a6fa5-d-1492385551.o:(reflect.FuncOf) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/reflect/9698261a9129883b00575fecba1e70381c27497f3ad6e0d5842bb304ed55251e.a
>>> referenced 4 more times

ld.lld: error: undefined symbol: ldexp
>>> referenced by math
>>>               db9f4f30b49ecaaab457693ef2483f3ab670a37466412f6642649a65217b7035-d-2600216859.o:(math.Ldexp) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/math/e6c5abec0fd3f471b3f32d63ee64e922d2a4a3724b723eac7e9aa9c0fd4cd623.a

ld.lld: error: undefined symbol: ffi_call
>>> referenced by ffi
>>>               5310370bbf42f1f1a9dacc53852a9faf6fbab5695302458a4cf638508780443d-d-372823417.o:(github.com/goplus/llgo/runtime/internal/ffi.Call) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/github.com/goplus/llgo/runtime/internal/ffi/353fdb810a77553f228b21df47c77cfa503f1f3ecd5810818e28535667205465.a

ld.lld: error: undefined symbol: ffi_prep_closure_loc
>>> referenced by ffi
>>>               5310370bbf42f1f1a9dacc53852a9faf6fbab5695302458a4cf638508780443d-d-372823417.o:(github.com/goplus/llgo/runtime/internal/ffi.(*Closure).Bind) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/github.com/goplus/llgo/runtime/internal/ffi/353fdb810a77553f228b21df47c77cfa503f1f3ecd5810818e28535667205465.a

ld.lld: error: undefined symbol: ffi_prep_cif
>>> referenced by ffi
>>>               5310370bbf42f1f1a9dacc53852a9faf6fbab5695302458a4cf638508780443d-d-372823417.o:(github.com/goplus/llgo/runtime/internal/ffi.NewSignature) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/github.com/goplus/llgo/runtime/internal/ffi/353fdb810a77553f228b21df47c77cfa503f1f3ecd5810818e28535667205465.a

ld.lld: error: undefined symbol: __atomic_compare_exchange_4
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.CompareAndSwapInt32) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.CompareAndSwapPointer) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.(*Value).Store) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a

ld.lld: error: undefined symbol: __atomic_load_4
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.(*Value).Store) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a
>>> referenced by abimethod
>>>               18fe0aff0834aa1ceb1fcdc53c2747135130f713f58253bcf613f9e5429ac790-d-4045474505.o:(github.com/goplus/llgo/cl/_testgo/abimethod.(*Pointer[any]).Load) in archive /var/folders/5j/sgtxqmbn1hbdqtgx5kkp6y700000gn/T/pkg-2413461029.a
>>> referenced by sync
>>>               7c19e1c93c749c599f002bc8cba92ea18497414395eb939a3331ac5fc5f0c30d-d-1599801929.o:(sync.(*Mutex).ensureInit) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/ac0bd2353a3bca213f14a572664ac630485afeb0d31a8aba32daf8e1f3d70125.a
>>> referenced 2 more times

ld.lld: error: undefined symbol: __atomic_store_4
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.(*Value).Store) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a
>>> referenced by atomic
>>>               a1f07e08ab4f19f621e742ffe65221b398d2ca2922146cd6d7fedb98551792d1-d-4141951954.o:(sync/atomic.(*Value).Store) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/atomic/29909d355e4558d77f9c96510d9e9924435064f32ae6743f4be4bdc94483ff8b.a
>>> referenced by abimethod
>>>               18fe0aff0834aa1ceb1fcdc53c2747135130f713f58253bcf613f9e5429ac790-d-4045474505.o:(github.com/goplus/llgo/cl/_testgo/abimethod.(*Pointer[any]).Store) in archive /var/folders/5j/sgtxqmbn1hbdqtgx5kkp6y700000gn/T/pkg-2413461029.a
>>> referenced 3 more times

ld.lld: error: undefined symbol: __atomic_exchange_4
>>> referenced by sync
>>>               7c19e1c93c749c599f002bc8cba92ea18497414395eb939a3331ac5fc5f0c30d-d-1599801929.o:(sync/atomic.(*Pointer[any]).Swap) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/sync/ac0bd2353a3bca213f14a572664ac630485afeb0d31a8aba32daf8e1f3d70125.a

ld.lld: error: undefined symbol: __atomic_fetch_or_4
>>> referenced by runtime
>>>               2271fefdde95652a8b645cae462ee2ab97680915758bf6971b02c58474434b0e-d-1120556481.o:(github.com/goplus/llgo/runtime/internal/runtime.mapiterinit) in archive /Users/zhangzhiyang/Library/Caches/llgo/build/riscv32-esp-elf-ilp32/github.com/goplus/llgo/runtime/internal/runtime/f4ef218850abcf26c2f2a7b0350c880ac0fbc8abc87513072024f7b20a82ff43.a

ld.lld: error: region DRAM overflowed by .data and .bss sections
ld.lld: error: region DRAM overflowed by .data and .bss sections
ld.lld: error: region DRAM overflowed by .data and .bss sections
ld.lld: error: region DRAM overflowed by .data and .bss sections
exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions