sparc-coff writing uninitialized memory
authorAlan Modra <amodra@gmail.com>
Sat, 11 Jun 2016 05:19:49 +0000 (14:49 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 11 Jun 2016 07:55:35 +0000 (17:25 +0930)
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.

include/ChangeLog
include/coff/sparc.h

index 8ef84cb449fb16112fdb1b07dc7f2c463b844c46..722b8a5365cecd54bd95788da316ac8a2529f39b 100644 (file)
@@ -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
index 53d555528e80d428c8c04fca76dbf339de4b800b..62d2dabda7ff23abef85d2151ae26c92e01463c4 100644 (file)
@@ -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 **********************/