I
I
Ivan Gromov2016-06-06 14:54:58
linux
Ivan Gromov, 2016-06-06 14:54:58

How to calculate the size of an elf file?

Good afternoon.
There are a lot of glued files into one big one, among this set there are elf files. We know where they start, but we don't know where they end.
Question: how to calculate the size of an elf file knowing the title?
elf32 file format

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Chudnovsky, 2016-06-06
@Frankenstine

https://ru.wikipedia.org/wiki/Executable_and_Linka...
Take the book "Lunix ELF Executable File Format" by Alexander Fisun and study the header structure, knowing the structure, you can make a counting algorithm.

A
Anton Fedoryan, 2016-06-06
@AnnTHony

We know where they start, but we don't know where they end.

It is quite logical that they end where the next begins.
Look for the signature of the beginning of the elf file, and from this place iterate over looking for matches with the initial signatures of the rest of the files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question