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: [RFC] PR ld/13621


On Mon, Jan 30, 2012 at 01:56:26PM +1030, Alan Modra wrote:
> On Mon, Jan 30, 2012 at 11:56:49AM +1100, Richard Henderson wrote:
> > This PR is about elflint warning about symbols outside of the section
> > with which they are associated.
> 
> Huh.  So what's wrong with a symbol belonging to a section but defined
> outside of 0..section_size-1?  Particularly if it happens to be
> defined at section_size.  That's quite a natural way to mark out the
> bounds of an array.  I think this is just elflint being silly.

elflint allows the sillyness of marking out the bounds of the section.
That is precisely what happens here, the symbol is used to mark the
end of the section (section_size), but then the whole section that
the symbol is associated with is removed. So now the symbol is
associated with some other random section, and points into some other
one that now is associated with the address of the symbol. In that
case it seems natural to at least mark the symbol as being associated
with SHN_ABS as Richard did, but it would be even better if ld didn't
just toss out a section that has symbols associated with it, so that
the address of the symbol at least matches up.

Cheers,

Mark


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