]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid assembler warnings from AArch64 constructor/destructor priorities
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 17 Jul 2018 12:43:43 +0000 (12:43 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 17 Jul 2018 12:43:43 +0000 (12:43 +0000)
2018-07-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
PR target/84168
2017-09-28  Joseph Myers  <joseph@codesourcery.com>

* config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
(aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
when creating .init_array and .fini_array sections with priority
specified.

From-SVN: r262821

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 85d77e7a3cd4dcc3b68a351fd4d90d2dfc321cba..b8ab7ef0a054fccc1d981aa18bec03dfd2c29f8d 100644 (file)
@@ -1,3 +1,14 @@
+2018-07-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       Backport from mainline
+       PR target/84168
+       2017-09-28  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
+       (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
+       when creating .init_array and .fini_array sections with priority
+       specified.
+
 2018-07-12  Richard Biener  <rguenther@suse.de>
 
        PR target/84829
index 6c0b64e64c45eb80772b9799bc5eb9abcf27a346..3a29ea8f47c9f262f50c86b9f5dda87db1f76670 100644 (file)
@@ -5804,7 +5804,7 @@ aarch64_elf_asm_constructor (rtx symbol, int priority)
          -Wformat-truncation false positive, use a larger size.  */
       char buf[23];
       snprintf (buf, sizeof (buf), ".init_array.%.5u", priority);
-      s = get_section (buf, SECTION_WRITE, NULL);
+      s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL);
       switch_to_section (s);
       assemble_align (POINTER_SIZE);
       assemble_aligned_integer (POINTER_BYTES, symbol);
@@ -5824,7 +5824,7 @@ aarch64_elf_asm_destructor (rtx symbol, int priority)
          -Wformat-truncation false positive, use a larger size.  */
       char buf[23];
       snprintf (buf, sizeof (buf), ".fini_array.%.5u", priority);
-      s = get_section (buf, SECTION_WRITE, NULL);
+      s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL);
       switch_to_section (s);
       assemble_align (POINTER_SIZE);
       assemble_aligned_integer (POINTER_BYTES, symbol);