https://sourceware.org/bugzilla/show_bug.cgi?id=19818
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> --- More tests [hjl@gnu-skl-1 tmp]$ cat foo.c #include <stdio.h> extern char foo; void *p = &foo; int main () { printf ("%p\n", p); printf ("%p\n", &foo); return 0; } [hjl@gnu-skl-1 tmp]$ gcc -fPIE foo.c -c [hjl@gnu-skl-1 tmp]$ gcc foo.o -Wl,--defsym,foo=0x1000 [hjl@gnu-skl-1 tmp]$ ./a.out 0x1000 0x1000 [hjl@gnu-skl-1 tmp]$ gcc foo.o -Wl,--defsym,foo=0x1000 -pie [hjl@gnu-skl-1 tmp]$ ./a.out 0x557f7dd83000 0x557f7dd83000 [hjl@gnu-skl-1 tmp]$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils