diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-06-24 15:22:40 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-06-24 15:22:40 +0000 |
commit | d120eec2956e7cb812d98be6237e5ad826cf07ec (patch) | |
tree | 93cd70095082cc38287138081cb10945dcb0f9e5 /bfd/vms-alpha.c | |
parent | 576d330713e0e9c2cbec6f93c838d97580f09800 (diff) | |
download | gdb-d120eec2956e7cb812d98be6237e5ad826cf07ec.zip gdb-d120eec2956e7cb812d98be6237e5ad826cf07ec.tar.gz gdb-d120eec2956e7cb812d98be6237e5ad826cf07ec.tar.bz2 |
2011-06-24 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
absolute section.
Diffstat (limited to 'bfd/vms-alpha.c')
-rw-r--r-- | bfd/vms-alpha.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 92bf444..255a100 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -5106,7 +5106,14 @@ alpha_vms_slurp_relocs (bfd *abfd) (*_bfd_error_handler) (_("Invalid section index in ETIR")); return FALSE; } + sec = PRIV (sections)[cur_psect]; + if (sec == bfd_abs_section_ptr) + { + (*_bfd_error_handler) (_("Relocation for non-REL psect")); + return FALSE; + } + vms_sec = vms_section_data (sec); /* Allocate a reloc entry. */ @@ -5117,7 +5124,7 @@ alpha_vms_slurp_relocs (bfd *abfd) vms_sec->reloc_max = 64; sec->relocation = bfd_zmalloc (vms_sec->reloc_max * sizeof (arelent)); - } + } else { vms_sec->reloc_max *= 2; |