patches/binutils/2.15/180-solaris-qsort.patch
changeset 747 d3e603e7c17c
parent 745 e445c00d134d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/binutils/2.15/180-solaris-qsort.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,22 @@
     1.4 +See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
     1.5 +
     1.6 +--- src/bfd/elflink.c.org	2004-07-05 09:11:42.920597000 -0400
     1.7 ++++ src/bfd/elflink.c	2004-07-05 09:12:59.240847000 -0400
     1.8 +@@ -2700,7 +2700,7 @@
     1.9 +     return vdiff > 0 ? 1 : -1;
    1.10 +   else
    1.11 +     {
    1.12 +-      long sdiff = h1->root.u.def.section - h2->root.u.def.section;
    1.13 ++      long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
    1.14 +       if (sdiff != 0)
    1.15 + 	return sdiff > 0 ? 1 : -1;
    1.16 +     }
    1.17 +@@ -3954,7 +3954,7 @@
    1.18 + 		i = idx + 1;
    1.19 + 	      else
    1.20 + 		{
    1.21 +-		  long sdiff = slook - h->root.u.def.section;
    1.22 ++		  long sdiff = slook->id - h->root.u.def.section->id;
    1.23 + 		  if (sdiff < 0)
    1.24 + 		    j = idx;
    1.25 + 		  else if (sdiff > 0)