主题 : ELF file version does not match 复制链接 | 浏览器收藏 | 打印
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
楼主  发表于: 2010-06-08 11:53

 ELF file version does not match

昨天编译好的QT4,因zonetime位置不好,今天重新编译一遍。但奇迹发生了,运行QPE无法运行,提示“/opt/Qtopia/bin/qpe: error while loading shared libraries: /lib/libm.so.6: ELF file version does not match current one”。在网搜了一下,有的是说环境乱了,有的说体系结构不合适。这究竟是什么问题,望大大们指点


开发环境:Fedora 9
编译器:3.4.4
             QT-4.2.4




还有一些问题请大大指教,怎么了解相关工具是否支持EABI和OABI,或者有相关查询命令。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-06-08 12:27
为了确定编译出来的qpe的ELF属性,可以用下面的命令:

$/path/to/arm-linux-readelf -h /path/to/your/generated/qpe

为了判断工具链是EABI还是OABI的,可以用工具链里的gcc编译任意一个C档,然后用上面的命令查看对应的执行档ELF属性,在Flags栏位里有相应的描述,比如:
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x9d70
  Start of program headers:          52 (bytes into file)
  Start of section headers:          248492 (bytes into file)
  Flags:                             0x5000002, has entry point, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         6
  Size of section headers:           40 (bytes)
  Number of section headers:         23
  Section header string table index: 22
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
2楼  发表于: 2010-06-08 13:58
都是GNU EABI,ELF32啊,无奈,找不到答案了

[root@tan-3 bin]# /usr/local/arm/3.4.4/bin/arm-linux-readelf -h qpe
ELF 头:
  Magic:  7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            ARM
  ABI Version:                       0
  Type:                              EXEC (可执行文件)
  Machine:                           ARM
  Version:                           0x1
  入口点地址:              0x27ae8
  程序头起点:              52 (bytes into file)
  Start of section headers:          1522908 (bytes into file)
  标志:             0x2, has entry point, GNU EABI
  本头的大小:       52 (字节)
  程序头大小:       32 (字节)
  程序头数量:       6
  节头大小:         40 (字节)
  节头数量:         26
  字符串表索引节头: 25
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2010-06-08 14:13

 回 2楼(steve710431) 的帖子

至少你也看一眼libm.so.6的属性吧
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
4楼  发表于: 2010-06-08 14:18
看了,一样的
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
5楼  发表于: 2010-06-08 14:19
[root@tan-3 lib]# /usr/local/arm/3.4.4/bin/arm-linux-readelf -h libm.so.6
ELF 头:
  Magic:  7f 45 4c 46 01 01 01 61 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            ARM
  ABI Version:                       0
  Type:                              DYN (共享目标文件)
  Machine:                           ARM
  Version:                           0x1
  入口点地址:              0x42f8
  程序头起点:              52 (bytes into file)
  Start of section headers:          474896 (bytes into file)
  标志:             0x2, has entry point, GNU EABI
  本头的大小:       52 (字节)
  程序头大小:       32 (字节)
  程序头数量:       7
  节头大小:         40 (字节)
  节头数量:         28
  字符串表索引节头: 27
吸血姜丝
级别: 新手上路
UID: 13029
精华: 0
发帖: 39
金钱: 195 两
威望: 39 点
综合积分: 78 分
注册时间: 2010-01-17
最后登录: 2010-11-19
6楼  发表于: 2010-06-08 14:53
   现在换了干净的文件系统,Qtopia就跑了出来了。。。。。
难道是环境问题吗?可我上两次改动,就换了QT的文件夹啊。。。。真是无厘头
级别: 新手上路
UID: 47770
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2011-05-25
最后登录: 2011-06-06
7楼  发表于: 2011-05-26 22:04