1 /* ld.h -- general linker header file
2 Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
4 This file is part of GLD, the Gnu Linker.
6 GLD 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, or (at your option)
11 GLD 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.
16 You should have received a copy of the GNU General Public License
17 along with GLD; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
30 # define _(String) gettext (String)
32 # define N_(String) gettext_noop (String)
34 # define N_(String) (String)
37 /* Stubs that do something close enough. */
38 # define textdomain(String) (String)
39 # define gettext(String) (String)
40 # define dgettext(Domain,Message) (Message)
41 # define dcgettext(Domain,Message,Type) (Message)
42 # define bindtextdomain(Domain,Directory) (Domain)
43 # define _(String) (String)
44 # define N_(String) (String)
48 # define LC_MESSAGES 0
51 /* Look in this environment name for the linker to pretend to be */
52 #define EMULATION_ENVIRON "LDEMULATION"
53 /* If in there look for the strings: */
55 /* Look in this variable for a target format */
56 #define TARGET_ENVIRON "GNUTARGET"
58 /* Input sections which are put in a section of this name are actually
60 #define DISCARD_SECTION_NAME "/DISCARD/"
62 /* A wildcard specification. This is only used in ldgram.y, but it
63 winds up in ldgram.h, so we need to define it outside. */
71 /* Extra information we hold on sections */
72 typedef struct user_section_struct
74 /* Pointer to the section where this data will go */
75 struct lang_input_statement_struct
*file
;
76 } section_userdata_type
;
79 #define get_userdata(x) ((x)->userdata)
82 #define SHORT_SIZE (2)
86 /* ALIGN macro changed to ALIGN_N to avoid */
87 /* conflict in /usr/include/machine/machparam.h */
88 /* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int,
89 you must coerce boundary to the same type as THIS.
90 ??? Is there a portable way to avoid this. */
91 #define ALIGN_N(this, boundary) \
92 ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
96 /* 1 => assign space to common symbols even if `relocatable_output'. */
97 boolean force_common_definition
;
100 /* Name of runtime interpreter to invoke. */
103 /* Name to give runtime libary from the -soname argument. */
106 /* Runtime library search path from the -rpath argument. */
109 /* Link time runtime library search path from the -rpath-link
113 /* Big or little endian as set on command line. */
114 enum { ENDIAN_UNSET
= 0, ENDIAN_BIG
, ENDIAN_LITTLE
} endian
;
116 /* If true, export all symbols in the dynamic symbol table of an ELF
118 boolean export_dynamic
;
120 /* If true, build MIPS embedded PIC relocation tables in the output
122 boolean embedded_relocs
;
124 /* If true, force generation of a file with a .exe file. */
125 boolean force_exe_suffix
;
127 /* If true, generate a cross reference report. */
130 /* If true (which is the default), warn about mismatched input
132 boolean warn_mismatch
;
134 /* Name of shared object whose symbol table should be filtered with
135 this shared object. From the --filter option. */
138 /* Name of shared object for whose symbol table this shared object
139 is an auxiliary filter. From the --auxiliary option. */
140 char **auxiliary_filters
;
143 extern args_type command_line
;
145 typedef int token_code_type
;
149 bfd_size_type specified_data_size
;
150 boolean magic_demand_paged
;
151 boolean make_executable
;
153 /* If true, doing a dynamic link. */
154 boolean dynamic_link
;
156 /* If true, build constructors. */
157 boolean build_constructors
;
159 /* If true, warn about any constructors. */
160 boolean warn_constructors
;
162 /* If true, warn about merging common symbols with others. */
165 /* If true, only warn once about a particular undefined symbol. */
168 /* If true, warn if multiple global-pointers are needed (Alpha
170 boolean warn_multiple_gp
;
172 /* If true, warn if the starting address of an output section
173 changes due to the alignment of an input section. */
174 boolean warn_section_align
;
178 boolean text_read_only
;
186 boolean split_by_file
;
189 extern ld_config_type config
;
193 lang_first_phase_enum
,
194 lang_allocating_phase_enum
,
195 lang_final_phase_enum
198 extern boolean had_script
;
199 extern boolean force_make_executable
;
201 /* Non-zero if we are processing a --defsym from the command line. */
202 extern int parsing_defsym
;
204 extern int yyparse
PARAMS ((void));
206 extern void add_cref
PARAMS ((const char *, bfd
*, asection
*, bfd_vma
));
207 extern void output_cref
PARAMS ((FILE *));
208 extern void check_nocrossrefs
PARAMS ((void));