From: David Edelsohn Date: Wed, 8 Feb 1995 20:58:01 +0000 (+0000) Subject: elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=121a846514400562c05c95905993f74fbaf3c5c6;p=binutils-gdb.git elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ae489a0e7d9..76ccd0fb9f7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +Wed Feb 8 09:53:42 1995 Doug Evans + + * 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 diff --git a/bfd/elfcode.h b/bfd/elfcode.h index a5f0ffda0b7..e96f088fb36 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -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 {