diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2004-06-09 13:49:04 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2004-06-09 13:49:04 +0000 |
commit | 503ca5a526662875b8030515718845f6ff884faf (patch) | |
tree | 4155e0ae6cbc84ce318a843ca933cec6de6c8389 /bfd/elflink.c | |
parent | 9e103f3bc9d45bb88c91f377004d49c953207ab2 (diff) | |
download | gdb-503ca5a526662875b8030515718845f6ff884faf.tar.gz |
* elflink.c (elf_sort_symbol): Compare section id, not pointers.
(elf_link_add_object_symbols): Likewise.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 436ff840e6d..37b113b6716 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) |