crt0.s

来自「基于vxworks操作系统的电话语音平台系统」· S 代码 · 共 43 行

S
43
字号
# Start-up function for an embedded environment.  Initialization is done by the
# Nucleus function INT_Initialize.  This file holds other functions that Diab
# may use.

	.file		"crt0.c"
	.text

#------------------------------------------------------------- .init section --
        .section        .init$00,2,C
        .globl          __init
        .align          2
__init:                                 # Entry to __init, called by
        mfspr           r0,8            # __init_main called above.
        stwu            r1,-64(r1)
        stw             r0,68(r1)

        # Linker places .init sections from other modules, containing       
        # calls to initialize global objects, here.                         

        .section        .init$99,2,C
        lwz             r0,68(r1)       # Return from __init.
        addi            r1,r1,64
        mtspr           8,r0
        blr

#------------------------------------------------------------- .fini section --
        .section        .fini$00,2,C
        .globl          __fini
        .align          2
__fini:                                 # Entry to __fini, called by exit().
        mfspr           r0,8
        stwu            r1,-64(r1)
        stw             r0,68(r1)

        # Linker places .fini sections from other modules, containing       
        # calls to destroy global objects, here.                            

        .section        .fini$99,2,C
        lwz             r0,68(r1)       # Return from __fini.
        addi            r1,r1,64
        mtspr           8,r0
        blr

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?