This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17836] New: -pg -pie doesn't work on x86-64
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 13 Jan 2015 13:06:53 +0000
- Subject: [Bug libc/17836] New: -pg -pie doesn't work on x86-64
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17836
Bug ID: 17836
Summary: -pg -pie doesn't work on x86-64
Product: glibc
Version: 2.21
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
On x86-64, I got
[hjl@gnu-tools-1 tmp]$ cat x.c
#include <stdio.h>
int
main ()
{
printf ("hello\n");
return 0;
}
[hjl@gnu-tools-1 tmp]$ cat y.c
int
main ()
{
return 0;
}
[hjl@gnu-tools-1 tmp]$ gcc -pie -pg y.c
/usr/local/bin/ld:
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/gcrt1.o: relocation
R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared
object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/gcrt1.o: error adding
symbols: Bad value
collect2: error: ld returned 1 exit status
[hjl@gnu-tools-1 tmp]$
The problem is gcrt1 isn't compiled with -fPIC. Should we compile it with
-fPIC?
--
You are receiving this mail because:
You are on the CC list for the bug.