
这是为了遵循32位教程而无需将所有指针和大量指令更改为四字的麻烦.
谢谢,
克里斯.
附:我可以在C中轻松完成这个…
chris@chris-linux-desktop:~$cat test.c#include "stdio.h"int main() { printf("hello world"); return 0;}chris@chris-linux-desktop:~$gcc test.c -o test64chris@chris-linux-desktop:~$gcc -m32 test.c -o test32chris@chris-linux-desktop:~$file test32test32: ELF 32-bit LSB executable,Intel 80386,version 1 (SYSV),dynamically linked (uses shared libs),for GNU/linux 2.6.15,not strippedchris@chris-linux-desktop:~$file test64test64: ELF 64-bit LSB executable,x86-64,not stripped解决方法 与选项“–32”一样使用,如 as –32 source.s -o objectfile
或者您可以使用gcc来汇编和链接汇编源文件. gcc在结尾处认出它.
gcc -m32 source.s -o executable
总结以上是内存溢出为你收集整理的汇编 – 如何在64位Linux上使用Gas(‘as’)组装32位二进制文件?全部内容,希望文章能够帮你解决汇编 – 如何在64位Linux上使用Gas(‘as’)组装32位二进制文件?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)