aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-h8300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-01-25 14:22:10 +0000
committerNick Clifton <nickc@redhat.com>2013-01-25 14:22:10 +0000
commitd79dcc73ac46dad924acf843a2c3546517506f9e (patch)
treeabea293716d7f765389512e00960174efae1a845 /bfd/elf32-h8300.c
parent843b20dc1df1b9ab8e8478b0743ac927e5b132d4 (diff)
downloadgdb-d79dcc73ac46dad924acf843a2c3546517506f9e.zip
gdb-d79dcc73ac46dad924acf843a2c3546517506f9e.tar.gz
gdb-d79dcc73ac46dad924acf843a2c3546517506f9e.tar.bz2
* elf32-h8300.c (elf32_h8_relax_section): When checking for a
second reloc, make sure that the reloc potentially exists first.
Diffstat (limited to 'bfd/elf32-h8300.c')
-rw-r--r--bfd/elf32-h8300.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 388d220..43ac16e 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -1239,7 +1239,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec,
second_reloc = 1;
}
}
- if (irel < irelend)
+ if (irel + 1 < irelend)
{
Elf_Internal_Rela *next_reloc = irel + 1;
arelent bfd_reloc;