CVS commit: [netbsd-6] src/external/gpl3/binutils/dist/bfd

2018-04-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Apr  9 13:00:07 UTC 2018

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-6]: elflink.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1543):

external/gpl3/binutils/dist/bfd/elflink.c: revision 1.14 (patch)

When trying to decide the status of a weak symbol, resolve any
indirectness first. In the case of various Qt5 libraries, __bss_start
ends up with a Qt5 version, but it has to be resolved first to match the
actual (implicit) definition. This fixes the root cause of pkg/53089.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.1 -r1.5.2.2 \
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/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.5.2.1 src/external/gpl3/binutils/dist/bfd/elflink.c:1.5.2.2
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.5.2.1	Tue Apr  3 15:54:48 2012
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Mon Apr  9 13:00:06 2018
@@ -2528,9 +2528,10 @@ _bfd_elf_fix_symbol_flags (struct elf_li
  over to the real definition.  */
   if (h->u.weakdef != NULL)
 {
-  struct elf_link_hash_entry *weakdef;
+  struct elf_link_hash_entry *weakdef = h->u.weakdef;
+  while (weakdef->root.type == bfd_link_hash_indirect)
+weakdef = (struct elf_link_hash_entry *) weakdef->root.u.i.link;
 
-  weakdef = h->u.weakdef;
   if (h->root.type == bfd_link_hash_indirect)
 	h = (struct elf_link_hash_entry *) h->root.u.i.link;
 



CVS commit: [netbsd-6] src/external/gpl3/binutils/dist/bfd

2012-09-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Mon Sep  3 18:59:24 UTC 2012

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-6]: elf32-vax.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #531):
external/gpl3/binutils/dist/bfd/elf32-vax.c: revision 1.7
Make this to produce working shared libraries again.
Resultant distribution was booted into single user using shared libraries.


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.1 -r1.5.2.2 \
src/external/gpl3/binutils/dist/bfd/elf32-vax.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/elf32-vax.c
diff -u src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5.2.1 src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5.2.2
--- src/external/gpl3/binutils/dist/bfd/elf32-vax.c:1.5.2.1	Wed Jul 25 15:09:34 2012
+++ src/external/gpl3/binutils/dist/bfd/elf32-vax.c	Mon Sep  3 18:59:23 2012
@@ -52,7 +52,7 @@ static bfd_vma elf_vax_plt_sym_val (bfd_
 
 static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
 static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
-static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR);
+static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
 
 static reloc_howto_type howto_table[] = {
   HOWTO (R_VAX_NONE,		/* type */
@@ -422,7 +422,7 @@ static bfd_boolean elf_vax_instantiate_g
 #define elf_vax_link_hash_traverse(table, func, info)			\
   (elf_link_hash_traverse		\
((table),\
-(bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func),	\
+(bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func),	\
 (info)))
 
 /* Create an entry in an VAX ELF linker hash table.  */
@@ -531,7 +531,7 @@ elf32_vax_merge_private_bfd_data (bfd *i
 
 /* Display the flags field */
 static bfd_boolean
-elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr)
+elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr)
 {
   FILE *file = (FILE *) ptr;
 
@@ -640,14 +640,13 @@ elf_vax_check_relocs (bfd *abfd, struct 
 	  srelgot = bfd_get_section_by_name (dynobj, .rela.got);
 	  if (srelgot == NULL)
 		{
+		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+| SEC_IN_MEMORY | SEC_LINKER_CREATED
+| SEC_READONLY);
+
 		  srelgot = bfd_make_section_with_flags (dynobj,
 			 .rela.got,
-			 (SEC_ALLOC
-			  | SEC_LOAD
-			  | SEC_HAS_CONTENTS
-			  | SEC_IN_MEMORY
-			  | SEC_LINKER_CREATED
-			  | SEC_READONLY));
+			 flags);
 		  if (srelgot == NULL
 		  || !bfd_set_section_alignment (dynobj, srelgot, 2))
 		return FALSE;
@@ -769,30 +768,14 @@ elf_vax_check_relocs (bfd *abfd, struct 
 		  if (sreloc == NULL)
 		return FALSE;
 
-#if 0
-		  BFD_ASSERT (CONST_STRNEQ (name, .rela)
-			   strcmp (bfd_get_section_name (abfd, sec),
-	 name + 5) == 0);
-
-		  sreloc = bfd_get_section_by_name (dynobj, name);
-		  if (sreloc == NULL)
+		  if (sec-flags  SEC_READONLY)
 		{
-		  sreloc = bfd_make_section_with_flags (dynobj,
-			name,
-			(SEC_ALLOC
-			 | SEC_LOAD
-			 | SEC_HAS_CONTENTS
-			 | SEC_IN_MEMORY
-			 | SEC_LINKER_CREATED
-			 | SEC_READONLY));
-		  if (sreloc == NULL
-			  || !bfd_set_section_alignment (dynobj, sreloc, 2))
-			return FALSE;
+			if (info-warn_shared_textrel)
+			  (*_bfd_error_handler)
+			(_(warning: dynamic relocation in readonly section `%s'),
+			 sec-name);
+			info-flags |= DF_TEXTREL;
 		}
-#endif
-
-		  if (sec-flags  SEC_READONLY)
-		info-flags |= DF_TEXTREL;
 		}
 
 	  sreloc-size += sizeof (Elf32_External_Rela);
@@ -973,14 +956,14 @@ elf_vax_adjust_dynamic_symbol (info, h)
   if (h-type == STT_FUNC
   || h-needs_plt)
 {
-  if (h-plt.refcount == 0
-	  || SYMBOL_CALLS_LOCAL (info, 0)
+  if (h-plt.refcount = 0
+	  || SYMBOL_CALLS_LOCAL (info, h)
 	  || (ELF_ST_VISIBILITY (h-other) != STV_DEFAULT
 	   h-root.type == bfd_link_hash_undefweak))
 	{
 	  /* This case can occur if we saw a PLTxx reloc in an input
 	 file, but the symbol was never referred to by a dynamic
-	 object, or if all references were garbage collected..  In
+	 object, or if all references were garbage collected.  In
 	 such a case, we don't actually need to build a procedure
 	 linkage table, and we can just do a PCxx reloc instead.  */
 	  h-plt.offset = (bfd_vma) -1;
@@ -1057,13 +1040,6 @@ elf_vax_adjust_dynamic_symbol (info, h)
   if (info-shared)
 return TRUE;
 
-  if (h-size == 0)
-{
-  (*_bfd_error_handler) (_(dynamic variable `%s' is zero size),
-			 h-root.root.string);
-  return TRUE;
-}
-
   /* We must allocate the symbol in our .dynbss section, which will
  become part of the .bss section of the executable.  There will be
  an entry for this symbol in the 

CVS commit: [netbsd-6] src/external/gpl3/binutils/dist/bfd

2012-04-03 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Apr  3 15:54:48 UTC 2012

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-6]: elflink.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #152):
external/gpl3/binutils/dist/bfd/elflink.c: revision 1.6
Fix merge botch dealing with linker assignments.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 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/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.5 src/external/gpl3/binutils/dist/bfd/elflink.c:1.5.2.1
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.5	Sat Nov 26 15:59:34 2011
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Tue Apr  3 15:54:48 2012
@@ -567,10 +567,7 @@ bfd_elf_record_link_assignment (bfd *out
!h-def_regular)
 h-verinfo.verdef = NULL;
 
-  /* Only set symbols not provided from the linker script as regular so
- that we can find their version from verdef not vertree */
-  if (!provide)
-h-def_regular = 1;
+  h-def_regular = 1;
 
   if (provide  hidden)
 {



CVS commit: [netbsd-6] src/external/gpl3/binutils/dist/bfd

2012-03-02 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Mar  3 00:52:58 UTC 2012

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-6]: elfxx-mips.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #82):
external/gpl3/binutils/dist/bfd/elfxx-mips.c: revision 1.6
Fix support for .protected symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/external/gpl3/binutils/dist/bfd/elfxx-mips.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/elfxx-mips.c
diff -u src/external/gpl3/binutils/dist/bfd/elfxx-mips.c:1.5 src/external/gpl3/binutils/dist/bfd/elfxx-mips.c:1.5.4.1
--- src/external/gpl3/binutils/dist/bfd/elfxx-mips.c:1.5	Sun Sep 25 04:32:35 2011
+++ src/external/gpl3/binutils/dist/bfd/elfxx-mips.c	Sat Mar  3 00:52:57 2012
@@ -5138,7 +5138,10 @@ mips_elf_calculate_relocation (bfd *abfd
 			   || ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR)
 			target_is_16_bit_code_p));
 
-  local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, h-root);
+  local_p = h == NULL
+|| (h-got_only_for_calls
+	? SYMBOL_CALLS_LOCAL (info, h-root)
+	: SYMBOL_REFERENCES_LOCAL (info, h-root));
 
   gp0 = _bfd_get_gp_value (input_bfd);
   gp = _bfd_get_gp_value (abfd);