about summary refs log tree commit diff
path: root/elf/tst-array1.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tst-array1.c')
-rw-r--r--elf/tst-array1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/tst-array1.c b/elf/tst-array1.c
index 86ed4a1a63..4d78db6167 100644
--- a/elf/tst-array1.c
+++ b/elf/tst-array1.c
@@ -35,7 +35,7 @@ preinit_2 (void)
 }
 
 void (*const preinit_array []) (void)
-     __attribute__ ((section (".preinit_array"))) =
+     __attribute__ ((section (".preinit_array"), aligned (sizeof (void *)))) =
 {
   &preinit_0,
   &preinit_1,
@@ -60,7 +60,8 @@ init_2 (void)
   write (STDOUT_FILENO, "init array 2\n", 13);
 }
 
-void (*const init_array []) (void) __attribute__ ((section (".init_array"))) =
+void (*const init_array []) (void)
+     __attribute__ ((section (".init_array"), aligned (sizeof (void *)))) =
 {
   &init_0,
   &init_1,
@@ -85,7 +86,8 @@ fini_2 (void)
   write (STDOUT_FILENO, "fini array 2\n", 13);
 }
 
-void (*const fini_array []) (void) __attribute__ ((section (".fini_array"))) =
+void (*const fini_array []) (void)
+     __attribute__ ((section (".fini_array"), aligned (sizeof (void *)))) =
 {
   &fini_0,
   &fini_1,