This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/3] LD: vfinfo: Remove static NULL initializers
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Date: Tue, 7 Feb 2017 02:06:20 +0000
- Subject: [PATCH 1/3] LD: vfinfo: Remove static NULL initializers
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.00.1702040045510.26999@tp.orcam.me.uk>
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;