Skip to content

Normalize relocations, addresses, and operands before semantic scoring #23

Description

@haasonsaas

Context

The semantic feature model is intended to survive recompilation, but address and operand normalization is implicit in mnemonic-family tokenization. Relocations, literal pools, compiler-generated constants, and register-allocation changes need an explicit, testable normalization contract.

Proposal

Add a canonical operand representation that separates opcode family, operand role, relocation/reference kind, and literal bucket. Exclude raw file/virtual addresses and make the normalization version part of the semantic extractor identity.

Acceptance criteria

  • Equivalent functions loaded at different image bases produce identical normalized features.
  • Relocations and literal addresses cannot dominate similarity scores.
  • Large constant tables and string references are represented by bounded categories.
  • Fixtures cover GCC, Clang, MSVC, stripped binaries, and different link layouts.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions