From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20046 invoked by alias); 18 Nov 2014 12:35:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 20033 invoked by uid 89); 18 Nov 2014 12:35:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f176.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ah+tU+v1omxxESZn/dN9Wrsdci3GLI7JocM/CDH2DKE=; b=nL+g/63l57NLILh/k1FSdY4sICE89UShnTQvKAwh79eYNlo4wRCejS+ZRccBcPmuPE 42NSi8jGQkRvnW9jL4WO03ek6rdRNdFapS8hIsyRktz8ER9hIEXtheTQAXkabKVq1OS/ tFJV5Kksp5hJAw7HempzGgfXjXrWDlgo36UJn4hg0xf3qfDFHhXpXVPYs4aHguOdMxOc Dh10Gjv1M7htnf5jVwpWdupIKtSby6viamHSgA87ucBDmPV83vOHV924FeVUw140h+8J 4EmyIwal+ZgyoAWoWW9b1tbcDuTyoic4Y0Ob9QsmczQrMuW4WaTisywOKhG5jyNQcIqM ZH1A== X-Gm-Message-State: ALoCoQmvuv5AFK9YhM1D1MUTrSRJ02LGmxbOCmXUJuuekQnCeMGpxoSizBSgcCmZoXejl9QPfIUX MIME-Version: 1.0 X-Received: by 10.107.46.29 with SMTP id i29mr1951532ioo.73.1416314139103; Tue, 18 Nov 2014 04:35:39 -0800 (PST) In-Reply-To: <1414396793-9005-15-git-send-email-apinski@cavium.com> References: <1414396793-9005-1-git-send-email-apinski@cavium.com> <1414396793-9005-15-git-send-email-apinski@cavium.com> Date: Tue, 18 Nov 2014 12:35:00 -0000 Message-ID: Subject: Re: [PATCH 14/29] [AARCH64] Use PTR_* in start.S From: Will Newton To: Andrew Pinski Cc: libc-alpha Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-11/txt/msg00424.txt.bz2 On 27 October 2014 07:59, Andrew Pinski wrote: > 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(-) This looks ok to me. > 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, > -- > 1.7.2.5 > -- Will Newton Toolchain Working Group, Linaro