• 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: CFBundleGetFunctionPointerForName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFBundleGetFunctionPointerForName


  • Subject: Re: CFBundleGetFunctionPointerForName
  • From: Alastair Houghton <email@hidden>
  • Date: Thu, 13 Mar 2008 18:43:43 +0000

On 13 Mar 2008, at 18:32, Steve Checkoway wrote:

On Mar 13, 2008, at 9:09 AM, Sherm Pendley wrote:

In my experience, CFBundleGetFunctionPointerForName wants symbols to be
prefixed with an underscore - that is, _model_call. They're stored that way
in the binary (it's a C thing) and the function doesn't appear to add it for
you before searching.

I'm pretty sure it is not a C thing and that nothing is mentioned in the standard.


Linux, for example, does not prefix its symbols with underscores. I'm pretty sure it's just Mac thing.

IIRC it's an assembler thing. It happens because the native assemblers on some systems don't require any prefix when talking about registers, which would interfere with C symbols with similar names (e.g. you couldn't have a global called "d0" on some 68K platforms without the '_' prefixes).


A *lot* of platforms use the '_' prefix convention for this reason. OTOH I don't recall whether Linux is one of them; some platforms hide the '_' prefixes from their dynamic linker APIs.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________
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


  • Follow-Ups:
    • Re: CFBundleGetFunctionPointerForName
      • From: Chris Espinosa <email@hidden>
References: 
 >CFBundleGetFunctionPointerForName (From: Nava Carmon <email@hidden>)
 >Re: CFBundleGetFunctionPointerForName (From: "Sherm Pendley" <email@hidden>)
 >Re: CFBundleGetFunctionPointerForName (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Weird stuff
  • Next by Date: Re: Xcode Editor's Regex now uses PCRE instead of ICU?
  • Previous by thread: Re: CFBundleGetFunctionPointerForName
  • Next by thread: Re: CFBundleGetFunctionPointerForName
  • Index(es):
    • Date
    • Thread