This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Take into account reloc_class_plt
- To: binutils at sources dot redhat dot com
- Subject: [PATCH] Take into account reloc_class_plt
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 26 Sep 2001 18:12:44 +0200
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
Hi!
Since IA-64 will now have reloc_class_plt relocations in .rela.dyn section,
we shouldn't mix those R_IA64_IPLTLSB relocs with non-PLT relocs against the
same symbol, since otherwise ld.so lookup cache will have fewer hits.
Ok to commit?
2001-09-26 Jakub Jelinek <jakub@redhat.com>
* elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
relocations against the same symbol in .rel{,a}.dyn section.
--- bfd/elflink.h.jj Wed Sep 26 20:10:51 2001
+++ bfd/elflink.h Wed Sep 26 20:12:48 2001
@@ -4373,8 +4373,8 @@ elf_link_sort_cmp2 (A, B)
return -1;
if (a->offset > b->offset)
return 1;
- copya = a->type == reloc_class_copy;
- copyb = b->type == reloc_class_copy;
+ copya = (a->type == reloc_class_copy) * 2 + (a->type == reloc_class_plt);
+ copyb = (b->type == reloc_class_copy) * 2 + (b->type == reloc_class_plt);
if (copya < copyb)
return -1;
if (copya > copyb)
Jakub