diff options
author | Tristan Gingold <gingold@adacore.com> | 2010-05-14 07:45:02 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2010-05-14 07:45:02 +0000 |
commit | af47dcbf0d148aba27ced058d6bfb83fd282b5c9 (patch) | |
tree | 9a9c8ef35869ae8d4f70a1a0b79bee69bb52450d /bfd/vms-alpha.c | |
parent | 7256a1142aec68123aa0e9429802502c4b7c07ea (diff) | |
download | gdb-af47dcbf0d148aba27ced058d6bfb83fd282b5c9.zip gdb-af47dcbf0d148aba27ced058d6bfb83fd282b5c9.tar.gz gdb-af47dcbf0d148aba27ced058d6bfb83fd282b5c9.tar.bz2 |
2010-05-14 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
(_bfd_vms_get_object_record): Handle align byte only in the
foreign case.
Diffstat (limited to 'bfd/vms-alpha.c')
-rw-r--r-- | bfd/vms-alpha.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 5ae54c2..c4e4c9c 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -759,7 +759,7 @@ _bfd_vms_get_object_record (bfd *abfd) vms_debug2 ((8, "_bfd_vms_get_obj_record\n")); /* Skip alignment byte if the current position is odd. */ - if (bfd_tell (abfd) & 1) + if (PRIV (recrd.file_format) == FF_FOREIGN && (bfd_tell (abfd) & 1)) { if (bfd_bread (PRIV (recrd.buf), 1, abfd) != 1) { @@ -2450,6 +2450,10 @@ alpha_vms_object_p (bfd *abfd) /* Extract the header size. */ PRIV (recrd.rec_size) = bfd_getl32 (buf + EIHD__L_SIZE); + /* The header size is 0 for DSF files. */ + if (PRIV (recrd.rec_size) == 0) + PRIV (recrd.rec_size) = sizeof (struct vms_eihd); + if (PRIV (recrd.rec_size) > PRIV (recrd.buf_size)) { buf = bfd_realloc_or_free (buf, PRIV (recrd.rec_size)); |