feat(bna): add 'as' subcommand to add symbols
Some checks failed
Push / build (push) Has been cancelled

This commit is contained in:
phaneron 2026-03-01 14:56:55 -05:00
parent b62710fe15
commit 362bf7f31b
8 changed files with 300 additions and 3 deletions

View file

@ -100,6 +100,16 @@ func (table *Table) LoadFile(name string, file io.Reader) (err error) {
return
}
func (table *Table) Lookup(address uint64) (entry *TableEntry, err error) {
var ok bool
entry, ok = table.entries[address]
if !ok {
err = fmt.Errorf("%w: %08X", ErrSymbolNotFound, address)
return
}
return
}
func (table *Table) Insert(entry *TableEntry) (err error) {
conflicting_symbol, ok := table.entries[entry.Symbol.StartAddress]
if ok {