So we have seen Elf file format is used for shared libraries, executables and the object files.
We'll see an example of a code file.
So this is a code file.
Uh this if you run this thing it will generate a code dump because you're calling about.
I don't see my cotum file.
Uh, if you want the cotum file, you need to make some changes.
Okay.
If you want the code file to be present in your current folder location, you need to change the ulimit
value.
First check the what is the value of your.
You limit your limit hyphen a the current core file size is zero, so I'll change it.
Your limit hyphen C to unlimited okay, now I can verify it is unlimited.
Now if I run this again, it will still not generate me cotum file because the location where the code
dump is generated is different.
I can verify where it is present using cat.
So it is trying to give this core dump to this particular binary, which is not we want we want the
core dump to be present here.
I can change the value, I can say generate here by running this command.
I'm echoing the value of core here.
And it needs some password because I am updating the sysfs proc fs.
Now I can verify my this one and the value is updated.
Now I'll run my application and it has core dump and the core file is present.
Now I can check what is the file format.
It is a 64 bit LSB core file.
And I can also verify using Readelf hyphen h core.
And it is saying type of this file is core file and this is 64 bit.
All are same but it does not have any section headers.
It has program headers because we are not linking anything here.
It is generated when we execute the program.
So it has program headers but no section headers.