bfd/
[deliverable/binutils-gdb.git] / bfd / bout.c
index b839929c38f0c41658aa4ae7ad14b604412ee6a6..63c30844bc4b6fae11a705bbcd457491c4bdcdb0 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for Intel 960 b.out binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002
+   2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -61,7 +61,7 @@ static int b_out_sizeof_headers
 static bfd_boolean b_out_set_arch_mach
   PARAMS ((bfd *, enum bfd_architecture, unsigned long));
 static bfd_boolean b_out_set_section_contents
-  PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+  PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
 static long b_out_get_reloc_upper_bound
   PARAMS ((bfd *, sec_ptr));
 static long b_out_canonicalize_reloc
@@ -200,7 +200,7 @@ b_out_callback (abfd)
   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
 
   /* And reload the sizes, since the aout module zaps them.  */
-  obj_textsec (abfd)->_raw_size = execp->a_text;
+  obj_textsec (abfd)->size = execp->a_text;
 
   bss_start = execp->a_dload + execp->a_data; /* BSS = end of data section */
   obj_bsssec (abfd)->vma = align_power (bss_start, execp->a_balign);
@@ -294,9 +294,9 @@ b_out_write_object_contents (abfd)
 
   exec_hdr (abfd)->a_info = BMAGIC;
 
-  exec_hdr (abfd)->a_text = obj_textsec (abfd)->_raw_size;
-  exec_hdr (abfd)->a_data = obj_datasec (abfd)->_raw_size;
-  exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->_raw_size;
+  exec_hdr (abfd)->a_text = obj_textsec (abfd)->size;
+  exec_hdr (abfd)->a_data = obj_datasec (abfd)->size;
+  exec_hdr (abfd)->a_bss = obj_bsssec (abfd)->size;
   exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd) * sizeof (struct nlist);
   exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
   exec_hdr (abfd)->a_trsize = ((obj_textsec (abfd)->reloc_count) *
@@ -983,7 +983,7 @@ static bfd_boolean
 b_out_set_section_contents (abfd, section, location, offset, count)
      bfd *abfd;
      asection *section;
-     PTR location;
+     const PTR location;
      file_ptr offset;
      bfd_size_type count;
 {
@@ -995,7 +995,7 @@ b_out_set_section_contents (abfd, section, location, offset, count)
 
       obj_textsec (abfd)->filepos = sizeof (struct internal_exec);
       obj_datasec(abfd)->filepos = obj_textsec(abfd)->filepos
-       +  obj_textsec (abfd)->_raw_size;
+       +  obj_textsec (abfd)->size;
     }
 
   /* Regardless, once we know what we're doing, we might as well get going.  */
@@ -1285,7 +1285,7 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
            }
        }
     }
-  input_section->_cooked_size = input_section->_raw_size - shrink;
+  input_section->size -= shrink;
 
   if (reloc_vector != NULL)
     free (reloc_vector);
@@ -1298,12 +1298,12 @@ b_out_bfd_relax_section (abfd, i, link_info, again)
 
 static bfd_byte *
 b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
-                                         data, relocateable, symbols)
+                                         data, relocatable, symbols)
      bfd *output_bfd;
      struct bfd_link_info *link_info;
      struct bfd_link_order *link_order;
      bfd_byte *data;
-     bfd_boolean relocateable;
+     bfd_boolean relocatable;
      asymbol **symbols;
 {
   /* Get enough memory to hold the stuff.  */
@@ -1317,25 +1317,23 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
   if (reloc_size < 0)
     goto error_return;
 
-  /* If producing relocateable output, don't bother to relax.  */
-  if (relocateable)
+  /* If producing relocatable output, don't bother to relax.  */
+  if (relocatable)
     return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
                                                       link_order,
-                                                      data, relocateable,
+                                                      data, relocatable,
                                                       symbols);
 
   reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
   if (reloc_vector == NULL && reloc_size != 0)
     goto error_return;
 
-  input_section->reloc_done = 1;
-
   /* Read in the section.  */
   BFD_ASSERT (bfd_get_section_contents (input_bfd,
                                        input_section,
                                        data,
                                        (bfd_vma) 0,
-                                       input_section->_raw_size));
+                                       input_section->size));
 
   reloc_count = bfd_canonicalize_reloc (input_bfd,
                                        input_section,
@@ -1404,7 +1402,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
                case ALIGNDONE:
                  BFD_ASSERT (reloc->addend >= src_address);
                  BFD_ASSERT ((bfd_vma) reloc->addend
-                             <= input_section->_raw_size);
+                             <= input_section->size);
                  src_address = reloc->addend;
                  dst_address = ((dst_address + reloc->howto->size)
                                 & ~reloc->howto->size);
@@ -1487,6 +1485,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
 #define b_out_bfd_link_split_section  _bfd_generic_link_split_section
 #define b_out_bfd_gc_sections  bfd_generic_gc_sections
 #define b_out_bfd_merge_sections  bfd_generic_merge_sections
+#define b_out_bfd_is_group_section bfd_generic_is_group_section
 #define b_out_bfd_discard_group bfd_generic_discard_group
 
 #define aout_32_get_section_contents_in_window \
This page took 0.026756 seconds and 4 git commands to generate.