As mentioned on the mailinglist, objcopy does not make an executable of an
executable file if it is compiled with -fPIE -pie.
Problem confirmed with git as today (GNU objcopy (GNU Binutils)
2.20.51.20091018).
And now how to easy reproduce.
Notice how for the first round tmp and tmp2 got the same permissions,
while when compiled with "-fPIE -pie" they have not:
$ echo "main(){}" > tmp.c && gcc -o tmp tmp.c && objcopy tmp tmp2 && ls
-l tmp tmp2
-rwxr-xr-x 1 xake xake 8081 17 okt 09.12 tmp
-rwxr-xr-x 1 xake xake 8081 17 okt 09.12 tmp2
$ echo "main(){}" > tmp.c && gcc -fPIE -pie -o tmp tmp.c && objcopy tmp
tmp2 && ls -l tmp tmp2
-rwxr-xr-x 1 xake xake 8133 17 okt 09.13 tmp
-rw-r--r-- 1 xake xake 8133 17 okt 09.13 tmp2
--
Summary: objcopy an executable file compiled with PIE failed
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: xake at rymdraket dot net
CC: bug-binutils at gnu dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10802
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
bug-binutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils