From patchwork Wed Jun 15 12:39:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 635857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rV5lS5yRRz9t1P for ; Wed, 15 Jun 2016 22:42:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5844B8A06B; Wed, 15 Jun 2016 12:42:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HjpssyWA15bq; Wed, 15 Jun 2016 12:42:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 58142876CB; Wed, 15 Jun 2016 12:42:54 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DF8BF1C150D for ; Wed, 15 Jun 2016 12:42:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DA43A331B4 for ; Wed, 15 Jun 2016 12:42:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fe+8ZkFU3jKz for ; Wed, 15 Jun 2016 12:42:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.60.111]) by silver.osuosl.org (Postfix) with ESMTPS id F3E5E31CFA for ; Wed, 15 Jun 2016 12:42:51 +0000 (UTC) Received: from dc8secmta2.synopsys.com (dc8secmta2.synopsys.com [10.13.218.202]) by smtprelay.synopsys.com (Postfix) with ESMTP id 41B0310C13A6; Wed, 15 Jun 2016 05:42:51 -0700 (PDT) Received: from dc8secmta2.internal.synopsys.com (dc8secmta2.internal.synopsys.com [127.0.0.1]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id 0F9E1A4112; Wed, 15 Jun 2016 05:42:51 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by dc8secmta2.internal.synopsys.com (Service) with ESMTP id E3981A4102; Wed, 15 Jun 2016 05:42:50 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id D239CD0E; Wed, 15 Jun 2016 05:42:50 -0700 (PDT) Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id C129ED0C; Wed, 15 Jun 2016 05:42:50 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 15 Jun 2016 05:42:50 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 15 Jun 2016 18:10:03 +0530 Received: from vineet-E7440.internal.synopsys.com (10.100.21.13) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 15 Jun 2016 18:10:02 +0530 From: Vineet Gupta To: , Subject: [PATCH] ARC: support shared crt1 Date: Wed, 15 Jun 2016 14:39:53 +0200 Message-ID: <1465994393-7925-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 X-Originating-IP: [10.100.21.13] Cc: Cupertino.Miranda@synopsys.com, Vineet Gupta X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Signed-off-by: Vineet Gupta --- 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@pcl + add r3, pcl, @_init@pcl + add r4, pcl, @_fini@pcl +#else mov_s r0, main mov_s r3, _init mov r4, _fini - +#endif and sp, sp, -8 mov r6, sp