Support for ELF's STT_COMMON symbol type

Ian Lance Taylor iant@google.com
Wed Oct 3 19:02:00 GMT 2007


Alan Modra <amodra@bigpond.net.au> writes:

> On Wed, Oct 03, 2007 at 12:07:06PM +0100, Nick Clifton wrote:
> >   You may want to look at PR 4799 where I have proposed a patch for
> 
> I haven't built with your patch yet, so you might already have this
> covered, but I note STT_COMMON syms should become STT_OBJECT when
> building final executables.  ld.so won't like STT_COMMON..

I hope that is not correct.  The point of STT_COMMON is so that the
program linker can identify common symbols in shared libraries, and do
the right symbol resolution.  The dynamic linker should treat
STT_COMMON like STT_OBJECT.

(Actually I'm not sure what the dynamic linker should do if it sees an
STT_COMMON symbol in both the executable and a shared library, and the
one in the shared library is larger.)

Ian



More information about the Binutils mailing list