[Top][All Lists]

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

Local function in shared object?

From: Mark R Bannister
Subject: Local function in shared object?
Date: Wed, 07 Dec 2011 17:45:31 +0000


I wonder if someone could point out my error.  I've defined a function, nothing special, takes a couple of args and returns a pointer to a structure.

The function is not declared with any special keywords.  It is not static.

Yet, when compiled with gcc on Solaris and a .so target is built with libtool, the function is reported by nm as LOCAL, instead of GLOBAL. Why? Other functions in the project come out as GLOBAL. If I run nm against the .o file in .libs the function is GLOBAL. So the linker is obviously deciding when building the .so that this particular function must be LOCAL.

As I'm not using the static keyword, I don't understand why this could be happening.  What am I missing?


Sent from my HTC

reply via email to

[Prev in Thread] Current Thread [Next in Thread]