I want to retrieve the executable from a core dump and the output of any linux package used to get this information should contain execfn
in it's output.
Here are the following things which I have tried so far :
$ file kms
kms: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/test', real uid: 1000440000, effective uid: 1000440000, real gid: 0, effective gid: 0, execfn: '/test', platform: 'x86_64'
The file
command only works for specific cores and it's not a generic solution because some core dump gives following output.
$ file ss
ss: ELF 64-bit LSB core file x86-64, version 1 (SYSV), too many program header sections (6841)
gdb
command doesn't work for all core dumps in the same manner. The output using gdb command is inconsistent. The output received by gdb command for some core dump is not the same as strings
command.
$gdb kms
Core was generated by `/test'.
I even tried strings
package and I think it gives proper output but the format doesn't contain execfn
for it to be used in my solution
$ strings kms | grep ^/ | tail -1
/test
Can anyone please suggest any linux package which will help me in retrieving executable from core dump which contains execfn
in it's output.