From: Nick Clifton Date: Wed, 4 Jun 2008 09:59:08 +0000 (+0000) Subject: PR ld/6019 X-Git-Tag: msnyder-reverse-20080609-branchpoint~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=696b7ad299612b5d98829141508f5a844e2a5049;p=thirdparty%2Fbinutils-gdb.git PR ld/6019 * elf32-avr.c (elf32_avr_relax_section): Handle the case where there are no local symbols. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ce9a20c9be4..8b315a338b4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2008-06-04 Nick Clifton + + PR ld/6019 + * elf32-avr.c (elf32_avr_relax_section): Handle the case where + there are no local symbols. + 2008-06-04 Alan Modra * elf32-spu.c (get_sym_h): Don't attempt to read global syms. diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 3cbfb75e41b..ee2afab8f2b 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)