1
0
mirror of https://github.com/golang/go synced 2024-10-04 15:21:22 -06:00
go/src/debug
Alex Brainman 691c5c1568 debug/pe: handle files with no string table
pecoff.doc (https://goo.gl/ayvckk) in section 5.6 says:

Immediately following the COFF symbol table is the COFF string table.
The position of this table is found by taking the symbol table address
in the COFF header, and adding the number of symbols multiplied by
the size of a symbol.

So it is unclear what to do when symbol table address is 0.
Lets assume executable does not have any string table.

Added new test with executable with no symbol table. The

gcc -s testdata\hello.c -o testdata\gcc-386-mingw-no-symbols-exec.

command was used to generate the executable.

Fixes #16084

Change-Id: Ie74137ac64b15daadd28e1f0315f3b62d1bf2059
Reviewed-on: https://go-review.googlesource.com/24200
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-19 05:18:09 +00:00
..
dwarf all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
elf all: use SeekStart, SeekCurrent, SeekEnd 2016-05-06 00:10:41 +00:00
gosym debug/gosym: parse remote packages correctly 2016-05-17 22:16:38 +00:00
macho all: delete dead non-test code 2016-03-25 06:28:13 +00:00
pe debug/pe: handle files with no string table 2016-06-19 05:18:09 +00:00
plan9obj all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00