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的更多相关文章

  1. “undefined JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析

    如果编译时,报如下所示错误:../../third-party/hadoop/lib/libhdfs.a(jni_helper.c.o): In function `getGlobalJNIEnv': ...

  2. “undefined reference to JNI_GetCreatedJavaVM”和“File format not recognized”错误原因分析

    "undefined reference to JNI_GetCreatedJavaVM"和"File format not recognized"错误原因分析 ...

  3. 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 ...

  4. 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 ...

  5. The Portable Executable File Format from Top to Bottom(每个结构体都非常清楚)

    The Portable Executable File Format from Top to Bottom Randy KathMicrosoft Developer Network Technol ...

  6. Java class file format specfication

    Java class file format spec Link: https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html Her ...

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

  8. 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 ...

  9. 配置tomcat连接器后,启动服务报错“No Certificate file specified or invalid file format"异常

    1:原来的配置是 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true&quo ...

随机推荐

  1. 有关css伪类visited样式无效的解决方法

    错误写法 将visited写在hover和active之后,例如: .ui-page-theme-a .digilinx-ui-btn{background:#00a325;border-color: ...

  2. uexQQ插件学习心得

    uexQQ插件学习心得 uexQQ插件的作用:通过qq可以分享图文,音乐,应用到相应的qq空间.支持手机客户端分享和手机webQQ分享.下面我们就来看一看他的一些方法. 我们先说一下分享的步骤,这个步 ...

  3. Linux驱动程序学习【转】

    本文转载自: 一直在学习驱动,对于下面这篇文章,本人觉得简洁明了,基本符合我们学习驱动的进度与过程,现转发到自己的博客,希望能与更多的朋友分享. 了解Linux驱动程序技巧学习的方法很重要,学习lin ...

  4. Css、javascript、dom(一)

    一:Css 1.1:position定义和用法 position 属性规定元素的定位类型. 可能的值 值 描述 absolute 生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定 ...

  5. jquery常用插件及用法总结

    http://www.jb51.net/Special/200.htm

  6. java static静态方法的并发性

    在做一个web项目的时候需要做一个通用类去处理一些问题,想到这个类很多地方都有用到,又不想每次都new一个,因此就定义了里面的方法是静态方法,然后又因为多个静态方法都用到了同一个对象,结果定义了一个类 ...

  7. java.sql.SQLException: 关闭的 Resultset: next

    根据异常信息判断是数据库查询出来的结果集被关闭了,所以就了next 我的代码是一个Impl方法(假设为A方法)中调用另一个Impl方法(假设为B方法),我在执行完B方法后,调用了一下关闭数据库连接的方 ...

  8. Computed read-only property vs function in Swift

    In the Introduction to Swift WWDC session, a read-only property description is demonstrated: class V ...

  9. 2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror) in codeforces(codeforces730)

    A.Toda 2 思路:可以有二分来得到最后的数值,然后每次排序去掉最大的两个,或者3个(奇数时). /************************************************ ...

  10. Android 蓝牙

    添加权限: <uses-permission Android:name="android.permission.BLUETOOTH_ADMIN"/> <uses- ...