• Ali Rizvi-Santiago's avatar
    debug/pe: parse the import directory correctly · e9137299
    Ali Rizvi-Santiago authored
    This parses the import table properly which allows for debug/pe
    to extract import symbols from pecoffs linked with an import
    table in a section named something other than ".idata"
    
    The section names in a pecoff object aren't guaranteed to actually
    mean anything, so hardcoding a search for the ".idata" section
    is not guaranteed to find the import table in all shared libraries.
    This resulted in debug/pe being unable to read import symbols
    from some libraries.
    
    The proper way to locate the import table is to validate the
    number of data directory entries, locate the import entry, and
    then use the va to identify the section containing the import
    table. This patch does exactly this.
    
    Fixes #16103.
    
    Change-Id: I3ab6de7f896a0c56bb86c3863e504e8dd4c8faf3
    GitHub-Last-Rev: ce8077cb154f18ada7a86e152ab03de813937816
    GitHub-Pull-Request: golang/go#25193
    Reviewed-on: https://go-review.googlesource.com/110555
    Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
    e9137299
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...