From 02aa14fb329dba348f0f893e7e838aac3ebeb939 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 25 Jan 2001 02:31:42 +0000 Subject: [PATCH] (lang_leave_overlay): Don't set lma_region when load_base is specified. --- ld/ChangeLog | 5 +++++ ld/ldlang.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index cdd999c47e2..d8e79b53898 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2001-01-25 Jim Driftmyer + + * ldlang.c (lang_leave_overlay): Don't set lma_region when + load_base is specified. + 2001-01-24 Hans-Peter Nilsson * emultempl/elf32.em: Correct spelling in comments and listed diff --git a/ld/ldlang.c b/ld/ldlang.c index 2baf13b85df..32097faf694 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4782,8 +4782,12 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec) l->os->region = region; /* We only set lma_region for the first overlay section, as subsequent overlay sections will have load_base set relative - to the first section. */ - if (lma_region != NULL && l->os->lma_region == NULL && l->next == NULL) + to the first section. Also, don't set lma_region if + load_base is specified. FIXME: There should really be a test + that `AT ( LDADDR )' doesn't conflict with `AT >LMA_REGION' + rather than letting LDADDR simply override LMA_REGION. */ + if (lma_region != NULL && l->os->lma_region == NULL + && l->next == NULL && l->os->load_base == NULL) l->os->lma_region = lma_region; if (phdrs != NULL && l->os->phdrs == NULL) l->os->phdrs = phdrs; -- 2.30.2