用于将二进制文件嵌入obj文件的命令行工具 [英] commandline tool for embedding binary file into obj file

查看:87
本文介绍了用于将二进制文件嵌入obj文件的命令行工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
如何将二进制数据嵌入/链接到C ++ DLL

Possible Duplicate:
How to Embed/Link binary data into a C++ DLL

我需要一个命令行工具,该工具可以嵌入我的二进制文件 到一些(C方式可链接).obj文件中-此二进制数据应 在某些给定的符号下可以通过c代码到达它

I need a commandline tool which could embed my binary file(s) into some (C way linkable) .obj file - this binary data should be under some given symbols to reach to it from c code

有这样的工具吗? (我对Windows特别感兴趣 平台,coff和omf格式)

Is there such tool? (I am especially interested in windows platform, coff and omf formats )

推荐答案

如果使用的是gcc.您可以使用链接器执行类似以下操作:

If you are using gcc. You can use the linker to do just that using something like:

ld -r -b binary -o foo.o foo.txt

此处

这篇关于用于将二进制文件嵌入obj文件的命令行工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