Attempted install of an Obj-C Foundation library

Chuck Swiger cswiger at mac.com
Thu Apr 28 14:27:12 PDT 2005


David O'Brien wrote:
> On Thu, Apr 28, 2005 at 09:34:50AM -0700, Kris Kennaway wrote:
[ ... ]
>>> That is the shared version of libgcc.a.  Why can't you use the static
>>> version?
>>
>> Presumably because it wants to link it to relocatable object files.
>> In general amd64 (and ia64 and sparc64) needs a PIC version of every
>> system library, which FreeBSD doesn't currently do.
> 
> Though we do have /usr/lib/libgcc_pic.a just for this case.

At least at one point, Obj-C and the OPENSTEP frameworks supported static 
linking. [1]  Also, the shared libraries evolved from being compiled against a 
fixed VM address:

#define MH_FVMLIB       0x3             /* fixed VM shared library file */

...to the current default of being PIC, since there were some very ugly 
collisions when libraries grew too big and started running over each other:

#define MH_DYLIB        0x6             /* dynamically bound shared library */

Of course, the GNUSTEP project is using the native object format (presumably 
ELF), rather than MachO, but how it handles frameworks-- shared libraries in 
the local parlance-- is likely to closely resemble how OPENSTEP worked.

I don't know whether saying that this stuff used to work on other platforms is 
useful or not to Michael, but it did.  :-)

-- 
-Chuck

[1]: At least, there was a static version of the System framework, which 
includes what FreeBSD puts into libc.a, and I think the basic Foundation 
classes were also available as a static lib, too.  Some of the fancier stuff 
like EOF or database adaptors, were only available as shared libraries, 
because those things used Mach's equivalent to dlopen() for dynamicly loading 
stuff when needed as a matter of course.



More information about the freebsd-amd64 mailing list