Mercurial > hg > index.cgi
annotate lwbasic/symtab.h @ 258:ebda5c96665e
Improved stack handling for os9 target in lwlink
Added "stack" as a valid symbol in the __os9 section. All instances of __os9
are now polled for "stack" symobls and the values added to the stack size
set in the linker script. The stack size is then added to the final data
size of the module. Also set a default minimum stack size of 32 bytes.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 31 Jan 2013 19:34:54 -0700 |
parents | 49d608aecc4d |
children |
rev | line source |
---|---|
29 | 1 /* |
2 symtab.h | |
3 | |
4 Copyright © 2011 William Astle | |
5 | |
6 This file is part of LWTOOLS. | |
7 | |
8 LWTOOLS is free software: you can redistribute it and/or modify it under the | |
9 terms of the GNU General Public License as published by the Free Software | |
10 Foundation, either version 3 of the License, or (at your option) any later | |
11 version. | |
12 | |
13 This program is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
16 more details. | |
17 | |
18 You should have received a copy of the GNU General Public License along with | |
19 this program. If not, see <http://www.gnu.org/licenses/>. | |
20 */ | |
21 | |
22 /* | |
23 Symbol table handling | |
24 */ | |
25 | |
26 #ifndef __symtab_h_seen__ | |
27 #define __symtab_h_seen__ | |
28 | |
29 #ifndef __symtab_c_seen__ | |
30 #define __E extern | |
31 #else | |
32 #define __E | |
33 #endif | |
34 | |
35 /* | |
36 the meaning of "addr" and "symtype" is defined by the particular context | |
37 in which the symbol table is used | |
38 */ | |
39 typedef struct symtab_entry_s symtab_entry_t; | |
40 struct symtab_entry_s | |
41 { | |
42 char *name; /* name of the symbol */ | |
43 int addr; /* address of symbol */ | |
44 int symtype; /* type of symbol */ | |
32
49d608aecc4d
Framework for handling local stack frame and/or variables
lost@l-w.ca
parents:
29
diff
changeset
|
45 void *privdata; /* random data associated with symbol */ |
29 | 46 symtab_entry_t *next; /* next in the list */ |
47 }; | |
48 | |
49 typedef struct symtab_s | |
50 { | |
51 symtab_entry_t *head; | |
52 } symtab_t; | |
53 | |
54 __E symtab_t *symtab_init(void); | |
55 __E void symtab_destroy(symtab_t *st); | |
56 __E symtab_entry_t *symtab_find(symtab_t *st, char *name); | |
32
49d608aecc4d
Framework for handling local stack frame and/or variables
lost@l-w.ca
parents:
29
diff
changeset
|
57 __E void symtab_register(symtab_t *st, char *name, int addr, int symtype, void *data); |
29 | 58 |
59 #undef __E | |
60 | |
61 #endif /* __symtab_h_seen__ */ |