2006-09-05 Bibo Mao <bibo.mao@intel.com>
[deliverable/binutils-gdb.git] / bfd / ppcboot.c
index 3444caa8be7b8c1b03a3417037fc12a259d309cf..f7bb6aaf6561d1cbde238cad6287d9351b78742e 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for PPCbug boot records.
-   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
    Free Software Foundation, Inc.
    Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
 
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 
 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 02111-1307, USA.  */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* This is a BFD backend which may be used to write PowerPCBug boot objects.
    It may only be used for output, not input.  The intention is that this may
@@ -99,7 +99,6 @@ static long ppcboot_canonicalize_symtab PARAMS ((bfd *, asymbol **));
 static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
 static bfd_boolean ppcboot_set_section_contents
   PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static int ppcboot_sizeof_headers PARAMS ((bfd *, bfd_boolean));
 static bfd_boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
 
 #define ppcboot_set_tdata(abfd, ptr) ((abfd)->tdata.any = (PTR) (ptr))
@@ -151,6 +150,7 @@ ppcboot_object_p (abfd)
   ppcboot_hdr_t hdr;
   size_t i;
   ppcboot_data_t *tdata;
+  flagword flags;
 
   BFD_ASSERT (sizeof (ppcboot_hdr_t) == 1024);
 
@@ -205,10 +205,10 @@ ppcboot_object_p (abfd)
   abfd->symcount = PPCBOOT_SYMS;
 
   /* One data section.  */
-  sec = bfd_make_section (abfd, ".data");
+  flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | 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_CODE | SEC_HAS_CONTENTS;
   sec->vma = 0;
   sec->size = statbuf.st_size - sizeof (ppcboot_hdr_t);
   sec->filepos = sizeof (ppcboot_hdr_t);
@@ -350,6 +350,7 @@ ppcboot_get_symbol_info (ignore_abfd, symbol, ret)
 #define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
 #define ppcboot_get_lineno _bfd_nosymbols_get_lineno
 #define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define ppcboot_find_inliner_info _bfd_nosymbols_find_inliner_info
 #define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
 #define ppcboot_read_minisymbols _bfd_generic_read_minisymbols
 #define ppcboot_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
@@ -394,9 +395,8 @@ ppcboot_set_section_contents (abfd, sec, data, offset, size)
 
 \f
 static int
-ppcboot_sizeof_headers (abfd, exec)
-     bfd *abfd ATTRIBUTE_UNUSED;
-     bfd_boolean exec ATTRIBUTE_UNUSED;
+ppcboot_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+                       struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return sizeof (ppcboot_hdr_t);
 }
This page took 0.023845 seconds and 4 git commands to generate.