We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
The message "too many memory references for 'add'" sounds like you be accidentally be using as assembler for a different target processor.