ELF executable

ELF executable

Post by The Administrat » Sun, 05 Jun 1994 18:11:48


I've installed the slackware distribution 1.2.0 which contains the Linux
kernel version 1.0.

I want to run a couple of ELF executables of which I don't have any sources
available (a commercial product).

Now I've recompiled the kernel with the binary format ELF setting tuned to yes
using the configuration script. So I suppose concerning the kernel everything
is okay...

When I try to run a ELF executable I got an error message like : program not
found or something similar.

If I installed some shared libraries from the elfabi package (from the SLS
distribution) I still couldn't get the ELF executable to run. Now it gives me
a Segmentation violation.

What did I do wrong ?

I searched through documentation on the cd-rom package (from info-magic) but
couldn't find any real documentation on HOW TO ELF ON LINUX ?

Please reply using e-mail because I'm currently at home and it's difficult to
go through all news articles. If I get any replies which give me a working
solution I will post a summary to the net...


Gerrit Cap                              

Medialaan 1                                     fax    : +32 2 253.12.21
B-1800 Vilvoorde Belgium                        voice  : +32 2 255.38.72
Gerrit Cap                              

Medialaan 1                                     fax    : +32 2 253.12.21
B-1800 Vilvoorde Belgium                        voice  : +32 2 255.38.72


1. Decoding an embedded linux ELF executable

Hi All,

I am working on a project in which I have to download an embedded
linux ELF image on an embedded target board (XScale IQ80310), using
our company's debugger (X).

The problem is that the ELF image was "built" using GNU tools on a
linux host.
Then the image is transfered on a Windows machine and downloaded with
a Windows-based debugger. But our debugger (X) is unable to decode it
its ELF decoder.

When I debug the download process in our (X) debugger, the ELF header
read from the file is


              [1]=69 'E'
              [2]=76 'L'
              [3]=70 'F'
       e_class     =1
       e_encoding  =1
       e_version   =1
              [0]= 97 'a'
              [1]= 0
              [2]= 0
              [3]= 0
              [4]= 0
              [5]= 0
              [6]= 0
              [7]= 0
              [8]= 0
e_type    2
e_machine 40
e_version     1
e_entry       226559557632
e_phoff       1003468
e_shoff       11259003365490740
e_flags       1048595
e_ehsize      1
e_phentsize   0
e_phnum       03768
e_shentsize   0
e_shnum       32768
e_shtmdx      49152

Given the filesize is 1194688 bytes, the entries in ELF header after
don't make sense to me. Anyone who is proficient in format of ELF
executable, please help me out over here!(Yes, this is an indirect
confession that I am not).

The interesting point is that I can download this executable on the
target  with RedHat GDB debugger installed on a Linux host. However,
when I tried to download it with the RedHat GDB debugger installed on
a Windows host, it returned the error message "Invalid Object format".

Both the GDB debuggers came in the same RedHat toolkit, same version.
Just one was intended for linux host, the other for Windows host.

Can anyone please guide me as to how I can get our (X) debugger to
decode this ELF format? What and why, if at all is the host OS making
a difference over here?

(BTW, I have been downloading ELF executables on this target with (X)
debugger, so I know our debugger works with all Windows based ELF
executables with GNU tools.)

Thanks in advance...



3. Why dynamically linked ELF executable larger than static ones

4. problems with make modules_install

5. a.out and ELF executable format specs

6. Routing Problem

7. Dokumentation on elf-executable format?

8. restoring proc file system

9. elf executable & stack allocation in virtual memory?

10. Q: Running NetBSD ELF executable?

11. a.out and ELF executable format specs

12. ELF executable header

13. COFF format, ELF format of an executable in linux