我编译了一个 Hello World C 文件,只需要它的一个部分(只有 hello world 函数)。
编译后的文件格式为 elf32-i386,包含 4 个部分:.rodata
, .text.hello
, .comment
, .eh_frame
.
我尝试使用 objcopy 仅提取.text.hello
部分:http ://www.thegeekstuff.com/2013/01/objcopy-examples/示例 3。
它失败了,报告:
BFD: hello_new: symbol `.rodata' required but not present
objcopy:hello_new: No symbols
如何解决?