From 5b4e2e256ff05f3023bf4aca9afa93e126daec9e Mon Sep 17 00:00:00 2001 From: "Eric B. Weddington" Date: Thu, 19 Feb 2009 17:53:10 +0000 Subject: [PATCH] /bfd: 2009-02-15 Bjoern Haase PR 9841 * elf32-avr.c: Handle case where no local symbos exist correctly. --- bfd/ChangeLog | 5 +++++ bfd/elf32-avr.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 47e70c45e3c..e925156ea84 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-02-15 Bjoern Haase + + PR 9841 + * elf32-avr.c: Handle case where no local symbos exist correctly. + 2009-02-04 Eric B. Weddington * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound. diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index afcef18aa30..27cb38b8644 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -1554,7 +1554,8 @@ elf32_avr_relax_delete_bytes (bfd *abfd, /* Adjust the local symbols defined in this section. */ isym = (Elf_Internal_Sym *) symtab_hdr->contents; isymend = isym + symtab_hdr->sh_info; - for (; isym < isymend; isym++) + /* Fix PR 9841, there may be no local symbols. */ + for (; isym != NULL && isym < isymend; isym++) { if (isym->st_shndx == sec_shndx && isym->st_value > addr -- 2.47.2