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.
This commit is contained in:
parent
e0c60db230
commit
0515494aac
|
@ -1,3 +1,10 @@
|
||||||
|
2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
|
||||||
|
|
||||||
|
* peicode.h (coff_swap_scnhdr_in): 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.
|
||||||
|
|
||||||
2001-07-04 H.J. Lu <hjl@gnu.org>
|
2001-07-04 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
|
* bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
|
||||||
|
|
|
@ -275,7 +275,8 @@ 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, use the virtual size
|
/* If this section holds uninitialized data, use the virtual size
|
||||||
(stored in s_paddr) instead of the physical 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;
|
scnhdr_int->s_size = scnhdr_int->s_paddr;
|
||||||
/* This code used to set scnhdr_int->s_paddr to 0. However,
|
/* This code used to set scnhdr_int->s_paddr to 0. However,
|
||||||
|
|
Loading…
Reference in New Issue