This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bfd elflink.h patch

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

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,

Alan Modra
IBM OzLabs - Linux Technology Centre

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]