This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Objcopy interleave fails if section address not multiple of interleave.
- From: Alan Modra <amodra at gmail dot com>
- To: Jim Wilson <jimw at sifive dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 7 Dec 2017 22:10:16 +1030
- Subject: Re: [PATCH] Objcopy interleave fails if section address not multiple of interleave.
- Authentication-results: sourceware.org; auth=none
- References: <20171206015429.23092-1-jimw@sifive.com>
On Tue, Dec 05, 2017 at 05:54:29PM -0800, Jim Wilson wrote:
> I ran make check on binutils, gas, and ld on riscv32, riscv64, and x86_64-linux
> and there were no regressions.
h8300-elf +FAIL: --interleave test byte 0
h8300-elf +FAIL: --interleave test byte 4
m32c-elf +FAIL: --interleave test byte 0
m32c-elf +FAIL: --interleave test byte 4
mips64-linux +FAIL: --interleave test byte 0
mips64-linux +FAIL: --interleave test byte 4
mipsel-linux-gnu +FAIL: --interleave test byte 0
mipsel-linux-gnu +FAIL: --interleave test byte 4
mipsisa32el-linux +FAIL: --interleave test byte 0
mipsisa32el-linux +FAIL: --interleave test byte 4
mips-linux +FAIL: --interleave test byte 0
mips-linux +FAIL: --interleave test byte 4
mipstx39-elf +FAIL: --interleave test byte 0
mipstx39-elf +FAIL: --interleave test byte 4
powerpc64le-linux +FAIL: --interleave test byte 0
powerpc64le-linux +FAIL: --interleave test byte 4
powerpc64-linux +FAIL: --interleave test byte 0
powerpc64-linux +FAIL: --interleave test byte 4
spu-elf +FAIL: --interleave test byte 0
spu-elf +FAIL: --interleave test byte 4
The following should fix it, but I'll wait to commit until my
testsuite run completes.
.text -> .data because some targets recognise .text sections and pad
with nops (m32c). Provided attribute because some targets warn on
sections without attributes (h8300). Discard any other sections to
prevent region overflow errors.
PR 22465
* testsuite/ld-elf/interleave.s: Use .data sections and provide
section attrs.
* testsuite/ld-elf/interleave.ld: Discard other sections. Adjust
for changed section names.
diff --git a/ld/testsuite/ld-elf/interleave.ld b/ld/testsuite/ld-elf/interleave.ld
index 6406166..4098436 100644
--- a/ld/testsuite/ld-elf/interleave.ld
+++ b/ld/testsuite/ld-elf/interleave.ld
@@ -5,6 +5,7 @@ MEMORY
}
SECTIONS
{
- .a0 : { *(.text.a0) } > x0
- .a1 : { *(.text.a1) } > x1
+ .a0 : { *(.data.a0) } > x0
+ .a1 : { *(.data.a1) } > x1
+ /DISCARD/ : { *(*) }
}
diff --git a/ld/testsuite/ld-elf/interleave.s b/ld/testsuite/ld-elf/interleave.s
index 490aa59..2fb66bd 100644
--- a/ld/testsuite/ld-elf/interleave.s
+++ b/ld/testsuite/ld-elf/interleave.s
@@ -1,4 +1,4 @@
- .section ".text.a0"
+ .section ".data.a0","aw",%progbits
.byte 0x00
.byte 0x01
.byte 0x02
@@ -7,7 +7,7 @@
.byte 0x05
.byte 0x06
.byte 0x07
- .section ".text.a1"
+ .section ".data.a1","aw",%progbits
.byte 0x10
.byte 0x11
.byte 0x12
--
Alan Modra
Australia Development Lab, IBM