Interface Method Table
Ian Lance Taylor
iant@google.com
Fri Jan 20 17:28:00 GMT 2012
Matt Davis <mattdavis9@gmail.com> writes:
> For a Go program being compiled in gcc, from the middle end, is there a way to
> figure-out which routines make up the interface-method-table? I could check the
> mangled name of the method table, but is there another way to deduce what
> methods compose it from the middle-end?
The type of the table is a struct. The second element of the struct is
a pointer to a table of pointers. The pointers in that table are the
methods. Each one is cast to void*, but if you undo that case you
should find the actual function pointer.
Ian
More information about the Gcc
mailing list