diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2003-10-17 03:30:27 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2003-10-17 03:30:27 +0000 |
commit | ea019e07b5eaf3516b4b10d1842b210a0093f21b (patch) | |
tree | 9849357e0d427988fb9fb4e822e6cd10896de8f1 /bfd/peXXigen.c | |
parent | 80640edc47582875da9460fa82d4b47a9269d7ff (diff) | |
download | gdb-ea019e07b5eaf3516b4b10d1842b210a0093f21b.tar.gz |
* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size for
sections which lack size info.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index ea98befa1ad..cd0a91c5aac 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -674,7 +674,9 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out) 5.0 link.exe) where the file size of the .data segment is quite small compared to the virtual size. Without this fix, strip munges the file. */ - isize += SA (FA (pei_section_data (abfd, sec)->virt_size)); + if (coff_section_data (abfd, sec) != NULL + && pei_section_data (abfd, sec) != NULL) + isize += SA (FA (pei_section_data (abfd, sec)->virt_size)); } aouthdr_in->dsize = dsize; |