From d24bc14583aaf3a0edb93267bffb5b240252d87c Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 29 Apr 2005 14:09:45 +0000 Subject: * crtstuff.c: Handle targets that use .init_array. * function.c (HAS_INIT_SECTION): Do not define. Instead, make sure that INVOKE__main is set correctly. (expand_main_function): Test INVOKE__main. * libgcc2.c: Do not define __main when using .init_array. * config/arm/arm.c (arm_elf_asm_constructor): New function. * config/arm/arm.h (CTORS_SECTION_ASM_OP): Define, with specialized libgcc version. (DTORS_SECTION_ASM_OP): Likewise. (CTOR_LIST_BEGIN): Define specially when in libgcc. (CTOR_LIST_END): Likewise. (DTOR_LIST_BEGIN): Likewise. (DTOR_LIST_END): Likewise. * config/arm/bpapi.h (INIT_SECTION_ASM_OP): Do not define it. (FINI_SECTION_ASM_OP): Likewise. (INIT_ARRAY_SECTION_ASM_OP): Define. (FINI_ARRAY_SECTION_ASM_OP): Likewise. * config/arm/elf.h (TARGET_ASM_CONSTRUCTOR): Define. (SUPPORTS_INIT_PRIORITY): Evaluate to false for EABI based targets. * doc/tm.texi (INIT_ARRAY_SECTION_ASM_OP): Document. (FINI_ARRAY_SECTION_ASM_OP): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98986 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/arm/bpabi.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/config/arm/bpabi.h') diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h index 6fb11b9838c..037b26de145 100644 --- a/gcc/config/arm/bpabi.h +++ b/gcc/config/arm/bpabi.h @@ -100,3 +100,10 @@ #define TARGET_OS_CPP_BUILTINS() \ TARGET_BPABI_CPP_BUILTINS() + +/* The BPABI specifies the use of .{init,fini}_array. Therefore, we + do not want GCC to put anything into the .{init,fini} sections. */ +#undef INIT_SECTION_ASM_OP +#undef FINI_SECTION_ASM_OP +#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP +#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP -- cgit v1.2.1