Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/objdump: x86 disassemble mistaken about TLS #19988

Closed
842021900 opened this issue Apr 15, 2017 · 2 comments
Closed

cmd/objdump: x86 disassemble mistaken about TLS #19988

842021900 opened this issue Apr 15, 2017 · 2 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@842021900
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8 windows/386

What operating system and processor architecture are you using (go env)?

set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Users\X\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_386
set GCCGO=gccgo
set GO386=
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2

What did you do?

go tool objump xxx.exe > xxx.s

a.go:3	0x442db0	648b0d14000000	FS MOVL FS:0x14(IP), CX	 ----------this line is not correct,   	(IP) is not need.
a.go:3	0x442db7	8b8900000000	MOVL 0(CX), CX				
a.go:3	0x442dbd	3b6108		CMPL 0x8(CX), SP			
a.go:3	0x442dc0	7612		JBE 0x442dd4				
a.go:3	0x442dc2	8b442404	MOVL 0x4(SP), AX			
a.go:3	0x442dc6	8b4c2408	MOVL 0x8(SP), CX			
a.go:3	0x442dca	39c8		CMPL CX, AX				
a.go:3	0x442dcc	0f9cc0		SETL AL					
a.go:3	0x442dcf	8844240c	MOVB AL, 0xc(SP)			
a.go:3	0x442dd3	c3		RET					
a.go:3	0x442dd4	e867bbffff	CALL runtime.morestack_noctxt(SB)	
a.go:3	0x442dd9	ebd5		JMP main.less(SB)			

What did you expect to see?

What did you see instead?

@842021900 842021900 changed the title cmd/objdump: x86 disassemble mistaken abort TLS cmd/objdump: x86 disassemble mistaken about TLS Apr 15, 2017
@bradfitz
Copy link
Contributor

/cc @randall77 @robpike

@bradfitz bradfitz added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 15, 2017
@bradfitz bradfitz added this to the Go1.9Maybe milestone Apr 15, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jun 7, 2017
@gopherbot
Copy link

Change https://golang.org/cl/67450 mentions this issue: cmd/objdump: pass the correct execution mode to x86asm.Decode in disasm_x86 on 386

@golang golang locked and limited conversation to collaborators Nov 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants