could not read symbols: File format not recognized
arm-linux-gnueabi-readelf工具解决问题
编译一个32位平台的内核时,出现如下错误提示:
libschw.a: could not read symbols: File format not recognized
于是进入相应的目录发现,libschw.a这个文件是存在的,但是为啥编译不过呢,同样的编译在另外一个64位平台却没有这个报错。
思路:是否与32位64位平台有关?
使用readelf来查看一下这个库,
$ arm-linux-gnueabi-readelf -h modules/aw_schw/libschw
File: modules/aw_schw/libschw(aw_schw_lib.o)
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: <unknown>: 0xb7
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 161192 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 29
Section header string table index: 24
果然,这个库显示是64位的,为了兼容32位的,只能修改Makefile,判断到32位时,使用32位的库。
+ifeq ($(LICHEE_ARCH),arm64)
cp libschw libschw.a
+else
+ cp libschw32 libschw.a
+endif
重新弄一份新32位的libschw32库后,重新编译,问题解决。
could not read symbols: File format not recognized的更多相关文章
- “undefined JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析
如果编译时,报如下所示错误:../../third-party/hadoop/lib/libhdfs.a(jni_helper.c.o): In function `getGlobalJNIEnv': ...
- “undefined reference to JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析
"undefined reference to JNI_GetCreatedJavaVM"和"File format not recognized"错误原因分析 ...
- GCC 源码编译 mpc mprf gmp 不用make(否则会有lib/libgmp.so: could not read symbols: File in wrong format等错误)
错误信息: lib/libgmp.so: could not read symbols: File in wrong formatcollect2: error: ld returned 1 exit ...
- JVM Specification 9th Edition (4) Chapter 4. The class File Format
Chapter 4. The class File Format Table of Contents 4.1. The ClassFile Structure 4.2. Names 4.2.1. Bi ...
- The Portable Executable File Format from Top to Bottom(每个结构体都非常清楚)
The Portable Executable File Format from Top to Bottom Randy KathMicrosoft Developer Network Technol ...
- Java class file format specfication
Java class file format spec Link: https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html Her ...
- Does the OpenSceneGraph have a native file format?
From OpenSceneGraph-3.0 onwards we have new native file formats based on generic serializers that ar ...
- VMWare File Format Learning && Use VHD File To Boot VMWare && CoreOS Docker Configuration And Running
目录 . Virtual Machine Introduce . Vmware Image File Format . VHD File Format . Convert VHD File Into ...
- 配置tomcat连接器后,启动服务报错“No Certificate file specified or invalid file format"异常
1:原来的配置是 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true&quo ...
随机推荐
- R 操作矩阵和计算SVD的基本操作记录
在R中可以用函数matrix()来创建一个矩阵,应用该函数时需要输入必要的参数值. > args(matrix) function (data = NA, nrow = 1, ncol = 1, ...
- HTML5&CSS3练习笔记(二)
HTML5&CSS3 练习CSS3伪选择器使用 1.first-line 格式:元素:first-line 说明:设置同一个标签下所有行内容的第一行的样式,例如: <table st ...
- 使用C#反射中的MakeGenericType函数,来为泛型方法和泛型类指定(泛型的)类型
C#反射中的MakeGenericType函数可以用来指定泛型方法和泛型类的具体类型,方法如下面代码所示这里就不多讲了,详情看下面代码一切就清楚了: using System; using Syste ...
- Angular初学
简介: angularjs是基本js开发的一个前端类库,主要致力于减轻开发人员在开发Ajax应用过程中的痛苦,适合来做单应用. 客户端模板: Angualr中,模板和数据都会被发送到浏览器中,然后在客 ...
- VS2015解决非Unicode编码包含中文字段无法编译的问题
用VS2015打开并编译,定位到编译错误的文件(.cs而不是可视化编辑视图) 文件--高级保存选项--编码 改为 Unicode-代码页1200 这样不论用VS2015/2013/2012/2010 ...
- 使用javascript获取服务器时间
思路:采用异步请求的方式,发送请求,获取HTTP请求的response头,头部中包含时间,使用getResponseHeader('Date')即可. 注意:以下任何一种方法都不精确,因为请求包的传输 ...
- JavaScript笔记 Function
在JavaScript中方法由两部分组成: 方法名和方法体. JavaScript中的方法跟其他传统面向对象语言不同,它跟普通的变量没有区别,唯一不同点是它是Function对象,因此它会有一些Fun ...
- java socket 多线程通讯 使用mina作为服务端
客户端代码不变,参照 http://www.cnblogs.com/Westfalen/p/6251473.html 服务端代码如下: import java.io.IOException; impo ...
- Java中货币格式化
private final static NumberFormat CURRENCY_FORMAT = NumberFormat.getCurrencyInstance(Locale.CHINA); ...
- Upload Images
ASP.NET图片批量上传,可预览带进度条 http://www.okbase.net/file/item/5492