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]

Improve a couple of linker messages


The old error message here led people to believe that the symbol
was undefined, and I find warnings about garbage collection of
zero size sections (eg. .bss in lots of files) just so much clutter.

	* elflink.c (_bfd_elf_link_assign_sym_version): Improve error
	message for undefined version nodes.
	(elf_gc_sweep): Don't warn when zero size sections are
	removed.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.264
diff -u -p -r1.264 elflink.c
--- bfd/elflink.c	16 May 2007 12:52:03 -0000	1.264
+++ bfd/elflink.c	29 Jun 2007 01:21:59 -0000
@@ -1947,7 +1947,7 @@ _bfd_elf_link_assign_sym_version (struct
 	  /* We could not find the version for a symbol when
 	     generating a shared archive.  Return an error.  */
 	  (*_bfd_error_handler)
-	    (_("%B: undefined versioned symbol name %s"),
+	    (_("%B: version node not found for symbol %s"),
 	     sinfo->output_bfd, h->root.root.string);
 	  bfd_set_error (bfd_error_bad_value);
 	  sinfo->failed = TRUE;
@@ -10516,7 +10516,7 @@ elf_gc_sweep (bfd *abfd, struct bfd_link
 	     to remove a section from the output.  */
 	  o->flags |= SEC_EXCLUDE;
 
-	  if (info->print_gc_sections == TRUE)
+	  if (info->print_gc_sections && o->size != 0)
 	    _bfd_error_handler (_("Removing unused section '%s' in file '%B'"), sub, o->name);
 
 	  /* But we also have to update some of the relocation

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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