• 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: Loading function from a bundle without loading all globals.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading function from a bundle without loading all globals.


  • Subject: Re: Loading function from a bundle without loading all globals.
  • From: Peter O'Gorman <email@hidden>
  • Date: Thu, 13 Dec 2007 09:49:00 -0600

Michael Siek wrote:
> Hi all,
> we are loading some function (pointers) from an external framework using
> CFBundleGetFunctionPointerForName().
> This is working fine but seems to have the (side) effect that all global
> symbol of that framework seem to be
> visible to the loading application.
>
> Is the external framework loaded completely to the loading application?
>
> Is there a way to avoid this or to hide other symbols than the requested
> (it looks like some of them are conflicting...the usual suspect:
> new/delete)?
>
> Any hint is appreciated!

1) dlopen with RTLD_PRIVATE, and dlsym should work on 10.4 and later.

2) If it is your own framework, then use -exported_symbols_list when
linking it so that only the symbols you want to be global are.

Take your pick, but 2) would be my choice.

Peter
--
Peter O'Gorman
http://pogma.com
 _______________________________________________
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: Loading function from a bundle without loading all globals.
      • From: Michael Siek <email@hidden>
References: 
 >Loading function from a bundle without loading all globals. (From: Michael Siek <email@hidden>)

  • Prev by Date: Re: limiting scrollback in XCode/GDB?
  • Next by Date: Re: 64 bit
  • Previous by thread: Loading function from a bundle without loading all globals.
  • Next by thread: Re: Loading function from a bundle without loading all globals.
  • Index(es):
    • Date
    • Thread