[Bug libc/22284] New: -pg -pie doesn't work
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Thu Oct 12 01:16:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=22284
Bug ID: 22284
Summary: -pg -pie doesn't work
Product: glibc
Version: 2.27
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
[hjl@gnu-efi-2 gcc]$ cat x.c
#include <stdio.h>
void
foo (void)
{
printf ("hello\n");
}
int
main ()
{
foo ();
return 0;
}
[hjl@gnu-efi-2 gcc]$ gcc -pg -fpie -pie x.c
[hjl@gnu-efi-2 gcc]$ ./a.out
hello
[hjl@gnu-efi-2 gcc]$ gprof --brief a.out
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
Call graph
granularity: each sample hit covers 2 byte(s) no time propagated
index % time self children called name
Index by function name
[hjl@gnu-efi-2 gcc]$ gcc -pg x.c
[hjl@gnu-efi-2 gcc]$ ./a.out
hello
[hjl@gnu-efi-2 gcc]$ gprof --brief a.out
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 1 0.00 0.00 foo
Call graph
granularity: each sample hit covers 2 byte(s) no time propagated
index % time self children called name
0.00 0.00 1/1 main [7]
[1] 0.0 0.00 0.00 1 foo [1]
-----------------------------------------------
Index by function name
[1] foo
[hjl@gnu-efi-2 gcc]$
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list