mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-24 09:46:44 +00:00
crt0 cleanup
- use the generic 'crt0.s' for Linux - move the read-only '__dso_handle' definition into the '.text' section - move the '__initial_sp' definition into the '.bss' section - remove the '_main_utcb' definition Part of #766.
This commit is contained in:
committed by
Norman Feske
parent
1b96e8a7e1
commit
c962240922
@ -3,4 +3,6 @@ SRC_CC += _main.cc
|
||||
|
||||
REP_INC_DIR += src/platform
|
||||
|
||||
LIBS += syscall
|
||||
|
||||
vpath _main.cc $(BASE_DIR)/src/platform
|
||||
|
@ -26,15 +26,8 @@ _start:
|
||||
.initial_sp: .word __initial_sp
|
||||
.stack_high: .word _stack_high
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
.data
|
||||
.globl __dso_handle
|
||||
__dso_handle:
|
||||
.long 0
|
||||
|
||||
.globl __initial_sp
|
||||
__initial_sp:
|
||||
.long 0
|
||||
__dso_handle: .long 0
|
||||
|
||||
/*--- .bss (non-initialized data) ------------------*/
|
||||
.section ".bss"
|
||||
@ -46,10 +39,6 @@ _stack_low:
|
||||
.globl _stack_high
|
||||
_stack_high:
|
||||
|
||||
/*
|
||||
* Symbol referenced by ldso's crt0.s, which is needed by base-hw only.
|
||||
* It is defined here merely to resolve the symbol for non-base-hw
|
||||
* platforms.
|
||||
*/
|
||||
.globl _main_utcb
|
||||
_main_utcb: .long 0
|
||||
/* initial value of the SP register */
|
||||
.globl __initial_sp
|
||||
__initial_sp: .space 4
|
||||
|
@ -33,16 +33,8 @@ _start:
|
||||
.ascii "_main() returned."
|
||||
2: jmp 1b
|
||||
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
.data
|
||||
.globl __dso_handle
|
||||
__dso_handle:
|
||||
.long 0
|
||||
|
||||
.globl __initial_sp
|
||||
__initial_sp:
|
||||
.long 0
|
||||
__dso_handle: .long 0
|
||||
|
||||
/*--- .eh_frame (exception frames) -----------------*/
|
||||
/*
|
||||
@ -59,3 +51,7 @@ _stack_low:
|
||||
.space 64*1024
|
||||
.global _stack_high
|
||||
_stack_high:
|
||||
|
||||
/* initial value of the ESP register */
|
||||
.globl __initial_sp
|
||||
__initial_sp: .space 4
|
||||
|
@ -36,17 +36,8 @@ _start:
|
||||
.ascii "_main() returned."
|
||||
2: jmp 1b
|
||||
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
.data
|
||||
.p2align 8
|
||||
.globl __dso_handle
|
||||
__dso_handle:
|
||||
.quad 0
|
||||
|
||||
.globl __initial_sp
|
||||
__initial_sp:
|
||||
.quad 0
|
||||
__dso_handle: .quad 0
|
||||
|
||||
/*--- .eh_frame (exception frames) -----------------*/
|
||||
/*
|
||||
@ -63,3 +54,7 @@ _stack_low:
|
||||
.space 64*1024
|
||||
.global _stack_high
|
||||
_stack_high:
|
||||
|
||||
/* initial value of the RSP register */
|
||||
.globl __initial_sp
|
||||
__initial_sp: .space 8
|
||||
|
Reference in New Issue
Block a user