Created
October 26, 2014 10:55
-
-
Save yvasiyarov/7dce6a865cb57d8001f7 to your computer and use it in GitHub Desktop.
Load symbols from ELF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f, err := elf.Open(filename) | |
if err != nil { | |
return err | |
} | |
defer f.Close() | |
symbols, err := f.Symbols() | |
if err != nil { | |
return err | |
} | |
for _, symbol := range symbols { | |
r.Symbols[symbol.Value] = symbol.Name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment