From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81063 invoked by alias); 29 Aug 2016 14:56:55 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 81046 invoked by uid 89); 29 Aug 2016 14:56:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=holidays, lyon, Lyon, D*foss.arm.com X-HELO: mail-qt0-f181.google.com Received: from mail-qt0-f181.google.com (HELO mail-qt0-f181.google.com) (209.85.216.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Aug 2016 14:56:44 +0000 Received: by mail-qt0-f181.google.com with SMTP id u25so69422823qtb.1 for ; Mon, 29 Aug 2016 07:56:44 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hgZ+00Tm4ZhQICguLLF3/amIn4Z0kDKHdb3EtqK6hRM=; b=Gn6VFpvdSbgNuIUJBw88IZMxdOivpycNp6NsiUDH0kbLGenER97wa0eU8L8OmVdGU0 yrBBWbETzOFvYXM0IBBSluwtSm5lo3oOX74ds60/BWkzbJqsrBeuwfapP/RlMgBk0IRU aExxU1vXlX2FVVPhO2ZYHKcdA1bhw5fUTByvXzwAuF23yhwS8YYWmgDM/aNfMseD0/KH 6AmIwXKd+pebQKavCuk+IIZIjllP85jmHz+3O3zs64b3oWlRX/N7KCSgxDoKjPBjDFFz vKrTsrodOljkdtwYbw5RsWkwloHBBScWwugfoPObDJefVgoD9iSkkcG4hhnpMxJMqrd3 7iCQ== X-Gm-Message-State: AE9vXwOKcvPJ5gjmRVWuF53BqrHBTNSybNpM71LVmV47SjKeikAfEgyCYO6bBtEL030NNIMK5J3mwmpNl9TzOdK5 X-Received: by 10.200.46.216 with SMTP id i24mr19312383qta.79.1472482602798; Mon, 29 Aug 2016 07:56:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.21.9 with HTTP; Mon, 29 Aug 2016 07:56:41 -0700 (PDT) In-Reply-To: <210bfecf-d453-62f6-7657-ea22ed3bc006@foss.arm.com> References: <005601d13d58$522afb60$f680f220$@foss.arm.com> <1796369.8BmbsroDJA@e108577-lin> <577E5070.3020606@arm.com> <4163700.8nzTNaTl0I@e108577-lin> <378f9855-1f2f-abcc-6030-b077e9b1932e@foss.arm.com> <5b0cd645-7628-705f-3c86-7388513c0708@arm.com> <5f9e12c3-b5b5-1e7d-e319-018a270690e9@foss.arm.com> <0051e9d5-09e6-8bb1-fc15-40693a82fc6f@arm.com> <778fe071-0d3d-aa68-0923-aff851b7d656@foss.arm.com> <210bfecf-d453-62f6-7657-ea22ed3bc006@foss.arm.com> From: Christophe Lyon Date: Mon, 29 Aug 2016 14:56:00 -0000 Message-ID: Subject: Re: [RFC PATCH, binutils, ARM 11/11, ping] Add support for stable secure gateway veneers addresses To: Thomas Preudhomme Cc: binutils@sourceware.org Content-Type: multipart/mixed; boundary=001a1147da507b0f55053b37123d X-IsSubscribed: yes X-SW-Source: 2016-08/txt/msg00305.txt.bz2 --001a1147da507b0f55053b37123d Content-Type: text/plain; charset=UTF-8 Content-length: 1469 On 26 August 2016 at 16:18, Thomas Preudhomme wrote: > On 26/08/16 13:36, Thomas Preudhomme wrote: >> >> Hi Christophe, >> >> On 26/08/16 12:55, Christophe Lyon wrote: >>> >>> >>> I've noticed that the new tests fail on armeb. I didn't look at the >>> detailed logs yet, but I guess you can a look? >>> >>> ./ld/ld.sum:FAIL: Input secure gateway import library >>> ./ld/ld.sum:FAIL: Input secure gateway import library: no output import >>> library >>> ./ld/ld.sum:FAIL: Input secure gateway import library: earlier stub >>> section base >>> ./ld/ld.sum:FAIL: Input secure gateway import library: later stub section >>> base >>> ./ld/ld.sum:FAIL: Input secure gateway import library: veneer comeback >>> ./ld/ld.sum:FAIL: Input secure gateway import library: entry function >>> change >> >> >> I can reproduce indeed. I'll have a look, thanks for the notice. Note that >> Monday is a bank holidays here so might only answer after that if I'm too >> slow >> to find the root cause. > > > Doh, the code checks for a SG instruction by comparing the 4 bytes in the > code against its litteral value. The problem of course is that the read puts > the 4 bytes of the instruction in memory order but these will then be > interpreted according to the endianness. > > The fix should be easy. > Indeed, thanks to your analysis it was quick enough. Here is a patch, maybe there is a simpler way? Thanks, Christophe > Best regards, > > Thomas --001a1147da507b0f55053b37123d Content-Type: text/plain; charset=US-ASCII; name="binutils-SG-BE.log.txt" Content-Disposition: attachment; filename="binutils-SG-BE.log.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_isg63zk80 Content-length: 216 MjAxNi0wOC0yOSAgQ2hyaXN0b3BoZSBMeW9uICA8Y2hyaXRvcGhlLmx5b25A bGluYXJvLm9yZz4KCgliZmQvCgkqIGVsZjMyLWFybS5jIChjbXNlX2VudHJ5 X2ZjdF9wKTogUmVhZCBmaXJzdCBpbnN0cnVjdGlvbiBpbiBhbgoJZW5kaWFu bmVzcyBpbmRlcGVuZGVudCB3YXkuCg== --001a1147da507b0f55053b37123d Content-Type: text/plain; charset=US-ASCII; name="binutils-SG-BE.patch.txt" Content-Disposition: attachment; filename="binutils-SG-BE.patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_isg63zl91 Content-length: 1233 ZGlmZiAtLWdpdCBhL2JmZC9lbGYzMi1hcm0uYyBiL2JmZC9lbGYzMi1hcm0u YwppbmRleCA5ZmY0MThhLi41YzA0YjliIDEwMDY0NAotLS0gYS9iZmQvZWxm MzItYXJtLmMKKysrIGIvYmZkL2VsZjMyLWFybS5jCkBAIC01NzkxLDExICs1 NzkxLDE5IEBAIGNtc2VfZW50cnlfZmN0X3AgKHN0cnVjdCBlbGYzMl9hcm1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