PR 9923
[deliverable/binutils-gdb.git] / bfd / pef.c
index 92a580907e440973bacac8c766d4ffd0c04c5ba6..b839095146d157529eaf9eba5b39509074dd054b 100644 (file)
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -1,12 +1,12 @@
 /* PEF support for BFD.
-   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
+#include "sysdep.h"
 #include "safe-ctype.h"
 #include "pef.h"
 #include "pef-traceback.h"
 #include "bfd.h"
-#include "sysdep.h"
 #include "libbfd.h"
 #include "libiberty.h"
 
 #define bfd_pef_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 #define bfd_pef_get_lineno                          _bfd_nosymbols_get_lineno
 #define bfd_pef_find_nearest_line                   _bfd_nosymbols_find_nearest_line
+#define bfd_pef_find_inliner_info                   _bfd_nosymbols_find_inliner_info
 #define bfd_pef_bfd_make_debug_symbol               _bfd_nosymbols_bfd_make_debug_symbol
 #define bfd_pef_read_minisymbols                    _bfd_generic_read_minisymbols
 #define bfd_pef_minisymbol_to_symbol                _bfd_generic_minisymbol_to_symbol
-#define bfd_pef_get_reloc_upper_bound               _bfd_norelocs_get_reloc_upper_bound
-#define bfd_pef_canonicalize_reloc                  _bfd_norelocs_canonicalize_reloc
-#define bfd_pef_bfd_reloc_type_lookup               _bfd_norelocs_bfd_reloc_type_lookup
 #define bfd_pef_set_arch_mach                       _bfd_generic_set_arch_mach
 #define bfd_pef_get_section_contents                _bfd_generic_get_section_contents
 #define bfd_pef_set_section_contents                _bfd_generic_set_section_contents
@@ -98,7 +97,7 @@ bfd_pef_parse_traceback_table (bfd *abfd,
   if (! (table.flags2 & TB_NAME_PRESENT))
     return -1;
 
-  if (! table.flags1 & TB_HAS_TBOFF)
+  if (! (table.flags1 & TB_HAS_TBOFF))
     return -1;
 
   offset = 8;
@@ -187,7 +186,7 @@ bfd_pef_parse_traceback_table (bfd *abfd,
     offset += 4;
 
   if (file != NULL)
-    fprintf (file, " [length = 0x%lx]", (long) offset);
+    fprintf (file, " [length = 0x%lx]", (unsigned long) offset);
 
   return offset;
 }
@@ -208,7 +207,7 @@ bfd_pef_print_symbol (bfd *abfd,
     default:
       bfd_print_symbol_vandf (abfd, (void *) file, symbol);
       fprintf (file, " %-5s %s", symbol->section->name, symbol->name);
-      if (strncmp (symbol->name, "__traceback_", strlen ("__traceback_")) == 0)
+      if (CONST_STRNEQ (symbol->name, "__traceback_"))
        {
          unsigned char *buf = alloca (symbol->udata.i);
          size_t offset = symbol->value + 4;
@@ -986,11 +985,7 @@ bfd_pef_canonicalize_symtab (bfd *abfd, asymbol **alocation)
   return ret;
 }
 
-static asymbol *
-bfd_pef_make_empty_symbol (bfd *abfd)
-{
-  return bfd_alloc (abfd, sizeof (asymbol));
-}
+#define bfd_pef_make_empty_symbol _bfd_generic_make_empty_symbol
 
 static void
 bfd_pef_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
@@ -1001,7 +996,8 @@ bfd_pef_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
 }
 
 static int
-bfd_pef_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+bfd_pef_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+                       struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return 0;
 }
@@ -1050,7 +1046,7 @@ const bfd_target pef_vec =
   BFD_JUMP_TABLE_CORE (_bfd_nocore),
   BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
   BFD_JUMP_TABLE_SYMBOLS (bfd_pef),
-  BFD_JUMP_TABLE_RELOCS (bfd_pef),
+  BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
   BFD_JUMP_TABLE_WRITE (bfd_pef),
   BFD_JUMP_TABLE_LINK (bfd_pef),
   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
This page took 0.023927 seconds and 4 git commands to generate.