]> Cypherpunks repositories - gostls13.git/commit
debug/pe: add APIs for reading section def aux info
authorThan McIntosh <thanm@google.com>
Tue, 22 Mar 2022 12:49:52 +0000 (08:49 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 31 Mar 2022 14:57:35 +0000 (14:57 +0000)
commit378221bd6e73bdc21884fed9e32f53e6672ca0cd
tree1dee063d40f14b65a4148aefcdd9cfef777904ed
parentcdee8004ab5fa71d705979eaaee0948200256ed0
debug/pe: add APIs for reading section def aux info

Add hooks to support reading of section definition symbol aux data
(including COMDAT information) from the aux symbols associated with
section definition symbols. The COFF symbol array made available by
"pe.File" includes entries for aux symbols, but doesn't expose their
structure (since it varies depending on the type of aux symbol). This
patch adds a function for returning a specific class of aux symbol
("type 5") that immediately follows a COFF symbol corresponding to a
section definition.

Updates #35006.
Updates #51868.

Change-Id: I21fcc057150f7a3c64f01a5961aabca0fa43399e
Reviewed-on: https://go-review.googlesource.com/c/go/+/394534
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
api/next/51868.txt [new file with mode: 0644]
src/debug/pe/section.go
src/debug/pe/symbol.go
src/debug/pe/symbols_test.go [new file with mode: 0644]
src/debug/pe/testdata/llvm-mingw-20211002-msvcrt-x86_64-crt2 [new file with mode: 0644]