Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

preventing unused symbol from be stripped

There is a function I have written in C that I would like to use in the debugger to send commands to a javascript engine. Since this function is not used directly in code the linker strips this symbol. Is there a way to mark a particular function to not be stripped?

like image 525
Trent Ahrens Avatar asked May 23 '12 20:05

Trent Ahrens


1 Answers

Found it!

http://disanji.net/iOS_Doc/#documentation/DeveloperTools/Conceptual/XcodeBuildSystem/500-Linking/bs_linking.html

declaration should have

__attribute__((used))
like image 99
Trent Ahrens Avatar answered Oct 22 '22 14:10

Trent Ahrens