g_module_symbol and -O
- From: Zoltan Toth <Zoltan Toth informatik uni-erlangen de>
- To: gtk-app-devel-list gnome org
- Subject: g_module_symbol and -O
- Date: Fri, 20 Jul 2001 15:30:17 +0200
Hi,
I'm not sure if this is the right place but I haven't found a forum for GLib
related questions, so I came here.
I am using the dynamic module loading facility of GLib (v 1.2.8) and everything
works well until I don't want to optimize the code with the -O or -O2 option of
gcc (v 2.95.2).
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.
I am using SuSE Linux 7.1, kernel 2.2.19.
Anyone here has any idea of what goes wrong?
Thanks,
ZOltan
--
Zoltan Toth http://www.ztoth.net
MSc of computer sciences ICQ#: 54799682
University of Szeged, Hungary finger elek 160 114 38 38
Friedrich-Alexander University, Erlangen, Germany
Pink Floyd code: v1.2a r+d>s TW 0/0/d FD - 0 Meddle 16 68 27.6% <06jul01>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]