[PATCH] ARC: support shared crt1

Vineet Gupta Vineet.Gupta1 at synopsys.com
Wed Jun 15 12:39:53 UTC 2016


Signed-off-by: Vineet Gupta <vgupta at synopsys.com>
---
 libc/sysdeps/linux/arc/crt1.S | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libc/sysdeps/linux/arc/crt1.S b/libc/sysdeps/linux/arc/crt1.S
index 95c41f888850..e38c8e81b2c0 100644
--- a/libc/sysdeps/linux/arc/crt1.S
+++ b/libc/sysdeps/linux/arc/crt1.S
@@ -41,11 +41,15 @@ __start:
 
 	mov_s	r5, r0		; rltd_fini
 	add_s	r2, sp, 4	; argv
-
+#ifdef L_Scrt1
+	add	r0, pcl, @main at pcl
+	add	r3, pcl, @_init at pcl
+	add	r4, pcl, @_fini at pcl
+#else
 	mov_s	r0, main
 	mov_s	r3, _init
 	mov	r4, _fini
-
+#endif
 	and	sp, sp, -8
 	mov	r6, sp
 
-- 
2.5.0



More information about the uClibc mailing list