I have a C file which declares a global variables. This file will be compiled together with some ARM assembly files.

int foo;

void call_asm(void);

int main(void) {
    call_asm();
    return foo;
}
call_asm:
    ...

I tried using the link from the arm infocenter but the compiler (arm-linux-gnueabi-gcc) is telling me that "import" is an undefined instruction.

Can I simply do something like:

LDR    r0, =GLOBAL_VAR

How can I use the global variables defined in the C file in assembly?

Edit
Report