]>
Commit | Line | Data |
---|---|---|
252b5132 | 1 | /* ldctor.h - linker constructor support |
f96b4a7b NC |
2 | Copyright 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2002, 2003, |
3 | 2007 Free Software Foundation, Inc. | |
5cc18311 | 4 | |
f96b4a7b | 5 | This file is part of the GNU Binutils. |
252b5132 | 6 | |
f96b4a7b NC |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3 of the License, or | |
10 | (at your option) any later version. | |
252b5132 | 11 | |
f96b4a7b NC |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
252b5132 | 16 | |
f96b4a7b NC |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | |
19 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
20 | MA 02110-1301, USA. */ | |
252b5132 RH |
21 | |
22 | #ifndef LDCTOR_H | |
23 | #define LDCTOR_H | |
24 | ||
25 | /* List of statements needed to handle constructors */ | |
26 | extern lang_statement_list_type constructor_list; | |
27 | ||
28 | /* Whether the constructors should be sorted. Note that this is | |
29 | global for the entire link; we assume that there is only a single | |
30 | CONSTRUCTORS command in the linker script. */ | |
b34976b6 | 31 | extern bfd_boolean constructors_sorted; |
252b5132 RH |
32 | |
33 | /* We keep a list of these structures for each set we build. */ | |
34 | ||
89cdebba | 35 | struct set_info { |
252b5132 RH |
36 | struct set_info *next; /* Next set. */ |
37 | struct bfd_link_hash_entry *h; /* Hash table entry. */ | |
38 | bfd_reloc_code_real_type reloc; /* Reloc to use for an entry. */ | |
39 | size_t count; /* Number of elements. */ | |
40 | struct set_element *elements; /* Elements in set. */ | |
41 | }; | |
42 | ||
89cdebba | 43 | struct set_element { |
252b5132 RH |
44 | struct set_element *next; /* Next element. */ |
45 | const char *name; /* Name in set (may be NULL). */ | |
46 | asection *section; /* Section of value in set. */ | |
47 | bfd_vma value; /* Value in set. */ | |
48 | }; | |
49 | ||
50 | /* The sets we have seen. */ | |
51 | ||
52 | extern struct set_info *sets; | |
53 | ||
b34976b6 | 54 | extern void ldctor_add_set_entry |
1579bae1 AM |
55 | (struct bfd_link_hash_entry *, bfd_reloc_code_real_type, const char *, |
56 | asection *, bfd_vma); | |
b34976b6 | 57 | extern void ldctor_build_sets |
1579bae1 | 58 | (void); |
252b5132 RH |
59 | |
60 | #endif |