[Top][All Lists]

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

Re: Local function in shared object?

From: Peter O'Gorman
Subject: Re: Local function in shared object?
Date: Wed, 07 Dec 2011 13:42:09 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110906 Fedora/3.1.14-1.fc14 Thunderbird/3.1.14

On 12/07/2011 11:45 AM, Mark R Bannister wrote:

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

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?


How is the .so being created? Is a linker script or libtool's export symbols flags being used?


reply via email to

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