diff options
author | Alan Modra <amodra@gmail.com> | 2003-07-27 11:58:28 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-07-27 11:58:28 +0000 |
commit | 7e7d57681b2ef3593d29069fb0b77d7daadc3fad (patch) | |
tree | 2398c37f556c404e3b78bd3b2113a1f34f378f36 /ld/ldlang.c | |
parent | 5d35169e36b4fffc737ea015723e034c9efd7906 (diff) | |
download | gdb-7e7d57681b2ef3593d29069fb0b77d7daadc3fad.zip gdb-7e7d57681b2ef3593d29069fb0b77d7daadc3fad.tar.gz gdb-7e7d57681b2ef3593d29069fb0b77d7daadc3fad.tar.bz2 |
* ld.texinfo: Typo fixes. Document SUBALIGN.
* ldgram.y (opt_subalign): Add.
* ldlex.l (SUBALIGN): Recognize.
* ldlang.c (overlay_subalign): New var.
(lang_enter_overlay): Add subalign param.
(lang_enter_overlay_section): Pass overlay_subalign to
lang_enter_output_section_statement.
* ldlang.h (lang_enter_overlay): Update.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 56d65eb..f443acd 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4649,6 +4649,8 @@ lang_add_nocrossref (struct lang_nocrossref *l) /* The overlay virtual address. */ static etree_type *overlay_vma; +/* And subsection alignment. */ +static etree_type *overlay_subalign; /* An expression for the maximum section size seen so far. */ static etree_type *overlay_max; @@ -4665,12 +4667,15 @@ static struct overlay_list *overlay_list; /* Start handling an overlay. */ void -lang_enter_overlay (etree_type *vma_expr) +lang_enter_overlay (etree_type *vma_expr, etree_type *subalign) { /* The grammar should prevent nested overlays from occurring. */ - ASSERT (overlay_vma == NULL && overlay_max == NULL); + ASSERT (overlay_vma == NULL + && overlay_subalign == NULL + && overlay_max == NULL); overlay_vma = vma_expr; + overlay_subalign = subalign; } /* Start a section in an overlay. We handle this by calling @@ -4684,7 +4689,7 @@ lang_enter_overlay_section (const char *name) etree_type *size; lang_enter_output_section_statement (name, overlay_vma, normal_section, - 0, 0, 0, 0); + 0, 0, overlay_subalign, 0); /* If this is the first section, then base the VMA of future sections on this one. This will work correctly even if `.' is |