Skip to content

Commit

Permalink
Section end, section start mismatch bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
WINSDK committed Apr 19, 2024
1 parent e910701 commit cdeb899
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions processor/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ impl Block {
stream.push("section ended", colors::WHITE);
stream.push_owned(format!(" {} ", section.name), CONFIG.colors.asm.section);
stream.push("{", CONFIG.colors.brackets);
stream.push_owned(format!("{:?}", section.kind), CONFIG.colors.asm.component);
if section.ident == "UNKNOWN" {
stream.push_owned(format!("{:?}", section.kind), CONFIG.colors.asm.component);
} else {
stream.push(section.ident, CONFIG.colors.asm.component);
}
stream.push("} ", CONFIG.colors.brackets);
stream.push_owned(format!("{:x}", section.start), colors::GREEN);
stream.push("-", CONFIG.colors.delimiter);
Expand Down Expand Up @@ -189,7 +193,11 @@ impl Processor {
/// might conflict with a label.
fn get_symbol_by_addr(&self, addr: usize, section: &Section) -> Option<Arc<Symbol>> {
if addr == section.start {
return None;
if let Some(symbol) = self.index.get_sym_by_addr(addr) {
if symbol.as_str() == section.name {
return None;
}
}
}

self.index.get_sym_by_addr(addr)
Expand Down

0 comments on commit cdeb899

Please sign in to comment.