Update copyright years
[deliverable/binutils-gdb.git] / bfd / oasys.c
index 1f51449abc8980a34b53ddd5a6533a76f200ac02..74305d73c162fe1cd67cb80bc95a2f20a6e87302 100644 (file)
@@ -1,7 +1,5 @@
 /* BFD back-end for oasys objects.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2014 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.
@@ -28,6 +26,7 @@
 #include "libbfd.h"
 #include "oasys.h"
 #include "liboasys.h"
+#include "libiberty.h"
 
 /* Read in all the section data and relocation stuff too.  */
 
@@ -906,9 +905,11 @@ oasys_write_header (bfd *abfd)
 
   if (length > (size_t) sizeof (r.module_name))
     length = sizeof (r.module_name);
+  else if (length < (size_t) sizeof (r.module_name))
+    (void) memset (r.module_name + length, ' ',
+                  sizeof (r.module_name) - length);
 
   (void) memcpy (r.module_name, abfd->filename, length);
-  (void) memset (r.module_name + length, ' ', sizeof (r.module_name) - length);
 
   r.version_number = OASYS_VERSION_NUMBER;
   r.rev_number = OASYS_REV_NUMBER;
@@ -1116,7 +1117,7 @@ oasys_openr_next_archived_file (bfd *arch, bfd *prev)
        {
          p->abfd = _bfd_create_empty_archive_element_shell (arch);
          p->abfd->origin = p->pos;
-         p->abfd->filename = p->name;
+         p->abfd->filename = xstrdup (p->name);
 
          /* Fixup a pointer to this element for the member.  */
          p->abfd->arelt_data = (void *) p;
@@ -1196,6 +1197,7 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 #define oasys_bfd_get_relocated_section_contents   bfd_generic_get_relocated_section_contents
 #define oasys_bfd_relax_section                    bfd_generic_relax_section
 #define oasys_bfd_gc_sections                      bfd_generic_gc_sections
+#define oasys_bfd_lookup_section_flags             bfd_generic_lookup_section_flags
 #define oasys_bfd_merge_sections                   bfd_generic_merge_sections
 #define oasys_bfd_is_group_section                 bfd_generic_is_group_section
 #define oasys_bfd_discard_group                    bfd_generic_discard_group
@@ -1224,6 +1226,7 @@ const bfd_target oasys_vec =
   0,                           /* Leading underscore.  */
   ' ',                         /* AR_pad_char.  */
   16,                          /* AR_max_namelen.  */
+  0,                           /* match priority.  */
   bfd_getb64, bfd_getb_signed_64, bfd_putb64,
   bfd_getb32, bfd_getb_signed_32, bfd_putb32,
   bfd_getb16, bfd_getb_signed_16, bfd_putb16,  /* Data.  */
This page took 0.024424 seconds and 4 git commands to generate.