Fix memory access problems exposed by fuzzed binaries.
[deliverable/binutils-gdb.git] / bfd / libaout.h
index d1d5b0ce3edf9196601422b6e4b2bc98d8e34e26..25277cbd087f100ec8815578e654641518fa1cbf 100644 (file)
@@ -1,7 +1,5 @@
 /* BFD back-end data structures for a.out (and similar) files.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2014 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -349,6 +347,21 @@ typedef struct aout_symbol
    Various things depend on this struct being around any time an a.out
    file is being handled.  An example is dbxread.c in GDB.  */
 
+enum aout_subformat {
+  default_format = 0,
+  /* Used on HP 9000/300 running HP/UX.  See hp300hpux.c.  */
+  gnu_encap_format,
+  /* Used on Linux, 386BSD, etc.  See include/aout/aout64.h.  */
+  q_magic_format
+};
+
+enum aout_magic {
+  undecided_magic = 0,
+  z_magic,
+  o_magic,
+  n_magic
+};
+
 struct aoutdata
 {
   struct internal_exec *hdr;           /* Exec file header.  */
@@ -384,22 +397,9 @@ struct aoutdata
   unsigned vma_adjusted : 1;
 
   /* Used when a bfd supports several highly similar formats.  */
-  enum
-    {
-      default_format = 0,
-      /* Used on HP 9000/300 running HP/UX.  See hp300hpux.c.  */
-      gnu_encap_format,
-      /* Used on Linux, 386BSD, etc.  See include/aout/aout64.h.  */
-      q_magic_format
-    } subformat;
-
-  enum
-    {
-      undecided_magic = 0,
-      z_magic,
-      o_magic,
-      n_magic
-    } magic;
+  enum aout_subformat subformat;
+
+  enum aout_magic magic;
 
   /* A buffer for find_nearest_line.  */
   char *line_buf;
@@ -551,8 +551,8 @@ extern void NAME (aout, get_symbol_info)
   (bfd *, asymbol *, symbol_info *);
 
 extern bfd_boolean NAME (aout, find_nearest_line)
-  (bfd *, asection *, asymbol **, bfd_vma, const char **,
-   const char **, unsigned int *);
+  (bfd *, asymbol **, asection *, bfd_vma,
+   const char **, const char **, unsigned int *, unsigned int *);
 
 extern long NAME (aout, read_minisymbols)
   (bfd *, bfd_boolean, void * *, unsigned int *);
This page took 0.024128 seconds and 4 git commands to generate.