简体   繁体   中英

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

I have a .a file with a bunch of symbols and objects. 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?

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

ar d libwhateveritis.a libunwind.o

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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