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 .protected on powerpc64-elf


bfd/ChangeLog
	* elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
	not go via the plt.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: bfd/elf64-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-ppc.c,v
retrieving revision 1.24
diff -u -p -r1.24 elf64-ppc.c
--- elf64-ppc.c	2002/01/30 03:47:37	1.24
+++ elf64-ppc.c	2002/01/31 04:01:50
@@ -2536,13 +2536,16 @@ func_desc_adjust (h, inf)
 	  if (fdh->dynindx == -1)
 	    if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
 	      return false;
-	  fdh->plt.refcount = h->plt.refcount;
 	  fdh->elf_link_hash_flags |= (h->elf_link_hash_flags
 				       & (ELF_LINK_HASH_REF_REGULAR
 					  | ELF_LINK_HASH_REF_DYNAMIC
 					  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
 					  | ELF_LINK_NON_GOT_REF));
-	  fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+	  if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+	    {
+	      fdh->plt.refcount = h->plt.refcount;
+	      fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+	    }
 	  ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
 	  fdh->root.root.string = h->root.root.string + 1;
 	}


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