summaryrefslogtreecommitdiff
path: root/kc/entry_x86_64.S
blob: abea8acb814399c754c7c511dde202b66d1d34f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.section .text.start
.extern kc_reloc
.extern kc_main
.extern _DYNAMIC
.extern kc_image_base

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