From patchwork Thu Mar 22 14:38:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 132301 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp932524ljb; Thu, 22 Mar 2018 07:42:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELudtyDcYmkn6cLRll85FfHsRTKtCqEbKzv/HgSGg7QI5Bqk5oO/N5rYSdeqnmxDSDcSczfY X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr7997394plb.338.1521729722962; Thu, 22 Mar 2018 07:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521729722; cv=none; d=google.com; s=arc-20160816; b=fvzamKcuAs6atRBazoZxkcH+XIgl2kMyCnUy25uB9s4+qB75QpYpA1KCLFNasdVdc/ aPLJKA8ln96b9dbyUgoCUe9+0UAx6qH7WdrCQYpnMRteJCeVoS5IU/Due7txj6mAdcKf lcgRM4LX9rWvMknC9RGiBa3LhMVGpET4Sxar7Zl56P5/bIfso4VHHlETDvQrvS7mhBCQ qCyi7aTVvKgNDJId+8qgoJaV6LX7G2wv5Q7CdzmuU+7ijmM/KUMxybWlES06fEBOcuOK AueyABwUU4sq4pEeZ3/dkfXjFFsG7tkz6K8XQZTMkrhZCFNi+4UQ3t7b0h6TWIsyjc8r YoAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=rZQVF5vNKcrCN2RJvRzDFDvrF1BI0Fd517nnsUrU9M8=; b=pW6Go5hQPF+jDVy8NuiOv/PT2HIN2YVnDoRGuDmy+e2r5xsr4TN004hd+2ESu+jjQv iqoo5zTYEqbeEGnvNsTRV8M2hCbtdJ4o5iKs+gy2lLtNaxPzqW9ZQY5Wj4arQS9/ig+C fEMqzQ92sGiys3ANxwq/LQU4e1WtlAnp3YUJC5+6iyoRLOWR1xQuaF+8I0tNS9aPL9Sv 7OyAc8T6I2Ln+bMpgny3ZHudOClFhncuuvqnVxixw35xawAJGsKrKxkedFcC0azLUU1l Iqn7OEQRBNIAfGsj8fzQRxHiNwGX+twiUEH4uS3Kesr045L90aRwgKhN68L4CXNQTXrd 4M+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=oXPOj61Q; spf=pass (google.com: domain of binutils-return-101087-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101087-patch=linaro.org@sourceware.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id z12si4473350pgc.195.2018.03.22.07.42.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 07:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-101087-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 header.s=default header.b=oXPOj61Q; spf=pass (google.com: domain of binutils-return-101087-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101087-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:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=s1TzpaRj+jZZzXFZsaI9uW/BaT1cDbaN6+ET+0b/Pj8 i1ASNmAoBE4UfjbW+xw/h7+973wqfYQgLxbz98GVt3fQ/JaplA4z8p9Q+CGoGsCg xkaDUqd9S2yVYpBGniupilkVj2D8YsjDudPZi6Mk/Onje8+0oPlQk3paTG5CsWzg = 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:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=EmkJMocE/nrwQZDTQdzpGEtkiCw=; b=oXPOj61QD6z9Hi9Va AybEgXReo4DB3s8+7x5CaZhKyyirgTXboHI8/UaWOI7TPVT/Tm9fX/NG7hMcQrAA ydNewY9CTthEnXYJDF2HuR+khoHDDN6T8/URrCpBdGMX+KDk5aJ63Dp7Xysdt5WR Pl/pyI7Qkb1l7QeyNv+qUWYaLI= Received: (qmail 81949 invoked by alias); 22 Mar 2018 14:41:47 -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 81913 invoked by uid 89); 22 Mar 2018 14:41:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx07-00178001.pphosted.com Received: from mx08-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (91.207.212.93) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 14:41:39 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w2MEdZim031107 for ; Thu, 22 Mar 2018 15:41:37 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2gv69ptk7y-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Mar 2018 15:41:37 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 010AF34 for ; Thu, 22 Mar 2018 14:41:36 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node1.st.com [10.75.127.13]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C398D2B12 for ; Thu, 22 Mar 2018 14:41:36 +0000 (GMT) Received: from gnx2104.gnb.st.com (10.75.127.51) by SFHDAG5NODE1.st.com (10.75.127.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 22 Mar 2018 15:41:36 +0100 From: Christophe Lyon To: Subject: [ARM-FDPIC 08/12] [ARM] FDPIC: Translate R_ARM_TARGET2 relocation into R_ARM_GOT32 relocation for FDPIC platform Date: Thu, 22 Mar 2018 15:38:26 +0100 Message-ID: <20180322143850.1766-9-christophe.lyon@st.com> In-Reply-To: <20180322143850.1766-1-christophe.lyon@st.com> References: <20180322143850.1766-1-christophe.lyon@st.com> MIME-Version: 1.0 X-ClientProxiedBy: SFHDAG4NODE1.st.com (10.75.127.10) To SFHDAG5NODE1.st.com (10.75.127.13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-22_07:, , signatures=0 X-IsSubscribed: yes 2018-XX-XX Christophe Lyon Mickaël Guêné bfd/ * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case for R_ARM_TARGET2. --- bfd/elf32-arm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.6.3 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 6ba4ee4..72d25c8 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -8957,7 +8957,9 @@ bfd_elf32_arm_set_target_params (struct bfd *output_bfd, return; globals->target1_is_rel = params->target1_is_rel; - if (strcmp (params->target2_type, "rel") == 0) + if (globals->fdpic_p) + globals->target2_reloc = R_ARM_GOT32; + else if (strcmp (params->target2_type, "rel") == 0) globals->target2_reloc = R_ARM_REL32; else if (strcmp (params->target2_type, "abs") == 0) globals->target2_reloc = R_ARM_ABS32;