Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
- Subject: Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 19 Sep 2005 18:26:04 +0200
On 19.09.2005, at 16:07, Jonas Maebe <email@hidden> wrote:
On 17 sep 2005, at 22:13, Gerriet M. Denkmann wrote:
When I switch on the Xcode-flag "Accelerated Objective-C
Dispatch" (-fobjc-direct-dispatch) (Tiger only) the code generated
for sending Objective-C messages looks kind of strange:
00001044 bla 0xfffeff00
Note that even otool does not seem to know what this 0xfffeff00
stands for.
otool only knows what addresses inside regions which have a symbol
table. bl means "branch and link", it's the PowerPC's "call a
subroutine" instruction. The a-suffix means it goes to an absolute
address (which limits the range of available addresses to the upper
and lower 32MB of the address space).
Since a few revisions of Mac OS X, Apple started mapping a some speed-
critical routines and data in the upper regions of the address space
because
a) these are there by the kernel and thus an optimal version for the
underlying cpu can be put there (without expensive runtime checks
every time the routine is called)
b) they can be called without incurring the overhead of looking up
where in memory they are (because of PIC -position-independent code-,
shared libraries could be loaded anywhere in memory, even at two
different virtual addresses in two different processes, requiring
some fudging to figure out the actual address of a routine in the
current process every time it is called)
And I can't find the address 0xfffeff00 in any load command, nor do
I see it in the symbol table.
How do I know that 0xfffeff00 stands for _objc_msgSend?
Because the compiler generates it. Afaik there is no documentation
for the layout of these pages at the top of the address space mapped
by the kernel, except for the kernel source.
So: when I try to decode this stuff I must use "if it jumps to
0xfffeff00 then it is calling _objc_msgSend" and hope this will never
change (because then allmost all apps wouldn't run anymore).
Well - thanks a lot for your explanations!
Kind regards,
Gerriet.
_______________________________________________
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