From patchwork Thu Mar 22 14:38:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 132302 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp932841ljb; Thu, 22 Mar 2018 07:42:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELsCF9kFJZ+DulKy+oF8i+9/zumaPC0UODXZk/VqYAY4RlWuQ/lcr+LcExEWyMYmmBMZF04x X-Received: by 2002:a17:902:4225:: with SMTP id g34-v6mr8707624pld.297.1521729740732; Thu, 22 Mar 2018 07:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521729740; cv=none; d=google.com; s=arc-20160816; b=wPKGTwRVJUje9xL/RD35eaLMD82KNd7A6nwQrZo+1hFPeP0H0RIIlCc2QGZvMCvxb1 mg1iSXuXHeiyVCa9KReQ8zRscQAV0ZeMjMzggrGe1pfDl6zQnS5xvICXCbaq8fUjLkJc +cn9mepNcGb6imSWUzn7mqfwINBS4I4KxHlu9hguqZ5WKU+hkJDAmuGHhN+HYq9xJ0Qr 6i+8lFNr9Pfq77HaHzAAC0oro2QFg1qyYkHi3y+6edxiOxEhc4nzK50kyLh5lldSMcP/ djFiKbsMq18EIrKS+9MXJ9UteEn4qncOjIZsapa7vFMGSh/xGIk2k6yFEe+odzIU2fqB paFw== 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=6zzkdNbFcRLJQxdVXPVsnMcAs9BT0X9bzlTmzNHHMLY=; b=eFfYCrdzjmqCihDKKbqYYB4ztaWRhm95/s77ZAAcQzZWKIPbnAmTQM6PhW9HaNlOmG NaFiOZBReAQk3VGUB69AWxW88Gjq5Hj5ftnlEWNagVrMc9hBk9/6+4APxNP0z3A3zTFQ UNy/qwCaIiGKZ73HivKLlIiMqJTTnDUiY1w/O7V93oFKuZ2AF6UIjtJ6eS5dM1BF71vY 1eibWEQEvsrvmJ0ojRAD4MSr4Ctw1ltL2jm/R3jRgiz3zBMQo80WEzfxrQO5yMF9QsC9 TeejBkhKt+4uJiDrMy266rCGjR3dw9alazADjYEGHHCOHqJDHlSbAIS8bNZMAL8lSI1j jQmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=DlNDsn23; spf=pass (google.com: domain of binutils-return-101088-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101088-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 bj11-v6si6921420plb.525.2018.03.22.07.42.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 07:42:20 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-101088-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=DlNDsn23; spf=pass (google.com: domain of binutils-return-101088-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=binutils-return-101088-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=OPkH7BG5C40q5mjRO03+3Cs0k9TLwm1NrVRGNyhTzrB zxTaxkzfTCNktLaVitf2BRzf7OcVMpbN81uFAvl2QG1x3D9NgnYmAuDGfkIlaGGx 1dWNxQ2/hOWxtaWo3Yjo2ZCCW5rx6s9jq/KHmZ+A6qh9dFDTLevOBKnnCi8Qn1pY = 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=ZrXGPmUusAaShMjK4VInaAT9j9Y=; b=DlNDsn2343V7vOKn6 +tDuJRbAmcGyi3vIQvb855AqZf7HfdpJL28XnAHkKtBz5aLRzWe7AO/XPKkyfYSj X+XMdQYbsplA2kaSuPnf2vTlRgBlu8OnBX3N2Un7eTqeIo93AEdur7NZK1aNKWuj DyUju//ewU/hd+RP9FlwnWOTS4= Received: (qmail 83769 invoked by alias); 22 Mar 2018 14:42:03 -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 83675 invoked by uid 89); 22 Mar 2018 14:42:02 -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=Hx-languages-length:1018, HContent-Transfer-Encoding:8bit X-HELO: mx07-00178001.pphosted.com Received: from mx07-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (62.209.51.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 14:42:01 +0000 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w2MEdAvB030982 for ; Thu, 22 Mar 2018 15:41:58 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2gvebr816s-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Mar 2018 15:41:58 +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 24A223F for ; Thu, 22 Mar 2018 14:41:57 +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 0831B2B14 for ; Thu, 22 Mar 2018 14:41:57 +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:56 +0100 From: Christophe Lyon To: Subject: [ARM-FDPIC 09/12] [ARM] FDPIC: Make _GLOBAL_OFFSET_TABLE_ a relative symbol Date: Thu, 22 Mar 2018 15:38:27 +0100 Message-ID: <20180322143850.1766-10-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 (elf32_arm_finish_dynamic_symbol): Handle _GLOBAL_OFFSET_TABLE_ in FDPIC mode. --- bfd/elf32-arm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.6.3 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 72d25c8..b1beb32 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -17089,10 +17089,10 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, } /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. On VxWorks, - the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it is relative - to the ".got" section. */ + and for FDPIC, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: + it is relative to the ".got" section. */ if (h == htab->root.hdynamic - || (!htab->vxworks_p && h == htab->root.hgot)) + || (!htab->fdpic_p && !htab->vxworks_p && h == htab->root.hgot)) sym->st_shndx = SHN_ABS; return TRUE;