disassembling from an elf file produce by FPC cross-assembling for arm embedded, an empty procedure:-
procedure UART0int:nostackframe;
begin
end;looks like this:-
000001a4 <P$UARTTEST_UART0INT>:
1a4: 46f7 mov pc, lr
1a6: 46c0 nop (mov r8, r8)
if I grab the address of this procedure as a constant in assembler (or assign it to a pointer using @; same result):-
asm
.long UART0int
end;
the resulting constant disassembles as:-
1bc: 000001a5 .word 0x000001a5
which seems to be one greater than the address of the procedure. Is this right? If so, why?
also, why does the compiler sometimes add a 'nop' to the end of a procedure (as above)?
Geoffrey
