2 Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
4 This file is part of GAS, the GNU Assembler.
6 GAS 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 GAS 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 GAS; see the file COPYING. If not, write to the Free
18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 #define EXEC_MACHINE_TYPE HP9000S200_ID
30 #define LOCAL_LABEL(name) (name [0] == 'L' )
33 #define S_LOCAL_NAME(s) (LOCAL_LABEL (S_GET_NAME (s)))
35 #endif /* ! BFD_ASSEMBLER */
37 /* This is the name of a fake symbol which will never appear in the
38 assembler output. S_IS_LOCAL detects it because of the \001. */
39 #define FAKE_LABEL_NAME "L0\001"
44 * FixSs may be built up in any order.
49 /* These small fields are grouped together for compactness of
50 this structure, and efficiency of access on some architectures. */
52 /* pc-relative offset adjust (only used by m68k) */
55 /* How many bytes are involved? */
56 unsigned char fx_size;
58 /* Is this a pc-relative relocation? */
59 unsigned fx_pcrel : 1;
61 /* Is this a relocation to a procedure linkage table entry? If so,
62 some of the reductions we try to apply are invalid. A better way
63 might be to represent PLT entries with different kinds of
64 symbols, and use normal relocations (with undefined symbols);
65 look into it for version 2.6. */
68 /* Is this value an immediate displacement? */
69 /* Only used on i960 and ns32k; merge it into TC_FIX_TYPE sometime. */
70 unsigned fx_im_disp : 2;
72 /* A bit for the CPU specific code.
73 This probably can be folded into tc_fix_data, below. */
74 unsigned fx_tcbit : 1;
76 /* Has this relocation already been applied? */
79 /* Suppress overflow complaints on large addends. This is used
80 in the PowerPC ELF config to allow large addends on the
81 BFD_RELOC_{LO16,HI16,HI16_S} relocations.
83 @@ Can this be determined from BFD? */
84 unsigned fx_no_overflow : 1;
86 /* The value is signed when checking for overflow. */
87 unsigned fx_signed : 1;
89 /* Which frag does this fix apply to? */
92 /* Where is the first byte to fix up? */
95 /* NULL or Symbol whose value we add in. */
98 /* NULL or Symbol whose value we subtract. */
101 /* Absolute number we add in. */
104 /* Next fixS in linked list, or NULL. */
107 /* If NULL, no bitfix's to do. */
108 /* Only i960-coff and ns32k use this, and i960-coff stores an
109 integer. This can probably be folded into tc_fix_data, below.
110 @@ Alpha also uses it, but only to disable certain relocation
112 bit_fixS *fx_bit_fixP;
115 bfd_reloc_code_real_type fx_r_type;
117 #ifdef NEED_FX_R_TYPE
118 /* Hack for machines where the type of reloc can't be
119 worked out by looking at how big it is. */
124 /* This field is sort of misnamed. It appears to be a sort of random
125 scratch field, for use by the back ends. The main gas code doesn't
126 do anything but initialize it to zero. The use of it does need to
127 be coordinated between the cpu and format files, though. E.g., some
128 coff targets pass the `addend' field from the cpu file via this
129 field. I don't know why the `fx_offset' field above can't be used
130 for that; investigate later and document. KR */
133 /* The location of the instruction which created the reloc, used
134 in error messages. */
139 /* Location where a backend can attach additional data
140 needed to perform fixups. */
141 TC_FIX_TYPE tc_fix_data;
145 typedef struct fix fixS;
147 #ifndef BFD_ASSEMBLER
148 extern char *next_object_file_charP;
150 #ifndef MANY_SEGMENTS
151 COMMON fixS *text_fix_root, *text_fix_tail; /* Chains fixSs. */
152 COMMON fixS *data_fix_root, *data_fix_tail; /* Chains fixSs. */
153 COMMON fixS *bss_fix_root, *bss_fix_tail; /* Chains fixSs. */
154 extern struct frag *text_last_frag; /* Last frag in segment. */
155 extern struct frag *data_last_frag; /* Last frag in segment. */
157 COMMON fixS **seg_fix_rootP, **seg_fix_tailP; /* -> one of above. */
160 extern long string_byte_count;
161 extern int section_alignment[];
163 extern bit_fixS *bit_fix_new
164 PARAMS ((int size, int offset, long base_type, long base_adj, long min,
165 long max, long add));
166 extern void append PARAMS ((char **charPP, char *fromP, unsigned long length));
167 extern void record_alignment PARAMS ((segT seg, int align));
168 extern void subsegs_finish PARAMS ((void));
169 extern void write_object_file PARAMS ((void));
170 extern long relax_frag PARAMS ((fragS *, long));
171 extern void relax_segment
172 PARAMS ((struct frag * seg_frag_root, segT seg_type));
174 extern void number_to_chars_littleendian PARAMS ((char *, valueT, int));
175 extern void number_to_chars_bigendian PARAMS ((char *, valueT, int));
179 PARAMS ((fragS * frag, int where, int size, symbolS * add_symbol,
180 offsetT offset, int pcrel, bfd_reloc_code_real_type r_type));
181 extern fixS *fix_new_exp
182 PARAMS ((fragS * frag, int where, int size, expressionS *exp, int pcrel,
183 bfd_reloc_code_real_type r_type));
186 PARAMS ((fragS * frag, int where, int size, symbolS * add_symbol,
187 offsetT offset, int pcrel, int r_type));
188 extern fixS *fix_new_exp
189 PARAMS ((fragS * frag, int where, int size, expressionS *exp, int pcrel,
193 extern void write_print_statistics PARAMS ((FILE *));