Fix the gas test align2 for the PDP11 by ensuring that the .text and .data sections...
authorNick Clifton <nickc@redhat.com>
Tue, 24 Feb 2015 10:13:51 +0000 (10:13 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 24 Feb 2015 10:13:51 +0000 (10:13 +0000)
* pdp11.c (set_section_contents): Pad the .text and .data sections
to their aligned sizes.

bfd/ChangeLog
bfd/pdp11.c

index efa539cfc69377e200a9ba5ce67f502a713ce655..24e21766c42e256e1bbc3a4b461a1ed5341dcef9 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-24  Nick Clifton  <nickc@redhat.com>
+
+       * pdp11.c (set_section_contents): Pad the .text and .data sections
+       to their aligned sizes.
+
 2015-02-23  Yoshinori Sato <ysato@users.sourceforge.jp>
 
        * config.bfd: Add h8300-*-linux.
index 0c2bb136757e3fae9ea7dd64d040f9b9436e3b13..241e3582f318f9d38c80501d73f3aa01733f8799 100644 (file)
@@ -1172,6 +1172,14 @@ NAME (aout, set_section_contents) (bfd *abfd,
       if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
          || bfd_bwrite (location, count, abfd) != count)
        return FALSE;
+
+      /* If necessary, pad the section to its aligned size.  */
+      if ((section == obj_datasec (abfd)
+          || section == obj_textsec (abfd))
+         && count < section->size
+         && (bfd_seek (abfd, section->filepos + offset + section->size - 1, SEEK_SET) != 0
+             || bfd_bwrite ("", 1, abfd) != 1))
+       return FALSE;
     }
 
   return TRUE;
This page took 0.032015 seconds and 4 git commands to generate.