<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/objdump/testdata, branch dev.cmdgo</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/internal/objfile: emit better error for Go object of a different version</title>
<updated>2021-04-30T16:53:35+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2021-04-30T01:49:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=89bf297b2486adaaff04be154a066ea9f5e63994'/>
<id>89bf297b2486adaaff04be154a066ea9f5e63994</id>
<content type='text'>
The Go object file format can change from version to version.
Tools like cmd/objdump and cmd/nm only onderstand the current
version of the object file. Currently, when it encounters an
object built with a different version of the toolchain, it emits
a generic error "unrecognized object file", which is not very
helpful for users. This CL makes it emit a clearer error. Now it
emits

objdump: open go116.o: go object of a different version: go116ld

Change-Id: I063c6078ed1da78f97cea65796779ae093a1a8cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/315609
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Go object file format can change from version to version.
Tools like cmd/objdump and cmd/nm only onderstand the current
version of the object file. Currently, when it encounters an
object built with a different version of the toolchain, it emits
a generic error "unrecognized object file", which is not very
helpful for users. This CL makes it emit a clearer error. Now it
emits

objdump: open go116.o: go object of a different version: go116ld

Change-Id: I063c6078ed1da78f97cea65796779ae093a1a8cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/315609
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/objfile: correct file table reading for Go object file</title>
<updated>2020-10-16T14:40:50+00:00</updated>
<author>
<name>Cherry Zhang</name>
<email>cherryyz@google.com</email>
</author>
<published>2020-10-15T22:04:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=20819440fc65d28fabe8f7410ea8fe193cdc53c6'/>
<id>20819440fc65d28fabe8f7410ea8fe193cdc53c6</id>
<content type='text'>
Apparently I never actually understood the new file table in Go
object files. The PC value stream actually encodes the file index
in the per-CU table. I thought it was indexing into a per-function
table, which then contains index to the per-CU table. Remove the
extra indirection.

Change-Id: I0aea5629f7b3888ebe3a04fea437aa15ce89519e
Reviewed-on: https://go-review.googlesource.com/c/go/+/262779
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Jeremy Faller &lt;jeremy@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently I never actually understood the new file table in Go
object files. The PC value stream actually encodes the file index
in the per-CU table. I thought it was indexing into a per-function
table, which then contains index to the per-CU table. Remove the
extra indirection.

Change-Id: I0aea5629f7b3888ebe3a04fea437aa15ce89519e
Reviewed-on: https://go-review.googlesource.com/c/go/+/262779
Trust: Cherry Zhang &lt;cherryyz@google.com&gt;
Run-TryBot: Cherry Zhang &lt;cherryyz@google.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Jeremy Faller &lt;jeremy@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/internal/objfile: use pe.FileHeader.Machine to reliably determine GOARCH</title>
<updated>2020-08-22T00:56:53+00:00</updated>
<author>
<name>Alex Brainman</name>
<email>alex.brainman@gmail.com</email>
</author>
<published>2020-06-28T06:28:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=ea51acbabc687a2270438b05bf765ada2968b69a'/>
<id>ea51acbabc687a2270438b05bf765ada2968b69a</id>
<content type='text'>
Current peFile.goarch looks for symbols like "_rt0_386_windows" to
determine GOARCH. But "_rt0_386_windows" is not present in executables
built with cgo.

Use pe.FileHeader.Machine instead. This should work with any Windows
executable, not just with Go built executable.

Fixes #39682

Change-Id: Ie0ffce664f4b8b8fed69b2ecc482425b042a38d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/240957
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Current peFile.goarch looks for symbols like "_rt0_386_windows" to
determine GOARCH. But "_rt0_386_windows" is not present in executables
built with cgo.

Use pe.FileHeader.Machine instead. This should work with any Windows
executable, not just with Go built executable.

Fixes #39682

