diff options
author | Julian Brown <julian@codesourcery.com> | 2005-04-29 14:09:45 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2005-04-29 14:09:45 +0000 |
commit | 7abc66b14227013a4dbb63b03e07d52931b58331 (patch) | |
tree | a069a1c7e66dac7e1d042f7a22530125e2918422 /gcc/config/arm/elf.h | |
parent | aa9dcfc4a46eddb8411f7affe732348f6a241c7d (diff) | |
download | gcc-7abc66b14227013a4dbb63b03e07d52931b58331.tar.gz |
crtstuff.c: Handle targets that use .init_array.
* 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.
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
Co-Authored-By: Paul Brook <paul@codesourcery.com>
From-SVN: r98986
Diffstat (limited to 'gcc/config/arm/elf.h')
-rw-r--r-- | gcc/config/arm/elf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h index a6c6102d088..9a48a9b30e2 100644 --- a/gcc/config/arm/elf.h +++ b/gcc/config/arm/elf.h @@ -120,6 +120,10 @@ #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true +/* Output an element in the static constructor array. */ +#undef TARGET_ASM_CONSTRUCTOR +#define TARGET_ASM_CONSTRUCTOR arm_elf_asm_constructor + /* For PIC code we need to explicitly specify (PLT) and (GOT) relocs. */ #define NEED_PLT_RELOC flag_pic #define NEED_GOT_RELOC flag_pic @@ -143,4 +147,5 @@ } \ while (0) -#define SUPPORTS_INIT_PRIORITY 1 +/* The EABI doesn't provide a way of implementing init_priority. */ +#define SUPPORTS_INIT_PRIORITY (!TARGET_AAPCS_BASED) |