2004-09-01 Jeff Johnston <jjohnstn@redhat.com>
[binutils-gdb.git] / ld / ldwrite.c
index b7637e079ff19e427955266b22f7bac59a36ca4e..a41a0e96c1f597971f35fd36ff1a48af55c1f14d 100644 (file)
@@ -251,10 +251,7 @@ build_link_order (lang_statement_union_type *statement)
                  link_order->u.indirect.section = i;
                  ASSERT (i->output_section == output_section);
                }
-             if (i->_cooked_size)
-               link_order->size = i->_cooked_size;
-             else
-               link_order->size = bfd_get_section_size_before_reloc (i);
+             link_order->size = i->size;
              link_order->offset = i->output_offset;
            }
        }
@@ -368,8 +365,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
   n->vma = s->vma;
   n->user_set_vma = s->user_set_vma;
   n->lma = s->lma;
-  n->_cooked_size = 0;
-  n->_raw_size = 0;
+  n->size = 0;
   n->output_offset = s->output_offset;
   n->output_section = n;
   n->orelocation = 0;
@@ -383,7 +379,7 @@ static void
 ds (asection *s)
 {
   struct bfd_link_order *l = s->link_order_head;
-  printf ("vma %x size %x\n", s->vma, s->_raw_size);
+  printf ("vma %x size %x\n", s->vma, s->size);
   while (l)
     {
       if (l->type == bfd_indirect_link_order)
@@ -469,10 +465,7 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
              if (info->relocatable)
                thisrelocs = sec->reloc_count;
 
-             if (sec->_cooked_size != 0)
-               thissize = sec->_cooked_size;
-             else
-               thissize = sec->_raw_size;
+             thissize = sec->size;
 
            }
          else if (info->relocatable
@@ -507,13 +500,8 @@ split_sections (bfd *abfd, struct bfd_link_info *info)
              dump ("before snip", cursor, n);
 
              shift_offset = p->offset;
-             if (cursor->_cooked_size != 0)
-               {
-                 n->_cooked_size = cursor->_cooked_size - shift_offset;
-                 cursor->_cooked_size = shift_offset;
-               }
-             n->_raw_size = cursor->_raw_size - shift_offset;
-             cursor->_raw_size = shift_offset;
+             n->size = cursor->size - shift_offset;
+             cursor->size = shift_offset;
 
              vma += shift_offset;
              n->lma = n->vma = vma;