]>
Commit | Line | Data |
---|---|---|
c074abee | 1 | /* ldsym.h - |
c074abee DHW |
2 | Copyright (C) 1991 Free Software Foundation, Inc. |
3 | ||
4 | This file is part of GLD, the Gnu Linker. | |
5 | ||
2d1a2445 PB |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
c074abee | 10 | |
2d1a2445 PB |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
c074abee | 15 | |
2d1a2445 PB |
16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
c074abee DHW |
19 | |
20 | typedef struct user_symbol_struct | |
21 | { | |
22 | /* Point to next symbol in this hash chain */ | |
23 | struct user_symbol_struct *link; | |
24 | ||
25 | /* Name of this symbol. */ | |
99fe4553 | 26 | CONST char *name; |
c074abee DHW |
27 | |
28 | /* Pointer to next symbol in order of symbol creation */ | |
29 | struct user_symbol_struct *next; | |
30 | ||
31 | /* Chain of asymbols we see from input files | |
32 | note that we point to the entry in the canonical table of | |
33 | the pointer to the asymbol, *not* the asymbol. This means | |
34 | that we can run back and fix all refs to point to the | |
35 | defs nearly for free. | |
36 | */ | |
37 | asymbol **srefs_chain; | |
38 | asymbol **sdefs_chain; | |
39 | ||
40 | /* only ever point to the largest ever common definition - | |
41 | * all the rest are turned into refs | |
42 | * scoms and sdefs are never != NULL at same time | |
43 | */ | |
44 | asymbol **scoms_chain; | |
45 | ||
81016051 SC |
46 | |
47 | ||
48 | ||
49 | ||
50 | /* If this symbol is a constructor */ | |
51 | #define SYM_CONSTRUCTOR 1 | |
52 | /* If this symbol is a warning symbol */ | |
53 | #define SYM_WARNING 2 | |
54 | /* IF this is an alias for another symbol */ | |
55 | #define SYM_INDIRECT 4 | |
f3b36ecb KR |
56 | /* If this symbol explicitly should be kept, despite discarding |
57 | most others. */ | |
58 | #define SYM_KEEP 8 | |
85e38cfa SC |
59 | /* If its got -y set */ |
60 | #define SYM_Y 16 | |
81016051 | 61 | int flags; |
c074abee DHW |
62 | } ldsym_type; |
63 | ||
f3b36ecb KR |
64 | extern CONST char *keepsyms_file; |
65 | extern int kept_syms; | |
c074abee | 66 | |
e20873a7 JG |
67 | ldsym_type *ldsym_get PARAMS ((CONST char *)); |
68 | ldsym_type *ldsym_get_soft PARAMS ((CONST char *)); | |
69 | void ldsym_print_symbol_table PARAMS ((void)); | |
70 | void ldsym_write PARAMS ((void)); | |
71 | boolean ldsym_undefined PARAMS ((CONST char *)); | |
72 | ||
c074abee DHW |
73 | #define FOR_EACH_LDSYM(x) \ |
74 | extern ldsym_type *symbol_head; \ | |
75 | ldsym_type *x; \ | |
76 | for (x = symbol_head; x != (ldsym_type *)NULL; x = x->next) | |
77 | ||
e20873a7 | 78 | void ldsym_init PARAMS ((void)); |