• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?


  • Subject: Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
  • From: Jonas Maebe <email@hidden>
  • Date: Mon, 19 Sep 2005 12:57:30 +0200


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.


Without Accelerated Objective-C Dispatch the code looks like:

00001024 bl 0x2540 ; symbol stub for: _objc_msgSend

That's because this is an address is a known library with a symbol table. There is no symbol table for the kernel-mapped page (at least none which is referenced by object code the compiler generates).



Jonas

_______________________________________________
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


References: 
 >Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ? (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: XCode and AU
  • Next by Date: Incompatible Operating System?
  • Previous by thread: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
  • Next by thread: Re: Accelerated Objective-C Dispatch or: Who is 0xfffeff00 ?
  • Index(es):
    • Date
    • Thread