创建ELF图像
我需要从共享对象(.so 文件)创建 ELF 映像文件并将其写入 Windows 中的另一个分区。然后在Linux中打开这个分区并加载共享对象。
有谁知道如何在 Windows 中创建 ELF 映像(许多共享对象的捆绑包)?
I need to create an ELF image file from shared objects (.so files) and write it to another partition in Windows. Then open this partition in Linux and load the shared objects.
Does anybody know how to create an ELF image (a bundle of many shared objects) in Windows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 Cygwin 并尝试合适的 GCC 交叉工具链。也许你必须先自己构建它(这很麻烦),但是就这样......
编辑:
好的,这是:
简化版:
构建 GCC 交叉编译器(从“Linux”到“Windows”)——基本步骤与那里描述的相同。您只需使用相关的
--host=...
和--target=...
来./configure
即可。还有哦!不要忘记设置构建根目录,因为不支持“在源代码树中”构建 - 如果您尝试(我就是这样做的...),您只会陷入错误致命一击:
http://cygwin.wikia.com/wiki/How_to_install_a_newer_version_of_GCC#Build_and_Install_GCC -- a完整的指南。
You can use Cygwin and try a suitable GCC cross-toolchain. Perhaps you'll have to build it yourself first (which is troublesome), but there it goes...
EDIT:
Okay, here you are:
A simplified one:
Building GCC cross compiler (from "Linux" to "Windows") -- the basic steps are the same as described there. You'll just need to
./configure
it with relevant--host=...
and--target=...
. And oh! Don't forget to set the build root, since building "in the source tree" is not supported -- you'll just get stuck in errors if you try (I did...)A killer one:
http://cygwin.wikia.com/wiki/How_to_install_a_newer_version_of_GCC#Build_and_Install_GCC -- a complete guide.
现在Linux 可以理解NTFS。至少,它应该能够读取它。
您还可以使用格式化为 FAT32 或 NTFS 的闪存棒作为共享存储。
您还可以在虚拟机中运行Linux并在其上设置FTP服务器并通过它交换文件。
在不同操作系统之间共享数据的方法有很多种。
Nowadays Linux understands NTFS. At least, it should be able to read off it.
You can also use a flash stick formatted as FAT32 or NTFS as the shared storage.
You can also run Linux in a VM and set up FTP server on it and exchange files through it.
There're many ways of sharing data between different OSes.