docs(dwarfs-format): update section index description (gh #264)

This commit is contained in:
Marcus Holland-Moritz 2025-05-18 13:05:47 +02:00 committed by mhx
parent abe06c6f5a
commit 15b5706a90

View File

@ -120,12 +120,14 @@ Currently, the following different section types are defined:
offset relative to the first section. That is, the section index offset relative to the first section. That is, the section index
is independent of whether or not a header is present before the is independent of whether or not a header is present before the
first section. The whole point of the section index is to avoid first section. The whole point of the section index is to avoid
having to build an index by visiting all section headers. having to build an index by visiting all section headers. Since
In order to find the start of the section index, you only have the offsets in the index are sorted, the section index is *always*
to read the last 64-bit value from the file, check if the upper stored uncompressed, and the section infex *must* be the last
16 bits match the `SECTION_INDEX`, then add the image offset section, you can find the start of the section index by reading
(header size) to the lower 48 bits. At that position in the the last 64-bit value from the image file, checking if the upper
file, you should find a valid section header for the section 16 bits match the `SECTION_INDEX` type, and then add the image
offset (header size) to the lower 48 bits. At that position in
the file, you should find a valid section header for the section
index. index.
- `HISTORY` (10): - `HISTORY` (10):