我知道以前有人问过类似的问题,但是:
-no-pie了链接器参数,但仍然没有结果。GNU Prof 的版本是 2.36.1该程序是本教程中的代码,复制如下:
//test_gprof.c
#include<stdio.h>
void new_func1(void)
{
printf("\n Inside new_func1()\n");
int i = 0;
for(;i<0xffffffee;i++);
return;
}
void func1(void)
{
printf("\n Inside func1 \n");
int i = 0;
for(;i<0xffffffff;i++);
new_func1();
return;
}
static void func2(void)
{
printf("\n Inside func2 \n");
int i = 0;
for(;i<0xffffffaa;i++);
return;
}
int main(void)
{
printf("\n Inside main()\n");
int i = …Run Code Online (Sandbox Code Playgroud)