[PATCH] One line fix for Alpha non-alloced .rela sections

Jakub Jelinek jakub@redhat.com
Wed Oct 23 13:35:00 GMT 2002


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



More information about the Binutils mailing list