Re: Strict aliasing and pointers to functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 25, 2006, at 7:12 PM, av1474@xxxxxxxx wrote:
*(void **) (char **) (void *) &funcs.dummy = dlsym (NULL, "dummy");

I don't think this has anything to do with the compiler. dlsym is returning null. It did not find dummy.

It may be that dummy is called something else: _dummy or .dummy

It might also be that dummy is not obviously referenced so the linker optimized it completely away. Look at the nm output of your code to see if it is in the final executable.

Or, you can put a call to dummy (and for testing purposes, I'd make dummy call out to something like printf, just in case), and then see if it works.

Also, in the man page I found via google for dlsym, it does not say that passing NULL as the first argument is valid. Maybe its valid on the i386 implementation but not on the PPC implementation.

Good luck,
Perry Smith ( pedz@xxxxxxxxxxxxxxxx )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux