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 1/3] LD: vfinfo: Remove static NULL initializers


Remove static NULL initializers, moving the respective variables from 
data to BSS and saving some storage space.

	ld/
	* ldmisc.c (vfinfo) <'H'>: Remove static NULL initializers.
---
 This seems so obvious I find it hard to believe there is no hidden 
purpose here.  Especially as `last_bfd' placed next doesn't have an 
initializer.  But maybe there isn't a purpose really.  OK to apply?

  Maciej

binutils-ld-vfinfo-static-init.diff
Index: binutils/ld/ldmisc.c
===================================================================
--- binutils.orig/ld/ldmisc.c	2017-02-02 01:09:23.000000000 +0000
+++ binutils/ld/ldmisc.c	2017-02-02 01:15:02.206819597 +0000
@@ -280,8 +280,8 @@ vfinfo (FILE *fp, const char *fmt, va_li
 		 The arguments are a BFD, a section, and an offset.  */
 	      {
 		static bfd *last_bfd;
-		static char *last_file = NULL;
-		static char *last_function = NULL;
+		static char *last_file;
+		static char *last_function;
 		bfd *abfd;
 		asection *section;
 		bfd_vma offset;


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