This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] sparc-coff writing uninitialized memory
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 11 Jun 2016 08:04:30 -0000
- Subject: [binutils-gdb] sparc-coff writing uninitialized memory
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0eaf2e1b589472d635e85d2ce708faa35a23a90a
commit 0eaf2e1b589472d635e85d2ce708faa35a23a90a
Author: Alan Modra <amodra@gmail.com>
Date: Sat Jun 11 14:49:49 2016 +0930
sparc-coff writing uninitialized memory
sparc-coff has a 20 byte symbol entry with an extra field, but neglects
to initialize the field. Fix that.
* coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define.
Diff:
---
include/ChangeLog | 4 ++++
include/coff/sparc.h | 8 ++++++++
2 files changed, 12 insertions(+)
diff --git a/include/ChangeLog b/include/ChangeLog
index 8ef84cb..722b8a5 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-11 Alan Modra <amodra@gmail.com>
+
+ * coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define.
+
2016-06-08 Jose E. Marchesi <jose.marchesi@oracle.com>
* opcode/sparc.h: Add missing documentation for hyperprivileged
diff --git a/include/coff/sparc.h b/include/coff/sparc.h
index 53d5555..62d2dab 100644
--- a/include/coff/sparc.h
+++ b/include/coff/sparc.h
@@ -138,6 +138,14 @@ union external_auxent
#define AUXENT union external_auxent
#define AUXESZ 20
+#define COFF_ADJUST_SYM_OUT_POST(ABFD, INP, EXTP) \
+ do \
+ { \
+ SYMENT *extsym = (SYMENT *) (EXTP); \
+ extsym->padding[0] = 0; \
+ extsym->padding[1] = 0; \
+ } while (0)
+
#define _ETEXT "etext"
/********************** RELOCATION DIRECTIVES **********************/