aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/beginwarn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-elf/beginwarn.c')
-rw-r--r--ld/testsuite/ld-elf/beginwarn.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/beginwarn.c b/ld/testsuite/ld-elf/beginwarn.c
new file mode 100644
index 000000000000..ebe28191b56f
--- /dev/null
+++ b/ld/testsuite/ld-elf/beginwarn.c
@@ -0,0 +1,9 @@
+static const char _evoke_link_warning_foo []
+ __attribute__ ((used, section (".gnu.warning.foo")))
+ = "function foo is deprecated";
+
+extern void foo (void);
+
+static void (*const init_array []) (void)
+ __attribute__ ((used, section (".init_array"), aligned (sizeof (void *))))
+ = { foo };