| Meng Hu | ae7b91b | 2009-11-05 16:10:50 -0600 | [diff] [blame] | 1 | #ifndef SYMBOL_TABLE_H | 
| 2 | #define SYMBOL_TABLE_H | ||||
| 3 | |||||
| 4 | struct symbol { | ||||
| 5 | unsigned int addr; | ||||
| 6 | unsigned int size; | ||||
| 7 | char *name; | ||||
| 8 | }; | ||||
| 9 | |||||
| 10 | struct symbol_table { | ||||
| 11 | struct symbol *symbols; | ||||
| 12 | int num_symbols; | ||||
| 13 | }; | ||||
| 14 | |||||
| 15 | struct symbol_table *symbol_table_create(const char *filename); | ||||
| 16 | void symbol_table_free(struct symbol_table *table); | ||||
| 17 | const struct symbol *symbol_table_lookup(struct symbol_table *table, unsigned int addr); | ||||
| 18 | |||||
| 19 | #endif | ||||