diff options
author | Tristan Gingold <gingold@adacore.com> | 2010-05-03 16:04:32 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2010-05-03 16:04:32 +0000 |
commit | fa23f0f49a6179dcc7252e660ad60f1cf87665f2 (patch) | |
tree | eec4b96ca67d268d4a9b43a3317ad5fcc53a3726 /bfd/vms-lib.c | |
parent | 278582cb37ac74c4ffeec3dc6c4730510063ca56 (diff) | |
download | gdb-fa23f0f49a6179dcc7252e660ad60f1cf87665f2.zip gdb-fa23f0f49a6179dcc7252e660ad60f1cf87665f2.tar.gz gdb-fa23f0f49a6179dcc7252e660ad60f1cf87665f2.tar.bz2 |
bfd/
2010-05-03 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (vms_lib_bopen): Fix the size threshold to read
selective_search flag.
Add comments.
* vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
before output_has_begun is set.
Diffstat (limited to 'bfd/vms-lib.c')
-rw-r--r-- | bfd/vms-lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index bbef19c..0b45a13 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -577,6 +577,7 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind) off = bfd_getl16 (sbm->next); if (off != 0) { + /* Read the 'next' array. */ sbmdesc->next = (unsigned short *)bfd_alloc (abfd, sbm_len * sizeof (unsigned short)); buf1 = data + off; @@ -585,6 +586,7 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind) } else { + /* There is no next array if there is only one submap. */ BFD_ASSERT (tdata->nbr_dcxsbm == 1); sbmdesc->next = NULL; } @@ -1200,7 +1202,7 @@ vms_lib_bopen (bfd *el, file_ptr filepos) /* Check id. */ if (mhd->id != MHD__C_MHDID) return FALSE; - if (len >= sizeof (struct vms_mhd)) + if (len >= MHD__C_MHDLEN + 1) el->selective_search = (mhd->objstat & MHD__M_SELSRC) ? 1 : 0; el->mtime = vms_rawtime_to_time_t (mhd->datim); el->mtime_set = TRUE; |