Mac/iPhone 的 objcopy 等价物? [英] An objcopy equivalent for Mac / iPhone?
问题描述
我想重命名目标文件 (.o) 中的符号,使用与 binutils 的 objcopy --redefine-syms
工具等效的 Mac 工具.
I would like to rename symbols inside object files (.o) with something that would be the Mac equivalent of binutils' objcopy --redefine-syms
tool.
我没有发现arm-apple-darwin10-objcopy
.我尝试了 MacPorts 的 arm-elf-binutils
端口,也尝试使用 otool
和 segedit
进行了一些尝试,但没有取得多大成功.
I found no arm-apple-darwin10-objcopy
. I tried the MacPorts' arm-elf-binutils
port and also tried to play a bit with otool
and segedit
without much success.
有什么想法吗?
推荐答案
听起来像是 Agner 的工作Fog 的 objconv.
Sounds like a job for Agner Fog's objconv.
来自 公告:
我现在已经完成了在我之前的帖子中提到的目标文件转换器中对 Mach-O 文件的完全支持.您可以使用它来替代缺少的 objcopy 实用程序.
I have now finished making full support for Mach-O files in the object file converter mentioned in my previous posts. You may use it as a replacement for the missing objcopy utility.
Objconv 可用于以下目的:
在适用于所有 x86 和 x86-64 平台的 Mach-O、ELF、COFF 和 OMF 格式之间转换目标文件和库/存档文件.
Objconv can be used for the following purposes:
Convert object files and library/archive files between Mach-O, ELF, COFF and OMF formats for all x86 and x86-64 platforms.
更改目标文件中的符号名称,弱化符号,为符号添加别名.
Change symbol names in object files, make symbols weak, add alias names to symbols.
跨平台(Mac、Linux、BSD、Windows)构建、修改和转换静态库文件(*.a、*.lib)
Build, modify and convert static library files (*.a, *.lib) across platforms (Mac, Linux, BSD, Windows)
转储目标文件和可执行文件
Dump object files and executable files
反汇编目标文件和可执行文件.很好的反汇编器.
Disassemble object files and executable files. Very good disassembler.
-
这篇关于Mac/iPhone 的 objcopy 等价物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!