2 Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001
3 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 GAS 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.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
27 #define EXEC_MACHINE_TYPE HP9000S200_ID
34 #define LOCAL_LABEL(name) (name [0] == 'L' )
37 #define S_LOCAL_NAME(s) (LOCAL_LABEL (S_GET_NAME (s)))
39 #endif /* ! BFD_ASSEMBLER */
41 /* This is the name of a fake symbol which will never appear in the
42 assembler output. S_IS_LOCAL detects it because of the \001. */
43 #ifndef FAKE_LABEL_NAME
44 #define FAKE_LABEL_NAME "L0\001"
50 * FixSs may be built up in any order.
55 /* These small fields are grouped together for compactness of
56 this structure, and efficiency of access on some architectures. */
58 /* pc-relative offset adjust (only used by m68k) */
61 /* How many bytes are involved? */
62 unsigned char fx_size
;
64 /* Is this a pc-relative relocation? */
65 unsigned fx_pcrel
: 1;
67 /* Is this a relocation to a procedure linkage table entry? If so,
68 some of the reductions we try to apply are invalid. A better way
69 might be to represent PLT entries with different kinds of
70 symbols, and use normal relocations (with undefined symbols);
71 look into it for version 2.6. */
74 /* Is this value an immediate displacement? */
75 /* Only used on i960 and ns32k; merge it into TC_FIX_TYPE sometime. */
76 unsigned fx_im_disp
: 2;
78 /* A bit for the CPU specific code.
79 This probably can be folded into tc_fix_data, below. */
80 unsigned fx_tcbit
: 1;
82 /* Has this relocation already been applied? */
85 /* Suppress overflow complaints on large addends. This is used
86 in the PowerPC ELF config to allow large addends on the
87 BFD_RELOC_{LO16,HI16,HI16_S} relocations.
89 @@ Can this be determined from BFD? */
90 unsigned fx_no_overflow
: 1;
92 /* The value is signed when checking for overflow. */
93 unsigned fx_signed
: 1;
95 /* Which frag does this fix apply to? */
98 /* Where is the first byte to fix up? */
101 /* NULL or Symbol whose value we add in. */
104 /* NULL or Symbol whose value we subtract. */
107 /* Absolute number we add in. */
110 /* The value of dot when the fixup expression was parsed. */
111 addressT fx_dot_value
;
113 /* Next fixS in linked list, or NULL. */
116 /* If NULL, no bitfix's to do. */
117 /* Only i960-coff and ns32k use this, and i960-coff stores an
118 integer. This can probably be folded into tc_fix_data, below.
119 @@ Alpha also uses it, but only to disable certain relocation
121 bit_fixS
*fx_bit_fixP
;
124 bfd_reloc_code_real_type fx_r_type
;
126 #ifdef NEED_FX_R_TYPE
127 /* Hack for machines where the type of reloc can't be
128 worked out by looking at how big it is. */
133 /* This field is sort of misnamed. It appears to be a sort of random
134 scratch field, for use by the back ends. The main gas code doesn't
135 do anything but initialize it to zero. The use of it does need to
136 be coordinated between the cpu and format files, though. E.g., some
137 coff targets pass the `addend' field from the cpu file via this
138 field. I don't know why the `fx_offset' field above can't be used
139 for that; investigate later and document. KR */
142 /* The location of the instruction which created the reloc, used
143 in error messages. */
149 /* CGEN_INSN entry for this instruction. */
150 const struct cgen_insn
*insn
;
151 /* Target specific data, usually reloc number. */
157 /* Location where a backend can attach additional data
158 needed to perform fixups. */
159 TC_FIX_TYPE tc_fix_data
;
163 typedef struct fix fixS
;
165 extern int finalize_syms
;
166 extern symbolS
*abs_section_sym
;
167 extern addressT dot_value
;
169 #ifndef BFD_ASSEMBLER
170 extern char *next_object_file_charP
;
172 #ifndef MANY_SEGMENTS
173 COMMON fixS
*text_fix_root
, *text_fix_tail
; /* Chains fixSs. */
174 COMMON fixS
*data_fix_root
, *data_fix_tail
; /* Chains fixSs. */
175 COMMON fixS
*bss_fix_root
, *bss_fix_tail
; /* Chains fixSs. */
176 extern struct frag
*text_last_frag
; /* Last frag in segment. */
177 extern struct frag
*data_last_frag
; /* Last frag in segment. */
179 COMMON fixS
**seg_fix_rootP
, **seg_fix_tailP
; /* -> one of above. */
182 extern long string_byte_count
;
183 extern int section_alignment
[];
185 extern bit_fixS
*bit_fix_new
186 PARAMS ((int size
, int offset
, long base_type
, long base_adj
, long min
,
187 long max
, long add
));
188 extern void append
PARAMS ((char **charPP
, char *fromP
, unsigned long length
));
189 extern void record_alignment
PARAMS ((segT seg
, int align
));
190 extern int get_recorded_alignment
PARAMS ((segT seg
));
191 extern void subsegs_finish
PARAMS ((void));
192 extern void write_object_file
PARAMS ((void));
193 extern long relax_frag
PARAMS ((segT
, fragS
*, long));
194 extern int relax_segment
195 PARAMS ((struct frag
* seg_frag_root
, segT seg_type
));
197 extern void number_to_chars_littleendian
PARAMS ((char *, valueT
, int));
198 extern void number_to_chars_bigendian
PARAMS ((char *, valueT
, int));
202 PARAMS ((fragS
* frag
, int where
, int size
, symbolS
* add_symbol
,
203 offsetT offset
, int pcrel
, bfd_reloc_code_real_type r_type
));
204 extern fixS
*fix_new_exp
205 PARAMS ((fragS
* frag
, int where
, int size
, expressionS
*exp
, int pcrel
,
206 bfd_reloc_code_real_type r_type
));
209 PARAMS ((fragS
* frag
, int where
, int size
, symbolS
* add_symbol
,
210 offsetT offset
, int pcrel
, int r_type
));
211 extern fixS
*fix_new_exp
212 PARAMS ((fragS
* frag
, int where
, int size
, expressionS
*exp
, int pcrel
,
216 extern void write_print_statistics
PARAMS ((FILE *));
218 #endif /* __write_h__ */