Re: getting problem while moving from Xcode 2.x to Xcode 3.x
Re: getting problem while moving from Xcode 2.x to Xcode 3.x
- Subject: Re: getting problem while moving from Xcode 2.x to Xcode 3.x
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 14 Jan 2009 15:08:31 +0100
Le 14 janv. 09 à 14:59, Arnab Ganguly a écrit :
Hi All,
I am trying to port a code from Xcode 2.4 to Xcode 3.1.I am getting
the linking error due to symbols not found for the following
function "get_end()", referenced from:"
The same code gets compiled in XCode 2.4 without any issue.I have
included the header file #include <mach-o/getsect.h>.
Any help would be very much appreciated.
It's strange as this symbol is properly defined in the libSystem.
Show us the transcript if you want more help.
Note that if you're updating your code, you may consider replace this
function call by a better solution as strongly recommended :
man get_end:
These routines provide a stopgap measure to programs that use the
UNIX link-editor defined symbols. Use of these routines is very
strongly discouraged.
The problem is that any program that is using UNIX link editor
defined symbols (_end, _etext or _edata) is making assumptions that
the program has the mem-
ory layout of a UNIX program.
This is an incorrect assumption for a program built by the
Mach-O link editor. The reason that these routines are provided is
that if very minimal assump-
tions about the layout are used and the default format and
memory layout of the Mach-O link editor is used to build the program,
some things may work by
using the values returned by these routines in place of the
addresses of their UNIX link-editor defined symbols. So use at your
own risk, and only if you
know what your doing. Or better yet, convert the program to
use the appropriate Mach or Mach-O functions. If you are trying
to allocate memory use
vm_allocate(2), if you are trying to find out about your
address space use vm_region(2) and if you are trying to find out where
your program is loaded use
the dyld(3) functions.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden