From patchwork Tue Jun 21 05:06:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70509 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1831003qgy; Mon, 20 Jun 2016 22:10:01 -0700 (PDT) X-Received: by 10.98.99.132 with SMTP id x126mr25862776pfb.48.1466485801119; Mon, 20 Jun 2016 22:10:01 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 6si2506377pfe.203.2016.06.20.22.10.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 22:10:01 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-70819-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-70819-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-70819-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=g91hA UlpmHAWWBT8M8mtGxehDJQJ9bwHsqAihhANoIQaeOXi2OR5X3yCXsn6vlPHZgxNp 2TRoK1/ku837kx4ynY6CPOOsmnsyZ5328L+I4KQkW7uNvGMXmfWjRKHfRXqgeL8C BoRdN90UANGGGhLZrK4H7GH2YNX+UFLfSFQ8N4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=eZLkNCfVbKJ Udp1O/2HgWbPZ8Ng=; b=E8QKn2gyvSOpwbYVadgShHhrmwFnBQMoQXI7mI7DdX1 QW8lujmmUSdxT35gcsIkCtNVB712vEyPharw83Kd+eCiixCOLKNK/Xo6vrSZyt+g 5I7OrkOGshu2BXRSF+meEkrIasfDXaLDB7yPbZ8wKhBJH0TF8lWmrC6ZNJ/6X1pQ = Received: (qmail 110597 invoked by alias); 21 Jun 2016 05:09:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 110572 invoked by uid 89); 21 Jun 2016 05:09:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Contains, arranges, Hx-languages-length:2080 X-HELO: na01-bl2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , CC: , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH 08/27] [AARCH64] Use PTR_* in start.S Date: Tue, 21 Jun 2016 08:06:52 +0300 Message-ID: <1466485631-3532-10-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: HE1PR03CA0006.eurprd03.prod.outlook.com (10.163.170.144) To SN1PR07MB2255.namprd07.prod.outlook.com (10.164.47.149) X-MS-Office365-Filtering-Correlation-Id: 068acc0b-2a6b-4aee-264a-08d399923273 X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 2:3fPaEhcl+cf1dicjl4TSZOlj5P9aSsPpFIre8xNtat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8ceb1zGeCt4ZHJUXby8mOnuFSwWtN5JDGVawloIlQwh2bPTSuD/8sePscy/A8sOph5sTKFeFN+MYOym2Qwb+IgaNDlAgQuRuCVluaYYBgOoVoRoB8BhyWDMgzezb3bkb+2YPKQcpvw6v/XWA9nGfPxCrz3S4ArG2fd2HmGVBgS933xv8kJc= X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 20:WtLxFi7inbi/7jErJJ9dYyyMfOOMPz3hSZLMdwfexER3EfXSrFiEvcSomz/3iuw2Ra1eOb/O4bt96yZuNUcjtvQb0J7rgqRMGKL6Mv9Tyrh3b4Vrsv63L3bfF+dxcPH/q1EROX7qpOTG/MKuwc6lPiAHlSARt4IQTk70baSl+G3TBj/p8XpAGQfRaS3k1Owev1uiG9tpSiF0Apl4i5cwi20sAVWPrngHHGTxJS0Fo3ycwmiod28/UmEs4+3INz+zmU2nLyZNMLzePVHAFXPt7md4fv13JvkzXnXB0TRA1c6MvmQU/Vf5AErKJvc/B/zL1dUTInOpLN1vYF9sDXPbosuwSUkWy/U6b+t7vUD/IYgVAdprRC/XuS9ps080yPCP18Zmm8GultruO464FZ5Z8cwgwO8FjPk+8DxjmndFTFwuCslPjH6tcH6Rwl6FIsuyhbBpITm+sV2Z5JypCeYIsGFf13aoqO0SdJHKSAxrepjzmTig630TQCeTNgfDWgt1/FAWGwHCNMR/9S7leC8UK/hmAMOlT9qXmfJQde3kN0v3ofC/NnW+mBtXiGunizDEc2q0LhMEBpbS68Em1FtOqosOjxoDDRHUPcsnNhVKlT0= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:SN1PR07MB2255; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2255; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 4:qzjqVtBSPuX8nxjim+8BZuQOltc77IZcF0j555fGBRo5fxmwwofmL/L0KSbfTy0FDRU/IQzMoBpGK3Khkka36/nQ+1xI715J/NbmJgxtgT+Jg/0J05E56w/N92YF9+E0aEW/Gxm3G3d+AlRNIePoConu+KTNdlf26gJq0oDwir3OVfl9T8nwyIHSdEbSqS5mwFgm4MWtWXgOZn4RzkGF3vJJgQI6tnSp/nRDIGkYnJAM7vpT22mW/NCpY1S1xUeSVI/kgtcJOT//Q9T2kFBTeQs5Ee9vhXbHSkQYiuaeYjuOvrdh8PKvLZ8D1ROhnvNss19XLTxkjAkuKKnuOcJsPTF0a3CA0npHZeogHuoZeyNxDxJkadvYoHVSCT2+XG7en2eDWrOVhjR4ozHPHdplvHJbKjiF2upR3FI40XiC0SrTATlVKYUQLNkPQZSM3Ve7 X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(48376002)(4001430100002)(68736007)(36756003)(5003940100001)(33646002)(81156014)(81166006)(8676002)(3846002)(6116002)(586003)(97736004)(42186005)(77096005)(189998001)(107886002)(5001770100001)(19580405001)(15975445007)(101416001)(76506005)(19580395003)(47776003)(105586002)(50986999)(106356001)(2950100001)(7736002)(7846002)(66066001)(229853001)(50466002)(50226002)(92566002)(76176999)(4326007)(2906002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2255; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB2255; 23:bASLMY0pNfbj73RII9wnCO8B6JzCMeemTgEZLZoHL?= =?us-ascii?Q?HPtHGka4Gd8dP59qxkNOfG7f+D/j5m7+cfpu0K1VbR4ibvyrn9bd16Bfl01Z?= =?us-ascii?Q?0LcWy58jmcMqyrX309Vsiewckm5xLVx+/7EV3sTQilzddjykk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pamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 05:09:17.5270 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2255 From: Andrew Pinski To support ILP32 without much sources changes, this changes sysdeps/aarch64/start.S to use the PTR_* macros which was defined earlier. * sysdeps/aarch64/start.S: Include sysdep.h (_start): Use PTR_REG, PTR_SIZE macros. Signed-off-by: Yury Norov --- sysdeps/aarch64/start.S | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S index efe2474..9198c57 100644 --- a/sysdeps/aarch64/start.S +++ b/sysdeps/aarch64/start.S @@ -16,6 +16,8 @@ License along with the GNU C Library. If not, see . */ +#include + /* This is the canonical entry point, usually the first thing in the text segment. @@ -25,7 +27,7 @@ At this entry point, most registers' values are unspecified, except: - x0 Contains a function pointer to be registered with `atexit'. + x0/w0 Contains a function pointer to be registered with `atexit'. This is how the dynamic linker arranges to have DT_FINI functions called for shared libraries that have been loaded before this code runs. @@ -52,26 +54,26 @@ _start: mov x5, x0 /* Load argc and a pointer to argv */ - ldr x1, [sp, #0] - add x2, sp, #8 + ldr PTR_REG (1), [sp, #0] + add x2, sp, #PTR_SIZE /* Setup stack limit in argument register */ mov x6, sp #ifdef SHARED adrp x0, :got:main - ldr x0, [x0, #:got_lo12:main] + ldr PTR_REG (0), [x0, #:got_lo12:main] adrp x3, :got:__libc_csu_init - ldr x3, [x3, #:got_lo12:__libc_csu_init] + ldr PTR_REG (3), [x3, #:got_lo12:__libc_csu_init] adrp x4, :got:__libc_csu_fini - ldr x4, [x4, #:got_lo12:__libc_csu_fini] + ldr PTR_REG (4), [x4, #:got_lo12:__libc_csu_fini] #else /* Set up the other arguments in registers */ - ldr x0, =main - ldr x3, =__libc_csu_init - ldr x4, =__libc_csu_fini + ldr PTR_REG (0), =main + ldr PTR_REG (3), =__libc_csu_init + ldr PTR_REG (4), =__libc_csu_fini #endif /* __libc_start_main (main, argc, argv, init, fini, rtld_fini,