diff options
author | Nick Clifton <nickc@redhat.com> | 2003-10-22 15:12:58 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-10-22 15:12:58 +0000 |
commit | c9ac89782df8198d0c48219364b15d3af5efa0dd (patch) | |
tree | c29e7a8ce2d65d1b68e4cb6a611e4531a152f773 /bfd/peicode.h | |
parent | 108ba30509ad6169d0f2e06b755fa39a2c28a946 (diff) | |
download | gdb-c9ac89782df8198d0c48219364b15d3af5efa0dd.zip gdb-c9ac89782df8198d0c48219364b15d3af5efa0dd.tar.gz gdb-c9ac89782df8198d0c48219364b15d3af5efa0dd.tar.bz2 |
(coff_swap_scnhdr_in): Only remove padding when processing an executable.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index b3c1f29..094f52d 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -258,12 +258,12 @@ coff_swap_scnhdr_in (abfd, ext, in) #ifndef COFF_NO_HACK_SCNHDR_SIZE /* If this section holds uninitialized data and is from an object file or from an executable image that has not initialized the field, - or if the physical size is padded, use the virtual size (stored in - s_paddr) instead. */ + or if the image is an executable file and the physical size is padded, + use the virtual size (stored in s_paddr) instead. */ if (scnhdr_int->s_paddr > 0 && (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0 - && (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0)) - || scnhdr_int->s_size > scnhdr_int->s_paddr)) + && (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0)) + || (bfd_pe_executable_p (abfd) && scnhdr_int->s_size > scnhdr_int->s_paddr))) { scnhdr_int->s_size = scnhdr_int->s_paddr; |