Back to index

cell-binutils  2.17cvs20070401
ldctor.h
Go to the documentation of this file.
00001 /* ldctor.h - linker constructor support
00002    Copyright 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2002, 2003
00003    Free Software Foundation, Inc.
00004 
00005 This file is part of GLD, the Gnu Linker.
00006 
00007 GLD is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2, or (at your option)
00010 any later version.
00011 
00012 GLD is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with GLD; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020 02110-1301, USA.  */
00021 
00022 #ifndef LDCTOR_H
00023 #define LDCTOR_H
00024 
00025 /* List of statements needed to handle constructors */
00026 extern lang_statement_list_type constructor_list;
00027 
00028 /* Whether the constructors should be sorted.  Note that this is
00029    global for the entire link; we assume that there is only a single
00030    CONSTRUCTORS command in the linker script.  */
00031 extern bfd_boolean constructors_sorted;
00032 
00033 /* We keep a list of these structures for each set we build.  */
00034 
00035 struct set_info {
00036   struct set_info *next;           /* Next set.  */
00037   struct bfd_link_hash_entry *h;   /* Hash table entry.  */
00038   bfd_reloc_code_real_type reloc;  /* Reloc to use for an entry.  */
00039   size_t count;                           /* Number of elements.  */
00040   struct set_element *elements;           /* Elements in set.  */
00041 };
00042 
00043 struct set_element {
00044   struct set_element *next;        /* Next element.  */
00045   const char *name;                /* Name in set (may be NULL).  */
00046   asection *section;               /* Section of value in set.  */
00047   bfd_vma value;                   /* Value in set.  */
00048 };
00049 
00050 /* The sets we have seen.  */
00051 
00052 extern struct set_info *sets;
00053 
00054 extern void ldctor_add_set_entry
00055   (struct bfd_link_hash_entry *, bfd_reloc_code_real_type, const char *,
00056    asection *, bfd_vma);
00057 extern void ldctor_build_sets
00058   (void);
00059 
00060 #endif