• Pietro Gagliardi's avatar
    debug/elf: add (*File).DynamicSymbols, ErrNoSymbols, and tests for… · f5b600f7
    Pietro Gagliardi authored
    debug/elf: add (*File).DynamicSymbols, ErrNoSymbols, and tests for (*File).Symbols and (*File).DynamicSymbols, and formalize symbol order.
    
    Added a complement to (*File).Symbols for the dynamic symbol table.
    Would be useful, for instance, if seraching for certain shared objects
    compatible with certain libraries (for instance, LADSPA requires an
    exported symbol "ladspa_descriptor").
    
    Added a variable ErrNoSymbols that canonicalizes a return from
    (*File).Symbols and (*File).DyanmicSymbols if the file has no symbols.
    
    Added tests for both (*File).Symbols and (*File).DynamicSymbols;
    there was never a test for (*File).Symbols at all. A small C program using
    libelf, included in the test data, was used to produce the golden
    symbols to compare against.
    
    As part of the requirements for testing, (*File).Symbols and (*File).DynamicSymbols now document the order in which the symbol tables are returned (in the order the symbols appear in the file).
    
    All tests currently pass.
    
    LGTM=iant
    R=golang-codereviews, iant
    CC=golang-codereviews
    https://golang.org/cl/107530043
    f5b600f7
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
liblink Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
androidtest.bash Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
nacltest.bash Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...