简体   繁体   English

如何从.a文件中删除某个.o节

[英]How could I remove a certain .o section out of .a file

I have a .a file with a bunch of symbols and objects. 我有一个带有一堆符号和对象的.a文件。 There is a section which 有一节

libunwind.o:
00000184 T _Unwind_Backtrace
00000160 T _Unwind_ForcedUnwind
000000f4 T _Unwind_RaiseException
00000118 T _Unwind_Resume
0000013c T _Unwind_Resume_or_Rethrow
00000184 T ___Unwind_Backtrace
00000160 T ___Unwind_ForcedUnwind
000000f4 T ___Unwind_RaiseException
00000118 T ___Unwind_Resume
0000013c T ___Unwind_Resume_or_Rethrow
         U __gnu_Unwind_Backtrace
         U __gnu_Unwind_ForcedUnwind
         U __gnu_Unwind_RaiseException
00000014 T __gnu_Unwind_Restore_VFP
00000024 T __gnu_Unwind_Restore_VFP_D
00000034 T __gnu_Unwind_Restore_VFP_D_16_to_31
000000cc T __gnu_Unwind_Restore_WMMXC
00000044 T __gnu_Unwind_Restore_WMMXD
         U __gnu_Unwind_Resume
         U __gnu_Unwind_Resume_or_Rethrow
0000001c T __gnu_Unwind_Save_VFP
0000002c T __gnu_Unwind_Save_VFP_D
0000003c T __gnu_Unwind_Save_VFP_D_16_to_31
000000e0 T __gnu_Unwind_Save_WMMXC
00000088 T __gnu_Unwind_Save_WMMXD
00000000 T __restore_core_regs
00000000 T restore_core_regs

Which binutil tool I could use to remove the entire section? 我可以使用哪个binutil工具删除整个部分?

如果您要删除整个文件libunwind.o ,则可以使用:

ar d libwhateveritis.a libunwind.o

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM