c - 分段拆解 helloworld

标签 c debugging assembly arm

社区成员推荐我分析以下内容,以了解 ARM 架构中发出的系统调用。我怀疑如何在这种结构中获取程序。我已经尝试过 gdb disas 命令,但部分不可见。请帮助。

.data 

HelloWorldString:
      .ascii "Hello World\n"

.text 

.globl _start 

_start:
      # Load all the arguments for write () 

      mov r7, #4
      mov r0, #1
      ldr r1,=HelloWorldString
      mov r2, #12
      svc #0

      # Need to exit the program 

      mov r7, #1
      mov r0, #0
      svc #0

最佳答案

gcc -S filename.c -o filename.S

关于c - 分段拆解 helloworld,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12949947/

相关文章:

创建指针数组

c++ - 如何与nghttp2建立下载 channel ? (c/c++) (AVS)

python-2.7 - 是否可以忽略硬编码的 pdb 断点?

python - 单步执行子程序调用,但不调用参数

c - 如何将此 C 代码转换为 MIPS 汇编代码

c - 运行时错误: debug assertion failed

c# - 在调试上下文列表中表示内容的更好方法?

c - 外部 C 代码无法从两阶段 x86 引导加载程序执行?

c++ - 使用inline内联汇编器对带有进位的bigint add进行编码

c - c 中处理 scanf 的段错误