Extra assertions and fix for Faerie.

This commit is contained in:
Carlo Kok
2020-06-08 07:22:36 +02:00
parent 6b47079884
commit 4ff01aa898
2 changed files with 4 additions and 0 deletions

View File

@@ -284,6 +284,7 @@ impl Backend for ObjectBackend {
};
self.object.section_id(section_kind)
} else {
assert!(!tls, "Tls data cannot be in named section");
let (seg, sec) = &datasection.as_ref().unwrap();
self.object.add_section(seg.clone().into_bytes(), sec.clone().into_bytes(),
if writable { SectionKind::Data } else { SectionKind::ReadOnlyData }