On Mon, Jun 10, 2013 at 2:41 PM, Kalai Rajah N <kalairajah@xxxxxxxxx> wrote: > I'm trying to do a simple register read through ARM inline assembly. > If I embed the asm in the function directly, it works ... ... > I see the following errors: > /tmp/ccYu7aUS.ltrans0.ltrans.o: In function `read_reg_ok': > ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x60): undefined > reference to `r6' > ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x64): undefined > reference to `r4' > ccYu7aUS.ltrans0.o:(.text.check_reset_value.4010+0x68): undefined > reference to `r5' > collect2: error: ld returned 1 exit status > > What am I doing wrong? Your test case has no mention of r4, r5, or r6. It always helps to show a complete standalone test case. The error messages indicate some confusion: there are references to symbols using the names of registers. But I don't know where those are coming from. Ian