Merge reloc_func and reloc_globalsym into reloc_external.
This commit is contained in:
@@ -75,12 +75,13 @@ impl binemit::CodeSink for TextSink {
|
||||
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], ebb).unwrap();
|
||||
}
|
||||
|
||||
fn reloc_func(&mut self, reloc: binemit::Reloc, fref: ir::FuncRef) {
|
||||
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], fref).unwrap();
|
||||
}
|
||||
|
||||
fn reloc_globalsym(&mut self, reloc: binemit::Reloc, global: ir::GlobalVar) {
|
||||
write!(self.text, "{}({}) ", self.rnames[reloc.0 as usize], global).unwrap();
|
||||
fn reloc_external(&mut self, reloc: binemit::Reloc, name: &ir::ExternalName) {
|
||||
write!(
|
||||
self.text,
|
||||
"{}({}) ",
|
||||
self.rnames[reloc.0 as usize],
|
||||
name,
|
||||
).unwrap();
|
||||
}
|
||||
|
||||
fn reloc_jt(&mut self, reloc: binemit::Reloc, jt: ir::JumpTable) {
|
||||
|
||||
@@ -98,7 +98,6 @@ impl binemit::CodeSink for SizeSink {
|
||||
}
|
||||
|
||||
fn reloc_ebb(&mut self, _reloc: binemit::Reloc, _ebb: ir::Ebb) {}
|
||||
fn reloc_func(&mut self, _reloc: binemit::Reloc, _fref: ir::FuncRef) {}
|
||||
fn reloc_globalsym(&mut self, _reloc: binemit::Reloc, _global: ir::GlobalVar) {}
|
||||
fn reloc_external(&mut self, _reloc: binemit::Reloc, _name: &ir::ExternalName) {}
|
||||
fn reloc_jt(&mut self, _reloc: binemit::Reloc, _jt: ir::JumpTable) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user