1 /* ld.h -- general linker header file
2 Copyright (C) 1991, 93, 94, 95, 96, 1997, 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
26 #define _(String) gettext (String)
28 #define N_(String) gettext_noop (String)
30 #define N_(String) (String)
33 /* Stubs that do something close enough. */
34 #define textdomain(String) (String)
35 #define gettext(String) (String)
36 #define dgettext(Domain,Message) (Message)
37 #define dcgettext(Domain,Message,Type) (Message)
38 #define bindtextdomain(Domain,Directory) (Domain)
39 #define _(String) (String)
40 #define N_(String) (String)
41 /* In this case we don't care about the value. */
47 /* Look in this environment name for the linker to pretend to be */
48 #define EMULATION_ENVIRON "LDEMULATION"
49 /* If in there look for the strings: */
51 /* Look in this variable for a target format */
52 #define TARGET_ENVIRON "GNUTARGET"
54 /* Input sections which are put in a section of this name are actually
56 #define DISCARD_SECTION_NAME "/DISCARD/"
58 /* Extra information we hold on sections */
59 typedef struct user_section_struct
61 /* Pointer to the section where this data will go */
62 struct lang_input_statement_struct *file;
63 } section_userdata_type;
66 #define get_userdata(x) ((x)->userdata)
69 #define SHORT_SIZE (2)
73 /* ALIGN macro changed to ALIGN_N to avoid */
74 /* conflict in /usr/include/machine/machparam.h */
75 /* WARNING: If THIS is a 64 bit address and BOUNDARY is a 32 bit int,
76 you must coerce boundary to the same type as THIS.
77 ??? Is there a portable way to avoid this. */
78 #define ALIGN_N(this, boundary) \
79 ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
83 /* 1 => assign space to common symbols even if `relocatable_output'. */
84 boolean force_common_definition;
87 /* Name of runtime interpreter to invoke. */
90 /* Name to give runtime libary from the -soname argument. */
93 /* Runtime library search path from the -rpath argument. */
96 /* Link time runtime library search path from the -rpath-link
100 /* Big or little endian as set on command line. */
101 enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
103 /* If true, export all symbols in the dynamic symbol table of an ELF
105 boolean export_dynamic;
107 /* If true, build MIPS embedded PIC relocation tables in the output
109 boolean embedded_relocs;
111 /* If true, force generation of a file with a .exe file. */
112 boolean force_exe_suffix;
114 /* If true, generate a cross reference report. */
117 /* If true (which is the default), warn about mismatched input
119 boolean warn_mismatch;
121 /* Name of shared object whose symbol table should be filtered with
122 this shared object. From the --filter option. */
125 /* Name of shared object for whose symbol table this shared object
126 is an auxiliary filter. From the --auxiliary option. */
127 char **auxiliary_filters;
130 extern args_type command_line;
132 typedef int token_code_type;
136 bfd_size_type specified_data_size;
137 boolean magic_demand_paged;
138 boolean make_executable;
140 /* If true, doing a dynamic link. */
141 boolean dynamic_link;
143 /* If true, build constructors. */
144 boolean build_constructors;
146 /* If true, warn about any constructors. */
147 boolean warn_constructors;
149 /* If true, warn about merging common symbols with others. */
152 /* If true, only warn once about a particular undefined symbol. */
155 /* If true, warn if multiple global-pointers are needed (Alpha
157 boolean warn_multiple_gp;
159 /* If true, warn if the starting address of an output section
160 changes due to the alignment of an input section. */
161 boolean warn_section_align;
165 boolean text_read_only;
173 boolean split_by_file;
176 extern ld_config_type config;
180 lang_first_phase_enum,
181 lang_allocating_phase_enum,
182 lang_final_phase_enum
185 extern boolean had_script;
186 extern boolean force_make_executable;
188 /* Non-zero if we are processing a --defsym from the command line. */
189 extern int parsing_defsym;
191 extern int yyparse PARAMS ((void));
193 extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma));
194 extern void output_cref PARAMS ((FILE *));
195 extern void check_nocrossrefs PARAMS ((void));