Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Commit a0aa813

Browse files
committed
roll back the last of lucetc eh_frame emission changes. this should all be upstream
1 parent 6ddb7a3 commit a0aa813

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

lucetc/src/compiler.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,16 @@ use crate::traps::{translate_trapcode, trap_sym_for_func};
1414
use byteorder::{LittleEndian, WriteBytesExt};
1515
use cranelift_codegen::{
1616
binemit, ir,
17-
isa::unwind::UnwindInfo,
1817
isa::TargetIsa,
1918
settings::{self, Configurable},
2019
Context as ClifContext,
2120
};
2221
use cranelift_module::{
2322
Backend as ClifBackend, DataContext as ClifDataContext, DataId, FuncId, FuncOrDataId,
24-
Linkage as ClifLinkage, Module as ClifModule, ModuleError as ClifModuleError,
23+
Linkage as ClifLinkage, Module as ClifModule,
2524
};
2625
use cranelift_object::{ObjectBackend, ObjectBuilder};
2726
use cranelift_wasm::{translate_module, FuncTranslator, ModuleTranslationState, WasmError};
28-
use gimli::write::{Address, EhFrame, Writer};
2927
use lucet_module::bindings::Bindings;
3028
use lucet_module::{
3129
ModuleData, ModuleFeatures, SerializedModule, VersionInfo, LUCET_MODULE_SYM, MODULE_DATA_SYM,
@@ -273,23 +271,9 @@ impl<'a> Compiler<'a> {
273271
let mut func_translator = FuncTranslator::new();
274272
let mut function_manifest_ctx = ClifDataContext::new();
275273
let mut function_manifest_bytes = Cursor::new(Vec::new());
276-
// let mut eh_frame_table_bytes: Cursor<Vec<u8>> = Cursor::new(Vec::new());
277274
let mut function_map: HashMap<FuncId, (u32, DataId, usize)> = HashMap::new();
278275

279-
let mut frame_table = gimli::write::FrameTable::default();
280-
281-
let isa = Self::target_isa(
282-
self.target.clone(),
283-
self.opt_level,
284-
&self.cpu_features,
285-
self.canonicalize_nans,
286-
)?;
287-
let cie_id = frame_table.add_cie(match isa.create_systemv_cie() {
288-
Some(cie) => cie,
289-
None => panic!("uh oh"),
290-
});
291-
292-
for (idx, (ref func, (code, code_offset))) in self.decls.function_bodies().enumerate() {
276+
for (ref func, (code, code_offset)) in self.decls.function_bodies() {
293277
let mut func_info = FuncInfo::new(&self.decls, self.count_instructions);
294278
let mut clif_context = ClifContext::new();
295279
clif_context.func.name = func.name.as_externalname();

0 commit comments

Comments
 (0)