Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
* peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right. (pr 8045)
This commit is contained in:
parent
f74b6b5f53
commit
500d7394cf
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||||
|
|
||||||
|
* peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
|
||||||
|
(pr 8045)
|
||||||
|
|
||||||
Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
|
Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
|
||||||
|
|
||||||
* config.bfd (mips-dec-netbsd*): New target.
|
* config.bfd (mips-dec-netbsd*): New target.
|
||||||
|
|
|
@ -894,15 +894,16 @@ static void
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
coff_swap_scnhdr_out (abfd, in, out)
|
coff_swap_scnhdr_out (abfd, in, out)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
PTR in;
|
PTR in;
|
||||||
PTR out;
|
PTR out;
|
||||||
{
|
{
|
||||||
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *)in;
|
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *)in;
|
||||||
SCNHDR *scnhdr_ext = (SCNHDR *)out;
|
SCNHDR *scnhdr_ext = (SCNHDR *)out;
|
||||||
unsigned int ret = sizeof (SCNHDR);
|
unsigned int ret = sizeof (SCNHDR);
|
||||||
bfd_vma s;
|
bfd_vma ps;
|
||||||
|
bfd_vma ss;
|
||||||
|
|
||||||
memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name));
|
memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name));
|
||||||
|
|
||||||
|
@ -912,21 +913,26 @@ PTR out;
|
||||||
- pe_data(abfd)->pe_opthdr.ImageBase),
|
- pe_data(abfd)->pe_opthdr.ImageBase),
|
||||||
(bfd_byte *) scnhdr_ext->s_vaddr);
|
(bfd_byte *) scnhdr_ext->s_vaddr);
|
||||||
|
|
||||||
/* Note that we're really stuffing in the raw size into here. */
|
|
||||||
|
|
||||||
|
|
||||||
PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size,
|
|
||||||
(bfd_byte *) scnhdr_ext->s_size);
|
|
||||||
|
|
||||||
/* NT wants the size data to be rounded up to the next NT_FILE_ALIGNMENT
|
/* NT wants the size data to be rounded up to the next NT_FILE_ALIGNMENT
|
||||||
value except for the BSS section, its s_size should be 0 */
|
value except for the BSS section, its s_size should be 0 */
|
||||||
|
|
||||||
if (strcmp (scnhdr_int->s_name, _BSS) == 0)
|
|
||||||
s = 0;
|
|
||||||
else
|
|
||||||
s = scnhdr_int->s_paddr;
|
|
||||||
|
|
||||||
PUT_SCNHDR_PADDR (abfd, s, (bfd_byte *) scnhdr_ext->s_paddr);
|
if (strcmp (scnhdr_int->s_name, _BSS) == 0)
|
||||||
|
{
|
||||||
|
ps = scnhdr_int->s_size;
|
||||||
|
ss = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ps = scnhdr_int->s_paddr;
|
||||||
|
ss = scnhdr_int->s_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
PUT_SCNHDR_SIZE (abfd, ss,
|
||||||
|
(bfd_byte *) scnhdr_ext->s_size);
|
||||||
|
|
||||||
|
|
||||||
|
PUT_SCNHDR_PADDR (abfd, ps, (bfd_byte *) scnhdr_ext->s_paddr);
|
||||||
|
|
||||||
PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr,
|
PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr,
|
||||||
(bfd_byte *) scnhdr_ext->s_scnptr);
|
(bfd_byte *) scnhdr_ext->s_scnptr);
|
||||||
|
|
Loading…
Reference in New Issue