$ go tool asm -I $(go env GOROOT)/pkg/include -o add.o add.s
0000000 67 6f 20 6f 62 6a 65 63 74 20 64 61 72 77 69 6e
0000010 20 61 6d 64 36 34 20 67 6f 31 2e 36 2e 32 0a 21
0000020 0a 00 00 67 6f 31 33 6c 64 01 00 fe 02 0c 22 22
0000030 2e 61 64 64 00 00 40 00 00 40 48 8b 5c 24 08 48
0000040 8b 6c 24 10 48 01 eb 48 89 5c 24 18 c3 cc cc cc
0000050 cc cc cc cc cc cc cc cc cc cc 00 ff ff ff ff 0f
0000060 00 02 00 00 06 02 20 00 06 02 20 00 16 0a 05 02
0000070 05 02 03 02 05 02 0e 00 00 02 28 22 22 2e 61 64
0000080 64 2e 61 72 67 73 5f 73 74 61 63 6b 6d 61 70 00
0000090 00 02 52 2f 55 73 65 72 73 2f 70 63 6a 2f 67 69
00000a0 74 68 75 62 2f 67 72 70 63 2d 67 72 65 65 74 65
00000b0 72 74 69 6d 65 72 2f 61 64 64 2e 73 02 ff ff 67
00000c0 6f 31 33 6c 64
00000c5
add.s:4: unrecognized instruction "MOVQ"
add.s:5: unrecognized instruction "MOVQ"
add.s:6: unrecognized instruction "ADDQ"
add.s:7: unrecognized instruction "MOVQ"
asm: asm: assembly of add.s failed
This was the initial issue for this post. However, I figured that part out (the std library needs to be compiled first). So this works:$ env GOOS=linux GOARCH=arm go install std && go tool asm -I $(go env GOROOT)/pkg/include -o add.o add.s
However, now I'm curious why whatever platform GOOS_GOARCH I choose, the file is exactly the same (see hexdump above).So i'm wondering why that is. Am I doing something wrong? If not, why are GOOS and GOARCH needed at all at this stage?Thanks for helping me clear this up, and thanks for golang!Paul
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This was the initial issue for this post. However, I figured that part out (the std library needs to be compiled first). So this works:$ env GOOS=linux GOARCH=arm go install std && go tool asm -I $(go env GOROOT)/pkg/include -o add.o add.sAnd here, the GOOS/GOARCH settings only apply to the first command that is run, not the asm invocation.
Cheers,mwh
However, now I'm curious why whatever platform GOOS_GOARCH I choose, the file is exactly the same (see hexdump above).So i'm wondering why that is. Am I doing something wrong? If not, why are GOOS and GOARCH needed at all at this stage?Thanks for helping me clear this up, and thanks for golang!Paul
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
My next question is which tool is responsible for selecting the correct sha1block_GOARCH.s? Is the the compiler, linker, or where?