-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jack Howarth wrote:
| Peter,
|    Are you certain it is the need for -fPIC is limited at all with
| regard to static code in shared libs. In his article, Drepper says...
|
| The most important recommendation is to always use -fpic or -fPIC
| when generating code which ends up in DSOs. This applies to data as
| well as code. Code which is not compiled this way almost certainly
| will contain text relocations. For these there is no excuse. Text
| relocations require extra work to apply in the dynamic linker. And
| argumentation saying that the code is not shared because no other
| process uses the DSO is invalid. In this case it is not useful to
| use a DSO in the first place; the code should just be added to the
| application code.

imac:~ peter$ touch foo.c
imac:~ peter$ /usr/bin/gcc -v -c foo.c 2>&1 | grep PIC
~ /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/cc1 -quiet -v -D__DYNAMIC__
foo.c -fPIC -quiet -dumpbase foo.c -auxbase foo -version -o /var/tmp//ccPhFhC2.s

Peter


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBQ4HnzbiDAg3OZTLPAQK0wgP+KdJiQbjVAJnOCxmUWwVv7p1hGZ1QU+OR
ebs+3ajS7fnXsW5kgu0NPc1KFBNMwI+yRqczNoWEmRU0TPiKKrxGv6o3h/nXN3iO
cyoUxjW+tFNCb+4K8z7N7iNDBYJOXqvKrR2MUA/buoziwkCWNvdpYGTajErI93Oh
eIeTSplK1VY=
=UXzV
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to