diff options
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r-- | bfd/mmo.c | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -665,7 +665,7 @@ mmo_find_sec_w_addr (abfd, sec, p) != (SEC_LOAD | SEC_ALLOC)) return; - if (infop->addr >= vma && infop->addr < vma + sec->_raw_size) + if (infop->addr >= vma && infop->addr < vma + sec->size) infop->sec = sec; } @@ -1168,8 +1168,7 @@ mmo_get_spec_section (abfd, spec_data_number) bfd_sec_flags_from_mmo_flags (flags) | bfd_get_section_flags (abfd, sec) | (section_length != 0 ? SEC_HAS_CONTENTS : 0)) - || ! bfd_set_section_size (abfd, sec, - sec->_cooked_size + section_length) + || ! bfd_set_section_size (abfd, sec, sec->size + section_length) /* Set VMA only for the first occurrence. */ || (! sec->user_set_vma && ! bfd_set_section_vma (abfd, sec, section_vma))) @@ -1545,8 +1544,8 @@ mmo_get_loc (sec, vma, size) non-32-bit-aligned sections should do all allocation and size-setting by themselves or at least set the section size after the last allocating call to this function. */ - if (vma + size > sec->vma + sec->_raw_size) - sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size); + if (vma + size > sec->vma + sec->size) + sec->size += (vma + size) - (sec->vma + sec->size); return datap->data + vma - datap->where; } @@ -1608,8 +1607,8 @@ mmo_get_loc (sec, vma, size) /* Update the section size. This happens only when we add contents and re-size as we go. The section size will then be aligned to 32 bits. */ - if (vma + size > sec->vma + sec->_raw_size) - sec->_raw_size += (vma + size) - (sec->vma + sec->_raw_size); + if (vma + size > sec->vma + sec->size) + sec->size += (vma + size) - (sec->vma + sec->size); return entry->data; } @@ -1621,7 +1620,6 @@ mmo_map_set_sizes (abfd, sec, ignored) asection *sec; PTR ignored ATTRIBUTE_UNUSED; { - sec->_cooked_size = sec->_raw_size; sec->lma = sec->vma; } @@ -2269,7 +2267,7 @@ mmo_canonicalize_symtab (abfd, alocation) if (textsec != NULL && c->value >= textsec->vma - && c->value <= textsec->vma + textsec->_cooked_size) + && c->value <= textsec->vma + textsec->size) { c->section = textsec; c->value -= c->section->vma; @@ -2486,7 +2484,7 @@ mmo_internal_write_section (abfd, sec) /* Ignore sections that are just allocated or empty; we write out _contents_ here. */ else if ((bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS) != 0 - && sec->_raw_size != 0) + && sec->size != 0) { /* Keep the document-comment formatted the way it is. */ /* @@ -2592,7 +2590,7 @@ EXAMPLE mmo_write_tetra (abfd, mmo_sec_flags_from_bfd_flags (bfd_get_section_flags (abfd, sec))); - mmo_write_octa (abfd, sec->_raw_size); + mmo_write_octa (abfd, sec->size); mmo_write_octa (abfd, bfd_get_section_vma (abfd, sec)); /* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually @@ -3181,11 +3179,11 @@ mmo_write_object_contents (abfd) of the register contents section and check that it corresponds to the length of the section. */ if (z < 32 || z >= 255 || (sec->vma & 7) != 0 - || sec->vma != 256 * 8 - sec->_raw_size - 8) + || sec->vma != 256 * 8 - sec->size - 8) { bfd_set_error (bfd_error_bad_value); - if (sec->_raw_size == 0) + if (sec->size == 0) /* There must always be at least one such register. */ (*_bfd_error_handler) (_("%s: no initialized registers; section length 0\n"), @@ -3196,13 +3194,13 @@ mmo_write_object_contents (abfd) (*_bfd_error_handler) (_("%s: too many initialized registers; section length %ld\n"), bfd_get_filename (abfd), - (long) sec->_raw_size); + (long) sec->size); else (*_bfd_error_handler) (_("%s: invalid start address for initialized registers of\ length %ld: 0x%lx%08lx\n"), bfd_get_filename (abfd), - (long) sec->_raw_size, + (long) sec->size, (unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma)); return FALSE; |