]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/11624
authorNick Clifton <nickc@redhat.com>
Tue, 25 May 2010 10:14:16 +0000 (10:14 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 25 May 2010 10:14:16 +0000 (10:14 +0000)
        * archive.c (_bfd_calloc_wrapper): New function.
        (_bfd_add_bfd_to_archive_cache): Use it.

        * configure.in: Add alpha*-*-*vms* to list of natives.
        * configure: Regenerate.

        * vms-misc.c: Define globalref if necessary.
        (vms_convert_to_var_unix_filename): Rename to
        _bfd_vms_convert_to_var_unix_filename and export.
        * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
        * vms-alpha.c (vms_close_and_cleanup): Update invocation of
        vms_convert_to_var_unix_filename.

bfd/ChangeLog
bfd/archive.c
bfd/bfd-in2.h
bfd/configure
bfd/configure.in
bfd/doc/Makefile.in
bfd/vms-alpha.c
bfd/vms-misc.c
bfd/vms.h

index 0ef88f73682556f9890ed06d3f89cbe74afde206..4c7593c82886363d9da5e61c66c114cb2c7b8b42 100644 (file)
@@ -1,3 +1,19 @@
+2010-05-25  Jay Krell  <jay.krell@cornell.edu>
+
+       PR ld/11624
+       * archive.c (_bfd_calloc_wrapper): New function.
+       (_bfd_add_bfd_to_archive_cache): Use it.
+
+       * configure.in: Add alpha*-*-*vms* to list of natives.
+       * configure: Regenerate.
+
+       * vms-misc.c: Define globalref if necessary.
+       (vms_convert_to_var_unix_filename): Rename to
+       _bfd_vms_convert_to_var_unix_filename and export.
+       * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
+       * vms-alpha.c (vms_close_and_cleanup): Update invocation of
+       vms_convert_to_var_unix_filename.
+
 2010-05-24  Tristan Gingold  <gingold@adacore.com>
 
        * vms-alpha.c (add_symbol_entry): New function extrated from ...
index e6c1e8385324d0930fd095aa54297a8db6d5c91e..fbe555b03f5d8a52bda3b65c1e881604ccb361e8 100644 (file)
@@ -303,6 +303,15 @@ eq_file_ptr (const PTR p1, const PTR p2)
   return arc1->ptr == arc2->ptr;
 }
 
+/* The calloc function doesn't always take size_t (e.g. on VMS)
+   so wrap it to avoid a compile time warning.   */
+
+static void *
+_bfd_calloc_wrapper (size_t a, size_t b)
+{
+  return calloc (a, b);
+}
+
 /* Kind of stupid to call cons for each one, but we don't do too many.  */
 
 bfd_boolean
@@ -315,7 +324,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt)
   if (hash_table == NULL)
     {
       hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr,
-                                     NULL, calloc, free);
+                                     NULL, _bfd_calloc_wrapper, free);
       if (hash_table == NULL)
        return FALSE;
       bfd_ardata (arch_bfd)->cache = hash_table;
index a3f8ccc9f174857137d3ac0a9e65c91090e6afaa..e9dcb2c89ed62f2630fddb04562b509bd669ae0c 100644 (file)
@@ -913,7 +913,7 @@ extern bfd_boolean elf32_arm_build_stubs
 
 /* ARM unwind section editing support.  */
 extern bfd_boolean elf32_arm_fix_exidx_coverage
-  (struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
+(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean);
 
 /* PowerPC @tls opcode transform/validate.  */
 extern unsigned int _bfd_elf_ppc_at_tls_transform
index a8b15a3d024961f05604bb4870409ab7358876ea..d498ff2ee3ba33cb8ba9f5757f73e61fb02063d4 100755 (executable)
@@ -13829,7 +13829,7 @@ CORE_HEADER=
 TRAD_HEADER=
 if test "${target}" = "${host}"; then
   case "${host}" in
-  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
        COREFILE=''
        ;;
   alpha*-*-linux-*)
@@ -13839,9 +13839,11 @@ if test "${target}" = "${host}"; then
   alpha*-*-netbsd* | alpha*-*-openbsd*)
        COREFILE=netbsd-core.lo
        ;;
-  alpha*-*-*)          COREFILE=osf-core.lo ;;
+  alpha*-*-*)
+        COREFILE=osf-core.lo
+       ;;
   arm-*-freebsd* | arm-*-kfreebsd*-gnu)
-                       COREFILE='' ;;
+       COREFILE='' ;;
   arm-*-netbsd* | arm-*-openbsd*)
        COREFILE=netbsd-core.lo
        ;;
index dbbadc05eab304ea0f371265d87ab0694449e6db..3ca7fc7cc512b83e23855c437e7ceced85a3b4ef 100644 (file)
@@ -223,7 +223,7 @@ CORE_HEADER=
 TRAD_HEADER=
 if test "${target}" = "${host}"; then
   case "${host}" in
-  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
+  alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-*vms*)
        COREFILE=''
        ;;
   alpha*-*-linux-*)
@@ -233,9 +233,11 @@ if test "${target}" = "${host}"; then
   alpha*-*-netbsd* | alpha*-*-openbsd*)
        COREFILE=netbsd-core.lo
        ;;
-  alpha*-*-*)          COREFILE=osf-core.lo ;;
+  alpha*-*-*)
+        COREFILE=osf-core.lo
+       ;;
   arm-*-freebsd* | arm-*-kfreebsd*-gnu)
-                       COREFILE='' ;;
+       COREFILE='' ;;
   arm-*-netbsd* | arm-*-openbsd*)
        COREFILE=netbsd-core.lo
        ;;
