OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [config/] [mips/] [irix-crti.asm] - Diff between revs 282 and 338

Only display areas with differences | Details | Blame | View Log

Rev 282 Rev 338
/* Copyright (C) 2004, 2008 Free Software Foundation, Inc.
/* Copyright (C) 2004, 2008 Free Software Foundation, Inc.
This file is part of GCC.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Software Foundation; either version 3, or (at your option) any later
version.
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
for more details.
Under Section 7 of GPL version 3, you are granted additional
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
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;
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
.  */
.  */
        .abicalls
        .abicalls
        .set    noreorder
        .set    noreorder
        .set    nomacro
        .set    nomacro
/* The GNU and SGI linkers differ in their implementation of -init and -fini.
/* The GNU and SGI linkers differ in their implementation of -init and -fini.
   With the GNU linker, there can only be a single -init option, and the
   With the GNU linker, there can only be a single -init option, and the
   linker simply sets DT_INIT to that value.  gcc's initialization and
   linker simply sets DT_INIT to that value.  gcc's initialization and
   finalization code can go directly in .init, with the prologue and
   finalization code can go directly in .init, with the prologue and
   epilogue of the main initialization routine being provided by external
   epilogue of the main initialization routine being provided by external
   object files (*crti.o and *crtn.o in this case).
   object files (*crti.o and *crtn.o in this case).
   The SGI linker instead accepts several -init options.  It will set DT_INIT
   The SGI linker instead accepts several -init options.  It will set DT_INIT
   to a linker-created function (placed in .init) that calls each of the -init
   to a linker-created function (placed in .init) that calls each of the -init
   functions in turn.  If there is any user code in .init, this linker-created
   functions in turn.  If there is any user code in .init, this linker-created
   function will be placed after it.  Note that such user code is not treated
   function will be placed after it.  Note that such user code is not treated
   specially; it will only be called if the -init options arrange for it to
   specially; it will only be called if the -init options arrange for it to
   be called.
   be called.
   In theory, the SGI model should allow the crti, crtn and intermediate code
   In theory, the SGI model should allow the crti, crtn and intermediate code
   to go in .init, just like it can with the GNU linker.  However, doing this
   to go in .init, just like it can with the GNU linker.  However, doing this
   seems to confuse the linker and triggers an internal error:
   seems to confuse the linker and triggers an internal error:
      ld32: FATAL   2  : Internal: at ../../ld/mips_code.c mips_code_fixup()
      ld32: FATAL   2  : Internal: at ../../ld/mips_code.c mips_code_fixup()
         text section overflow!
         text section overflow!
   (seen with MIPSpro 7.30).  We therefore put everything in a special
   (seen with MIPSpro 7.30).  We therefore put everything in a special
   .gcc_init section instead.  */
   .gcc_init section instead.  */
        .section .gcc_init,"ax",@progbits
        .section .gcc_init,"ax",@progbits
        .globl  __gcc_init
        .globl  __gcc_init
__gcc_init:
__gcc_init:
#if _MIPS_SIM == _ABIO32
#if _MIPS_SIM == _ABIO32
        addiu   $sp,$sp,-16
        addiu   $sp,$sp,-16
        sw      $31,0($sp)
        sw      $31,0($sp)
#else
#else
        daddiu  $sp,$sp,-16
        daddiu  $sp,$sp,-16
        sd      $31,0($sp)
        sd      $31,0($sp)
        sd      $28,8($sp)
        sd      $28,8($sp)
#endif
#endif
        .section .gcc_fini,"ax",@progbits
        .section .gcc_fini,"ax",@progbits
        .globl  __gcc_fini
        .globl  __gcc_fini
__gcc_fini:
__gcc_fini:
#if _MIPS_SIM == _ABIO32
#if _MIPS_SIM == _ABIO32
        addiu   $sp,$sp,-16
        addiu   $sp,$sp,-16
        sw      $31,0($sp)
        sw      $31,0($sp)
#else
#else
        daddiu  $sp,$sp,-16
        daddiu  $sp,$sp,-16
        sd      $31,0($sp)
        sd      $31,0($sp)
        sd      $28,8($sp)
        sd      $28,8($sp)
#endif
#endif
/* This object will typically be included in the final link for both
/* This object will typically be included in the final link for both
   shared libraries and executable, and we need to hide the symbols to
   shared libraries and executable, and we need to hide the symbols to
   prevent possible symbol preemption warnings from the SGI linker.  */
   prevent possible symbol preemption warnings from the SGI linker.  */
.hidden __gcc_init
.hidden __gcc_init
.hidden __gcc_fini
.hidden __gcc_fini
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.