This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support for ELF's STT_COMMON symbol type


On Tue, Oct 09, 2007 at 05:05:43PM +0100, Nick Clifton wrote:
> Hi H.J.
> 
> >I think STT_COMMON should be enabled by default. But we only
> >generate it when
> >
> >.type foo, %common
> >
> >is used. Given that gcc doesn't generate it, it should be OK.
> 
> I think that would be a bad idea because then we would have two types of 
> commons inside bfd.  Those that had had ".type %common" set for them and 
> those that had not.  Such a situation would be far too likely to create new 
> bugs in my opinion.
> 

STT_COMMON and STT_OBJECT/SHN_COMMON are different. Otherwise,
we don't need both. We have to deal with mixed STT_COMMON in
relocatable file/DSO and STT_OBJECT/SHN_COMMON from relocatable
files. I think linker can keep track of STT_COMMON and
STT_OBJECT/SHN_COMMON.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]