summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/powerpc/crt0.S')
-rw-r--r--libc/sysdeps/linux/powerpc/crt0.S11
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/powerpc/crt0.S b/libc/sysdeps/linux/powerpc/crt0.S
index 47fe7e786..24110850d 100644
--- a/libc/sysdeps/linux/powerpc/crt0.S
+++ b/libc/sysdeps/linux/powerpc/crt0.S
@@ -68,14 +68,14 @@ _start:
add r5,r5,r4
/* Ok, now run uClibc's main() -- shouldn't return */
-#if defined L_crt0 || ! defined __UCLIBC_CTOR_DTOR__
- bl __uClibc_main
-#else
+#if (defined L_crt1 || defined L_gcrt1 ) && defined __UCLIBC_CTOR_DTOR__
lis r6,_init@ha # load top 16 bits
addi r6,r6,_init@l # load bottom 16 bits
lis r7,_fini@ha # load top 16 bits of &msg
addi r7,r7,_fini@l # load bottom 16 bits
bl __uClibc_start_main
+#else
+ bl __uClibc_main
#endif
.size _start,.-_start
@@ -83,3 +83,8 @@ _start:
.globl __data_start
__data_start:
+#if defined L_gcrt1 && defined __UCLIBC_PROFILING__
+# include "./gmon-start.S"
+#endif
+
+