This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch] bfd/elf.c: fix section overlap warning again
> Testcase?
Here's the vastly simplified example:
overflow.x : overflow.s overflow.ld
rx-elf-as overflow.s -o overflow.o
rx-elf-ld overflow.o -o overflow.x -T overflow.ld
.section ".sec1","ax"
.space 64
.section ".sec2","ax"
.space 16
OUTPUT_ARCH(rx)
SECTIONS {
.sec1 0xffffffe0 : AT(0xffffffe0) { *(.sec1) }
.sec2 0xfffffff0 : AT(0xfffffff0) { *(.sec2) }
}
Without the patch, you get:
rx-elf-ld: overflow.x: section `.sec1' can't be allocated in segment 0
LOAD: .sec1 .sec2
rx-elf-ld: overflow.x: section `.sec2' can't be allocated in segment 0
LOAD: .sec1 .sec2