On Tue, Feb 26, 2019 at 6:08 PM Gargi Sharma <gs051...@gmail.com> wrote:
>
> I meant the Section and SectionByType calls.

Those calls do different things.  They do more than just get the
symbol table.  They aren't equivalent.


> [ 6] .gosymtab         PROGBITS         00000000004d7758  000d7758
>        0000000000000000  0000000000000000   A       0     0     1
> [22] .symtab           SYMTAB           0000000000000000  002aa000
>        0000000000012c30  0000000000000018          23   116     8
>
> From readelf, I see that the binary has both symtab and gosymtab. Is
> gosymtab a superset of information of the .symtab? If yes, why do we
> need the .symtab?

I explained .gosymtab in my last message.  It is not a superset of
.symtab.  It is different.

In any case we need .symtab because that is what ELF tools expect.

> My code panics when I try to read the actual .symtab (doing a
> section.data() for Section(.symtab)), which I don't understand as
> well.

Why not use the Symbols method?

Perhaps we can help you if you show us a small self-contained example.

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.

Reply via email to