about summary refs log tree commit diff
path: root/arch/x86_64/crt_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/crt_arch.h')
-rw-r--r--arch/x86_64/crt_arch.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/x86_64/crt_arch.h b/arch/x86_64/crt_arch.h
index db692950..3eec61bd 100644
--- a/arch/x86_64/crt_arch.h
+++ b/arch/x86_64/crt_arch.h
@@ -1,9 +1,12 @@
-__asm__("\
-.text \n\
-.global _start \n\
-_start: \n\
-	xor %rbp,%rbp \n\
-	mov %rsp,%rdi \n\
-	andq $-16,%rsp \n\
-	call __cstart \n\
-");
+__asm__(
+".text \n"
+".global " START " \n"
+START ": \n"
+"	xor %rbp,%rbp \n"
+"	mov %rsp,%rdi \n"
+".weak _DYNAMIC \n"
+".hidden _DYNAMIC \n"
+"	lea _DYNAMIC(%rip),%rsi \n"
+"	andq $-16,%rsp \n"
+"	call " START "_c \n"
+);