From 35cff9185b355d7a471b5164b2235409e584dbfb Mon Sep 17 00:00:00 2001
From: Manuel Traut <manut@linutronix.de>
Date: Mon, 14 Jan 2019 21:24:35 +0100
Subject: profiling - gprof: use no PIE compiler and linker option

PIE is enabled in the gcc of Debian/stretch by default.
However the gprof in stretch isn't able to produce any
output if PIE is enabled. This is also documented here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854704

Disable PIE for the moment to get some gprof output.
However i'm not able to find out how to disable PIE if
compiling and linking is done in two steps. Therefore this
is just removed.

Signed-off-by: Manuel Traut <manut@linutronix.de>
---
 application-devel/profiling/pres_app_profiling_en.tex | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

(limited to 'application-devel/profiling/pres_app_profiling_en.tex')

diff --git a/application-devel/profiling/pres_app_profiling_en.tex b/application-devel/profiling/pres_app_profiling_en.tex
index 259d176..aa26bbe 100644
--- a/application-devel/profiling/pres_app_profiling_en.tex
+++ b/application-devel/profiling/pres_app_profiling_en.tex
@@ -14,14 +14,7 @@
 \frametitle{Using gprof}
 Compile AND link with profile information:
 \begin{verbatim}
-# Compile and link in one go
-
-gcc -Wall -pg -o gprof_test gprof_test.c
-
-# or
-
-gcc -Wall -pg -o gprof_test.o gprof_test.c
-gcc -Wall -pg -o gprof_test gprof_test.o
+gcc -Wall -no-pie -fno-pie -pg -o gprof_test gprof_test.c
 \end{verbatim}
 \end{frame}
 
-- 
cgit v1.2.3

