From patchwork Tue Jun 28 16:39:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 71131 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1693335qgy; Tue, 28 Jun 2016 09:42:13 -0700 (PDT) X-Received: by 10.98.107.129 with SMTP id g123mr3438054pfc.62.1467132133016; Tue, 28 Jun 2016 09:42:13 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d81si9004898pfb.192.2016.06.28.09.42.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 09:42:13 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-71217-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-71217-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-71217-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=oqENW 92qRWy1w82B372k03FI5tdUeytpxaB5gy/3xjuQMIqZngligDVm3NIaoiHG7Nej8 I85ytSK7B0aOGfoif4tBavAoIhrMZRg1TJ2xVzkeX/nlJR8t2Ldrgc/xGNOtiOdy oVE+XfYJ33aPciid5QRmYAAwB6XHD4KPSqT8J0= 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=XPRpjQEgejofBfJsZIPd6+anOMUyV8LohtyA7CNO9WW nzCUEsaPtNhg/a4SBrn5/iKaPun+11MUy6lFda19rixaC0L5WzIONOQ36AMy/teD O+3QgshPiTYTwx/vX/OMMahBlxyRYGmxX5oI2tDLN1qHkFdr1EsnrQY5Fji653kc = Received: (qmail 17345 invoked by alias); 28 Jun 2016 16:41:32 -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 17232 invoked by uid 89); 28 Jun 2016 16:41:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=atexit 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/23] [AARCH64] Use PTR_* in start.S Date: Tue, 28 Jun 2016 19:39:23 +0300 Message-ID: <1467131978-669-9-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1467131978-669-1-git-send-email-ynorov@caviumnetworks.com> References: <1467131978-669-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: AM5PR0901CA0039.eurprd09.prod.outlook.com (10.164.186.177) To SN1PR07MB2255.namprd07.prod.outlook.com (10.164.47.149) X-MS-Office365-Filtering-Correlation-Id: 86615fac-a190-4f2e-f480-08d39f730534 X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 2:PDNzaGzh/boQbY6hE/EbpDRZreMinK4IlK9G3HEx/c9Up9uoW4GNpvZ6aoqgpP6P/FExX2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qx9Un22IAoGVT6bJdtZ/IySNcG6ICOsoOI14wQIM3e3K86mB4iyzoKtvcJfGWWLAzkZkhTk0ltIdUN4VX6Khxy1NCbgUnhgP4Bp3z747IPtIJV3aN0rDrZObkpKFK6IawSaJwxAH62QVdDk= X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 31:R6jyQz4XQxHTh4F3lQFydGAxXPEkbrhaj4frLCYQth+CwD3EtVa8+zh9h1VdeaxDj41QL96Jm/VXjRyfEfRyzOisXWPR6EzoCthW/kc/SM2aty8KvxU/KqFlqYKCCMYWU/4taU6QjJRgBkPFUYuU2qVw0vxKOMkWaWxc4+j3pnAOFkfYbLl5y3UYv4OpjA3e8hdD7lsA/Ejd7a4ay36umA==; 20:Hqj8P8VJjchQmKXSNMW4z/+bEpmftHG0SUSEwM8hqdgK81N2AFWKqChlbI++xFlttCIBpH9fZJZG3hWWsqZwBgRTyNaRqHn55lTip1zB1X7ZZYsiHfQJxxdJOAlGwk40qehLmzHtzKTtktFm5SrCkO2bH2LC0mjB9GCTCxIGtnq+28JbNy5D1as/1WT49erAHHLeAVLTcW9p65MVWwfH+tieUYtcFRG6kf+kcY4DjpfTER+TUKehVMtleG31XmdAdS4eWojH89hUul/7ovE1CpX/bDQ1p3+hlOlpnQbVBXZjfzHRIIZy5Fck4SS5k273b4t6JudWbXreId4wH3Vf4sH7rCLJIEBBeqd3bXHGXKhIHq1s1hWVlhSLoc3tIoseX6dMXNSd7rTCgondTvCOumvjKmx3Y9MVt0qmVOg75u1o5EHlnjOwCZk5ihlFSdSkxYqNvoQ8/P7aeDYh+D/RtluwQPsIIPSBPpEpjbHoHIecJ7dc8FzSHodImaIINy2TUeUTC8vOmMDhZ5CObx40xwXciciHkU6+TXh1Uj9lYT4O95uSh8QFieb3XIQGWa4EDb6MppiQ9Gki+l+UftH5YI8jkPox8tNkPCm/OOn8PVg= 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)(8121501046)(5005006)(3002001)(10201501046); SRVR:SN1PR07MB2255; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2255; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2255; 4:+HZ8nzflQ7U3fDGHnuDSSK8IrsNdOxE8IqmFnYGK3rZQpEjkrcjH8oujJWSf9HHm9xcO67proTwmdluqsGmI8VXqUmxZofgb6NjyEKVU83eabSOu4gvM+CYoB/SgprCENqkGNQtmhjGg6kQLk5aqqo2zg4Ya2MX+M+91HVZpo/bp4RU/wrS/HZRI3vmqAEwS76qySlRdhuKqkzKX0dSl9nbiTEBQ3U6IXJdcUvBPTMB7htRHjPHijxlI9eKvo72PLPak+zDGl5B44oyZYYh1yReL5TphO3iBFwAbyzz6rvI0A6t9Fe7PYm7weXiVAA3mYYNSPsZQTgDrfq45AsPv7SyNVTT85TVJb7nkaE2Xjy+Wh/uUtd4ypEusRowOsmxRVThkx7OqPlC+OQL/nf1xFtk2pZuV6W+OIY87mlVbK4VeGi+8eUpAiiBfoqMjVAtK X-Forefront-PRVS: 0987ACA2E2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(305945005)(4001430100002)(586003)(6116002)(3846002)(7736002)(77096005)(68736007)(50226002)(7846002)(36756003)(15975445007)(2906002)(33646002)(5003940100001)(2950100001)(4326007)(76506005)(97736004)(42186005)(5001770100001)(81156014)(107886002)(189998001)(19580405001)(101416001)(229853001)(106356001)(76176999)(66066001)(8676002)(50986999)(50466002)(48376002)(19580395003)(47776003)(105586002)(92566002)(81166006)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2255; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?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GaV5qljg8oatWPPMV8UYE76TkT652Es9oWh6XetWhILr9tD2Hp4sWjW1ZejvuWPse8n8gmb85sROFlJrsRx65tW5AOaQ0H1GTw/jaHLFltUpanXNy7msGLaEfq2ffCleRCF5f71E7Dh3X4HM/Jha060xGx+tqZpkOUWFEAoDaRGoFsSnxwZ1tWOTKtfWPQSIjKDjNu6CqsW6UZ5zVdE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2016 16:41:14.2930 (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,