This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
sparc-coff writing uninitialized memory to output file
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sat, 11 Jun 2016 17:34:00 +0930
- Subject: sparc-coff writing uninitialized memory to output file
- Authentication-results: sourceware.org; auth=none
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 --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 **********************/
--
Alan Modra
Australia Development Lab, IBM