This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: vtbl layout


In article <Pine.LNX.3.96.990106225231.13887W-100000@exeter.exeter.org>,
bob@werken.com (Bob McWhirter) writes:

> `nm` is showing the vtbl symbol (ie, _vt.3Foo), but dlsym() isn't finding it.
> Likewise with just a static symbol I toss into the program.  I've attempted
> adding and removing underscores, to no avail.  Wrapping my staticFoo symbol
> with extern "C" {} didn't accomplish much either.  

dlsym() can only work with symbols exported for dynamic linking. On completely
linked programs (not compiled with -shared) normally no symbols are exported.
Try linking with -export-dynamic (-Wl,-export-dynamic) to change this.

-And


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]