fkkaleem
asked on
Cannot Execute ELF 32-bit LSB Executable file
Hi gurus,
I would like to run a zipped file for example, (x2.gz). I had unzipped the file by using the command gunzip x2.gz and obtained x2. This file is not in an executable form. So I applied chmod i.e. chmod +x x2 and made it an executable but if I run this file I am getting "segmentation fault (core dumped)". How to run such a file??
Example :
$ file x2
x2 : ELF 32-bit LSB executable, Intel 80386, Version 1, dynamically linked(uses shared libs), stripped
$ chmod +x x2
$ ls -l x2
-rwxr-xr-x 1 John John 82288 Aug 26 16:20 x2
$ ./x2
Segmentation fault (core dumped)
Any help from gurus is appreciated!!!
Thanks & Regards
I would like to run a zipped file for example, (x2.gz). I had unzipped the file by using the command gunzip x2.gz and obtained x2. This file is not in an executable form. So I applied chmod i.e. chmod +x x2 and made it an executable but if I run this file I am getting "segmentation fault (core dumped)". How to run such a file??
Example :
$ file x2
x2 : ELF 32-bit LSB executable, Intel 80386, Version 1, dynamically linked(uses shared libs), stripped
$ chmod +x x2
$ ls -l x2
-rwxr-xr-x 1 John John 82288 Aug 26 16:20 x2
$ ./x2
Segmentation fault (core dumped)
Any help from gurus is appreciated!!!
Thanks & Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you have the source code for the executable or do you have only the executable ?
ASKER
Hi sunnycoder,
I only have an executable file.
I just tried to rename the file to x2.c and did the process as per your instructions. But when I exit from (gdb), it says the program is running , do you want exit (y/n)? when I pressed y, I exit from (gdb).
I'm not sure how this type of file can be executed!!
Any suggestion or advice is appreciated.
By the way, what is meant by an X Program? How to run an X Program??
Thanks & Regards,
I only have an executable file.
I just tried to rename the file to x2.c and did the process as per your instructions. But when I exit from (gdb), it says the program is running , do you want exit (y/n)? when I pressed y, I exit from (gdb).
I'm not sure how this type of file can be executed!!
Any suggestion or advice is appreciated.
By the way, what is meant by an X Program? How to run an X Program??
Thanks & Regards,
you are correctly running the program .... it is the executable which is faulty
renaming it to .c would not help
if you wish to run it, you will have to get its source code and debug the source code and then recompile it
as of now, the executable is a compiled incorrect program
renaming it to .c would not help
if you wish to run it, you will have to get its source code and debug the source code and then recompile it
as of now, the executable is a compiled incorrect program
I can give a certain answer to that, since I don't have the source code, but it seems that vfprintf is trying to access a FILE * stream that does not exist. Either it was never opened or it was closed before the call of vfprintf. Bad programming. Taugh luck. Maybe you should address to the programm's develloper.
ASKER
Hi Sunnycoder,
I accept your comments for the ELF 32-bit LSB Executable file too.
Regards,
I accept your comments for the ELF 32-bit LSB Executable file too.
Regards,
In that case, you should have used the point split feature ... it allows you to accept more than one answers
ASKER
Thanks for your kind info. Still can't run using the -g option on gcc. The following are the error messages I get.
(gdb) exec-file x2.c
(gdb) run x2
Starting program: /home/John/x2.c x2
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x4011df2a in _IO_vfprintf (s=0x0,
format=0x8058a20 "Error, %s (%d): %s (%s)\n", ap=0xbffff768)
at vfprintf.c:1024
1024 vfprintf.c: No such file or directory.
(gdb)
Hope this will help u guys to track the bug!!
Regards