This is the mail archive of the binutils@sources.redhat.com 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: Stripping empty sections


On Fri, Jul 08, 2005 at 05:32:07AM -0400, Hans-Peter Nilsson wrote:
> A few bugs.
> 
> On Fri, 8 Jul 2005, Alan Modra wrote:
> 
> > ld/testsuite/
> > 	* ld-cris/pv32.s: Give expobj a size.
> 
> Why, here?  Previously it was an undefined symbol defined
> elsewhere (see below).  Why does it have to have a size *here*?
> Why doesn't that affect the test?

It needs a size *somewhere*.  A zero size doesn't allocate space in
.dynbss.  I'm minded to put an assert in adjust_dynamic_symbol,
because a zero size sym with a copy reloc just doesn't make sense.
Either that, or say we don't need a copy reloc.

> Mmph, why not in expdyn1.s, where it's defined?

Yeah, that would probably be better.

> > RCS file: /cvs/src/src/ld/testsuite/ld-mmix/sec-7m.d,v
> > retrieving revision 1.3
> > diff -u -p -r1.3 sec-7m.d
> > --- ld/testsuite/ld-mmix/sec-7m.d	12 May 2003 05:45:38 -0000	1.3
> > +++ ld/testsuite/ld-mmix/sec-7m.d	8 Jul 2005 03:26:07 -0000
> > @@ -20,19 +20,19 @@ Sections:
> >  Idx Name[ ]+Size[ ]+VMA[ ]+LMA[ ]+File off  Algn
> >    0 \.text[ ]+0+4  0+  0+  0+  2\*\*2
> >  [ ]+CONTENTS, ALLOC, LOAD, CODE
> > -  1 \.di           0+27ffb  2000000000000000  2000000000000000  0+  2\*\*2
> > +  1 \.di +0+27ffb +0+4 +0+4 +0+ +2\*\*2
> 
> This whole section moved?  Is that right?  Hm, I don't set it to
> writable anywhere in the input, so maybe moving it to the code
> area (0... not 2...) is something that can be expected.  Still,
> it subverts the original test which expected to get a (separate)
> sequence of bytes in a new section, not .text.

Well, it is in a new section!  The section moved because previously you
had an intervening zero size .data section that was located at 2...

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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