From patchwork Mon Oct 27 07:59:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 39589 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B6D462118A for ; Mon, 27 Oct 2014 08:04:55 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id x13sf629283wgg.1 for ; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:cc:subject:date :message-id:in-reply-to:references:x-original-sender :x-original-authentication-results; bh=NdYIGfwKfDSDTFlAjqTtCNHgzinFLp6KdtzosIWwCWQ=; b=Lgw/3PnADGQhMS+7Bxe/9R24BNjXt1bfEnFv5ob6/RPcpdn5gkIy4eHcR+mKYL5ynV YnXlDLgdfQ+Jd2H0A+GhNDy4s+KwgSlIT52F3J57ZpPyynbaTwGKnIayqK7t/3J/6obz /m4vDHbCzJgfulF2MJefCTXXgul32t85Oo/A9B+TwViMJsvz9sjB/BY0w3yQDcYMJ8HX USD5eVIYxTKawuEORVig2lCwnoeB+siGMS4oPDB9D08eilnNj1LjUR0uSt4mUEJhEKLf JyHCnsqrA1FSSMymrMwhG0rS8fO4zylJWl0I4Iw+buYV2M5GIh9q19De4LqZUDXMMNHL gHGw== X-Gm-Message-State: ALoCoQln+jfsc4e1Nx0kod8lHR7DwjmtC1JKobNgdJT9a0sYCKupuVOBD110x0gkwoZaG+WNXV87 X-Received: by 10.180.83.134 with SMTP id q6mr3583367wiy.7.1414397094965; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.5 with SMTP id ca5ls60346lad.68.gmail; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) X-Received: by 10.112.125.33 with SMTP id mn1mr1147623lbb.99.1414397094731; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com. [2a00:1450:4010:c03::236]) by mx.google.com with ESMTPS id b2si18640182lbm.104.2014.10.27.01.04.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 01:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) client-ip=2a00:1450:4010:c03::236; Received: by mail-la0-f54.google.com with SMTP id gm9so5387626lab.13 for ; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) X-Received: by 10.112.12.35 with SMTP id v3mr21660176lbb.80.1414397094652; Mon, 27 Oct 2014 01:04:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp247741lbz; Mon, 27 Oct 2014 01:04:53 -0700 (PDT) X-Received: by 10.66.129.142 with SMTP id nw14mr2560404pab.119.1414397093080; Mon, 27 Oct 2014 01:04:53 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ox6si9961830pbc.15.2014.10.27.01.04.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Oct 2014 01:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-53821-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 30573 invoked by alias); 27 Oct 2014 08:03:15 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 30521 invoked by uid 89); 27 Oct 2014 08:03:15 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ie0-f182.google.com X-Received: by 10.107.27.2 with SMTP id b2mr392701iob.70.1414396991796; Mon, 27 Oct 2014 01:03:11 -0700 (PDT) From: Andrew Pinski To: libc-alpha@sourceware.org Cc: Andrew Pinski Subject: [PATCH 14/29] [AARCH64] Use PTR_* in start.S Date: Mon, 27 Oct 2014 00:59:38 -0700 Message-Id: <1414396793-9005-15-git-send-email-apinski@cavium.com> In-Reply-To: <1414396793-9005-1-git-send-email-apinski@cavium.com> References: <1414396793-9005-1-git-send-email-apinski@cavium.com> X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::236 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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. --- sysdeps/aarch64/start.S | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S index 35d603a..dfa0622 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. @@ -53,26 +55,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,