Hi,
In the course of my work in the OpenHPI project, I've encoutered a problem
with g++ version 3.3.3 that I narrowed down to a -O2 flag behavior which is
different from other g++ versions both older and newer.
Here is an excerpt of the real file - let's call it buggpp.cpp - that
exhibit the behavior:
// new plugin_loader
extern "C" {
// ABI Interface functions
static void *
IpmiOpen( void *handler_config )
{
return handler_config;
}
}
extern "C" {
void * oh_open (void *) __attribute__ ((weak, alias("IpmiOpen")));
}
I compile it with the following command: "g++ -O2 -c buggpp.cpp -o buggpp.o"
With g++ version 3.2.3 (Redhat EL 3.0), 3.4.4 (Fedora Core 3) and 4.0.1
(Fedora Core 4) the output of "nm buggpp.o" is the following:
00000000 t IpmiOpen
00000000 W oh_open
But with g++ version 3.3.3 (Suse Linux ES 9.0) I get:
U IpmiOpen
In the real project, it creates an error in the application since it cannot
find oh_open symbol when trying to load the library including this code.
If I remove -O2, I get the same output as with other versions but it's not a
viable solution of course.
Is it a known issue with g++ 3.3.3? If yes, is there a fix available?
TIA,
Pierre
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus