* 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-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 ...
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
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;
/* 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
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-*)
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
;;
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-*)
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
;;
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+havevecs = @havevecs@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
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
/* 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.
#include "safe-ctype.h"
#ifdef VMS
+#if defined(__GNUC__) && !defined(globalref)
+#define globalref extern
+#endif
#include <rms.h>
#include <unixlib.h>
#include <starlet.h>
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;
/* 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.
#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 */