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: local relocation entries in non-writable section



On Mar 17, 2006, at 2:02 PM, Eric Christopher wrote:

On Mar 17, 2006, at 1:57 PM, Jeffrey Koppi wrote:

I'm using Xcode 2.2 to build a QuickTime Component (Universal). When I link in a static library, I'm getting the following link error:
libfoo.a(foo.c.o) has local relocation entries in non-writable section (__TEXT,__text)


The static library was built with Intel's C compiler for MacOS (command line), because the source contains Intel assembly.

The assembly likely contains a runtime relocation in the text section. You'll need to use a stub or use the -read_only_relocs linker command line option. (The latter has some undesirable effects as far as application start time).

In addition to what Eric said, you don't need to use Intel's pre- release compiler to build code containing Intel assembly. We support Intel assembly code via both the standard as assembler and via nasm. Not that using Intel's compiler is a bad thing by any means -- we're really excited to have their compiler on our platform -- but I just wanted to let you know that you can use the system's tools too.


Also, I strongly suggest using Xcode 2.2.1 if you're targeting Intel, rather than 2.2.

-Eric

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

This email sent to email@hidden
References: 
 >local relocation entries in non-writable section (From: Jeffrey Koppi <email@hidden>)
 >Re: local relocation entries in non-writable section (From: Eric Christopher <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.