From: Alexandre Oliva Date: Wed, 9 Jun 2004 13:49:04 +0000 (+0000) Subject: * elflink.c (elf_sort_symbol): Compare section id, not pointers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9b881beb10a4fd73d3f8183e424a6cedeb713c5;p=binutils-gdb.git * elflink.c (elf_sort_symbol): Compare section id, not pointers. (elf_link_add_object_symbols): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4d2a84a9fd8..99de171724e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ 2004-06-09 Alexandre Oliva + * 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 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)