index aac7ace7f3b38c9b65233f8ff07db2c80b810679..68e17f72d8e2475179eebaecea68f14647a88971 100644 (file)
@@ -232,6 +232,7 @@ datarootdir = @datarootdir@
 docdir = @docdir@
 dvidir = @dvidir@
 exec_prefix = @exec_prefix@
+havevecs = @havevecs@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
index 0a8850126da0f11fa781fdec36841c48309bfcda..7234cd0d1fa1d1166a52fb622670531dc4220ff8 100644 (file)
@@ -8844,7 +8844,7 @@ vms_close_and_cleanup (bfd * abfd)
         format.  */
       if (bfd_cache_close (abfd) != TRUE)
        return FALSE;
-      if (vms_convert_to_var_unix_filename (abfd->filename) != TRUE)
+      if (_bfd_vms_convert_to_var_unix_filename (abfd->filename) != TRUE)
        return FALSE;
     }
 #endif
index 67cc25adc065efa5d593fcdd67fb6348cd0dccf1..be6d5094b17541f235489d8c7ee1d051196c8108 100644 (file)
@@ -1,7 +1,7 @@
 /* vms-misc.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
    EVAX (openVMS/Alpha) files.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-   2007, 2008, 2009  Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
    Miscellaneous functions.
 
@@ -33,6 +33,9 @@
 #include "safe-ctype.h"
 
 #ifdef VMS
+#if defined(__GNUC__) && !defined(globalref)
+#define globalref extern
+#endif
 #include <rms.h>
 #include <unixlib.h>
 #include <starlet.h>
@@ -399,8 +402,8 @@ _bfd_vms_output_fill (struct vms_rec_wr *recwr, int value, int count)
    using undocumented system call sys$modify().
    Pure VMS version.  */
 
-static void
-vms_convert_to_var (char *vms_filename)
+void
+_bfd_vms_convert_to_var (char * vms_filename)
 {
   struct FAB fab = cc$rms_fab;
 
index 4a3e1d0a6fc00c3c44682ca1a362d0ab38bbd78b..762c8b53984a79c3fbebbfc45d26aad1459626fa 100644 (file)
--- a/bfd/vms.h
+++ b/bfd/vms.h
@@ -1,6 +1,6 @@
 /* vms.h -- Header file for VMS (Alpha and Vax) support.
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007,
-   2008, 2009 Free Software Foundation, Inc.
+   2008, 2009, 2010 Free Software Foundation, Inc.
 
    Main header file.
 
@@ -111,26 +111,27 @@ extern void _bfd_hexdump   (int, unsigned char *, int, int);
 #define vms_debug2(X)
 #endif
 
-extern char *vms_get_module_name (const char *filename, bfd_boolean);
+extern char * vms_get_module_name (const char *, bfd_boolean);
 extern unsigned char *get_vms_time_string (void);
 extern time_t vms_time_to_time_t (unsigned int hi, unsigned int lo);
-extern time_t vms_rawtime_to_time_t (unsigned char *buf);
-
-extern char *_bfd_vms_save_sized_string (unsigned char *, int);
-extern char *_bfd_vms_save_counted_string (unsigned char *);
-extern void _bfd_vms_output_begin (struct vms_rec_wr *, int);
-extern void _bfd_vms_output_alignment (struct vms_rec_wr *, int);
-extern void _bfd_vms_output_begin_subrec (struct vms_rec_wr *, int);
-extern void _bfd_vms_output_end_subrec (struct vms_rec_wr *);
-extern void _bfd_vms_output_end (bfd *, struct vms_rec_wr *);
-extern int _bfd_vms_output_check (struct vms_rec_wr *, int);
-extern void _bfd_vms_output_byte (struct vms_rec_wr *, unsigned);
-extern void _bfd_vms_output_short (struct vms_rec_wr *, unsigned);
-extern void _bfd_vms_output_long (struct vms_rec_wr *, unsigned long);
-extern void _bfd_vms_output_quad (struct vms_rec_wr *, bfd_vma);
-extern void _bfd_vms_output_counted (struct vms_rec_wr *, char *);
-extern void _bfd_vms_output_dump (struct vms_rec_wr *, unsigned char *, int);
-extern void _bfd_vms_output_fill (struct vms_rec_wr *, int, int);
+extern time_t vms_rawtime_to_time_t (unsigned char *);
+
+extern char * _bfd_vms_save_sized_string (unsigned char *, int);
+extern char * _bfd_vms_save_counted_string (unsigned char *);
+extern void   _bfd_vms_output_begin (struct vms_rec_wr *, int);
+extern void   _bfd_vms_output_alignment (struct vms_rec_wr *, int);
+extern void   _bfd_vms_output_begin_subrec (struct vms_rec_wr *, int);
+extern void   _bfd_vms_output_end_subrec (struct vms_rec_wr *);
+extern void   _bfd_vms_output_end (bfd *, struct vms_rec_wr *);
+extern int    _bfd_vms_output_check (struct vms_rec_wr *, int);
+extern void   _bfd_vms_output_byte (struct vms_rec_wr *, unsigned);
+extern void   _bfd_vms_output_short (struct vms_rec_wr *, unsigned);
+extern void   _bfd_vms_output_long (struct vms_rec_wr *, unsigned long);
+extern void   _bfd_vms_output_quad (struct vms_rec_wr *, bfd_vma);
+extern void   _bfd_vms_output_counted (struct vms_rec_wr *, char *);
+extern void   _bfd_vms_output_dump (struct vms_rec_wr *, unsigned char *, int);
+extern void   _bfd_vms_output_fill (struct vms_rec_wr *, int, int);
+extern int    _bfd_vms_convert_to_var_unix_filename (const char *);
 
 /* vms-alpha.c  */