• 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 strip Cocoa Touch frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to strip Cocoa Touch frameworks


  • Subject: Re: How to strip Cocoa Touch frameworks
  • From: Andreas Falkenhahn <email@hidden>
  • Date: Fri, 30 Dec 2016 12:40:18 +0100

On 29.12.2016 at 23:22 Kyle Sluder wrote:

> strip(1) is preventing you from doing something nonsensical. You can’t
> have a relocatable dynamic library that *references* external symbols
> without having an indirect symbol table.
>
> You’ll note that if you leave out the step of defining a function that
> calls printf(), Archive succeeds successfully. When you add that call to
> printf(), the compiler emits a call to an entry in the indirect symbol
> table that will be emitted by the linker. If you strip that table, that
> call will wind up going nowhere.
>
> I presume that if you statically linked libc (which I didn’t try because
> it’s a bad and unsupported idea on our platforms, and I really don’t
> want to figure out how to fight Xcode into doing it), you wouldn’t
> encounter this error because the compiler and linker would not have
> generated any indirect references.

Thanks, that indeed explains everything. So I just have to set "Strip Style"
to "Non-Global Symbols" instead of "All Symbols" and the framework is
stripped correctly. I've just tested it and it works fine. All my globals
are stripped correctly and only the ones I include in the "Exported Symbols File"
are still there. Perfect, that's exactly what I wanted.

I can't really understand why I haven't tried that before. I guess the name
"Non-Global Symbols" somehow held me off because of course I want my global
symbols stripped so I didn't expect an option called "Non-Global Symbols" to
do that but actually, "Non-Global Symbols" does exactly this, it strips my
global symbols. But why is it named "Non-Global Symbols" when it actually strips
global symbols? I don't really understand this...

--
Best regards,
 Andreas Falkenhahn                            mailto:email@hidden


 _______________________________________________
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: 
 >Re: How to strip Cocoa Touch frameworks (From: Andreas Falkenhahn <email@hidden>)
 >Re: How to strip Cocoa Touch frameworks (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Not finding libraries
  • Next by Date: Adding dependencies to projects in a workspace.
  • Previous by thread: Re: How to strip Cocoa Touch frameworks
  • Next by thread: Re: How to strip Cocoa Touch frameworks
  • Index(es):
    • Date
    • Thread