We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04754aa commit 248e061Copy full SHA for 248e061
lib/runtime-core/src/module.rs
@@ -78,7 +78,7 @@ pub struct ModuleInfo {
78
pub em_symbol_map: Option<HashMap<u32, String>>,
79
80
/// Custom sections.
81
- pub custom_sections: HashMap<String, Vec<u8>>,
+ pub custom_sections: HashMap<String, Vec<Vec<u8>>>,
82
83
/// Flag controlling whether or not debug information for use in a debugger
84
/// will be generated.
@@ -102,7 +102,8 @@ impl ModuleInfo {
102
let bytes = reader.read_bytes(len)?;
103
let data = bytes.to_vec();
104
let name = name.to_string();
105
- self.custom_sections.insert(name, data);
+ let entry: &mut Vec<Vec<u8>> = self.custom_sections.entry(name).or_default();
106
+ entry.push(data);
107
}
108
109
Ok(())
0 commit comments