2016-12-07 52 views
0

當我分析由xcode生成的鏈接映射文件時,鏈接器合成部分中有一個名爲「compact unwind info」的數據。鏈接器中合成的「compact unwind info」是什麼意思

compact unwind info 858.57KB 858572 Unchecked 

大約需要858kb的空間大小。 我想知道這個空間中的實際數據是什麼。 有沒有辦法縮小這個尺寸?

接頭合成部分的總輸出:

compact unwind info 858.57KB 
helper helper 24B 
objc image info 8B 
non-lazy-pointer 8B 
non-lazy-pointer-to-local: dyld_stub_binder 8B 
non-lazy-pointer-to-local: _vm_page_size 8B 
non-lazy-pointer-to-local: _tanh 8B 
non-lazy-pointer-to-local: _tan 8B 
non-lazy-pointer-to-local: _strdup 8B 
non-lazy-pointer-to-local: _strcmp 8B 
non-lazy-pointer-to-local: _sinh 8B 
non-lazy-pointer-to-local: _sin 8B 
non-lazy-pointer-to-local: _realloc 8B 
non-lazy-pointer-to-local: _protocol_getName 8B 
non-lazy-pointer-to-local: _object_getIndexedIvars 8B 
non-lazy-pointer-to-local: _objc_readClassPair 8B 
non-lazy-pointer-to-local: _objc_lookUpClass 8B 
non-lazy-pointer-to-local: _objc_getRequiredClass 8B 
non-lazy-pointer-to-local: _objc_getProtocol 8B 
non-lazy-pointer-to-local: _objc_getMetaClass 8B 
non-lazy-pointer-to-local: _objc_getClass 8B 
non-lazy-pointer-to-local: _objc_copyClassNamesForImage 8B 
non-lazy-pointer-to-local: _objc_allocateClassPair 8B 
non-lazy-pointer-to-local: _malloc 8B 
non-lazy-pointer-to-local: _mach_task_self_ 8B 
..... 

回答

1

開卷信息是展開堆棧時將引發異常所必需的信息/上升。展開堆棧涉及確定幀指針,堆棧指針,返回地址和所有保存的寄存器的存儲位置,以便可以爲前一幀恢復狀態。對於任何給定的堆棧幀,它還確定是否存在展開處理函數,以處理C++和Objective-C等語言中的異常處理的「catch」和「finally」特性。

當前幀的所有信息都由指令指針確定。當執行從第一條指令開始執行函數時,細節會發生變化,因爲每條指令都可能會修改相關寄存器和/或將保存的寄存器值壓入或彈出堆棧。

展開信息描述瞭如何從指令指針確定在哪裏找到所有這些值。

可以嵌入到二進制文件中的各種形式的展開信息。一個常見的形式是DWARF展開信息。這相當空間效率低下。蘋果公司開發了緊湊的展開式信息,因爲不管信不信,它實際上使用的空間更少。

緊湊展開信息格式的詳細信息可以在here找到。

+0

非常感謝! – Hikari