This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: bfd elflink.h patch
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Andrew Macleod <amacleod at cygnus dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 26 Feb 2002 09:57:22 +1030
- Subject: Re: bfd elflink.h patch
- References: <200202251858.KAA26021@rtl.cygnus.com>
On Mon, Feb 25, 2002 at 10:58:04AM -0800, Andrew Macleod wrote:
> goes away. Was this an oversight, or is there something else wrong?
An oversight. I'm installing a slightly modified version of your
patch mainline and branch. Thanks for catching this!
* elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
dynsyms.
ndex: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.141
diff -u -p -r1.141 elflink.h
--- elflink.h 2002/01/21 10:29:07 1.141
+++ elflink.h 2002/02/25 23:25:13
@@ -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 != SNH_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);
--
Alan Modra
IBM OzLabs - Linux Technology Centre