diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-03-25 22:22:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-03-25 22:22:29 +0000 |
commit | f078dc7cf26a816ef0bb66be8b819ac549486e86 (patch) | |
tree | 830d8d6d38ee9109ba3989510b1fd0c56410ca36 /ld/ldlang.c | |
parent | 5517168c9e0b01d40d1a758858a32de5ce434a98 (diff) | |
download | gdb-f078dc7cf26a816ef0bb66be8b819ac549486e86.zip gdb-f078dc7cf26a816ef0bb66be8b819ac549486e86.tar.gz gdb-f078dc7cf26a816ef0bb66be8b819ac549486e86.tar.bz2 |
* ldlang.c (print_input_section): For section size, use
_cooked_size if it is non-zero, size otherwise.
(size_input_section): Likewise.
(lang_do_assignments): Likewise (case lang_input_section_enum).
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 484a8d0..e49bf95 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1281,9 +1281,7 @@ print_input_section (in) lang_input_section_type * in; { asection *i = in->section; - int size = i->reloc_done ? - bfd_get_section_size_after_reloc (i) : - bfd_get_section_size_before_reloc (i); + bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size; if (size != 0) { @@ -1611,14 +1609,10 @@ size_input_section (this_ptr, output_section_statement, fill, dot, relax) /* Mark how big the output section must be to contain this now */ - if (relax) - { - dot += i->_cooked_size; - } + if (i->_cooked_size != 0) + dot += i->_cooked_size; else - { - dot += i->_raw_size; - } + dot += i->_raw_size; output_section_statement->bfd_section->_raw_size = dot - output_section_statement->bfd_section->vma; } else @@ -1982,7 +1976,10 @@ lang_do_assignments (s, output_section_statement, fill, dot) { asection *in = s->input_section.section; - dot += bfd_get_section_size_before_reloc (in); + if (in->_cooked_size != 0) + dot += in->_cooked_size; + else + dot += in->_raw_size; } break; |