*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / binary.c
index 458626f02a35ceb29bd416b1d2e9c4446b34d839..b5347dd4ba4506e3da7e93605ee8e0eff51c223e 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for binary objects.
    Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-   2004, 2005 Free Software Foundation, Inc.
+   2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -32,8 +32,8 @@
    the file.  objcopy cooperates by specially setting the start
    address to zero by default.  */
 
-#include "bfd.h"
 #include "sysdep.h"
+#include "bfd.h"
 #include "safe-ctype.h"
 #include "libbfd.h"
 
@@ -63,6 +63,7 @@ binary_object_p (bfd *abfd)
 {
   struct stat statbuf;
   asection *sec;
+  flagword flags;
 
   if (abfd->target_defaulted)
     {
@@ -80,10 +81,10 @@ binary_object_p (bfd *abfd)
     }
 
   /* One data section.  */
-  sec = bfd_make_section (abfd, ".data");
+  flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
+  sec = bfd_make_section_with_flags (abfd, ".data", flags);
   if (sec == NULL)
     return NULL;
-  sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
   sec->vma = 0;
   sec->size = statbuf.st_size;
   sec->filepos = 0;
@@ -220,9 +221,6 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
 #define binary_bfd_make_debug_symbol       _bfd_nosymbols_bfd_make_debug_symbol
 #define binary_read_minisymbols            _bfd_generic_read_minisymbols
 #define binary_minisymbol_to_symbol        _bfd_generic_minisymbol_to_symbol
-#define binary_bfd_reloc_type_lookup       _bfd_norelocs_bfd_reloc_type_lookup
-#define binary_get_reloc_upper_bound        ((long (*) (bfd *, asection *)) bfd_0l)
-#define binary_canonicalize_reloc           ((long (*) (bfd *, asection *, arelent **, asymbol **)) bfd_0l)
 #define binary_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 
 /* Set the architecture of a binary file.  */
@@ -305,7 +303,7 @@ binary_set_section_contents (bfd *abfd,
 
 static int
 binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
-                      bfd_boolean exec ATTRIBUTE_UNUSED)
+                      struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return 0;
 }
@@ -367,7 +365,7 @@ const bfd_target binary_vec =
   BFD_JUMP_TABLE_CORE (_bfd_nocore),
   BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
   BFD_JUMP_TABLE_SYMBOLS (binary),
-  BFD_JUMP_TABLE_RELOCS (binary),
+  BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
   BFD_JUMP_TABLE_WRITE (binary),
   BFD_JUMP_TABLE_LINK (binary),
   BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
This page took 0.025061 seconds and 4 git commands to generate.