segmentation fault at every assembly code
问题 I'am trying to learn assemly on raspberry pi.But I couldn't get started, every code i write gets "Segmentation Fault". .text .global _start _start: MOV R0, #2 SWI 0 This code gets segmentation fault. Even if I delete the MOV line it gets segmentation fault. 回答1: Try: bx lr @ Exit if use gcc as linker or mov r7, #1 @ Exit if use ld as linker svc #0 @ Exit if use ld as linker Some version use swi , I have success with svc using ld as the linker. If you use gcc as the linker, the lr register has