解决交叉编译应用程序出现的错误“ld: cannot find crtend_so.o: No such file or directory”错误
来源:互联网 发布:昆明大成网络招聘骗局 编辑:程序博客网 时间:2024/05/17 21:51
版权声明:本文为博主(宽简厚重,Yuesichiu)原创文章,未经博主允许不得转载。
http://blog.csdn.net/yuesichiu/article/details/78353674交叉编译工具链:aarch64-linux-android-gcc
最近在编译安卓环境下的Linux应用程序(C代码),编译C代码应用工具时报错“ld: cannot find crtend_so.o: No such file or directory”。
找了一圈,不知道crtbegin_so.o/crtend_so.o是什么玩意。
查看了bionic/libc/arch-common/bionic/crtend_so.S和bionic/libc/arch-common/bionic/asm_multiarch.h这两个文件,应该是编译应该程序时指定符号链接正确的平台、相关的字节对齐,动态库open/close之类的。
bionic/libc/arch-common/bionic/asm_multiarch.h内容如下:
#ifdef __LP64__# define ASM_PTR_SIZE(x) .quad x# define ASM_ALIGN(x)#else# define ASM_PTR_SIZE(x) .long x# define ASM_ALIGN(x) .align x#endif
版权声明:本文为博主(宽简厚重,Yuesichiu)原创文章,未经博主允许不得转载。
http://blog.csdn.net/yuesichiu/article/details/78353674再看bionic/libc/arch-common/bionic/crtend_so.S文件:
#ifdef __LP64__# define ASM_PTR_SIZE(x) .quad x# define ASM_ALIGN(x)#else# define ASM_PTR_SIZE(x) .long x# define ASM_ALIGN(x) .align x#endif
版权声明:本文为博主(宽简厚重,Yuesichiu)原创文章,未经博主允许不得转载。
http://blog.csdn.net/yuesichiu/article/details/78353674再看bionic/libc/arch-common/bionic/crtbegin_so.c文件:
extern void __cxa_finalize(void *);extern void *__dso_handle;__attribute__((visibility("hidden"),destructor))void __on_dlclose() { __cxa_finalize(&__dso_handle);}#ifdef CRT_LEGACY_WORKAROUND# include "__dso_handle.h"#else# include "__dso_handle_so.h"# include "atexit.h"#endif#ifdef __i386__# include "../../arch-x86/bionic/__stack_chk_fail_local.h"#endif
解决方法如下:
在C源代码目录上,创建一个crtbegin_so.o和crtend_so.o文件的软连接即可。
#cd sourcecode_dir#ln -s /path/to/out/target/product/ap7350_65u_l1/obj/lib/crtbegin_so.o .#ln -s /path/to/out/target/product/ap7350_65u_l1/obj/lib/crtend_so.o .
版权声明:本文为博主(宽简厚重,Yuesichiu)原创文章,未经博主允许不得转载。
http://blog.csdn.net/yuesichiu/article/details/78353674阅读全文
0 0
- 解决交叉编译应用程序出现的错误“ld: cannot find crtend_so.o: No such file or directory”错误
- /usr/bin/ld: cannot find : No such file or directory解决
- 交叉编译时遇到的No Such File or directory的错误
- linux出现Cannot set LC_CTYPE to default locale: No such file or directory错误的解决办法
- MFC编译错误之cannot open file '.\Debug\xxxDlg.sbr': No such file or directory
- 解决错误 libmysqlclient.so.18: cannot open shared object file: No such file or directory
- cannot find crt1.o No such file or directory的一种解决方法
- 交叉编译链编译器的错误 error trying to exec 'cc1': execvp: No such file or directory
- 使用NDK 编译C/C++程序遇到 crtbegin_so.o: No such file or directory 等错误
- [Error] GL/gl.h: No such file or directory & /usr/bin/ld: cannot find -lGL [Solved]
- QT5出现QApplication: No such file or directory错误
- 触摸屏校准没反应,启动时出现No raw modules loaded.ts_config:No such file or directory错误的解决
- Linux中编译文件时提示:arm-elf-gcc: leds.o : No such file or directory 错误的解决办法
- arm-eabi-gcc: : No such file or directory编译错误
- Qt编译错误:"main.cpp: No such file or directory"
- arm-eabi-gcc: : No such file or directory编译错误
- android编译错误:No such file or directory
- C编译错误: No Such file or directory
- Android四大图片缓存(Imageloader,Picasso,Glide,Fresco)原理、特性对比
- MySQL详解----------数据类型
- 定时器
- lesson32 循环思想启蒙:输出小星星
- Android Design Support Library 的 代码实验——几行代码,让你的 APP 变得花俏
- 解决交叉编译应用程序出现的错误“ld: cannot find crtend_so.o: No such file or directory”错误
- PHP学习怎样快速入门?Php怎么快速学习?
- 润乾报表 特殊符号传参问题:the valid characters are defined in RFC 7230 and RFC 3968
- protobuf通过.proto文件生成JAVA类
- 嗯嗯,老了,写点东西防止忘记(1) 基于验证token防止csrf攻击
- Error:(17, 0) SDK location not found. Define location with sdk.dir in the local.properties file or w
- MySQL详解----------存储引擎
- 动态规划--LIS与LCS
- nomn 用法