aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-01-23 11:48:28 +0000
committerAlan Modra <amodra@gmail.com>2001-01-23 11:48:28 +0000
commitc1eb148815418b80717c0abcba633c6cfc098133 (patch)
treeacce3483704027c8ae2635bc066dd1fec0be1c3e /ld/ldlang.c
parentb653e1b1521ac68fc398311345fe7df54803f1ec (diff)
downloadgdb-c1eb148815418b80717c0abcba633c6cfc098133.zip
gdb-c1eb148815418b80717c0abcba633c6cfc098133.tar.gz
gdb-c1eb148815418b80717c0abcba633c6cfc098133.tar.bz2
Only set lma_region from the default for the first section
of a group of overlay sections.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index bc25f04..2baf13b 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4780,7 +4780,10 @@ lang_leave_overlay (fill, memspec, phdrs, lma_memspec)
l->os->fill = fill;
if (region != NULL && l->os->region == NULL)
l->os->region = region;
- if (lma_region != NULL && l->os->lma_region == NULL)
+ /* 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)
l->os->lma_region = lma_region;
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;