0

I have a C project with some functions also written in arm neon assembly, however i an not able to compile it, there are several error from the file where the main() is, and it seems so obscure, I am using DS-5 for compiling and it builds and runs fine on MSVC without the asm functions. what is the issue?

/* TestApp.c file */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){ 
FILE    *inFile = NULL;
FILE    *outFile = NULL;
...
malloc();
...
printf("malloc failed");
...
memcpy();
....
...
}

Error form ARMCC 4.5.2
Warning: L6412W: Disabling merging for TestApp.o(.conststring), unsupported relocation R_ARM_REL32 from TestApp.o(i.main)
Error: L6769E: Relocation #REL:41 in printf.o(.text) with respect to __stdout. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:6 in fopen.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:2 in _printf_char_file.o(.text) with respect to fputc. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:22 in initio.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:23 in initio.o(.text) with respect to __stdout. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:24 in initio.o(.text) with respect to __stderr. No GOTSLOTexists for symbol.
Error: L6769E: Relocation #REL:25 in initio.o(.text) with respect to __stdin. No GOTSLOTexists for symbol.

. . .

Jay10
  • 1
  • 2
  • Compile to the correct target-ABI and link the correct libraries for the target/ABI. IOW: configure your build-environment correctly. You question is lacking information for more. – too honest for this site Nov 06 '15 at 12:17
  • The compilation commands are lacking. It is not possible to reason about the error with the given info. – A. K. Feb 23 '23 at 15:35

1 Answers1

1

The question lacks info about how you try to build your program. It seems you try statically link stdlib while compiling dynamic library.

While building dynamic library, link dynamic libraries, not static libraries. If you do not want to create dynamic library, than your problem is most probably within your makefile which is not included.

pholat
  • 467
  • 5
  • 20