* bfd-in.h (CONST_STRNCPY) : Delete.
[deliverable/binutils-gdb.git] / bfd / oasys.c
index 2813d4d0541109748b6f520a3f99e4c1833edbdb..ec08555afd060f5b4aa926fd329fccb387c07940 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for oasys objects.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001,
-   2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -384,11 +384,13 @@ oasys_slurp_section_data (bfd *const abfd)
 
            if (! per->initialized)
              {
+               arelent **relpp;
+
                per->data = bfd_zalloc (abfd, section->size);
                if (!per->data)
                  return FALSE;
-               per->reloc_tail_ptr
-                 = (oasys_reloc_type **) &section->relocation;
+               relpp = &section->relocation;
+               per->reloc_tail_ptr = (oasys_reloc_type **) relpp;
                per->had_vma = FALSE;
                per->initialized = TRUE;
                section->reloc_count = 0;
@@ -683,9 +685,13 @@ oasys_print_symbol (bfd *abfd, void * afile, asymbol *symbol, bfd_print_symbol_t
 static bfd_boolean
 oasys_new_section_hook (bfd *abfd, asection *newsect)
 {
-  newsect->used_by_bfd = bfd_alloc (abfd, (bfd_size_type) sizeof (oasys_per_section_type));
   if (!newsect->used_by_bfd)
-    return FALSE;
+    {
+      newsect->used_by_bfd
+       = bfd_alloc (abfd, (bfd_size_type) sizeof (oasys_per_section_type));
+      if (!newsect->used_by_bfd)
+       return FALSE;
+    }
   oasys_per_section (newsect)->data = NULL;
   oasys_per_section (newsect)->section = newsect;
   oasys_per_section (newsect)->offset = 0;
@@ -695,7 +701,7 @@ oasys_new_section_hook (bfd *abfd, asection *newsect)
   /* Turn the section string into an index.  */
   sscanf (newsect->name, "%u", &newsect->target_index);
 
-  return TRUE;
+  return _bfd_generic_new_section_hook (abfd, newsect);
 }
 
 
@@ -1132,6 +1138,15 @@ oasys_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED,
   return FALSE;
 }
 
+static bfd_boolean
+oasys_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
+                        const char **filename_ptr ATTRIBUTE_UNUSED,
+                        const char **functionname_ptr ATTRIBUTE_UNUSED,
+                        unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+  return FALSE;
+}
+
 static int
 oasys_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
 {
@@ -1149,7 +1164,8 @@ oasys_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
 }
 
 static int
-oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+                     struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return 0;
 }
This page took 0.042123 seconds and 4 git commands to generate.