From: Steve Chamberlain Date: Thu, 9 May 1991 18:03:16 +0000 (+0000) Subject: Thu May 9 11:00:45 1991 Steve Chamberlain (steve at cygint.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41489b9ad788b249959760de04e117191642dff3;p=binutils-gdb.git Thu May 9 11:00:45 1991 Steve Chamberlain (steve at cygint.cygnus.com) * sunos.c (sunos4_set_section_contents): Made it so that sections are always padded to their alignment size. --- diff --git a/bfd/aout.c b/bfd/aout.c index 35f2d4fb956..f4e70b0a4ba 100755 --- a/bfd/aout.c +++ b/bfd/aout.c @@ -762,9 +762,13 @@ sunos4_set_section_contents (abfd, section, location, offset, count) return false; } - obj_textsec (abfd)->filepos = sizeof(struct exec); - obj_datasec(abfd)->filepos = obj_textsec (abfd)->filepos - + obj_textsec (abfd)->size; + obj_textsec(abfd)->filepos = sizeof(struct exec); + obj_textsec(abfd)->size = align_power(obj_textsec(abfd)->size, + obj_textsec(abfd)->alignment_power); + obj_datasec(abfd)->filepos = obj_textsec (abfd)->filepos + obj_textsec (abfd)->size; + obj_datasec(abfd)->size = align_power(obj_datasec(abfd)->size, + obj_datasec(abfd)->alignment_power); + } /* regardless, once we know what we're doing, we might as well get going */ if (section != obj_bsssec(abfd)) { diff --git a/bfd/sunos.c b/bfd/sunos.c index 35f2d4fb956..f4e70b0a4ba 100644 --- a/bfd/sunos.c +++ b/bfd/sunos.c @@ -762,9 +762,13 @@ sunos4_set_section_contents (abfd, section, location, offset, count) return false; } - obj_textsec (abfd)->filepos = sizeof(struct exec); - obj_datasec(abfd)->filepos = obj_textsec (abfd)->filepos - + obj_textsec (abfd)->size; + obj_textsec(abfd)->filepos = sizeof(struct exec); + obj_textsec(abfd)->size = align_power(obj_textsec(abfd)->size, + obj_textsec(abfd)->alignment_power); + obj_datasec(abfd)->filepos = obj_textsec (abfd)->filepos + obj_textsec (abfd)->size; + obj_datasec(abfd)->size = align_power(obj_datasec(abfd)->size, + obj_datasec(abfd)->alignment_power); + } /* regardless, once we know what we're doing, we might as well get going */ if (section != obj_bsssec(abfd)) {