You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将IDA界面显示的指令从ARM架构切换为X86架构

How to Get x86/x86-64 Instructions (movq, movl, etc.) Instead of ARM

Got it, let's walk through the common ways to switch over to x86/x86-64 assembly instructions, depending on what tool you're working with:

Compiler (GCC/Clang)

If you're generating assembly from source code, you just need to tell the compiler to target x86/x86-64 instead of ARM:

  • For x86-64 (64-bit, uses movq, cmpq): Use the -m64 flag. Example:
    gcc -m64 -S your_program.c
    
    The output your_program.s file will have x86-64 assembly instructions.
  • For 32-bit x86 (uses movl, addl): Replace -m64 with -m32.
  • If you're on an ARM machine, you'll need the x86 cross-compiler first. On Debian/Ubuntu, install it with:
    sudo apt install gcc-x86-64-linux-gnu
    
    Then compile using the cross-compiler binary:
    x86_64-linux-gnu-gcc -S your_program.c
    

Disassemblers (objdump, GDB)

If you're examining existing binaries, explicitly tell the disassembler to use the x86 architecture:

  • objdump: Add the -M x86-64 flag for 64-bit, or -M i386 for 32-bit. Example:
    objdump -d -M x86-64 your_binary_file
    
  • GDB: Once inside GDB, set the target architecture first before disassembling:
    set architecture i386:x86-64
    disassemble main
    
    This will render x86-64 instructions instead of ARM.

Online Assembly/Disassembly Tools

If you're using web-based tools, look for an architecture dropdown menu and select x86 or x86-64 (sometimes labeled as AMD64). Most tools let you switch this setting before generating or disassembling code.


内容的提问来源于stack exchange,提问作者zhouzou

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 22:52:49