summaryrefslogtreecommitdiff
path: root/kc/entry_x86_64.S
blob: 8431044822b8b7ffbff76ddd301422f12962c129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <kc.h>

.section .text.start

.hidden kc_entry
.global kc_entry
.type kc_entry, @function
kc_entry:
    push %rdi
    push %rsi
    lea kc_image_base(%rip), %rdi
    lea _DYNAMIC(%rip), %rsi
    call kc_dynamic_init
    pop %rsi
    pop %rdi
    call kc_main
    ret
.size kc_entry, . - kc_entry

.section .text

.hidden kc_resolve_symbol
.global kc_resolve_symbol
.type kc_resolve_symbol, @function
kc_resolve_symbol:
    cli
    hlt
    jmp kc_resolve_symbol
.size kc_resolve_symbol, . - kc_resolve_symbol