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]

fix elf64-alpha link


Exposed by libstdc++ tests.


r~


        * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
        check; don't suppress dynamic relocs for non-allocated sections.

Index: elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.63
diff -c -p -d -u -r1.63 elf64-alpha.c
--- elf64-alpha.c	30 May 2002 22:01:28 -0000	1.63
+++ elf64-alpha.c	1 Jun 2002 21:24:04 -0000
@@ -2640,7 +2640,7 @@ elf64_alpha_check_relocs (abfd, info, se
       if (h && ((info->shared
 		 && (!info->symbolic || info->allow_shlib_undefined))
 		|| ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
-		|| h->root.type == bfd_link_hash_defweak))
+		|| h->root.root.type == bfd_link_hash_defweak))
         maybe_dynamic = true;
 
       need = 0;
@@ -2815,12 +2815,13 @@ elf64_alpha_check_relocs (abfd, info, se
 	      else
 		rent->count++;
 	    }
-	  else if (info->shared && (sec->flags & SEC_ALLOC))
+	  else if (info->shared)
 	    {
 	      /* If this is a shared library, and the section is to be
 		 loaded into memory, we need a RELATIVE reloc.  */
 	      sreloc->_raw_size += sizeof (Elf64_External_Rela);
-	      if (sec->flags & SEC_READONLY)
+	      if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
+		  == (SEC_READONLY | SEC_ALLOC))
 		info->flags |= DF_TEXTREL;
 	    }
 	}


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