mirror of
https://github.com/thunderbrewhq/binana.git
synced 2026-03-22 22:00:13 +00:00
feat(bna): add 'as' subcommand to add symbols
Some checks failed
Push / build (push) Has been cancelled
Some checks failed
Push / build (push) Has been cancelled
This commit is contained in:
parent
b62710fe15
commit
362bf7f31b
8 changed files with 300 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue