As part of trying to write a compiler completely from scratch, I\'m currently working on the part the handles ELF files.
After skimming through several articles and
I still don't quite understand where section to segment mappings are stored.
They are not stored anywhere.
Rather, readelf computes the mapping by looking at file offset and size of sections and segments.
readelf