Commit 4bb649fb authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

debug/pe: gofmt

CL 110555 introduced some changes which were not properly gofmt'ed.
Because the CL was sent via Github the gofmt checks usually performed by
git-codereview didn't catch this (see #24946).

Change-Id: I65c1271620690dbeec88b4ce482d158f7d6df45d
Reviewed-on: https://go-review.googlesource.com/114255
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
parent 1174ad3a
...@@ -269,9 +269,9 @@ func (f *File) ImportedSymbols() ([]string, error) { ...@@ -269,9 +269,9 @@ func (f *File) ImportedSymbols() ([]string, error) {
dd_length = f.OptionalHeader.(*OptionalHeader32).NumberOfRvaAndSizes dd_length = f.OptionalHeader.(*OptionalHeader32).NumberOfRvaAndSizes
} }
// check that the length of data directory entries is large // check that the length of data directory entries is large
// enough to include the imports directory. // enough to include the imports directory.
if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT + 1 { if dd_length < IMAGE_DIRECTORY_ENTRY_IMPORT+1 {
return nil, nil return nil, nil
} }
...@@ -287,7 +287,7 @@ func (f *File) ImportedSymbols() ([]string, error) { ...@@ -287,7 +287,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
var ds *Section var ds *Section
ds = nil ds = nil
for _, s := range f.Sections { for _, s := range f.Sections {
if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress + s.VirtualSize { if s.VirtualAddress <= idd.VirtualAddress && idd.VirtualAddress < s.VirtualAddress+s.VirtualSize {
ds = s ds = s
break break
} }
...@@ -304,7 +304,7 @@ func (f *File) ImportedSymbols() ([]string, error) { ...@@ -304,7 +304,7 @@ func (f *File) ImportedSymbols() ([]string, error) {
} }
// seek to the virtual address specified in the import data directory // seek to the virtual address specified in the import data directory
d = d[idd.VirtualAddress - ds.VirtualAddress:] d = d[idd.VirtualAddress-ds.VirtualAddress:]
// start decoding the import directory // start decoding the import directory
var ida []ImportDirectory var ida []ImportDirectory
......
...@@ -111,20 +111,19 @@ const ( ...@@ -111,20 +111,19 @@ const (
// IMAGE_DIRECTORY_ENTRY constants // IMAGE_DIRECTORY_ENTRY constants
const ( const (
IMAGE_DIRECTORY_ENTRY_EXPORT = 0 IMAGE_DIRECTORY_ENTRY_EXPORT = 0
IMAGE_DIRECTORY_ENTRY_IMPORT = 1 IMAGE_DIRECTORY_ENTRY_IMPORT = 1
IMAGE_DIRECTORY_ENTRY_RESOURCE = 2 IMAGE_DIRECTORY_ENTRY_RESOURCE = 2
IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3 IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3
IMAGE_DIRECTORY_ENTRY_SECURITY = 4 IMAGE_DIRECTORY_ENTRY_SECURITY = 4
IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 IMAGE_DIRECTORY_ENTRY_BASERELOC = 5
IMAGE_DIRECTORY_ENTRY_DEBUG = 6 IMAGE_DIRECTORY_ENTRY_DEBUG = 6
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7 IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7
IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8 IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8
IMAGE_DIRECTORY_ENTRY_TLS = 9 IMAGE_DIRECTORY_ENTRY_TLS = 9
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10 IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11 IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11
IMAGE_DIRECTORY_ENTRY_IAT = 12 IMAGE_DIRECTORY_ENTRY_IAT = 12
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13 IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14 IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14
) )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment