Commit f78dc1da authored by Michael Hudson-Doyle's avatar Michael Hudson-Doyle Committed by Ian Lance Taylor

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: 's avatarIan Lance Taylor <iant@golang.org>
parent b8417854
...@@ -114,7 +114,7 @@ ok: ...@@ -114,7 +114,7 @@ ok:
CALL runtime·schedinit(SB) CALL runtime·schedinit(SB)
// create a new goroutine to start program // create a new goroutine to start program
PUSHL $runtime·main·f(SB) // entry PUSHL $runtime·mainPC(SB) // entry
PUSHL $0 // arg size PUSHL $0 // arg size
CALL runtime·newproc(SB) CALL runtime·newproc(SB)
POPL AX POPL AX
...@@ -126,8 +126,8 @@ ok: ...@@ -126,8 +126,8 @@ ok:
INT $3 INT $3
RET RET
DATA runtime·main·f+0(SB)/4,$runtime·main(SB) DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$4 GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
INT $3 INT $3
......
...@@ -109,7 +109,7 @@ ok: ...@@ -109,7 +109,7 @@ ok:
CALL runtime·schedinit(SB) CALL runtime·schedinit(SB)
// create a new goroutine to start program // create a new goroutine to start program
MOVQ $runtime·main·f(SB), AX // entry MOVQ $runtime·mainPC(SB), AX // entry
PUSHQ AX PUSHQ AX
PUSHQ $0 // arg size PUSHQ $0 // arg size
CALL runtime·newproc(SB) CALL runtime·newproc(SB)
...@@ -122,8 +122,8 @@ ok: ...@@ -122,8 +122,8 @@ ok:
MOVL $0xf1, 0xf1 // crash MOVL $0xf1, 0xf1 // crash
RET RET
DATA runtime·main·f+0(SB)/8,$runtime·main(SB) DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$8 GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
BYTE $0xcc BYTE $0xcc
......
...@@ -73,7 +73,7 @@ ok: ...@@ -73,7 +73,7 @@ ok:
CALL runtime·schedinit(SB) CALL runtime·schedinit(SB)
// create a new goroutine to start program // 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 $0, 0(SP)
MOVL AX, 4(SP) MOVL AX, 4(SP)
CALL runtime·newproc(SB) CALL runtime·newproc(SB)
...@@ -84,8 +84,8 @@ ok: ...@@ -84,8 +84,8 @@ ok:
MOVL $0xf1, 0xf1 // crash MOVL $0xf1, 0xf1 // crash
RET RET
DATA runtime·main·f+0(SB)/4,$runtime·main(SB) DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$4 GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
INT $3 INT $3
......
...@@ -60,7 +60,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4 ...@@ -60,7 +60,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4
BL runtime·schedinit(SB) BL runtime·schedinit(SB)
// create a new goroutine to start program // create a new goroutine to start program
MOVW $runtime·main·f(SB), R0 MOVW $runtime·mainPC(SB), R0
MOVW.W R0, -4(R13) MOVW.W R0, -4(R13)
MOVW $8, R0 MOVW $8, R0
MOVW.W R0, -4(R13) MOVW.W R0, -4(R13)
...@@ -76,8 +76,8 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4 ...@@ -76,8 +76,8 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4
MOVW $1000, R1 MOVW $1000, R1
MOVW R0, (R1) // fail hard MOVW R0, (R1) // fail hard
DATA runtime·main·f+0(SB)/4,$runtime·main(SB) DATA runtime·mainPC+0(SB)/4,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$4 GLOBL runtime·mainPC(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0 TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
// gdb won't skip this breakpoint instruction automatically, // gdb won't skip this breakpoint instruction automatically,
......
...@@ -60,7 +60,7 @@ nocgo: ...@@ -60,7 +60,7 @@ nocgo:
BL runtime·schedinit(SB) BL runtime·schedinit(SB)
// create a new goroutine to start program // create a new goroutine to start program
MOVD $runtime·main·f(SB), R0 // entry MOVD $runtime·mainPC(SB), R0 // entry
MOVD RSP, R7 MOVD RSP, R7
MOVD.W $0, -8(R7) MOVD.W $0, -8(R7)
MOVD.W R0, -8(R7) MOVD.W R0, -8(R7)
...@@ -77,8 +77,8 @@ nocgo: ...@@ -77,8 +77,8 @@ nocgo:
MOVD R0, (R0) // boom MOVD R0, (R0) // boom
UNDEF UNDEF
DATA runtime·main·f+0(SB)/8,$runtime·main(SB) DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$8 GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0 TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
BRK BRK
......
...@@ -69,7 +69,7 @@ nocgo: ...@@ -69,7 +69,7 @@ nocgo:
BL runtime·schedinit(SB) BL runtime·schedinit(SB)
// create a new goroutine to start program // 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 R3, -8(R1)
MOVDU R0, -8(R1) MOVDU R0, -8(R1)
MOVDU R0, -8(R1) MOVDU R0, -8(R1)
...@@ -82,8 +82,8 @@ nocgo: ...@@ -82,8 +82,8 @@ nocgo:
MOVD R0, 1(R0) MOVD R0, 1(R0)
RETURN RETURN
DATA runtime·main·f+0(SB)/8,$runtime·main(SB) DATA runtime·mainPC+0(SB)/8,$runtime·main(SB)
GLOBL runtime·main·f(SB),RODATA,$8 GLOBL runtime·mainPC(SB),RODATA,$8
TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0 TEXT runtime·breakpoint(SB),NOSPLIT,$-8-0
MOVD R0, 2(R0) // TODO: TD MOVD R0, 2(R0) // TODO: TD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment