elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 8 Feb 1995 20:58:01 +0000 (20:58 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Wed, 8 Feb 1995 20:58:01 +0000 (20:58 +0000)
bfd/ChangeLog
bfd/elfcode.h

index ae489a0e7d911f69e456e2763689dbc5a394b6b8..76ccd0fb9f794b9ec70e5ce2cc65c8764c95d020 100644 (file)
@@ -1,3 +1,7 @@
+Wed Feb  8 09:53:42 1995  Doug Evans  <dje@canuck.cygnus.com>
+
+       * elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
+
 Tue Feb  7 16:27:33 1995  Jeff Law  (law@snake.cs.utah.edu)
 
        * som.c (som_bfd_find_nearest_line): Just return false, don't
index a5f0ffda0b755abb11f6bf910e4158bb58ca23e4..e96f088fb36c7991c3421fe6b63fcf248a8bfef8 100644 (file)
@@ -2265,8 +2265,9 @@ elf_sort_hdrs (arg1, arg2)
        return -1;
       else if (hdr1->sh_addr > hdr2->sh_addr)
        return 1;
-      else
-       return 0;
+      /* Put !SHT_NOBITS sections before SHT_NOBITS ones.
+         The main loop in map_program_segments assumes this. */
+      return (hdr1->sh_type == SHT_NOBITS) - (hdr2->sh_type == SHT_NOBITS);
     }
   else
     {