2000-09-19 01:25:31 +00:00
|
|
|
/* crti.s for eabi
|
2009-04-09 17:00:19 +02:00
|
|
|
Copyright (C) 1996, 2000, 2008, 2009 Free Software Foundation, Inc.
|
2000-09-19 01:25:31 +00:00
|
|
|
Written By Michael Meissner
|
|
|
|
|
|
|
|
This file is free software; you can redistribute it and/or modify it
|
|
|
|
under the terms of the GNU General Public License as published by the
|
2009-04-09 17:00:19 +02:00
|
|
|
Free Software Foundation; either version 3, or (at your option) any
|
2000-09-19 01:25:31 +00:00
|
|
|
later version.
|
|
|
|
|
|
|
|
This file is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
permissions described in the GCC Runtime Library Exception, version
|
|
|
|
3.1, as published by the Free Software Foundation.
|
2000-09-19 01:25:31 +00:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
You should have received a copy of the GNU General Public License and
|
|
|
|
a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
2000-09-19 01:25:31 +00:00
|
|
|
|
|
|
|
/* This file just supplies labeled starting points for the .got* and other
|
|
|
|
special sections. It is linked in first before other modules. */
|
1996-01-05 16:33:59 +00:00
|
|
|
|
|
|
|
.ident "GNU C crti.s"
|
|
|
|
|
1996-04-24 16:54:48 +00:00
|
|
|
#include <ppc-asm.h>
|
|
|
|
|
linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise.
* config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise.
* config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise.
* config/darwin.h (NO_PROFILE_COUNTERS): Likewise.
* final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined.
(profile_function): Allow NO_PROFILE_COUNTERS to be non-constant.
* config/rs6000/rs6000.c (output_profile_hook): Likewise.
* configure.in (powerpc*-*, s390*-*): Set tls_as_opt.
Pass it to $gcc_cv_as.
* configure: Rebuilt.
* config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer.
(print_operand): Allow TARGET_AIX to be non-constant.
(rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore):
Define unconditionally.
(rs6000_elf_declare_function_name): New function.
* config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be
non-constant.
* config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define
to 1.
(DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define.
[IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__
is defined.
(TARGET_AIX): Define to 1 if TARGET_64BIT.
(PROCESSOR_DEFAULT): Remove.
(TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT,
INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
[RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define.
(ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both
-m32 and -m64.
(MULTILIB_DEFAULTS): Define.
(SUBSUBTARGET_EXTRA_SPECS): Define.
(ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define.
(TARGET_TOC): Define only if !RS6000_BI_ARCH.
(TARGET_NO_TOC): Remove.
[!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI,
TARGET_PROTOTYPE): Define to 0.
(NO_PROFILE_COUNTERS): Define to TARGET_64BIT.
(PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT.
(ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly
if !TARGET_64BIT.
(USER_LABEL_PREFIX): Remove.
(JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT.
(SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init
if TARGET_64BIT.
(TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64.
(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define.
(STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove.
(TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT.
(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on
TARGET_64BIT.
(RS6000_CALL_GLUE): Likewise.
(SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX,
RESTORE_FP_SUFFIX): Likewise.
(ASM_DECLARE_FUNCTION_NAME): Remove.
(ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE,
DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function
name if TARGET_64BIT.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and
!TARGET_64BIT.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs.
(ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account.
(DRAFT_V4_STRUCT_RET): Define.
(SIGNAL_FRAMESIZE): New enum value.
(MD_FALLBACK_FRAME_STATE_FOR): Define.
* config/rs6000/default64.h: New file.
* config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64
options.
(SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it
to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc
if !TARGET_64BIT.
[!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
(ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name
function.
(TARGET_OS_SYSV_CPP_BUILTINS): Define.
(TARGET_OS_CPP_BUILTINS): Use it.
(CPP_SYSV_SPEC): Remove.
(CPP_SPEC): Remove cpp_sysv.
(SUBTARGET_EXTRA_SPECS): Remove cpp_sysv.
Add SUBSUBTARGET_EXTRA_SPECS.
(SUBSUBTARGET_EXTRA_SPECS): Define.
* config/rs6000/biarch64.h: New file.
* config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name):
New prototype.
* config/rs6000/x-linux64: New file.
* config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float
multilibs.
* config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__.
* config/rs6000/eabi-cn.asm: Likewise.
* config/rs6000/tramp.asm: Likewise.
* config/rs6000/sol-ci.asm: Likewise.
* config/rs6000/sol-cn.asm: Likewise.
* config/rs6000/linux.h (TARGET_64BIT): Define to 0.
(TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS.
* config/rs6000/ppc-asm.h: Move __powerpc64__ section before
_CALL_AIXDESC section.
* config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler,
defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs
or default32.
Co-Authored-By: Alan Modra <amodra@bigpond.net.au>
From-SVN: r67442
2003-06-04 17:23:42 +02:00
|
|
|
#ifndef __powerpc64__
|
1996-04-24 16:54:48 +00:00
|
|
|
.section ".got","aw"
|
1996-01-05 16:33:59 +00:00
|
|
|
.globl __GOT_START__
|
|
|
|
.type __GOT_START__,@object
|
|
|
|
__GOT_START__:
|
|
|
|
|
1996-01-12 18:27:19 +00:00
|
|
|
.section ".got1","aw"
|
1996-01-05 16:33:59 +00:00
|
|
|
.globl __GOT1_START__
|
|
|
|
.type __GOT1_START__,@object
|
|
|
|
__GOT1_START__:
|
|
|
|
|
1996-01-12 18:27:19 +00:00
|
|
|
.section ".got2","aw"
|
1996-01-05 16:33:59 +00:00
|
|
|
.globl __GOT2_START__
|
|
|
|
.type __GOT2_START__,@object
|
|
|
|
__GOT2_START__:
|
|
|
|
|
1996-01-12 18:27:19 +00:00
|
|
|
.section ".fixup","aw"
|
1996-01-05 16:33:59 +00:00
|
|
|
.globl __FIXUP_START__
|
|
|
|
.type __FIXUP_START__,@object
|
|
|
|
__FIXUP_START__:
|
|
|
|
|
1996-01-12 18:27:19 +00:00
|
|
|
.section ".ctors","aw"
|
1996-01-05 16:33:59 +00:00
|
|
|
.globl __CTOR_LIST__
|
|
|
|
.type __CTOR_LIST__,@object
|
|
|
|
__CTOR_LIST__:
|
|
|
|
|
1996-01-12 18:27:19 +00:00
|
|
|
.section ".dtors","aw"
|
1996-01-10 16:45:21 +00:00
|
|
|
.globl __DTOR_LIST__
|
|
|
|
.type __DTOR_LIST__,@object
|
1996-01-05 16:33:59 +00:00
|
|
|
__DTOR_LIST__:
|
1996-01-12 18:27:19 +00:00
|
|
|
|
|
|
|
.section ".sdata","aw"
|
|
|
|
.globl __SDATA_START__
|
|
|
|
.type __SDATA_START__,@object
|
1996-01-19 16:53:29 +00:00
|
|
|
.weak _SDA_BASE_
|
|
|
|
.type _SDA_BASE_,@object
|
1996-01-12 18:27:19 +00:00
|
|
|
__SDATA_START__:
|
1996-01-19 16:53:29 +00:00
|
|
|
_SDA_BASE_:
|
1996-01-12 18:27:19 +00:00
|
|
|
|
1996-01-12 20:11:35 +00:00
|
|
|
.section ".sbss","aw",@nobits
|
1996-01-12 18:27:19 +00:00
|
|
|
.globl __SBSS_START__
|
|
|
|
.type __SBSS_START__,@object
|
|
|
|
__SBSS_START__:
|
|
|
|
|
1996-02-03 01:03:27 +00:00
|
|
|
.section ".sdata2","a"
|
1996-01-19 16:53:29 +00:00
|
|
|
.weak _SDA2_BASE_
|
1996-01-12 18:27:19 +00:00
|
|
|
.type _SDA2_BASE_,@object
|
|
|
|
.globl __SDATA2_START__
|
|
|
|
.type __SDATA2_START__,@object
|
|
|
|
__SDATA2_START__:
|
1996-01-19 16:53:29 +00:00
|
|
|
_SDA2_BASE_:
|
1996-01-12 18:27:19 +00:00
|
|
|
|
1996-02-03 05:57:49 +00:00
|
|
|
.section ".sbss2","a"
|
1996-01-12 18:27:19 +00:00
|
|
|
.globl __SBSS2_START__
|
|
|
|
.type __SBSS2_START__,@object
|
|
|
|
__SBSS2_START__:
|
1996-01-15 03:07:35 +00:00
|
|
|
|
|
|
|
.section ".gcc_except_table","aw"
|
|
|
|
.globl __EXCEPT_START__
|
|
|
|
.type __EXCEPT_START__,@object
|
|
|
|
__EXCEPT_START__:
|
1996-04-24 16:54:48 +00:00
|
|
|
|
2000-03-16 03:16:41 +00:00
|
|
|
.section ".eh_frame","aw"
|
|
|
|
.globl __EH_FRAME_BEGIN__
|
|
|
|
.type __EH_FRAME_BEGIN__,@object
|
|
|
|
__EH_FRAME_BEGIN__:
|
|
|
|
|
2000-09-19 01:25:31 +00:00
|
|
|
/* Head of __init function used for static constructors. */
|
1996-04-24 16:54:48 +00:00
|
|
|
.section ".init","ax"
|
|
|
|
.align 2
|
|
|
|
FUNC_START(__init)
|
2000-04-14 23:16:25 +00:00
|
|
|
stwu 1,-16(1)
|
1996-04-24 16:54:48 +00:00
|
|
|
mflr 0
|
2000-04-14 23:16:25 +00:00
|
|
|
stw 0,20(1)
|
1996-04-24 16:54:48 +00:00
|
|
|
|
2000-09-19 01:25:31 +00:00
|
|
|
/* Head of __fini function used for static destructors. */
|
1996-04-24 16:54:48 +00:00
|
|
|
.section ".fini","ax"
|
|
|
|
.align 2
|
|
|
|
FUNC_START(__fini)
|
2000-04-14 23:16:25 +00:00
|
|
|
stwu 1,-16(1)
|
1996-04-24 16:54:48 +00:00
|
|
|
mflr 0
|
2000-04-14 23:16:25 +00:00
|
|
|
stw 0,20(1)
|
linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise.
* config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise.
* config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise.
* config/darwin.h (NO_PROFILE_COUNTERS): Likewise.
* final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined.
(profile_function): Allow NO_PROFILE_COUNTERS to be non-constant.
* config/rs6000/rs6000.c (output_profile_hook): Likewise.
* configure.in (powerpc*-*, s390*-*): Set tls_as_opt.
Pass it to $gcc_cv_as.
* configure: Rebuilt.
* config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer.
(print_operand): Allow TARGET_AIX to be non-constant.
(rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore):
Define unconditionally.
(rs6000_elf_declare_function_name): New function.
* config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be
non-constant.
* config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define
to 1.
(DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define.
[IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__
is defined.
(TARGET_AIX): Define to 1 if TARGET_64BIT.
(PROCESSOR_DEFAULT): Remove.
(TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT,
INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
[RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define.
(ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both
-m32 and -m64.
(MULTILIB_DEFAULTS): Define.
(SUBSUBTARGET_EXTRA_SPECS): Define.
(ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define.
(TARGET_TOC): Define only if !RS6000_BI_ARCH.
(TARGET_NO_TOC): Remove.
[!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI,
TARGET_PROTOTYPE): Define to 0.
(NO_PROFILE_COUNTERS): Define to TARGET_64BIT.
(PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT.
(ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly
if !TARGET_64BIT.
(USER_LABEL_PREFIX): Remove.
(JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT.
(SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init
if TARGET_64BIT.
(TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64.
(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define.
(STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove.
(TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT.
(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on
TARGET_64BIT.
(RS6000_CALL_GLUE): Likewise.
(SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX,
RESTORE_FP_SUFFIX): Likewise.
(ASM_DECLARE_FUNCTION_NAME): Remove.
(ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE,
DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function
name if TARGET_64BIT.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and
!TARGET_64BIT.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs.
(ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account.
(DRAFT_V4_STRUCT_RET): Define.
(SIGNAL_FRAMESIZE): New enum value.
(MD_FALLBACK_FRAME_STATE_FOR): Define.
* config/rs6000/default64.h: New file.
* config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64
options.
(SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it
to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc
if !TARGET_64BIT.
[!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
(ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name
function.
(TARGET_OS_SYSV_CPP_BUILTINS): Define.
(TARGET_OS_CPP_BUILTINS): Use it.
(CPP_SYSV_SPEC): Remove.
(CPP_SPEC): Remove cpp_sysv.
(SUBTARGET_EXTRA_SPECS): Remove cpp_sysv.
Add SUBSUBTARGET_EXTRA_SPECS.
(SUBSUBTARGET_EXTRA_SPECS): Define.
* config/rs6000/biarch64.h: New file.
* config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name):
New prototype.
* config/rs6000/x-linux64: New file.
* config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float
multilibs.
* config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__.
* config/rs6000/eabi-cn.asm: Likewise.
* config/rs6000/tramp.asm: Likewise.
* config/rs6000/sol-ci.asm: Likewise.
* config/rs6000/sol-cn.asm: Likewise.
* config/rs6000/linux.h (TARGET_64BIT): Define to 0.
(TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS.
* config/rs6000/ppc-asm.h: Move __powerpc64__ section before
_CALL_AIXDESC section.
* config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler,
defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs
or default32.
Co-Authored-By: Alan Modra <amodra@bigpond.net.au>
From-SVN: r67442
2003-06-04 17:23:42 +02:00
|
|
|
#endif
|