This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Stripping empty sections
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 8 Jul 2005 05:32:07 -0400 (EDT)
- Subject: Re: Stripping empty sections
- References: <20050610103735.GB30603@bubble.grove.modra.org><20050708060359.GD30960@bubble.grove.modra.org>
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?
> Index: ld/testsuite/ld-cris/pv32.s
> ===================================================================
> RCS file: /cvs/src/src/ld/testsuite/ld-cris/pv32.s,v
> retrieving revision 1.1
> diff -u -p -r1.1 pv32.s
> --- ld/testsuite/ld-cris/pv32.s 4 Nov 2004 15:04:05 -0000 1.1
> +++ ld/testsuite/ld-cris/pv32.s 7 Jul 2005 04:39:31 -0000
> @@ -14,6 +14,8 @@ pfn:
> .Lfe1:
> .size pfn,.Lfe1-pfn
>
> + .global expobj
> + .size expobj,4
> .global dsofn
> .type dsofn,@function
> dsofn:
Mmph, why not in expdyn1.s, where it's defined?
> 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. Pretty please
fix, say in sec-7a.s.