aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-11-27 11:04:17 +0000
committerNick Clifton <nickc@redhat.com>2017-11-27 11:04:17 +0000
commite3d40582166056dd1dfeef2a06ba8f5897b673ee (patch)
treed7fb72a46cb8e9d98e5544f0b55953229a8490f2 /gas
parentee9a09e959a5b7c152cc72028d4f6c879bc901c9 (diff)
downloadfsf-binutils-gdb-e3d40582166056dd1dfeef2a06ba8f5897b673ee.zip
fsf-binutils-gdb-e3d40582166056dd1dfeef2a06ba8f5897b673ee.tar.gz
fsf-binutils-gdb-e3d40582166056dd1dfeef2a06ba8f5897b673ee.tar.bz2
When creating a .note section to contain a version note, set the section alignment to 4 bytes.
PR 22492 * config/obj-elf.c (obj_elf_version): Set the alignment of the .note section.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/obj-elf.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 79c5b87..4dd6820 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 3f641f4..2d1d167 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -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;