Mailing Lists: Apple Mailing Lists

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

local relocation entries error: from assembler (as) output?



I have a static library that works great when I use it outside of Xcode 2.2.:

$ g++ -o test test.cc libmylib.a

But when I try to link it to my Xcode 2.2 project, I get the dreaded
"local relocation entries" error:

/usr/bin/ld: ../mylib/libmylib.a(power.o) has local relocation entries
in non-writable section (__TEXT,__text)

The object file in question, power.o, is an assembly file, which was
compiled with "as":

$ as -o power.o power.S

I have tried compiling with -static and -n

$ as -static -o power.o power.S
$ as -static -n -o power.o power.S

(These two invocations yield the exact same object file.)

In any case, it doesn't a difference - I get the same "local
relocation entries" message.

Does anyone know why this should happen for Xcode and not for just a
regular (non-Xcode) statically linked binary?

Charles
 _______________________________________________
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



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.