This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Andriod NDK support for ARM assembly.

Hello everyone... I am trying to build,debug, & run C, Assembly code in android NDK. I have Succeed in C. But when i am working with Assembly am getting an error: "too many memory references for 'add' ".

Andriod.mk file is:

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_ARM_MODE := arm

LOCAL_MODULE    := HelloJNI

LOCAL_SRC_FILES := Helloworld.c

LOCAL_SRC_FILES += test.S

LOCAL_LDLIBS    := -llog

include $(BUILD_SHARED_LIBRARY)

C code(Helloworld.c):

#include <stdio.h>

#include <stdlib.h>

extern void func(int , int );

int main(int argc, char ** argv)

{

    int a, b, c;

    a = 5, b = 10;

    c = a* b;

    func(a, b);

    printf("c = %d", c);

}

Assembly code(test.S):

    .text

    .global    func

func:

    ADD r0, r0, r1

    .end

I am not getting why it is happening... I hope someone will help me.

Parents Reply Children
No data