This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]