Support for ELF's STT_COMMON symbol type

H.J. Lu hjl@lucon.org
Tue Oct 16 15:41:00 GMT 2007


On Tue, Oct 16, 2007 at 03:44:41PM +0100, Nick Clifton wrote:
> Hi Guys,
> 
>   Right, I have checked my patch in.  (It was becoming very annoying to 
>   have to revet parts of it locally, in order to process other patches).  I 
> have set the default behaviour to be not to use STT_COMMON in executables 
> or shared libraries, so the patch will not affect loaders.
> 

I think the linker tests are very limited. Much more testcases are
needed.

# grep STT_OBJECT elf*.?

shows that you need to handle STT_COMMON in many places. I believe
assembler should generate STT_COMMON only when

type foo, %common

is used. Also linker should generate STT_COMMON in shared library
and executable only when STT_COMMON in object file is seen.
_bfd_elf_merge_symbol and others should to modified to handle it.
Also I don't think it should be a configure time option at command
line.


H.J.



More information about the Binutils mailing list