From patchwork Mon Dec 5 17:53:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiong Wang X-Patchwork-Id: 86601 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1611271qgi; Mon, 5 Dec 2016 09:54:22 -0800 (PST) X-Received: by 10.99.127.16 with SMTP id a16mr76180663pgd.60.1480960462696; Mon, 05 Dec 2016 09:54:22 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m63si15474404pld.15.2016.12.05.09.54.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Dec 2016 09:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-return-94728-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 binutils-return-94728-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-94728-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:subject:references:to:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=b00i rT/M2XPhtcbV5J/EyWwdBJ1XYUN2HVYYFVyZ+cqQiL6izbQs/YhI2hwXaAoaOW5Y QmSi/No37EDjPxKEa1yOIqq2zugg2nJYSIbAgtl9Bf1ct03cvJyA6FByiFhvMREs f0TzHkmbOBaLJso+GzcifUhHBAA3SF53iys2wMA= 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:subject:references:to:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=cRxZt31kw5 tHqswoB/W0mlryLzg=; b=oThpIDgjNTk+E1GHfQ4Nls6GkOa9AslmHOQTminFRK 4UApv+pbkii2iAHOY96MzUn+pqRmYLYY6wgUBNnnWdeaI9HOJiP2zx5q8Qa7qFpT WgmHYOVhdBqrwOgZuGxF2VtOTWJpLXoSlQtp6MSBvZLCbLsXsL35ssS4j4B4GTgv E= Received: (qmail 120073 invoked by alias); 5 Dec 2016 17:53:35 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 119390 invoked by uid 89); 5 Dec 2016 17:53:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Dec 2016 17:53:31 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C8B0D1597; Mon, 5 Dec 2016 09:53:29 -0800 (PST) Received: from [10.2.206.198] (e104437-lin.cambridge.arm.com [10.2.206.198]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B1943F4F6 for ; Mon, 5 Dec 2016 09:53:29 -0800 (PST) From: Jiong Wang Subject: [AArch64][3/4] Recognize R_AARCH64_P32_ABS32 as 32-bit relocation in readelf References: <2217462f-42bd-83e0-6141-acd62e8becb8@foss.arm.com> <4a2dc012-d289-319a-3557-14266fe3510b@foss.arm.com> To: Binutils Message-ID: <0fc18683-9463-bf03-1ca6-cf0492eb78b5@foss.arm.com> Date: Mon, 5 Dec 2016 17:53:28 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <4a2dc012-d289-319a-3557-14266fe3510b@foss.arm.com> X-IsSubscribed: yes R_AARCH64_P32_ABS32 should be recognized in is_32bit_abs_reloc. After this patch, those "unable to apply unsupported reloc type 1" failures in gas regression under ILP32 mode gone away. OK for master? binutils/ 2016-12-05 Jiong Wang * readelf.c (is_32bit_abs_reloc): Recognize R_AARCH64_P32_ABS32. diff --git a/binutils/readelf.c b/binutils/readelf.c index c5a628f..93a57e1 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -11731,7 +11731,8 @@ is_32bit_abs_reloc (unsigned int reloc_type) case EM_960: return reloc_type == 2; /* R_960_32. */ case EM_AARCH64: - return reloc_type == 258; /* R_AARCH64_ABS32 */ + return (reloc_type == 258 + || reloc_type == 1); /* R_AARCH64_ABS32 || R_AARCH64_P32_ABS32 */ case EM_ADAPTEVA_EPIPHANY: return reloc_type == 3; case EM_ALPHA: