From patchwork Fri Nov 16 15:47:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 151349 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp585995ljp; Fri, 16 Nov 2018 07:49:03 -0800 (PST) X-Google-Smtp-Source: AJdET5dy3ADN1fCToTc/7g/AUbvJHjCfAezav5ylB5Il1yur+0FzBkLoIxn60XQrSFqlcyon0LYV X-Received: by 2002:a17:902:6185:: with SMTP id u5mr10286451plj.194.1542383342978; Fri, 16 Nov 2018 07:49:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542383342; cv=none; d=google.com; s=arc-20160816; b=ftEF4DLtaXqBXAh4kle+0uVOpmFiAc3feA438MWSp1qV27Z6ZQFNjH/VAyOD7ox3Ff 27JETtPvMtkX7ElIY960ikgFIJZ5TUnVZuLRtToyaAX4uGXj3uGB0q45l7E/ucGvQ9xf r8HA/ZSLOMLPgOLzjSWfYh4N32YImRaZq6sryysdUizrsj7XcoY6lNY1FTHKNtyqvEsY y2VUduaTnxO0VmEdTY+5BSaQkOIzgR0i9gpNAqbNtZurZWZbeKce8nB5ZIjuLirXWSEQ w42VmCNHMUuYi9KKVpq6kQafDlx7ScyLhX3t6bOvHt6N5zrOQ1iqUSwWiYpwNhgD+IQ5 rPCw== 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:cc:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature; bh=PmmXyhrdToUx2UTAWFTemlt8AvCLldEvQJdUxdcPmOI=; b=06e3Mcbdx132E0/7oGr0AOvcn4bJHm9sHyGraY1jCdOYBA13zmVElqEtlKL/V3ZEw/ I1xwZG/jCdNScLlG6+iTfetB+bNZacXtjfAIej4okySlZWG79gbyTQwzNrOEznletrAz 2b5Tz+iQ/xv3feIT3xXHf4mgwCfP9FtbDXITOSp4L050m9lfTRAvt998Y9I2iS0PQIsy 1E6FQAZVPj0dNo/ZIi2sPiF66qOzqwxOmbphZ8iWbxPk0g6LjiulQLfN2ZaAF1GvLsVd 928c4vVAqUKWSDO0+hMhT44/R7SstCSOei1uwSVzeolIFjs0YDxWpDv2Ar5yxteEZPz8 hEjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=eGmSw8Sy; spf=pass (google.com: domain of gcc-patches-return-490263-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-490263-patch=linaro.org@gcc.gnu.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s3-v6si3738943plp.139.2018.11.16.07.49.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 07:49:02 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-490263-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=eGmSw8Sy; spf=pass (google.com: domain of gcc-patches-return-490263-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-490263-patch=linaro.org@gcc.gnu.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=C+9iKrLhdrO8zDvC7c1tE+bNuz6rS/ofxhMaf6bzV8NkiDE8vpMVb FjqbRz4Slw7xhCo8FGrgROWyddHeiDQlEJzKM9vbOUugM3Tnr1bazr8Xq2tKlZgC bEOODPegYgxbIuXF5k85CMUJM8quYSkjWbdNnn1UiZfY/ROvcmYh7o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=Gi4KzAMZyByoEBRP38zOhGCRmWI=; b=eGmSw8SysaULNhN5yDlyEMNNOQbw 1dKaj1kO297Bb2H1eGpLgrtqp7X4itfkKxd54DR2rtH2DdngIRMmDcnHRoYaKwjL YeMkAp9MHvHWLluXycqlezI032/Oyso3PzJEDeYJiQXuvumdYQZ4PObBZox1FEgf +g+yiHu8jbXzs9U= Received: (qmail 61304 invoked by alias); 16 Nov 2018 15:48:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 60228 invoked by uid 89); 16 Nov 2018 15:48:50 -0000 Authentication-Results: sourceware.org; auth=none 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=Engineering, gun 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; Fri, 16 Nov 2018 15:48:48 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id wAGFilWZ002140; Fri, 16 Nov 2018 16:48:34 +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 2nsx068vvc-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 16 Nov 2018 16:48:33 +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 72D2938; Fri, 16 Nov 2018 15:48:33 +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 512D9500B; Fri, 16 Nov 2018 15:48:33 +0000 (GMT) Received: from gnb.st.com (10.75.127.45) by SFHDAG5NODE1.st.com (10.75.127.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 16 Nov 2018 16:48:32 +0100 From: Christophe Lyon To: CC: Subject: [ARM/FDPIC v4 01/20] [ARM] FDPIC: Add -mfdpic option support Date: Fri, 16 Nov 2018 16:47:29 +0100 Message-ID: <20181116154808.25154-2-christophe.lyon@st.com> In-Reply-To: <20181116154808.25154-1-christophe.lyon@st.com> References: <20181116154808.25154-1-christophe.lyon@st.com> MIME-Version: 1.0 X-IsSubscribed: yes 2018-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.opt: Add -mfdpic option. * doc/invoke.texi: Add documentation for -mfdpic. -- 2.6.3 diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index a1286a4..231c1cb 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -302,3 +302,7 @@ When linking for big-endian targets, generate a legacy BE32 format image. mbranch-cost= Target RejectNegative Joined UInteger Var(arm_branch_cost) Init(-1) Cost to assume for a branch insn. + +mfdpic +Target Report Mask(FDPIC) +Enable Function Descriptor PIC mode. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 535b258..6b08b09 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -691,7 +691,8 @@ Objective-C and Objective-C++ Dialects}. -mrestrict-it @gol -mverbose-cost-dump @gol -mpure-code @gol --mcmse} +-mcmse @gol +-mfdpic} @emph{AVR Options} @gccoptlist{-mmcu=@var{mcu} -mabsdata -maccumulate-args @gol @@ -17538,6 +17539,23 @@ MOVT instruction. Generate secure code as per the "ARMv8-M Security Extensions: Requirements on Development Tools Engineering Specification", which can be found on @url{http://infocenter.arm.com/help/topic/com.arm.doc.ecm0359818/ECM0359818_armv8m_security_extensions_reqs_on_dev_tools_1_0.pdf}. + +@item -mfdpic +@itemx -mno-fdpic +@opindex mfdpic +@opindex mno-fdpic +Select the FDPIC ABI, which uses function descriptors to represent +pointers to functions. When the compiler is configured for +@code{arm-*-uclinuxfdpiceabi} targets, this option is on by default +and implies @option{-fPIE} if none of the PIC/PIE-related options is +provided. On other targets, it only enables the FDPIC-specific code +generation features, and the user should explicitly provide the +PIC/PIE-related options as needed. + +The opposite @option{-mno-fdpic} option is useful (and required) to +build the Linux kernel using the same (@code{arm-*-uclinuxfdpiceabi}) +toolchain as the one used to build the userland programs. + @end table @node AVR Options