SOURCES: binutils-pr3666.patch (NEW) - fix PR ld/3666: comdat/link...

pluto pluto at pld-linux.org
Wed Dec 6 16:37:42 CET 2006


Author: pluto                        Date: Wed Dec  6 15:37:42 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix PR ld/3666: comdat/linkonce symbol visibility merging.

---- Files affected:
SOURCES:
   binutils-pr3666.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/binutils-pr3666.patch
diff -u /dev/null SOURCES/binutils-pr3666.patch:1.1
--- /dev/null	Wed Dec  6 16:37:42 2006
+++ SOURCES/binutils-pr3666.patch	Wed Dec  6 16:37:37 2006
@@ -0,0 +1,23 @@
+2006-12-06  H.J. Lu <hjl at gnu.org>
+
+	PR ld/3666
+	* elflink.c (elf_link_add_object_symbols): Keep symbol
+	visibility for symbols from discarded section.
+	
+--- binutils/bfd/elflink.c.merge	2006-12-06 06:43:24.000000000 -0800
++++ binutils/bfd/elflink.c	2006-12-06 07:10:18.000000000 -0800
+@@ -3702,12 +3702,10 @@ elf_link_add_object_symbols (bfd *abfd, 
+ 	    sec = bfd_abs_section_ptr;
+ 	  else if (sec->kept_section)
+ 	    {
+-	      /* Symbols from discarded section are undefined, and have
+-		 default visibility.  */
++	      /* Symbols from discarded section are undefined.  We keep
++		 its visibility.  */
+ 	      sec = bfd_und_section_ptr;
+ 	      isym->st_shndx = SHN_UNDEF;
+-	      isym->st_other = (STV_DEFAULT
+-				| (isym->st_other & ~ ELF_ST_VISIBILITY (-1)));
+ 	    }
+ 	  else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
+ 	    value -= sec->vma;
================================================================


More information about the pld-cvs-commit mailing list