When creating a .note section to contain a version note, set the section alignment...
authorNick Clifton <nickc@redhat.com>
Mon, 27 Nov 2017 11:04:17 +0000 (11:04 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 27 Nov 2017 11:04:17 +0000 (11:04 +0000)
PR 22492
* config/obj-elf.c (obj_elf_version): Set the alignment of the
.note section.

gas/ChangeLog
gas/config/obj-elf.c

index 79c5b87..4dd6820 100644 (file)
@@ -1,3 +1,9 @@
+2017-11-27  Nick Clifton  <nickc@redhat.com>
+
+       PR 22492
+       * config/obj-elf.c (obj_elf_version): Set the alignment of the
+       .note section.
+
 2017-11-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/gas/i386/sse-noavx.s: Add tests for fisttps and
index 3f641f4..2d1d167 100644 (file)
@@ -1829,6 +1829,7 @@ obj_elf_version (int ignore ATTRIBUTE_UNUSED)
       bfd_set_section_flags (stdoutput,
                             note_secp,
                             SEC_HAS_CONTENTS | SEC_READONLY);
+      bfd_set_section_alignment (stdoutput, note_secp, 2);
 
       /* Process the version string.  */
       len = strlen (name) + 1;