diff options
author | Tristan Gingold <gingold@adacore.com> | 2011-06-24 15:22:36 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2011-06-24 15:22:36 +0000 |
commit | 4091037612ef40af2cb1f348cbcacfe627f0ca0f (patch) | |
tree | f9fb0e106eccabdb7ee3a621b8540fd9b4b14fd2 | |
parent | 899569fe4a5e83578eebfe7c22bbbf78b3d95de0 (diff) | |
download | binutils-redhat-4091037612ef40af2cb1f348cbcacfe627f0ca0f.tar.gz |
2011-06-24 Tristan Gingold <gingold@adacore.com>
* vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
absolute section.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/vms-alpha.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 066713de91..96297a3dda 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-06-24 Tristan Gingold <gingold@adacore.com> + + * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the + absolute section. + 2011-06-24 Alan Modra <amodra@gmail.com> PR ld/12921 diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 92bf444f23..255a100027 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; |