Chromium Code Reviews| Index: pkg/kernel/binary.md |
| diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md |
| index e1f84096a368e30da0969095c281f1ad2c439a3d..dd899709ec0b69558b4c1ef665ef3a2ebeeb75d9 100644 |
| --- a/pkg/kernel/binary.md |
| +++ b/pkg/kernel/binary.md |
| @@ -40,7 +40,7 @@ type UInt30 extends UInt { |
| Byte byte4(xxxxxxxx); // least significant byte |
| } |
| -type MagicWord = big endian 32-bit unsigned integer |
| +type UInt32 = big endian 32-bit unsigned integer |
| type List<T> { |
| UInt length; |
| @@ -115,12 +115,26 @@ type CanonicalName { |
| } |
| type ProgramFile { |
| - MagicWord magic = 0x90ABCDEF; |
| + UInt32 magic = 0x90ABCDEF; |
| StringTable strings; |
| UriSource sourceMap; |
| List<CanonicalName> canonicalNames; |
| List<Library> libraries; |
| ProcedureReference mainMethod; |
| + TableOfContent toc; |
| +} |
| + |
| +// End-of-program table of content with all fixed-size-32-bit integers. |
| +// This gives "semi-random-access" to certain parts of the binary. |
| +// By reading the last 4 bytes one knows the number of libaries, |
| +// which allows to skip to any other field in this table of content, |
| +// which again allows to skip to what it points to. |
| +type TableOfContent { |
| + UInt32 binaryOffsetForSourceTable; |
| + UInt32 binaryOffsetForCanonicalNames; |
| + UInt32 mainMethodReference; // This is a ProcedureReference with a fixed-size integer. |
|
Kevin Millikin (Google)
2017/06/29 12:27:36
Is there any reason to have two different indicato
jensj
2017/06/30 05:51:16
None other than I didn't want to change the existi
|
| + UInt32[libraryCount] libraryOffsets; |
| + UInt32 libraryCount; |
| } |
| type LibraryReference { |