2000-10-09 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / ld / ldctor.h
CommitLineData
252b5132 1/* ldctor.h - linker constructor support
5cc18311
KH
2 Copyright 1991, 92, 93, 94, 95, 98, 2000 Free Software Foundation, Inc.
3
252b5132
RH
4This file is part of GLD, the Gnu Linker.
5
6GLD is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GLD is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GLD; see the file COPYING. If not, write to the Free
18Software Foundation, 59 Temple Place - Suite 330, Boston, MA
1902111-1307, USA. */
20
21#ifndef LDCTOR_H
22#define LDCTOR_H
23
24/* List of statements needed to handle constructors */
25extern lang_statement_list_type constructor_list;
26
27/* Whether the constructors should be sorted. Note that this is
28 global for the entire link; we assume that there is only a single
29 CONSTRUCTORS command in the linker script. */
30extern boolean constructors_sorted;
31
32/* We keep a list of these structures for each set we build. */
33
89cdebba 34struct set_info {
252b5132
RH
35 struct set_info *next; /* Next set. */
36 struct bfd_link_hash_entry *h; /* Hash table entry. */
37 bfd_reloc_code_real_type reloc; /* Reloc to use for an entry. */
38 size_t count; /* Number of elements. */
39 struct set_element *elements; /* Elements in set. */
40};
41
89cdebba 42struct set_element {
252b5132
RH
43 struct set_element *next; /* Next element. */
44 const char *name; /* Name in set (may be NULL). */
45 asection *section; /* Section of value in set. */
46 bfd_vma value; /* Value in set. */
47};
48
49/* The sets we have seen. */
50
51extern struct set_info *sets;
52
53extern void ldctor_add_set_entry PARAMS ((struct bfd_link_hash_entry *,
54 bfd_reloc_code_real_type,
55 const char *, asection *, bfd_vma));
56extern void ldctor_build_sets PARAMS ((void));
57
58#endif
This page took 0.060263 seconds and 4 git commands to generate.