Hi,
Like the .ctors array, __do_global_dtors_aux_fini_array_entry and
__frame_dummy_init_array_entry arrays need a specific alignment. This
patch fixes those two arrays. This patch fixes the bootstrap on
mips64-linux-gnu.
Bootstrapped on mips64-linux-gnu.
Bootstrapped and tested on x86-linux-gnu with no regressions.
Thanks,
Andrew Pinski
libgcc/ChangeLog:
* crtstuff.c (__do_global_dtors_aux_fini_array_entry): Align to the
size of func_ptr.
(__frame_dummy_init_array_entry): Likewise.
Index: crtstuff.c
===================================================================
--- crtstuff.c (revision 181901)
+++ crtstuff.c (working copy)
@@ -412,7 +412,7 @@
CRT_CALL_STATIC_FUNCTION (FINI_SECTION_ASM_OP, __do_global_dtors_aux)
#elif defined (FINI_ARRAY_SECTION_ASM_OP)
static func_ptr __do_global_dtors_aux_fini_array_entry[]
- __attribute__ ((__used__, section(".fini_array")))
+ __attribute__ ((__used__, section(".fini_array"), aligned(sizeof(func_ptr))))
= { __do_global_dtors_aux };
#else /* !FINI_SECTION_ASM_OP && !FINI_ARRAY_SECTION_ASM_OP */
static void __attribute__((used))
@@ -466,7 +466,7 @@
CRT_CALL_STATIC_FUNCTION (INIT_SECTION_ASM_OP, frame_dummy)
#else /* defined(INIT_SECTION_ASM_OP) */
static func_ptr __frame_dummy_init_array_entry[]
- __attribute__ ((__used__, section(".init_array")))
+ __attribute__ ((__used__, section(".init_array"), aligned(sizeof(func_ptr))))
= { frame_dummy };
#endif /* !defined(INIT_SECTION_ASM_OP) */
#endif /* USE_EH_FRAME_REGISTRY || JCR_SECTION_NAME || USE_TM_CLONE_REGISTRY */