Esempio n. 1
0
        private void WriteSections()
        {
            var sections = ObjectFile.Sections;

            if (sections.Count == 0)
            {
                return;
            }

            sections = ObjectFile.GetSectionsOrderedByStreamIndex();

            // We write the content all sections including shadows
            for (var i = 0; i < sections.Count; i++)
            {
                var section = sections[i];

                // Write only section with content
                if (section.HasContent)
                {
                    Stream.Position = (long)(_startOfFile + section.Offset);
                    section.WriteInternal(this);
                }
            }

            // Write section header table
            WriteSectionHeaderTable();
        }