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: 173390 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp4534173ilq; Mon, 9 Sep 2019 08:46:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4xZDilyRL1A+1TcL9Ky7QmOOUq6AJDBJrT0csEmUOudzoeP28h2ewseeKNEKQ8K2pH5KS X-Received: by 2002:aa7:d34a:: with SMTP id m10mr24447616edr.3.1568043980601; Mon, 09 Sep 2019 08:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568043980; cv=none; d=google.com; s=arc-20160816; b=fZ1lrAoMYUqVbp8hveAZz4+xy9upHSMOpo21Ek24TQTQS40570Ri+dx6Z6j/m0fjFe QFzGrKqrXBtfPFjeZ2yL5A9neLSt5fDjM8qftv9z1mIJIZVV1xpfo2RU6P8rf/QmmQE1 3KPeAgQAvZT6OZAO9DkK6NLCRQRzpaDVQdNWx/I3HNIbKWNO5EXrfRoFCjXUEYQK6NRy L6R26GVnDuuFDZZDCu8CvCK6ST76ny2IZt+hnZxmYsZ2mqzfGEdd8jSiEBc4ohISPN+a QMj57YSMYEDvD18oNvYD13ySjElbgdklPY+qQH0wMYfv2R5wtGnC4MWn4lRS+hEBsYzX NKKg== 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:dkim-signature:delivered-to:sender :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature; bh=B71ts0sAgrBcNg6EtyntAtalVP20hMPr6iWKfcgfQzI=; b=gQKRJy1VOpYOwnsalBXLU7t9fVKo4cT8cJH3DadCEtxshFvuBMrVZraMHrO0Jn/ldn 6GFlVOGsIOKMjiMIvGXDEJSpSvAJh4GiHTKdSWAPGB+tmuviBXXHcafXWa0anz/+f+P3 KNlY7O3J6WRDphompTHVSyP67aHfVMJkjtAscTu5bGZ/YRouTKxK9fKx5ldYOUfktB84 C3toLgPCdMAalPuN3L+URrrYGaseJTE+kuH4ZIAor9F+D1ql+9k30dYHkrLifK6Wk3qo LSyORhLQ0mGJ/Q27DWc0Gj+7l/GEwzpUvQxL84g/OAmVsMfA/crKtHfPb2GUzRRlEqM1 LROg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X2v0fEud; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=0xnQ0F8d; spf=pass (google.com: domain of gcc-patches-return-508643-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-508643-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 f14si8525990edf.102.2019.09.09.08.46.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Sep 2019 08:46:20 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-508643-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=X2v0fEud; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=0xnQ0F8d; spf=pass (google.com: domain of gcc-patches-return-508643-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-508643-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:subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=Nl1 WLEIP72+BS92PifPfAqm5DEmGrWuEvKqjAR4pX5zG+xqWNYlaRfz3d3L4NZLxjor lZlJySuU2Co00JR4nFdJ4qP0XqQdsjEbeAlTBy9GKkt7XXWjJaGgyyyl3ZNVQGC/ ON5cKlnBvAjzMKVtfYikzWcDg92HaMg78KX8VobQ= 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=X2v0fEudwsn+htwVtC+TkDAHVLFnoAUoKowvSndl2 4sP2g0PrsaVgiWcooE8daYuUguqlotpOZmLFhhKAq5g8irCYWLVDjHVn/CMHoRS5 eCPZ1JEORAvDkN6IHvh6VdBW7+9GXB28Pgpx9jVs6971Ab+olnKMSJC3Ybpc7ovz WU= 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 -- 2.6.3 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