aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-06-09 13:49:04 +0000
committerAlexandre Oliva <aoliva@redhat.com>2004-06-09 13:49:04 +0000
commita9b881beb10a4fd73d3f8183e424a6cedeb713c5 (patch)
treece490dbb4e7ee6a202533bf24ffb9aba010181f0 /bfd
parentb5c0bfa20ecb42d620042caceb3a3fe4db16a9e3 (diff)
downloadbinutils-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.zip
binutils-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.tar.gz
binutils-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.tar.bz2
* elflink.c (elf_sort_symbol): Compare section id, not pointers.
(elf_link_add_object_symbols): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog3
-rw-r--r--bfd/elflink.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4d2a84a..99de171 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,8 @@
2004-06-09 Alexandre Oliva <aoliva@redhat.com>
+ * elflink.c (elf_sort_symbol): Compare section id, not pointers.
+ (elf_link_add_object_symbols): Likewise.
+
* elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
(elf_backend_reloc_type_class): New.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 436ff84..37b113b 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2728,7 +2728,7 @@ elf_sort_symbol (const void *arg1, const void *arg2)
return vdiff > 0 ? 1 : -1;
else
{
- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
if (sdiff != 0)
return sdiff > 0 ? 1 : -1;
}
@@ -3982,7 +3982,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
i = idx + 1;
else
{
- long sdiff = slook - h->root.u.def.section;
+ long sdiff = slook->id - h->root.u.def.section->id;
if (sdiff < 0)
j = idx;
else if (sdiff > 0)