Describe AT option of SECTIONS command, at long last.
[deliverable/binutils-gdb.git] / ld / ld.h
CommitLineData
2fa0b342
DHW
1/* ld.h -
2
c1074477 3 Copyright (C) 1991, 1993 Free Software Foundation, Inc.
2fa0b342
DHW
4
5 This file is part of GLD, the Gnu Linker.
6
7 GLD is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
c1074477 9 the Free Software Foundation; either version 2, or (at your option)
2fa0b342
DHW
10 any later version.
11
12 GLD 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.
16
17 You should have received a copy of the GNU General Public License
18 along with GLD; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21
22#define flag_is_not_at_end(x) ((x) & BSF_NOT_AT_END)
23#define flag_is_ordinary_local(x) (((x) & (BSF_LOCAL))&!((x) & (BSF_DEBUGGING)))
24#define flag_is_debugger(x) ((x) & BSF_DEBUGGING)
25#define flag_is_undefined_or_global(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL))
26#define flag_is_defined(x) (!((x) & (BSF_UNDEFINED)))
27#define flag_is_global_or_common(x) ((x) & (BSF_GLOBAL | BSF_FORT_COMM))
28#define flag_is_undefined_or_global_or_common(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL | BSF_FORT_COMM))
c1074477
DE
29#define flag_is_undefined_or_global_or_common_or_constructor(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL | BSF_FORT_COMM | BSF_CONSTRUCTOR))
30#define flag_is_constructor(x) ((x) & BSF_CONSTRUCTOR)
2fa0b342
DHW
31#define flag_is_common(x) ((x) & BSF_FORT_COMM)
32#define flag_is_global(x) ((x) & (BSF_GLOBAL))
73f5d5fe 33#define flag_is_weak(x) ((x) & BSF_WEAK)
2fa0b342
DHW
34#define flag_is_undefined(x) ((x) & BSF_UNDEFINED)
35#define flag_set(x,y) (x = y)
36#define flag_is_fort_comm(x) ((x) & BSF_FORT_COMM)
37#define flag_is_absolute(x) ((x) & BSF_ABSOLUTE)
38/* Extra information we hold on sections */
39typedef struct user_section_struct {
40 /* Pointer to the section where this data will go */
41 struct lang_input_statement_struct *file;
42} section_userdata_type;
43
44
45#define get_userdata(x) ((x)->userdata)
46#define as_output_section_statement(x) ((x)->otheruserdata)
47
2fa0b342
DHW
48
49
50/* Which symbols should be stripped (omitted from the output):
51 none, all, or debugger symbols. */
c1074477 52typedef enum { STRIP_NONE, STRIP_ALL, STRIP_DEBUGGER, STRIP_SOME } strip_symbols_type;
2fa0b342
DHW
53
54
55
56
57/* Which local symbols should be omitted:
58 none, all, or those starting with L.
59 This is irrelevant if STRIP_NONE. */
5e83d38e 60typedef enum { DISCARD_NONE, DISCARD_ALL, DISCARD_L } discard_locals_type;
2fa0b342
DHW
61
62
c1074477
DE
63#define BYTE_SIZE (1)
64#define SHORT_SIZE (2)
65#define LONG_SIZE (4)
2fa0b342 66
c1074477
DE
67/* ALIGN macro changed to ALIGN_N to avoid */
68/* conflict in /usr/include/machine/machparam.h */
73f5d5fe
DE
69/* WARNING: If THIS is a 64 bit address and BOUNDARY is an unsigned int,
70 you must coerce boundary to the same type as THIS.
71 ??? Is there a portable way to avoid this. */
c1074477 72#define ALIGN_N(this, boundary) ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
2fa0b342 73
2fa0b342 74typedef struct {
2fa0b342
DHW
75 /* 1 => assign space to common symbols even if `relocatable_output'. */
76 boolean force_common_definition;
c1074477
DE
77 boolean relax;
78
2fa0b342
DHW
79} args_type;
80
81typedef int token_code_type;
82
83typedef struct
84{
c1074477 85 bfd_size_type specified_data_size;
2fa0b342
DHW
86 boolean magic_demand_paged;
87 boolean make_executable;
88 /* 1 => write relocation into output file so can re-input it later. */
89 boolean relocateable_output;
90
91 /* Will we build contstructors, or leave alone ? */
92 boolean build_constructors;
c1074477
DE
93
94 /* If true, warn about merging common symbols with others. */
95 boolean warn_common;
2fa0b342 96
b6316534 97 boolean sort_common;
c1074477
DE
98/* these flags may seem mutually exclusive, but not setting them
99 allows the back end to decide what would be the best thing to do */
100 boolean text_read_only;
101
102 char *map_filename;
103 FILE *map_file;
104
2fa0b342 105} ld_config_type;
1418c83b 106#define set_asymbol_chain(x,y) ((x)->udata = (PTR)y)
2fa0b342
DHW
107#define get_asymbol_chain(x) ((asymbol **)((x)->udata))
108#define get_loader_symbol(x) ((loader_global_asymbol *)((x)->udata))
1418c83b 109#define set_loader_symbol(x,y) ((x)->udata = (PTR)y)
2fa0b342
DHW
110
111
112
113
114
115
116typedef enum {
117 lang_first_phase_enum,
118 lang_allocating_phase_enum,
119 lang_final_phase_enum } lang_phase_type;
120
121
122
123
c1074477
DE
124
125int yyparse();
This page took 0.109837 seconds and 4 git commands to generate.