(coff_swap_scnhdr_in): Only remove padding when processing an executable.
This commit is contained in:
parent
108ba30509
commit
c9ac89782d
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-10-22 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* peicode.h (coff_swap_scnhdr_in): Only remove padding when
|
||||||
|
processing an executable.
|
||||||
|
|
||||||
2003-10-22 Jakub Jelinek <jakub@redhat.com>
|
2003-10-22 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
|
* elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
|
||||||
|
|
|
@ -258,12 +258,12 @@ coff_swap_scnhdr_in (abfd, ext, in)
|
||||||
#ifndef COFF_NO_HACK_SCNHDR_SIZE
|
#ifndef COFF_NO_HACK_SCNHDR_SIZE
|
||||||
/* If this section holds uninitialized data and is from an object file
|
/* If this section holds uninitialized data and is from an object file
|
||||||
or from an executable image that has not initialized the field,
|
or from an executable image that has not initialized the field,
|
||||||
or if the physical size is padded, use the virtual size (stored in
|
or if the image is an executable file and the physical size is padded,
|
||||||
s_paddr) instead. */
|
use the virtual size (stored in s_paddr) instead. */
|
||||||
if (scnhdr_int->s_paddr > 0
|
if (scnhdr_int->s_paddr > 0
|
||||||
&& (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0
|
&& (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0
|
||||||
&& (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 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 > scnhdr_int->s_paddr)))
|
||||||
{
|
{
|
||||||
scnhdr_int->s_size = scnhdr_int->s_paddr;
|
scnhdr_int->s_size = scnhdr_int->s_paddr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue