Skip to content

Commit 0eaf2e1

Browse files
committed
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.
1 parent ef53be8 commit 0eaf2e1

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎include/ChangeLog‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2016-06-11 Alan Modra <amodra@gmail.com>
2+
3+
* coff/sparc.h (COFF_ADJUST_SYM_OUT_POST): Define.
4+
15
2016-06-08 Jose E. Marchesi <jose.marchesi@oracle.com>
26

37
* opcode/sparc.h: Add missing documentation for hyperprivileged

‎include/coff/sparc.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ union external_auxent
138138
#define AUXENT union external_auxent
139139
#define AUXESZ 20
140140

141+
#define COFF_ADJUST_SYM_OUT_POST(ABFD, INP, EXTP) \
142+
do \
143+
{ \
144+
SYMENT *extsym = (SYMENT *) (EXTP); \
145+
extsym->padding[0] = 0; \
146+
extsym->padding[1] = 0; \
147+
} while (0)
148+
141149
#define _ETEXT "etext"
142150

143151
/********************** RELOCATION DIRECTIVES **********************/

0 commit comments

Comments
 (0)