Open
Description
What version of Go are you using (go version)?
go version go1.22.1 darwin/arm64
What did you do?
First we build a go project with gomobile (https://github.com/xxf098/go-tun2socks-build) as a static library,
then linker this static library into our IOS project.
What did you see happen?
lld crashed.
I found crash position of lld:
SymtabSectionImpl<LP>::writeTo
of file lld/MachO/SyntheticSections.cpp
Crashed on this line: nList->n_sect = defined->isec()->parent->index;
I debug llvm found crash symbol is arm64_ios_lib.ptr
After we remove ldflags "-Wl,-fixup_chains" ,or modify llvm code crash not happed.
What did you expect to see?
The ios static library compiled by gomobile works fine with clang link parameter "-Wl,-fixup_chains".