From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7871) id E71903856DD3; Mon, 7 Nov 2022 08:40:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E71903856DD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667810446; bh=L2IsU2Cheq7T8ERUujcEb0U0vWhhUwLyOQLu8Qh7Pgc=; h=From:To:Subject:Date:From; b=BTIC42T7sg8FXUD1hEIq38wWM2Ic3faCyjAPJgFUd+OmvZTSaBMj20wr12hpNnVyw CjCs+BhuCM/AiWYsR8PbI5tQm/3DQXPttbywO55l2WnmFS/k7ZaXPcuHhlzuwcVtvz tj32pt+T5Gn3bCYAIdmn0qdcIEZWmLxY0l4+sZEk= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marc Poulhi?s To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3746] ada: Document that gprof won't work on windows with PIE. X-Act-Checkin: gcc X-Git-Author: Cedric Landet X-Git-Refname: refs/heads/master X-Git-Oldrev: bcb3f09ec6cb9b2c6e58243d05b5a0fc33e909f1 X-Git-Newrev: 96c053335c7329ecd6c37f395b479994bc187d3a Message-Id: <20221107084046.E71903856DD3@sourceware.org> Date: Mon, 7 Nov 2022 08:40:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:96c053335c7329ecd6c37f395b479994bc187d3a commit r13-3746-g96c053335c7329ecd6c37f395b479994bc187d3a Author: Cedric Landet Date: Tue Oct 18 09:58:46 2022 +0200 ada: Document that gprof won't work on windows with PIE. Document that gprof won't work on windows with PIE and -no-pie must be used. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst: Mention the needed -no-pie for windows to use gprof. * gnat_ugn.texi: Regenerate. Diff: --- gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 8 ++++++-- gcc/ada/gnat_ugn.texi | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst index e827d1f9841..c239c363eae 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst @@ -1252,8 +1252,8 @@ most often, and are therefore the most time-consuming. better handle Ada programs and multitasking. It is currently supported on the following platforms -* linux x86/x86_64 -* windows x86 +* Linux x86/x86_64 +* Windows x86/x86_64 (without PIE support) In order to profile a program using ``gprof``, several steps are needed: @@ -1291,6 +1291,10 @@ Note that only the objects that were compiled with the ``-pg`` switch will be profiled; if you need to profile your whole project, use the ``-f`` gnatmake switch to force full recompilation. +Note that on Windows, gprof does not support PIE. The ``-no-pie`` switch +should be added to the linker flags to disable this feature. + + .. _Program_execution: diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index ff5cfa9dbce..385f1d3deb5 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -19552,10 +19552,10 @@ It is currently supported on the following platforms @itemize * @item -linux x86/x86_64 +Linux x86/x86_64 @item -windows x86 +Windows x86/x86_64 (without PIE support) @end itemize In order to profile a program using @code{gprof}, several steps are needed: @@ -19614,6 +19614,9 @@ Note that only the objects that were compiled with the @code{-pg} switch will be profiled; if you need to profile your whole project, use the @code{-f} gnatmake switch to force full recompilation. +Note that on Windows, gprof does not support PIE. The @code{-no-pie} switch +should be added to the linker flags to disable this feature. + @node Program execution,Running gprof,Compilation for profiling,Profiling an Ada Program with gprof @anchor{gnat_ugn/gnat_and_program_execution id23}@anchor{175}@anchor{gnat_ugn/gnat_and_program_execution program-execution}@anchor{176} @subsubsection Program execution