Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22016

What is -no-pie used for?

$
0
0

I was working on Ubuntu 17.10 with GPROF for some testing with c files and when i execute with gprof the file generated (gmon.out), compiling and linking with -pg option, i got an empty flat and call graph. However, i found that this is a gcc bug and i would have to compile and link the file with -no-pie.

  • Compile:gcc -c main.c file-1.c file-2.c -pg [-no-pie]

  • Link:gcc -o test main.o file-1.o file-2.o -pg [-no-pie]

I have the gcc 7.2 version.

How does this option work and why the graphs are empty if i don't use that option?


Viewing all articles
Browse latest Browse all 22016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>