diff options
author | Nick Clifton <nickc@redhat.com> | 2001-07-05 10:52:25 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-07-05 10:52:25 +0000 |
commit | 0515494aac726cd5112c6136a3126de9f1535e6a (patch) | |
tree | 634aa86a98a1948cc7a608d8e33ec88382990c6f /bfd/peicode.h | |
parent | e0c60db2304c4c0db3f666d0d41b18a1406f68fc (diff) | |
download | gdb-0515494aac726cd5112c6136a3126de9f1535e6a.zip gdb-0515494aac726cd5112c6136a3126de9f1535e6a.tar.gz gdb-0515494aac726cd5112c6136a3126de9f1535e6a.tar.bz2 |
For sections containing uninitialised data, only set their size to s_paddr
if this does not reset their size to zero. MS's latest compilers will set
s_paddr to zero.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index a0f7449..20fe01c 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -275,7 +275,8 @@ coff_swap_scnhdr_in (abfd, ext, in) #ifndef COFF_NO_HACK_SCNHDR_SIZE /* If this section holds uninitialized data, use the virtual size (stored in s_paddr) instead of the physical size. */ - if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0) + if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0 + && (scnhdr_int->s_paddr > 0)) { scnhdr_int->s_size = scnhdr_int->s_paddr; /* This code used to set scnhdr_int->s_paddr to 0. However, |