[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19818] New: Absolute symbol is handled incorrectly in PIE
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/19818] New: Absolute symbol is handled incorrectly in PIE |
Date: |
Sun, 13 Mar 2016 09:50:32 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19818
Bug ID: 19818
Summary: Absolute symbol is handled incorrectly in PIE
Product: binutils
Version: 2.27 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
address@hidden tmp]$ cat foo.c
#include <stdio.h>
extern char foo;
void *p = &foo;
int
main ()
{
printf ("%p\n", p);
return 0;
}
address@hidden tmp]$ gcc -fPIE foo.c -c
address@hidden tmp]$ gcc foo.o -Wl,--defsym,foo=0x1000
address@hidden tmp]$ ./a.out
0x1000
address@hidden tmp]$ gcc foo.o -Wl,--defsym,foo=0x1000 -pie
address@hidden tmp]$ ./a.out
0x562ddcc19000
address@hidden tmp]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19818] New: Absolute symbol is handled incorrectly in PIE,
hjl.tools at gmail dot com <=