Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GMP 4.2 broken on G5




On 27 apr 2006, at 03:03, Jack Howarth wrote:

Thanks for the clarification. One other question. Is there anyway to detect
if non-PIC code exists in a shared library? I recall some discussion of doing this
for Linux...


http://lists.debian.org/debian-gcc/2003/10/msg00115.html

It would be handy if something like this were possible on Darwin. Specifically
we could add such checks to 'fink validate' to verify that shared libs haven't
been built with non-PIC code.

It should be perfectly possibly to build working dynamic libraries without using PIC code. The only difference should be that such libraries cannot be shared among processes (i.e., each process has to load its own copy of the library). From the ld man page:


-read_only_relocs treatment
Specifies how relocation entries in read-only sections are to be
treated when -dynamic is used. To get the best possible shar-
ing, the read-only sections should not have any relocation
entries. [..]


Then again, maybe -fPIC does more than just preventing relocation entries in text or other read-only sections (but if it does, I'd be interested in knowing what, since I work on a compiler too and I'd like to avoid having this crashing problem in the code we generate).


Jonas _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: GMP 4.2 broken on G5 (From: email@hidden (Jack Howarth))



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.