s/struct _serial_t/struct serial/
[deliverable/binutils-gdb.git] / bfd / aoutx.h
index a050b8bba5f3f39b36e253729043ba5679bfd1b0..6119564e237e5197a62a498fe53aeca3a5e10974 100644 (file)
@@ -1,5 +1,6 @@
 /* BFD semi-generic back-end for a.out binaries.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+   2001
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -775,8 +776,14 @@ NAME(aout,machine_type) (arch, machine, unknown)
     case bfd_mach_mips4650:
     case bfd_mach_mips8000:
     case bfd_mach_mips10000:
+    case bfd_mach_mips12000:
     case bfd_mach_mips16:
-      /* FIXME: These should be MIPS3 or MIPS4.  */
+    case bfd_mach_mips32:
+    case bfd_mach_mips32_4k:
+    case bfd_mach_mips5:
+    case bfd_mach_mips64:
+    case bfd_mach_mips_sb1:
+      /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc.  */
       arch_flags = M_MIPS2;
       break;
     default:
@@ -999,10 +1006,14 @@ adjust_z_magic (abfd, execp)
     }
   if (abdp && abdp->zmagic_mapped_contiguous)
     {
-      text_pad = (obj_datasec(abfd)->vma
-                 - obj_textsec(abfd)->vma
-                 - obj_textsec(abfd)->_raw_size);
-      obj_textsec(abfd)->_raw_size += text_pad;
+      asection * text = obj_textsec (abfd);
+      asection * data = obj_datasec (abfd);
+
+      text_pad = data->vma - (text->vma + text->_raw_size);
+      /* Only pad the text section if the data
+        section is going to be placed after it.  */
+      if (text_pad > 0)
+       text->_raw_size += text_pad;
     }
   obj_datasec(abfd)->filepos = (obj_textsec(abfd)->filepos
                                + obj_textsec(abfd)->_raw_size);
@@ -1972,7 +1983,6 @@ error_return:
   _bfd_stringtab_free (strtab);
   return false;
 }
-
 \f
 long
 NAME(aout,get_symtab) (abfd, location)
@@ -1990,7 +2000,6 @@ NAME(aout,get_symtab) (abfd, location)
     *location++ =0;
     return bfd_get_symcount (abfd);
 }
-
 \f
 /* Standard reloc stuff */
 /* Output standard relocation information to a file in target byte order.  */
@@ -2533,7 +2542,6 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect)
   bfd_set_error (bfd_error_invalid_operation);
   return -1;
 }
-
 \f
 long
 NAME(aout,get_symtab_upper_bound) (abfd)
@@ -2904,7 +2912,8 @@ NAME(aout,bfd_free_cached_info) (abfd)
 {
   asection *o;
 
-  if (bfd_get_format (abfd) != bfd_object)
+  if (bfd_get_format (abfd) != bfd_object
+      || abfd->tdata.aout_data == NULL)
     return true;
 
 #define BFCI_FREE(x) if (x != NULL) { free (x); x = NULL; }
@@ -4337,6 +4346,7 @@ aout_link_write_symbols (finfo, input_bfd)
              switch (discard)
                {
                case discard_none:
+               case discard_sec_merge:
                  break;
                case discard_l:
                  if ((type & N_STAB) == 0
This page took 0.025003 seconds and 4 git commands to generate.