runtime: rename ·main·f to ·mainPC to avoid duplicate symbol
runtime·main·f is normalized by the linker to runtime.main.f, as is
the compiler-generated symbol runtime.main·f. Change the former to
runtime·mainPC instead.
Fixes issue #9934
Change-Id: I656a6fa6422d45385fa2cc55bd036c6affa1abfe
Reviewed-on: https://go-review.googlesource.com/8234
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/src/runtime/asm_386.s b/src/runtime/asm_386.s
index b5b793d..3472e07 100644
--- a/src/runtime/asm_386.s
+++ b/src/runtime/asm_386.s
@@ -114,7 +114,7 @@
CALL runtime·schedinit(SB)
// create a new goroutine to start program
- PUSHL $runtime·main·f(SB) // entry
+ PUSHL $runtime·mainPC(SB) // entry
PUSHL $0 // arg size
CALL runtime·newproc(SB)
POPL AX
@@ -126,8 +126,8 @@
INT $3
RET
-DATA runtime·main·f+0(SB)/4,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$4
+DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
INT $3
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index 3039358..fdea053 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -109,7 +109,7 @@
CALL runtime·schedinit(SB)
// create a new goroutine to start program
- MOVQ $runtime·main·f(SB), AX // entry
+ MOVQ $runtime·mainPC(SB), AX // entry
PUSHQ AX
PUSHQ $0 // arg size
CALL runtime·newproc(SB)
@@ -122,8 +122,8 @@
MOVL $0xf1, 0xf1 // crash
RET
-DATA runtime·main·f+0(SB)/8,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$8
+DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
BYTE $0xcc
diff --git a/src/runtime/asm_amd64p32.s b/src/runtime/asm_amd64p32.s
index f8ef2f0..e144c40 100644
--- a/src/runtime/asm_amd64p32.s
+++ b/src/runtime/asm_amd64p32.s
@@ -73,7 +73,7 @@
CALL runtime·schedinit(SB)
// create a new goroutine to start program
- MOVL $runtime·main·f(SB), AX // entry
+ MOVL $runtime·mainPC(SB), AX // entry
MOVL $0, 0(SP)
MOVL AX, 4(SP)
CALL runtime·newproc(SB)
@@ -84,8 +84,8 @@
MOVL $0xf1, 0xf1 // crash
RET
-DATA runtime·main·f+0(SB)/4,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$4
+DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
INT $3
diff --git a/src/runtime/asm_arm.s b/src/runtime/asm_arm.s
index 4074e50..a5f6bde 100644
--- a/src/runtime/asm_arm.s
+++ b/src/runtime/asm_arm.s
@@ -60,7 +60,7 @@
BL runtime·schedinit(SB)
// create a new goroutine to start program
- MOVW $runtime·main·f(SB), R0
+ MOVW $runtime·mainPC(SB), R0
MOVW.W R0, -4(R13)
MOVW $8, R0
MOVW.W R0, -4(R13)
@@ -76,8 +76,8 @@
MOVW $1000, R1
MOVW R0, (R1) // fail hard
-DATA runtime·main·f+0(SB)/4,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$4
+DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
// gdb won't skip this breakpoint instruction automatically,
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s
index 0d3363e..0068e84 100644
--- a/src/runtime/asm_arm64.s
+++ b/src/runtime/asm_arm64.s
@@ -60,7 +60,7 @@
BL runtime·schedinit(SB)
// create a new goroutine to start program
- MOVD $runtime·main·f(SB), R0 // entry
+ MOVD $runtime·mainPC(SB), R0 // entry
MOVD RSP, R7
MOVD.W $0, -8(R7)
MOVD.W R0, -8(R7)
@@ -77,8 +77,8 @@
MOVD R0, (R0) // boom
UNDEF
-DATA runtime·main·f+0(SB)/8,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$8
+DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
BRK
diff --git a/src/runtime/asm_ppc64x.s b/src/runtime/asm_ppc64x.s
index 048477c..10461bb 100644
--- a/src/runtime/asm_ppc64x.s
+++ b/src/runtime/asm_ppc64x.s
@@ -69,7 +69,7 @@
BL runtime·schedinit(SB)
// create a new goroutine to start program
- MOVD $runtime·main·f(SB), R3 // entry
+ MOVD $runtime·mainPC(SB), R3 // entry
MOVDU R3, -8(R1)
MOVDU R0, -8(R1)
MOVDU R0, -8(R1)
@@ -82,8 +82,8 @@
MOVD R0, 1(R0)
RETURN
-DATA runtime·main·f+0(SB)/8,$runtime·main(SB)
-GLOBL runtime·main·f(SB),RODATA,$8
+DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
+GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
MOVD R0, 2(R0) // TODO: TD