Try starting from the cmd/dist sources to trace what it’s doing.
—
Benny
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/20104CE7-C581-40AD-81FF-69DF708C3F43%40gmail.com.
This will lead to duplication of code. The code generated by the xml parser has a copy in x/arch, and this copy will be imported into the Go repo through cmd/vendor. If we also put a copy in cmd/internal/obj/arm64, isn't this a duplication?
--在2023年10月24日星期二 UTC+8 00:12:31<cherry> 写道:On Mon, Oct 23, 2023 at 7:45 AM Benny Siegert <bsie...@gmail.com> wrote:
> Am 23.10.2023 um 10:13 schrieb Eric Fang <eric...@arm.com>:
>
> I try to import golang.org/x/arch/arm64/arm64asm in cmd/internal/obj/arm64 because I want to share some information in assembler and disassembler. But I found this doesn't work. It's weird that golang.org/x/arch/arm64/arm64asm is used in cmd/internal/objfile/disasm.go, and it works fine. I tried to see if there was any special handling for this, but I didn't find it. Can anyone point me to how I should do this? Or is this a bug?
It’s not a bug but the context in which the code is built. You notice that your code is built as part of toolchain1, using go_bootstrap. ISTR that there is a table somewhere about which code depends on which module, but I couldn’t find it.Here is the table https://cs.opensource.google/go/go/+/master:src/cmd/dist/buildtool.go;l=22-91 . Packages needed for building the bootstrap toolchain ("toolchain1", which includes the compiler, linker, assembler, and the cgo command) need to be explicitly listed in cmd/dist.That said, I think we probably don't want to directly import golang.org/x/arch/arm64/arm64asm in the assembler. It is probably better to do some code generation, instead of direct import. Thanks.Cherry
Try starting from the cmd/dist sources to trace what it’s doing.
—
Benny
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/20104CE7-C581-40AD-81FF-69DF708C3F43%40gmail.com.
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/8a372085-120c-4700-9632-8768e47963e8n%40googlegroups.com.