Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between -all_load and -ObjC

Tags:

ios

iphone

In what way -all_load is different from -ObjC. In my project both behave in same way.

like image 280
Rajesh Avatar asked Feb 18 '14 05:02

Rajesh


People also ask

What's the difference between single and double quotation marks?

General Usage Rules In America, Canada, Australia and New Zealand, the general rule is that double quotes are used to denote direct speech. Single quotes are used to enclose a quote within a quote, a quote within a headline, or a title within a quote.

What is the difference between single and double inverted commas?

Double quotation marks (in British English) are used to indicate direct speech within direct speech (use single inverted commas for direct speech and double quotation marks to enclose quoted material within).

What's the difference between apostrophe and quotation marks?

They are two entirely different punctuation symbols. Single quotes are limited to one real function in written U.S. English, which is to indicate a quotation within a quotation. Apostrophes, on the other hand, are used to denote possessive form and to indicate omission.

What is the difference between inverted commas and quotation marks?

Inverted commas are mainly used to introduce quotations or direct speech. This is why the name quotation mark is used as a synonym for inverted commas. A direct quote (the exact words spoken or written) must be always written inside quotation marks.


2 Answers

-Objc

This flag causes the linker to load every object file in the library that defines an Objective-C class or category.

-all_load

For 64-bit and iPhone OS applications, there is a linker bug that prevents -ObjC from loading objects files from static libraries that contain only categories and no classes. The workaround is to use the -all_load or -force_load flags. -all_load forces the linker to load all object files from every archive it sees, even those without Objective-C code

Reference Building Objective-C static libraries with categories

like image 141
Midhun MP Avatar answered Oct 14 '22 14:10

Midhun MP


From man ld ...

-all_load   Loads all members of static archive libraries.
-ObjC       Loads all members of static archive libraries that implement an Objective-C
              class or category.

-ObjC won't draw in all symbols from all static libraries like -all_load will.

like image 29
greymouser Avatar answered Oct 14 '22 16:10

greymouser