From patchwork Mon Sep 9 15:44:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 1159802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508643-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=st.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Z6Thu0z1"; dkim=pass (2048-bit key; unprotected) header.d=st.com header.i=@st.com header.b="0xnQ0F8d"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46Rsvp4Yhlz9s00 for ; Tue, 10 Sep 2019 01:46:14 +1000 (AEST) 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:subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=Tvq 2PfeIGWp5ZzjC9l0VTGjT2FUgiNx48aNVGNUYk5KHytj/3b2uR/k92x27VhNp+cF IBNeE1vBxO/ImJw8T0nBJghyG2e4BPn4nSyV+XpV7rbS/FlkiNThdr0GzjzC/DCR D5ThFltY2RLRGYizre35daX98oFx3h+krCmnmyCo= 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:subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=default; bh=ykygVRnY0 IhUy37+HNqiOJYSinc=; b=Z6Thu0z1gv8FAoRnXxJyAwzo4ERn5B5aJajZuLncu lYCqWTJI9dApS0PsoPpK7QcY+hxkKQjr/EN0o9M23dvW7NZ+H670wPboc6KVx6YO bqZKntuhh1hcJ5aGieYHrcDBZSrJAZapT5LtcDcjV6dqXo1S2i36ln0RAJW6a67U ik= Received: (qmail 109822 invoked by alias); 9 Sep 2019 15:46:02 -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 109766 invoked by uid 89); 9 Sep 2019 15:46:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.0 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=Tools, involve 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; Mon, 09 Sep 2019 15:46:00 +0000 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x89Ff36I031790 for ; Mon, 9 Sep 2019 17:45:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=STMicroelectronics; bh=B71ts0sAgrBcNg6EtyntAtalVP20hMPr6iWKfcgfQzI=; b=0xnQ0F8dzJp889Er7bEt6cegKqEd/cipE6ZyKs/EoJKdvgGSpz/hT4LGKJlv+TysT35o tj9NTbEiw3XNSceI8KXs91UIZpEIbVRE1/gJ3/vPD5Ur8Zv66oVgHDhrfss6Mk4Treoj KB6cj/Gc1SuTdYjYwsXdB6zcvoJfxMiWJu536Lmo/qMKQ+cOucEGdxO4xlfJiWCbWJIL 8IHfi4WOiarZRwRYMed0MwBFCe+dncnpzX9qVJPa8yCiVKdF3SQg63NqwFXnVlfGAeqq dp8ibnWwOp3l2PnzQTeJwDn8NxuFS7wXZHpQBCKsszAsoneMNWKdUilnHqRQuk9EauGj IA== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx08-00178001.pphosted.com with ESMTP id 2uv3ehpj63-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 09 Sep 2019 17:45:57 +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 0CF5722 for ; Mon, 9 Sep 2019 15:45:54 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node1.st.com [10.75.127.13]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 453C92B9BC5 for ; Mon, 9 Sep 2019 17:45:53 +0200 (CEST) Received: from gnb.st.com (10.75.127.46) by SFHDAG5NODE1.st.com (10.75.127.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 9 Sep 2019 17:45:53 +0200 From: Christophe Lyon To: Subject: [ARM/FDPIC v6 01/24] [ARM] FDPIC: Add -mfdpic option support Date: Mon, 9 Sep 2019 17:44:43 +0200 Message-ID: <20190909154526.11630-2-christophe.lyon@st.com> In-Reply-To: <20190909154526.11630-1-christophe.lyon@st.com> References: <20190909154526.11630-1-christophe.lyon@st.com> MIME-Version: 1.0 X-IsSubscribed: yes From: Christophe Lyon 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 5ecc5e5..545ec49 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 bfcd76e..cc283ff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -711,7 +711,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 @@ -18043,6 +18044,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 +behavior 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