[PATCH 1/3] LD: vfinfo: Remove static NULL initializers
Maciej W. Rozycki
macro@imgtec.com
Tue Feb 7 02:06:00 GMT 2017
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;
More information about the Binutils
mailing list