This is the mail archive of the binutils@sourceware.org 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 committed] Fix some sh64 FAILs [1]


Hi,

There are many failures on sh64-unknown-elf for a while.
I'd like to apply a series of patches to fix them.

FAIL: ld-sh/sh64/init-media
FAIL: ld-sh/sh64/init64
FAIL: ld-sh/sh64/stobin-1

are caused by handling of st_other field in the sh64 specific
elf_merge_symbol_attribute functions.  The attached patch is
to fix this with the similar change for MIPS's
http://sourceware.org/ml/binutils/2006-08/msg00130.html

Regards,
	kaz
--
2006-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* elf32-sh64.c (sh64_elf_merge_symbol_attribute): Do merging
	only when the non visibility part of st_other is non-zero.
	* elf64-sh64.c (sh64_elf64_merge_symbol_attribute): Likewise.

diff -uprN ORIG/src/bfd/elf32-sh64.c LOCAL/src/bfd/elf32-sh64.c
--- ORIG/src/bfd/elf32-sh64.c	2006-09-29 19:34:50.000000000 +0900
+++ LOCAL/src/bfd/elf32-sh64.c	2006-10-21 10:18:18.000000000 +0900
@@ -742,9 +742,9 @@ static void
 sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
 				 const Elf_Internal_Sym *isym,
 				 bfd_boolean definition,
-				 bfd_boolean dynamic)
+				 bfd_boolean dynamic ATTRIBUTE_UNUSED)
 {
-  if (isym->st_other != 0 && dynamic)
+  if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
     {
       unsigned char other;
 
diff -uprN ORIG/src/bfd/elf64-sh64.c LOCAL/src/bfd/elf64-sh64.c
--- ORIG/src/bfd/elf64-sh64.c	2006-10-18 11:00:01.000000000 +0900
+++ LOCAL/src/bfd/elf64-sh64.c	2006-10-21 10:20:16.000000000 +0900
@@ -4020,9 +4020,9 @@ static void
 sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
 				   const Elf_Internal_Sym *isym,
 				   bfd_boolean definition,
-				   bfd_boolean dynamic)
+				   bfd_boolean dynamic ATTRIBUTE_UNUSED)
 {
-  if (isym->st_other != 0 && dynamic)
+  if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
     {
       unsigned char other;
 


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