diff options
Diffstat (limited to 'src/debug/pe/file.go')
| -rw-r--r-- | src/debug/pe/file.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/debug/pe/file.go b/src/debug/pe/file.go index 1c308b3dc3..1d714bf6e7 100644 --- a/src/debug/pe/file.go +++ b/src/debug/pe/file.go @@ -324,6 +324,10 @@ type ImportDirectory struct { // satisfied by other libraries at dynamic load time. // It does not return weak symbols. func (f *File) ImportedSymbols() ([]string, error) { + if f.OptionalHeader == nil { + return nil, nil + } + pe64 := f.Machine == IMAGE_FILE_MACHINE_AMD64 // grab the number of data directory entries |
