1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:05:00 -07:00

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>
This commit is contained in:
Michael Hudson-Doyle 2015-03-29 23:38:20 +00:00 committed by Ian Lance Taylor
parent b8417854c3
commit f78dc1dac1
6 changed files with 18 additions and 18 deletions

View File

@ -114,7 +114,7 @@ ok:
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 @@ ok:
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

View File

@ -109,7 +109,7 @@ ok:
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 @@ ok:
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

View File

@ -73,7 +73,7 @@ ok:
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 @@ ok:
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

View File

@ -60,7 +60,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4
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 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$-4
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,

View File

@ -60,7 +60,7 @@ nocgo:
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 @@ nocgo:
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

View File

@ -69,7 +69,7 @@ nocgo:
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 @@ nocgo:
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