From 081e66ab5209aee414e25a22ac7c6139a8ecae35 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 4 Jun 2008 09:59:08 +0000 Subject: PR ld/6019 * elf32-avr.c (elf32_avr_relax_section): Handle the case where there are no local symbols. --- bfd/elf32-avr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bfd/elf32-avr.c') diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 3cbfb75e41..ee2afab8f2 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -2034,7 +2034,8 @@ elf32_avr_relax_section (bfd *abfd, /* Check for local symbols. */ isym = (Elf_Internal_Sym *) symtab_hdr->contents; isymend = isym + symtab_hdr->sh_info; - for (; isym < isymend; isym++) + /* PR 6019: There may not be any local symbols. */ + for (; isym != NULL && isym < isymend; isym++) { if (isym->st_value == section_offset_of_ret_insn && isym->st_shndx == sec_shndx) -- cgit v1.2.1