This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] One line fix for Alpha non-alloced .rela sections
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 23 Oct 2002 22:35:42 +0200
- Subject: [PATCH] One line fix for Alpha non-alloced .rela sections
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
I've commited the following one-liner. More changes will be necessary
to make sure there are no R_ALPHA_NONE relocs with --gc-sections or
in non-alloced sections with version script.
But this patch kills like 95% of the NONE relocs.
Approved by Richard off-list.
2002-10-23 Jakub Jelinek <jakub@redhat.com>
* elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
relocs into shared lib non-allocated reloc sections.
--- bfd/elf64-alpha.c.jj 2002-10-16 16:36:15.000000000 +0200
+++ bfd/elf64-alpha.c 2002-10-23 21:45:22.000000000 +0200
@@ -3100,7 +3100,7 @@ elf64_alpha_check_relocs (abfd, info, se
case R_ALPHA_REFLONG:
case R_ALPHA_REFQUAD:
- if (info->shared || maybe_dynamic)
+ if ((info->shared && (sec->flags & SEC_ALLOC)) || maybe_dynamic)
need = NEED_DYNREL;
break;
Jakub