diff options
author | Alan Modra <amodra@gmail.com> | 2016-06-11 14:49:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-06-11 17:25:35 +0930 |
commit | 0eaf2e1b589472d635e85d2ce708faa35a23a90a (patch) | |
tree | cc99f3e97aedd77fe98be3e3239c5105831e6886 /include/coff | |
parent | ef53be89160126f2fa5dec8f1ec3bd6d99fb0681 (diff) | |
download | gdb-0eaf2e1b589472d635e85d2ce708faa35a23a90a.zip gdb-0eaf2e1b589472d635e85d2ce708faa35a23a90a.tar.gz gdb-0eaf2e1b589472d635e85d2ce708faa35a23a90a.tar.bz2 |
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.
Diffstat (limited to 'include/coff')
-rw-r--r-- | include/coff/sparc.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 **********************/ |