/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
EVAX (openVMS/Alpha) files.
- Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
HDR record handling functions
EMH record handling functions
#include "vms.h"
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
/*---------------------------------------------------------------------------*/
-
/* Read & process emh record
return 0 on success, -1 on error */
return 0;
}
-
/*-----------------------------------------------------------------------------*/
/* Output routines. */
-
/* Manufacure a VMS like time on a unix based system.
stolen from obj-vms.c */
return tbuf;
}
-
/* write object header for bfd abfd */
int
int objtype;
{
asymbol *symbol;
- int symnum;
+ unsigned int symnum;
int had_case = 0;
int had_file = 0;
-
#if VMS_DEBUG
vms_debug (2, "vms_write_hdr (%p)\n", abfd);
#endif
if (symbol->flags & BSF_FILE)
{
- char *s;
-
if (strncmp ((char *)symbol->name, "<CASE:", 6) == 0)
{
PRIV(flag_hash_long_names) = symbol->name[6] - '0';
vms_rec = PRIV(vms_rec);
- if ((objtype == OBJ_S_C_EOM)
+ if ((objtype == OBJ_S_C_EOM)
|| (objtype == OBJ_S_C_EOMW))
{
}
return 0;
}
-
/* Write eom record for bfd abfd */
int
#endif
_bfd_vms_output_begin (abfd, objtype, -1);
- _bfd_vms_output_long (abfd, (unsigned long)(PRIV(vms_linkage_index) >> 1));
+ _bfd_vms_output_long (abfd, (unsigned long) (PRIV(vms_linkage_index) >> 1));
_bfd_vms_output_byte (abfd, 0); /* completion code */
_bfd_vms_output_byte (abfd, 0); /* fill byte */
return -1;
}
_bfd_vms_output_short (abfd, 0);
- _bfd_vms_output_long (abfd, (unsigned long)(section->index));
+ _bfd_vms_output_long (abfd, (unsigned long) (section->index));
_bfd_vms_output_long (abfd,
(unsigned long) bfd_get_start_address (abfd));
_bfd_vms_output_long (abfd, 0);