glibc: elf file OS ABI invalid
It's not your kernel version that's the problem.
The loader on your system does not support the new Linux
ABI. Until relatively recently, Linux ELF binaries used the System V
ABI. Recently, in support of STT_GNU_IFUNC, the Linux
ABI was added. You would have to update your system C library to have a loader that support STT_GNU_IFUNC, and then it will also recognize ELF objects with the Linux
ABI type.
See Dave Miller's blog entry on STT_GNU_IFUNC for Sparc (archived) to gain an understanding of what STT_GNU_IFUNC does, if you care.
How do I compile on linux to share with all distributions?
The statement: "ELF file OS ABI invalid", means that the Application Binary Interface is non compatible between binaries used (i.e. one is trying to mix host and target binaries, which may not work as expected). The e_ident[EI_OSABI]
byte of the ELF header contains the operating system/ABI identification. Your Fedora system is setting this to ELFOSABI_LINUX
(3
) while your friend's CentOS system is setting it to ELFOSABI_SYSV
(ELFOSABI_NONE
or 0
).
You may be able to compile the FreeBSD brandelf utility (brandelf.c) and use it to set the OSABI to ELFOSABI_SYSV
(brandelf -f 0 <file>
or brandelf -t SVR4 <file>
.
I am not aware of any gcc flags for specifying this value at compile/link time. I believe that the version of binutils used by gcc on your Fedora system is responsible for setting the OSABI to Linux. It is my understanding that the linker only specifies the ABI if a STT_GNU_IFUNC
symbol ends up in the output file (see ifunc.txt at http://groups.google.com/group/generic-abi for details on STT_GNU_IFUNC
).
The readelf(1) command can be used to retrieve and display the ABI information stored in the ELF header (readelf -h <file>
).
This similar question may also be of interest.
Installing Tensorflow on centos 5
I have same problem.
But I used CentOS 6.5 and my GLIBC(GNU libc) version is 2.12.
I tried to changed my GLIBC version manually by removing version 2.12 and installing 2.17.
It occured many problems for it's dependencies and cannot import TensorFlow.
So, I used CentOS 7.0 and it has default GLIBC version 2.17.
I can install and run TensorFlow using CentOS 7.0 without any problem.
Thank you.
ELF entry point is not valid
Any idea what could be the issue?
This:
Type: DYN (Shared object file)
means that you are looking at a position-independent executable (a special form of a shared library). Such executables are relocated to a random address before they start running, so setting breakpoint on unrelocated address 0x650
will not work.
What works:
(gdb) set stop-on-solib-events 1
(gdb) run
(gdb) info proc map
# Figure out where the executable got loaded
(gdb) b *($exe_load_address + 0x650)
Example:
$ readelf -h a.out | grep 'Entry point'
Entry point address: 0x620
$ gdb -q ./a.out
(gdb) set stop-on-solib-events 1
(gdb) run
Starting program: /tmp/a.out
Stopped due to shared library event (no libraries added or removed)
(gdb) info proc map
process 67394
Mapped address spaces:
Start Addr End Addr Size Offset objfile
0x555555554000 0x555555555000 0x1000 0x0 /tmp/a.out
0x555555754000 0x555555756000 0x2000 0x0 /tmp/a.out
0x7ffff7dda000 0x7ffff7dfd000 0x23000 0x0 /lib/x86_64-linux-gnu/ld-2.19.so
...
(gdb) b *(0x555555554000+0x620)
Breakpoint 1 at 0x555555554620
(gdb) c
Continuing.
Stopped due to shared library event:
Inferior loaded /lib/x86_64-linux-gnu/libc.so.6
(gdb) c
Continuing.
Breakpoint 1, 0x0000555555554620 in _start ()
(gdb) bt
#0 0x0000555555554620 in _start ()
Related Topics
Where Is Hardware Timer Interrupt
Merge PDF Files with Numerical Sort
How to Emulate the Raspberry Pi 2 on Qemu
Awk One Liner Select Only Rows Based on Value of a Column
Not Authorized for Query on Admin.System.Namespaces on Mongodb
@Reboot Is Not Working in Cron
How to Get Started Writing a Compositing Wm
How to Find or Calculate a Linux Process's Page Table Size and Other Kernel Accounting
How to Setup Oracle Odbc Drivers on Rhel 6/Linux
The Return Code from 'Grep' Is Not as Expected on Linux
Error: Ld.So: Object Ld_Preload Cannot Be Preloaded: Ignored
Difference Between Patch and Diff Files
Bash Script Read All the Files in Directory
Why Does C99 Complain About Storage Sizes