1

我在 ARM DS IDE 中遇到了一些链接器问题,我正在尝试为 ARMVv-8 架构、带有 ARM Compiler 6 的 Cortex A72 处理器构建代码。

我认为这些错误与标准库有关,例如 stdio.h ,math.h 这些错误不应该出现,因为链接器总是在 Linux 机器上寻找标准库路径。

我是否遗漏了某些东西或制造了一些编译器、链接器错误?

Building target: fresample.axf
Invoking: Arm Linker 6
armlink --userlibpath=/usr/lib/x86_64-linux-gnu --info=sizes -o "fresample.axf"  ./src/audio.o ./src/audio_format.o ./src/audio_rate.o ./src/audio_raw_load.o ./src/audio_wav_check.o ./src/audio_wav_load.o ./src/audio_wav_save.o ./src/common.o ./src/file.o ./src/main.o ./src/riff.o  ./lib/cpu.o ./lib/filter_delay.o ./lib/filter_free.o ./lib/filter_get.o ./lib/filter_new.o ./lib/filter_new_window.o ./lib/info_name.o ./lib/param.o ./lib/param_name.o ./lib/resample.o ./lib/resample_s16func.o ./lib/resample_s16n1f32_altivec.o ./lib/resample_s16n1f32_scalar.o ./lib/resample_s16n1f32_sse2.o ./lib/resample_s16n1s16_altivec.o ./lib/resample_s16n1s16_scalar.o ./lib/resample_s16n1s16_sse2.o ./lib/resample_s16n2f32_altivec.o ./lib/resample_s16n2f32_scalar.o ./lib/resample_s16n2f32_sse2.o ./lib/resample_s16n2s16_altivec.o ./lib/resample_s16n2s16_scalar.o ./lib/resample_s16n2s16_sse2.o ./lib/swap16.o ./lib/swap16_scalar.o   
Error: L6218E: Undefined symbol stderr (referred from common.o).
Error: L6218E: Undefined symbol close (referred from file.o).
Error: L6218E: Undefined symbol fstat (referred from file.o).
Error: L6218E: Undefined symbol mmap (referred from file.o).
Error: L6218E: Undefined symbol munmap (referred from file.o).
Error: L6218E: Undefined symbol open (referred from file.o).
Error: L6218E: Undefined symbol read (referred from file.o).
Error: L6218E: Undefined symbol __assert_fail (referred from main.o).
Error: L6218E: Undefined symbol getopt_long (referred from main.o).
Error: L6218E: Undefined symbol optarg (referred from main.o).
Error: L6218E: Undefined symbol optind (referred from main.o).
Error: L6218E: Undefined symbol optopt (referred from main.o).
Error: L6218E: Undefined symbol stdout (referred from main.o).
Error: L6218E: Undefined symbol __exp_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __log_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __pow_finite (referred from filter_new.o).
Error: L6218E: Undefined symbol __sqrt_finite (referred from filter_new.o).
Finished: 0 information, 0 warning and 17 error messages.
make: *** [makefile:33: fresample.axf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
4

2 回答 2

1

使用 ARM Compiler 6 构建 Linux 应用程序需要 GCC:原因是 ARM Compiler 6 不包含 Linux 库,因此需要使用 GCC 的 glibc。

这是链接: https ://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/building-an-armv8-linux-hello-world-with-arm -编译器-6

于 2020-05-14T06:58:56.903 回答
0

我认为没有必要libpath在你的情况下指定。Arm 的 C 库默认带有 Arm 编译器。

于 2020-05-09T20:08:30.250 回答