Hi!
On 02/21/2011 08:58 PM, Ian Lance Taylor wrote:
Stefano Bonifazi<stefboombastic@xxxxxxxxx> writes:
Are you the same author of this great blog
http://www.airs.com/blog/archives/category/programming/page/21 ?
Yes.
Great! :) Thank you for making it public! Really very precious for who
learns that stuff! :)
When linking with -fPIC I would normally expect the gcc driver to use
crtbeginS.o rather than crtbegin.o. See if crtbegin.o in particular was
compiled without -fPIC.
readelf -d /usr/lib/gcc/powerpc-linux-gnu/4.4.5/crtbegin.o|fgrep TEXT
does not output anything, and as far as I understood it means crtbegin.o
is PIC
the same command on the final executable gives:
0x00000016 (TEXTREL) 0x0
It may help to see what relocations are in the text or data segments, to
see why the TEXTREL entry is being added.
Outputs of
"objdump --dynamic-reloc bin/ppc-test", "objdump --dynamic-syms
bin/ppc-test", "objdump --syms bin/ppc-test",
"objdump --full-contents bin/ppc-test" and several readelf dumps are here:
<http://cid-9d0dd0f6c6e22fe8.office.live.com/browse.aspx/Pubblic/Developing/master-degree-project>http://cid-9d0dd0f6c6e22fe8.office.live.com/browse.aspx/Public/Developing/master-degree-project
Thank you very much for your help!
Stefano B.