1 |
/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and |
/* vms-hdr.c -- BFD back-end for VMS/VAX (openVMS/VAX) and |
2 |
EVAX (openVMS/Alpha) files. |
EVAX (openVMS/Alpha) files. |
3 |
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. |
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 |
4 |
|
Free Software Foundation, Inc. |
5 |
|
|
6 |
HDR record handling functions |
HDR record handling functions |
7 |
EMH record handling functions |
EMH record handling functions |
26 |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
27 |
|
|
28 |
#include "bfd.h" |
#include "bfd.h" |
29 |
|
#include "bfdver.h" |
30 |
#include "sysdep.h" |
#include "sysdep.h" |
31 |
#include "bfdlink.h" |
#include "bfdlink.h" |
32 |
#include "safe-ctype.h" |
#include "safe-ctype.h" |
206 |
/*-----------------------------------------------------------------------------*/ |
/*-----------------------------------------------------------------------------*/ |
207 |
/* Output routines. */ |
/* Output routines. */ |
208 |
|
|
209 |
/* Manufacure a VMS like time on a unix based system. |
/* Manufacture a VMS like time on a unix based system. |
210 |
stolen from obj-vms.c */ |
stolen from obj-vms.c */ |
211 |
|
|
212 |
static unsigned char * |
static unsigned char * |
225 |
pnt[10] = 0; |
pnt[10] = 0; |
226 |
pnt[16] = 0; |
pnt[16] = 0; |
227 |
pnt[24] = 0; |
pnt[24] = 0; |
228 |
sprintf (tbuf, "%2s-%3s-%s %s", pnt + 8, pnt + 4, pnt + 20, pnt + 11); |
sprintf ((char *) tbuf, "%2s-%3s-%s %s", |
229 |
|
pnt + 8, pnt + 4, pnt + 20, pnt + 11); |
230 |
#else |
#else |
231 |
#include <starlet.h> |
#include <starlet.h> |
232 |
struct |
struct |
410 |
bfd_set_error (bfd_error_bad_value); |
bfd_set_error (bfd_error_bad_value); |
411 |
return -1; |
return -1; |
412 |
} |
} |
413 |
PRIV(eom_data).eom_has_transfer = false; |
PRIV(eom_data).eom_has_transfer = FALSE; |
414 |
if (PRIV(rec_size) > 10) |
if (PRIV(rec_size) > 10) |
415 |
{ |
{ |
416 |
PRIV(eom_data).eom_has_transfer = true; |
PRIV(eom_data).eom_has_transfer = TRUE; |
417 |
PRIV(eom_data).eom_b_tfrflg = *(vms_rec + 9); |
PRIV(eom_data).eom_b_tfrflg = *(vms_rec + 9); |
418 |
PRIV(eom_data).eom_l_psindx = bfd_getl32 (vms_rec + 12); |
PRIV(eom_data).eom_l_psindx = bfd_getl32 (vms_rec + 12); |
419 |
PRIV(eom_data).eom_l_tfradr = bfd_getl32 (vms_rec + 16); |
PRIV(eom_data).eom_l_tfradr = bfd_getl32 (vms_rec + 16); |