【问题标题】:armcc link error Error: L6769E in armcc while building a C project, what is the issue?armcc 链接错误 Error: L6769E in armcc while building a C project,什么问题?
【发布时间】:2015-11-06 11:39:50
【问题描述】:

我有一个 C 项目,其中一些函数也是用 arm neon 程序集编写的,但是我无法编译它,main() 所在的文件中有几个错误,而且看起来很晦涩,我正在使用DS-5 用于编译,它在没有 asm 函数的情况下在 MSVC 上构建和运行良好。问题是什么?

/* 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.

。 . .

【问题讨论】:

  • 编译为正确的目标 ABI 并为目标/ABI 链接正确的库。 IOW:正确配置您的构建环境。您的问题缺少更多信息。

标签: c armcc


【解决方案1】:

该问题缺少有关您如何尝试构建程序的信息。您似乎在编译动态库时尝试静态链接 stdlib。

在构建动态库时,链接动态库,而不是静态库。如果您不想创建动态库,那么您的问题很可能出在未包含的 makefile 中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-14
    • 2020-08-21
    • 2019-12-18
    • 2023-02-13
    • 2013-04-29
    • 2015-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多