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

.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