aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1995-02-08 20:58:01 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1995-02-08 20:58:01 +0000
commit121a846514400562c05c95905993f74fbaf3c5c6 (patch)
tree4707f0586ad20109c25385d502403095689913a4 /bfd/elfcode.h
parent12516a373c27abe4516c2a3c84cfe9d94f02e18f (diff)
downloadgdb-121a846514400562c05c95905993f74fbaf3c5c6.zip
gdb-121a846514400562c05c95905993f74fbaf3c5c6.tar.gz
gdb-121a846514400562c05c95905993f74fbaf3c5c6.tar.bz2
elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index a5f0ffd..e96f088 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
{