Change-Id: Ie0ffce664f4b8b8fed69b2ecc482425b042a38d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/240957
Run-TryBot: Alex Brainman &lt;alex.brainman@gmail.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
Reviewed-by: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/objdump: guard against out-of-range lines from directives.</title>
<updated>2020-03-12T20:40:54+00:00</updated>
<author>
<name>David Chase</name>
<email>drchase@google.com</email>
</author>
<published>2020-03-11T17:36:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=29b36a88ab0b179c140612e7c907042b2a388587'/>
<id>29b36a88ab0b179c140612e7c907042b2a388587</id>
<content type='text'>
//line bogo.go:9999999 will cause 'go tool objdump' to crash
unless bogo.go has that many lines.  Guard the array index
and return innocuous values (nil, nil) from the file cache.

Fixes #36683

Change-Id: I4a9f8444dc611654d270cc876e8848dfd2f84770
Reviewed-on: https://go-review.googlesource.com/c/go/+/223081
Run-TryBot: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
//line bogo.go:9999999 will cause 'go tool objdump' to crash
unless bogo.go has that many lines.  Guard the array index
and return innocuous values (nil, nil) from the file cache.

Fixes #36683

Change-Id: I4a9f8444dc611654d270cc876e8848dfd2f84770
Reviewed-on: https://go-review.googlesource.com/c/go/+/223081
Run-TryBot: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/compile: change the "bogus line" to be 1</title>
<updated>2020-01-17T23:14:48+00:00</updated>
<author>
<name>David Chase</name>
<email>drchase@google.com</email>
</author>
<published>2020-01-17T17:03:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=c112289ee4141ebc31db50328c355b01278b987b'/>
<id>c112289ee4141ebc31db50328c355b01278b987b</id>
<content type='text'>
The previous value was "too bogus" and caused objdump to crash.
Updated infinite loop test results (only run if -args -f) in ssa/debug_test.go
Probably also fixes #36621 but that bug needs more info to tell for certain.

Fixes #36570

Change-Id: I51144641d25d559308a98d726d87806bd340cc5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/215297
Run-TryBot: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous value was "too bogus" and caused objdump to crash.
Updated infinite loop test results (only run if -args -f) in ssa/debug_test.go
Probably also fixes #36621 but that bug needs more info to tell for certain.

Fixes #36570

Change-Id: I51144641d25d559308a98d726d87806bd340cc5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/215297
Run-TryBot: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Cherry Zhang &lt;cherryyz@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/objdump: make test independent of inlining</title>
<updated>2017-02-19T21:27:16+00:00</updated>
<author>
<name>David Lazar</name>
<email>lazard@golang.org</email>
</author>
<published>2017-02-19T19:01:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=b9574f46f9079a4237a9dd42d30a6ec91723ee5a'/>
<id>b9574f46f9079a4237a9dd42d30a6ec91723ee5a</id>
<content type='text'>
Fixes #19189.

Change-Id: Ice69216c7fc2eaeb3dbbdcd08a8284204c7f52ef
Reviewed-on: https://go-review.googlesource.com/37237
Run-TryBot: David Lazar &lt;lazard@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #19189.

Change-Id: Ice69216c7fc2eaeb3dbbdcd08a8284204c7f52ef
Reviewed-on: https://go-review.googlesource.com/37237
Run-TryBot: David Lazar &lt;lazard@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Keith Randall &lt;khr@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>objdump: implement disassembly</title>
<updated>2014-05-14T23:51:15+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2014-05-14T23:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/go-git.git/commit/?id=79fb16d32c20f14809a924e28d0ab18e1052647d'/>
<id>79fb16d32c20f14809a924e28d0ab18e1052647d</id>
<content type='text'>
There is some duplication here with cmd/nm.
There is a TODO to address that after 1.3 is out.

Update #7452

x86 disassembly works and is tested.

The arm disassembler does not exist yet
and is therefore not yet hooked up.

LGTM=crawshaw, iant
R=crawshaw, iant
CC=golang-codereviews
https://golang.org/cl/91360046
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is some duplication here with cmd/nm.
There is a TODO to address that after 1.3 is out.

Update #7452

x86 disassembly works and is tested.

The arm disassembler does not exist yet
and is therefore not yet hooked up.

LGTM=crawshaw, iant
R=crawshaw, iant
CC=golang-codereviews
https://golang.org/cl/91360046
</pre>
</div>
</content>
</entry>
</feed>
