diff options
author | Alan Modra <amodra@gmail.com> | 2002-02-25 23:31:22 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-02-25 23:31:22 +0000 |
commit | c8e5ddc83f538e67cb17a26d7f54853beeca7c7b (patch) | |
tree | 80cec38d6458855a9db63d96a69bc4707d93e610 /bfd | |
parent | 4bcb061667c9558a92e8a7c107f8dc19fbcc535b (diff) | |
download | gdb-c8e5ddc83f538e67cb17a26d7f54853beeca7c7b.zip gdb-c8e5ddc83f538e67cb17a26d7f54853beeca7c7b.tar.gz gdb-c8e5ddc83f538e67cb17a26d7f54853beeca7c7b.tar.bz2 |
* elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
dynsyms.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.h | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f140ff1..a381bfc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-02-26 Andrew Macleod <amacleod@cygnus.com> + + * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local + dynsyms. + 2002-02-25 Alan Modra <amodra@bigpond.net.au> * elf64-hppa.h: Update copyright date. diff --git a/bfd/elflink.h b/bfd/elflink.h index 47927d3..76dbb19 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); |