This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Overlay problem
- To: "binutils at sourceware dot cygnus dot com" <binutils at sourceware dot cygnus dot com>
- Subject: Overlay problem
- From: Jim Driftmyer <jdrift at stny dot rr dot com>
- Date: Thu, 18 Jan 2001 20:20:05 -0500
Hi,
I'm having a problem with overlays. Using the m68k-coff target, when
using an overlay, I get an error message of "use an absolute load
address or a load memory region, not both". A short test is:
overlay.s -
.section .one
a: .int 1
.section .two
b: .int 2
overlay.lnk -
SECTIONS
{
.text :
{
*(.text)
}
OVERLAY : NOCROSSREFS {
.one { *(.one)}
.two { *(.two)}
}
}
as -o overlay.o overlay.s
ld -Toverlay.lnk -o overlay overlay.o
This use to work in previous the 2.9.1 release. From what I can tell,
the error started from the 1.23 update to ldlang.c. The CVS log message
is "Add LMA memory region functionality.". Anyway, the specific problem
seems to be that ldlang.c
was updated to initialize lma_region in the 'lang_leave_overlay' routine
with the following two lines:
if (lma_region != NULL && l->os->lma_region == NULL)
l->os->lma_region = lma_region;
This causes a conflict in the 'lang_size_region' routine, since
lma_region is no longer NULL:
if (os->lma_region != NULL)
{
if (os->load_base != NULL)
{
einfo (_("%X%P: use an absolute load address or a load memory region,
not both\n"));
Removing either one of these two will remove the error message. Anyone
have any idea on the impact of removing one or the other, or better yet
what the correct fix would be?