diff options
Diffstat (limited to 'bfd/coffswap.h')
-rw-r--r-- | bfd/coffswap.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bfd/coffswap.h b/bfd/coffswap.h index b97b66c..63a0026 100644 --- a/bfd/coffswap.h +++ b/bfd/coffswap.h @@ -695,9 +695,16 @@ coff_swap_aouthdr_out (bfd * abfd, void * in, void * out) H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); #endif - memset (aouthdr_out->o_resv2, 0, sizeof aouthdr_out->o_resv2); + /* TODO: set o_*psize dynamically */ + H_PUT_8 (abfd, 0, aouthdr_out->o_textpsize); + H_PUT_8 (abfd, 0, aouthdr_out->o_datapsize); + H_PUT_8 (abfd, 0, aouthdr_out->o_stackpsize); + H_PUT_8 (abfd, aouthdr_in->o_flags, aouthdr_out->o_flags); + H_PUT_16 (abfd, aouthdr_in->o_sntdata, aouthdr_out->o_sntdata); + H_PUT_16 (abfd, aouthdr_in->o_sntbss, aouthdr_out->o_sntbss); + H_PUT_32 (abfd, 0, aouthdr_out->o_debugger); #ifdef XCOFF64 - memset (aouthdr_out->o_debugger, 0, sizeof aouthdr_out->o_debugger); + H_PUT_16 (abfd, aouthdr_in->o_x64flags, aouthdr_out->o_x64flags); memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); #endif #endif |