-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/link: ignore mapping symbols on riscv64 #73592
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
Conversation
This PR (HEAD: a22540f) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/669675. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Yao Zi: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Julian Zhu: Patch Set 3: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-05-03T11:17:53Z","revision":"7edef74737d6f258a39416fbe6f58441b6f50664"} Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Julian Zhu: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Meng Zhuo: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Yao Zi: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Meng Zhuo: Patch Set 3: Code-Review+2 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Specified in RISC-V ELF psABI[1], mapping symbols are symbols starting with "$d" or "$x" with STT_NOTYPE, STB_LOCAL and zero sizes, indicating boundaries between code and data in the same section. Let's simply ignore them as they're only markers instead of real symbols. This fixes linking errors like sym#63 ("$d"): ignoring symbol in section 4 (".riscv.attributes") (type 0) when using CGO together with Clang and internal linker, which are caused by unnecessary (but technically correct) mapping symbols created by LLVM for various sections. Fixes golang#73516 [1]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/87aecf601722171c570120a46003be3c17ad3108/riscv-elf.adoc?plain=1#L1448
a22540f
to
d7842ce
Compare
This PR (HEAD: d7842ce) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/669675. Important tips:
|
Message from Yao Zi: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Cherry Mui: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Cherry Mui: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-05-09T15:18:36Z","revision":"1c286dd213a1c6bdd81b8502afa8c9b99bccd671"} Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Cherry Mui: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 5: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Message from Michael Knyszek: Patch Set 5: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/669675. |
Specified in RISC-V ELF psABI[1], mapping symbols are symbols starting with "$d" or "$x" with STT_NOTYPE, STB_LOCAL and zero sizes, indicating boundaries between code and data in the same section. Let's simply ignore them as they're only markers instead of real symbols. This fixes linking errors like sym#63 ("$d"): ignoring symbol in section 4 (".riscv.attributes") (type 0) when using CGO together with Clang and internal linker, which are caused by unnecessary (but technically correct) mapping symbols created by LLVM for various sections. [1]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/87aecf601722171c570120a46003be3c17ad3108/riscv-elf.adoc?plain=1#L1448 Fixes #73516 Change-Id: I02ca90c100ba8a38733fe3b8b8403836b44a3dd1 GitHub-Last-Rev: d7842ce GitHub-Pull-Request: #73592 Reviewed-on: https://go-review.googlesource.com/c/go/+/669675 Reviewed-by: Cherry Mui <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Meng Zhuo <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
This PR is being closed because golang.org/cl/669675 has been merged. |
Specified in RISC-V ELF psABI1, mapping symbols are symbols starting
with "$d" or "$x" with STT_NOTYPE, STB_LOCAL and zero sizes, indicating
boundaries between code and data in the same section.
Let's simply ignore them as they're only markers instead of real symbols.
This fixes linking errors like
when using CGO together with Clang and internal linker, which are caused
by unnecessary (but technically correct) mapping symbols created by LLVM
for various sections.
Fixes #73516