From c7b2e4f612894cbee71c97d1b6400b0b143621ce Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 10 Dec 2002 23:28:48 +0000 Subject: 2002-12-10 Jakub Jelinek * elf/tst-array1.c (preinit_array, init_array, fini_array): Explicitly align the array to sizeof (void *). * elf/tst-array2dep.c (init_array, fini_array): Likewise. --- elf/tst-array1.c | 8 +++++--- elf/tst-array2dep.c | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'elf') diff --git a/elf/tst-array1.c b/elf/tst-array1.c index 86ed4a1..4d78db6 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, diff --git a/elf/tst-array2dep.c b/elf/tst-array2dep.c index be46dd1..e1596b5 100644 --- a/elf/tst-array2dep.c +++ b/elf/tst-array2dep.c @@ -34,7 +34,8 @@ init_2 (void) write (STDOUT_FILENO, "DSO init array 2\n", 17); } -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, @@ -59,7 +60,8 @@ fini_2 (void) write (STDOUT_FILENO, "DSO fini array 2\n", 17); } -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, -- cgit v1.1