diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-04-15 18:37:05 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-04-15 18:37:05 +0000 |
commit | 9d87af5697d373e07bd70190aff7f107e4a2665d (patch) | |
tree | 69471c091756d76c6e102e6ff6093efa0525d70b /ld/ldlang.c | |
parent | ef79dba3c39b6edcf4d1e343457bfd29ec868069 (diff) | |
download | gdb-9d87af5697d373e07bd70190aff7f107e4a2665d.zip gdb-9d87af5697d373e07bd70190aff7f107e4a2665d.tar.gz gdb-9d87af5697d373e07bd70190aff7f107e4a2665d.tar.bz2 |
* ldlang.c (lang_size_sections): When relaxing, adjust the
position of a padding statement, and adjust dot accordingly.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index e49bf95..a7ae973 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1873,11 +1873,23 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax) } break; + + case lang_padding_statement_enum: + /* If we are relaxing, and this is not the first pass, some + padding statements may have been inserted during previous + passes. We may have to move the padding statement to a new + location if dot has a different value at this point in this + pass than it did at this point in the previous pass. */ + s->padding_statement.output_offset = + dot - output_section_statement->bfd_section->vma; + dot += s->padding_statement.size; + break; + default: FAIL (); break; + /* This can only get here when relaxing is turned on */ - case lang_padding_statement_enum: case lang_address_statement_enum: break; |