aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-01-25 02:31:42 +0000
committerAlan Modra <amodra@gmail.com>2001-01-25 02:31:42 +0000
commit02aa14fb329dba348f0f893e7e838aac3ebeb939 (patch)
tree22eebc4825ce772e3862d5287cb3d005e32a9301 /ld/ldlang.c
parent05c6581e28a1d6ca8db3514a09b3bee2c4c7b9ee (diff)
downloadfsf-binutils-gdb-02aa14fb329dba348f0f893e7e838aac3ebeb939.zip
fsf-binutils-gdb-02aa14fb329dba348f0f893e7e838aac3ebeb939.tar.gz
fsf-binutils-gdb-02aa14fb329dba348f0f893e7e838aac3ebeb939.tar.bz2
(lang_leave_overlay): Don't set lma_region when load_base is specified.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 2baf13b..32097fa 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;