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 | a9b881beb10a4fd73d3f8183e424a6cedeb713c5 (patch) | |
tree | ce490dbb4e7ee6a202533bf24ffb9aba010181f0 /bfd/elflink.c | |
parent | b5c0bfa20ecb42d620042caceb3a3fe4db16a9e3 (diff) | |
download | gdb-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.zip gdb-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.tar.gz gdb-a9b881beb10a4fd73d3f8183e424a6cedeb713c5.tar.bz2 |
* 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 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) |