• 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: How to not include function names in dylib?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to not include function names in dylib?


  • Subject: Re: How to not include function names in dylib?
  • From: "Peter O'Gorman" <email@hidden>
  • Date: Thu, 24 Aug 2006 21:27:05 +0900


On Aug 24, 2006, at 4:22 AM, Christian Schmitz wrote:

Hi,

gcc does include function names in dylibs here. How do I prevent that?

Has someone an idea?

I only want one function to be named in the file (and all imports), but
not the private functions.


PS: I tried with gcc and xcode and various options, but did not get it
done.

Your best bet i s to ensure that -fvisibility=hidden is passed to the compiler by default, and then explicity export the functions that you want to export with __attribute__((visibility("default"))).


If you are unable to do this, you can use the -exported_symbols_list flag to ld to export only those symbols that you need.

If you just want to change a dylib that you already have without rebuilding everything then use nmedit(1).

There are xcode GUI options for setting up the first two choices, "Symbols Hidden by Default" and"Exported Symbols File".

Once you have done this, strip -x should make you happy, well, happier anyway.

Hope this helps,
Peter
_______________________________________________
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: 
 >How to not include function names in dylib? (From: email@hidden (Christian Schmitz))

  • Prev by Date: Testing async code with OCUnit
  • Next by Date: gcc 3.3 and 10.3 features
  • Previous by thread: Re: How to not include function names in dylib?
  • Next by thread: Project compiles but won't run under xCode 3.0 - class lookup error
  • Index(es):
    • Date
    • Thread