From: Alan Modra Date: Mon, 25 Feb 2002 23:35:03 +0000 (+0000) Subject: * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local X-Git-Tag: binutils-2_12~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac1a700aeed4f69d5ab0eb546d3a0bc6d1ba4bfd;p=thirdparty%2Fbinutils-gdb.git * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local dynsyms. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ff5c28b382c..7bfdd64bb66 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-02-26 Andrew Macleod + + * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local + dynsyms. + 2002-02-25 Alan Modra * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix. diff --git a/bfd/elflink.h b/bfd/elflink.h index 47927d3830e..76dbb195b51 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -1,5 +1,5 @@ /* ELF linker support. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -5375,8 +5375,9 @@ elf_bfd_final_link (abfd, info) the original st_name with the dynstr_index. */ sym = e->isym; - if (e->isym.st_shndx < SHN_LORESERVE - || e->isym.st_shndx > SHN_HIRESERVE) + if (e->isym.st_shndx != SHN_UNDEF + && (e->isym.st_shndx < SHN_LORESERVE + || e->isym.st_shndx > SHN_HIRESERVE)) { s = bfd_section_from_elf_index (e->input_bfd, e->isym.st_shndx);