Pierre Sangouard wrote:
> extern "C" {
> static void *
> IpmiOpen( void *handler_config )
> {
>   return handler_config;
> }
> 
> void * oh_open (void *) __attribute__ ((weak, alias("IpmiOpen")));
> }

> 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

Hmmm, I just read [1] and it says you need to use the decorated name,
though that should be the same. Anyhow: don't make functions that you want
exported file-static. Alternatively (but I personally find that backward)
you could possibly add the attribute 'used' to IpmiOpen.

Just my 2cc

Uli

[1] http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

-- 
http://gcc.gnu.org/faq.html
http://parashift.com/c++-faq-lite/

_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to