error while loading shared libraries: /usr/lib/a.so: ELF file OS ABI invalid
我使用的系统是[红帽企业Linux.5.5.for.x86_64.桌面版].[i.Studio]rhel-client-5.5-x86_64-dvd.iso,64位的,同样的程序在ubuntu 64位下面运行成功,但是在小红帽系统下编译可以成功,运行时提示error while loading shared libraries: /usr/lib/a.so: ELF file OS ABI invalid。查了下资料,觉得有可能是两个系统下的ABI不同,可能需要在出问题的系统上重新编译库a.so。不知道有没有人遇到过这样的问题并解决了的。
贴出下面的一些信息。
在出现问题的系统上其他库的ELF头信息:
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: DYN (Shared object file)
Machine: Intel 80386
Version: 0x1
Entry point address: 0xa609a0
Start of program headers: 52 (bytes into file)
Start of section headers: 246868 (bytes into file)
Flags: 0x0
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 5
Size of section headers: 40 (bytes)
Number of section headers: 29
Section header string table index: 28
下面的是出现问题的a.so的ELF头信息。
Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - Linux
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x2d10
Start of program headers: 64 (bytes into file)
Start of section headers: 108496 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 6
Size of section headers: 64 (bytes)
Number of section headers: 29
Section header string table index: 26
其中OS/ABI这项不同,不知道是否和这个相关。
求高手回复。