diff options
author | Nick Clifton <nickc@redhat.com> | 1998-06-06 00:28:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1998-06-06 00:28:46 +0000 |
commit | 40afcc4cd448f3ba08d505b9392cc00800b4cc00 (patch) | |
tree | d67f52c6d4b25d14fd618efb142bc78835025919 | |
parent | c84c3b965ce1be096304d437dd8dbf4d9fe3105e (diff) | |
download | gdb-40afcc4cd448f3ba08d505b9392cc00800b4cc00.zip gdb-40afcc4cd448f3ba08d505b9392cc00800b4cc00.tar.gz gdb-40afcc4cd448f3ba08d505b9392cc00800b4cc00.tar.bz2 |
sort sections by LMA then VMA.
-rw-r--r-- | bfd/ChangeLog | 3 | ||||
-rw-r--r-- | bfd/elf.c | 12 |
2 files changed, 10 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3cc05fe..01e502f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ Fri Jun 5 17:21:51 1998 Nick Clifton <nickc@cygnus.com> + * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the + LMA is used to order sections in a segment. + * elf32-v850.c: Add prototypes for static functions. Change type of addend parameter to bfd_vma in various functions. @@ -2344,16 +2344,18 @@ elf_sort_sections (arg1, arg2) const asection *sec1 = *(const asection **) arg1; const asection *sec2 = *(const asection **) arg2; - if (sec1->vma < sec2->vma) + /* Sort by LMA first, since this is the address used to + place the section into a segment. */ + if (sec1->lma < sec2->lma) return -1; - else if (sec1->vma > sec2->vma) + else if (sec1->lma > sec2->lma) return 1; - /* Sort by LMA. Normally the LMA and the VMA will be the same, and + /* Sort by VMA. Normally the LMA and the VMA will be the same, and this will do nothing. */ - if (sec1->lma < sec2->lma) + if (sec1->vma < sec2->vma) return -1; - else if (sec1->lma > sec2->lma) + else if (sec1->vma > sec2->vma) return 1; /* Put !SEC_LOAD sections after SEC_LOAD ones. */ |