This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: Assign regions to orphan sections
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Daniel Jacobowitz <dan at codesourcery dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, binutils at sourceware dot org, Carlos O'Donell <carlos at codesourcery dot com>
- Date: Thu, 6 May 2010 19:51:47 +0000 (UTC)
- Subject: Re: RFC: Assign regions to orphan sections
- References: <20100315221743.GQ9310@caradoc.them.org> <Pine.LNX.4.64.1003252212320.28769@digraph.polyomino.org.uk> <20100325221611.GS9310@caradoc.them.org> <Pine.LNX.4.64.1003252226570.28769@digraph.polyomino.org.uk> <20100325223415.GU9310@caradoc.them.org> <mcrr5n7rjez.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <20100326134137.GA9310@caradoc.them.org> <Pine.LNX.4.64.1004281522500.12195@digraph.polyomino.org.uk> <20100503222653.GX8410@caradoc.them.org>
On Mon, 3 May 2010, Daniel Jacobowitz wrote:
> Does ld -N do the trick? There may be some other oddities with
> objcopy, because BFD autodetects D_PAGED on input files with program
> headers based on the maxpagesize / minpagesize.
With -N, the test still fails, but because it has "RWE" where "R E" is
expected.
regexp_diff match failure
regexp "^ LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x[0-9a-f]+$"
line " LOAD 0x000054 0x40000000 0x40000000 0x0000c 0x0000c RWE 0x4"
FAIL: ld-elf/orphan-region
But it also fails the same way with -N for i686-pc-linux-gnu so I assume
this is simply an expected consequence of using -N. With this patch
applied to adjust the expectation as well as using -N, it passes for both
c6x-elf and i686-pc-linux-gnu. OK to commit?
2010-05-06 Joseph Myers <joseph@codesourcery.com>
* ld-elf/orphan-region.d: Use ld -N.
Index: ld/testsuite/ld-elf/orphan-region.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elf/orphan-region.d,v
retrieving revision 1.1
diff -u -r1.1 orphan-region.d
--- ld/testsuite/ld-elf/orphan-region.d 16 Mar 2010 14:14:40 -0000 1.1
+++ ld/testsuite/ld-elf/orphan-region.d 6 May 2010 19:50:16 -0000
@@ -1,5 +1,5 @@
#source: orphan-region.s
-#ld: -T orphan-region.ld
+#ld: -T orphan-region.ld -N
#readelf: -S -l --wide
#...
@@ -9,7 +9,7 @@
#...
Program Headers:
Type.*
- LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x[0-9a-f]+
+ LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
Section to Segment mapping:
Segment Sections...
--
Joseph S. Myers
joseph@codesourcery.com