On Tue, Feb 26, 2019 at 12:51 PM <gs051...@gmail.com> wrote: > > In the debug/elf library(https://golang.org/pkg/debug/elf/), there are two > calls for getting the symbol table. To me it seems like these two calls > should be equivalent, both fetching the symbol table. But when I run these I > get two different answers, what is more is that the Section(".gosymtab") has > a "SHT_PROGBITS" in the result. Anyone know why or what am i missing? > the ELF has only one .symtab section, so these should be the one and the same
Which two calls do you mean? The File type has these methods: DynamicSymbols, ImportedSymbols, Symbols. The .gosymtab section is not an ELF symbol table. It holds the information used for stack backtraces, including runtime.Callers and friends. The format is roughly as described at https://golang.org/s/go12symtab, although that is out of date and there have been various changes. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.