• Austin Clements's avatar
    debug/elf: add version information to all dynamic symbols · 7aac3436
    Austin Clements authored
    Currently, File.ImportedSymbols is the only API that exposes the GNU
    symbol version information for dynamic symbols. Unfortunately, it also
    filters to specific types of symbols, and only returns symbol names.
    
    The cgo tool is going to need symbol version information for more
    symbols. In order to support this and make the API more orthogonal,
    this CL adds version information to the Symbol type and updates
    File.DynamicSymbols to fill this in. This has the downside of
    increasing the size of Symbol, but seems to be the most natural API
    for exposing this. I also explored 1) adding a method to get the
    version information for the i'th dynamic symbol, but we don't use
    symbol indexes anywhere else in the API, and it's not clear if this
    index would be 0-based or 1-based, and 2) adding a
    DynamicSymbolVersions method that returns a slice of version
    information that parallels the DynamicSymbols slice, but that's less
    efficient to implement and harder to use.
    
    For #31912.
    
    Change-Id: I69052ac3894f7af2aa9561f7085275130e0cf717
    Reviewed-on: https://go-review.googlesource.com/c/go/+/184099
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    7aac3436
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...
SECURITY.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...