]> Cypherpunks repositories - gostls13.git/commit
cmd/objdump: implement objdump of .o files
authorKeith Randall <khr@golang.org>
Sun, 3 Jul 2016 00:19:25 +0000 (17:19 -0700)
committerKeith Randall <khr@golang.org>
Wed, 24 Aug 2016 17:36:59 +0000 (17:36 +0000)
commita99f812cba4c5a5207fed9be5488312a44a5df34
treed529f4e86495db40844a6640477deefea4f7c349
parent873dca4c17437d07ae97ef4f9e9a8e8c93d88bd7
cmd/objdump: implement objdump of .o files

Update goobj reader so it can provide all the information
necessary to disassemble .o (and .a) files.

Grab architecture of .o files from header.

.o files have relocations in them.  This CL also contains a simple
mechanism to disassemble relocations and add relocation info as an extra
column in the output.

Fixes #13862

Change-Id: I608fd253ff1522ea47f18be650b38d528dae9054
Reviewed-on: https://go-review.googlesource.com/24818
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
14 files changed:
src/cmd/internal/goobj/read.go
src/cmd/internal/obj/link.go
src/cmd/internal/obj/reloctype_string.go [new file with mode: 0644]
src/cmd/internal/objfile/disasm.go
src/cmd/internal/objfile/goobj.go
src/cmd/internal/objfile/objfile.go
src/cmd/internal/sys/arch.go
src/cmd/link/internal/arm/asm.go
src/cmd/link/internal/ld/ldelf.go
src/cmd/link/internal/ld/ldmacho.go
src/cmd/link/internal/ld/link.go
src/cmd/link/internal/ld/objfile.go
src/cmd/pprof/pprof.go
src/debug/gosym/pclntab.go