aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/libinit.go
AgeCommit message (Collapse)Author
5 daysruntime: fix AIX library initializationqmuntal
On AIX, libInit passes a function descriptor instead of the function pointer to pthread_create. This is a regression from CL 706417. Change-Id: I660175eb992a41ef61b1927c51392887a724cd76 Reviewed-on: https://go-review.googlesource.com/c/go/+/761780 Reviewed-by: Ian Lance Taylor <iant@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: David Chase <drchase@google.com>
13 daysruntime: use asmcgocall_no_g in libInitMichael Pratt
libInit runs before rt0_go, which is where TLS setup occurs. Thus the contents of the TLS may not be defined, so the g lookup in asmcgocall is not safe. Concretely, android-386 c-shared builds crash without this change because asmcgocall reads an invalid non-zero g from the TLS. Move libInit to a file limited to GOARCH that support c-archive or c-shared so that only those require asmcgocall_no_g. In addition, loong64 and s390x need asmcgocall_no_g implementations. Fixes #78480. Cq-Include-Trybots: luci.golang.try:gotip-linux-loong64,gotip-linux-s390x Change-Id: I175e6d020339af89c9b576535d79c1e76a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/761541 Reviewed-by: Quim Muntal <quimmuntal@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>