Mailing Lists: Apple Mailing Lists

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

Linking non PIC code in a bundle



Hello,

I would very much like to link position-dependent code into a bundle. I've found a message by Jonas Maebe on this list (http://lists.apple.com/archives/Darwin-x86/2007/Jan/msg00003.html) which suggests this is possible:

PIC is only required for dynamic libraries (and even then it isn't
strictly required, although you'll have to tell the linker to treat
errors about relocations in read-only sections as warnings if you
want to compile a library without PIC code).

How can I tell the linker to do so?

Currently, I'm linking with "-undefined suppress", and I get this error:

ld: absolute addressing (perhaps -mdynamic-no-pic) used in _f from x.o not allowed in slidable image


Thanks.

 Alain

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

This email sent to email@hidden


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.