From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50900 invoked by alias); 29 Aug 2019 14:48:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 50883 invoked by uid 89); 29 Aug 2019 14:48:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL,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.1 spammy=Requirements, Feb, feb, UD:arm.com 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, 29 Aug 2019 14:48:00 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7TEkfQh031709; Thu, 29 Aug 2019 16:47:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : references : from : message-id : date : mime-version : in-reply-to : content-type; s=STMicroelectronics; bh=thPND9c1bIFXiRbcD4Zfl8r7rpy4wXZjR3ZBfkI97WY=; b=QAunL6TeYWPfR4w1BLoP46lOvbi1M498ypwUHWSGCcRD7756spHYj2MipnHdvahPaqcQ BtXqrUcilrJXz8KpsBtNA7IQJHiuaPyFKWLRsdNGHdAfrjo0miPUj4GHu3p18Ct79WJM r6Dr02H4etR9QrD5OXgg/egGV46N9ZXw4pI8yhs5qCJ3RKpo+t4uqc0qSZrHM55FxOli X58kRF8c/aEr5RjKr8oLdFmq6opGdIMPo3Mw/6cD2DuXCLW4wqsW6d6JS18Re82wCD+8 Kuruo3lGcf9mMeHadu6Mq+E/JRcI5BOdG72FIPlWtdjgDZhFEgz5kmNLurSXZh1Mmdcx Pw== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com with ESMTP id 2upe3f0whd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 29 Aug 2019 16:47:54 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 3DFC156; Thu, 29 Aug 2019 14:47:50 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node1.st.com [10.75.127.13]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id AD73B2CFDB8; Thu, 29 Aug 2019 16:47:50 +0200 (CEST) Received: from [10.129.178.138] (10.75.127.49) by SFHDAG5NODE1.st.com (10.75.127.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 29 Aug 2019 16:47:50 +0200 Subject: Re: [ARM/FDPIC v5 01/21] [ARM] FDPIC: Add -mfdpic option support To: , References: <20190515124006.25840-1-christophe.lyon@st.com> <20190515124006.25840-2-christophe.lyon@st.com> From: Christophe Lyon Message-ID: Date: Thu, 29 Aug 2019 15:08:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------B6EDB1F764E66B0D886B396F" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg01977.txt.bz2 --------------B6EDB1F764E66B0D886B396F Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-length: 2809 On 16/07/2019 12:11, Richard Sandiford wrote: > [This isn't really something that should be reviewed under global > reviewership, but if it's either that or nothing, I'll do it anyway...] > > Christophe Lyon writes: >> 2019-XX-XX Christophe Lyon >> Mickaël Guêné >> >> gcc/ >> * config/arm/arm.opt: Add -mfdpic option. >> * doc/invoke.texi: Add documentation for -mfdpic. >> >> Change-Id: I0eabd1d11c9406fd4a43c4333689ebebbfcc4fe8 >> >> diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt >> index 9067d49..2ed3bd5 100644 >> --- a/gcc/config/arm/arm.opt >> +++ b/gcc/config/arm/arm.opt >> @@ -306,3 +306,7 @@ Cost to assume for a branch insn. >> mgeneral-regs-only >> Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Save >> Generate code which uses the core registers only (r0-r14). >> + >> +mfdpic >> +Target Report Mask(FDPIC) >> +Enable Function Descriptor PIC mode. >> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >> index 29585cf..805d7cc 100644 >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -703,7 +703,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 >> @@ -17912,6 +17913,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 > > Maybe "64-bit function descriptors"? Just a suggestion, might not be useful. > > OK with that change, thanks. OK, here is a new version, where I added a few words to explain that -static is not supported. Thanks, Christophe > > Richard > >> +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 > . > --------------B6EDB1F764E66B0D886B396F Content-Type: text/x-patch; name="0001-ARM-FDPIC-Add-mfdpic-option-support.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-ARM-FDPIC-Add-mfdpic-option-support.patch" Content-length: 2668 >From c936684e2b77ff5716bd8b67c617dcad088c72e0 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Thu, 8 Feb 2018 10:44:32 +0100 Subject: [ARM/FDPIC v6 01/24] [ARM] FDPIC: Add -mfdpic option support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2019-XX-XX Christophe Lyon Mickaël Guêné gcc/ * config/arm/arm.opt: Add -mfdpic option. * doc/invoke.texi: Add documentation for -mfdpic. Change-Id: I05b98d6ae87c2b3fc04dd7fba415c730accdf33e diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index 9067d49..2ed3bd5 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -306,3 +306,7 @@ Cost to assume for a branch insn. mgeneral-regs-only Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Save Generate code which uses the core registers only (r0-r14). + +mfdpic +Target Report Mask(FDPIC) +Enable Function Descriptor PIC mode. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 29585cf..b77fa06 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -703,7 +703,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 @@ -17912,6 +17913,27 @@ 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 64-bit 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. + +Note that static linking is not supported because it would still +involve the dynamic linker when the program self-relocates. If such +behaviour is acceptable, use -static and -Wl,-dynamic-linker options. + +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 -- 2.6.3 --------------B6EDB1F764E66B0D886B396F--