-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile, cmd/link: c-shared not supported on linux/loong64 #53301
Comments
@golang/loong64 |
I think for producing shared objects, some kind of real relocation record support is needed, but unfortunately the current stack-machine-based relocations of LoongArch are poorly supported at best. I think it's probably better to wait until loongson/LoongArch-Documentation#50 is finalized and merged. |
有任何进展吗?loongson/LoongArch-Documentation#57 已经关闭 |
I think it's better to write in English... Translation for non-Chinese speakers:
I don't know if the Loongson people have plans for this cycle; pinging others in @golang/loong64. I myself don't think I have enough time to make any promise though. |
Change https://go.dev/cl/425475 mentions this issue: |
Change https://go.dev/cl/425474 mentions this issue: |
Change https://go.dev/cl/425477 mentions this issue: |
Change https://go.dev/cl/425478 mentions this issue: |
Change https://go.dev/cl/425479 mentions this issue: |
Change https://go.dev/cl/425476 mentions this issue: |
Update: it looks like this is now being actively worked on by other people in @golang/loong64, and seems to target go1.21. |
These c-shared related CLs are follow up of CLs 455016, 455017, 455018. Here we follow the LoongArch ELF psABI v2 standard, which requires the support of the PCALAU12I instruction. Updates golang#53301 Updates golang#58784 Change-Id: I7f1ddbf3b2470d610f12069d147aa9b3a6a96f32
Updates golang#53301 Updates golang#58784 Change-Id: I78a90155b17d7d8be04e8ba5e4d75e27d15b3311
…ns on loong64 Updates golang#53301 Updates golang#58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742
Updates golang#53301 Updates golang#58784 Change-Id: I4b726b0cc09e5e008b92b3e0a8a7bdd103b062c4
Updates golang#53301 Updates golang#58784 Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018
Updates golang#53301 Updates golang#58784 Change-Id: I68357e420f0920d6609d399cee40cd44af018385
These c-shared related CLs are follow up of CLs 455016, 455017, 455018. Here we follow the LoongArch ELF psABI v2 standard, which requires the support of the PCALAU12I instruction. Updates golang#53301 Updates golang#58784 Change-Id: I7f1ddbf3b2470d610f12069d147aa9b3a6a96f32
Updates golang#53301 Updates golang#58784 Change-Id: I78a90155b17d7d8be04e8ba5e4d75e27d15b3311
…ns on loong64 Updates golang#53301 Updates golang#58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742
Updates golang#53301 Updates golang#58784 Change-Id: I4b726b0cc09e5e008b92b3e0a8a7bdd103b062c4
…ture and test on loong64 Linux kernel on loong64 has no Dup2 syscall support, so we use Dup3 to replace it like arm64 and riscv64. Updates golang#53301 Updates golang#58784 Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018
Updates golang#53301 Updates golang#58784 Change-Id: I78a90155b17d7d8be04e8ba5e4d75e27d15b3311
…ns on loong64 Updates golang#53301 Updates golang#58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742
Updates golang#53301 Updates golang#58784 Change-Id: I4b726b0cc09e5e008b92b3e0a8a7bdd103b062c4
…ture and test on loong64 Linux kernel on loong64 has no Dup2 syscall support, so we use Dup3 to replace it like arm64 and riscv64. Updates golang#53301 Updates golang#58784 Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018
These c-shared related CLs are follow up of CLs 455016, 455017, 455018. Here we follow the LoongArch ELF psABI v2 standard, which requires the support of the PCALAU12I instruction. Updates #53301 Updates #58784 Change-Id: I7f1ddbf3b2470d610f12069d147aa9b3a6a96f32 Reviewed-on: https://go-review.googlesource.com/c/go/+/425474 Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
These c-shared related CLs are follow up of CLs 455016, 455017, 455018. Here we follow the LoongArch ELF psABI v2 standard, which requires the support of the PCALAU12I instruction. Updates golang#53301 Updates golang#58784 Change-Id: I7f1ddbf3b2470d610f12069d147aa9b3a6a96f32
…ns on loong64 Updates golang#53301 Updates golang#58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742
…for --buildmode=c-shared on loong64 Updates #53301 Updates #58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742 Reviewed-on: https://go-review.googlesource.com/c/go/+/425476 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Run-TryBot: WANG Xuerui <git@xen0n.name> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: WANG Xuerui <git@xen0n.name>
…ture and test on loong64 Linux kernel on loong64 has no Dup2 syscall support, so we use Dup3 to replace it like arm64 and riscv64. Updates #53301 Fixes #58784 Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018 Reviewed-on: https://go-review.googlesource.com/c/go/+/425478 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: WANG Xuerui <git@xen0n.name> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: xiaodong liu <teaofmoli@gmail.com> Reviewed-by: WANG Xuerui <git@xen0n.name>
These c-shared related CLs are follow up of CLs 455016, 455017, 455018. Here we follow the LoongArch ELF psABI v2 standard, which requires the support of the PCALAU12I instruction. Updates golang#53301 Updates golang#58784 Change-Id: I7f1ddbf3b2470d610f12069d147aa9b3a6a96f32 Reviewed-on: https://go-review.googlesource.com/c/go/+/425474 Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: WANG Xuerui <git@xen0n.name> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> (cherry picked from commit 80eeec6)
…, cmd/link: add support for --buildmode=c-shared on loong64 Updates golang#53301 Updates golang#58784 Change-Id: Ifcb40871f609531dfd8b568db9ac14da9b451742 Reviewed-on: https://go-review.googlesource.com/c/go/+/425476 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Run-TryBot: WANG Xuerui <git@xen0n.name> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: WANG Xuerui <git@xen0n.name> (cherry picked from commit 1f908bd)
…red: enable c-shared feature and test on loong64 Linux kernel on loong64 has no Dup2 syscall support, so we use Dup3 to replace it like arm64 and riscv64. Updates golang#53301 Fixes golang#58784 Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018 Reviewed-on: https://go-review.googlesource.com/c/go/+/425478 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: WANG Xuerui <git@xen0n.name> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: xiaodong liu <teaofmoli@gmail.com> Reviewed-by: WANG Xuerui <git@xen0n.name> (cherry picked from commit b3a194a)
Change https://go.dev/cl/507815 mentions this issue: |
Change https://go.dev/cl/510916 mentions this issue: |
Fixes #53301 Change-Id: Id447d57d43b12c3748267295928d45a089549340 Reviewed-on: https://go-review.googlesource.com/c/go/+/507815 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Bypass: Ian Lance Taylor <iant@golang.org> Reviewed-by: Meidan Li <limeidan@loongson.cn> TryBot-Bypass: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> (cherry picked from commit 7007271) Reviewed-on: https://go-review.googlesource.com/c/go/+/510916 Reviewed-by: Heschi Kreinick <heschi@google.com>
Fixes golang#53301 Change-Id: Id447d57d43b12c3748267295928d45a089549340 Reviewed-on: https://go-review.googlesource.com/c/go/+/507815 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Bypass: Ian Lance Taylor <iant@golang.org> Reviewed-by: Meidan Li <limeidan@loongson.cn> TryBot-Bypass: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> (cherry picked from commit 7007271) Reviewed-on: https://go-review.googlesource.com/c/go/+/510916 Reviewed-by: Heschi Kreinick <heschi@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go build -x -buildmode=c-shared -o hello.so hello.go
-buildmode=c-shared not supported on linux/loong64
I tried modified source code to support c-shared
What did you expect to see?
What did you see instead?
Why doesn't loongarch supported c-shared mode?
Modified into English (origin Chinese)
The text was updated successfully, but these errors were encountered: