Module Name:    src
Committed By:   skrll
Date:           Mon Aug 11 20:53:16 UTC 2014

Modified Files:
        src/external/gpl3/binutils/dist/bfd: ChangeLog elflink.c

Log Message:
Apply change from upstream to fix PR/48709 - port-alpha/48709: static
threaded programs crash.

With this fix the new weak symbol's st_other is not merged in, i.e. NOPV
is not copied from the libc __libc_thr_init.

* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
symbol that will be skipped, we don't have a new definition.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/binutils/dist/bfd/ChangeLog
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/binutils/dist/bfd/elflink.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/ChangeLog
diff -u src/external/gpl3/binutils/dist/bfd/ChangeLog:1.5 src/external/gpl3/binutils/dist/bfd/ChangeLog:1.6
--- src/external/gpl3/binutils/dist/bfd/ChangeLog:1.5	Sun Sep 29 14:03:29 2013
+++ src/external/gpl3/binutils/dist/bfd/ChangeLog	Mon Aug 11 20:53:16 2014
@@ -1,3 +1,8 @@
+2013-12-14  Alan Modra  <amo...@gmail.com>
+
+	* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
+	symbol that will be skipped, we don't have a new definition.
+
 2013-03-25  Tristan Gingold  <ging...@adacore.com>
 
 	* configure.in: Bump version to 2.23.2

Index: src/external/gpl3/binutils/dist/bfd/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.7 src/external/gpl3/binutils/dist/bfd/elflink.c:1.8
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.7	Sun Sep 29 14:03:29 2013
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Mon Aug 11 20:53:16 2014
@@ -1442,7 +1442,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
       if (!(oldbfd != NULL
 	    && (oldbfd->flags & BFD_PLUGIN) != 0
 	    && (abfd->flags & BFD_PLUGIN) == 0))
-	*skip = TRUE;
+	{
+	  newdef = FALSE;
+	  *skip = TRUE;
+	}
 
       /* Merge st_other.  If the symbol already has a dynamic index,
 	 but visibility says it should not be visible, turn it into a

Reply via email to