Re: g_module_symbol and -O



Zoltan Toth wrote:

When I turn optimization on, a strange thing happens in my program.
I load the shared library with g_module_load, this works.
When I try to locate a symbol with g_module_symbol, the function gives TRUE as a
return value, but the pointer I get is NULL. If I don't use the -O flag,
everything goes right, the symbol is found.

sometimes optimization introduces "bad code" into the executable, i have
seen this on my own programms a few times. this is probably a bug in
gcc. :-(

best regards ...
clemens




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