Merge branch 'upstream'
[nativeclient.git] / tools / patches / binutils-2.18.patch
blob4e86d2b09e8a05ec42fc3efcf1b9347fdf887afa
1 diff -Naur ../PRISTINE/binutils-2.18/bfd/Makefile.am binutils-2.18/bfd/Makefile.am
2 --- ../PRISTINE/binutils-2.18/bfd/Makefile.am 2007-08-28 13:20:14.000000000 -0700
3 +++ binutils-2.18/bfd/Makefile.am 2009-01-09 17:32:43.314868000 -0800
4 @@ -277,6 +277,7 @@
5 elf32-mips.lo \
6 elf32-mt.lo \
7 elf32-msp430.lo \
8 + elf32-nacl.lo \
9 elf32-openrisc.lo \
10 elf32-or32.lo \
11 elf32-pj.lo \
12 @@ -456,6 +457,7 @@
13 elf32-mips.c \
14 elf32-mt.c \
15 elf32-msp430.c \
16 + elf32-nacl.c \
17 elf32-openrisc.c \
18 elf32-or32.c \
19 elf32-pj.c \
20 @@ -1468,6 +1470,10 @@
21 $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
22 $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
23 elf32-target.h
24 +elf32-nacl.lo: elf32-nacl.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
25 + $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
26 + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
27 + $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
28 elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
29 $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
30 $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
31 diff -Naur ../PRISTINE/binutils-2.18/bfd/Makefile.in binutils-2.18/bfd/Makefile.in
32 --- ../PRISTINE/binutils-2.18/bfd/Makefile.in 2007-08-28 13:20:12.000000000 -0700
33 +++ binutils-2.18/bfd/Makefile.in 2009-01-09 17:32:43.321854000 -0800
34 @@ -527,6 +527,7 @@
35 elf32-mips.lo \
36 elf32-mt.lo \
37 elf32-msp430.lo \
38 + elf32-nacl.lo \
39 elf32-openrisc.lo \
40 elf32-or32.lo \
41 elf32-pj.lo \
42 @@ -706,6 +707,7 @@
43 elf32-mips.c \
44 elf32-mt.c \
45 elf32-msp430.c \
46 + elf32-nacl.c \
47 elf32-openrisc.c \
48 elf32-or32.c \
49 elf32-pj.c \
50 @@ -2048,6 +2050,10 @@
51 $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
52 $(INCDIR)/bfdlink.h $(INCDIR)/elf/msp430.h $(INCDIR)/elf/reloc-macros.h \
53 elf32-target.h
54 +elf32-nacl.lo: elf32-nacl.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
55 + $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
56 + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
57 + $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
58 elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
59 $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
60 $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
61 diff -Naur ../PRISTINE/binutils-2.18/bfd/config.bfd binutils-2.18/bfd/config.bfd
62 --- ../PRISTINE/binutils-2.18/bfd/config.bfd 2007-08-28 10:19:33.000000000 -0700
63 +++ binutils-2.18/bfd/config.bfd 2009-01-09 17:32:43.333848000 -0800
64 @@ -575,6 +575,11 @@
65 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
66 targ64_selvecs=bfd_elf64_x86_64_vec
68 + i[3-7]86-*-nacl*)
69 + targ_defvec=bfd_elf32_nacl_vec
70 + targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
71 + targ_archs="bfd_i386_arch bfd_powerpc_arch"
72 + ;;
73 #ifdef BFD64
74 x86_64-*-elf*)
75 targ_defvec=bfd_elf64_x86_64_vec
76 diff -Naur ../PRISTINE/binutils-2.18/bfd/configure binutils-2.18/bfd/configure
77 --- ../PRISTINE/binutils-2.18/bfd/configure 2007-08-28 13:19:51.000000000 -0700
78 +++ binutils-2.18/bfd/configure 2009-01-09 17:32:43.360865000 -0800
79 @@ -19107,6 +19107,7 @@
80 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
81 bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
82 bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
83 + bfd_elf32_nacl_vec) tb="$tb elf32-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
84 bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
85 bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
86 bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
87 diff -Naur ../PRISTINE/binutils-2.18/bfd/configure.in binutils-2.18/bfd/configure.in
88 --- ../PRISTINE/binutils-2.18/bfd/configure.in 2007-08-28 13:19:56.000000000 -0700
89 +++ binutils-2.18/bfd/configure.in 2009-01-09 17:32:43.391852000 -0800
90 @@ -685,6 +685,7 @@
91 bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
92 bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
93 bfd_elf32_msp430_vec) tb="$tb elf32-msp430.lo elf32.lo $elf" ;;
94 + bfd_elf32_nacl_vec) tb="$tb elf32-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
95 bfd_elf32_nbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
96 bfd_elf32_nlittlemips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
97 bfd_elf32_ntradbigmips_vec) tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
98 diff -Naur ../PRISTINE/binutils-2.18/bfd/elf32-nacl.c binutils-2.18/bfd/elf32-nacl.c
99 --- ../PRISTINE/binutils-2.18/bfd/elf32-nacl.c 1969-12-31 16:00:00.000000000 -0800
100 +++ binutils-2.18/bfd/elf32-nacl.c 2009-02-19 14:48:00.181607000 -0800
101 @@ -0,0 +1,3945 @@
102 +/* Intel 80386/80486-specific support for 32-bit ELF
103 + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
104 + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
106 + This file is part of BFD, the Binary File Descriptor library.
108 + This program is free software; you can redistribute it and/or modify
109 + it under the terms of the GNU General Public License as published by
110 + the Free Software Foundation; either version 3 of the License, or
111 + (at your option) any later version.
113 + This program is distributed in the hope that it will be useful,
114 + but WITHOUT ANY WARRANTY; without even the implied warranty of
115 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
116 + GNU General Public License for more details.
118 + You should have received a copy of the GNU General Public License
119 + along with this program; if not, write to the Free Software
120 + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
121 + MA 02110-1301, USA. */
123 +#include "sysdep.h"
124 +#include "bfd.h"
125 +#include "bfdlink.h"
126 +#include "libbfd.h"
127 +#include "elf-bfd.h"
128 +#include "elf-vxworks.h"
129 +#include "elf/nacl.h"
131 +/* NativeClient binary format description input. */
132 +/* NativeClient format is based on elf32. */
135 +/* 386 uses REL relocations instead of RELA. */
136 +#define USE_REL 1
138 +#include "elf/i386.h"
140 +static reloc_howto_type elf_howto_table[]=
142 + HOWTO(R_386_NONE, 0, 0, 0, FALSE, 0, complain_overflow_bitfield,
143 + bfd_elf_generic_reloc, "R_386_NONE",
144 + TRUE, 0x00000000, 0x00000000, FALSE),
145 + HOWTO(R_386_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
146 + bfd_elf_generic_reloc, "R_386_32",
147 + TRUE, 0xffffffff, 0xffffffff, FALSE),
148 + HOWTO(R_386_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
149 + bfd_elf_generic_reloc, "R_386_PC32",
150 + TRUE, 0xffffffff, 0xffffffff, TRUE),
151 + HOWTO(R_386_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
152 + bfd_elf_generic_reloc, "R_386_GOT32",
153 + TRUE, 0xffffffff, 0xffffffff, FALSE),
154 + HOWTO(R_386_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
155 + bfd_elf_generic_reloc, "R_386_PLT32",
156 + TRUE, 0xffffffff, 0xffffffff, TRUE),
157 + HOWTO(R_386_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
158 + bfd_elf_generic_reloc, "R_386_COPY",
159 + TRUE, 0xffffffff, 0xffffffff, FALSE),
160 + HOWTO(R_386_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
161 + bfd_elf_generic_reloc, "R_386_GLOB_DAT",
162 + TRUE, 0xffffffff, 0xffffffff, FALSE),
163 + HOWTO(R_386_JUMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
164 + bfd_elf_generic_reloc, "R_386_JUMP_SLOT",
165 + TRUE, 0xffffffff, 0xffffffff, FALSE),
166 + HOWTO(R_386_RELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
167 + bfd_elf_generic_reloc, "R_386_RELATIVE",
168 + TRUE, 0xffffffff, 0xffffffff, FALSE),
169 + HOWTO(R_386_GOTOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
170 + bfd_elf_generic_reloc, "R_386_GOTOFF",
171 + TRUE, 0xffffffff, 0xffffffff, FALSE),
172 + HOWTO(R_386_GOTPC, 0, 2, 32, TRUE, 0, complain_overflow_bitfield,
173 + bfd_elf_generic_reloc, "R_386_GOTPC",
174 + TRUE, 0xffffffff, 0xffffffff, TRUE),
176 + /* We have a gap in the reloc numbers here.
177 + R_386_standard counts the number up to this point, and
178 + R_386_ext_offset is the value to subtract from a reloc type of
179 + R_386_16 thru R_386_PC8 to form an index into this table. */
180 +#define R_386_standard (R_386_GOTPC + 1)
181 +#define R_386_ext_offset (R_386_TLS_TPOFF - R_386_standard)
183 + /* These relocs are a GNU extension. */
184 + HOWTO(R_386_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
185 + bfd_elf_generic_reloc, "R_386_TLS_TPOFF",
186 + TRUE, 0xffffffff, 0xffffffff, FALSE),
187 + HOWTO(R_386_TLS_IE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
188 + bfd_elf_generic_reloc, "R_386_TLS_IE",
189 + TRUE, 0xffffffff, 0xffffffff, FALSE),
190 + HOWTO(R_386_TLS_GOTIE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
191 + bfd_elf_generic_reloc, "R_386_TLS_GOTIE",
192 + TRUE, 0xffffffff, 0xffffffff, FALSE),
193 + HOWTO(R_386_TLS_LE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
194 + bfd_elf_generic_reloc, "R_386_TLS_LE",
195 + TRUE, 0xffffffff, 0xffffffff, FALSE),
196 + HOWTO(R_386_TLS_GD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
197 + bfd_elf_generic_reloc, "R_386_TLS_GD",
198 + TRUE, 0xffffffff, 0xffffffff, FALSE),
199 + HOWTO(R_386_TLS_LDM, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
200 + bfd_elf_generic_reloc, "R_386_TLS_LDM",
201 + TRUE, 0xffffffff, 0xffffffff, FALSE),
202 + HOWTO(R_386_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
203 + bfd_elf_generic_reloc, "R_386_16",
204 + TRUE, 0xffff, 0xffff, FALSE),
205 + HOWTO(R_386_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield,
206 + bfd_elf_generic_reloc, "R_386_PC16",
207 + TRUE, 0xffff, 0xffff, TRUE),
208 + HOWTO(R_386_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
209 + bfd_elf_generic_reloc, "R_386_8",
210 + TRUE, 0xff, 0xff, FALSE),
211 + HOWTO(R_386_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed,
212 + bfd_elf_generic_reloc, "R_386_PC8",
213 + TRUE, 0xff, 0xff, TRUE),
215 +#define R_386_ext (R_386_PC8 + 1 - R_386_ext_offset)
216 +#define R_386_tls_offset (R_386_TLS_LDO_32 - R_386_ext)
217 + /* These are common with Solaris TLS implementation. */
218 + HOWTO(R_386_TLS_LDO_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
219 + bfd_elf_generic_reloc, "R_386_TLS_LDO_32",
220 + TRUE, 0xffffffff, 0xffffffff, FALSE),
221 + HOWTO(R_386_TLS_IE_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
222 + bfd_elf_generic_reloc, "R_386_TLS_IE_32",
223 + TRUE, 0xffffffff, 0xffffffff, FALSE),
224 + HOWTO(R_386_TLS_LE_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
225 + bfd_elf_generic_reloc, "R_386_TLS_LE_32",
226 + TRUE, 0xffffffff, 0xffffffff, FALSE),
227 + HOWTO(R_386_TLS_DTPMOD32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
228 + bfd_elf_generic_reloc, "R_386_TLS_DTPMOD32",
229 + TRUE, 0xffffffff, 0xffffffff, FALSE),
230 + HOWTO(R_386_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
231 + bfd_elf_generic_reloc, "R_386_TLS_DTPOFF32",
232 + TRUE, 0xffffffff, 0xffffffff, FALSE),
233 + HOWTO(R_386_TLS_TPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
234 + bfd_elf_generic_reloc, "R_386_TLS_TPOFF32",
235 + TRUE, 0xffffffff, 0xffffffff, FALSE),
236 + EMPTY_HOWTO (38),
237 + HOWTO(R_386_TLS_GOTDESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
238 + bfd_elf_generic_reloc, "R_386_TLS_GOTDESC",
239 + TRUE, 0xffffffff, 0xffffffff, FALSE),
240 + HOWTO(R_386_TLS_DESC_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
241 + bfd_elf_generic_reloc, "R_386_TLS_DESC_CALL",
242 + FALSE, 0, 0, FALSE),
243 + HOWTO(R_386_TLS_DESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
244 + bfd_elf_generic_reloc, "R_386_TLS_DESC",
245 + TRUE, 0xffffffff, 0xffffffff, FALSE),
247 + /* Another gap. */
248 +#define R_386_tls (R_386_TLS_DESC + 1 - R_386_tls_offset)
249 +#define R_386_vt_offset (R_386_GNU_VTINHERIT - R_386_tls)
251 +/* GNU extension to record C++ vtable hierarchy. */
252 + HOWTO (R_386_GNU_VTINHERIT, /* type */
253 + 0, /* rightshift */
254 + 2, /* size (0 = byte, 1 = short, 2 = long) */
255 + 0, /* bitsize */
256 + FALSE, /* pc_relative */
257 + 0, /* bitpos */
258 + complain_overflow_dont, /* complain_on_overflow */
259 + NULL, /* special_function */
260 + "R_386_GNU_VTINHERIT", /* name */
261 + FALSE, /* partial_inplace */
262 + 0, /* src_mask */
263 + 0, /* dst_mask */
264 + FALSE), /* pcrel_offset */
266 +/* GNU extension to record C++ vtable member usage. */
267 + HOWTO (R_386_GNU_VTENTRY, /* type */
268 + 0, /* rightshift */
269 + 2, /* size (0 = byte, 1 = short, 2 = long) */
270 + 0, /* bitsize */
271 + FALSE, /* pc_relative */
272 + 0, /* bitpos */
273 + complain_overflow_dont, /* complain_on_overflow */
274 + _bfd_elf_rel_vtable_reloc_fn, /* special_function */
275 + "R_386_GNU_VTENTRY", /* name */
276 + FALSE, /* partial_inplace */
277 + 0, /* src_mask */
278 + 0, /* dst_mask */
279 + FALSE) /* pcrel_offset */
281 +#define R_386_vt (R_386_GNU_VTENTRY + 1 - R_386_vt_offset)
285 +#ifdef DEBUG_GEN_RELOC
286 +#define TRACE(str) \
287 + fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str)
288 +#else
289 +#define TRACE(str)
290 +#endif
292 +static reloc_howto_type *
293 +elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
294 + bfd_reloc_code_real_type code)
296 + switch (code)
298 + case BFD_RELOC_NONE:
299 + TRACE ("BFD_RELOC_NONE");
300 + return &elf_howto_table[R_386_NONE];
302 + case BFD_RELOC_32:
303 + TRACE ("BFD_RELOC_32");
304 + return &elf_howto_table[R_386_32];
306 + case BFD_RELOC_CTOR:
307 + TRACE ("BFD_RELOC_CTOR");
308 + return &elf_howto_table[R_386_32];
310 + case BFD_RELOC_32_PCREL:
311 + TRACE ("BFD_RELOC_PC32");
312 + return &elf_howto_table[R_386_PC32];
314 + case BFD_RELOC_386_GOT32:
315 + TRACE ("BFD_RELOC_386_GOT32");
316 + return &elf_howto_table[R_386_GOT32];
318 + case BFD_RELOC_386_PLT32:
319 + TRACE ("BFD_RELOC_386_PLT32");
320 + return &elf_howto_table[R_386_PLT32];
322 + case BFD_RELOC_386_COPY:
323 + TRACE ("BFD_RELOC_386_COPY");
324 + return &elf_howto_table[R_386_COPY];
326 + case BFD_RELOC_386_GLOB_DAT:
327 + TRACE ("BFD_RELOC_386_GLOB_DAT");
328 + return &elf_howto_table[R_386_GLOB_DAT];
330 + case BFD_RELOC_386_JUMP_SLOT:
331 + TRACE ("BFD_RELOC_386_JUMP_SLOT");
332 + return &elf_howto_table[R_386_JUMP_SLOT];
334 + case BFD_RELOC_386_RELATIVE:
335 + TRACE ("BFD_RELOC_386_RELATIVE");
336 + return &elf_howto_table[R_386_RELATIVE];
338 + case BFD_RELOC_386_GOTOFF:
339 + TRACE ("BFD_RELOC_386_GOTOFF");
340 + return &elf_howto_table[R_386_GOTOFF];
342 + case BFD_RELOC_386_GOTPC:
343 + TRACE ("BFD_RELOC_386_GOTPC");
344 + return &elf_howto_table[R_386_GOTPC];
346 + /* These relocs are a GNU extension. */
347 + case BFD_RELOC_386_TLS_TPOFF:
348 + TRACE ("BFD_RELOC_386_TLS_TPOFF");
349 + return &elf_howto_table[R_386_TLS_TPOFF - R_386_ext_offset];
351 + case BFD_RELOC_386_TLS_IE:
352 + TRACE ("BFD_RELOC_386_TLS_IE");
353 + return &elf_howto_table[R_386_TLS_IE - R_386_ext_offset];
355 + case BFD_RELOC_386_TLS_GOTIE:
356 + TRACE ("BFD_RELOC_386_TLS_GOTIE");
357 + return &elf_howto_table[R_386_TLS_GOTIE - R_386_ext_offset];
359 + case BFD_RELOC_386_TLS_LE:
360 + TRACE ("BFD_RELOC_386_TLS_LE");
361 + return &elf_howto_table[R_386_TLS_LE - R_386_ext_offset];
363 + case BFD_RELOC_386_TLS_GD:
364 + TRACE ("BFD_RELOC_386_TLS_GD");
365 + return &elf_howto_table[R_386_TLS_GD - R_386_ext_offset];
367 + case BFD_RELOC_386_TLS_LDM:
368 + TRACE ("BFD_RELOC_386_TLS_LDM");
369 + return &elf_howto_table[R_386_TLS_LDM - R_386_ext_offset];
371 + case BFD_RELOC_16:
372 + TRACE ("BFD_RELOC_16");
373 + return &elf_howto_table[R_386_16 - R_386_ext_offset];
375 + case BFD_RELOC_16_PCREL:
376 + TRACE ("BFD_RELOC_16_PCREL");
377 + return &elf_howto_table[R_386_PC16 - R_386_ext_offset];
379 + case BFD_RELOC_8:
380 + TRACE ("BFD_RELOC_8");
381 + return &elf_howto_table[R_386_8 - R_386_ext_offset];
383 + case BFD_RELOC_8_PCREL:
384 + TRACE ("BFD_RELOC_8_PCREL");
385 + return &elf_howto_table[R_386_PC8 - R_386_ext_offset];
387 + /* Common with Sun TLS implementation. */
388 + case BFD_RELOC_386_TLS_LDO_32:
389 + TRACE ("BFD_RELOC_386_TLS_LDO_32");
390 + return &elf_howto_table[R_386_TLS_LDO_32 - R_386_tls_offset];
392 + case BFD_RELOC_386_TLS_IE_32:
393 + TRACE ("BFD_RELOC_386_TLS_IE_32");
394 + return &elf_howto_table[R_386_TLS_IE_32 - R_386_tls_offset];
396 + case BFD_RELOC_386_TLS_LE_32:
397 + TRACE ("BFD_RELOC_386_TLS_LE_32");
398 + return &elf_howto_table[R_386_TLS_LE_32 - R_386_tls_offset];
400 + case BFD_RELOC_386_TLS_DTPMOD32:
401 + TRACE ("BFD_RELOC_386_TLS_DTPMOD32");
402 + return &elf_howto_table[R_386_TLS_DTPMOD32 - R_386_tls_offset];
404 + case BFD_RELOC_386_TLS_DTPOFF32:
405 + TRACE ("BFD_RELOC_386_TLS_DTPOFF32");
406 + return &elf_howto_table[R_386_TLS_DTPOFF32 - R_386_tls_offset];
408 + case BFD_RELOC_386_TLS_TPOFF32:
409 + TRACE ("BFD_RELOC_386_TLS_TPOFF32");
410 + return &elf_howto_table[R_386_TLS_TPOFF32 - R_386_tls_offset];
412 + case BFD_RELOC_386_TLS_GOTDESC:
413 + TRACE ("BFD_RELOC_386_TLS_GOTDESC");
414 + return &elf_howto_table[R_386_TLS_GOTDESC - R_386_tls_offset];
416 + case BFD_RELOC_386_TLS_DESC_CALL:
417 + TRACE ("BFD_RELOC_386_TLS_DESC_CALL");
418 + return &elf_howto_table[R_386_TLS_DESC_CALL - R_386_tls_offset];
420 + case BFD_RELOC_386_TLS_DESC:
421 + TRACE ("BFD_RELOC_386_TLS_DESC");
422 + return &elf_howto_table[R_386_TLS_DESC - R_386_tls_offset];
424 + case BFD_RELOC_VTABLE_INHERIT:
425 + TRACE ("BFD_RELOC_VTABLE_INHERIT");
426 + return &elf_howto_table[R_386_GNU_VTINHERIT - R_386_vt_offset];
428 + case BFD_RELOC_VTABLE_ENTRY:
429 + TRACE ("BFD_RELOC_VTABLE_ENTRY");
430 + return &elf_howto_table[R_386_GNU_VTENTRY - R_386_vt_offset];
432 + default:
433 + break;
436 + TRACE ("Unknown");
437 + return 0;
440 +static reloc_howto_type *
441 +elf_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
442 + const char *r_name)
444 + unsigned int i;
446 + for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
447 + if (elf_howto_table[i].name != NULL
448 + && strcasecmp (elf_howto_table[i].name, r_name) == 0)
449 + return &elf_howto_table[i];
451 + return NULL;
454 +static void
455 +elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
456 + arelent *cache_ptr,
457 + Elf_Internal_Rela *dst)
459 + unsigned int r_type = ELF32_R_TYPE (dst->r_info);
460 + unsigned int indx;
462 + if ((indx = r_type) >= R_386_standard
463 + && ((indx = r_type - R_386_ext_offset) - R_386_standard
464 + >= R_386_ext - R_386_standard)
465 + && ((indx = r_type - R_386_tls_offset) - R_386_ext
466 + >= R_386_tls - R_386_ext)
467 + && ((indx = r_type - R_386_vt_offset) - R_386_tls
468 + >= R_386_vt - R_386_tls))
470 + (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
471 + abfd, (int) r_type);
472 + indx = R_386_NONE;
474 + cache_ptr->howto = &elf_howto_table[indx];
477 +/* Return whether a symbol name implies a local label. The UnixWare
478 + 2.1 cc generates temporary symbols that start with .X, so we
479 + recognize them here. FIXME: do other SVR4 compilers also use .X?.
480 + If so, we should move the .X recognition into
481 + _bfd_elf_is_local_label_name. */
483 +static bfd_boolean
484 +elf_i386_is_local_label_name (bfd *abfd, const char *name)
486 + if (name[0] == '.' && name[1] == 'X')
487 + return TRUE;
489 + return _bfd_elf_is_local_label_name (abfd, name);
492 +/* Support for core dump NOTE sections. */
494 +static bfd_boolean
495 +elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
497 + int offset;
498 + size_t size;
500 + if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0)
502 + int pr_version = bfd_get_32 (abfd, note->descdata);
504 + if (pr_version != 1)
505 + return FALSE;
507 + /* pr_cursig */
508 + elf_tdata (abfd)->core_signal = bfd_get_32 (abfd, note->descdata + 20);
510 + /* pr_pid */
511 + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
513 + /* pr_reg */
514 + offset = 28;
515 + size = bfd_get_32 (abfd, note->descdata + 8);
517 + else
519 + switch (note->descsz)
521 + default:
522 + return FALSE;
524 + case 144: /* Linux/i386 */
525 + /* pr_cursig */
526 + elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
528 + /* pr_pid */
529 + elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
531 + /* pr_reg */
532 + offset = 72;
533 + size = 68;
535 + break;
539 + /* Make a ".reg/999" section. */
540 + return _bfd_elfcore_make_pseudosection (abfd, ".reg",
541 + size, note->descpos + offset);
544 +static bfd_boolean
545 +elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
547 + if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0)
549 + int pr_version = bfd_get_32 (abfd, note->descdata);
551 + if (pr_version != 1)
552 + return FALSE;
554 + elf_tdata (abfd)->core_program
555 + = _bfd_elfcore_strndup (abfd, note->descdata + 8, 17);
556 + elf_tdata (abfd)->core_command
557 + = _bfd_elfcore_strndup (abfd, note->descdata + 25, 81);
559 + else
561 + switch (note->descsz)
563 + default:
564 + return FALSE;
566 + case 124: /* Linux/i386 elf_prpsinfo. */
567 + elf_tdata (abfd)->core_program
568 + = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
569 + elf_tdata (abfd)->core_command
570 + = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
574 + /* Note that for some reason, a spurious space is tacked
575 + onto the end of the args in some (at least one anyway)
576 + implementations, so strip it off if it exists. */
578 + char *command = elf_tdata (abfd)->core_command;
579 + int n = strlen (command);
581 + if (0 < n && command[n - 1] == ' ')
582 + command[n - 1] = '\0';
585 + return TRUE;
588 +/* Functions for the i386 ELF linker.
590 + In order to gain some understanding of code in this file without
591 + knowing all the intricate details of the linker, note the
592 + following:
594 + Functions named elf_i386_* are called by external routines, other
595 + functions are only called locally. elf_i386_* functions appear
596 + in this file more or less in the order in which they are called
597 + from external routines. eg. elf_i386_check_relocs is called
598 + early in the link process, elf_i386_finish_dynamic_sections is
599 + one of the last functions. */
602 +/* The name of the dynamic interpreter. This is put in the .interp
603 + section. */
605 +#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
607 +/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
608 + copying dynamic variables from a shared lib into an app's dynbss
609 + section, and instead use a dynamic relocation to point into the
610 + shared lib. */
611 +#define ELIMINATE_COPY_RELOCS 1
613 +/* The size in bytes of an entry in the procedure linkage table. */
615 +#define PLT_ENTRY_SIZE 64
617 +/* The first entry in an absolute procedure linkage table looks like
618 + this. See the SVR4 ABI i386 supplement to see how this works.
619 + Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
621 +static const bfd_byte elf_i386_plt0_entry[18] =
623 + 0xff, 0x35, /* pushl contents of address */
624 +#define elf_i386_plt0_entry_offset1 2
625 + 0, 0, 0, 0, /* replaced with address of .got + 4. */
626 + 0xb9, /* movl address, %ecx */
627 +#define elf_i386_plt0_entry_offset2 7
628 + 0, 0, 0, 0, /* replaced with address of .got + 8. */
629 + 0x8b, 0x09, /* mov (%ecx), %ecx */
630 + 0x83, 0xe1, 0xe0, /* andl %ecx, NACLMASK */
631 + 0xff, 0xe1 /* jmp *%ecx */
634 +/* Subsequent entries in an absolute procedure linkage table look like
635 + this. */
637 +static const bfd_byte elf_i386_plt_entry[PLT_ENTRY_SIZE] =
639 + 0xb9, /* movl address, %ecx */
640 +#define elf_i386_plt_entry_offset1 1
641 + 0, 0, 0, 0, /* replaced with address of this symbol in .got. */
642 + 0x8b, 0x09, /* mov (%ecx), %ecx */
643 + 0x83, 0xe1, 0xe0, /* andl %ecx, NACLMASK */
644 + 0xff, 0xe1, /* jmp *%ecx */
645 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
646 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
647 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
648 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
649 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
650 +#define elf_i386_plt_entry_offset2 32
651 + 0x68, /* pushl immediate */
652 +#define elf_i386_plt_entry_offset3 33
653 + 0, 0, 0, 0, /* replaced with offset into relocation table. */
654 + 0xe9, /* jmp relative */
655 +#define elf_i386_plt_entry_offset4 38
656 + 0, 0, 0, 0, /* replaced with offset to start of .plt. */
657 +#define elf_i386_plt_entry_offset5 42
658 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
659 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
660 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
661 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
662 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
663 + 0xf4, 0xf4 /* fill with hlt instructions. */
666 +/* The first entry in a PIC procedure linkage table look like this.
667 + Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
669 +static const bfd_byte elf_i386_pic_plt0_entry[12] =
671 + 0xff, 0xb3, 4, 0, 0, 0, /* pushl 4(%ebx) */
672 + 0xff, 0xa3, 8, 0, 0, 0 /* jmp *8(%ebx) */
675 +/* Subsequent entries in a PIC procedure linkage table look like this. */
677 +static const bfd_byte elf_i386_pic_plt_entry[PLT_ENTRY_SIZE] =
679 + 0x8b, 0x8b, /* movl offset(%ebx), %ecx */
680 + 0, 0, 0, 0, /* replaced with offset of this symbol in .got. */
681 + 0x83, 0xe1, 0xe0, /* andl %ecx, NACLMASK */
682 + 0xff, 0xe1, /* jmp *%ecx */
683 + 0x68, /* pushl immediate */
684 + 0, 0, 0, 0, /* replaced with offset into relocation table. */
685 + 0xe9, /* jmp relative */
686 + 0, 0, 0, 0, /* replaced with offset to start of .plt. */
687 + 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
688 + 0xf4, 0xf4, 0xf4, 0xf4, /* fill with hlt instructions. */
689 + 0xf4, 0xf4, 0xf4, 0xf4 /* fill with hlt instructions. */
692 +/* On VxWorks, the .rel.plt.unloaded section has absolute relocations
693 + for the PLTResolve stub and then for each PLT entry. */
694 +#define PLTRESOLVE_RELOCS_SHLIB 0
695 +#define PLTRESOLVE_RELOCS 2
696 +#define PLT_NON_JUMP_SLOT_RELOCS 2
698 +/* The i386 linker needs to keep track of the number of relocs that it
699 + decides to copy as dynamic relocs in check_relocs for each symbol.
700 + This is so that it can later discard them if they are found to be
701 + unnecessary. We store the information in a field extending the
702 + regular ELF linker hash table. */
704 +struct elf_i386_dyn_relocs
706 + struct elf_i386_dyn_relocs *next;
708 + /* The input section of the reloc. */
709 + asection *sec;
711 + /* Total number of relocs copied for the input section. */
712 + bfd_size_type count;
714 + /* Number of pc-relative relocs copied for the input section. */
715 + bfd_size_type pc_count;
718 +/* i386 ELF linker hash entry. */
720 +struct elf_i386_link_hash_entry
722 + struct elf_link_hash_entry elf;
724 + /* Track dynamic relocs copied for this symbol. */
725 + struct elf_i386_dyn_relocs *dyn_relocs;
727 +#define GOT_UNKNOWN 0
728 +#define GOT_NORMAL 1
729 +#define GOT_TLS_GD 2
730 +#define GOT_TLS_IE 4
731 +#define GOT_TLS_IE_POS 5
732 +#define GOT_TLS_IE_NEG 6
733 +#define GOT_TLS_IE_BOTH 7
734 +#define GOT_TLS_GDESC 8
735 +#define GOT_TLS_GD_BOTH_P(type) \
736 + ((type) == (GOT_TLS_GD | GOT_TLS_GDESC))
737 +#define GOT_TLS_GD_P(type) \
738 + ((type) == GOT_TLS_GD || GOT_TLS_GD_BOTH_P (type))
739 +#define GOT_TLS_GDESC_P(type) \
740 + ((type) == GOT_TLS_GDESC || GOT_TLS_GD_BOTH_P (type))
741 +#define GOT_TLS_GD_ANY_P(type) \
742 + (GOT_TLS_GD_P (type) || GOT_TLS_GDESC_P (type))
743 + unsigned char tls_type;
745 + /* Offset of the GOTPLT entry reserved for the TLS descriptor,
746 + starting at the end of the jump table. */
747 + bfd_vma tlsdesc_got;
750 +#define elf_i386_hash_entry(ent) ((struct elf_i386_link_hash_entry *)(ent))
752 +struct elf_i386_obj_tdata
754 + struct elf_obj_tdata root;
756 + /* tls_type for each local got entry. */
757 + char *local_got_tls_type;
759 + /* GOTPLT entries for TLS descriptors. */
760 + bfd_vma *local_tlsdesc_gotent;
763 +#define elf_i386_tdata(abfd) \
764 + ((struct elf_i386_obj_tdata *) (abfd)->tdata.any)
766 +#define elf_i386_local_got_tls_type(abfd) \
767 + (elf_i386_tdata (abfd)->local_got_tls_type)
769 +#define elf_i386_local_tlsdesc_gotent(abfd) \
770 + (elf_i386_tdata (abfd)->local_tlsdesc_gotent)
772 +static bfd_boolean
773 +elf_i386_mkobject (bfd *abfd)
775 + if (abfd->tdata.any == NULL)
777 + bfd_size_type amt = sizeof (struct elf_i386_obj_tdata);
778 + abfd->tdata.any = bfd_zalloc (abfd, amt);
779 + if (abfd->tdata.any == NULL)
780 + return FALSE;
782 + return bfd_elf_mkobject (abfd);
785 +/* i386 ELF linker hash table. */
787 +struct elf_i386_link_hash_table
789 + struct elf_link_hash_table elf;
791 + /* Short-cuts to get to dynamic linker sections. */
792 + asection *sgot;
793 + asection *sgotplt;
794 + asection *srelgot;
795 + asection *splt;
796 + asection *srelplt;
797 + asection *sdynbss;
798 + asection *srelbss;
800 + /* The (unloaded but important) .rel.plt.unloaded section on VxWorks. */
801 + asection *srelplt2;
803 + /* True if the target system is VxWorks. */
804 + int is_vxworks;
806 + /* Value used to fill the last word of the first plt entry. */
807 + bfd_byte plt0_pad_byte;
809 + /* The index of the next unused R_386_TLS_DESC slot in .rel.plt. */
810 + bfd_vma next_tls_desc_index;
812 + union {
813 + bfd_signed_vma refcount;
814 + bfd_vma offset;
815 + } tls_ldm_got;
817 + /* The amount of space used by the reserved portion of the sgotplt
818 + section, plus whatever space is used by the jump slots. */
819 + bfd_vma sgotplt_jump_table_size;
821 + /* Small local sym to section mapping cache. */
822 + struct sym_sec_cache sym_sec;
825 +/* Get the i386 ELF linker hash table from a link_info structure. */
827 +#define elf_i386_hash_table(p) \
828 + ((struct elf_i386_link_hash_table *) ((p)->hash))
830 +#define elf_i386_compute_jump_table_size(htab) \
831 + ((htab)->next_tls_desc_index * 4)
833 +/* Create an entry in an i386 ELF linker hash table. */
835 +static struct bfd_hash_entry *
836 +link_hash_newfunc (struct bfd_hash_entry *entry,
837 + struct bfd_hash_table *table,
838 + const char *string)
840 + /* Allocate the structure if it has not already been allocated by a
841 + subclass. */
842 + if (entry == NULL)
844 + entry = bfd_hash_allocate (table,
845 + sizeof (struct elf_i386_link_hash_entry));
846 + if (entry == NULL)
847 + return entry;
850 + /* Call the allocation method of the superclass. */
851 + entry = _bfd_elf_link_hash_newfunc (entry, table, string);
852 + if (entry != NULL)
854 + struct elf_i386_link_hash_entry *eh;
856 + eh = (struct elf_i386_link_hash_entry *) entry;
857 + eh->dyn_relocs = NULL;
858 + eh->tls_type = GOT_UNKNOWN;
859 + eh->tlsdesc_got = (bfd_vma) -1;
862 + return entry;
865 +/* Create an i386 ELF linker hash table. */
867 +static struct bfd_link_hash_table *
868 +elf_i386_link_hash_table_create (bfd *abfd)
870 + struct elf_i386_link_hash_table *ret;
871 + bfd_size_type amt = sizeof (struct elf_i386_link_hash_table);
873 + ret = bfd_malloc (amt);
874 + if (ret == NULL)
875 + return NULL;
877 + if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc,
878 + sizeof (struct elf_i386_link_hash_entry)))
880 + free (ret);
881 + return NULL;
884 + ret->sgot = NULL;
885 + ret->sgotplt = NULL;
886 + ret->srelgot = NULL;
887 + ret->splt = NULL;
888 + ret->srelplt = NULL;
889 + ret->sdynbss = NULL;
890 + ret->srelbss = NULL;
891 + ret->tls_ldm_got.refcount = 0;
892 + ret->next_tls_desc_index = 0;
893 + ret->sgotplt_jump_table_size = 0;
894 + ret->sym_sec.abfd = NULL;
895 + ret->is_vxworks = 0;
896 + ret->srelplt2 = NULL;
897 + ret->plt0_pad_byte = 0xf4;
899 + return &ret->elf.root;
902 +/* Create .got, .gotplt, and .rel.got sections in DYNOBJ, and set up
903 + shortcuts to them in our hash table. */
905 +static bfd_boolean
906 +create_got_section (bfd *dynobj, struct bfd_link_info *info)
908 + struct elf_i386_link_hash_table *htab;
910 + if (! _bfd_elf_create_got_section (dynobj, info))
911 + return FALSE;
913 + htab = elf_i386_hash_table (info);
914 + htab->sgot = bfd_get_section_by_name (dynobj, ".got");
915 + htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
916 + if (!htab->sgot || !htab->sgotplt)
917 + abort ();
919 + htab->srelgot = bfd_make_section_with_flags (dynobj, ".rel.got",
920 + (SEC_ALLOC | SEC_LOAD
921 + | SEC_HAS_CONTENTS
922 + | SEC_IN_MEMORY
923 + | SEC_LINKER_CREATED
924 + | SEC_READONLY));
925 + if (htab->srelgot == NULL
926 + || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
927 + return FALSE;
928 + return TRUE;
931 +/* Create .plt, .rel.plt, .got, .got.plt, .rel.got, .dynbss, and
932 + .rel.bss sections in DYNOBJ, and set up shortcuts to them in our
933 + hash table. */
935 +static bfd_boolean
936 +elf_i386_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info)
938 + struct elf_i386_link_hash_table *htab;
940 + htab = elf_i386_hash_table (info);
941 + if (!htab->sgot && !create_got_section (dynobj, info))
942 + return FALSE;
944 + if (!_bfd_elf_create_dynamic_sections (dynobj, info))
945 + return FALSE;
947 + htab->splt = bfd_get_section_by_name (dynobj, ".plt");
948 + htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt");
949 + htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
950 + if (!info->shared)
951 + htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss");
953 + if (!htab->splt || !htab->srelplt || !htab->sdynbss
954 + || (!info->shared && !htab->srelbss))
955 + abort ();
957 + if (!bfd_set_section_alignment(dynobj, htab->splt, 5))
958 + return FALSE;
960 + if (htab->is_vxworks
961 + && !elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
962 + return FALSE;
964 + return TRUE;
967 +/* Copy the extra info we tack onto an elf_link_hash_entry. */
969 +static void
970 +elf_i386_copy_indirect_symbol (struct bfd_link_info *info,
971 + struct elf_link_hash_entry *dir,
972 + struct elf_link_hash_entry *ind)
974 + struct elf_i386_link_hash_entry *edir, *eind;
976 + edir = (struct elf_i386_link_hash_entry *) dir;
977 + eind = (struct elf_i386_link_hash_entry *) ind;
979 + if (eind->dyn_relocs != NULL)
981 + if (edir->dyn_relocs != NULL)
983 + struct elf_i386_dyn_relocs **pp;
984 + struct elf_i386_dyn_relocs *p;
986 + /* Add reloc counts against the indirect sym to the direct sym
987 + list. Merge any entries against the same section. */
988 + for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
990 + struct elf_i386_dyn_relocs *q;
992 + for (q = edir->dyn_relocs; q != NULL; q = q->next)
993 + if (q->sec == p->sec)
995 + q->pc_count += p->pc_count;
996 + q->count += p->count;
997 + *pp = p->next;
998 + break;
1000 + if (q == NULL)
1001 + pp = &p->next;
1003 + *pp = edir->dyn_relocs;
1006 + edir->dyn_relocs = eind->dyn_relocs;
1007 + eind->dyn_relocs = NULL;
1010 + if (ind->root.type == bfd_link_hash_indirect
1011 + && dir->got.refcount <= 0)
1013 + edir->tls_type = eind->tls_type;
1014 + eind->tls_type = GOT_UNKNOWN;
1017 + if (ELIMINATE_COPY_RELOCS
1018 + && ind->root.type != bfd_link_hash_indirect
1019 + && dir->dynamic_adjusted)
1021 + /* If called to transfer flags for a weakdef during processing
1022 + of elf_adjust_dynamic_symbol, don't copy non_got_ref.
1023 + We clear it ourselves for ELIMINATE_COPY_RELOCS. */
1024 + dir->ref_dynamic |= ind->ref_dynamic;
1025 + dir->ref_regular |= ind->ref_regular;
1026 + dir->ref_regular_nonweak |= ind->ref_regular_nonweak;
1027 + dir->needs_plt |= ind->needs_plt;
1028 + dir->pointer_equality_needed |= ind->pointer_equality_needed;
1030 + else
1031 + _bfd_elf_link_hash_copy_indirect (info, dir, ind);
1034 +static int
1035 +elf_i386_tls_transition (struct bfd_link_info *info, int r_type, int is_local)
1037 + if (info->shared)
1038 + return r_type;
1040 + switch (r_type)
1042 + case R_386_TLS_GD:
1043 + case R_386_TLS_GOTDESC:
1044 + case R_386_TLS_DESC_CALL:
1045 + case R_386_TLS_IE_32:
1046 + if (is_local)
1047 + return R_386_TLS_LE_32;
1048 + return R_386_TLS_IE_32;
1049 + case R_386_TLS_IE:
1050 + case R_386_TLS_GOTIE:
1051 + if (is_local)
1052 + return R_386_TLS_LE_32;
1053 + return r_type;
1054 + case R_386_TLS_LDM:
1055 + return R_386_TLS_LE_32;
1058 + return r_type;
1061 +/* Look through the relocs for a section during the first phase, and
1062 + calculate needed space in the global offset table, procedure linkage
1063 + table, and dynamic reloc sections. */
1065 +static bfd_boolean
1066 +elf_i386_check_relocs (bfd *abfd,
1067 + struct bfd_link_info *info,
1068 + asection *sec,
1069 + const Elf_Internal_Rela *relocs)
1071 + struct elf_i386_link_hash_table *htab;
1072 + Elf_Internal_Shdr *symtab_hdr;
1073 + struct elf_link_hash_entry **sym_hashes;
1074 + const Elf_Internal_Rela *rel;
1075 + const Elf_Internal_Rela *rel_end;
1076 + asection *sreloc;
1078 + if (info->relocatable)
1079 + return TRUE;
1081 + htab = elf_i386_hash_table (info);
1082 + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
1083 + sym_hashes = elf_sym_hashes (abfd);
1085 + sreloc = NULL;
1087 + rel_end = relocs + sec->reloc_count;
1088 + for (rel = relocs; rel < rel_end; rel++)
1090 + unsigned int r_type;
1091 + unsigned long r_symndx;
1092 + struct elf_link_hash_entry *h;
1094 + r_symndx = ELF32_R_SYM (rel->r_info);
1095 + r_type = ELF32_R_TYPE (rel->r_info);
1097 + if (r_symndx >= NUM_SHDR_ENTRIES (symtab_hdr))
1099 + (*_bfd_error_handler) (_("%B: bad symbol index: %d"),
1100 + abfd,
1101 + r_symndx);
1102 + return FALSE;
1105 + if (r_symndx < symtab_hdr->sh_info)
1106 + h = NULL;
1107 + else
1109 + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
1110 + while (h->root.type == bfd_link_hash_indirect
1111 + || h->root.type == bfd_link_hash_warning)
1112 + h = (struct elf_link_hash_entry *) h->root.u.i.link;
1115 + r_type = elf_i386_tls_transition (info, r_type, h == NULL);
1117 + switch (r_type)
1119 + case R_386_TLS_LDM:
1120 + htab->tls_ldm_got.refcount += 1;
1121 + goto create_got;
1123 + case R_386_PLT32:
1124 + /* This symbol requires a procedure linkage table entry. We
1125 + actually build the entry in adjust_dynamic_symbol,
1126 + because this might be a case of linking PIC code which is
1127 + never referenced by a dynamic object, in which case we
1128 + don't need to generate a procedure linkage table entry
1129 + after all. */
1131 + /* If this is a local symbol, we resolve it directly without
1132 + creating a procedure linkage table entry. */
1133 + if (h == NULL)
1134 + continue;
1136 + h->needs_plt = 1;
1137 + h->plt.refcount += 1;
1138 + break;
1140 + case R_386_TLS_IE_32:
1141 + case R_386_TLS_IE:
1142 + case R_386_TLS_GOTIE:
1143 + if (info->shared)
1144 + info->flags |= DF_STATIC_TLS;
1145 + /* Fall through */
1147 + case R_386_GOT32:
1148 + case R_386_TLS_GD:
1149 + case R_386_TLS_GOTDESC:
1150 + case R_386_TLS_DESC_CALL:
1151 + /* This symbol requires a global offset table entry. */
1153 + int tls_type, old_tls_type;
1155 + switch (r_type)
1157 + default:
1158 + case R_386_GOT32: tls_type = GOT_NORMAL; break;
1159 + case R_386_TLS_GD: tls_type = GOT_TLS_GD; break;
1160 + case R_386_TLS_GOTDESC:
1161 + case R_386_TLS_DESC_CALL:
1162 + tls_type = GOT_TLS_GDESC; break;
1163 + case R_386_TLS_IE_32:
1164 + if (ELF32_R_TYPE (rel->r_info) == r_type)
1165 + tls_type = GOT_TLS_IE_NEG;
1166 + else
1167 + /* If this is a GD->IE transition, we may use either of
1168 + R_386_TLS_TPOFF and R_386_TLS_TPOFF32. */
1169 + tls_type = GOT_TLS_IE;
1170 + break;
1171 + case R_386_TLS_IE:
1172 + case R_386_TLS_GOTIE:
1173 + tls_type = GOT_TLS_IE_POS; break;
1176 + if (h != NULL)
1178 + h->got.refcount += 1;
1179 + old_tls_type = elf_i386_hash_entry(h)->tls_type;
1181 + else
1183 + bfd_signed_vma *local_got_refcounts;
1185 + /* This is a global offset table entry for a local symbol. */
1186 + local_got_refcounts = elf_local_got_refcounts (abfd);
1187 + if (local_got_refcounts == NULL)
1189 + bfd_size_type size;
1191 + size = symtab_hdr->sh_info;
1192 + size *= (sizeof (bfd_signed_vma)
1193 + + sizeof (bfd_vma) + sizeof(char));
1194 + local_got_refcounts = bfd_zalloc (abfd, size);
1195 + if (local_got_refcounts == NULL)
1196 + return FALSE;
1197 + elf_local_got_refcounts (abfd) = local_got_refcounts;
1198 + elf_i386_local_tlsdesc_gotent (abfd)
1199 + = (bfd_vma *) (local_got_refcounts + symtab_hdr->sh_info);
1200 + elf_i386_local_got_tls_type (abfd)
1201 + = (char *) (local_got_refcounts + 2 * symtab_hdr->sh_info);
1203 + local_got_refcounts[r_symndx] += 1;
1204 + old_tls_type = elf_i386_local_got_tls_type (abfd) [r_symndx];
1207 + if ((old_tls_type & GOT_TLS_IE) && (tls_type & GOT_TLS_IE))
1208 + tls_type |= old_tls_type;
1209 + /* If a TLS symbol is accessed using IE at least once,
1210 + there is no point to use dynamic model for it. */
1211 + else if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
1212 + && (! GOT_TLS_GD_ANY_P (old_tls_type)
1213 + || (tls_type & GOT_TLS_IE) == 0))
1215 + if ((old_tls_type & GOT_TLS_IE) && GOT_TLS_GD_ANY_P (tls_type))
1216 + tls_type = old_tls_type;
1217 + else if (GOT_TLS_GD_ANY_P (old_tls_type)
1218 + && GOT_TLS_GD_ANY_P (tls_type))
1219 + tls_type |= old_tls_type;
1220 + else
1222 + (*_bfd_error_handler)
1223 + (_("%B: `%s' accessed both as normal and "
1224 + "thread local symbol"),
1225 + abfd,
1226 + h ? h->root.root.string : "<local>");
1227 + return FALSE;
1231 + if (old_tls_type != tls_type)
1233 + if (h != NULL)
1234 + elf_i386_hash_entry (h)->tls_type = tls_type;
1235 + else
1236 + elf_i386_local_got_tls_type (abfd) [r_symndx] = tls_type;
1239 + /* Fall through */
1241 + case R_386_GOTOFF:
1242 + case R_386_GOTPC:
1243 + create_got:
1244 + if (htab->sgot == NULL)
1246 + if (htab->elf.dynobj == NULL)
1247 + htab->elf.dynobj = abfd;
1248 + if (!create_got_section (htab->elf.dynobj, info))
1249 + return FALSE;
1251 + if (r_type != R_386_TLS_IE)
1252 + break;
1253 + /* Fall through */
1255 + case R_386_TLS_LE_32:
1256 + case R_386_TLS_LE:
1257 + if (!info->shared)
1258 + break;
1259 + info->flags |= DF_STATIC_TLS;
1260 + /* Fall through */
1262 + case R_386_32:
1263 + case R_386_PC32:
1264 + if (h != NULL && !info->shared)
1266 + /* If this reloc is in a read-only section, we might
1267 + need a copy reloc. We can't check reliably at this
1268 + stage whether the section is read-only, as input
1269 + sections have not yet been mapped to output sections.
1270 + Tentatively set the flag for now, and correct in
1271 + adjust_dynamic_symbol. */
1272 + h->non_got_ref = 1;
1274 + /* We may need a .plt entry if the function this reloc
1275 + refers to is in a shared lib. */
1276 + h->plt.refcount += 1;
1277 + if (r_type != R_386_PC32)
1278 + h->pointer_equality_needed = 1;
1281 + /* If we are creating a shared library, and this is a reloc
1282 + against a global symbol, or a non PC relative reloc
1283 + against a local symbol, then we need to copy the reloc
1284 + into the shared library. However, if we are linking with
1285 + -Bsymbolic, we do not need to copy a reloc against a
1286 + global symbol which is defined in an object we are
1287 + including in the link (i.e., DEF_REGULAR is set). At
1288 + this point we have not seen all the input files, so it is
1289 + possible that DEF_REGULAR is not set now but will be set
1290 + later (it is never cleared). In case of a weak definition,
1291 + DEF_REGULAR may be cleared later by a strong definition in
1292 + a shared library. We account for that possibility below by
1293 + storing information in the relocs_copied field of the hash
1294 + table entry. A similar situation occurs when creating
1295 + shared libraries and symbol visibility changes render the
1296 + symbol local.
1298 + If on the other hand, we are creating an executable, we
1299 + may need to keep relocations for symbols satisfied by a
1300 + dynamic library if we manage to avoid copy relocs for the
1301 + symbol. */
1302 + if ((info->shared
1303 + && (sec->flags & SEC_ALLOC) != 0
1304 + && (r_type != R_386_PC32
1305 + || (h != NULL
1306 + && (! SYMBOLIC_BIND (info, h)
1307 + || h->root.type == bfd_link_hash_defweak
1308 + || !h->def_regular))))
1309 + || (ELIMINATE_COPY_RELOCS
1310 + && !info->shared
1311 + && (sec->flags & SEC_ALLOC) != 0
1312 + && h != NULL
1313 + && (h->root.type == bfd_link_hash_defweak
1314 + || !h->def_regular)))
1316 + struct elf_i386_dyn_relocs *p;
1317 + struct elf_i386_dyn_relocs **head;
1319 + /* We must copy these reloc types into the output file.
1320 + Create a reloc section in dynobj and make room for
1321 + this reloc. */
1322 + if (sreloc == NULL)
1324 + const char *name;
1325 + bfd *dynobj;
1326 + unsigned int strndx = elf_elfheader (abfd)->e_shstrndx;
1327 + unsigned int shnam = elf_section_data (sec)->rel_hdr.sh_name;
1329 + name = bfd_elf_string_from_elf_section (abfd, strndx, shnam);
1330 + if (name == NULL)
1331 + return FALSE;
1333 + if (! CONST_STRNEQ (name, ".rel")
1334 + || strcmp (bfd_get_section_name (abfd, sec),
1335 + name + 4) != 0)
1337 + (*_bfd_error_handler)
1338 + (_("%B: bad relocation section name `%s\'"),
1339 + abfd, name);
1342 + if (htab->elf.dynobj == NULL)
1343 + htab->elf.dynobj = abfd;
1345 + dynobj = htab->elf.dynobj;
1346 + sreloc = bfd_get_section_by_name (dynobj, name);
1347 + if (sreloc == NULL)
1349 + flagword flags;
1351 + flags = (SEC_HAS_CONTENTS | SEC_READONLY
1352 + | SEC_IN_MEMORY | SEC_LINKER_CREATED);
1353 + if ((sec->flags & SEC_ALLOC) != 0)
1354 + flags |= SEC_ALLOC | SEC_LOAD;
1355 + sreloc = bfd_make_section_with_flags (dynobj,
1356 + name,
1357 + flags);
1358 + if (sreloc == NULL
1359 + || ! bfd_set_section_alignment (dynobj, sreloc, 2))
1360 + return FALSE;
1362 + elf_section_data (sec)->sreloc = sreloc;
1365 + /* If this is a global symbol, we count the number of
1366 + relocations we need for this symbol. */
1367 + if (h != NULL)
1369 + head = &((struct elf_i386_link_hash_entry *) h)->dyn_relocs;
1371 + else
1373 + void **vpp;
1374 + /* Track dynamic relocs needed for local syms too.
1375 + We really need local syms available to do this
1376 + easily. Oh well. */
1378 + asection *s;
1379 + s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
1380 + sec, r_symndx);
1381 + if (s == NULL)
1382 + return FALSE;
1384 + vpp = &elf_section_data (s)->local_dynrel;
1385 + head = (struct elf_i386_dyn_relocs **)vpp;
1388 + p = *head;
1389 + if (p == NULL || p->sec != sec)
1391 + bfd_size_type amt = sizeof *p;
1392 + p = bfd_alloc (htab->elf.dynobj, amt);
1393 + if (p == NULL)
1394 + return FALSE;
1395 + p->next = *head;
1396 + *head = p;
1397 + p->sec = sec;
1398 + p->count = 0;
1399 + p->pc_count = 0;
1402 + p->count += 1;
1403 + if (r_type == R_386_PC32)
1404 + p->pc_count += 1;
1406 + break;
1408 + /* This relocation describes the C++ object vtable hierarchy.
1409 + Reconstruct it for later use during GC. */
1410 + case R_386_GNU_VTINHERIT:
1411 + BFD_ASSERT (h != NULL);
1412 + if (h != NULL
1413 + && !bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
1414 + return FALSE;
1415 + break;
1417 + /* This relocation describes which C++ vtable entries are actually
1418 + used. Record for later use during GC. */
1419 + case R_386_GNU_VTENTRY:
1420 + BFD_ASSERT (h != NULL);
1421 + if (h != NULL
1422 + && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
1423 + return FALSE;
1424 + break;
1426 + default:
1427 + break;
1431 + return TRUE;
1434 +/* Return the section that should be marked against GC for a given
1435 + relocation. */
1437 +static asection *
1438 +elf_i386_gc_mark_hook (asection *sec,
1439 + struct bfd_link_info *info,
1440 + Elf_Internal_Rela *rel,
1441 + struct elf_link_hash_entry *h,
1442 + Elf_Internal_Sym *sym)
1444 + if (h != NULL)
1445 + switch (ELF32_R_TYPE (rel->r_info))
1447 + case R_386_GNU_VTINHERIT:
1448 + case R_386_GNU_VTENTRY:
1449 + return NULL;
1452 + return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
1455 +/* Update the got entry reference counts for the section being removed. */
1457 +static bfd_boolean
1458 +elf_i386_gc_sweep_hook (bfd *abfd,
1459 + struct bfd_link_info *info,
1460 + asection *sec,
1461 + const Elf_Internal_Rela *relocs)
1463 + Elf_Internal_Shdr *symtab_hdr;
1464 + struct elf_link_hash_entry **sym_hashes;
1465 + bfd_signed_vma *local_got_refcounts;
1466 + const Elf_Internal_Rela *rel, *relend;
1468 + elf_section_data (sec)->local_dynrel = NULL;
1470 + symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
1471 + sym_hashes = elf_sym_hashes (abfd);
1472 + local_got_refcounts = elf_local_got_refcounts (abfd);
1474 + relend = relocs + sec->reloc_count;
1475 + for (rel = relocs; rel < relend; rel++)
1477 + unsigned long r_symndx;
1478 + unsigned int r_type;
1479 + struct elf_link_hash_entry *h = NULL;
1481 + r_symndx = ELF32_R_SYM (rel->r_info);
1482 + if (r_symndx >= symtab_hdr->sh_info)
1484 + struct elf_i386_link_hash_entry *eh;
1485 + struct elf_i386_dyn_relocs **pp;
1486 + struct elf_i386_dyn_relocs *p;
1488 + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
1489 + while (h->root.type == bfd_link_hash_indirect
1490 + || h->root.type == bfd_link_hash_warning)
1491 + h = (struct elf_link_hash_entry *) h->root.u.i.link;
1492 + eh = (struct elf_i386_link_hash_entry *) h;
1494 + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
1495 + if (p->sec == sec)
1497 + /* Everything must go for SEC. */
1498 + *pp = p->next;
1499 + break;
1503 + r_type = ELF32_R_TYPE (rel->r_info);
1504 + r_type = elf_i386_tls_transition (info, r_type, h != NULL);
1505 + switch (r_type)
1507 + case R_386_TLS_LDM:
1508 + if (elf_i386_hash_table (info)->tls_ldm_got.refcount > 0)
1509 + elf_i386_hash_table (info)->tls_ldm_got.refcount -= 1;
1510 + break;
1512 + case R_386_TLS_GD:
1513 + case R_386_TLS_GOTDESC:
1514 + case R_386_TLS_DESC_CALL:
1515 + case R_386_TLS_IE_32:
1516 + case R_386_TLS_IE:
1517 + case R_386_TLS_GOTIE:
1518 + case R_386_GOT32:
1519 + if (h != NULL)
1521 + if (h->got.refcount > 0)
1522 + h->got.refcount -= 1;
1524 + else if (local_got_refcounts != NULL)
1526 + if (local_got_refcounts[r_symndx] > 0)
1527 + local_got_refcounts[r_symndx] -= 1;
1529 + break;
1531 + case R_386_32:
1532 + case R_386_PC32:
1533 + if (info->shared)
1534 + break;
1535 + /* Fall through */
1537 + case R_386_PLT32:
1538 + if (h != NULL)
1540 + if (h->plt.refcount > 0)
1541 + h->plt.refcount -= 1;
1543 + break;
1545 + default:
1546 + break;
1550 + return TRUE;
1553 +/* Adjust a symbol defined by a dynamic object and referenced by a
1554 + regular object. The current definition is in some section of the
1555 + dynamic object, but we're not including those sections. We have to
1556 + change the definition to something the rest of the link can
1557 + understand. */
1559 +static bfd_boolean
1560 +elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
1561 + struct elf_link_hash_entry *h)
1563 + struct elf_i386_link_hash_table *htab;
1564 + asection *s;
1566 + /* If this is a function, put it in the procedure linkage table. We
1567 + will fill in the contents of the procedure linkage table later,
1568 + when we know the address of the .got section. */
1569 + if (h->type == STT_FUNC
1570 + || h->needs_plt)
1572 + if (h->plt.refcount <= 0
1573 + || SYMBOL_CALLS_LOCAL (info, h)
1574 + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
1575 + && h->root.type == bfd_link_hash_undefweak))
1577 + /* This case can occur if we saw a PLT32 reloc in an input
1578 + file, but the symbol was never referred to by a dynamic
1579 + object, or if all references were garbage collected. In
1580 + such a case, we don't actually need to build a procedure
1581 + linkage table, and we can just do a PC32 reloc instead. */
1582 + h->plt.offset = (bfd_vma) -1;
1583 + h->needs_plt = 0;
1586 + return TRUE;
1588 + else
1589 + /* It's possible that we incorrectly decided a .plt reloc was
1590 + needed for an R_386_PC32 reloc to a non-function sym in
1591 + check_relocs. We can't decide accurately between function and
1592 + non-function syms in check-relocs; Objects loaded later in
1593 + the link may change h->type. So fix it now. */
1594 + h->plt.offset = (bfd_vma) -1;
1596 + /* If this is a weak symbol, and there is a real definition, the
1597 + processor independent code will have arranged for us to see the
1598 + real definition first, and we can just use the same value. */
1599 + if (h->u.weakdef != NULL)
1601 + BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
1602 + || h->u.weakdef->root.type == bfd_link_hash_defweak);
1603 + h->root.u.def.section = h->u.weakdef->root.u.def.section;
1604 + h->root.u.def.value = h->u.weakdef->root.u.def.value;
1605 + if (ELIMINATE_COPY_RELOCS || info->nocopyreloc)
1606 + h->non_got_ref = h->u.weakdef->non_got_ref;
1607 + return TRUE;
1610 + /* This is a reference to a symbol defined by a dynamic object which
1611 + is not a function. */
1613 + /* If we are creating a shared library, we must presume that the
1614 + only references to the symbol are via the global offset table.
1615 + For such cases we need not do anything here; the relocations will
1616 + be handled correctly by relocate_section. */
1617 + if (info->shared)
1618 + return TRUE;
1620 + /* If there are no references to this symbol that do not use the
1621 + GOT, we don't need to generate a copy reloc. */
1622 + if (!h->non_got_ref)
1623 + return TRUE;
1625 + /* If -z nocopyreloc was given, we won't generate them either. */
1626 + if (info->nocopyreloc)
1628 + h->non_got_ref = 0;
1629 + return TRUE;
1632 + htab = elf_i386_hash_table (info);
1634 + /* If there aren't any dynamic relocs in read-only sections, then
1635 + we can keep the dynamic relocs and avoid the copy reloc. This
1636 + doesn't work on VxWorks, where we can not have dynamic relocations
1637 + (other than copy and jump slot relocations) in an executable. */
1638 + if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks)
1640 + struct elf_i386_link_hash_entry * eh;
1641 + struct elf_i386_dyn_relocs *p;
1643 + eh = (struct elf_i386_link_hash_entry *) h;
1644 + for (p = eh->dyn_relocs; p != NULL; p = p->next)
1646 + s = p->sec->output_section;
1647 + if (s != NULL && (s->flags & SEC_READONLY) != 0)
1648 + break;
1651 + if (p == NULL)
1653 + h->non_got_ref = 0;
1654 + return TRUE;
1658 + if (h->size == 0)
1660 + (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
1661 + h->root.root.string);
1662 + return TRUE;
1665 + /* We must allocate the symbol in our .dynbss section, which will
1666 + become part of the .bss section of the executable. There will be
1667 + an entry for this symbol in the .dynsym section. The dynamic
1668 + object will contain position independent code, so all references
1669 + from the dynamic object to this symbol will go through the global
1670 + offset table. The dynamic linker will use the .dynsym entry to
1671 + determine the address it must put in the global offset table, so
1672 + both the dynamic object and the regular object will refer to the
1673 + same memory location for the variable. */
1675 + /* We must generate a R_386_COPY reloc to tell the dynamic linker to
1676 + copy the initial value out of the dynamic object and into the
1677 + runtime process image. */
1678 + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
1680 + htab->srelbss->size += sizeof (Elf32_External_Rel);
1681 + h->needs_copy = 1;
1684 + s = htab->sdynbss;
1686 + return _bfd_elf_adjust_dynamic_copy (h, s);
1689 +/* Allocate space in .plt, .got and associated reloc sections for
1690 + dynamic relocs. */
1692 +static bfd_boolean
1693 +allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
1695 + struct bfd_link_info *info;
1696 + struct elf_i386_link_hash_table *htab;
1697 + struct elf_i386_link_hash_entry *eh;
1698 + struct elf_i386_dyn_relocs *p;
1700 + if (h->root.type == bfd_link_hash_indirect)
1701 + return TRUE;
1703 + if (h->root.type == bfd_link_hash_warning)
1704 + /* When warning symbols are created, they **replace** the "real"
1705 + entry in the hash table, thus we never get to see the real
1706 + symbol in a hash traversal. So look at it now. */
1707 + h = (struct elf_link_hash_entry *) h->root.u.i.link;
1709 + info = (struct bfd_link_info *) inf;
1710 + htab = elf_i386_hash_table (info);
1712 + if (htab->elf.dynamic_sections_created
1713 + && h->plt.refcount > 0)
1715 + /* Make sure this symbol is output as a dynamic symbol.
1716 + Undefined weak syms won't yet be marked as dynamic. */
1717 + if (h->dynindx == -1
1718 + && !h->forced_local)
1720 + if (! bfd_elf_link_record_dynamic_symbol (info, h))
1721 + return FALSE;
1724 + if (info->shared
1725 + || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
1727 + asection *s = htab->splt;
1729 + /* If this is the first .plt entry, make room for the special
1730 + first entry. */
1731 + if (s->size == 0)
1732 + s->size += PLT_ENTRY_SIZE;
1734 + h->plt.offset = s->size;
1736 + /* If this symbol is not defined in a regular file, and we are
1737 + not generating a shared library, then set the symbol to this
1738 + location in the .plt. This is required to make function
1739 + pointers compare as equal between the normal executable and
1740 + the shared library. */
1741 + if (! info->shared
1742 + && !h->def_regular)
1744 + h->root.u.def.section = s;
1745 + h->root.u.def.value = h->plt.offset;
1748 + /* Make room for this entry. */
1749 + s->size += PLT_ENTRY_SIZE;
1751 + /* We also need to make an entry in the .got.plt section, which
1752 + will be placed in the .got section by the linker script. */
1753 + htab->sgotplt->size += 4;
1755 + /* We also need to make an entry in the .rel.plt section. */
1756 + htab->srelplt->size += sizeof (Elf32_External_Rel);
1757 + htab->next_tls_desc_index++;
1759 + if (htab->is_vxworks && !info->shared)
1761 + /* VxWorks has a second set of relocations for each PLT entry
1762 + in executables. They go in a separate relocation section,
1763 + which is processed by the kernel loader. */
1765 + /* There are two relocations for the initial PLT entry: an
1766 + R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 4 and an
1767 + R_386_32 relocation for _GLOBAL_OFFSET_TABLE_ + 8. */
1769 + if (h->plt.offset == PLT_ENTRY_SIZE)
1770 + htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
1772 + /* There are two extra relocations for each subsequent PLT entry:
1773 + an R_386_32 relocation for the GOT entry, and an R_386_32
1774 + relocation for the PLT entry. */
1776 + htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
1779 + else
1781 + h->plt.offset = (bfd_vma) -1;
1782 + h->needs_plt = 0;
1785 + else
1787 + h->plt.offset = (bfd_vma) -1;
1788 + h->needs_plt = 0;
1791 + eh = (struct elf_i386_link_hash_entry *) h;
1792 + eh->tlsdesc_got = (bfd_vma) -1;
1794 + /* If R_386_TLS_{IE_32,IE,GOTIE} symbol is now local to the binary,
1795 + make it a R_386_TLS_LE_32 requiring no TLS entry. */
1796 + if (h->got.refcount > 0
1797 + && !info->shared
1798 + && h->dynindx == -1
1799 + && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE))
1800 + h->got.offset = (bfd_vma) -1;
1801 + else if (h->got.refcount > 0)
1803 + asection *s;
1804 + bfd_boolean dyn;
1805 + int tls_type = elf_i386_hash_entry(h)->tls_type;
1807 + /* Make sure this symbol is output as a dynamic symbol.
1808 + Undefined weak syms won't yet be marked as dynamic. */
1809 + if (h->dynindx == -1
1810 + && !h->forced_local)
1812 + if (! bfd_elf_link_record_dynamic_symbol (info, h))
1813 + return FALSE;
1816 + s = htab->sgot;
1817 + if (GOT_TLS_GDESC_P (tls_type))
1819 + eh->tlsdesc_got = htab->sgotplt->size
1820 + - elf_i386_compute_jump_table_size (htab);
1821 + htab->sgotplt->size += 8;
1822 + h->got.offset = (bfd_vma) -2;
1824 + if (! GOT_TLS_GDESC_P (tls_type)
1825 + || GOT_TLS_GD_P (tls_type))
1827 + h->got.offset = s->size;
1828 + s->size += 4;
1829 + /* R_386_TLS_GD needs 2 consecutive GOT slots. */
1830 + if (GOT_TLS_GD_P (tls_type) || tls_type == GOT_TLS_IE_BOTH)
1831 + s->size += 4;
1833 + dyn = htab->elf.dynamic_sections_created;
1834 + /* R_386_TLS_IE_32 needs one dynamic relocation,
1835 + R_386_TLS_IE resp. R_386_TLS_GOTIE needs one dynamic relocation,
1836 + (but if both R_386_TLS_IE_32 and R_386_TLS_IE is present, we
1837 + need two), R_386_TLS_GD needs one if local symbol and two if
1838 + global. */
1839 + if (tls_type == GOT_TLS_IE_BOTH)
1840 + htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
1841 + else if ((GOT_TLS_GD_P (tls_type) && h->dynindx == -1)
1842 + || (tls_type & GOT_TLS_IE))
1843 + htab->srelgot->size += sizeof (Elf32_External_Rel);
1844 + else if (GOT_TLS_GD_P (tls_type))
1845 + htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
1846 + else if (! GOT_TLS_GDESC_P (tls_type)
1847 + && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
1848 + || h->root.type != bfd_link_hash_undefweak)
1849 + && (info->shared
1850 + || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
1851 + htab->srelgot->size += sizeof (Elf32_External_Rel);
1852 + if (GOT_TLS_GDESC_P (tls_type))
1853 + htab->srelplt->size += sizeof (Elf32_External_Rel);
1855 + else
1856 + h->got.offset = (bfd_vma) -1;
1858 + if (eh->dyn_relocs == NULL)
1859 + return TRUE;
1861 + /* In the shared -Bsymbolic case, discard space allocated for
1862 + dynamic pc-relative relocs against symbols which turn out to be
1863 + defined in regular objects. For the normal shared case, discard
1864 + space for pc-relative relocs that have become local due to symbol
1865 + visibility changes. */
1867 + if (info->shared)
1869 + /* The only reloc that uses pc_count is R_386_PC32, which will
1870 + appear on a call or on something like ".long foo - .". We
1871 + want calls to protected symbols to resolve directly to the
1872 + function rather than going via the plt. If people want
1873 + function pointer comparisons to work as expected then they
1874 + should avoid writing assembly like ".long foo - .". */
1875 + if (SYMBOL_CALLS_LOCAL (info, h))
1877 + struct elf_i386_dyn_relocs **pp;
1879 + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
1881 + p->count -= p->pc_count;
1882 + p->pc_count = 0;
1883 + if (p->count == 0)
1884 + *pp = p->next;
1885 + else
1886 + pp = &p->next;
1890 + /* Also discard relocs on undefined weak syms with non-default
1891 + visibility. */
1892 + if (eh->dyn_relocs != NULL
1893 + && h->root.type == bfd_link_hash_undefweak)
1895 + if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
1896 + eh->dyn_relocs = NULL;
1898 + /* Make sure undefined weak symbols are output as a dynamic
1899 + symbol in PIEs. */
1900 + else if (h->dynindx == -1
1901 + && !h->forced_local)
1903 + if (! bfd_elf_link_record_dynamic_symbol (info, h))
1904 + return FALSE;
1908 + else if (ELIMINATE_COPY_RELOCS)
1910 + /* For the non-shared case, discard space for relocs against
1911 + symbols which turn out to need copy relocs or are not
1912 + dynamic. */
1914 + if (!h->non_got_ref
1915 + && ((h->def_dynamic
1916 + && !h->def_regular)
1917 + || (htab->elf.dynamic_sections_created
1918 + && (h->root.type == bfd_link_hash_undefweak
1919 + || h->root.type == bfd_link_hash_undefined))))
1921 + /* Make sure this symbol is output as a dynamic symbol.
1922 + Undefined weak syms won't yet be marked as dynamic. */
1923 + if (h->dynindx == -1
1924 + && !h->forced_local)
1926 + if (! bfd_elf_link_record_dynamic_symbol (info, h))
1927 + return FALSE;
1930 + /* If that succeeded, we know we'll be keeping all the
1931 + relocs. */
1932 + if (h->dynindx != -1)
1933 + goto keep;
1936 + eh->dyn_relocs = NULL;
1938 + keep: ;
1941 + /* Finally, allocate space. */
1942 + for (p = eh->dyn_relocs; p != NULL; p = p->next)
1944 + asection *sreloc = elf_section_data (p->sec)->sreloc;
1945 + sreloc->size += p->count * sizeof (Elf32_External_Rel);
1948 + return TRUE;
1951 +/* Find any dynamic relocs that apply to read-only sections. */
1953 +static bfd_boolean
1954 +readonly_dynrelocs (struct elf_link_hash_entry *h, void *inf)
1956 + struct elf_i386_link_hash_entry *eh;
1957 + struct elf_i386_dyn_relocs *p;
1959 + if (h->root.type == bfd_link_hash_warning)
1960 + h = (struct elf_link_hash_entry *) h->root.u.i.link;
1962 + eh = (struct elf_i386_link_hash_entry *) h;
1963 + for (p = eh->dyn_relocs; p != NULL; p = p->next)
1965 + asection *s = p->sec->output_section;
1967 + if (s != NULL && (s->flags & SEC_READONLY) != 0)
1969 + struct bfd_link_info *info = (struct bfd_link_info *) inf;
1971 + info->flags |= DF_TEXTREL;
1973 + /* Not an error, just cut short the traversal. */
1974 + return FALSE;
1977 + return TRUE;
1980 +/* Set the sizes of the dynamic sections. */
1982 +static bfd_boolean
1983 +elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
1984 + struct bfd_link_info *info)
1986 + struct elf_i386_link_hash_table *htab;
1987 + bfd *dynobj;
1988 + asection *s;
1989 + bfd_boolean relocs;
1990 + bfd *ibfd;
1992 + htab = elf_i386_hash_table (info);
1993 + dynobj = htab->elf.dynobj;
1994 + if (dynobj == NULL)
1995 + abort ();
1997 + if (htab->elf.dynamic_sections_created)
1999 + /* Set the contents of the .interp section to the interpreter. */
2000 + if (info->executable)
2002 + s = bfd_get_section_by_name (dynobj, ".interp");
2003 + if (s == NULL)
2004 + abort ();
2005 + s->size = sizeof ELF_DYNAMIC_INTERPRETER;
2006 + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
2010 + /* Set up .got offsets for local syms, and space for local dynamic
2011 + relocs. */
2012 + for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
2014 + bfd_signed_vma *local_got;
2015 + bfd_signed_vma *end_local_got;
2016 + char *local_tls_type;
2017 + bfd_vma *local_tlsdesc_gotent;
2018 + bfd_size_type locsymcount;
2019 + Elf_Internal_Shdr *symtab_hdr;
2020 + asection *srel;
2022 + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
2023 + continue;
2025 + for (s = ibfd->sections; s != NULL; s = s->next)
2027 + struct elf_i386_dyn_relocs *p;
2029 + for (p = ((struct elf_i386_dyn_relocs *)
2030 + elf_section_data (s)->local_dynrel);
2031 + p != NULL;
2032 + p = p->next)
2034 + if (!bfd_is_abs_section (p->sec)
2035 + && bfd_is_abs_section (p->sec->output_section))
2037 + /* Input section has been discarded, either because
2038 + it is a copy of a linkonce section or due to
2039 + linker script /DISCARD/, so we'll be discarding
2040 + the relocs too. */
2042 + else if (p->count != 0)
2044 + srel = elf_section_data (p->sec)->sreloc;
2045 + srel->size += p->count * sizeof (Elf32_External_Rel);
2046 + if ((p->sec->output_section->flags & SEC_READONLY) != 0)
2047 + info->flags |= DF_TEXTREL;
2052 + local_got = elf_local_got_refcounts (ibfd);
2053 + if (!local_got)
2054 + continue;
2056 + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
2057 + locsymcount = symtab_hdr->sh_info;
2058 + end_local_got = local_got + locsymcount;
2059 + local_tls_type = elf_i386_local_got_tls_type (ibfd);
2060 + local_tlsdesc_gotent = elf_i386_local_tlsdesc_gotent (ibfd);
2061 + s = htab->sgot;
2062 + srel = htab->srelgot;
2063 + for (; local_got < end_local_got;
2064 + ++local_got, ++local_tls_type, ++local_tlsdesc_gotent)
2066 + *local_tlsdesc_gotent = (bfd_vma) -1;
2067 + if (*local_got > 0)
2069 + if (GOT_TLS_GDESC_P (*local_tls_type))
2071 + *local_tlsdesc_gotent = htab->sgotplt->size
2072 + - elf_i386_compute_jump_table_size (htab);
2073 + htab->sgotplt->size += 8;
2074 + *local_got = (bfd_vma) -2;
2076 + if (! GOT_TLS_GDESC_P (*local_tls_type)
2077 + || GOT_TLS_GD_P (*local_tls_type))
2079 + *local_got = s->size;
2080 + s->size += 4;
2081 + if (GOT_TLS_GD_P (*local_tls_type)
2082 + || *local_tls_type == GOT_TLS_IE_BOTH)
2083 + s->size += 4;
2085 + if (info->shared
2086 + || GOT_TLS_GD_ANY_P (*local_tls_type)
2087 + || (*local_tls_type & GOT_TLS_IE))
2089 + if (*local_tls_type == GOT_TLS_IE_BOTH)
2090 + srel->size += 2 * sizeof (Elf32_External_Rel);
2091 + else if (GOT_TLS_GD_P (*local_tls_type)
2092 + || ! GOT_TLS_GDESC_P (*local_tls_type))
2093 + srel->size += sizeof (Elf32_External_Rel);
2094 + if (GOT_TLS_GDESC_P (*local_tls_type))
2095 + htab->srelplt->size += sizeof (Elf32_External_Rel);
2098 + else
2099 + *local_got = (bfd_vma) -1;
2103 + if (htab->tls_ldm_got.refcount > 0)
2105 + /* Allocate 2 got entries and 1 dynamic reloc for R_386_TLS_LDM
2106 + relocs. */
2107 + htab->tls_ldm_got.offset = htab->sgot->size;
2108 + htab->sgot->size += 8;
2109 + htab->srelgot->size += sizeof (Elf32_External_Rel);
2111 + else
2112 + htab->tls_ldm_got.offset = -1;
2114 + /* Allocate global sym .plt and .got entries, and space for global
2115 + sym dynamic relocs. */
2116 + elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
2118 + /* For every jump slot reserved in the sgotplt, reloc_count is
2119 + incremented. However, when we reserve space for TLS descriptors,
2120 + it's not incremented, so in order to compute the space reserved
2121 + for them, it suffices to multiply the reloc count by the jump
2122 + slot size. */
2123 + if (htab->srelplt)
2124 + htab->sgotplt_jump_table_size = htab->next_tls_desc_index * 4;
2126 + /* We now have determined the sizes of the various dynamic sections.
2127 + Allocate memory for them. */
2128 + relocs = FALSE;
2129 + for (s = dynobj->sections; s != NULL; s = s->next)
2131 + bfd_boolean strip_section = TRUE;
2133 + if ((s->flags & SEC_LINKER_CREATED) == 0)
2134 + continue;
2136 + if (s == htab->splt
2137 + || s == htab->sgot
2138 + || s == htab->sgotplt
2139 + || s == htab->sdynbss)
2141 + /* Strip this section if we don't need it; see the
2142 + comment below. */
2143 + /* We'd like to strip these sections if they aren't needed, but if
2144 + we've exported dynamic symbols from them we must leave them.
2145 + It's too late to tell BFD to get rid of the symbols. */
2147 + if (htab->elf.hplt != NULL)
2148 + strip_section = FALSE;
2150 + else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel"))
2152 + if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
2153 + relocs = TRUE;
2155 + /* We use the reloc_count field as a counter if we need
2156 + to copy relocs into the output file. */
2157 + s->reloc_count = 0;
2159 + else
2161 + /* It's not one of our sections, so don't allocate space. */
2162 + continue;
2165 + if (s->size == 0)
2167 + /* If we don't need this section, strip it from the
2168 + output file. This is mostly to handle .rel.bss and
2169 + .rel.plt. We must create both sections in
2170 + create_dynamic_sections, because they must be created
2171 + before the linker maps input sections to output
2172 + sections. The linker does that before
2173 + adjust_dynamic_symbol is called, and it is that
2174 + function which decides whether anything needs to go
2175 + into these sections. */
2176 + if (strip_section)
2177 + s->flags |= SEC_EXCLUDE;
2178 + continue;
2181 + if ((s->flags & SEC_HAS_CONTENTS) == 0)
2182 + continue;
2184 + /* Allocate memory for the section contents. We use bfd_zalloc
2185 + here in case unused entries are not reclaimed before the
2186 + section's contents are written out. This should not happen,
2187 + but this way if it does, we get a R_386_NONE reloc instead
2188 + of garbage. */
2189 + s->contents = bfd_zalloc (dynobj, s->size);
2190 + if (s->contents == NULL)
2191 + return FALSE;
2194 + if (htab->elf.dynamic_sections_created)
2196 + /* Add some entries to the .dynamic section. We fill in the
2197 + values later, in elf_i386_finish_dynamic_sections, but we
2198 + must add the entries now so that we get the correct size for
2199 + the .dynamic section. The DT_DEBUG entry is filled in by the
2200 + dynamic linker and used by the debugger. */
2201 +#define add_dynamic_entry(TAG, VAL) \
2202 + _bfd_elf_add_dynamic_entry (info, TAG, VAL)
2204 + if (info->executable)
2206 + if (!add_dynamic_entry (DT_DEBUG, 0))
2207 + return FALSE;
2210 + if (htab->splt->size != 0)
2212 + if (!add_dynamic_entry (DT_PLTGOT, 0)
2213 + || !add_dynamic_entry (DT_PLTRELSZ, 0)
2214 + || !add_dynamic_entry (DT_PLTREL, DT_REL)
2215 + || !add_dynamic_entry (DT_JMPREL, 0))
2216 + return FALSE;
2219 + if (relocs)
2221 + if (!add_dynamic_entry (DT_REL, 0)
2222 + || !add_dynamic_entry (DT_RELSZ, 0)
2223 + || !add_dynamic_entry (DT_RELENT, sizeof (Elf32_External_Rel)))
2224 + return FALSE;
2226 + /* If any dynamic relocs apply to a read-only section,
2227 + then we need a DT_TEXTREL entry. */
2228 + if ((info->flags & DF_TEXTREL) == 0)
2229 + elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
2230 + (PTR) info);
2232 + if ((info->flags & DF_TEXTREL) != 0)
2234 + if (!add_dynamic_entry (DT_TEXTREL, 0))
2235 + return FALSE;
2239 +#undef add_dynamic_entry
2241 + return TRUE;
2244 +static bfd_boolean
2245 +elf_i386_always_size_sections (bfd *output_bfd,
2246 + struct bfd_link_info *info)
2248 + asection *tls_sec = elf_hash_table (info)->tls_sec;
2250 + if (tls_sec)
2252 + struct elf_link_hash_entry *tlsbase;
2254 + tlsbase = elf_link_hash_lookup (elf_hash_table (info),
2255 + "_TLS_MODULE_BASE_",
2256 + FALSE, FALSE, FALSE);
2258 + if (tlsbase && tlsbase->type == STT_TLS)
2260 + struct bfd_link_hash_entry *bh = NULL;
2261 + const struct elf_backend_data *bed
2262 + = get_elf_backend_data (output_bfd);
2264 + if (!(_bfd_generic_link_add_one_symbol
2265 + (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL,
2266 + tls_sec, 0, NULL, FALSE,
2267 + bed->collect, &bh)))
2268 + return FALSE;
2269 + tlsbase = (struct elf_link_hash_entry *)bh;
2270 + tlsbase->def_regular = 1;
2271 + tlsbase->other = STV_HIDDEN;
2272 + (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE);
2276 + return TRUE;
2279 +/* Set the correct type for an x86 ELF section. We do this by the
2280 + section name, which is a hack, but ought to work. */
2282 +static bfd_boolean
2283 +elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
2284 + Elf_Internal_Shdr *hdr,
2285 + asection *sec)
2287 + register const char *name;
2289 + name = bfd_get_section_name (abfd, sec);
2291 + /* This is an ugly, but unfortunately necessary hack that is
2292 + needed when producing EFI binaries on x86. It tells
2293 + elf.c:elf_fake_sections() not to consider ".reloc" as a section
2294 + containing ELF relocation info. We need this hack in order to
2295 + be able to generate ELF binaries that can be translated into
2296 + EFI applications (which are essentially COFF objects). Those
2297 + files contain a COFF ".reloc" section inside an ELFNN object,
2298 + which would normally cause BFD to segfault because it would
2299 + attempt to interpret this section as containing relocation
2300 + entries for section "oc". With this hack enabled, ".reloc"
2301 + will be treated as a normal data section, which will avoid the
2302 + segfault. However, you won't be able to create an ELFNN binary
2303 + with a section named "oc" that needs relocations, but that's
2304 + the kind of ugly side-effects you get when detecting section
2305 + types based on their names... In practice, this limitation is
2306 + unlikely to bite. */
2307 + if (strcmp (name, ".reloc") == 0)
2308 + hdr->sh_type = SHT_PROGBITS;
2310 + return TRUE;
2313 +/* Return the base VMA address which should be subtracted from real addresses
2314 + when resolving @dtpoff relocation.
2315 + This is PT_TLS segment p_vaddr. */
2317 +static bfd_vma
2318 +dtpoff_base (struct bfd_link_info *info)
2320 + /* If tls_sec is NULL, we should have signalled an error already. */
2321 + if (elf_hash_table (info)->tls_sec == NULL)
2322 + return 0;
2323 + return elf_hash_table (info)->tls_sec->vma;
2326 +/* Return the relocation value for @tpoff relocation
2327 + if STT_TLS virtual address is ADDRESS. */
2329 +static bfd_vma
2330 +tpoff (struct bfd_link_info *info, bfd_vma address)
2332 + struct elf_link_hash_table *htab = elf_hash_table (info);
2334 + /* If tls_sec is NULL, we should have signalled an error already. */
2335 + if (htab->tls_sec == NULL)
2336 + return 0;
2337 + return htab->tls_size + htab->tls_sec->vma - address;
2340 +/* Relocate an i386 ELF section. */
2342 +static bfd_boolean
2343 +elf_i386_relocate_section (bfd *output_bfd,
2344 + struct bfd_link_info *info,
2345 + bfd *input_bfd,
2346 + asection *input_section,
2347 + bfd_byte *contents,
2348 + Elf_Internal_Rela *relocs,
2349 + Elf_Internal_Sym *local_syms,
2350 + asection **local_sections)
2352 + struct elf_i386_link_hash_table *htab;
2353 + Elf_Internal_Shdr *symtab_hdr;
2354 + struct elf_link_hash_entry **sym_hashes;
2355 + bfd_vma *local_got_offsets;
2356 + bfd_vma *local_tlsdesc_gotents;
2357 + Elf_Internal_Rela *rel;
2358 + Elf_Internal_Rela *relend;
2360 + htab = elf_i386_hash_table (info);
2361 + symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
2362 + sym_hashes = elf_sym_hashes (input_bfd);
2363 + local_got_offsets = elf_local_got_offsets (input_bfd);
2364 + local_tlsdesc_gotents = elf_i386_local_tlsdesc_gotent (input_bfd);
2366 + rel = relocs;
2367 + relend = relocs + input_section->reloc_count;
2368 + for (; rel < relend; rel++)
2370 + unsigned int r_type;
2371 + reloc_howto_type *howto;
2372 + unsigned long r_symndx;
2373 + struct elf_link_hash_entry *h;
2374 + Elf_Internal_Sym *sym;
2375 + asection *sec;
2376 + bfd_vma off, offplt;
2377 + bfd_vma relocation;
2378 + bfd_boolean unresolved_reloc;
2379 + bfd_reloc_status_type r;
2380 + unsigned int indx;
2381 + int tls_type;
2383 + r_type = ELF32_R_TYPE (rel->r_info);
2384 + if (r_type == R_386_GNU_VTINHERIT
2385 + || r_type == R_386_GNU_VTENTRY)
2386 + continue;
2388 + if ((indx = r_type) >= R_386_standard
2389 + && ((indx = r_type - R_386_ext_offset) - R_386_standard
2390 + >= R_386_ext - R_386_standard)
2391 + && ((indx = r_type - R_386_tls_offset) - R_386_ext
2392 + >= R_386_tls - R_386_ext))
2394 + (*_bfd_error_handler)
2395 + (_("%B: unrecognized relocation (0x%x) in section `%A'"),
2396 + input_bfd, input_section, r_type);
2397 + bfd_set_error (bfd_error_bad_value);
2398 + return FALSE;
2400 + howto = elf_howto_table + indx;
2402 + r_symndx = ELF32_R_SYM (rel->r_info);
2403 + h = NULL;
2404 + sym = NULL;
2405 + sec = NULL;
2406 + unresolved_reloc = FALSE;
2407 + if (r_symndx < symtab_hdr->sh_info)
2409 + sym = local_syms + r_symndx;
2410 + sec = local_sections[r_symndx];
2411 + relocation = (sec->output_section->vma
2412 + + sec->output_offset
2413 + + sym->st_value);
2415 + if (ELF_ST_TYPE (sym->st_info) == STT_SECTION
2416 + && ((sec->flags & SEC_MERGE) != 0
2417 + || (info->relocatable
2418 + && sec->output_offset != 0)))
2420 + bfd_vma addend;
2421 + bfd_byte *where = contents + rel->r_offset;
2423 + switch (howto->size)
2425 + case 0:
2426 + addend = bfd_get_8 (input_bfd, where);
2427 + if (howto->pc_relative)
2429 + addend = (addend ^ 0x80) - 0x80;
2430 + addend += 1;
2432 + break;
2433 + case 1:
2434 + addend = bfd_get_16 (input_bfd, where);
2435 + if (howto->pc_relative)
2437 + addend = (addend ^ 0x8000) - 0x8000;
2438 + addend += 2;
2440 + break;
2441 + case 2:
2442 + addend = bfd_get_32 (input_bfd, where);
2443 + if (howto->pc_relative)
2445 + addend = (addend ^ 0x80000000) - 0x80000000;
2446 + addend += 4;
2448 + break;
2449 + default:
2450 + abort ();
2453 + if (info->relocatable)
2454 + addend += sec->output_offset;
2455 + else
2457 + asection *msec = sec;
2458 + addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec,
2459 + addend);
2460 + addend -= relocation;
2461 + addend += msec->output_section->vma + msec->output_offset;
2464 + switch (howto->size)
2466 + case 0:
2467 + /* FIXME: overflow checks. */
2468 + if (howto->pc_relative)
2469 + addend -= 1;
2470 + bfd_put_8 (input_bfd, addend, where);
2471 + break;
2472 + case 1:
2473 + if (howto->pc_relative)
2474 + addend -= 2;
2475 + bfd_put_16 (input_bfd, addend, where);
2476 + break;
2477 + case 2:
2478 + if (howto->pc_relative)
2479 + addend -= 4;
2480 + bfd_put_32 (input_bfd, addend, where);
2481 + break;
2485 + else
2487 + bfd_boolean warned;
2489 + RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
2490 + r_symndx, symtab_hdr, sym_hashes,
2491 + h, sec, relocation,
2492 + unresolved_reloc, warned);
2495 + if (sec != NULL && elf_discarded_section (sec))
2497 + /* For relocs against symbols from removed linkonce sections,
2498 + or sections discarded by a linker script, we just want the
2499 + section contents zeroed. Avoid any special processing. */
2500 + _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
2501 + rel->r_info = 0;
2502 + rel->r_addend = 0;
2503 + continue;
2506 + if (info->relocatable)
2507 + continue;
2509 + switch (r_type)
2511 + case R_386_GOT32:
2512 + /* Relocation is to the entry for this symbol in the global
2513 + offset table. */
2514 + if (htab->sgot == NULL)
2515 + abort ();
2517 + if (h != NULL)
2519 + bfd_boolean dyn;
2521 + off = h->got.offset;
2522 + dyn = htab->elf.dynamic_sections_created;
2523 + if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
2524 + || (info->shared
2525 + && SYMBOL_REFERENCES_LOCAL (info, h))
2526 + || (ELF_ST_VISIBILITY (h->other)
2527 + && h->root.type == bfd_link_hash_undefweak))
2529 + /* This is actually a static link, or it is a
2530 + -Bsymbolic link and the symbol is defined
2531 + locally, or the symbol was forced to be local
2532 + because of a version file. We must initialize
2533 + this entry in the global offset table. Since the
2534 + offset must always be a multiple of 4, we use the
2535 + least significant bit to record whether we have
2536 + initialized it already.
2538 + When doing a dynamic link, we create a .rel.got
2539 + relocation entry to initialize the value. This
2540 + is done in the finish_dynamic_symbol routine. */
2541 + if ((off & 1) != 0)
2542 + off &= ~1;
2543 + else
2545 + bfd_put_32 (output_bfd, relocation,
2546 + htab->sgot->contents + off);
2547 + h->got.offset |= 1;
2550 + else
2551 + unresolved_reloc = FALSE;
2553 + else
2555 + if (local_got_offsets == NULL)
2556 + abort ();
2558 + off = local_got_offsets[r_symndx];
2560 + /* The offset must always be a multiple of 4. We use
2561 + the least significant bit to record whether we have
2562 + already generated the necessary reloc. */
2563 + if ((off & 1) != 0)
2564 + off &= ~1;
2565 + else
2567 + bfd_put_32 (output_bfd, relocation,
2568 + htab->sgot->contents + off);
2570 + if (info->shared)
2572 + asection *s;
2573 + Elf_Internal_Rela outrel;
2574 + bfd_byte *loc;
2576 + s = htab->srelgot;
2577 + if (s == NULL)
2578 + abort ();
2580 + outrel.r_offset = (htab->sgot->output_section->vma
2581 + + htab->sgot->output_offset
2582 + + off);
2583 + outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
2584 + loc = s->contents;
2585 + loc += s->reloc_count++ * sizeof (Elf32_External_Rel);
2586 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
2589 + local_got_offsets[r_symndx] |= 1;
2593 + if (off >= (bfd_vma) -2)
2594 + abort ();
2596 + relocation = htab->sgot->output_section->vma
2597 + + htab->sgot->output_offset + off
2598 + - htab->sgotplt->output_section->vma
2599 + - htab->sgotplt->output_offset;
2600 + break;
2602 + case R_386_GOTOFF:
2603 + /* Relocation is relative to the start of the global offset
2604 + table. */
2606 + /* Check to make sure it isn't a protected function symbol
2607 + for shared library since it may not be local when used
2608 + as function address. */
2609 + if (info->shared
2610 + && !info->executable
2611 + && h
2612 + && h->def_regular
2613 + && h->type == STT_FUNC
2614 + && ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
2616 + (*_bfd_error_handler)
2617 + (_("%B: relocation R_386_GOTOFF against protected function `%s' can not be used when making a shared object"),
2618 + input_bfd, h->root.root.string);
2619 + bfd_set_error (bfd_error_bad_value);
2620 + return FALSE;
2623 + /* Note that sgot is not involved in this
2624 + calculation. We always want the start of .got.plt. If we
2625 + defined _GLOBAL_OFFSET_TABLE_ in a different way, as is
2626 + permitted by the ABI, we might have to change this
2627 + calculation. */
2628 + relocation -= htab->sgotplt->output_section->vma
2629 + + htab->sgotplt->output_offset;
2630 + break;
2632 + case R_386_GOTPC:
2633 + /* Use global offset table as symbol value. */
2634 + relocation = htab->sgotplt->output_section->vma
2635 + + htab->sgotplt->output_offset;
2636 + unresolved_reloc = FALSE;
2637 + break;
2639 + case R_386_PLT32:
2640 + /* Relocation is to the entry for this symbol in the
2641 + procedure linkage table. */
2643 + /* Resolve a PLT32 reloc against a local symbol directly,
2644 + without using the procedure linkage table. */
2645 + if (h == NULL)
2646 + break;
2648 + if (h->plt.offset == (bfd_vma) -1
2649 + || htab->splt == NULL)
2651 + /* We didn't make a PLT entry for this symbol. This
2652 + happens when statically linking PIC code, or when
2653 + using -Bsymbolic. */
2654 + break;
2657 + relocation = (htab->splt->output_section->vma
2658 + + htab->splt->output_offset
2659 + + h->plt.offset);
2660 + unresolved_reloc = FALSE;
2661 + break;
2663 + case R_386_32:
2664 + case R_386_PC32:
2665 + if ((input_section->flags & SEC_ALLOC) == 0)
2666 + break;
2668 + if ((info->shared
2669 + && (h == NULL
2670 + || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
2671 + || h->root.type != bfd_link_hash_undefweak)
2672 + && (r_type != R_386_PC32
2673 + || !SYMBOL_CALLS_LOCAL (info, h)))
2674 + || (ELIMINATE_COPY_RELOCS
2675 + && !info->shared
2676 + && h != NULL
2677 + && h->dynindx != -1
2678 + && !h->non_got_ref
2679 + && ((h->def_dynamic
2680 + && !h->def_regular)
2681 + || h->root.type == bfd_link_hash_undefweak
2682 + || h->root.type == bfd_link_hash_undefined)))
2684 + Elf_Internal_Rela outrel;
2685 + bfd_byte *loc;
2686 + bfd_boolean skip, relocate;
2687 + asection *sreloc;
2689 + /* When generating a shared object, these relocations
2690 + are copied into the output file to be resolved at run
2691 + time. */
2693 + skip = FALSE;
2694 + relocate = FALSE;
2696 + outrel.r_offset =
2697 + _bfd_elf_section_offset (output_bfd, info, input_section,
2698 + rel->r_offset);
2699 + if (outrel.r_offset == (bfd_vma) -1)
2700 + skip = TRUE;
2701 + else if (outrel.r_offset == (bfd_vma) -2)
2702 + skip = TRUE, relocate = TRUE;
2703 + outrel.r_offset += (input_section->output_section->vma
2704 + + input_section->output_offset);
2706 + if (skip)
2707 + memset (&outrel, 0, sizeof outrel);
2708 + else if (h != NULL
2709 + && h->dynindx != -1
2710 + && (r_type == R_386_PC32
2711 + || !info->shared
2712 + || !SYMBOLIC_BIND (info, h)
2713 + || !h->def_regular))
2714 + outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
2715 + else
2717 + /* This symbol is local, or marked to become local. */
2718 + relocate = TRUE;
2719 + outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
2722 + sreloc = elf_section_data (input_section)->sreloc;
2723 + if (sreloc == NULL)
2724 + abort ();
2726 + loc = sreloc->contents;
2727 + loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
2728 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
2730 + /* If this reloc is against an external symbol, we do
2731 + not want to fiddle with the addend. Otherwise, we
2732 + need to include the symbol value so that it becomes
2733 + an addend for the dynamic reloc. */
2734 + if (! relocate)
2735 + continue;
2737 + break;
2739 + case R_386_TLS_IE:
2740 + if (info->shared)
2742 + Elf_Internal_Rela outrel;
2743 + bfd_byte *loc;
2744 + asection *sreloc;
2746 + outrel.r_offset = rel->r_offset
2747 + + input_section->output_section->vma
2748 + + input_section->output_offset;
2749 + outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
2750 + sreloc = elf_section_data (input_section)->sreloc;
2751 + if (sreloc == NULL)
2752 + abort ();
2753 + loc = sreloc->contents;
2754 + loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
2755 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
2757 + /* Fall through */
2759 + case R_386_TLS_GD:
2760 + case R_386_TLS_GOTDESC:
2761 + case R_386_TLS_DESC_CALL:
2762 + case R_386_TLS_IE_32:
2763 + case R_386_TLS_GOTIE:
2764 + r_type = elf_i386_tls_transition (info, r_type, h == NULL);
2765 + tls_type = GOT_UNKNOWN;
2766 + if (h == NULL && local_got_offsets)
2767 + tls_type = elf_i386_local_got_tls_type (input_bfd) [r_symndx];
2768 + else if (h != NULL)
2770 + tls_type = elf_i386_hash_entry(h)->tls_type;
2771 + if (!info->shared && h->dynindx == -1 && (tls_type & GOT_TLS_IE))
2772 + r_type = R_386_TLS_LE_32;
2774 + if (tls_type == GOT_TLS_IE)
2775 + tls_type = GOT_TLS_IE_NEG;
2776 + if (r_type == R_386_TLS_GD
2777 + || r_type == R_386_TLS_GOTDESC
2778 + || r_type == R_386_TLS_DESC_CALL)
2780 + if (tls_type == GOT_TLS_IE_POS)
2781 + r_type = R_386_TLS_GOTIE;
2782 + else if (tls_type & GOT_TLS_IE)
2783 + r_type = R_386_TLS_IE_32;
2786 + if (r_type == R_386_TLS_LE_32)
2788 + BFD_ASSERT (! unresolved_reloc);
2789 + if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD)
2791 + unsigned int val, type;
2792 + bfd_vma roff;
2794 + /* GD->LE transition. */
2795 + BFD_ASSERT (rel->r_offset >= 2);
2796 + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
2797 + BFD_ASSERT (type == 0x8d || type == 0x04);
2798 + BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
2799 + BFD_ASSERT (bfd_get_8 (input_bfd,
2800 + contents + rel->r_offset + 4)
2801 + == 0xe8);
2802 + BFD_ASSERT (rel + 1 < relend);
2803 + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32);
2804 + roff = rel->r_offset + 5;
2805 + val = bfd_get_8 (input_bfd,
2806 + contents + rel->r_offset - 1);
2807 + if (type == 0x04)
2809 + /* leal foo(,%reg,1), %eax; call ___tls_get_addr
2810 + Change it into:
2811 + movl %gs:0, %eax; subl $foo@tpoff, %eax
2812 + (6 byte form of subl). */
2813 + BFD_ASSERT (rel->r_offset >= 3);
2814 + BFD_ASSERT (bfd_get_8 (input_bfd,
2815 + contents + rel->r_offset - 3)
2816 + == 0x8d);
2817 + BFD_ASSERT ((val & 0xc7) == 0x05 && val != (4 << 3));
2818 + memcpy (contents + rel->r_offset - 3,
2819 + "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12);
2821 + else
2823 + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
2824 + if (rel->r_offset + 10 <= input_section->size
2825 + && bfd_get_8 (input_bfd,
2826 + contents + rel->r_offset + 9) == 0x90)
2828 + /* leal foo(%reg), %eax; call ___tls_get_addr; nop
2829 + Change it into:
2830 + movl %gs:0, %eax; subl $foo@tpoff, %eax
2831 + (6 byte form of subl). */
2832 + memcpy (contents + rel->r_offset - 2,
2833 + "\x65\xa1\0\0\0\0\x81\xe8\0\0\0", 12);
2834 + roff = rel->r_offset + 6;
2836 + else
2838 + /* leal foo(%reg), %eax; call ___tls_get_addr
2839 + Change it into:
2840 + movl %gs:0, %eax; subl $foo@tpoff, %eax
2841 + (5 byte form of subl). */
2842 + memcpy (contents + rel->r_offset - 2,
2843 + "\x65\xa1\0\0\0\0\x2d\0\0\0", 11);
2846 + bfd_put_32 (output_bfd, tpoff (info, relocation),
2847 + contents + roff);
2848 + /* Skip R_386_PLT32. */
2849 + rel++;
2850 + continue;
2852 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
2854 + /* GDesc -> LE transition.
2855 + It's originally something like:
2856 + leal x@tlsdesc(%ebx), %eax
2858 + leal x@ntpoff, %eax
2860 + Registers other than %eax may be set up here. */
2862 + unsigned int val, type;
2863 + bfd_vma roff;
2865 + /* First, make sure it's a leal adding ebx to a
2866 + 32-bit offset into any register, although it's
2867 + probably almost always going to be eax. */
2868 + roff = rel->r_offset;
2869 + BFD_ASSERT (roff >= 2);
2870 + type = bfd_get_8 (input_bfd, contents + roff - 2);
2871 + BFD_ASSERT (type == 0x8d);
2872 + val = bfd_get_8 (input_bfd, contents + roff - 1);
2873 + BFD_ASSERT ((val & 0xc7) == 0x83);
2874 + BFD_ASSERT (roff + 4 <= input_section->size);
2876 + /* Now modify the instruction as appropriate. */
2877 + /* aoliva FIXME: remove the above and xor the byte
2878 + below with 0x86. */
2879 + bfd_put_8 (output_bfd, val ^ 0x86,
2880 + contents + roff - 1);
2881 + bfd_put_32 (output_bfd, -tpoff (info, relocation),
2882 + contents + roff);
2883 + continue;
2885 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_DESC_CALL)
2887 + /* GDesc -> LE transition.
2888 + It's originally:
2889 + call *(%eax)
2890 + Turn it into:
2891 + nop; nop */
2893 + unsigned int val, type;
2894 + bfd_vma roff;
2896 + /* First, make sure it's a call *(%eax). */
2897 + roff = rel->r_offset;
2898 + BFD_ASSERT (roff + 2 <= input_section->size);
2899 + type = bfd_get_8 (input_bfd, contents + roff);
2900 + BFD_ASSERT (type == 0xff);
2901 + val = bfd_get_8 (input_bfd, contents + roff + 1);
2902 + BFD_ASSERT (val == 0x10);
2904 + /* Now modify the instruction as appropriate. Use
2905 + xchg %ax,%ax instead of 2 nops. */
2906 + bfd_put_8 (output_bfd, 0x66, contents + roff);
2907 + bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
2908 + continue;
2910 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_IE)
2912 + unsigned int val, type;
2914 + /* IE->LE transition:
2915 + Originally it can be one of:
2916 + movl foo, %eax
2917 + movl foo, %reg
2918 + addl foo, %reg
2919 + We change it into:
2920 + movl $foo, %eax
2921 + movl $foo, %reg
2922 + addl $foo, %reg. */
2923 + BFD_ASSERT (rel->r_offset >= 1);
2924 + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
2925 + BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
2926 + if (val == 0xa1)
2928 + /* movl foo, %eax. */
2929 + bfd_put_8 (output_bfd, 0xb8,
2930 + contents + rel->r_offset - 1);
2932 + else
2934 + BFD_ASSERT (rel->r_offset >= 2);
2935 + type = bfd_get_8 (input_bfd,
2936 + contents + rel->r_offset - 2);
2937 + switch (type)
2939 + case 0x8b:
2940 + /* movl */
2941 + BFD_ASSERT ((val & 0xc7) == 0x05);
2942 + bfd_put_8 (output_bfd, 0xc7,
2943 + contents + rel->r_offset - 2);
2944 + bfd_put_8 (output_bfd,
2945 + 0xc0 | ((val >> 3) & 7),
2946 + contents + rel->r_offset - 1);
2947 + break;
2948 + case 0x03:
2949 + /* addl */
2950 + BFD_ASSERT ((val & 0xc7) == 0x05);
2951 + bfd_put_8 (output_bfd, 0x81,
2952 + contents + rel->r_offset - 2);
2953 + bfd_put_8 (output_bfd,
2954 + 0xc0 | ((val >> 3) & 7),
2955 + contents + rel->r_offset - 1);
2956 + break;
2957 + default:
2958 + BFD_FAIL ();
2959 + break;
2962 + bfd_put_32 (output_bfd, -tpoff (info, relocation),
2963 + contents + rel->r_offset);
2964 + continue;
2966 + else
2968 + unsigned int val, type;
2970 + /* {IE_32,GOTIE}->LE transition:
2971 + Originally it can be one of:
2972 + subl foo(%reg1), %reg2
2973 + movl foo(%reg1), %reg2
2974 + addl foo(%reg1), %reg2
2975 + We change it into:
2976 + subl $foo, %reg2
2977 + movl $foo, %reg2 (6 byte form)
2978 + addl $foo, %reg2. */
2979 + BFD_ASSERT (rel->r_offset >= 2);
2980 + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
2981 + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
2982 + BFD_ASSERT (rel->r_offset + 4 <= input_section->size);
2983 + BFD_ASSERT ((val & 0xc0) == 0x80 && (val & 7) != 4);
2984 + if (type == 0x8b)
2986 + /* movl */
2987 + bfd_put_8 (output_bfd, 0xc7,
2988 + contents + rel->r_offset - 2);
2989 + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
2990 + contents + rel->r_offset - 1);
2992 + else if (type == 0x2b)
2994 + /* subl */
2995 + bfd_put_8 (output_bfd, 0x81,
2996 + contents + rel->r_offset - 2);
2997 + bfd_put_8 (output_bfd, 0xe8 | ((val >> 3) & 7),
2998 + contents + rel->r_offset - 1);
3000 + else if (type == 0x03)
3002 + /* addl */
3003 + bfd_put_8 (output_bfd, 0x81,
3004 + contents + rel->r_offset - 2);
3005 + bfd_put_8 (output_bfd, 0xc0 | ((val >> 3) & 7),
3006 + contents + rel->r_offset - 1);
3008 + else
3009 + BFD_FAIL ();
3010 + if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTIE)
3011 + bfd_put_32 (output_bfd, -tpoff (info, relocation),
3012 + contents + rel->r_offset);
3013 + else
3014 + bfd_put_32 (output_bfd, tpoff (info, relocation),
3015 + contents + rel->r_offset);
3016 + continue;
3020 + if (htab->sgot == NULL)
3021 + abort ();
3023 + if (h != NULL)
3025 + off = h->got.offset;
3026 + offplt = elf_i386_hash_entry (h)->tlsdesc_got;
3028 + else
3030 + if (local_got_offsets == NULL)
3031 + abort ();
3033 + off = local_got_offsets[r_symndx];
3034 + offplt = local_tlsdesc_gotents[r_symndx];
3037 + if ((off & 1) != 0)
3038 + off &= ~1;
3039 + else
3041 + Elf_Internal_Rela outrel;
3042 + bfd_byte *loc;
3043 + int dr_type, indx;
3044 + asection *sreloc;
3046 + if (htab->srelgot == NULL)
3047 + abort ();
3049 + indx = h && h->dynindx != -1 ? h->dynindx : 0;
3051 + if (GOT_TLS_GDESC_P (tls_type))
3053 + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_DESC);
3054 + BFD_ASSERT (htab->sgotplt_jump_table_size + offplt + 8
3055 + <= htab->sgotplt->size);
3056 + outrel.r_offset = (htab->sgotplt->output_section->vma
3057 + + htab->sgotplt->output_offset
3058 + + offplt
3059 + + htab->sgotplt_jump_table_size);
3060 + sreloc = htab->srelplt;
3061 + loc = sreloc->contents;
3062 + loc += (htab->next_tls_desc_index++
3063 + * sizeof (Elf32_External_Rel));
3064 + BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
3065 + <= sreloc->contents + sreloc->size);
3066 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3067 + if (indx == 0)
3069 + BFD_ASSERT (! unresolved_reloc);
3070 + bfd_put_32 (output_bfd,
3071 + relocation - dtpoff_base (info),
3072 + htab->sgotplt->contents + offplt
3073 + + htab->sgotplt_jump_table_size + 4);
3075 + else
3077 + bfd_put_32 (output_bfd, 0,
3078 + htab->sgotplt->contents + offplt
3079 + + htab->sgotplt_jump_table_size + 4);
3083 + sreloc = htab->srelgot;
3085 + outrel.r_offset = (htab->sgot->output_section->vma
3086 + + htab->sgot->output_offset + off);
3088 + if (GOT_TLS_GD_P (tls_type))
3089 + dr_type = R_386_TLS_DTPMOD32;
3090 + else if (GOT_TLS_GDESC_P (tls_type))
3091 + goto dr_done;
3092 + else if (tls_type == GOT_TLS_IE_POS)
3093 + dr_type = R_386_TLS_TPOFF;
3094 + else
3095 + dr_type = R_386_TLS_TPOFF32;
3097 + if (dr_type == R_386_TLS_TPOFF && indx == 0)
3098 + bfd_put_32 (output_bfd, relocation - dtpoff_base (info),
3099 + htab->sgot->contents + off);
3100 + else if (dr_type == R_386_TLS_TPOFF32 && indx == 0)
3101 + bfd_put_32 (output_bfd, dtpoff_base (info) - relocation,
3102 + htab->sgot->contents + off);
3103 + else if (dr_type != R_386_TLS_DESC)
3104 + bfd_put_32 (output_bfd, 0,
3105 + htab->sgot->contents + off);
3106 + outrel.r_info = ELF32_R_INFO (indx, dr_type);
3108 + loc = sreloc->contents;
3109 + loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
3110 + BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
3111 + <= sreloc->contents + sreloc->size);
3112 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3114 + if (GOT_TLS_GD_P (tls_type))
3116 + if (indx == 0)
3118 + BFD_ASSERT (! unresolved_reloc);
3119 + bfd_put_32 (output_bfd,
3120 + relocation - dtpoff_base (info),
3121 + htab->sgot->contents + off + 4);
3123 + else
3125 + bfd_put_32 (output_bfd, 0,
3126 + htab->sgot->contents + off + 4);
3127 + outrel.r_info = ELF32_R_INFO (indx,
3128 + R_386_TLS_DTPOFF32);
3129 + outrel.r_offset += 4;
3130 + sreloc->reloc_count++;
3131 + loc += sizeof (Elf32_External_Rel);
3132 + BFD_ASSERT (loc + sizeof (Elf32_External_Rel)
3133 + <= sreloc->contents + sreloc->size);
3134 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3137 + else if (tls_type == GOT_TLS_IE_BOTH)
3139 + bfd_put_32 (output_bfd,
3140 + indx == 0 ? relocation - dtpoff_base (info) : 0,
3141 + htab->sgot->contents + off + 4);
3142 + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF);
3143 + outrel.r_offset += 4;
3144 + sreloc->reloc_count++;
3145 + loc += sizeof (Elf32_External_Rel);
3146 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3149 + dr_done:
3150 + if (h != NULL)
3151 + h->got.offset |= 1;
3152 + else
3153 + local_got_offsets[r_symndx] |= 1;
3156 + if (off >= (bfd_vma) -2
3157 + && ! GOT_TLS_GDESC_P (tls_type))
3158 + abort ();
3159 + if (r_type == R_386_TLS_GOTDESC
3160 + || r_type == R_386_TLS_DESC_CALL)
3162 + relocation = htab->sgotplt_jump_table_size + offplt;
3163 + unresolved_reloc = FALSE;
3165 + else if (r_type == ELF32_R_TYPE (rel->r_info))
3167 + bfd_vma g_o_t = htab->sgotplt->output_section->vma
3168 + + htab->sgotplt->output_offset;
3169 + relocation = htab->sgot->output_section->vma
3170 + + htab->sgot->output_offset + off - g_o_t;
3171 + if ((r_type == R_386_TLS_IE || r_type == R_386_TLS_GOTIE)
3172 + && tls_type == GOT_TLS_IE_BOTH)
3173 + relocation += 4;
3174 + if (r_type == R_386_TLS_IE)
3175 + relocation += g_o_t;
3176 + unresolved_reloc = FALSE;
3178 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD)
3180 + unsigned int val, type;
3181 + bfd_vma roff;
3183 + /* GD->IE transition. */
3184 + BFD_ASSERT (rel->r_offset >= 2);
3185 + type = bfd_get_8 (input_bfd, contents + rel->r_offset - 2);
3186 + BFD_ASSERT (type == 0x8d || type == 0x04);
3187 + BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
3188 + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
3189 + == 0xe8);
3190 + BFD_ASSERT (rel + 1 < relend);
3191 + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32);
3192 + roff = rel->r_offset - 3;
3193 + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
3194 + if (type == 0x04)
3196 + /* leal foo(,%reg,1), %eax; call ___tls_get_addr
3197 + Change it into:
3198 + movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */
3199 + BFD_ASSERT (rel->r_offset >= 3);
3200 + BFD_ASSERT (bfd_get_8 (input_bfd,
3201 + contents + rel->r_offset - 3)
3202 + == 0x8d);
3203 + BFD_ASSERT ((val & 0xc7) == 0x05 && val != (4 << 3));
3204 + val >>= 3;
3206 + else
3208 + /* leal foo(%reg), %eax; call ___tls_get_addr; nop
3209 + Change it into:
3210 + movl %gs:0, %eax; subl $foo@gottpoff(%reg), %eax. */
3211 + BFD_ASSERT (rel->r_offset + 10 <= input_section->size);
3212 + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
3213 + BFD_ASSERT (bfd_get_8 (input_bfd,
3214 + contents + rel->r_offset + 9)
3215 + == 0x90);
3216 + roff = rel->r_offset - 2;
3218 + memcpy (contents + roff,
3219 + "\x65\xa1\0\0\0\0\x2b\x80\0\0\0", 12);
3220 + contents[roff + 7] = 0x80 | (val & 7);
3221 + /* If foo is used only with foo@gotntpoff(%reg) and
3222 + foo@indntpoff, but not with foo@gottpoff(%reg), change
3223 + subl $foo@gottpoff(%reg), %eax
3224 + into:
3225 + addl $foo@gotntpoff(%reg), %eax. */
3226 + if (tls_type == GOT_TLS_IE_POS)
3227 + contents[roff + 6] = 0x03;
3228 + bfd_put_32 (output_bfd,
3229 + htab->sgot->output_section->vma
3230 + + htab->sgot->output_offset + off
3231 + - htab->sgotplt->output_section->vma
3232 + - htab->sgotplt->output_offset,
3233 + contents + roff + 8);
3234 + /* Skip R_386_PLT32. */
3235 + rel++;
3236 + continue;
3238 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_GOTDESC)
3240 + /* GDesc -> IE transition.
3241 + It's originally something like:
3242 + leal x@tlsdesc(%ebx), %eax
3244 + Change it to:
3245 + movl x@gotntpoff(%ebx), %eax # before nop; nop
3246 + or:
3247 + movl x@gottpoff(%ebx), %eax # before negl %eax
3249 + Registers other than %eax may be set up here. */
3251 + unsigned int val, type;
3252 + bfd_vma roff;
3254 + /* First, make sure it's a leal adding ebx to a 32-bit
3255 + offset into any register, although it's probably
3256 + almost always going to be eax. */
3257 + roff = rel->r_offset;
3258 + BFD_ASSERT (roff >= 2);
3259 + type = bfd_get_8 (input_bfd, contents + roff - 2);
3260 + BFD_ASSERT (type == 0x8d);
3261 + val = bfd_get_8 (input_bfd, contents + roff - 1);
3262 + BFD_ASSERT ((val & 0xc7) == 0x83);
3263 + BFD_ASSERT (roff + 4 <= input_section->size);
3265 + /* Now modify the instruction as appropriate. */
3266 + /* To turn a leal into a movl in the form we use it, it
3267 + suffices to change the first byte from 0x8d to 0x8b.
3268 + aoliva FIXME: should we decide to keep the leal, all
3269 + we have to do is remove the statement below, and
3270 + adjust the relaxation of R_386_TLS_DESC_CALL. */
3271 + bfd_put_8 (output_bfd, 0x8b, contents + roff - 2);
3273 + if (tls_type == GOT_TLS_IE_BOTH)
3274 + off += 4;
3276 + bfd_put_32 (output_bfd,
3277 + htab->sgot->output_section->vma
3278 + + htab->sgot->output_offset + off
3279 + - htab->sgotplt->output_section->vma
3280 + - htab->sgotplt->output_offset,
3281 + contents + roff);
3282 + continue;
3284 + else if (ELF32_R_TYPE (rel->r_info) == R_386_TLS_DESC_CALL)
3286 + /* GDesc -> IE transition.
3287 + It's originally:
3288 + call *(%eax)
3290 + Change it to:
3291 + nop; nop
3292 + or
3293 + negl %eax
3294 + depending on how we transformed the TLS_GOTDESC above.
3295 + */
3297 + unsigned int val, type;
3298 + bfd_vma roff;
3300 + /* First, make sure it's a call *(%eax). */
3301 + roff = rel->r_offset;
3302 + BFD_ASSERT (roff + 2 <= input_section->size);
3303 + type = bfd_get_8 (input_bfd, contents + roff);
3304 + BFD_ASSERT (type == 0xff);
3305 + val = bfd_get_8 (input_bfd, contents + roff + 1);
3306 + BFD_ASSERT (val == 0x10);
3308 + /* Now modify the instruction as appropriate. */
3309 + if (tls_type != GOT_TLS_IE_NEG)
3311 + /* xchg %ax,%ax */
3312 + bfd_put_8 (output_bfd, 0x66, contents + roff);
3313 + bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
3315 + else
3317 + /* negl %eax */
3318 + bfd_put_8 (output_bfd, 0xf7, contents + roff);
3319 + bfd_put_8 (output_bfd, 0xd8, contents + roff + 1);
3322 + continue;
3324 + else
3325 + BFD_ASSERT (FALSE);
3326 + break;
3328 + case R_386_TLS_LDM:
3329 + if (! info->shared)
3331 + unsigned int val;
3333 + /* LD->LE transition:
3334 + Ensure it is:
3335 + leal foo(%reg), %eax; call ___tls_get_addr.
3336 + We change it into:
3337 + movl %gs:0, %eax; nop; leal 0(%esi,1), %esi. */
3338 + BFD_ASSERT (rel->r_offset >= 2);
3339 + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset - 2)
3340 + == 0x8d);
3341 + val = bfd_get_8 (input_bfd, contents + rel->r_offset - 1);
3342 + BFD_ASSERT ((val & 0xf8) == 0x80 && (val & 7) != 4);
3343 + BFD_ASSERT (rel->r_offset + 9 <= input_section->size);
3344 + BFD_ASSERT (bfd_get_8 (input_bfd, contents + rel->r_offset + 4)
3345 + == 0xe8);
3346 + BFD_ASSERT (rel + 1 < relend);
3347 + BFD_ASSERT (ELF32_R_TYPE (rel[1].r_info) == R_386_PLT32);
3348 + memcpy (contents + rel->r_offset - 2,
3349 + "\x65\xa1\0\0\0\0\x90\x8d\x74\x26", 11);
3350 + /* Skip R_386_PLT32. */
3351 + rel++;
3352 + continue;
3355 + if (htab->sgot == NULL)
3356 + abort ();
3358 + off = htab->tls_ldm_got.offset;
3359 + if (off & 1)
3360 + off &= ~1;
3361 + else
3363 + Elf_Internal_Rela outrel;
3364 + bfd_byte *loc;
3366 + if (htab->srelgot == NULL)
3367 + abort ();
3369 + outrel.r_offset = (htab->sgot->output_section->vma
3370 + + htab->sgot->output_offset + off);
3372 + bfd_put_32 (output_bfd, 0,
3373 + htab->sgot->contents + off);
3374 + bfd_put_32 (output_bfd, 0,
3375 + htab->sgot->contents + off + 4);
3376 + outrel.r_info = ELF32_R_INFO (0, R_386_TLS_DTPMOD32);
3377 + loc = htab->srelgot->contents;
3378 + loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
3379 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3380 + htab->tls_ldm_got.offset |= 1;
3382 + relocation = htab->sgot->output_section->vma
3383 + + htab->sgot->output_offset + off
3384 + - htab->sgotplt->output_section->vma
3385 + - htab->sgotplt->output_offset;
3386 + unresolved_reloc = FALSE;
3387 + break;
3389 + case R_386_TLS_LDO_32:
3390 + if (info->shared || (input_section->flags & SEC_CODE) == 0)
3391 + relocation -= dtpoff_base (info);
3392 + else
3393 + /* When converting LDO to LE, we must negate. */
3394 + relocation = -tpoff (info, relocation);
3395 + break;
3397 + case R_386_TLS_LE_32:
3398 + case R_386_TLS_LE:
3399 + if (info->shared)
3401 + Elf_Internal_Rela outrel;
3402 + asection *sreloc;
3403 + bfd_byte *loc;
3404 + int indx;
3406 + outrel.r_offset = rel->r_offset
3407 + + input_section->output_section->vma
3408 + + input_section->output_offset;
3409 + if (h != NULL && h->dynindx != -1)
3410 + indx = h->dynindx;
3411 + else
3412 + indx = 0;
3413 + if (r_type == R_386_TLS_LE_32)
3414 + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF32);
3415 + else
3416 + outrel.r_info = ELF32_R_INFO (indx, R_386_TLS_TPOFF);
3417 + sreloc = elf_section_data (input_section)->sreloc;
3418 + if (sreloc == NULL)
3419 + abort ();
3420 + loc = sreloc->contents;
3421 + loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rel);
3422 + bfd_elf32_swap_reloc_out (output_bfd, &outrel, loc);
3423 + if (indx)
3424 + continue;
3425 + else if (r_type == R_386_TLS_LE_32)
3426 + relocation = dtpoff_base (info) - relocation;
3427 + else
3428 + relocation -= dtpoff_base (info);
3430 + else if (r_type == R_386_TLS_LE_32)
3431 + relocation = tpoff (info, relocation);
3432 + else
3433 + relocation = -tpoff (info, relocation);
3434 + break;
3436 + default:
3437 + break;
3440 + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
3441 + because such sections are not SEC_ALLOC and thus ld.so will
3442 + not process them. */
3443 + if (unresolved_reloc
3444 + && !((input_section->flags & SEC_DEBUGGING) != 0
3445 + && h->def_dynamic))
3447 + (*_bfd_error_handler)
3448 + (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
3449 + input_bfd,
3450 + input_section,
3451 + (long) rel->r_offset,
3452 + howto->name,
3453 + h->root.root.string);
3454 + return FALSE;
3457 + r = _bfd_final_link_relocate (howto, input_bfd, input_section,
3458 + contents, rel->r_offset,
3459 + relocation, 0);
3461 + if (r != bfd_reloc_ok)
3463 + const char *name;
3465 + if (h != NULL)
3466 + name = h->root.root.string;
3467 + else
3469 + name = bfd_elf_string_from_elf_section (input_bfd,
3470 + symtab_hdr->sh_link,
3471 + sym->st_name);
3472 + if (name == NULL)
3473 + return FALSE;
3474 + if (*name == '\0')
3475 + name = bfd_section_name (input_bfd, sec);
3478 + if (r == bfd_reloc_overflow)
3480 + if (! ((*info->callbacks->reloc_overflow)
3481 + (info, (h ? &h->root : NULL), name, howto->name,
3482 + (bfd_vma) 0, input_bfd, input_section,
3483 + rel->r_offset)))
3484 + return FALSE;
3486 + else
3488 + (*_bfd_error_handler)
3489 + (_("%B(%A+0x%lx): reloc against `%s': error %d"),
3490 + input_bfd, input_section,
3491 + (long) rel->r_offset, name, (int) r);
3492 + return FALSE;
3497 + return TRUE;
3500 +/* Finish up dynamic symbol handling. We set the contents of various
3501 + dynamic sections here. */
3503 +static bfd_boolean
3504 +elf_i386_finish_dynamic_symbol (bfd *output_bfd,
3505 + struct bfd_link_info *info,
3506 + struct elf_link_hash_entry *h,
3507 + Elf_Internal_Sym *sym)
3509 + struct elf_i386_link_hash_table *htab;
3511 + htab = elf_i386_hash_table (info);
3513 + if (h->plt.offset != (bfd_vma) -1)
3515 + bfd_vma plt_index;
3516 + bfd_vma got_offset;
3517 + Elf_Internal_Rela rel;
3518 + bfd_byte *loc;
3520 + /* This symbol has an entry in the procedure linkage table. Set
3521 + it up. */
3523 + if (h->dynindx == -1
3524 + || htab->splt == NULL
3525 + || htab->sgotplt == NULL
3526 + || htab->srelplt == NULL)
3527 + abort ();
3529 + /* Get the index in the procedure linkage table which
3530 + corresponds to this symbol. This is the index of this symbol
3531 + in all the symbols for which we are making plt entries. The
3532 + first entry in the procedure linkage table is reserved. */
3533 + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1;
3535 + /* Get the offset into the .got table of the entry that
3536 + corresponds to this function. Each .got entry is 4 bytes.
3537 + The first three are reserved. */
3538 + got_offset = (plt_index + 3) * 4;
3540 + /* Fill in the entry in the procedure linkage table. */
3541 + if (! info->shared)
3543 + memcpy (htab->splt->contents + h->plt.offset, elf_i386_plt_entry,
3544 + PLT_ENTRY_SIZE);
3545 + bfd_put_32 (output_bfd,
3546 + (htab->sgotplt->output_section->vma
3547 + + htab->sgotplt->output_offset
3548 + + got_offset),
3549 + htab->splt->contents + h->plt.offset +
3550 + elf_i386_plt_entry_offset1);
3552 + if (htab->is_vxworks)
3554 + int s, k, reloc_index;
3556 + /* Create the R_386_32 relocation referencing the GOT
3557 + for this PLT entry. */
3559 + /* S: Current slot number (zero-based). */
3560 + s = (h->plt.offset - PLT_ENTRY_SIZE) / PLT_ENTRY_SIZE;
3561 + /* K: Number of relocations for PLTResolve. */
3562 + if (info->shared)
3563 + k = PLTRESOLVE_RELOCS_SHLIB;
3564 + else
3565 + k = PLTRESOLVE_RELOCS;
3566 + /* Skip the PLTresolve relocations, and the relocations for
3567 + the other PLT slots. */
3568 + reloc_index = k + s * PLT_NON_JUMP_SLOT_RELOCS;
3569 + loc = (htab->srelplt2->contents + reloc_index
3570 + * sizeof (Elf32_External_Rel));
3572 + rel.r_offset = (htab->splt->output_section->vma
3573 + + htab->splt->output_offset
3574 + + h->plt.offset + 2),
3575 + rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3576 + bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
3578 + /* Create the R_386_32 relocation referencing the beginning of
3579 + the PLT for this GOT entry. */
3580 + rel.r_offset = (htab->sgotplt->output_section->vma
3581 + + htab->sgotplt->output_offset
3582 + + got_offset);
3583 + rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
3584 + bfd_elf32_swap_reloc_out (output_bfd, &rel,
3585 + loc + sizeof (Elf32_External_Rel));
3588 + else
3590 + memcpy (htab->splt->contents + h->plt.offset, elf_i386_pic_plt_entry,
3591 + PLT_ENTRY_SIZE);
3592 + bfd_put_32 (output_bfd, got_offset,
3593 + htab->splt->contents + h->plt.offset + 2);
3596 + bfd_put_32 (output_bfd, plt_index * sizeof (Elf32_External_Rel),
3597 + htab->splt->contents + h->plt.offset +
3598 + elf_i386_plt_entry_offset3);
3599 + /*
3600 + * The previous code assumed that the jump entry ended a PLT entry.
3601 + * Forcing alignment to 0mod32 adds some hlt bytes at the end (11).
3602 + * We therefore need to subtract those bytes from the jump offset.
3603 + */
3604 + bfd_put_32 (output_bfd, - (h->plt.offset + elf_i386_plt_entry_offset5),
3605 + htab->splt->contents + h->plt.offset +
3606 + elf_i386_plt_entry_offset4);
3608 + /* Fill in the entry in the global offset table. */
3609 + bfd_put_32 (output_bfd,
3610 + (htab->splt->output_section->vma
3611 + + htab->splt->output_offset
3612 + + h->plt.offset
3613 + + elf_i386_plt_entry_offset2),
3614 + htab->sgotplt->contents + got_offset);
3616 + /* Fill in the entry in the .rel.plt section. */
3617 + rel.r_offset = (htab->sgotplt->output_section->vma
3618 + + htab->sgotplt->output_offset
3619 + + got_offset);
3620 + rel.r_info = ELF32_R_INFO (h->dynindx, R_386_JUMP_SLOT);
3621 + loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rel);
3622 + bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
3624 + if (!h->def_regular)
3626 + /* Mark the symbol as undefined, rather than as defined in
3627 + the .plt section. Leave the value if there were any
3628 + relocations where pointer equality matters (this is a clue
3629 + for the dynamic linker, to make function pointer
3630 + comparisons work between an application and shared
3631 + library), otherwise set it to zero. If a function is only
3632 + called from a binary, there is no need to slow down
3633 + shared libraries because of that. */
3634 + sym->st_shndx = SHN_UNDEF;
3635 + if (!h->pointer_equality_needed)
3636 + sym->st_value = 0;
3640 + if (h->got.offset != (bfd_vma) -1
3641 + && ! GOT_TLS_GD_ANY_P (elf_i386_hash_entry(h)->tls_type)
3642 + && (elf_i386_hash_entry(h)->tls_type & GOT_TLS_IE) == 0)
3644 + Elf_Internal_Rela rel;
3645 + bfd_byte *loc;
3647 + /* This symbol has an entry in the global offset table. Set it
3648 + up. */
3650 + if (htab->sgot == NULL || htab->srelgot == NULL)
3651 + abort ();
3653 + rel.r_offset = (htab->sgot->output_section->vma
3654 + + htab->sgot->output_offset
3655 + + (h->got.offset & ~(bfd_vma) 1));
3657 + /* If this is a static link, or it is a -Bsymbolic link and the
3658 + symbol is defined locally or was forced to be local because
3659 + of a version file, we just want to emit a RELATIVE reloc.
3660 + The entry in the global offset table will already have been
3661 + initialized in the relocate_section function. */
3662 + if (info->shared
3663 + && SYMBOL_REFERENCES_LOCAL (info, h))
3665 + BFD_ASSERT((h->got.offset & 1) != 0);
3666 + rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
3668 + else
3670 + BFD_ASSERT((h->got.offset & 1) == 0);
3671 + bfd_put_32 (output_bfd, (bfd_vma) 0,
3672 + htab->sgot->contents + h->got.offset);
3673 + rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT);
3676 + loc = htab->srelgot->contents;
3677 + loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
3678 + bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
3681 + if (h->needs_copy)
3683 + Elf_Internal_Rela rel;
3684 + bfd_byte *loc;
3686 + /* This symbol needs a copy reloc. Set it up. */
3688 + if (h->dynindx == -1
3689 + || (h->root.type != bfd_link_hash_defined
3690 + && h->root.type != bfd_link_hash_defweak)
3691 + || htab->srelbss == NULL)
3692 + abort ();
3694 + rel.r_offset = (h->root.u.def.value
3695 + + h->root.u.def.section->output_section->vma
3696 + + h->root.u.def.section->output_offset);
3697 + rel.r_info = ELF32_R_INFO (h->dynindx, R_386_COPY);
3698 + loc = htab->srelbss->contents;
3699 + loc += htab->srelbss->reloc_count++ * sizeof (Elf32_External_Rel);
3700 + bfd_elf32_swap_reloc_out (output_bfd, &rel, loc);
3703 + /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute.
3704 + On VxWorks, the _GLOBAL_OFFSET_TABLE_ symbol is not absolute: it
3705 + is relative to the ".got" section. */
3706 + if (strcmp (h->root.root.string, "_DYNAMIC") == 0
3707 + || (!htab->is_vxworks && h == htab->elf.hgot))
3708 + sym->st_shndx = SHN_ABS;
3710 + return TRUE;
3713 +/* Used to decide how to sort relocs in an optimal manner for the
3714 + dynamic linker, before writing them out. */
3716 +static enum elf_reloc_type_class
3717 +elf_i386_reloc_type_class (const Elf_Internal_Rela *rela)
3719 + switch (ELF32_R_TYPE (rela->r_info))
3721 + case R_386_RELATIVE:
3722 + return reloc_class_relative;
3723 + case R_386_JUMP_SLOT:
3724 + return reloc_class_plt;
3725 + case R_386_COPY:
3726 + return reloc_class_copy;
3727 + default:
3728 + return reloc_class_normal;
3732 +/* Finish up the dynamic sections. */
3734 +static bfd_boolean
3735 +elf_i386_finish_dynamic_sections (bfd *output_bfd,
3736 + struct bfd_link_info *info)
3738 + struct elf_i386_link_hash_table *htab;
3739 + bfd *dynobj;
3740 + asection *sdyn;
3742 + htab = elf_i386_hash_table (info);
3743 + dynobj = htab->elf.dynobj;
3744 + sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
3746 + if (htab->elf.dynamic_sections_created)
3748 + Elf32_External_Dyn *dyncon, *dynconend;
3750 + if (sdyn == NULL || htab->sgot == NULL)
3751 + abort ();
3753 + dyncon = (Elf32_External_Dyn *) sdyn->contents;
3754 + dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
3755 + for (; dyncon < dynconend; dyncon++)
3757 + Elf_Internal_Dyn dyn;
3758 + asection *s;
3760 + bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
3762 + switch (dyn.d_tag)
3764 + default:
3765 + continue;
3767 + case DT_PLTGOT:
3768 + s = htab->sgotplt;
3769 + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
3770 + break;
3772 + case DT_JMPREL:
3773 + s = htab->srelplt;
3774 + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
3775 + break;
3777 + case DT_PLTRELSZ:
3778 + s = htab->srelplt;
3779 + dyn.d_un.d_val = s->size;
3780 + break;
3782 + case DT_RELSZ:
3783 + /* My reading of the SVR4 ABI indicates that the
3784 + procedure linkage table relocs (DT_JMPREL) should be
3785 + included in the overall relocs (DT_REL). This is
3786 + what Solaris does. However, UnixWare can not handle
3787 + that case. Therefore, we override the DT_RELSZ entry
3788 + here to make it not include the JMPREL relocs. */
3789 + s = htab->srelplt;
3790 + if (s == NULL)
3791 + continue;
3792 + dyn.d_un.d_val -= s->size;
3793 + break;
3795 + case DT_REL:
3796 + /* We may not be using the standard ELF linker script.
3797 + If .rel.plt is the first .rel section, we adjust
3798 + DT_REL to not include it. */
3799 + s = htab->srelplt;
3800 + if (s == NULL)
3801 + continue;
3802 + if (dyn.d_un.d_ptr != s->output_section->vma + s->output_offset)
3803 + continue;
3804 + dyn.d_un.d_ptr += s->size;
3805 + break;
3808 + bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
3811 + /* Fill in the first entry in the procedure linkage table. */
3812 + if (htab->splt && htab->splt->size > 0)
3814 + if (info->shared)
3816 + memcpy (htab->splt->contents, elf_i386_pic_plt0_entry,
3817 + sizeof (elf_i386_pic_plt0_entry));
3818 + memset (htab->splt->contents + sizeof (elf_i386_pic_plt0_entry),
3819 + htab->plt0_pad_byte,
3820 + PLT_ENTRY_SIZE - sizeof (elf_i386_pic_plt0_entry));
3822 + else
3824 + memcpy (htab->splt->contents, elf_i386_plt0_entry,
3825 + sizeof(elf_i386_plt0_entry));
3826 + memset (htab->splt->contents + sizeof (elf_i386_plt0_entry),
3827 + htab->plt0_pad_byte,
3828 + PLT_ENTRY_SIZE - sizeof (elf_i386_plt0_entry));
3829 + bfd_put_32 (output_bfd,
3830 + (htab->sgotplt->output_section->vma
3831 + + htab->sgotplt->output_offset
3832 + + 4),
3833 + htab->splt->contents + elf_i386_plt0_entry_offset1);
3834 + bfd_put_32 (output_bfd,
3835 + (htab->sgotplt->output_section->vma
3836 + + htab->sgotplt->output_offset
3837 + + 8),
3838 + htab->splt->contents + elf_i386_plt0_entry_offset2);
3840 + if (htab->is_vxworks)
3842 + Elf_Internal_Rela rel;
3844 + /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 4.
3845 + On IA32 we use REL relocations so the addend goes in
3846 + the PLT directly. */
3847 + rel.r_offset = (htab->splt->output_section->vma
3848 + + htab->splt->output_offset
3849 + + 2);
3850 + rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3851 + bfd_elf32_swap_reloc_out (output_bfd, &rel,
3852 + htab->srelplt2->contents);
3853 + /* Generate a relocation for _GLOBAL_OFFSET_TABLE_ + 8. */
3854 + rel.r_offset = (htab->splt->output_section->vma
3855 + + htab->splt->output_offset
3856 + + 8);
3857 + rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3858 + bfd_elf32_swap_reloc_out (output_bfd, &rel,
3859 + htab->srelplt2->contents +
3860 + sizeof (Elf32_External_Rel));
3864 + /* UnixWare sets the entsize of .plt to 4, although that doesn't
3865 + really seem like the right value. */
3866 + elf_section_data (htab->splt->output_section)
3867 + ->this_hdr.sh_entsize = 4;
3869 + /* Correct the .rel.plt.unloaded relocations. */
3870 + if (htab->is_vxworks && !info->shared)
3872 + int num_plts = (htab->splt->size / PLT_ENTRY_SIZE) - 1;
3873 + unsigned char *p;
3875 + p = htab->srelplt2->contents;
3876 + if (info->shared)
3877 + p += PLTRESOLVE_RELOCS_SHLIB * sizeof (Elf32_External_Rel);
3878 + else
3879 + p += PLTRESOLVE_RELOCS * sizeof (Elf32_External_Rel);
3881 + for (; num_plts; num_plts--)
3883 + Elf_Internal_Rela rel;
3884 + bfd_elf32_swap_reloc_in (output_bfd, p, &rel);
3885 + rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3886 + bfd_elf32_swap_reloc_out (output_bfd, &rel, p);
3887 + p += sizeof (Elf32_External_Rel);
3889 + bfd_elf32_swap_reloc_in (output_bfd, p, &rel);
3890 + rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
3891 + bfd_elf32_swap_reloc_out (output_bfd, &rel, p);
3892 + p += sizeof (Elf32_External_Rel);
3898 + if (htab->sgotplt)
3900 + /* Fill in the first three entries in the global offset table. */
3901 + if (htab->sgotplt->size > 0)
3903 + bfd_put_32 (output_bfd,
3904 + (sdyn == NULL ? 0
3905 + : sdyn->output_section->vma + sdyn->output_offset),
3906 + htab->sgotplt->contents);
3907 + bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 4);
3908 + bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 8);
3911 + elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4;
3914 + if (htab->sgot && htab->sgot->size > 0)
3915 + elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
3917 + return TRUE;
3920 +/* Return address for Ith PLT stub in section PLT, for relocation REL
3921 + or (bfd_vma) -1 if it should not be included. */
3923 +static bfd_vma
3924 +elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
3925 + const arelent *rel ATTRIBUTE_UNUSED)
3927 + return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
3930 +/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
3932 +static bfd_boolean
3933 +elf_i386_hash_symbol (struct elf_link_hash_entry *h)
3935 + if (h->plt.offset != (bfd_vma) -1
3936 + && !h->def_regular
3937 + && !h->pointer_equality_needed)
3938 + return FALSE;
3940 + return _bfd_elf_hash_symbol (h);
3943 +#define TARGET_LITTLE_SYM bfd_elf32_nacl_vec
3944 +#define TARGET_LITTLE_NAME "elf32-nacl"
3946 +/* NativeClient defines its own ABI.*/
3947 +#undef ELF_OSABI
3948 +#define ELF_OSABI ELFOSABI_NACL
3950 +#define ELF_ARCH bfd_arch_i386
3951 +#define ELF_MACHINE_CODE EM_386
3952 +#define ELF_MAXPAGESIZE 0x1000
3954 +#define elf_backend_can_gc_sections 1
3955 +#define elf_backend_can_refcount 1
3956 +#define elf_backend_want_got_plt 1
3957 +#define elf_backend_plt_readonly 1
3958 +#define elf_backend_want_plt_sym 0
3959 +#define elf_backend_got_header_size 12
3961 +/* Support RELA for objdump of prelink objects. */
3962 +#define elf_info_to_howto elf_i386_info_to_howto_rel
3963 +#define elf_info_to_howto_rel elf_i386_info_to_howto_rel
3965 +#define bfd_elf32_mkobject elf_i386_mkobject
3967 +#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name
3968 +#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create
3969 +#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup
3970 +#define bfd_elf32_bfd_reloc_name_lookup elf_i386_reloc_name_lookup
3972 +#define elf_backend_adjust_dynamic_symbol elf_i386_adjust_dynamic_symbol
3973 +#define elf_backend_check_relocs elf_i386_check_relocs
3974 +#define elf_backend_copy_indirect_symbol elf_i386_copy_indirect_symbol
3975 +#define elf_backend_create_dynamic_sections elf_i386_create_dynamic_sections
3976 +#define elf_backend_fake_sections elf_i386_fake_sections
3977 +#define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections
3978 +#define elf_backend_finish_dynamic_symbol elf_i386_finish_dynamic_symbol
3979 +#define elf_backend_gc_mark_hook elf_i386_gc_mark_hook
3980 +#define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook
3981 +#define elf_backend_grok_prstatus elf_i386_grok_prstatus
3982 +#define elf_backend_grok_psinfo elf_i386_grok_psinfo
3983 +#define elf_backend_reloc_type_class elf_i386_reloc_type_class
3984 +#define elf_backend_relocate_section elf_i386_relocate_section
3985 +#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
3986 +#define elf_backend_always_size_sections elf_i386_always_size_sections
3987 +#define elf_backend_omit_section_dynsym \
3988 + ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
3989 +#define elf_backend_plt_sym_val elf_i386_plt_sym_val
3990 +#define elf_backend_hash_symbol elf_i386_hash_symbol
3992 +#define bfd_elf32_bfd_merge_private_bfd_data \
3993 + elf32_nacl_merge_private_bfd_data
3995 +static unsigned long previous_ibfd_e_flags = (unsigned long) EF_NACL_ALIGN_LIB;
3996 +static unsigned char previous_ibfd_abiversion = 0;
3998 +static bfd_boolean
3999 +elf32_nacl_merge_private_bfd_data (bfd *ibfd,
4000 + bfd *obfd)
4002 + unsigned long ibfd_e_flags;
4003 + unsigned char ibfd_abiversion;
4005 + ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_NACL_ALIGN_MASK;
4006 + if ((ibfd_e_flags != EF_NACL_ALIGN_LIB) &&
4007 + (previous_ibfd_e_flags != EF_NACL_ALIGN_LIB) &&
4008 + (ibfd_e_flags != previous_ibfd_e_flags)) {
4009 + (*_bfd_error_handler)
4010 + (_("%B: linking files with incompatible alignments"), ibfd);
4011 + bfd_set_error (bfd_error_bad_value);
4012 + return FALSE;
4015 + ibfd_abiversion = elf_elfheader (ibfd)->e_ident[EI_ABIVERSION];
4016 + if (ibfd_abiversion != 0 &&
4017 + previous_ibfd_abiversion != 0 &&
4018 + ibfd_abiversion != previous_ibfd_abiversion) {
4019 + (*_bfd_error_handler)
4020 + (_("%B: linking files with incompatible abi version"), ibfd);
4021 + bfd_set_error (bfd_error_bad_value);
4022 + return FALSE;
4025 + previous_ibfd_e_flags = ibfd_e_flags;
4026 + elf_elfheader (obfd)->e_flags |= previous_ibfd_e_flags;
4028 + previous_ibfd_abiversion = ibfd_abiversion;
4029 + elf_elfheader (obfd)->e_ident[EI_ABIVERSION] = previous_ibfd_abiversion;
4031 + return TRUE;
4034 +#define elf_backend_final_write_processing \
4035 + elf32_nacl_backend_final_write_processing
4037 +static void
4038 +elf32_nacl_backend_final_write_processing (bfd *abfd,
4039 + bfd_boolean linker ATTRIBUTE_UNUSED)
4041 + elf_elfheader (abfd)->e_ident[EI_OSABI] = ELFOSABI_NACL;
4042 + elf_elfheader (abfd)->e_ident[EI_ABIVERSION] = EF_NACL_ABIVERSION;
4043 + elf_elfheader (abfd)->e_flags |= previous_ibfd_e_flags;
4046 +#include "elf32-target.h"
4047 diff -Naur ../PRISTINE/binutils-2.18/bfd/targets.c binutils-2.18/bfd/targets.c
4048 --- ../PRISTINE/binutils-2.18/bfd/targets.c 2007-08-06 12:59:42.000000000 -0700
4049 +++ binutils-2.18/bfd/targets.c 2009-01-09 17:32:43.436803000 -0800
4050 @@ -622,6 +622,7 @@
4051 extern const bfd_target bfd_elf32_mn10300_vec;
4052 extern const bfd_target bfd_elf32_mt_vec;
4053 extern const bfd_target bfd_elf32_msp430_vec;
4054 +extern const bfd_target bfd_elf32_nacl_vec;
4055 extern const bfd_target bfd_elf32_nbigmips_vec;
4056 extern const bfd_target bfd_elf32_nlittlemips_vec;
4057 extern const bfd_target bfd_elf32_ntradbigmips_vec;
4058 diff -Naur ../PRISTINE/binutils-2.18/binutils/readelf.c binutils-2.18/binutils/readelf.c
4059 --- ../PRISTINE/binutils-2.18/binutils/readelf.c 2007-08-28 10:19:34.000000000 -0700
4060 +++ binutils-2.18/binutils/readelf.c 2009-01-09 17:32:43.452792000 -0800
4061 @@ -2362,6 +2362,7 @@
4062 case ELFOSABI_AROS: return "Amiga Research OS";
4063 case ELFOSABI_STANDALONE: return _("Standalone App");
4064 case ELFOSABI_ARM: return "ARM";
4065 + case ELFOSABI_NACL: return "NativeClient";
4066 default:
4067 snprintf (buff, sizeof (buff), _("<unknown: %x>"), osabi);
4068 return buff;
4069 diff -Naur ../PRISTINE/binutils-2.18/config.sub binutils-2.18/config.sub
4070 --- ../PRISTINE/binutils-2.18/config.sub 2007-08-06 13:00:30.000000000 -0700
4071 +++ binutils-2.18/config.sub 2009-01-09 17:32:43.459781000 -0800
4072 @@ -306,6 +306,10 @@
4073 i*86 | x86_64)
4074 basic_machine=$basic_machine-pc
4076 + nacl*)
4077 + basic_machine=i686-pc
4078 + os=-nacl
4079 + ;;
4080 # Object if more than one company name word.
4081 *-*-*)
4082 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
4083 @@ -1238,6 +1242,9 @@
4085 esac
4087 + -nacl*)
4088 + os=-nacl
4089 + ;;
4090 -nto-qnx*)
4092 -nto*)
4093 diff -Naur ../PRISTINE/binutils-2.18/configure binutils-2.18/configure
4094 --- ../PRISTINE/binutils-2.18/configure 2007-08-06 13:29:40.000000000 -0700
4095 +++ binutils-2.18/configure 2009-01-09 17:32:43.485749000 -0800
4096 @@ -6128,7 +6128,7 @@
4097 # For an installed makeinfo, we require it to be from texinfo 4.4 or
4098 # higher, else we use the "missing" dummy.
4099 if ${MAKEINFO} --version \
4100 - | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
4101 + | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.([4-9]|1[0-9])|[5-9])' >/dev/null 2>&1; then
4103 else
4104 MAKEINFO="$MISSING makeinfo"
4105 diff -Naur ../PRISTINE/binutils-2.18/gas/as.c binutils-2.18/gas/as.c
4106 --- ../PRISTINE/binutils-2.18/gas/as.c 2007-08-28 10:19:35.000000000 -0700
4107 +++ binutils-2.18/gas/as.c 2009-01-09 17:32:43.491740000 -0800
4108 @@ -430,7 +430,7 @@
4109 OPTION_AL,
4110 OPTION_HASH_TABLE_SIZE,
4111 OPTION_REDUCE_MEMORY_OVERHEADS,
4112 - OPTION_WARN_FATAL
4113 + OPTION_WARN_FATAL,
4114 /* When you add options here, check that they do
4115 not collide with OPTION_MD_BASE. See as.h. */
4117 diff -Naur ../PRISTINE/binutils-2.18/gas/config/tc-i386.c binutils-2.18/gas/config/tc-i386.c
4118 --- ../PRISTINE/binutils-2.18/gas/config/tc-i386.c 2007-08-24 07:01:22.000000000 -0700
4119 +++ binutils-2.18/gas/config/tc-i386.c 2009-01-09 17:32:43.510748000 -0800
4120 @@ -99,6 +99,7 @@
4121 #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
4122 static void handle_large_common (int small ATTRIBUTE_UNUSED);
4123 #endif
4124 +static void nativeclient_symbol_init (void);
4126 static const char *default_arch = DEFAULT_ARCH;
4128 @@ -339,6 +340,14 @@
4129 /* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
4130 int x86_cie_data_alignment;
4132 +/* NativeClient support */
4134 +/* Default alignment. 0=OFF */
4135 +int nacl_alignment = NACL_ALIGN_POW2;
4137 +/* Use library mode. 0=OFF */
4138 +int nacl_library_mode = 0;
4140 /* Interface to relax_segment.
4141 There are 3 major relax states for 386 jump insns because the
4142 different types of jumps add different sizes to frags when we're
4143 @@ -1212,6 +1221,34 @@
4144 else
4145 as_fatal (_("Unknown architecture"));
4148 +void
4149 +nativeclient_symbol_init ()
4151 + symbolS *symbolP;
4152 + int entry_align;
4154 + /*
4155 + * A symbol conveying the setting of nacl_alignment to assembler writers.
4156 + */
4157 + symbolP = symbol_new ("NACLALIGN", absolute_section,
4158 + (valueT) nacl_alignment, &zero_address_frag);
4159 + symbol_table_insert (symbolP);
4161 + /*
4162 + * A symbol conveying the function entry alignment. This differs from
4163 + * NACLALIGN in library mode.
4164 + */
4165 + if (nacl_library_mode) {
4166 + entry_align = 5;
4168 + else {
4169 + entry_align = nacl_alignment;
4171 + symbolP = symbol_new ("NACLENTRYALIGN", absolute_section,
4172 + (valueT) entry_align, &zero_address_frag);
4173 + symbol_table_insert (symbolP);
4176 void
4177 md_begin ()
4178 @@ -1344,6 +1381,8 @@
4179 x86_dwarf2_return_column = 8;
4180 x86_cie_data_alignment = -4;
4183 + nativeclient_symbol_init();
4186 void
4187 @@ -3989,19 +4028,93 @@
4190 static void
4191 +insert_sandbox_code (void)
4193 + char* p;
4194 + int align_mask = (1 << nacl_alignment) - 1;
4196 + if (getenv("NACL_DEBUG_ALIGN")) {
4197 + p = frag_more (12);
4198 + p[0] = 0xF7; p[1] = 0xC0 + i.rm.regmem;
4199 + p[2] = align_mask; p[3] = p[4] = p[5] = 0x00; // TEST reg, align_mask
4200 + p[6] = 0x74; p[7] = 0x04; // JZ +4
4201 + p[8] = 0xCC; // INT3
4202 + p[9] = 0x0F; p[10] = 0x1F; p[11] = 0x00; // NOP
4204 + else {
4205 + p = frag_more (3);
4206 + p[0] = 0x83; // AND instruction.
4207 + p[1] = (0xe0 + i.rm.regmem); // mod = 11, reg = 100, rm = i.rm.regmem;
4208 + // p[2] = 0xff & ~align_mask;
4209 + p[2] = 0xff;
4214 +static int
4215 +frag_is_a_call (void)
4217 + if (i.tm.base_opcode == 0xe8) {
4218 + // direct calls
4219 + return 1;
4221 + else if (i.tm.base_opcode == 0xff) {
4222 + // possibly indirect calls
4223 + return (i.rm.mode == 3) && (i.rm.reg == 2);
4225 + else {
4226 + return 0;
4231 +static void
4232 output_insn (void)
4234 fragS *insn_start_frag;
4235 offsetT insn_start_off;
4237 + // DCS -- New code for NativeClient.
4238 + // Frag_align_code sets the alignment on the current fragment and may
4239 + // create a new one. Because of this we remember the current fragment
4240 + // before calling frag_align_code.
4241 + insn_start_frag = frag_now;
4243 + if (nacl_alignment > 0) {
4244 + frag_align_code(0, 0);
4245 +#ifdef DCS
4246 + // TODO: this code seems unnecessary. Remove it.
4247 + // Really ugly stuff to avoid splitting call and its subsequent alignment
4248 + // across two fragments.
4249 + if (frag_is_a_call() &&
4250 + obstack_room(&frchain_now->frch_obstack) < (unsigned)((1<<(nacl_alignment+1))-1)) {
4251 + fragS *temp_frag = frag_now;
4252 + frag_align_code(nacl_alignment + 1, 0);
4253 + temp_frag->fr_offset = 0;
4254 + temp_frag->fr_subtype = 0;
4256 +#endif /* DCS */
4259 /* Tie dwarf2 debug info to the address at the start of the insn.
4260 We can't do this after the insn has been output as the current
4261 frag may have been closed off. eg. by frag_var. */
4262 dwarf2_emit_insn (0);
4264 - insn_start_frag = frag_now;
4265 insn_start_off = frag_now_fix ();
4267 + if (nacl_alignment > 0) {
4268 + if (!strcmp(i.tm.name, "naclcall")) {
4269 + insert_sandbox_code();
4271 + else if (!strcmp(i.tm.name, "nacljmp")) {
4272 + insert_sandbox_code();
4274 + else if (!strcmp(i.tm.name, "naclret")) {
4275 + insert_sandbox_code();
4279 /* Output jumps. */
4280 if (i.tm.opcode_modifier & Jump)
4281 output_branch ();
4282 @@ -4115,6 +4228,74 @@
4283 pi ("" /*line*/, &i);
4285 #endif /* DEBUG386 */
4286 + /*
4287 + * We want to make sure no instruction straddles a (1 << nacl_alignment)
4288 + * boundary. We do this by setting the fragment alignment to
4289 + * (1 << nacl_alignment), but allowing no more than the size of the
4290 + * instruction as fill.
4291 + */
4292 + if (nacl_alignment > 0) {
4293 + int align_base;
4294 + int call_align;
4295 + int instrsize = (int) frag_now_fix();
4297 + /*
4298 + * "library mode" enables compatible library builds for either 16 or
4299 + * 32 byte alignment. Using the strictest alignment requirement for
4300 + * instructions makes them 0mod16 aligned. Calls need to end a 32 byte
4301 + * region.
4302 + */
4303 + if (nacl_library_mode) {
4304 + align_base = 4;
4305 + call_align = 5;
4307 + else {
4308 + align_base = nacl_alignment;
4309 + call_align = nacl_alignment;
4312 + switch (instrsize) {
4313 + case 0:
4314 + // We get zero size for jump instructions. Go to their biggest.
4315 + insn_start_frag->fr_offset = align_base;
4316 + insn_start_frag->fr_subtype = 5;
4317 + break;
4319 + case 1:
4320 + if ((i.tm.base_opcode == 0xf3) || (i.tm.base_opcode == 0xf2) ||
4321 + (i.tm.base_opcode == 0xf0)) {
4322 + // rep and lock refixes are treated as separate instructions.
4323 + // I don't know any other patch but to force an alignment to 0,
4324 + // i.e., waste as many bytes as it takes.
4325 + insn_start_frag->fr_offset = align_base;
4326 + insn_start_frag->fr_subtype = 0;
4328 + else {
4329 + // Don't align other one-byte instructions.
4330 + insn_start_frag->fr_offset = 0;
4331 + insn_start_frag->fr_subtype = 0;
4333 + break;
4335 + default:
4336 + // Don't use more than size-1 bytes to pad.
4337 + insn_start_frag->fr_offset = align_base;
4338 + insn_start_frag->fr_subtype = instrsize-1;
4339 + break;
4343 + /*
4344 + * Calls need to fall at the end of a (1 << call_align) region. We
4345 + * make sure there are no instructions after the call until the next
4346 + * alignment. During writing of the object we swap the nops before the
4347 + * instruction.
4348 + */
4349 + if (frag_is_a_call()) {
4350 + frag_now->is_call = 1;
4351 + frag_align_code(call_align,0);
4356 /* Return the size of the displacement operand N. */
4357 @@ -5985,6 +6166,9 @@
4358 #define OPTION_DIVIDE (OPTION_MD_BASE + 2)
4359 #define OPTION_MARCH (OPTION_MD_BASE + 3)
4360 #define OPTION_MTUNE (OPTION_MD_BASE + 4)
4361 +#define OPTION_NACL_ALIGN (OPTION_MD_BASE + 5)
4362 +#define OPTION_NACL_LIBRARY_MODE (OPTION_MD_BASE + 6)
4365 struct option md_longopts[] =
4367 @@ -5995,6 +6179,8 @@
4368 {"divide", no_argument, NULL, OPTION_DIVIDE},
4369 {"march", required_argument, NULL, OPTION_MARCH},
4370 {"mtune", required_argument, NULL, OPTION_MTUNE},
4371 + {"nacl-align", required_argument, NULL, OPTION_NACL_ALIGN},
4372 + {"nacl-library-mode", no_argument, NULL, OPTION_NACL_LIBRARY_MODE},
4373 {NULL, no_argument, NULL, 0}
4375 size_t md_longopts_size = sizeof (md_longopts);
4376 @@ -6115,6 +6301,20 @@
4377 as_fatal (_("Invalid -mtune= option: `%s'"), arg);
4378 break;
4380 + case OPTION_NACL_ALIGN:
4382 + nacl_alignment = atoi (optarg);
4383 + if (nacl_alignment < 0)
4384 + as_fatal (_("--nacl-align needs a non-negative argument"));
4385 + break;
4388 + case OPTION_NACL_LIBRARY_MODE:
4390 + nacl_library_mode = 1;
4391 + break;
4394 default:
4395 return 0;
4397 diff -Naur ../PRISTINE/binutils-2.18/gas/config/tc-i386.h binutils-2.18/gas/config/tc-i386.h
4398 --- ../PRISTINE/binutils-2.18/gas/config/tc-i386.h 2007-08-06 12:59:57.000000000 -0700
4399 +++ binutils-2.18/gas/config/tc-i386.h 2009-01-09 17:32:43.517716000 -0800
4400 @@ -199,6 +199,7 @@
4401 #if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (LEX_AT)
4402 #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES)
4403 extern void x86_cons (expressionS *, int);
4405 #endif
4407 #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_cons_fix_new(FRAG, OFF, LEN, EXP)
4408 @@ -317,4 +318,12 @@
4410 #endif /* TE_PE */
4412 +/* NativeClient specific additions. */
4414 +/* log2 of the instruction alignment */
4415 +extern int nacl_alignment;
4417 +/* library mode: 16-byte alignment, calls end 32-byte chunks. */
4418 +extern int nacl_library_mode;
4420 #endif /* TC_I386 */
4421 diff -Naur ../PRISTINE/binutils-2.18/gas/config/tc-nacl.c binutils-2.18/gas/config/tc-nacl.c
4422 --- ../PRISTINE/binutils-2.18/gas/config/tc-nacl.c 1969-12-31 16:00:00.000000000 -0800
4423 +++ binutils-2.18/gas/config/tc-nacl.c 2009-02-19 14:58:24.814566000 -0800
4424 @@ -0,0 +1,8199 @@
4425 +/* tc-nacl.c -- Assemble code for NativeClient
4426 + Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4427 + 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4428 + Free Software Foundation, Inc.
4430 + This file is part of GAS, the GNU Assembler.
4432 + GAS is free software; you can redistribute it and/or modify
4433 + it under the terms of the GNU General Public License as published by
4434 + the Free Software Foundation; either version 3, or (at your option)
4435 + any later version.
4437 + GAS is distributed in the hope that it will be useful,
4438 + but WITHOUT ANY WARRANTY; without even the implied warranty of
4439 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4440 + GNU General Public License for more details.
4442 + You should have received a copy of the GNU General Public License
4443 + along with GAS; see the file COPYING. If not, write to the Free
4444 + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
4445 + 02110-1301, USA. */
4447 +/* Intel 80386 machine specific gas.
4448 + Written by Eliot Dresselhaus (eliot@mgm.mit.edu).
4449 + x86_64 support by Jan Hubicka (jh@suse.cz)
4450 + VIA PadLock support by Michal Ludvig (mludvig@suse.cz)
4451 + Bugs & suggestions are completely welcome. This is free software.
4452 + Please help us make it better. */
4454 +#include "as.h"
4455 +#include "safe-ctype.h"
4456 +#include "subsegs.h"
4457 +#include "dwarf2dbg.h"
4458 +#include "dw2gencfi.h"
4459 +#include "elf/x86-64.h"
4460 +#include "elf/nacl.h"
4462 +#ifndef REGISTER_WARNINGS
4463 +#define REGISTER_WARNINGS 1
4464 +#endif
4466 +#ifndef INFER_ADDR_PREFIX
4467 +#define INFER_ADDR_PREFIX 1
4468 +#endif
4470 +#ifndef SCALE1_WHEN_NO_INDEX
4471 +/* Specifying a scale factor besides 1 when there is no index is
4472 + futile. eg. `mov (%ebx,2),%al' does exactly the same as
4473 + `mov (%ebx),%al'. To slavishly follow what the programmer
4474 + specified, set SCALE1_WHEN_NO_INDEX to 0. */
4475 +#define SCALE1_WHEN_NO_INDEX 1
4476 +#endif
4478 +#ifndef DEFAULT_ARCH
4479 +#define DEFAULT_ARCH "i386"
4480 +#endif
4482 +#ifndef INLINE
4483 +#if __GNUC__ >= 2
4484 +#define INLINE __inline__
4485 +#else
4486 +#define INLINE
4487 +#endif
4488 +#endif
4490 +static void set_code_flag (int);
4491 +static void set_16bit_gcc_code_flag (int);
4492 +static void set_intel_syntax (int);
4493 +static void set_cpu_arch (int);
4494 +#ifdef TE_PE
4495 +static void pe_directive_secrel (int);
4496 +#endif
4497 +static void signed_cons (int);
4498 +static char *output_invalid (int c);
4499 +static int i386_operand (char *);
4500 +static int i386_intel_operand (char *, int);
4501 +static const reg_entry *parse_register (char *, char **);
4502 +static char *parse_insn (char *, char *);
4503 +static char *parse_operands (char *, const char *);
4504 +static void swap_operands (void);
4505 +static void swap_2_operands (int, int);
4506 +static void optimize_imm (void);
4507 +static void optimize_disp (void);
4508 +static int match_template (void);
4509 +static int check_string (void);
4510 +static int process_suffix (void);
4511 +static int check_byte_reg (void);
4512 +static int check_long_reg (void);
4513 +static int check_qword_reg (void);
4514 +static int check_word_reg (void);
4515 +static int finalize_imm (void);
4516 +static int process_operands (void);
4517 +static const seg_entry *build_modrm_byte (void);
4518 +static void output_insn (void);
4519 +static void output_imm (fragS *, offsetT);
4520 +static void output_disp (fragS *, offsetT);
4521 +#ifndef I386COFF
4522 +static void s_bss (int);
4523 +#endif
4524 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
4525 +static void handle_large_common (int small ATTRIBUTE_UNUSED);
4526 +#endif
4527 +static void nativeclient_symbol_init (void);
4529 +static const char *default_arch = DEFAULT_ARCH;
4531 +/* 'md_assemble ()' gathers together information and puts it into a
4532 + i386_insn. */
4534 +union i386_op
4536 + expressionS *disps;
4537 + expressionS *imms;
4538 + const reg_entry *regs;
4539 + };
4541 +struct _i386_insn
4543 + /* TM holds the template for the insn were currently assembling. */
4544 + template tm;
4546 + /* SUFFIX holds the instruction mnemonic suffix if given.
4547 + (e.g. 'l' for 'movl') */
4548 + char suffix;
4550 + /* OPERANDS gives the number of given operands. */
4551 + unsigned int operands;
4553 + /* REG_OPERANDS, DISP_OPERANDS, MEM_OPERANDS, IMM_OPERANDS give the number
4554 + of given register, displacement, memory operands and immediate
4555 + operands. */
4556 + unsigned int reg_operands, disp_operands, mem_operands, imm_operands;
4558 + /* TYPES [i] is the type (see above #defines) which tells us how to
4559 + use OP[i] for the corresponding operand. */
4560 + unsigned int types[MAX_OPERANDS];
4562 + /* Displacement expression, immediate expression, or register for each
4563 + operand. */
4564 + union i386_op op[MAX_OPERANDS];
4566 + /* Flags for operands. */
4567 + unsigned int flags[MAX_OPERANDS];
4568 +#define Operand_PCrel 1
4570 + /* Relocation type for operand */
4571 + enum bfd_reloc_code_real reloc[MAX_OPERANDS];
4573 + /* BASE_REG, INDEX_REG, and LOG2_SCALE_FACTOR are used to encode
4574 + the base index byte below. */
4575 + const reg_entry *base_reg;
4576 + const reg_entry *index_reg;
4577 + unsigned int log2_scale_factor;
4579 + /* SEG gives the seg_entries of this insn. They are zero unless
4580 + explicit segment overrides are given. */
4581 + const seg_entry *seg[2];
4583 + /* PREFIX holds all the given prefix opcodes (usually null).
4584 + PREFIXES is the number of prefix opcodes. */
4585 + unsigned int prefixes;
4586 + unsigned char prefix[MAX_PREFIXES];
4588 + /* RM and SIB are the modrm byte and the sib byte where the
4589 + addressing modes of this insn are encoded. */
4591 + modrm_byte rm;
4592 + rex_byte rex;
4593 + sib_byte sib;
4594 + };
4596 +typedef struct _i386_insn i386_insn;
4598 +/* List of chars besides those in app.c:symbol_chars that can start an
4599 + operand. Used to prevent the scrubber eating vital white-space. */
4600 +const char extra_symbol_chars[] = "*%-(["
4601 +#ifdef LEX_AT
4602 + "@"
4603 +#endif
4604 +#ifdef LEX_QM
4605 + "?"
4606 +#endif
4609 +#if (defined (TE_I386AIX) \
4610 + || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
4611 + && !defined (TE_GNU) \
4612 + && !defined (TE_LINUX) \
4613 + && !defined (TE_NETWARE) \
4614 + && !defined (TE_FreeBSD) \
4615 + && !defined (TE_NetBSD)))
4616 +/* This array holds the chars that always start a comment. If the
4617 + pre-processor is disabled, these aren't very useful. The option
4618 + --divide will remove '/' from this list. */
4619 +const char *i386_comment_chars = "#/";
4620 +#define SVR4_COMMENT_CHARS 1
4621 +#define PREFIX_SEPARATOR '\\'
4623 +#else
4624 +const char *i386_comment_chars = "#";
4625 +#define PREFIX_SEPARATOR '/'
4626 +#endif
4628 +/* This array holds the chars that only start a comment at the beginning of
4629 + a line. If the line seems to have the form '# 123 filename'
4630 + .line and .file directives will appear in the pre-processed output.
4631 + Note that input_file.c hand checks for '#' at the beginning of the
4632 + first line of the input file. This is because the compiler outputs
4633 + #NO_APP at the beginning of its output.
4634 + Also note that comments started like this one will always work if
4635 + '/' isn't otherwise defined. */
4636 +const char line_comment_chars[] = "#/";
4638 +const char line_separator_chars[] = ";";
4640 +/* Chars that can be used to separate mant from exp in floating point
4641 + nums. */
4642 +const char EXP_CHARS[] = "eE";
4644 +/* Chars that mean this number is a floating point constant
4645 + As in 0f12.456
4646 + or 0d1.2345e12. */
4647 +const char FLT_CHARS[] = "fFdDxX";
4649 +/* Tables for lexical analysis. */
4650 +static char mnemonic_chars[256];
4651 +static char register_chars[256];
4652 +static char operand_chars[256];
4653 +static char identifier_chars[256];
4654 +static char digit_chars[256];
4656 +/* Lexical macros. */
4657 +#define is_mnemonic_char(x) (mnemonic_chars[(unsigned char) x])
4658 +#define is_operand_char(x) (operand_chars[(unsigned char) x])
4659 +#define is_register_char(x) (register_chars[(unsigned char) x])
4660 +#define is_space_char(x) ((x) == ' ')
4661 +#define is_identifier_char(x) (identifier_chars[(unsigned char) x])
4662 +#define is_digit_char(x) (digit_chars[(unsigned char) x])
4664 +/* All non-digit non-letter characters that may occur in an operand. */
4665 +static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]";
4667 +/* md_assemble() always leaves the strings it's passed unaltered. To
4668 + effect this we maintain a stack of saved characters that we've smashed
4669 + with '\0's (indicating end of strings for various sub-fields of the
4670 + assembler instruction). */
4671 +static char save_stack[32];
4672 +static char *save_stack_p;
4673 +#define END_STRING_AND_SAVE(s) \
4674 + do { *save_stack_p++ = *(s); *(s) = '\0'; } while (0)
4675 +#define RESTORE_END_STRING(s) \
4676 + do { *(s) = *--save_stack_p; } while (0)
4678 +/* The instruction we're assembling. */
4679 +static i386_insn i;
4681 +/* Possible templates for current insn. */
4682 +static const templates *current_templates;
4684 +/* Per instruction expressionS buffers: max displacements & immediates. */
4685 +static expressionS disp_expressions[MAX_MEMORY_OPERANDS];
4686 +static expressionS im_expressions[MAX_IMMEDIATE_OPERANDS];
4688 +/* Current operand we are working on. */
4689 +static int this_operand;
4691 +/* We support four different modes. FLAG_CODE variable is used to distinguish
4692 + these. */
4694 +enum flag_code {
4695 + CODE_32BIT,
4696 + CODE_16BIT,
4697 + CODE_64BIT };
4698 +#define NUM_FLAG_CODE ((int) CODE_64BIT + 1)
4700 +static enum flag_code flag_code;
4701 +static unsigned int object_64bit;
4702 +static int use_rela_relocations = 0;
4704 +/* The names used to print error messages. */
4705 +static const char *flag_code_names[] =
4707 + "32",
4708 + "16",
4709 + "64"
4710 + };
4712 +/* 1 for intel syntax,
4713 + 0 if att syntax. */
4714 +static int intel_syntax = 0;
4716 +/* 1 if register prefix % not required. */
4717 +static int allow_naked_reg = 0;
4719 +/* Register prefix used for error message. */
4720 +static const char *register_prefix = "%";
4722 +/* Used in 16 bit gcc mode to add an l suffix to call, ret, enter,
4723 + leave, push, and pop instructions so that gcc has the same stack
4724 + frame as in 32 bit mode. */
4725 +static char stackop_size = '\0';
4727 +/* Non-zero to optimize code alignment. */
4728 +int optimize_align_code = 1;
4730 +/* Non-zero to quieten some warnings. */
4731 +static int quiet_warnings = 0;
4733 +/* CPU name. */
4734 +static const char *cpu_arch_name = NULL;
4735 +static const char *cpu_sub_arch_name = NULL;
4737 +/* CPU feature flags. */
4738 +static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64;
4740 +/* If we have selected a cpu we are generating instructions for. */
4741 +static int cpu_arch_tune_set = 0;
4743 +/* Cpu we are generating instructions for. */
4744 +static enum processor_type cpu_arch_tune = PROCESSOR_UNKNOWN;
4746 +/* CPU feature flags of cpu we are generating instructions for. */
4747 +static unsigned int cpu_arch_tune_flags = 0;
4749 +/* CPU instruction set architecture used. */
4750 +static enum processor_type cpu_arch_isa = PROCESSOR_UNKNOWN;
4752 +/* CPU feature flags of instruction set architecture used. */
4753 +static unsigned int cpu_arch_isa_flags = 0;
4755 +/* If set, conditional jumps are not automatically promoted to handle
4756 + larger than a byte offset. */
4757 +static unsigned int no_cond_jump_promotion = 0;
4759 +/* Pre-defined "_GLOBAL_OFFSET_TABLE_". */
4760 +static symbolS *GOT_symbol;
4762 +/* The dwarf2 return column, adjusted for 32 or 64 bit. */
4763 +unsigned int x86_dwarf2_return_column;
4765 +/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
4766 +int x86_cie_data_alignment;
4768 +/* NativeClient support */
4770 +/* Default alignment. 0=OFF */
4771 +int nacl_alignment = NACL_ALIGN_POW2;
4773 +/* Use library mode. 0=OFF */
4774 +int nacl_library_mode = 0;
4776 +/* Interface to relax_segment.
4777 + There are 3 major relax states for 386 jump insns because the
4778 + different types of jumps add different sizes to frags when we're
4779 + figuring out what sort of jump to choose to reach a given label. */
4781 +/* Types. */
4782 +#define UNCOND_JUMP 0
4783 +#define COND_JUMP 1
4784 +#define COND_JUMP86 2
4786 +/* Sizes. */
4787 +#define CODE16 1
4788 +#define SMALL 0
4789 +#define SMALL16 (SMALL | CODE16)
4790 +#define BIG 2
4791 +#define BIG16 (BIG | CODE16)
4793 +#ifndef INLINE
4794 +#ifdef __GNUC__
4795 +#define INLINE __inline__
4796 +#else
4797 +#define INLINE
4798 +#endif
4799 +#endif
4801 +#define ENCODE_RELAX_STATE(type, size) \
4802 + ((relax_substateT) (((type) << 2) | (size)))
4803 +#define TYPE_FROM_RELAX_STATE(s) \
4804 + ((s) >> 2)
4805 +#define DISP_SIZE_FROM_RELAX_STATE(s) \
4806 + ((((s) & 3) == BIG ? 4 : (((s) & 3) == BIG16 ? 2 : 1)))
4808 +/* This table is used by relax_frag to promote short jumps to long
4809 + ones where necessary. SMALL (short) jumps may be promoted to BIG
4810 + (32 bit long) ones, and SMALL16 jumps to BIG16 (16 bit long). We
4811 + don't allow a short jump in a 32 bit code segment to be promoted to
4812 + a 16 bit offset jump because it's slower (requires data size
4813 + prefix), and doesn't work, unless the destination is in the bottom
4814 + 64k of the code segment (The top 16 bits of eip are zeroed). */
4816 +const relax_typeS md_relax_table[] =
4818 + /* The fields are:
4819 + 1) most positive reach of this state,
4820 + 2) most negative reach of this state,
4821 + 3) how many bytes this mode will have in the variable part of the frag
4822 + 4) which index into the table to try if we can't fit into this one. */
4824 + /* UNCOND_JUMP states. */
4825 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG)},
4826 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16)},
4827 + /* dword jmp adds 4 bytes to frag:
4828 + 0 extra opcode bytes, 4 displacement bytes. */
4829 + {0, 0, 4, 0},
4830 + /* word jmp adds 2 byte2 to frag:
4831 + 0 extra opcode bytes, 2 displacement bytes. */
4832 + {0, 0, 2, 0},
4834 + /* COND_JUMP states. */
4835 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG)},
4836 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP, BIG16)},
4837 + /* dword conditionals adds 5 bytes to frag:
4838 + 1 extra opcode byte, 4 displacement bytes. */
4839 + {0, 0, 5, 0},
4840 + /* word conditionals add 3 bytes to frag:
4841 + 1 extra opcode byte, 2 displacement bytes. */
4842 + {0, 0, 3, 0},
4844 + /* COND_JUMP86 states. */
4845 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG)},
4846 + {127 + 1, -128 + 1, 1, ENCODE_RELAX_STATE (COND_JUMP86, BIG16)},
4847 + /* dword conditionals adds 5 bytes to frag:
4848 + 1 extra opcode byte, 4 displacement bytes. */
4849 + {0, 0, 5, 0},
4850 + /* word conditionals add 4 bytes to frag:
4851 + 1 displacement byte and a 3 byte long branch insn. */
4852 + {0, 0, 4, 0}
4855 +static const arch_entry cpu_arch[] =
4857 + {"generic32", PROCESSOR_GENERIC32,
4858 + Cpu186|Cpu286|Cpu386},
4859 + {"generic64", PROCESSOR_GENERIC64,
4860 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4861 + |CpuMMX2|CpuSSE|CpuSSE2},
4862 + {"i8086", PROCESSOR_UNKNOWN,
4863 + 0},
4864 + {"i186", PROCESSOR_UNKNOWN,
4865 + Cpu186},
4866 + {"i286", PROCESSOR_UNKNOWN,
4867 + Cpu186|Cpu286},
4868 + {"i386", PROCESSOR_I386,
4869 + Cpu186|Cpu286|Cpu386},
4870 + {"i486", PROCESSOR_I486,
4871 + Cpu186|Cpu286|Cpu386|Cpu486},
4872 + {"i586", PROCESSOR_PENTIUM,
4873 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586},
4874 + {"i686", PROCESSOR_PENTIUMPRO,
4875 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686},
4876 + {"pentium", PROCESSOR_PENTIUM,
4877 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586},
4878 + {"pentiumpro",PROCESSOR_PENTIUMPRO,
4879 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686},
4880 + {"pentiumii", PROCESSOR_PENTIUMPRO,
4881 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX},
4882 + {"pentiumiii",PROCESSOR_PENTIUMPRO,
4883 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuMMX2|CpuSSE},
4884 + {"pentium4", PROCESSOR_PENTIUM4,
4885 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4886 + |CpuMMX2|CpuSSE|CpuSSE2},
4887 + {"prescott", PROCESSOR_NOCONA,
4888 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4889 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
4890 + {"nocona", PROCESSOR_NOCONA,
4891 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4892 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
4893 + {"yonah", PROCESSOR_CORE,
4894 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4895 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
4896 + {"core", PROCESSOR_CORE,
4897 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4898 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
4899 + {"merom", PROCESSOR_CORE2,
4900 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4901 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
4902 + {"core2", PROCESSOR_CORE2,
4903 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
4904 + |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
4905 + {"k6", PROCESSOR_K6,
4906 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX},
4907 + {"k6_2", PROCESSOR_K6,
4908 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow},
4909 + {"athlon", PROCESSOR_ATHLON,
4910 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
4911 + |CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA},
4912 + {"sledgehammer", PROCESSOR_K8,
4913 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
4914 + |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
4915 + {"opteron", PROCESSOR_K8,
4916 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
4917 + |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
4918 + {"k8", PROCESSOR_K8,
4919 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
4920 + |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
4921 + {"amdfam10", PROCESSOR_AMDFAM10,
4922 + Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuSledgehammer
4923 + |CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a
4924 + |CpuABM},
4925 + {".mmx", PROCESSOR_UNKNOWN,
4926 + CpuMMX},
4927 + {".sse", PROCESSOR_UNKNOWN,
4928 + CpuMMX|CpuMMX2|CpuSSE},
4929 + {".sse2", PROCESSOR_UNKNOWN,
4930 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2},
4931 + {".sse3", PROCESSOR_UNKNOWN,
4932 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
4933 + {".ssse3", PROCESSOR_UNKNOWN,
4934 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
4935 + {".sse4.1", PROCESSOR_UNKNOWN,
4936 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4_1},
4937 + {".sse4.2", PROCESSOR_UNKNOWN,
4938 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4},
4939 + {".sse4", PROCESSOR_UNKNOWN,
4940 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4},
4941 + {".3dnow", PROCESSOR_UNKNOWN,
4942 + CpuMMX|Cpu3dnow},
4943 + {".3dnowa", PROCESSOR_UNKNOWN,
4944 + CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA},
4945 + {".padlock", PROCESSOR_UNKNOWN,
4946 + CpuPadLock},
4947 + {".pacifica", PROCESSOR_UNKNOWN,
4948 + CpuSVME},
4949 + {".svme", PROCESSOR_UNKNOWN,
4950 + CpuSVME},
4951 + {".sse4a", PROCESSOR_UNKNOWN,
4952 + CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a},
4953 + {".abm", PROCESSOR_UNKNOWN,
4954 + CpuABM}
4957 +const pseudo_typeS md_pseudo_table[] =
4959 +#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO)
4960 + {"align", s_align_bytes, 0},
4961 +#else
4962 + {"align", s_align_ptwo, 0},
4963 +#endif
4964 + {"arch", set_cpu_arch, 0},
4965 +#ifndef I386COFF
4966 + {"bss", s_bss, 0},
4967 +#endif
4968 + {"ffloat", float_cons, 'f'},
4969 + {"dfloat", float_cons, 'd'},
4970 + {"tfloat", float_cons, 'x'},
4971 + {"value", cons, 2},
4972 + {"slong", signed_cons, 4},
4973 + {"noopt", s_ignore, 0},
4974 + {"optim", s_ignore, 0},
4975 + {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT},
4976 + {"code16", set_code_flag, CODE_16BIT},
4977 + {"code32", set_code_flag, CODE_32BIT},
4978 + {"code64", set_code_flag, CODE_64BIT},
4979 + {"intel_syntax", set_intel_syntax, 1},
4980 + {"att_syntax", set_intel_syntax, 0},
4981 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
4982 + {"largecomm", handle_large_common, 0},
4983 +#else
4984 + {"file", (void (*) (int)) dwarf2_directive_file, 0},
4985 + {"loc", dwarf2_directive_loc, 0},
4986 + {"loc_mark_labels", dwarf2_directive_loc_mark_labels, 0},
4987 +#endif
4988 +#ifdef TE_PE
4989 + {"secrel32", pe_directive_secrel, 0},
4990 +#endif
4991 + {0, 0, 0}
4994 +/* For interface with expression (). */
4995 +extern char *input_line_pointer;
4997 +/* Hash table for instruction mnemonic lookup. */
4998 +static struct hash_control *op_hash;
5000 +/* Hash table for register lookup. */
5001 +static struct hash_control *reg_hash;
5003 +void
5004 +i386_align_code (fragS *fragP, int count)
5006 + /* Various efficient no-op patterns for aligning code labels.
5007 + Note: Don't try to assemble the instructions in the comments.
5008 + 0L and 0w are not legal. */
5009 + static const char f32_1[] =
5010 + {0x90}; /* nop */
5011 + static const char f32_2[] =
5012 + {0x66,0x90}; /* xchg %ax,%ax */
5013 + static const char f32_3[] =
5014 + {0x8d,0x76,0x00}; /* leal 0(%esi),%esi */
5015 + static const char f32_4[] =
5016 + {0x8d,0x74,0x26,0x00}; /* leal 0(%esi,1),%esi */
5017 + static const char f32_5[] =
5018 + {0x90, /* nop */
5019 + 0x8d,0x74,0x26,0x00}; /* leal 0(%esi,1),%esi */
5020 + static const char f32_6[] =
5021 + {0x8d,0xb6,0x00,0x00,0x00,0x00}; /* leal 0L(%esi),%esi */
5022 + static const char f32_7[] =
5023 + {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00}; /* leal 0L(%esi,1),%esi */
5024 + static const char f32_8[] =
5025 + {0x90, /* nop */
5026 + 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00}; /* leal 0L(%esi,1),%esi */
5027 + static const char f32_9[] =
5028 + {0x89,0xf6, /* movl %esi,%esi */
5029 + 0x8d,0xbc,0x27,0x00,0x00,0x00,0x00}; /* leal 0L(%edi,1),%edi */
5030 + static const char f32_10[] =
5031 + {0x8d,0x76,0x00, /* leal 0(%esi),%esi */
5032 + 0x8d,0xbc,0x27,0x00,0x00,0x00,0x00}; /* leal 0L(%edi,1),%edi */
5033 + static const char f32_11[] =
5034 + {0x8d,0x74,0x26,0x00, /* leal 0(%esi,1),%esi */
5035 + 0x8d,0xbc,0x27,0x00,0x00,0x00,0x00}; /* leal 0L(%edi,1),%edi */
5036 + static const char f32_12[] =
5037 + {0x8d,0xb6,0x00,0x00,0x00,0x00, /* leal 0L(%esi),%esi */
5038 + 0x8d,0xbf,0x00,0x00,0x00,0x00}; /* leal 0L(%edi),%edi */
5039 + static const char f32_13[] =
5040 + {0x8d,0xb6,0x00,0x00,0x00,0x00, /* leal 0L(%esi),%esi */
5041 + 0x8d,0xbc,0x27,0x00,0x00,0x00,0x00}; /* leal 0L(%edi,1),%edi */
5042 + static const char f32_14[] =
5043 + {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00, /* leal 0L(%esi,1),%esi */
5044 + 0x8d,0xbc,0x27,0x00,0x00,0x00,0x00}; /* leal 0L(%edi,1),%edi */
5045 + static const char f16_3[] =
5046 + {0x8d,0x74,0x00}; /* lea 0(%esi),%esi */
5047 + static const char f16_4[] =
5048 + {0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
5049 + static const char f16_5[] =
5050 + {0x90, /* nop */
5051 + 0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */
5052 + static const char f16_6[] =
5053 + {0x89,0xf6, /* mov %si,%si */
5054 + 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
5055 + static const char f16_7[] =
5056 + {0x8d,0x74,0x00, /* lea 0(%si),%si */
5057 + 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
5058 + static const char f16_8[] =
5059 + {0x8d,0xb4,0x00,0x00, /* lea 0w(%si),%si */
5060 + 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */
5061 + static const char jump_31[] =
5062 + {0xeb,0x1d,0x90,0x90,0x90,0x90,0x90, /* jmp .+31; lotsa nops */
5063 + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
5064 + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
5065 + 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
5066 + static const char *const f32_patt[] = {
5067 + f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8,
5068 + f32_9, f32_10, f32_11, f32_12, f32_13, f32_14
5069 + };
5070 + static const char *const f16_patt[] = {
5071 + f32_1, f32_2, f16_3, f16_4, f16_5, f16_6, f16_7, f16_8
5072 + };
5073 + /* nopl (%[re]ax) */
5074 + static const char alt_3[] =
5075 + {0x0f,0x1f,0x00};
5076 + /* nopl 0(%[re]ax) */
5077 + static const char alt_4[] =
5078 + {0x0f,0x1f,0x40,0x00};
5079 + /* nopl 0(%[re]ax,%[re]ax,1) */
5080 + static const char alt_5[] =
5081 + {0x0f,0x1f,0x44,0x00,0x00};
5082 + /* nopw 0(%[re]ax,%[re]ax,1) */
5083 + static const char alt_6[] =
5084 + {0x66,0x0f,0x1f,0x44,0x00,0x00};
5085 + /* nopl 0L(%[re]ax) */
5086 + static const char alt_7[] =
5087 + {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
5088 + /* nopl 0L(%[re]ax,%[re]ax,1) */
5089 + static const char alt_8[] =
5090 + {0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5091 + /* nopw 0L(%[re]ax,%[re]ax,1) */
5092 + static const char alt_9[] =
5093 + {0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5094 + /* nopw %cs:0L(%[re]ax,%[re]ax,1) */
5095 + static const char alt_10[] =
5096 + {0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5097 + /* data16
5098 + nopw %cs:0L(%[re]ax,%[re]ax,1) */
5099 + static const char alt_long_11[] =
5100 + {0x66,
5101 + 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5102 + /* data16
5103 + data16
5104 + nopw %cs:0L(%[re]ax,%[re]ax,1) */
5105 + static const char alt_long_12[] =
5106 + {0x66,
5107 + 0x66,
5108 + 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5109 + /* data16
5110 + data16
5111 + data16
5112 + nopw %cs:0L(%[re]ax,%[re]ax,1) */
5113 + static const char alt_long_13[] =
5114 + {0x66,
5115 + 0x66,
5116 + 0x66,
5117 + 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5118 + /* data16
5119 + data16
5120 + data16
5121 + data16
5122 + nopw %cs:0L(%[re]ax,%[re]ax,1) */
5123 + static const char alt_long_14[] =
5124 + {0x66,
5125 + 0x66,
5126 + 0x66,
5127 + 0x66,
5128 + 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5129 + /* data16
5130 + data16
5131 + data16
5132 + data16
5133 + data16
5134 + nopw %cs:0L(%[re]ax,%[re]ax,1) */
5135 + static const char alt_long_15[] =
5136 + {0x66,
5137 + 0x66,
5138 + 0x66,
5139 + 0x66,
5140 + 0x66,
5141 + 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5142 + /* nopl 0(%[re]ax,%[re]ax,1)
5143 + nopw 0(%[re]ax,%[re]ax,1) */
5144 + static const char alt_short_11[] =
5145 + {0x0f,0x1f,0x44,0x00,0x00,
5146 + 0x66,0x0f,0x1f,0x44,0x00,0x00};
5147 + /* nopw 0(%[re]ax,%[re]ax,1)
5148 + nopw 0(%[re]ax,%[re]ax,1) */
5149 + static const char alt_short_12[] =
5150 + {0x66,0x0f,0x1f,0x44,0x00,0x00,
5151 + 0x66,0x0f,0x1f,0x44,0x00,0x00};
5152 + /* nopw 0(%[re]ax,%[re]ax,1)
5153 + nopl 0L(%[re]ax) */
5154 + static const char alt_short_13[] =
5155 + {0x66,0x0f,0x1f,0x44,0x00,0x00,
5156 + 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
5157 + /* nopl 0L(%[re]ax)
5158 + nopl 0L(%[re]ax) */
5159 + static const char alt_short_14[] =
5160 + {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00,
5161 + 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
5162 + /* nopl 0L(%[re]ax)
5163 + nopl 0L(%[re]ax,%[re]ax,1) */
5164 + static const char alt_short_15[] =
5165 + {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00,
5166 + 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
5167 + static const char *const alt_short_patt[] = {
5168 + f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8,
5169 + alt_9, alt_10, alt_short_11, alt_short_12, alt_short_13,
5170 + alt_short_14, alt_short_15
5171 + };
5172 + static const char *const alt_long_patt[] = {
5173 + f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8,
5174 + alt_9, alt_10, alt_long_11, alt_long_12, alt_long_13,
5175 + alt_long_14, alt_long_15
5176 + };
5178 + /* Only align for at least a positive non-zero boundary. */
5179 + if (count <= 0 || count > MAX_MEM_FOR_RS_ALIGN_CODE)
5180 + return;
5182 + /* We need to decide which NOP sequence to use for 32bit and
5183 + 64bit. When -mtune= is used:
5185 + 1. For PROCESSOR_I386, PROCESSOR_I486, PROCESSOR_PENTIUM and
5186 + PROCESSOR_GENERIC32, f32_patt will be used.
5187 + 2. For PROCESSOR_PENTIUMPRO, PROCESSOR_PENTIUM4, PROCESSOR_NOCONA,
5188 + PROCESSOR_CORE, PROCESSOR_CORE2, and PROCESSOR_GENERIC64,
5189 + alt_long_patt will be used.
5190 + 3. For PROCESSOR_ATHLON, PROCESSOR_K6, PROCESSOR_K8 and
5191 + PROCESSOR_AMDFAM10, alt_short_patt will be used.
5193 + When -mtune= isn't used, alt_long_patt will be used if
5194 + cpu_arch_isa_flags has Cpu686. Otherwise, f32_patt will
5195 + be used.
5197 + When -march= or .arch is used, we can't use anything beyond
5198 + cpu_arch_isa_flags. */
5200 + if (flag_code == CODE_16BIT)
5202 + if (count > 8)
5204 + memcpy (fragP->fr_literal + fragP->fr_fix,
5205 + jump_31, count);
5206 + /* Adjust jump offset. */
5207 + fragP->fr_literal[fragP->fr_fix + 1] = count - 2;
5209 + else
5210 + memcpy (fragP->fr_literal + fragP->fr_fix,
5211 + f16_patt[count - 1], count);
5213 + else
5215 + const char *const *patt = NULL;
5217 + if (cpu_arch_isa == PROCESSOR_UNKNOWN)
5219 + /* PROCESSOR_UNKNOWN means that all ISAs may be used. */
5220 + switch (cpu_arch_tune)
5222 + case PROCESSOR_UNKNOWN:
5223 + /* We use cpu_arch_isa_flags to check if we SHOULD
5224 + optimize for Cpu686. */
5225 + if ((cpu_arch_isa_flags & Cpu686) != 0)
5226 + patt = alt_long_patt;
5227 + else
5228 + patt = f32_patt;
5229 + break;
5230 + case PROCESSOR_PENTIUMPRO:
5231 + case PROCESSOR_PENTIUM4:
5232 + case PROCESSOR_NOCONA:
5233 + case PROCESSOR_CORE:
5234 + case PROCESSOR_CORE2:
5235 + case PROCESSOR_GENERIC64:
5236 + patt = alt_long_patt;
5237 + break;
5238 + case PROCESSOR_K6:
5239 + case PROCESSOR_ATHLON:
5240 + case PROCESSOR_K8:
5241 + case PROCESSOR_AMDFAM10:
5242 + patt = alt_short_patt;
5243 + break;
5244 + case PROCESSOR_I386:
5245 + case PROCESSOR_I486:
5246 + case PROCESSOR_PENTIUM:
5247 + case PROCESSOR_GENERIC32:
5248 + patt = f32_patt;
5249 + break;
5252 + else
5254 + switch (cpu_arch_tune)
5256 + case PROCESSOR_UNKNOWN:
5257 + /* When cpu_arch_isa is net, cpu_arch_tune shouldn't be
5258 + PROCESSOR_UNKNOWN. */
5259 + abort ();
5260 + break;
5262 + case PROCESSOR_I386:
5263 + case PROCESSOR_I486:
5264 + case PROCESSOR_PENTIUM:
5265 + case PROCESSOR_K6:
5266 + case PROCESSOR_ATHLON:
5267 + case PROCESSOR_K8:
5268 + case PROCESSOR_AMDFAM10:
5269 + case PROCESSOR_GENERIC32:
5270 + /* We use cpu_arch_isa_flags to check if we CAN optimize
5271 + for Cpu686. */
5272 + if ((cpu_arch_isa_flags & Cpu686) != 0)
5273 + patt = alt_short_patt;
5274 + else
5275 + patt = f32_patt;
5276 + break;
5277 + case PROCESSOR_PENTIUMPRO:
5278 + case PROCESSOR_PENTIUM4:
5279 + case PROCESSOR_NOCONA:
5280 + case PROCESSOR_CORE:
5281 + case PROCESSOR_CORE2:
5282 + if ((cpu_arch_isa_flags & Cpu686) != 0)
5283 + patt = alt_long_patt;
5284 + else
5285 + patt = f32_patt;
5286 + break;
5287 + case PROCESSOR_GENERIC64:
5288 + patt = alt_long_patt;
5289 + break;
5293 + if (patt == f32_patt)
5295 + /* If the padding is less than 15 bytes, we use the normal
5296 + ones. Otherwise, we use a jump instruction and adjust
5297 + its offset. */
5298 + if (count < 15)
5299 + memcpy (fragP->fr_literal + fragP->fr_fix,
5300 + patt[count - 1], count);
5301 + else
5303 + memcpy (fragP->fr_literal + fragP->fr_fix,
5304 + jump_31, count);
5305 + /* Adjust jump offset. */
5306 + fragP->fr_literal[fragP->fr_fix + 1] = count - 2;
5309 + else
5311 + /* Maximum length of an instruction is 15 byte. If the
5312 + padding is greater than 15 bytes and we don't use jump,
5313 + we have to break it into smaller pieces. */
5314 + int padding = count;
5315 + while (padding > 15)
5317 + padding -= 15;
5318 + memcpy (fragP->fr_literal + fragP->fr_fix + padding,
5319 + patt [14], 15);
5322 + if (padding)
5323 + memcpy (fragP->fr_literal + fragP->fr_fix,
5324 + patt [padding - 1], padding);
5327 + fragP->fr_var = count;
5330 +static INLINE unsigned int
5331 +mode_from_disp_size (unsigned int t)
5333 + return (t & Disp8) ? 1 : (t & (Disp16 | Disp32 | Disp32S)) ? 2 : 0;
5336 +static INLINE int
5337 +fits_in_signed_byte (offsetT num)
5339 + return (num >= -128) && (num <= 127);
5342 +static INLINE int
5343 +fits_in_unsigned_byte (offsetT num)
5345 + return (num & 0xff) == num;
5348 +static INLINE int
5349 +fits_in_unsigned_word (offsetT num)
5351 + return (num & 0xffff) == num;
5354 +static INLINE int
5355 +fits_in_signed_word (offsetT num)
5357 + return (-32768 <= num) && (num <= 32767);
5360 +static INLINE int
5361 +fits_in_signed_long (offsetT num ATTRIBUTE_UNUSED)
5363 +#ifndef BFD64
5364 + return 1;
5365 +#else
5366 + return (!(((offsetT) -1 << 31) & num)
5367 + || (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31));
5368 +#endif
5369 +} /* fits_in_signed_long() */
5371 +static INLINE int
5372 +fits_in_unsigned_long (offsetT num ATTRIBUTE_UNUSED)
5374 +#ifndef BFD64
5375 + return 1;
5376 +#else
5377 + return (num & (((offsetT) 2 << 31) - 1)) == num;
5378 +#endif
5379 +} /* fits_in_unsigned_long() */
5381 +static unsigned int
5382 +smallest_imm_type (offsetT num)
5384 + if (cpu_arch_flags != (Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64))
5386 + /* This code is disabled on the 486 because all the Imm1 forms
5387 + in the opcode table are slower on the i486. They're the
5388 + versions with the implicitly specified single-position
5389 + displacement, which has another syntax if you really want to
5390 + use that form. */
5391 + if (num == 1)
5392 + return Imm1 | Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64;
5394 + return (fits_in_signed_byte (num)
5395 + ? (Imm8S | Imm8 | Imm16 | Imm32 | Imm32S | Imm64)
5396 + : fits_in_unsigned_byte (num)
5397 + ? (Imm8 | Imm16 | Imm32 | Imm32S | Imm64)
5398 + : (fits_in_signed_word (num) || fits_in_unsigned_word (num))
5399 + ? (Imm16 | Imm32 | Imm32S | Imm64)
5400 + : fits_in_signed_long (num)
5401 + ? (Imm32 | Imm32S | Imm64)
5402 + : fits_in_unsigned_long (num)
5403 + ? (Imm32 | Imm64)
5404 + : Imm64);
5407 +static offsetT
5408 +offset_in_range (offsetT val, int size)
5410 + addressT mask;
5412 + switch (size)
5414 + case 1: mask = ((addressT) 1 << 8) - 1; break;
5415 + case 2: mask = ((addressT) 1 << 16) - 1; break;
5416 + case 4: mask = ((addressT) 2 << 31) - 1; break;
5417 +#ifdef BFD64
5418 + case 8: mask = ((addressT) 2 << 63) - 1; break;
5419 +#endif
5420 + default: abort ();
5423 + /* If BFD64, sign extend val. */
5424 + if (!use_rela_relocations)
5425 + if ((val & ~(((addressT) 2 << 31) - 1)) == 0)
5426 + val = (val ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
5428 + if ((val & ~mask) != 0 && (val & ~mask) != ~mask)
5430 + char buf1[40], buf2[40];
5432 + sprint_value (buf1, val);
5433 + sprint_value (buf2, val & mask);
5434 + as_warn (_("%s shortened to %s"), buf1, buf2);
5436 + return val & mask;
5439 +/* Returns 0 if attempting to add a prefix where one from the same
5440 + class already exists, 1 if non rep/repne added, 2 if rep/repne
5441 + added. */
5442 +static int
5443 +add_prefix (unsigned int prefix)
5445 + int ret = 1;
5446 + unsigned int q;
5448 + if (prefix >= REX_OPCODE && prefix < REX_OPCODE + 16
5449 + && flag_code == CODE_64BIT)
5451 + if ((i.prefix[REX_PREFIX] & prefix & REX_W)
5452 + || ((i.prefix[REX_PREFIX] & (REX_R | REX_X | REX_B))
5453 + && (prefix & (REX_R | REX_X | REX_B))))
5454 + ret = 0;
5455 + q = REX_PREFIX;
5457 + else
5459 + switch (prefix)
5461 + default:
5462 + abort ();
5464 + case CS_PREFIX_OPCODE:
5465 + case DS_PREFIX_OPCODE:
5466 + case ES_PREFIX_OPCODE:
5467 + case FS_PREFIX_OPCODE:
5468 + case GS_PREFIX_OPCODE:
5469 + case SS_PREFIX_OPCODE:
5470 + q = SEG_PREFIX;
5471 + break;
5473 + case REPNE_PREFIX_OPCODE:
5474 + case REPE_PREFIX_OPCODE:
5475 + ret = 2;
5476 + /* fall thru */
5477 + case LOCK_PREFIX_OPCODE:
5478 + q = LOCKREP_PREFIX;
5479 + break;
5481 + case FWAIT_OPCODE:
5482 + q = WAIT_PREFIX;
5483 + break;
5485 + case ADDR_PREFIX_OPCODE:
5486 + q = ADDR_PREFIX;
5487 + break;
5489 + case DATA_PREFIX_OPCODE:
5490 + q = DATA_PREFIX;
5491 + break;
5493 + if (i.prefix[q] != 0)
5494 + ret = 0;
5497 + if (ret)
5499 + if (!i.prefix[q])
5500 + ++i.prefixes;
5501 + i.prefix[q] |= prefix;
5503 + else
5504 + as_bad (_("same type of prefix used twice"));
5506 + return ret;
5509 +static void
5510 +set_code_flag (int value)
5512 + flag_code = value;
5513 + cpu_arch_flags &= ~(Cpu64 | CpuNo64);
5514 + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64);
5515 + if (value == CODE_64BIT && !(cpu_arch_flags & CpuSledgehammer))
5517 + as_bad (_("64bit mode not supported on this CPU."));
5519 + if (value == CODE_32BIT && !(cpu_arch_flags & Cpu386))
5521 + as_bad (_("32bit mode not supported on this CPU."));
5523 + stackop_size = '\0';
5526 +static void
5527 +set_16bit_gcc_code_flag (int new_code_flag)
5529 + flag_code = new_code_flag;
5530 + cpu_arch_flags &= ~(Cpu64 | CpuNo64);
5531 + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64);
5532 + stackop_size = LONG_MNEM_SUFFIX;
5535 +static void
5536 +set_intel_syntax (int syntax_flag)
5538 + /* Find out if register prefixing is specified. */
5539 + int ask_naked_reg = 0;
5541 + SKIP_WHITESPACE ();
5542 + if (!is_end_of_line[(unsigned char) *input_line_pointer])
5544 + char *string = input_line_pointer;
5545 + int e = get_symbol_end ();
5547 + if (strcmp (string, "prefix") == 0)
5548 + ask_naked_reg = 1;
5549 + else if (strcmp (string, "noprefix") == 0)
5550 + ask_naked_reg = -1;
5551 + else
5552 + as_bad (_("bad argument to syntax directive."));
5553 + *input_line_pointer = e;
5555 + demand_empty_rest_of_line ();
5557 + intel_syntax = syntax_flag;
5559 + if (ask_naked_reg == 0)
5560 + allow_naked_reg = (intel_syntax
5561 + && (bfd_get_symbol_leading_char (stdoutput) != '\0'));
5562 + else
5563 + allow_naked_reg = (ask_naked_reg < 0);
5565 + identifier_chars['%'] = intel_syntax && allow_naked_reg ? '%' : 0;
5566 + identifier_chars['$'] = intel_syntax ? '$' : 0;
5567 + register_prefix = allow_naked_reg ? "" : "%";
5570 +static void
5571 +set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
5573 + SKIP_WHITESPACE ();
5575 + if (!is_end_of_line[(unsigned char) *input_line_pointer])
5577 + char *string = input_line_pointer;
5578 + int e = get_symbol_end ();
5579 + unsigned int i;
5581 + for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
5583 + if (strcmp (string, cpu_arch[i].name) == 0)
5585 + if (*string != '.')
5587 + cpu_arch_name = cpu_arch[i].name;
5588 + cpu_sub_arch_name = NULL;
5589 + cpu_arch_flags = (cpu_arch[i].flags
5590 + | (flag_code == CODE_64BIT
5591 + ? Cpu64 : CpuNo64));
5592 + cpu_arch_isa = cpu_arch[i].type;
5593 + cpu_arch_isa_flags = cpu_arch[i].flags;
5594 + if (!cpu_arch_tune_set)
5596 + cpu_arch_tune = cpu_arch_isa;
5597 + cpu_arch_tune_flags = cpu_arch_isa_flags;
5599 + break;
5601 + if ((cpu_arch_flags | cpu_arch[i].flags) != cpu_arch_flags)
5603 + cpu_sub_arch_name = cpu_arch[i].name;
5604 + cpu_arch_flags |= cpu_arch[i].flags;
5606 + *input_line_pointer = e;
5607 + demand_empty_rest_of_line ();
5608 + return;
5611 + if (i >= ARRAY_SIZE (cpu_arch))
5612 + as_bad (_("no such architecture: `%s'"), string);
5614 + *input_line_pointer = e;
5616 + else
5617 + as_bad (_("missing cpu architecture"));
5619 + no_cond_jump_promotion = 0;
5620 + if (*input_line_pointer == ','
5621 + && !is_end_of_line[(unsigned char) input_line_pointer[1]])
5623 + char *string = ++input_line_pointer;
5624 + int e = get_symbol_end ();
5626 + if (strcmp (string, "nojumps") == 0)
5627 + no_cond_jump_promotion = 1;
5628 + else if (strcmp (string, "jumps") == 0)
5630 + else
5631 + as_bad (_("no such architecture modifier: `%s'"), string);
5633 + *input_line_pointer = e;
5636 + demand_empty_rest_of_line ();
5639 +unsigned long
5640 +i386_mach ()
5642 + if (!strcmp (default_arch, "x86_64"))
5643 + return bfd_mach_x86_64;
5644 + else if (!strcmp (default_arch, "i386"))
5645 + return bfd_mach_i386_i386;
5646 + else
5647 + as_fatal (_("Unknown architecture"));
5650 +void
5651 +nativeclient_symbol_init ()
5653 + symbolS *symbolP;
5654 + int entry_align;
5656 + /*
5657 + * A symbol conveying the setting of nacl_alignment to assembler writers.
5658 + */
5659 + symbolP = symbol_new ("NACLALIGN", absolute_section,
5660 + (valueT) nacl_alignment, &zero_address_frag);
5661 + symbol_table_insert (symbolP);
5663 + /*
5664 + * A symbol conveying the function entry alignment. This differs from
5665 + * NACLALIGN in library mode.
5666 + */
5667 + if (nacl_library_mode) {
5668 + entry_align = 5;
5670 + else {
5671 + entry_align = nacl_alignment;
5673 + symbolP = symbol_new ("NACLENTRYALIGN", absolute_section,
5674 + (valueT) entry_align, &zero_address_frag);
5675 + symbol_table_insert (symbolP);
5678 +void
5679 +md_begin ()
5681 + const char *hash_err;
5683 + /* Initialize op_hash hash table. */
5684 + op_hash = hash_new ();
5687 + const template *optab;
5688 + templates *core_optab;
5690 + /* Setup for loop. */
5691 + optab = i386_optab;
5692 + core_optab = (templates *) xmalloc (sizeof (templates));
5693 + core_optab->start = optab;
5695 + while (1)
5697 + ++optab;
5698 + if (optab->name == NULL
5699 + || strcmp (optab->name, (optab - 1)->name) != 0)
5701 + /* different name --> ship out current template list;
5702 + add to hash table; & begin anew. */
5703 + core_optab->end = optab;
5704 + hash_err = hash_insert (op_hash,
5705 + (optab - 1)->name,
5706 + (PTR) core_optab);
5707 + if (hash_err)
5709 + as_fatal (_("Internal Error: Can't hash %s: %s"),
5710 + (optab - 1)->name,
5711 + hash_err);
5713 + if (optab->name == NULL)
5714 + break;
5715 + core_optab = (templates *) xmalloc (sizeof (templates));
5716 + core_optab->start = optab;
5721 + /* Initialize reg_hash hash table. */
5722 + reg_hash = hash_new ();
5724 + const reg_entry *regtab;
5725 + unsigned int regtab_size = i386_regtab_size;
5727 + for (regtab = i386_regtab; regtab_size--; regtab++)
5729 + hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab);
5730 + if (hash_err)
5731 + as_fatal (_("Internal Error: Can't hash %s: %s"),
5732 + regtab->reg_name,
5733 + hash_err);
5737 + /* Fill in lexical tables: mnemonic_chars, operand_chars. */
5739 + int c;
5740 + char *p;
5742 + for (c = 0; c < 256; c++)
5744 + if (ISDIGIT (c))
5746 + digit_chars[c] = c;
5747 + mnemonic_chars[c] = c;
5748 + register_chars[c] = c;
5749 + operand_chars[c] = c;
5751 + else if (ISLOWER (c))
5753 + mnemonic_chars[c] = c;
5754 + register_chars[c] = c;
5755 + operand_chars[c] = c;
5757 + else if (ISUPPER (c))
5759 + mnemonic_chars[c] = TOLOWER (c);
5760 + register_chars[c] = mnemonic_chars[c];
5761 + operand_chars[c] = c;
5764 + if (ISALPHA (c) || ISDIGIT (c))
5765 + identifier_chars[c] = c;
5766 + else if (c >= 128)
5768 + identifier_chars[c] = c;
5769 + operand_chars[c] = c;
5773 +#ifdef LEX_AT
5774 + identifier_chars['@'] = '@';
5775 +#endif
5776 +#ifdef LEX_QM
5777 + identifier_chars['?'] = '?';
5778 + operand_chars['?'] = '?';
5779 +#endif
5780 + digit_chars['-'] = '-';
5781 + mnemonic_chars['-'] = '-';
5782 + mnemonic_chars['.'] = '.';
5783 + identifier_chars['_'] = '_';
5784 + identifier_chars['.'] = '.';
5786 + for (p = operand_special_chars; *p != '\0'; p++)
5787 + operand_chars[(unsigned char) *p] = *p;
5790 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
5791 + if (IS_ELF)
5793 + record_alignment (text_section, nacl_alignment);
5794 + record_alignment (data_section, 2);
5795 + record_alignment (bss_section, 2);
5797 +#endif
5799 + if (flag_code == CODE_64BIT)
5801 + x86_dwarf2_return_column = 16;
5802 + x86_cie_data_alignment = -8;
5804 + else
5806 + x86_dwarf2_return_column = 8;
5807 + x86_cie_data_alignment = -4;
5810 + nativeclient_symbol_init();
5813 +void
5814 +i386_print_statistics (FILE *file)
5816 + hash_print_statistics (file, "i386 opcode", op_hash);
5817 + hash_print_statistics (file, "i386 register", reg_hash);
5820 +#ifdef DEBUG386
5822 +/* Debugging routines for md_assemble. */
5823 +static void pte (template *);
5824 +static void pt (unsigned int);
5825 +static void pe (expressionS *);
5826 +static void ps (symbolS *);
5828 +static void
5829 +pi (char *line, i386_insn *x)
5831 + unsigned int i;
5833 + fprintf (stdout, "%s: template ", line);
5834 + pte (&x->tm);
5835 + fprintf (stdout, " address: base %s index %s scale %x\n",
5836 + x->base_reg ? x->base_reg->reg_name : "none",
5837 + x->index_reg ? x->index_reg->reg_name : "none",
5838 + x->log2_scale_factor);
5839 + fprintf (stdout, " modrm: mode %x reg %x reg/mem %x\n",
5840 + x->rm.mode, x->rm.reg, x->rm.regmem);
5841 + fprintf (stdout, " sib: base %x index %x scale %x\n",
5842 + x->sib.base, x->sib.index, x->sib.scale);
5843 + fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n",
5844 + (x->rex & REX_W) != 0,
5845 + (x->rex & REX_R) != 0,
5846 + (x->rex & REX_X) != 0,
5847 + (x->rex & REX_B) != 0);
5848 + for (i = 0; i < x->operands; i++)
5850 + fprintf (stdout, " #%d: ", i + 1);
5851 + pt (x->types[i]);
5852 + fprintf (stdout, "\n");
5853 + if (x->types[i]
5854 + & (Reg | SReg2 | SReg3 | Control | Debug | Test | RegMMX | RegXMM))
5855 + fprintf (stdout, "%s\n", x->op[i].regs->reg_name);
5856 + if (x->types[i] & Imm)
5857 + pe (x->op[i].imms);
5858 + if (x->types[i] & Disp)
5859 + pe (x->op[i].disps);
5863 +static void
5864 +pte (template *t)
5866 + unsigned int i;
5867 + fprintf (stdout, " %d operands ", t->operands);
5868 + fprintf (stdout, "opcode %x ", t->base_opcode);
5869 + if (t->extension_opcode != None)
5870 + fprintf (stdout, "ext %x ", t->extension_opcode);
5871 + if (t->opcode_modifier & D)
5872 + fprintf (stdout, "D");
5873 + if (t->opcode_modifier & W)
5874 + fprintf (stdout, "W");
5875 + fprintf (stdout, "\n");
5876 + for (i = 0; i < t->operands; i++)
5878 + fprintf (stdout, " #%d type ", i + 1);
5879 + pt (t->operand_types[i]);
5880 + fprintf (stdout, "\n");
5884 +static void
5885 +pe (expressionS *e)
5887 + fprintf (stdout, " operation %d\n", e->X_op);
5888 + fprintf (stdout, " add_number %ld (%lx)\n",
5889 + (long) e->X_add_number, (long) e->X_add_number);
5890 + if (e->X_add_symbol)
5892 + fprintf (stdout, " add_symbol ");
5893 + ps (e->X_add_symbol);
5894 + fprintf (stdout, "\n");
5896 + if (e->X_op_symbol)
5898 + fprintf (stdout, " op_symbol ");
5899 + ps (e->X_op_symbol);
5900 + fprintf (stdout, "\n");
5904 +static void
5905 +ps (symbolS *s)
5907 + fprintf (stdout, "%s type %s%s",
5908 + S_GET_NAME (s),
5909 + S_IS_EXTERNAL (s) ? "EXTERNAL " : "",
5910 + segment_name (S_GET_SEGMENT (s)));
5913 +static struct type_name
5915 + unsigned int mask;
5916 + char *tname;
5918 +const type_names[] =
5920 + { Reg8, "r8" },
5921 + { Reg16, "r16" },
5922 + { Reg32, "r32" },
5923 + { Reg64, "r64" },
5924 + { Imm8, "i8" },
5925 + { Imm8S, "i8s" },
5926 + { Imm16, "i16" },
5927 + { Imm32, "i32" },
5928 + { Imm32S, "i32s" },
5929 + { Imm64, "i64" },
5930 + { Imm1, "i1" },
5931 + { BaseIndex, "BaseIndex" },
5932 + { Disp8, "d8" },
5933 + { Disp16, "d16" },
5934 + { Disp32, "d32" },
5935 + { Disp32S, "d32s" },
5936 + { Disp64, "d64" },
5937 + { InOutPortReg, "InOutPortReg" },
5938 + { ShiftCount, "ShiftCount" },
5939 + { Control, "control reg" },
5940 + { Test, "test reg" },
5941 + { Debug, "debug reg" },
5942 + { FloatReg, "FReg" },
5943 + { FloatAcc, "FAcc" },
5944 + { SReg2, "SReg2" },
5945 + { SReg3, "SReg3" },
5946 + { Acc, "Acc" },
5947 + { JumpAbsolute, "Jump Absolute" },
5948 + { RegMMX, "rMMX" },
5949 + { RegXMM, "rXMM" },
5950 + { EsSeg, "es" },
5951 + { 0, "" }
5954 +static void
5955 +pt (t)
5956 + unsigned int t;
5958 + const struct type_name *ty;
5960 + for (ty = type_names; ty->mask; ty++)
5961 + if (t & ty->mask)
5962 + fprintf (stdout, "%s, ", ty->tname);
5963 + fflush (stdout);
5966 +#endif /* DEBUG386 */
5968 +static bfd_reloc_code_real_type
5969 +reloc (unsigned int size,
5970 + int pcrel,
5971 + int sign,
5972 + bfd_reloc_code_real_type other)
5974 + if (other != NO_RELOC)
5976 + reloc_howto_type *reloc;
5978 + if (size == 8)
5979 + switch (other)
5981 + case BFD_RELOC_X86_64_GOT32:
5982 + return BFD_RELOC_X86_64_GOT64;
5983 + break;
5984 + case BFD_RELOC_X86_64_PLTOFF64:
5985 + return BFD_RELOC_X86_64_PLTOFF64;
5986 + break;
5987 + case BFD_RELOC_X86_64_GOTPC32:
5988 + other = BFD_RELOC_X86_64_GOTPC64;
5989 + break;
5990 + case BFD_RELOC_X86_64_GOTPCREL:
5991 + other = BFD_RELOC_X86_64_GOTPCREL64;
5992 + break;
5993 + case BFD_RELOC_X86_64_TPOFF32:
5994 + other = BFD_RELOC_X86_64_TPOFF64;
5995 + break;
5996 + case BFD_RELOC_X86_64_DTPOFF32:
5997 + other = BFD_RELOC_X86_64_DTPOFF64;
5998 + break;
5999 + default:
6000 + break;
6003 + /* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
6004 + if (size == 4 && flag_code != CODE_64BIT)
6005 + sign = -1;
6007 + reloc = bfd_reloc_type_lookup (stdoutput, other);
6008 + if (!reloc)
6009 + as_bad (_("unknown relocation (%u)"), other);
6010 + else if (size != bfd_get_reloc_size (reloc))
6011 + as_bad (_("%u-byte relocation cannot be applied to %u-byte field"),
6012 + bfd_get_reloc_size (reloc),
6013 + size);
6014 + else if (pcrel && !reloc->pc_relative)
6015 + as_bad (_("non-pc-relative relocation for pc-relative field"));
6016 + else if ((reloc->complain_on_overflow == complain_overflow_signed
6017 + && !sign)
6018 + || (reloc->complain_on_overflow == complain_overflow_unsigned
6019 + && sign > 0))
6020 + as_bad (_("relocated field and relocation type differ in signedness"));
6021 + else
6022 + return other;
6023 + return NO_RELOC;
6026 + if (pcrel)
6028 + if (!sign)
6029 + as_bad (_("there are no unsigned pc-relative relocations"));
6030 + switch (size)
6032 + case 1: return BFD_RELOC_8_PCREL;
6033 + case 2: return BFD_RELOC_16_PCREL;
6034 + case 4: return BFD_RELOC_32_PCREL;
6035 + case 8: return BFD_RELOC_64_PCREL;
6037 + as_bad (_("cannot do %u byte pc-relative relocation"), size);
6039 + else
6041 + if (sign > 0)
6042 + switch (size)
6044 + case 4: return BFD_RELOC_X86_64_32S;
6046 + else
6047 + switch (size)
6049 + case 1: return BFD_RELOC_8;
6050 + case 2: return BFD_RELOC_16;
6051 + case 4: return BFD_RELOC_32;
6052 + case 8: return BFD_RELOC_64;
6054 + as_bad (_("cannot do %s %u byte relocation"),
6055 + sign > 0 ? "signed" : "unsigned", size);
6058 + abort ();
6059 + return BFD_RELOC_NONE;
6062 +/* Here we decide which fixups can be adjusted to make them relative to
6063 + the beginning of the section instead of the symbol. Basically we need
6064 + to make sure that the dynamic relocations are done correctly, so in
6065 + some cases we force the original symbol to be used. */
6067 +int
6068 +tc_i386_fix_adjustable (fixS *fixP ATTRIBUTE_UNUSED)
6070 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
6071 + if (!IS_ELF)
6072 + return 1;
6074 + /* Don't adjust pc-relative references to merge sections in 64-bit
6075 + mode. */
6076 + if (use_rela_relocations
6077 + && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
6078 + && fixP->fx_pcrel)
6079 + return 0;
6081 + /* The x86_64 GOTPCREL are represented as 32bit PCrel relocations
6082 + and changed later by validate_fix. */
6083 + if (GOT_symbol && fixP->fx_subsy == GOT_symbol
6084 + && fixP->fx_r_type == BFD_RELOC_32_PCREL)
6085 + return 0;
6087 + /* adjust_reloc_syms doesn't know about the GOT. */
6088 + if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF
6089 + || fixP->fx_r_type == BFD_RELOC_386_PLT32
6090 + || fixP->fx_r_type == BFD_RELOC_386_GOT32
6091 + || fixP->fx_r_type == BFD_RELOC_386_TLS_GD
6092 + || fixP->fx_r_type == BFD_RELOC_386_TLS_LDM
6093 + || fixP->fx_r_type == BFD_RELOC_386_TLS_LDO_32
6094 + || fixP->fx_r_type == BFD_RELOC_386_TLS_IE_32
6095 + || fixP->fx_r_type == BFD_RELOC_386_TLS_IE
6096 + || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTIE
6097 + || fixP->fx_r_type == BFD_RELOC_386_TLS_LE_32
6098 + || fixP->fx_r_type == BFD_RELOC_386_TLS_LE
6099 + || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTDESC
6100 + || fixP->fx_r_type == BFD_RELOC_386_TLS_DESC_CALL
6101 + || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32
6102 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32
6103 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL
6104 + || fixP->fx_r_type == BFD_RELOC_X86_64_TLSGD
6105 + || fixP->fx_r_type == BFD_RELOC_X86_64_TLSLD
6106 + || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF32
6107 + || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF64
6108 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF
6109 + || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
6110 + || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
6111 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
6112 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
6113 + || fixP->fx_r_type == BFD_RELOC_X86_64_TLSDESC_CALL
6114 + || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
6115 + || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
6116 + return 0;
6117 +#endif
6118 + return 1;
6121 +static int
6122 +intel_float_operand (const char *mnemonic)
6124 + /* Note that the value returned is meaningful only for opcodes with (memory)
6125 + operands, hence the code here is free to improperly handle opcodes that
6126 + have no operands (for better performance and smaller code). */
6128 + if (mnemonic[0] != 'f')
6129 + return 0; /* non-math */
6131 + switch (mnemonic[1])
6133 + /* fclex, fdecstp, fdisi, femms, feni, fincstp, finit, fsetpm, and
6134 + the fs segment override prefix not currently handled because no
6135 + call path can make opcodes without operands get here */
6136 + case 'i':
6137 + return 2 /* integer op */;
6138 + case 'l':
6139 + if (mnemonic[2] == 'd' && (mnemonic[3] == 'c' || mnemonic[3] == 'e'))
6140 + return 3; /* fldcw/fldenv */
6141 + break;
6142 + case 'n':
6143 + if (mnemonic[2] != 'o' /* fnop */)
6144 + return 3; /* non-waiting control op */
6145 + break;
6146 + case 'r':
6147 + if (mnemonic[2] == 's')
6148 + return 3; /* frstor/frstpm */
6149 + break;
6150 + case 's':
6151 + if (mnemonic[2] == 'a')
6152 + return 3; /* fsave */
6153 + if (mnemonic[2] == 't')
6155 + switch (mnemonic[3])
6157 + case 'c': /* fstcw */
6158 + case 'd': /* fstdw */
6159 + case 'e': /* fstenv */
6160 + case 's': /* fsts[gw] */
6161 + return 3;
6164 + break;
6165 + case 'x':
6166 + if (mnemonic[2] == 'r' || mnemonic[2] == 's')
6167 + return 0; /* fxsave/fxrstor are not really math ops */
6168 + break;
6171 + return 1;
6174 +/* This is the guts of the machine-dependent assembler. LINE points to a
6175 + machine dependent instruction. This function is supposed to emit
6176 + the frags/bytes it assembles to. */
6178 +void
6179 +md_assemble (line)
6180 + char *line;
6182 + int j;
6183 + char mnemonic[MAX_MNEM_SIZE];
6185 + /* Initialize globals. */
6186 + memset (&i, '\0', sizeof (i));
6187 + for (j = 0; j < MAX_OPERANDS; j++)
6188 + i.reloc[j] = NO_RELOC;
6189 + memset (disp_expressions, '\0', sizeof (disp_expressions));
6190 + memset (im_expressions, '\0', sizeof (im_expressions));
6191 + save_stack_p = save_stack;
6193 + /* First parse an instruction mnemonic & call i386_operand for the operands.
6194 + We assume that the scrubber has arranged it so that line[0] is the valid
6195 + start of a (possibly prefixed) mnemonic. */
6197 + line = parse_insn (line, mnemonic);
6198 + if (line == NULL)
6199 + return;
6201 + line = parse_operands (line, mnemonic);
6202 + if (line == NULL)
6203 + return;
6205 + /* The order of the immediates should be reversed
6206 + for 2 immediates extrq and insertq instructions */
6207 + if ((i.imm_operands == 2)
6208 + && ((strcmp (mnemonic, "extrq") == 0)
6209 + || (strcmp (mnemonic, "insertq") == 0)))
6211 + swap_2_operands (0, 1);
6212 + /* "extrq" and insertq" are the only two instructions whose operands
6213 + have to be reversed even though they have two immediate operands.
6214 + */
6215 + if (intel_syntax)
6216 + swap_operands ();
6219 + /* Now we've parsed the mnemonic into a set of templates, and have the
6220 + operands at hand. */
6222 + /* All intel opcodes have reversed operands except for "bound" and
6223 + "enter". We also don't reverse intersegment "jmp" and "call"
6224 + instructions with 2 immediate operands so that the immediate segment
6225 + precedes the offset, as it does when in AT&T mode. */
6226 + if (intel_syntax
6227 + && i.operands > 1
6228 + && (strcmp (mnemonic, "bound") != 0)
6229 + && (strcmp (mnemonic, "invlpga") != 0)
6230 + && !((i.types[0] & Imm) && (i.types[1] & Imm)))
6231 + swap_operands ();
6233 + if (i.imm_operands)
6234 + optimize_imm ();
6236 + /* Don't optimize displacement for movabs since it only takes 64bit
6237 + displacement. */
6238 + if (i.disp_operands
6239 + && (flag_code != CODE_64BIT
6240 + || strcmp (mnemonic, "movabs") != 0))
6241 + optimize_disp ();
6243 + /* Next, we find a template that matches the given insn,
6244 + making sure the overlap of the given operands types is consistent
6245 + with the template operand types. */
6247 + if (!match_template ())
6248 + return;
6250 + if (intel_syntax)
6252 + /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */
6253 + if (SYSV386_COMPAT
6254 + && (i.tm.base_opcode & 0xfffffde0) == 0xdce0)
6255 + i.tm.base_opcode ^= Opcode_FloatR;
6257 + /* Zap movzx and movsx suffix. The suffix may have been set from
6258 + "word ptr" or "byte ptr" on the source operand, but we'll use
6259 + the suffix later to choose the destination register. */
6260 + if ((i.tm.base_opcode & ~9) == 0x0fb6)
6262 + if (i.reg_operands < 2
6263 + && !i.suffix
6264 + && (~i.tm.opcode_modifier
6265 + & (No_bSuf
6266 + | No_wSuf
6267 + | No_lSuf
6268 + | No_sSuf
6269 + | No_xSuf
6270 + | No_qSuf)))
6271 + as_bad (_("ambiguous operand size for `%s'"), i.tm.name);
6273 + i.suffix = 0;
6277 + if (i.tm.opcode_modifier & FWait)
6278 + if (!add_prefix (FWAIT_OPCODE))
6279 + return;
6281 + /* Check string instruction segment overrides. */
6282 + if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0)
6284 + if (!check_string ())
6285 + return;
6288 + if (!process_suffix ())
6289 + return;
6291 + /* Make still unresolved immediate matches conform to size of immediate
6292 + given in i.suffix. */
6293 + if (!finalize_imm ())
6294 + return;
6296 + if (i.types[0] & Imm1)
6297 + i.imm_operands = 0; /* kludge for shift insns. */
6298 + if (i.types[0] & ImplicitRegister)
6299 + i.reg_operands--;
6300 + if (i.types[1] & ImplicitRegister)
6301 + i.reg_operands--;
6302 + if (i.types[2] & ImplicitRegister)
6303 + i.reg_operands--;
6305 + if (i.tm.opcode_modifier & ImmExt)
6307 + expressionS *exp;
6309 + if ((i.tm.cpu_flags & CpuSSE3) && i.operands > 0)
6311 + /* Streaming SIMD extensions 3 Instructions have the fixed
6312 + operands with an opcode suffix which is coded in the same
6313 + place as an 8-bit immediate field would be. Here we check
6314 + those operands and remove them afterwards. */
6315 + unsigned int x;
6317 + for (x = 0; x < i.operands; x++)
6318 + if (i.op[x].regs->reg_num != x)
6319 + as_bad (_("can't use register '%s%s' as operand %d in '%s'."),
6320 + register_prefix,
6321 + i.op[x].regs->reg_name,
6322 + x + 1,
6323 + i.tm.name);
6324 + i.operands = 0;
6327 + /* These AMD 3DNow! and Intel Katmai New Instructions have an
6328 + opcode suffix which is coded in the same place as an 8-bit
6329 + immediate field would be. Here we fake an 8-bit immediate
6330 + operand from the opcode suffix stored in tm.extension_opcode. */
6332 + assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS);
6334 + exp = &im_expressions[i.imm_operands++];
6335 + i.op[i.operands].imms = exp;
6336 + i.types[i.operands++] = Imm8;
6337 + exp->X_op = O_constant;
6338 + exp->X_add_number = i.tm.extension_opcode;
6339 + i.tm.extension_opcode = None;
6342 + /* For insns with operands there are more diddles to do to the opcode. */
6343 + if (i.operands)
6345 + if (!process_operands ())
6346 + return;
6348 + else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
6350 + /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */
6351 + as_warn (_("translating to `%sp'"), i.tm.name);
6354 + /* Handle conversion of 'int $3' --> special int3 insn. */
6355 + if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3)
6357 + i.tm.base_opcode = INT3_OPCODE;
6358 + i.imm_operands = 0;
6361 + if ((i.tm.opcode_modifier & (Jump | JumpByte | JumpDword))
6362 + && i.op[0].disps->X_op == O_constant)
6364 + /* Convert "jmp constant" (and "call constant") to a jump (call) to
6365 + the absolute address given by the constant. Since ix86 jumps and
6366 + calls are pc relative, we need to generate a reloc. */
6367 + i.op[0].disps->X_add_symbol = &abs_symbol;
6368 + i.op[0].disps->X_op = O_symbol;
6371 + if ((i.tm.opcode_modifier & Rex64) != 0)
6372 + i.rex |= REX_W;
6374 + /* For 8 bit registers we need an empty rex prefix. Also if the
6375 + instruction already has a prefix, we need to convert old
6376 + registers to new ones. */
6378 + if (((i.types[0] & Reg8) != 0
6379 + && (i.op[0].regs->reg_flags & RegRex64) != 0)
6380 + || ((i.types[1] & Reg8) != 0
6381 + && (i.op[1].regs->reg_flags & RegRex64) != 0)
6382 + || (((i.types[0] & Reg8) != 0 || (i.types[1] & Reg8) != 0)
6383 + && i.rex != 0))
6385 + int x;
6387 + i.rex |= REX_OPCODE;
6388 + for (x = 0; x < 2; x++)
6390 + /* Look for 8 bit operand that uses old registers. */
6391 + if ((i.types[x] & Reg8) != 0
6392 + && (i.op[x].regs->reg_flags & RegRex64) == 0)
6394 + /* In case it is "hi" register, give up. */
6395 + if (i.op[x].regs->reg_num > 3)
6396 + as_bad (_("can't encode register '%s%s' in an "
6397 + "instruction requiring REX prefix."),
6398 + register_prefix, i.op[x].regs->reg_name);
6400 + /* Otherwise it is equivalent to the extended register.
6401 + Since the encoding doesn't change this is merely
6402 + cosmetic cleanup for debug output. */
6404 + i.op[x].regs = i.op[x].regs + 8;
6409 + if (i.rex != 0)
6410 + add_prefix (REX_OPCODE | i.rex);
6412 + /* We are ready to output the insn. */
6413 + output_insn ();
6416 +static char *
6417 +parse_insn (char *line, char *mnemonic)
6419 + char *l = line;
6420 + char *token_start = l;
6421 + char *mnem_p;
6422 + int supported;
6423 + const template *t;
6425 + /* Non-zero if we found a prefix only acceptable with string insns. */
6426 + const char *expecting_string_instruction = NULL;
6428 + while (1)
6430 + mnem_p = mnemonic;
6431 + while ((*mnem_p = mnemonic_chars[(unsigned char) *l]) != 0)
6433 + mnem_p++;
6434 + if (mnem_p >= mnemonic + MAX_MNEM_SIZE)
6436 + as_bad (_("no such instruction: `%s'"), token_start);
6437 + return NULL;
6439 + l++;
6441 + if (!is_space_char (*l)
6442 + && *l != END_OF_INSN
6443 + && (intel_syntax
6444 + || (*l != PREFIX_SEPARATOR
6445 + && *l != ',')))
6447 + as_bad (_("invalid character %s in mnemonic"),
6448 + output_invalid (*l));
6449 + return NULL;
6451 + if (token_start == l)
6453 + if (!intel_syntax && *l == PREFIX_SEPARATOR)
6454 + as_bad (_("expecting prefix; got nothing"));
6455 + else
6456 + as_bad (_("expecting mnemonic; got nothing"));
6457 + return NULL;
6460 + /* Look up instruction (or prefix) via hash table. */
6461 + current_templates = hash_find (op_hash, mnemonic);
6463 + if (*l != END_OF_INSN
6464 + && (!is_space_char (*l) || l[1] != END_OF_INSN)
6465 + && current_templates
6466 + && (current_templates->start->opcode_modifier & IsPrefix))
6468 + if (current_templates->start->cpu_flags
6469 + & (flag_code != CODE_64BIT ? Cpu64 : CpuNo64))
6471 + as_bad ((flag_code != CODE_64BIT
6472 + ? _("`%s' is only supported in 64-bit mode")
6473 + : _("`%s' is not supported in 64-bit mode")),
6474 + current_templates->start->name);
6475 + return NULL;
6477 + /* If we are in 16-bit mode, do not allow addr16 or data16.
6478 + Similarly, in 32-bit mode, do not allow addr32 or data32. */
6479 + if ((current_templates->start->opcode_modifier & (Size16 | Size32))
6480 + && flag_code != CODE_64BIT
6481 + && (((current_templates->start->opcode_modifier & Size32) != 0)
6482 + ^ (flag_code == CODE_16BIT)))
6484 + as_bad (_("redundant %s prefix"),
6485 + current_templates->start->name);
6486 + return NULL;
6488 + /* Add prefix, checking for repeated prefixes. */
6489 + switch (add_prefix (current_templates->start->base_opcode))
6491 + case 0:
6492 + return NULL;
6493 + case 2:
6494 + expecting_string_instruction = current_templates->start->name;
6495 + break;
6497 + /* Skip past PREFIX_SEPARATOR and reset token_start. */
6498 + token_start = ++l;
6500 + else
6501 + break;
6504 + if (!current_templates)
6506 + /* See if we can get a match by trimming off a suffix. */
6507 + switch (mnem_p[-1])
6509 + case WORD_MNEM_SUFFIX:
6510 + if (intel_syntax && (intel_float_operand (mnemonic) & 2))
6511 + i.suffix = SHORT_MNEM_SUFFIX;
6512 + else
6513 + case BYTE_MNEM_SUFFIX:
6514 + case QWORD_MNEM_SUFFIX:
6515 + i.suffix = mnem_p[-1];
6516 + mnem_p[-1] = '\0';
6517 + current_templates = hash_find (op_hash, mnemonic);
6518 + break;
6519 + case SHORT_MNEM_SUFFIX:
6520 + case LONG_MNEM_SUFFIX:
6521 + if (!intel_syntax)
6523 + i.suffix = mnem_p[-1];
6524 + mnem_p[-1] = '\0';
6525 + current_templates = hash_find (op_hash, mnemonic);
6527 + break;
6529 + /* Intel Syntax. */
6530 + case 'd':
6531 + if (intel_syntax)
6533 + if (intel_float_operand (mnemonic) == 1)
6534 + i.suffix = SHORT_MNEM_SUFFIX;
6535 + else
6536 + i.suffix = LONG_MNEM_SUFFIX;
6537 + mnem_p[-1] = '\0';
6538 + current_templates = hash_find (op_hash, mnemonic);
6540 + break;
6542 + if (!current_templates)
6544 + as_bad (_("no such instruction: `%s'"), token_start);
6545 + return NULL;
6549 + if (current_templates->start->opcode_modifier & (Jump | JumpByte))
6551 + /* Check for a branch hint. We allow ",pt" and ",pn" for
6552 + predict taken and predict not taken respectively.
6553 + I'm not sure that branch hints actually do anything on loop
6554 + and jcxz insns (JumpByte) for current Pentium4 chips. They
6555 + may work in the future and it doesn't hurt to accept them
6556 + now. */
6557 + if (l[0] == ',' && l[1] == 'p')
6559 + if (l[2] == 't')
6561 + if (!add_prefix (DS_PREFIX_OPCODE))
6562 + return NULL;
6563 + l += 3;
6565 + else if (l[2] == 'n')
6567 + if (!add_prefix (CS_PREFIX_OPCODE))
6568 + return NULL;
6569 + l += 3;
6573 + /* Any other comma loses. */
6574 + if (*l == ',')
6576 + as_bad (_("invalid character %s in mnemonic"),
6577 + output_invalid (*l));
6578 + return NULL;
6581 + /* Check if instruction is supported on specified architecture. */
6582 + supported = 0;
6583 + for (t = current_templates->start; t < current_templates->end; ++t)
6585 + if (!((t->cpu_flags & ~(Cpu64 | CpuNo64))
6586 + & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))))
6587 + supported |= 1;
6588 + if (!(t->cpu_flags & (flag_code == CODE_64BIT ? CpuNo64 : Cpu64)))
6589 + supported |= 2;
6591 + if (!(supported & 2))
6593 + as_bad (flag_code == CODE_64BIT
6594 + ? _("`%s' is not supported in 64-bit mode")
6595 + : _("`%s' is only supported in 64-bit mode"),
6596 + current_templates->start->name);
6597 + return NULL;
6599 + if (!(supported & 1))
6601 + as_warn (_("`%s' is not supported on `%s%s'"),
6602 + current_templates->start->name,
6603 + cpu_arch_name,
6604 + cpu_sub_arch_name ? cpu_sub_arch_name : "");
6606 + else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT))
6608 + as_warn (_("use .code16 to ensure correct addressing mode"));
6611 + /* Check for rep/repne without a string instruction. */
6612 + if (expecting_string_instruction)
6614 + static templates override;
6616 + for (t = current_templates->start; t < current_templates->end; ++t)
6617 + if (t->opcode_modifier & IsString)
6618 + break;
6619 + if (t >= current_templates->end)
6621 + as_bad (_("expecting string instruction after `%s'"),
6622 + expecting_string_instruction);
6623 + return NULL;
6625 + for (override.start = t; t < current_templates->end; ++t)
6626 + if (!(t->opcode_modifier & IsString))
6627 + break;
6628 + override.end = t;
6629 + current_templates = &override;
6632 + return l;
6635 +static char *
6636 +parse_operands (char *l, const char *mnemonic)
6638 + char *token_start;
6640 + /* 1 if operand is pending after ','. */
6641 + unsigned int expecting_operand = 0;
6643 + /* Non-zero if operand parens not balanced. */
6644 + unsigned int paren_not_balanced;
6646 + while (*l != END_OF_INSN)
6648 + /* Skip optional white space before operand. */
6649 + if (is_space_char (*l))
6650 + ++l;
6651 + if (!is_operand_char (*l) && *l != END_OF_INSN)
6653 + as_bad (_("invalid character %s before operand %d"),
6654 + output_invalid (*l),
6655 + i.operands + 1);
6656 + return NULL;
6658 + token_start = l; /* after white space */
6659 + paren_not_balanced = 0;
6660 + while (paren_not_balanced || *l != ',')
6662 + if (*l == END_OF_INSN)
6664 + if (paren_not_balanced)
6666 + if (!intel_syntax)
6667 + as_bad (_("unbalanced parenthesis in operand %d."),
6668 + i.operands + 1);
6669 + else
6670 + as_bad (_("unbalanced brackets in operand %d."),
6671 + i.operands + 1);
6672 + return NULL;
6674 + else
6675 + break; /* we are done */
6677 + else if (!is_operand_char (*l) && !is_space_char (*l))
6679 + as_bad (_("invalid character %s in operand %d"),
6680 + output_invalid (*l),
6681 + i.operands + 1);
6682 + return NULL;
6684 + if (!intel_syntax)
6686 + if (*l == '(')
6687 + ++paren_not_balanced;
6688 + if (*l == ')')
6689 + --paren_not_balanced;
6691 + else
6693 + if (*l == '[')
6694 + ++paren_not_balanced;
6695 + if (*l == ']')
6696 + --paren_not_balanced;
6698 + l++;
6700 + if (l != token_start)
6701 + { /* Yes, we've read in another operand. */
6702 + unsigned int operand_ok;
6703 + this_operand = i.operands++;
6704 + if (i.operands > MAX_OPERANDS)
6706 + as_bad (_("spurious operands; (%d operands/instruction max)"),
6707 + MAX_OPERANDS);
6708 + return NULL;
6710 + /* Now parse operand adding info to 'i' as we go along. */
6711 + END_STRING_AND_SAVE (l);
6713 + if (intel_syntax)
6714 + operand_ok =
6715 + i386_intel_operand (token_start,
6716 + intel_float_operand (mnemonic));
6717 + else
6718 + operand_ok = i386_operand (token_start);
6720 + RESTORE_END_STRING (l);
6721 + if (!operand_ok)
6722 + return NULL;
6724 + else
6726 + if (expecting_operand)
6728 + expecting_operand_after_comma:
6729 + as_bad (_("expecting operand after ','; got nothing"));
6730 + return NULL;
6732 + if (*l == ',')
6734 + as_bad (_("expecting operand before ','; got nothing"));
6735 + return NULL;
6739 + /* Now *l must be either ',' or END_OF_INSN. */
6740 + if (*l == ',')
6742 + if (*++l == END_OF_INSN)
6744 + /* Just skip it, if it's \n complain. */
6745 + goto expecting_operand_after_comma;
6747 + expecting_operand = 1;
6750 + return l;
6753 +static void
6754 +swap_2_operands (int xchg1, int xchg2)
6756 + union i386_op temp_op;
6757 + unsigned int temp_type;
6758 + enum bfd_reloc_code_real temp_reloc;
6760 + temp_type = i.types[xchg2];
6761 + i.types[xchg2] = i.types[xchg1];
6762 + i.types[xchg1] = temp_type;
6763 + temp_op = i.op[xchg2];
6764 + i.op[xchg2] = i.op[xchg1];
6765 + i.op[xchg1] = temp_op;
6766 + temp_reloc = i.reloc[xchg2];
6767 + i.reloc[xchg2] = i.reloc[xchg1];
6768 + i.reloc[xchg1] = temp_reloc;
6771 +static void
6772 +swap_operands (void)
6774 + switch (i.operands)
6776 + case 4:
6777 + swap_2_operands (1, i.operands - 2);
6778 + case 3:
6779 + case 2:
6780 + swap_2_operands (0, i.operands - 1);
6781 + break;
6782 + default:
6783 + abort ();
6786 + if (i.mem_operands == 2)
6788 + const seg_entry *temp_seg;
6789 + temp_seg = i.seg[0];
6790 + i.seg[0] = i.seg[1];
6791 + i.seg[1] = temp_seg;
6795 +/* Try to ensure constant immediates are represented in the smallest
6796 + opcode possible. */
6797 +static void
6798 +optimize_imm (void)
6800 + char guess_suffix = 0;
6801 + int op;
6803 + if (i.suffix)
6804 + guess_suffix = i.suffix;
6805 + else if (i.reg_operands)
6807 + /* Figure out a suffix from the last register operand specified.
6808 + We can't do this properly yet, ie. excluding InOutPortReg,
6809 + but the following works for instructions with immediates.
6810 + In any case, we can't set i.suffix yet. */
6811 + for (op = i.operands; --op >= 0;)
6812 + if (i.types[op] & Reg)
6814 + if (i.types[op] & Reg8)
6815 + guess_suffix = BYTE_MNEM_SUFFIX;
6816 + else if (i.types[op] & Reg16)
6817 + guess_suffix = WORD_MNEM_SUFFIX;
6818 + else if (i.types[op] & Reg32)
6819 + guess_suffix = LONG_MNEM_SUFFIX;
6820 + else if (i.types[op] & Reg64)
6821 + guess_suffix = QWORD_MNEM_SUFFIX;
6822 + break;
6825 + else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0))
6826 + guess_suffix = WORD_MNEM_SUFFIX;
6828 + for (op = i.operands; --op >= 0;)
6829 + if (i.types[op] & Imm)
6831 + switch (i.op[op].imms->X_op)
6833 + case O_constant:
6834 + /* If a suffix is given, this operand may be shortened. */
6835 + switch (guess_suffix)
6837 + case LONG_MNEM_SUFFIX:
6838 + i.types[op] |= Imm32 | Imm64;
6839 + break;
6840 + case WORD_MNEM_SUFFIX:
6841 + i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64;
6842 + break;
6843 + case BYTE_MNEM_SUFFIX:
6844 + i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64;
6845 + break;
6848 + /* If this operand is at most 16 bits, convert it
6849 + to a signed 16 bit number before trying to see
6850 + whether it will fit in an even smaller size.
6851 + This allows a 16-bit operand such as $0xffe0 to
6852 + be recognised as within Imm8S range. */
6853 + if ((i.types[op] & Imm16)
6854 + && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0)
6856 + i.op[op].imms->X_add_number =
6857 + (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000);
6859 + if ((i.types[op] & Imm32)
6860 + && ((i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1))
6861 + == 0))
6863 + i.op[op].imms->X_add_number = ((i.op[op].imms->X_add_number
6864 + ^ ((offsetT) 1 << 31))
6865 + - ((offsetT) 1 << 31));
6867 + i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number);
6869 + /* We must avoid matching of Imm32 templates when 64bit
6870 + only immediate is available. */
6871 + if (guess_suffix == QWORD_MNEM_SUFFIX)
6872 + i.types[op] &= ~Imm32;
6873 + break;
6875 + case O_absent:
6876 + case O_register:
6877 + abort ();
6879 + /* Symbols and expressions. */
6880 + default:
6881 + /* Convert symbolic operand to proper sizes for matching, but don't
6882 + prevent matching a set of insns that only supports sizes other
6883 + than those matching the insn suffix. */
6885 + unsigned int mask, allowed = 0;
6886 + const template *t;
6888 + for (t = current_templates->start;
6889 + t < current_templates->end;
6890 + ++t)
6891 + allowed |= t->operand_types[op];
6892 + switch (guess_suffix)
6894 + case QWORD_MNEM_SUFFIX:
6895 + mask = Imm64 | Imm32S;
6896 + break;
6897 + case LONG_MNEM_SUFFIX:
6898 + mask = Imm32;
6899 + break;
6900 + case WORD_MNEM_SUFFIX:
6901 + mask = Imm16;
6902 + break;
6903 + case BYTE_MNEM_SUFFIX:
6904 + mask = Imm8;
6905 + break;
6906 + default:
6907 + mask = 0;
6908 + break;
6910 + if (mask & allowed)
6911 + i.types[op] &= mask;
6913 + break;
6918 +/* Try to use the smallest displacement type too. */
6919 +static void
6920 +optimize_disp (void)
6922 + int op;
6924 + for (op = i.operands; --op >= 0;)
6925 + if (i.types[op] & Disp)
6927 + if (i.op[op].disps->X_op == O_constant)
6929 + offsetT disp = i.op[op].disps->X_add_number;
6931 + if ((i.types[op] & Disp16)
6932 + && (disp & ~(offsetT) 0xffff) == 0)
6934 + /* If this operand is at most 16 bits, convert
6935 + to a signed 16 bit number and don't use 64bit
6936 + displacement. */
6937 + disp = (((disp & 0xffff) ^ 0x8000) - 0x8000);
6938 + i.types[op] &= ~Disp64;
6940 + if ((i.types[op] & Disp32)
6941 + && (disp & ~(((offsetT) 2 << 31) - 1)) == 0)
6943 + /* If this operand is at most 32 bits, convert
6944 + to a signed 32 bit number and don't use 64bit
6945 + displacement. */
6946 + disp &= (((offsetT) 2 << 31) - 1);
6947 + disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31);
6948 + i.types[op] &= ~Disp64;
6950 + if (!disp && (i.types[op] & BaseIndex))
6952 + i.types[op] &= ~Disp;
6953 + i.op[op].disps = 0;
6954 + i.disp_operands--;
6956 + else if (flag_code == CODE_64BIT)
6958 + if (fits_in_signed_long (disp))
6960 + i.types[op] &= ~Disp64;
6961 + i.types[op] |= Disp32S;
6963 + if (fits_in_unsigned_long (disp))
6964 + i.types[op] |= Disp32;
6966 + if ((i.types[op] & (Disp32 | Disp32S | Disp16))
6967 + && fits_in_signed_byte (disp))
6968 + i.types[op] |= Disp8;
6970 + else if (i.reloc[op] == BFD_RELOC_386_TLS_DESC_CALL
6971 + || i.reloc[op] == BFD_RELOC_X86_64_TLSDESC_CALL)
6973 + fix_new_exp (frag_now, frag_more (0) - frag_now->fr_literal, 0,
6974 + i.op[op].disps, 0, i.reloc[op]);
6975 + i.types[op] &= ~Disp;
6977 + else
6978 + /* We only support 64bit displacement on constants. */
6979 + i.types[op] &= ~Disp64;
6983 +static int
6984 +match_template (void)
6986 + /* Points to template once we've found it. */
6987 + const template *t;
6988 + unsigned int overlap0, overlap1, overlap2, overlap3;
6989 + unsigned int found_reverse_match;
6990 + int suffix_check;
6991 + unsigned int operand_types [MAX_OPERANDS];
6992 + int addr_prefix_disp;
6993 + unsigned int j;
6995 +#if MAX_OPERANDS != 4
6996 +# error "MAX_OPERANDS must be 4."
6997 +#endif
6999 +#define MATCH(overlap, given, template) \
7000 + ((overlap & ~JumpAbsolute) \
7001 + && (((given) & (BaseIndex | JumpAbsolute)) \
7002 + == ((overlap) & (BaseIndex | JumpAbsolute))))
7004 + /* If given types r0 and r1 are registers they must be of the same type
7005 + unless the expected operand type register overlap is null.
7006 + Note that Acc in a template matches every size of reg. */
7007 +#define CONSISTENT_REGISTER_MATCH(m0, g0, t0, m1, g1, t1) \
7008 + (((g0) & Reg) == 0 || ((g1) & Reg) == 0 \
7009 + || ((g0) & Reg) == ((g1) & Reg) \
7010 + || ((((m0) & Acc) ? Reg : (t0)) & (((m1) & Acc) ? Reg : (t1)) & Reg) == 0 )
7012 + overlap0 = 0;
7013 + overlap1 = 0;
7014 + overlap2 = 0;
7015 + overlap3 = 0;
7016 + found_reverse_match = 0;
7017 + for (j = 0; j < MAX_OPERANDS; j++)
7018 + operand_types [j] = 0;
7019 + addr_prefix_disp = -1;
7020 + suffix_check = (i.suffix == BYTE_MNEM_SUFFIX
7021 + ? No_bSuf
7022 + : (i.suffix == WORD_MNEM_SUFFIX
7023 + ? No_wSuf
7024 + : (i.suffix == SHORT_MNEM_SUFFIX
7025 + ? No_sSuf
7026 + : (i.suffix == LONG_MNEM_SUFFIX
7027 + ? No_lSuf
7028 + : (i.suffix == QWORD_MNEM_SUFFIX
7029 + ? No_qSuf
7030 + : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX
7031 + ? No_xSuf : 0))))));
7033 + for (t = current_templates->start; t < current_templates->end; t++)
7035 + addr_prefix_disp = -1;
7037 + /* Must have right number of operands. */
7038 + if (i.operands != t->operands)
7039 + continue;
7041 + /* Check the suffix, except for some instructions in intel mode. */
7042 + if ((t->opcode_modifier & suffix_check)
7043 + && !(intel_syntax
7044 + && (t->opcode_modifier & IgnoreSize)))
7045 + continue;
7047 + for (j = 0; j < MAX_OPERANDS; j++)
7048 + operand_types [j] = t->operand_types [j];
7050 + /* In general, don't allow 64-bit operands in 32-bit mode. */
7051 + if (i.suffix == QWORD_MNEM_SUFFIX
7052 + && flag_code != CODE_64BIT
7053 + && (intel_syntax
7054 + ? (!(t->opcode_modifier & IgnoreSize)
7055 + && !intel_float_operand (t->name))
7056 + : intel_float_operand (t->name) != 2)
7057 + && (!(operand_types[0] & (RegMMX | RegXMM))
7058 + || !(operand_types[t->operands > 1] & (RegMMX | RegXMM)))
7059 + && (t->base_opcode != 0x0fc7
7060 + || t->extension_opcode != 1 /* cmpxchg8b */))
7061 + continue;
7063 + /* Do not verify operands when there are none. */
7064 + else if (!t->operands)
7066 + if (t->cpu_flags & ~cpu_arch_flags)
7067 + continue;
7068 + /* We've found a match; break out of loop. */
7069 + break;
7072 + /* Address size prefix will turn Disp64/Disp32/Disp16 operand
7073 + into Disp32/Disp16/Disp32 operand. */
7074 + if (i.prefix[ADDR_PREFIX] != 0)
7076 + unsigned int DispOn = 0, DispOff = 0;
7078 + switch (flag_code)
7080 + case CODE_16BIT:
7081 + DispOn = Disp32;
7082 + DispOff = Disp16;
7083 + break;
7084 + case CODE_32BIT:
7085 + DispOn = Disp16;
7086 + DispOff = Disp32;
7087 + break;
7088 + case CODE_64BIT:
7089 + DispOn = Disp32;
7090 + DispOff = Disp64;
7091 + break;
7094 + for (j = 0; j < MAX_OPERANDS; j++)
7096 + /* There should be only one Disp operand. */
7097 + if ((operand_types[j] & DispOff))
7099 + addr_prefix_disp = j;
7100 + operand_types[j] |= DispOn;
7101 + operand_types[j] &= ~DispOff;
7102 + break;
7107 + overlap0 = i.types[0] & operand_types[0];
7108 + switch (t->operands)
7110 + case 1:
7111 + if (!MATCH (overlap0, i.types[0], operand_types[0]))
7112 + continue;
7113 + break;
7114 + case 2:
7115 + /* xchg %eax, %eax is a special case. It is an aliase for nop
7116 + only in 32bit mode and we can use opcode 0x90. In 64bit
7117 + mode, we can't use 0x90 for xchg %eax, %eax since it should
7118 + zero-extend %eax to %rax. */
7119 + if (flag_code == CODE_64BIT
7120 + && t->base_opcode == 0x90
7121 + && i.types [0] == (Acc | Reg32)
7122 + && i.types [1] == (Acc | Reg32))
7123 + continue;
7124 + case 3:
7125 + case 4:
7126 + overlap1 = i.types[1] & operand_types[1];
7127 + if (!MATCH (overlap0, i.types[0], operand_types[0])
7128 + || !MATCH (overlap1, i.types[1], operand_types[1])
7129 + /* monitor in SSE3 is a very special case. The first
7130 + register and the second register may have different
7131 + sizes. The same applies to crc32 in SSE4.2. */
7132 + || !((t->base_opcode == 0x0f01
7133 + && t->extension_opcode == 0xc8)
7134 + || t->base_opcode == 0xf20f38f1
7135 + || CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
7136 + operand_types[0],
7137 + overlap1, i.types[1],
7138 + operand_types[1])))
7140 + /* Check if other direction is valid ... */
7141 + if ((t->opcode_modifier & (D | FloatD)) == 0)
7142 + continue;
7144 + /* Try reversing direction of operands. */
7145 + overlap0 = i.types[0] & operand_types[1];
7146 + overlap1 = i.types[1] & operand_types[0];
7147 + if (!MATCH (overlap0, i.types[0], operand_types[1])
7148 + || !MATCH (overlap1, i.types[1], operand_types[0])
7149 + || !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
7150 + operand_types[1],
7151 + overlap1, i.types[1],
7152 + operand_types[0]))
7154 + /* Does not match either direction. */
7155 + continue;
7157 + /* found_reverse_match holds which of D or FloatDR
7158 + we've found. */
7159 + if ((t->opcode_modifier & D))
7160 + found_reverse_match = Opcode_D;
7161 + else if ((t->opcode_modifier & FloatD))
7162 + found_reverse_match = Opcode_FloatD;
7163 + else
7164 + found_reverse_match = 0;
7165 + if ((t->opcode_modifier & FloatR))
7166 + found_reverse_match |= Opcode_FloatR;
7168 + else
7170 + /* Found a forward 2 operand match here. */
7171 + switch (t->operands)
7173 + case 4:
7174 + overlap3 = i.types[3] & operand_types[3];
7175 + case 3:
7176 + overlap2 = i.types[2] & operand_types[2];
7177 + break;
7180 + switch (t->operands)
7182 + case 4:
7183 + if (!MATCH (overlap3, i.types[3], operand_types[3])
7184 + || !CONSISTENT_REGISTER_MATCH (overlap2,
7185 + i.types[2],
7186 + operand_types[2],
7187 + overlap3,
7188 + i.types[3],
7189 + operand_types[3]))
7190 + continue;
7191 + case 3:
7192 + /* Here we make use of the fact that there are no
7193 + reverse match 3 operand instructions, and all 3
7194 + operand instructions only need to be checked for
7195 + register consistency between operands 2 and 3. */
7196 + if (!MATCH (overlap2, i.types[2], operand_types[2])
7197 + || !CONSISTENT_REGISTER_MATCH (overlap1,
7198 + i.types[1],
7199 + operand_types[1],
7200 + overlap2,
7201 + i.types[2],
7202 + operand_types[2]))
7203 + continue;
7204 + break;
7207 + /* Found either forward/reverse 2, 3 or 4 operand match here:
7208 + slip through to break. */
7210 + if (t->cpu_flags & ~cpu_arch_flags)
7212 + found_reverse_match = 0;
7213 + continue;
7215 + /* We've found a match; break out of loop. */
7216 + break;
7219 + if (t == current_templates->end)
7221 + /* We found no match. */
7222 + as_bad (_("suffix or operands invalid for `%s'"),
7223 + current_templates->start->name);
7224 + return 0;
7227 + if (!quiet_warnings)
7229 + if (!intel_syntax
7230 + && ((i.types[0] & JumpAbsolute)
7231 + != (operand_types[0] & JumpAbsolute)))
7233 + as_warn (_("indirect %s without `*'"), t->name);
7236 + if ((t->opcode_modifier & (IsPrefix | IgnoreSize))
7237 + == (IsPrefix | IgnoreSize))
7239 + /* Warn them that a data or address size prefix doesn't
7240 + affect assembly of the next line of code. */
7241 + as_warn (_("stand-alone `%s' prefix"), t->name);
7245 + /* Copy the template we found. */
7246 + i.tm = *t;
7248 + if (addr_prefix_disp != -1)
7249 + i.tm.operand_types[addr_prefix_disp]
7250 + = operand_types[addr_prefix_disp];
7252 + if (found_reverse_match)
7254 + /* If we found a reverse match we must alter the opcode
7255 + direction bit. found_reverse_match holds bits to change
7256 + (different for int & float insns). */
7258 + i.tm.base_opcode ^= found_reverse_match;
7260 + i.tm.operand_types[0] = operand_types[1];
7261 + i.tm.operand_types[1] = operand_types[0];
7264 + return 1;
7267 +static int
7268 +check_string (void)
7270 + int mem_op = (i.types[0] & AnyMem) ? 0 : 1;
7271 + if ((i.tm.operand_types[mem_op] & EsSeg) != 0)
7273 + if (i.seg[0] != NULL && i.seg[0] != &es)
7275 + as_bad (_("`%s' operand %d must use `%%es' segment"),
7276 + i.tm.name,
7277 + mem_op + 1);
7278 + return 0;
7280 + /* There's only ever one segment override allowed per instruction.
7281 + This instruction possibly has a legal segment override on the
7282 + second operand, so copy the segment to where non-string
7283 + instructions store it, allowing common code. */
7284 + i.seg[0] = i.seg[1];
7286 + else if ((i.tm.operand_types[mem_op + 1] & EsSeg) != 0)
7288 + if (i.seg[1] != NULL && i.seg[1] != &es)
7290 + as_bad (_("`%s' operand %d must use `%%es' segment"),
7291 + i.tm.name,
7292 + mem_op + 2);
7293 + return 0;
7296 + return 1;
7299 +static int
7300 +process_suffix (void)
7302 + /* If matched instruction specifies an explicit instruction mnemonic
7303 + suffix, use it. */
7304 + if (i.tm.opcode_modifier & (Size16 | Size32 | Size64))
7306 + if (i.tm.opcode_modifier & Size16)
7307 + i.suffix = WORD_MNEM_SUFFIX;
7308 + else if (i.tm.opcode_modifier & Size64)
7309 + i.suffix = QWORD_MNEM_SUFFIX;
7310 + else
7311 + i.suffix = LONG_MNEM_SUFFIX;
7313 + else if (i.reg_operands)
7315 + /* If there's no instruction mnemonic suffix we try to invent one
7316 + based on register operands. */
7317 + if (!i.suffix)
7319 + /* We take i.suffix from the last register operand specified,
7320 + Destination register type is more significant than source
7321 + register type. crc32 in SSE4.2 prefers source register
7322 + type. */
7323 + if (i.tm.base_opcode == 0xf20f38f1)
7325 + if ((i.types[0] & Reg))
7326 + i.suffix = ((i.types[0] & Reg16) ? WORD_MNEM_SUFFIX :
7327 + LONG_MNEM_SUFFIX);
7329 + else if (i.tm.base_opcode == 0xf20f38f0)
7331 + if ((i.types[0] & Reg8))
7332 + i.suffix = BYTE_MNEM_SUFFIX;
7335 + if (!i.suffix)
7337 + int op;
7339 + if (i.tm.base_opcode == 0xf20f38f1
7340 + || i.tm.base_opcode == 0xf20f38f0)
7342 + /* We have to know the operand size for crc32. */
7343 + as_bad (_("ambiguous memory operand size for `%s`"),
7344 + i.tm.name);
7345 + return 0;
7348 + for (op = i.operands; --op >= 0;)
7349 + if ((i.types[op] & Reg)
7350 + && !(i.tm.operand_types[op] & InOutPortReg))
7352 + i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX :
7353 + (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX :
7354 + (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX :
7355 + LONG_MNEM_SUFFIX);
7356 + break;
7360 + else if (i.suffix == BYTE_MNEM_SUFFIX)
7362 + if (!check_byte_reg ())
7363 + return 0;
7365 + else if (i.suffix == LONG_MNEM_SUFFIX)
7367 + if (!check_long_reg ())
7368 + return 0;
7370 + else if (i.suffix == QWORD_MNEM_SUFFIX)
7372 + if (!check_qword_reg ())
7373 + return 0;
7375 + else if (i.suffix == WORD_MNEM_SUFFIX)
7377 + if (!check_word_reg ())
7378 + return 0;
7380 + else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize))
7381 + /* Do nothing if the instruction is going to ignore the prefix. */
7383 + else
7384 + abort ();
7386 + else if ((i.tm.opcode_modifier & DefaultSize)
7387 + && !i.suffix
7388 + /* exclude fldenv/frstor/fsave/fstenv */
7389 + && (i.tm.opcode_modifier & No_sSuf))
7391 + i.suffix = stackop_size;
7393 + else if (intel_syntax
7394 + && !i.suffix
7395 + && ((i.tm.operand_types[0] & JumpAbsolute)
7396 + || (i.tm.opcode_modifier & (JumpByte|JumpInterSegment))
7397 + || (i.tm.base_opcode == 0x0f01 /* [ls][gi]dt */
7398 + && i.tm.extension_opcode <= 3)))
7400 + switch (flag_code)
7402 + case CODE_64BIT:
7403 + if (!(i.tm.opcode_modifier & No_qSuf))
7405 + i.suffix = QWORD_MNEM_SUFFIX;
7406 + break;
7408 + case CODE_32BIT:
7409 + if (!(i.tm.opcode_modifier & No_lSuf))
7410 + i.suffix = LONG_MNEM_SUFFIX;
7411 + break;
7412 + case CODE_16BIT:
7413 + if (!(i.tm.opcode_modifier & No_wSuf))
7414 + i.suffix = WORD_MNEM_SUFFIX;
7415 + break;
7419 + if (!i.suffix)
7421 + if (!intel_syntax)
7423 + if (i.tm.opcode_modifier & W)
7425 + as_bad (_("no instruction mnemonic suffix given and "
7426 + "no register operands; can't size instruction"));
7427 + return 0;
7430 + else
7432 + unsigned int suffixes = (~i.tm.opcode_modifier
7433 + & (No_bSuf
7434 + | No_wSuf
7435 + | No_lSuf
7436 + | No_sSuf
7437 + | No_xSuf
7438 + | No_qSuf));
7440 + if ((i.tm.opcode_modifier & W)
7441 + || ((suffixes & (suffixes - 1))
7442 + && !(i.tm.opcode_modifier & (DefaultSize | IgnoreSize))))
7444 + as_bad (_("ambiguous operand size for `%s'"), i.tm.name);
7445 + return 0;
7450 + /* Change the opcode based on the operand size given by i.suffix;
7451 + We don't need to change things for byte insns. */
7453 + if (i.suffix && i.suffix != BYTE_MNEM_SUFFIX)
7455 + /* It's not a byte, select word/dword operation. */
7456 + if (i.tm.opcode_modifier & W)
7458 + if (i.tm.opcode_modifier & ShortForm)
7459 + i.tm.base_opcode |= 8;
7460 + else
7461 + i.tm.base_opcode |= 1;
7464 + /* Now select between word & dword operations via the operand
7465 + size prefix, except for instructions that will ignore this
7466 + prefix anyway. */
7467 + if (i.tm.base_opcode == 0x0f01 && i.tm.extension_opcode == 0xc8)
7469 + /* monitor in SSE3 is a very special case. The default size
7470 + of AX is the size of mode. The address size override
7471 + prefix will change the size of AX. */
7472 + if (i.op->regs[0].reg_type &
7473 + (flag_code == CODE_32BIT ? Reg16 : Reg32))
7474 + if (!add_prefix (ADDR_PREFIX_OPCODE))
7475 + return 0;
7477 + else if (i.suffix != QWORD_MNEM_SUFFIX
7478 + && i.suffix != LONG_DOUBLE_MNEM_SUFFIX
7479 + && !(i.tm.opcode_modifier & (IgnoreSize | FloatMF))
7480 + && ((i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
7481 + || (flag_code == CODE_64BIT
7482 + && (i.tm.opcode_modifier & JumpByte))))
7484 + unsigned int prefix = DATA_PREFIX_OPCODE;
7486 + if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */
7487 + prefix = ADDR_PREFIX_OPCODE;
7489 + if (!add_prefix (prefix))
7490 + return 0;
7493 + /* Set mode64 for an operand. */
7494 + if (i.suffix == QWORD_MNEM_SUFFIX
7495 + && flag_code == CODE_64BIT
7496 + && (i.tm.opcode_modifier & NoRex64) == 0)
7498 + /* Special case for xchg %rax,%rax. It is NOP and doesn't
7499 + need rex64. */
7500 + if (i.operands != 2
7501 + || i.types [0] != (Acc | Reg64)
7502 + || i.types [1] != (Acc | Reg64)
7503 + || i.tm.base_opcode != 0x90)
7504 + i.rex |= REX_W;
7507 + /* Size floating point instruction. */
7508 + if (i.suffix == LONG_MNEM_SUFFIX)
7509 + if (i.tm.opcode_modifier & FloatMF)
7510 + i.tm.base_opcode ^= 4;
7513 + return 1;
7516 +static int
7517 +check_byte_reg (void)
7519 + int op;
7521 + for (op = i.operands; --op >= 0;)
7523 + /* If this is an eight bit register, it's OK. If it's the 16 or
7524 + 32 bit version of an eight bit register, we will just use the
7525 + low portion, and that's OK too. */
7526 + if (i.types[op] & Reg8)
7527 + continue;
7529 + /* movzx, movsx, pextrb and pinsrb should not generate this
7530 + warning. */
7531 + if (intel_syntax
7532 + && (i.tm.base_opcode == 0xfb7
7533 + || i.tm.base_opcode == 0xfb6
7534 + || i.tm.base_opcode == 0x63
7535 + || i.tm.base_opcode == 0xfbe
7536 + || i.tm.base_opcode == 0xfbf
7537 + || i.tm.base_opcode == 0x660f3a14
7538 + || i.tm.base_opcode == 0x660f3a20))
7539 + continue;
7541 + /* crc32 doesn't generate this warning. */
7542 + if (i.tm.base_opcode == 0xf20f38f0)
7543 + continue;
7545 + if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4)
7547 + /* Prohibit these changes in the 64bit mode, since the
7548 + lowering is more complicated. */
7549 + if (flag_code == CODE_64BIT
7550 + && (i.tm.operand_types[op] & InOutPortReg) == 0)
7552 + as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
7553 + register_prefix, i.op[op].regs->reg_name,
7554 + i.suffix);
7555 + return 0;
7557 +#if REGISTER_WARNINGS
7558 + if (!quiet_warnings
7559 + && (i.tm.operand_types[op] & InOutPortReg) == 0)
7560 + as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
7561 + register_prefix,
7562 + (i.op[op].regs + (i.types[op] & Reg16
7563 + ? REGNAM_AL - REGNAM_AX
7564 + : REGNAM_AL - REGNAM_EAX))->reg_name,
7565 + register_prefix,
7566 + i.op[op].regs->reg_name,
7567 + i.suffix);
7568 +#endif
7569 + continue;
7571 + /* Any other register is bad. */
7572 + if (i.types[op] & (Reg | RegMMX | RegXMM
7573 + | SReg2 | SReg3
7574 + | Control | Debug | Test
7575 + | FloatReg | FloatAcc))
7577 + as_bad (_("`%s%s' not allowed with `%s%c'"),
7578 + register_prefix,
7579 + i.op[op].regs->reg_name,
7580 + i.tm.name,
7581 + i.suffix);
7582 + return 0;
7585 + return 1;
7588 +static int
7589 +check_long_reg (void)
7591 + int op;
7593 + for (op = i.operands; --op >= 0;)
7594 + /* Reject eight bit registers, except where the template requires
7595 + them. (eg. movzb) */
7596 + if ((i.types[op] & Reg8) != 0
7597 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
7599 + as_bad (_("`%s%s' not allowed with `%s%c'"),
7600 + register_prefix,
7601 + i.op[op].regs->reg_name,
7602 + i.tm.name,
7603 + i.suffix);
7604 + return 0;
7606 + /* Warn if the e prefix on a general reg is missing. */
7607 + else if ((!quiet_warnings || flag_code == CODE_64BIT)
7608 + && (i.types[op] & Reg16) != 0
7609 + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0)
7611 + /* Prohibit these changes in the 64bit mode, since the
7612 + lowering is more complicated. */
7613 + if (flag_code == CODE_64BIT)
7615 + as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
7616 + register_prefix, i.op[op].regs->reg_name,
7617 + i.suffix);
7618 + return 0;
7620 +#if REGISTER_WARNINGS
7621 + else
7622 + as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
7623 + register_prefix,
7624 + (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name,
7625 + register_prefix,
7626 + i.op[op].regs->reg_name,
7627 + i.suffix);
7628 +#endif
7630 + /* Warn if the r prefix on a general reg is missing. */
7631 + else if ((i.types[op] & Reg64) != 0
7632 + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0)
7634 + if (intel_syntax
7635 + && i.tm.base_opcode == 0xf30f2d
7636 + && (i.types[0] & RegXMM) == 0)
7638 + /* cvtss2si converts DWORD memory to Reg64. We want
7639 + REX byte. */
7640 + i.suffix = QWORD_MNEM_SUFFIX;
7642 + else
7644 + as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
7645 + register_prefix, i.op[op].regs->reg_name,
7646 + i.suffix);
7647 + return 0;
7650 + return 1;
7653 +static int
7654 +check_qword_reg (void)
7656 + int op;
7658 + for (op = i.operands; --op >= 0; )
7659 + /* Reject eight bit registers, except where the template requires
7660 + them. (eg. movzb) */
7661 + if ((i.types[op] & Reg8) != 0
7662 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
7664 + as_bad (_("`%s%s' not allowed with `%s%c'"),
7665 + register_prefix,
7666 + i.op[op].regs->reg_name,
7667 + i.tm.name,
7668 + i.suffix);
7669 + return 0;
7671 + /* Warn if the e prefix on a general reg is missing. */
7672 + else if ((i.types[op] & (Reg16 | Reg32)) != 0
7673 + && (i.tm.operand_types[op] & (Reg32 | Acc)) != 0)
7675 + /* Prohibit these changes in the 64bit mode, since the
7676 + lowering is more complicated. */
7677 + if (intel_syntax
7678 + && i.tm.base_opcode == 0xf20f2d
7679 + && (i.types[0] & RegXMM) == 0)
7681 + /* cvtsd2si converts QWORD memory to Reg32. We don't want
7682 + REX byte. */
7683 + i.suffix = LONG_MNEM_SUFFIX;
7685 + else
7687 + as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
7688 + register_prefix, i.op[op].regs->reg_name,
7689 + i.suffix);
7690 + return 0;
7693 + return 1;
7696 +static int
7697 +check_word_reg (void)
7699 + int op;
7700 + for (op = i.operands; --op >= 0;)
7701 + /* Reject eight bit registers, except where the template requires
7702 + them. (eg. movzb) */
7703 + if ((i.types[op] & Reg8) != 0
7704 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
7706 + as_bad (_("`%s%s' not allowed with `%s%c'"),
7707 + register_prefix,
7708 + i.op[op].regs->reg_name,
7709 + i.tm.name,
7710 + i.suffix);
7711 + return 0;
7713 + /* Warn if the e prefix on a general reg is present. */
7714 + else if ((!quiet_warnings || flag_code == CODE_64BIT)
7715 + && (i.types[op] & Reg32) != 0
7716 + && (i.tm.operand_types[op] & (Reg16 | Acc)) != 0)
7718 + /* Prohibit these changes in the 64bit mode, since the
7719 + lowering is more complicated. */
7720 + if (flag_code == CODE_64BIT)
7722 + as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
7723 + register_prefix, i.op[op].regs->reg_name,
7724 + i.suffix);
7725 + return 0;
7727 + else
7728 +#if REGISTER_WARNINGS
7729 + as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
7730 + register_prefix,
7731 + (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name,
7732 + register_prefix,
7733 + i.op[op].regs->reg_name,
7734 + i.suffix);
7735 +#endif
7737 + return 1;
7740 +static int
7741 +finalize_imm (void)
7743 + unsigned int overlap0, overlap1, overlap2;
7745 + overlap0 = i.types[0] & i.tm.operand_types[0];
7746 + if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64))
7747 + && overlap0 != Imm8 && overlap0 != Imm8S
7748 + && overlap0 != Imm16 && overlap0 != Imm32S
7749 + && overlap0 != Imm32 && overlap0 != Imm64)
7751 + if (i.suffix)
7753 + overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX
7754 + ? Imm8 | Imm8S
7755 + : (i.suffix == WORD_MNEM_SUFFIX
7756 + ? Imm16
7757 + : (i.suffix == QWORD_MNEM_SUFFIX
7758 + ? Imm64 | Imm32S
7759 + : Imm32)));
7761 + else if (overlap0 == (Imm16 | Imm32S | Imm32)
7762 + || overlap0 == (Imm16 | Imm32)
7763 + || overlap0 == (Imm16 | Imm32S))
7765 + overlap0 = ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)
7766 + ? Imm16 : Imm32S);
7768 + if (overlap0 != Imm8 && overlap0 != Imm8S
7769 + && overlap0 != Imm16 && overlap0 != Imm32S
7770 + && overlap0 != Imm32 && overlap0 != Imm64)
7772 + as_bad (_("no instruction mnemonic suffix given; "
7773 + "can't determine immediate size"));
7774 + return 0;
7777 + i.types[0] = overlap0;
7779 + overlap1 = i.types[1] & i.tm.operand_types[1];
7780 + if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32 | Imm64))
7781 + && overlap1 != Imm8 && overlap1 != Imm8S
7782 + && overlap1 != Imm16 && overlap1 != Imm32S
7783 + && overlap1 != Imm32 && overlap1 != Imm64)
7785 + if (i.suffix)
7787 + overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX
7788 + ? Imm8 | Imm8S
7789 + : (i.suffix == WORD_MNEM_SUFFIX
7790 + ? Imm16
7791 + : (i.suffix == QWORD_MNEM_SUFFIX
7792 + ? Imm64 | Imm32S
7793 + : Imm32)));
7795 + else if (overlap1 == (Imm16 | Imm32 | Imm32S)
7796 + || overlap1 == (Imm16 | Imm32)
7797 + || overlap1 == (Imm16 | Imm32S))
7799 + overlap1 = ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)
7800 + ? Imm16 : Imm32S);
7802 + if (overlap1 != Imm8 && overlap1 != Imm8S
7803 + && overlap1 != Imm16 && overlap1 != Imm32S
7804 + && overlap1 != Imm32 && overlap1 != Imm64)
7806 + as_bad (_("no instruction mnemonic suffix given; "
7807 + "can't determine immediate size %x %c"),
7808 + overlap1, i.suffix);
7809 + return 0;
7812 + i.types[1] = overlap1;
7814 + overlap2 = i.types[2] & i.tm.operand_types[2];
7815 + assert ((overlap2 & Imm) == 0);
7816 + i.types[2] = overlap2;
7818 + return 1;
7821 +static int
7822 +process_operands (void)
7824 + /* Default segment register this instruction will use for memory
7825 + accesses. 0 means unknown. This is only for optimizing out
7826 + unnecessary segment overrides. */
7827 + const seg_entry *default_seg = 0;
7829 + /* The imul $imm, %reg instruction is converted into
7830 + imul $imm, %reg, %reg, and the clr %reg instruction
7831 + is converted into xor %reg, %reg. */
7832 + if (i.tm.opcode_modifier & RegKludge)
7834 + if ((i.tm.cpu_flags & CpuSSE4_1))
7836 + /* The first operand in instruction blendvpd, blendvps and
7837 + pblendvb in SSE4.1 is implicit and must be xmm0. */
7838 + assert (i.operands == 3
7839 + && i.reg_operands >= 2
7840 + && i.types[0] == RegXMM);
7841 + if (i.op[0].regs->reg_num != 0)
7843 + if (intel_syntax)
7844 + as_bad (_("the last operand of `%s' must be `%sxmm0'"),
7845 + i.tm.name, register_prefix);
7846 + else
7847 + as_bad (_("the first operand of `%s' must be `%sxmm0'"),
7848 + i.tm.name, register_prefix);
7849 + return 0;
7851 + i.op[0] = i.op[1];
7852 + i.op[1] = i.op[2];
7853 + i.types[0] = i.types[1];
7854 + i.types[1] = i.types[2];
7855 + i.operands--;
7856 + i.reg_operands--;
7858 + /* We need to adjust fields in i.tm since they are used by
7859 + build_modrm_byte. */
7860 + i.tm.operand_types [0] = i.tm.operand_types [1];
7861 + i.tm.operand_types [1] = i.tm.operand_types [2];
7862 + i.tm.operands--;
7864 + else
7866 + unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1;
7867 + /* Pretend we saw the extra register operand. */
7868 + assert (i.reg_operands == 1
7869 + && i.op[first_reg_op + 1].regs == 0);
7870 + i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs;
7871 + i.types[first_reg_op + 1] = i.types[first_reg_op];
7872 + i.operands++;
7873 + i.reg_operands++;
7877 + if (i.tm.opcode_modifier & ShortForm)
7879 + if (i.types[0] & (SReg2 | SReg3))
7881 + if (i.tm.base_opcode == POP_SEG_SHORT
7882 + && i.op[0].regs->reg_num == 1)
7884 + as_bad (_("you can't `pop %%cs'"));
7885 + return 0;
7887 + i.tm.base_opcode |= (i.op[0].regs->reg_num << 3);
7888 + if ((i.op[0].regs->reg_flags & RegRex) != 0)
7889 + i.rex |= REX_B;
7891 + else
7893 + /* The register or float register operand is in operand 0 or 1. */
7894 + unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1;
7895 + /* Register goes in low 3 bits of opcode. */
7896 + i.tm.base_opcode |= i.op[op].regs->reg_num;
7897 + if ((i.op[op].regs->reg_flags & RegRex) != 0)
7898 + i.rex |= REX_B;
7899 + if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
7901 + /* Warn about some common errors, but press on regardless.
7902 + The first case can be generated by gcc (<= 2.8.1). */
7903 + if (i.operands == 2)
7905 + /* Reversed arguments on faddp, fsubp, etc. */
7906 + as_warn (_("translating to `%s %s%s,%s%s'"), i.tm.name,
7907 + register_prefix, i.op[1].regs->reg_name,
7908 + register_prefix, i.op[0].regs->reg_name);
7910 + else
7912 + /* Extraneous `l' suffix on fp insn. */
7913 + as_warn (_("translating to `%s %s%s'"), i.tm.name,
7914 + register_prefix, i.op[0].regs->reg_name);
7919 + else if (i.tm.opcode_modifier & Modrm)
7921 + /* The opcode is completed (modulo i.tm.extension_opcode which
7922 + must be put into the modrm byte). Now, we make the modrm and
7923 + index base bytes based on all the info we've collected. */
7925 + default_seg = build_modrm_byte ();
7927 + else if ((i.tm.base_opcode & ~0x3) == MOV_AX_DISP32)
7929 + default_seg = &ds;
7931 + else if ((i.tm.opcode_modifier & IsString) != 0)
7933 + /* For the string instructions that allow a segment override
7934 + on one of their operands, the default segment is ds. */
7935 + default_seg = &ds;
7938 + if ((i.tm.base_opcode == 0x8d /* lea */
7939 + || (i.tm.cpu_flags & CpuSVME))
7940 + && i.seg[0] && !quiet_warnings)
7941 + as_warn (_("segment override on `%s' is ineffectual"), i.tm.name);
7943 + /* If a segment was explicitly specified, and the specified segment
7944 + is not the default, use an opcode prefix to select it. If we
7945 + never figured out what the default segment is, then default_seg
7946 + will be zero at this point, and the specified segment prefix will
7947 + always be used. */
7948 + if ((i.seg[0]) && (i.seg[0] != default_seg))
7950 + if (!add_prefix (i.seg[0]->seg_prefix))
7951 + return 0;
7953 + return 1;
7956 +static const seg_entry *
7957 +build_modrm_byte (void)
7959 + const seg_entry *default_seg = 0;
7961 + /* i.reg_operands MUST be the number of real register operands;
7962 + implicit registers do not count. */
7963 + if (i.reg_operands == 2)
7965 + unsigned int source, dest;
7967 + switch (i.operands)
7969 + case 2:
7970 + source = 0;
7971 + break;
7972 + case 3:
7973 + /* When there are 3 operands, one of them may be immediate,
7974 + which may be the first or the last operand. Otherwise,
7975 + the first operand must be shift count register (cl). */
7976 + assert (i.imm_operands == 1
7977 + || (i.imm_operands == 0
7978 + && (i.types[0] & ShiftCount)));
7979 + source = (i.types[0] & (Imm | ShiftCount)) ? 1 : 0;
7980 + break;
7981 + case 4:
7982 + /* When there are 4 operands, the first two must be immediate
7983 + operands. The source operand will be the 3rd one. */
7984 + assert (i.imm_operands == 2
7985 + && (i.types[0] & Imm)
7986 + && (i.types[1] & Imm));
7987 + source = 2;
7988 + break;
7989 + default:
7990 + abort ();
7993 + dest = source + 1;
7995 + i.rm.mode = 3;
7996 + /* One of the register operands will be encoded in the i.tm.reg
7997 + field, the other in the combined i.tm.mode and i.tm.regmem
7998 + fields. If no form of this instruction supports a memory
7999 + destination operand, then we assume the source operand may
8000 + sometimes be a memory operand and so we need to store the
8001 + destination in the i.rm.reg field. */
8002 + if ((i.tm.operand_types[dest] & (AnyMem | RegMem)) == 0)
8004 + i.rm.reg = i.op[dest].regs->reg_num;
8005 + i.rm.regmem = i.op[source].regs->reg_num;
8006 + if ((i.op[dest].regs->reg_flags & RegRex) != 0)
8007 + i.rex |= REX_R;
8008 + if ((i.op[source].regs->reg_flags & RegRex) != 0)
8009 + i.rex |= REX_B;
8011 + else
8013 + i.rm.reg = i.op[source].regs->reg_num;
8014 + i.rm.regmem = i.op[dest].regs->reg_num;
8015 + if ((i.op[dest].regs->reg_flags & RegRex) != 0)
8016 + i.rex |= REX_B;
8017 + if ((i.op[source].regs->reg_flags & RegRex) != 0)
8018 + i.rex |= REX_R;
8020 + if (flag_code != CODE_64BIT && (i.rex & (REX_R | REX_B)))
8022 + if (!((i.types[0] | i.types[1]) & Control))
8023 + abort ();
8024 + i.rex &= ~(REX_R | REX_B);
8025 + add_prefix (LOCK_PREFIX_OPCODE);
8028 + else
8029 + { /* If it's not 2 reg operands... */
8030 + if (i.mem_operands)
8032 + unsigned int fake_zero_displacement = 0;
8033 + unsigned int op;
8035 + for (op = 0; op < i.operands; op++)
8036 + if ((i.types[op] & AnyMem))
8037 + break;
8038 + assert (op < i.operands);
8040 + default_seg = &ds;
8042 + if (i.base_reg == 0)
8044 + i.rm.mode = 0;
8045 + if (!i.disp_operands)
8046 + fake_zero_displacement = 1;
8047 + if (i.index_reg == 0)
8049 + /* Operand is just <disp> */
8050 + if (flag_code == CODE_64BIT)
8052 + /* 64bit mode overwrites the 32bit absolute
8053 + addressing by RIP relative addressing and
8054 + absolute addressing is encoded by one of the
8055 + redundant SIB forms. */
8056 + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
8057 + i.sib.base = NO_BASE_REGISTER;
8058 + i.sib.index = NO_INDEX_REGISTER;
8059 + i.types[op] = ((i.prefix[ADDR_PREFIX] == 0)
8060 + ? Disp32S : Disp32);
8062 + else if ((flag_code == CODE_16BIT)
8063 + ^ (i.prefix[ADDR_PREFIX] != 0))
8065 + i.rm.regmem = NO_BASE_REGISTER_16;
8066 + i.types[op] = Disp16;
8068 + else
8070 + i.rm.regmem = NO_BASE_REGISTER;
8071 + i.types[op] = Disp32;
8074 + else /* !i.base_reg && i.index_reg */
8076 + i.sib.index = i.index_reg->reg_num;
8077 + i.sib.base = NO_BASE_REGISTER;
8078 + i.sib.scale = i.log2_scale_factor;
8079 + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
8080 + i.types[op] &= ~Disp;
8081 + if (flag_code != CODE_64BIT)
8082 + i.types[op] |= Disp32; /* Must be 32 bit */
8083 + else
8084 + i.types[op] |= Disp32S;
8085 + if ((i.index_reg->reg_flags & RegRex) != 0)
8086 + i.rex |= REX_X;
8089 + /* RIP addressing for 64bit mode. */
8090 + else if (i.base_reg->reg_type == BaseIndex)
8092 + i.rm.regmem = NO_BASE_REGISTER;
8093 + i.types[op] &= ~ Disp;
8094 + i.types[op] |= Disp32S;
8095 + i.flags[op] |= Operand_PCrel;
8096 + if (! i.disp_operands)
8097 + fake_zero_displacement = 1;
8099 + else if (i.base_reg->reg_type & Reg16)
8101 + switch (i.base_reg->reg_num)
8103 + case 3: /* (%bx) */
8104 + if (i.index_reg == 0)
8105 + i.rm.regmem = 7;
8106 + else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */
8107 + i.rm.regmem = i.index_reg->reg_num - 6;
8108 + break;
8109 + case 5: /* (%bp) */
8110 + default_seg = &ss;
8111 + if (i.index_reg == 0)
8113 + i.rm.regmem = 6;
8114 + if ((i.types[op] & Disp) == 0)
8116 + /* fake (%bp) into 0(%bp) */
8117 + i.types[op] |= Disp8;
8118 + fake_zero_displacement = 1;
8121 + else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */
8122 + i.rm.regmem = i.index_reg->reg_num - 6 + 2;
8123 + break;
8124 + default: /* (%si) -> 4 or (%di) -> 5 */
8125 + i.rm.regmem = i.base_reg->reg_num - 6 + 4;
8127 + i.rm.mode = mode_from_disp_size (i.types[op]);
8129 + else /* i.base_reg and 32/64 bit mode */
8131 + if (flag_code == CODE_64BIT
8132 + && (i.types[op] & Disp))
8133 + i.types[op] = ((i.types[op] & Disp8)
8134 + | (i.prefix[ADDR_PREFIX] == 0
8135 + ? Disp32S : Disp32));
8137 + i.rm.regmem = i.base_reg->reg_num;
8138 + if ((i.base_reg->reg_flags & RegRex) != 0)
8139 + i.rex |= REX_B;
8140 + i.sib.base = i.base_reg->reg_num;
8141 + /* x86-64 ignores REX prefix bit here to avoid decoder
8142 + complications. */
8143 + if ((i.base_reg->reg_num & 7) == EBP_REG_NUM)
8145 + default_seg = &ss;
8146 + if (i.disp_operands == 0)
8148 + fake_zero_displacement = 1;
8149 + i.types[op] |= Disp8;
8152 + else if (i.base_reg->reg_num == ESP_REG_NUM)
8154 + default_seg = &ss;
8156 + i.sib.scale = i.log2_scale_factor;
8157 + if (i.index_reg == 0)
8159 + /* <disp>(%esp) becomes two byte modrm with no index
8160 + register. We've already stored the code for esp
8161 + in i.rm.regmem ie. ESCAPE_TO_TWO_BYTE_ADDRESSING.
8162 + Any base register besides %esp will not use the
8163 + extra modrm byte. */
8164 + i.sib.index = NO_INDEX_REGISTER;
8165 +#if !SCALE1_WHEN_NO_INDEX
8166 + /* Another case where we force the second modrm byte. */
8167 + if (i.log2_scale_factor)
8168 + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
8169 +#endif
8171 + else
8173 + i.sib.index = i.index_reg->reg_num;
8174 + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
8175 + if ((i.index_reg->reg_flags & RegRex) != 0)
8176 + i.rex |= REX_X;
8179 + if (i.disp_operands
8180 + && (i.reloc[op] == BFD_RELOC_386_TLS_DESC_CALL
8181 + || i.reloc[op] == BFD_RELOC_X86_64_TLSDESC_CALL))
8182 + i.rm.mode = 0;
8183 + else
8184 + i.rm.mode = mode_from_disp_size (i.types[op]);
8187 + if (fake_zero_displacement)
8189 + /* Fakes a zero displacement assuming that i.types[op]
8190 + holds the correct displacement size. */
8191 + expressionS *exp;
8193 + assert (i.op[op].disps == 0);
8194 + exp = &disp_expressions[i.disp_operands++];
8195 + i.op[op].disps = exp;
8196 + exp->X_op = O_constant;
8197 + exp->X_add_number = 0;
8198 + exp->X_add_symbol = (symbolS *) 0;
8199 + exp->X_op_symbol = (symbolS *) 0;
8203 + /* Fill in i.rm.reg or i.rm.regmem field with register operand
8204 + (if any) based on i.tm.extension_opcode. Again, we must be
8205 + careful to make sure that segment/control/debug/test/MMX
8206 + registers are coded into the i.rm.reg field. */
8207 + if (i.reg_operands)
8209 + unsigned int op;
8211 + for (op = 0; op < i.operands; op++)
8212 + if ((i.types[op] & (Reg | RegMMX | RegXMM
8213 + | SReg2 | SReg3
8214 + | Control | Debug | Test)))
8215 + break;
8216 + assert (op < i.operands);
8218 + /* If there is an extension opcode to put here, the register
8219 + number must be put into the regmem field. */
8220 + if (i.tm.extension_opcode != None)
8222 + i.rm.regmem = i.op[op].regs->reg_num;
8223 + if ((i.op[op].regs->reg_flags & RegRex) != 0)
8224 + i.rex |= REX_B;
8226 + else
8228 + i.rm.reg = i.op[op].regs->reg_num;
8229 + if ((i.op[op].regs->reg_flags & RegRex) != 0)
8230 + i.rex |= REX_R;
8233 + /* Now, if no memory operand has set i.rm.mode = 0, 1, 2 we
8234 + must set it to 3 to indicate this is a register operand
8235 + in the regmem field. */
8236 + if (!i.mem_operands)
8237 + i.rm.mode = 3;
8240 + /* Fill in i.rm.reg field with extension opcode (if any). */
8241 + if (i.tm.extension_opcode != None)
8242 + i.rm.reg = i.tm.extension_opcode;
8244 + return default_seg;
8247 +static void
8248 +output_branch (void)
8250 + char *p;
8251 + int code16;
8252 + int prefix;
8253 + relax_substateT subtype;
8254 + symbolS *sym;
8255 + offsetT off;
8257 + code16 = 0;
8258 + if (flag_code == CODE_16BIT)
8259 + code16 = CODE16;
8261 + prefix = 0;
8262 + if (i.prefix[DATA_PREFIX] != 0)
8264 + prefix = 1;
8265 + i.prefixes -= 1;
8266 + code16 ^= CODE16;
8268 + /* Pentium4 branch hints. */
8269 + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */
8270 + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */)
8272 + prefix++;
8273 + i.prefixes--;
8275 + if (i.prefix[REX_PREFIX] != 0)
8277 + prefix++;
8278 + i.prefixes--;
8281 + if (i.prefixes != 0 && !intel_syntax)
8282 + as_warn (_("skipping prefixes on this instruction"));
8284 + /* It's always a symbol; End frag & setup for relax.
8285 + Make sure there is enough room in this frag for the largest
8286 + instruction we may generate in md_convert_frag. This is 2
8287 + bytes for the opcode and room for the prefix and largest
8288 + displacement. */
8289 + frag_grow (prefix + 2 + 4);
8290 + /* Prefix and 1 opcode byte go in fr_fix. */
8291 + p = frag_more (prefix + 1);
8292 + if (i.prefix[DATA_PREFIX] != 0)
8293 + *p++ = DATA_PREFIX_OPCODE;
8294 + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE
8295 + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE)
8296 + *p++ = i.prefix[SEG_PREFIX];
8297 + if (i.prefix[REX_PREFIX] != 0)
8298 + *p++ = i.prefix[REX_PREFIX];
8299 + *p = i.tm.base_opcode;
8301 + if ((unsigned char) *p == JUMP_PC_RELATIVE)
8302 + subtype = ENCODE_RELAX_STATE (UNCOND_JUMP, SMALL);
8303 + else if ((cpu_arch_flags & Cpu386) != 0)
8304 + subtype = ENCODE_RELAX_STATE (COND_JUMP, SMALL);
8305 + else
8306 + subtype = ENCODE_RELAX_STATE (COND_JUMP86, SMALL);
8307 + subtype |= code16;
8309 + sym = i.op[0].disps->X_add_symbol;
8310 + off = i.op[0].disps->X_add_number;
8312 + if (i.op[0].disps->X_op != O_constant
8313 + && i.op[0].disps->X_op != O_symbol)
8315 + /* Handle complex expressions. */
8316 + sym = make_expr_symbol (i.op[0].disps);
8317 + off = 0;
8320 + /* 1 possible extra opcode + 4 byte displacement go in var part.
8321 + Pass reloc in fr_var. */
8322 + frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p);
8325 +static void
8326 +output_jump (void)
8328 + char *p;
8329 + int size;
8330 + fixS *fixP;
8332 + if (i.tm.opcode_modifier & JumpByte)
8334 + /* This is a loop or jecxz type instruction. */
8335 + size = 1;
8336 + if (i.prefix[ADDR_PREFIX] != 0)
8338 + FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE);
8339 + i.prefixes -= 1;
8341 + /* Pentium4 branch hints. */
8342 + if (i.prefix[SEG_PREFIX] == CS_PREFIX_OPCODE /* not taken */
8343 + || i.prefix[SEG_PREFIX] == DS_PREFIX_OPCODE /* taken */)
8345 + FRAG_APPEND_1_CHAR (i.prefix[SEG_PREFIX]);
8346 + i.prefixes--;
8349 + else
8351 + int code16;
8353 + code16 = 0;
8354 + if (flag_code == CODE_16BIT)
8355 + code16 = CODE16;
8357 + if (i.prefix[DATA_PREFIX] != 0)
8359 + FRAG_APPEND_1_CHAR (DATA_PREFIX_OPCODE);
8360 + i.prefixes -= 1;
8361 + code16 ^= CODE16;
8364 + size = 4;
8365 + if (code16)
8366 + size = 2;
8369 + if (i.prefix[REX_PREFIX] != 0)
8371 + FRAG_APPEND_1_CHAR (i.prefix[REX_PREFIX]);
8372 + i.prefixes -= 1;
8375 + if (i.prefixes != 0 && !intel_syntax)
8376 + as_warn (_("skipping prefixes on this instruction"));
8378 + p = frag_more (1 + size);
8379 + *p++ = i.tm.base_opcode;
8381 + fixP = fix_new_exp (frag_now, p - frag_now->fr_literal, size,
8382 + i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0]));
8384 + /* All jumps handled here are signed, but don't use a signed limit
8385 + check for 32 and 16 bit jumps as we want to allow wrap around at
8386 + 4G and 64k respectively. */
8387 + if (size == 1)
8388 + fixP->fx_signed = 1;
8391 +static void
8392 +output_interseg_jump (void)
8394 + char *p;
8395 + int size;
8396 + int prefix;
8397 + int code16;
8399 + code16 = 0;
8400 + if (flag_code == CODE_16BIT)
8401 + code16 = CODE16;
8403 + prefix = 0;
8404 + if (i.prefix[DATA_PREFIX] != 0)
8406 + prefix = 1;
8407 + i.prefixes -= 1;
8408 + code16 ^= CODE16;
8410 + if (i.prefix[REX_PREFIX] != 0)
8412 + prefix++;
8413 + i.prefixes -= 1;
8416 + size = 4;
8417 + if (code16)
8418 + size = 2;
8420 + if (i.prefixes != 0 && !intel_syntax)
8421 + as_warn (_("skipping prefixes on this instruction"));
8423 + /* 1 opcode; 2 segment; offset */
8424 + p = frag_more (prefix + 1 + 2 + size);
8426 + if (i.prefix[DATA_PREFIX] != 0)
8427 + *p++ = DATA_PREFIX_OPCODE;
8429 + if (i.prefix[REX_PREFIX] != 0)
8430 + *p++ = i.prefix[REX_PREFIX];
8432 + *p++ = i.tm.base_opcode;
8433 + if (i.op[1].imms->X_op == O_constant)
8435 + offsetT n = i.op[1].imms->X_add_number;
8437 + if (size == 2
8438 + && !fits_in_unsigned_word (n)
8439 + && !fits_in_signed_word (n))
8441 + as_bad (_("16-bit jump out of range"));
8442 + return;
8444 + md_number_to_chars (p, n, size);
8446 + else
8447 + fix_new_exp (frag_now, p - frag_now->fr_literal, size,
8448 + i.op[1].imms, 0, reloc (size, 0, 0, i.reloc[1]));
8449 + if (i.op[0].imms->X_op != O_constant)
8450 + as_bad (_("can't handle non absolute segment in `%s'"),
8451 + i.tm.name);
8452 + md_number_to_chars (p + size, (valueT) i.op[0].imms->X_add_number, 2);
8455 +static void
8456 +insert_sandbox_code (void)
8458 + char* p;
8459 + int align_mask = (1 << nacl_alignment) - 1;
8461 + if (getenv("NACL_DEBUG_ALIGN")) {
8462 + p = frag_more (12);
8463 + p[0] = 0xF7; p[1] = 0xC0 + i.rm.regmem;
8464 + p[2] = align_mask; p[3] = p[4] = p[5] = 0x00; // TEST reg, align_mask
8465 + p[6] = 0x74; p[7] = 0x04; // JZ +4
8466 + p[8] = 0xCC; // INT3
8467 + p[9] = 0x0F; p[10] = 0x1F; p[11] = 0x00; // NOP
8469 + else {
8470 + p = frag_more (3);
8471 + p[0] = 0x83; // AND instruction.
8472 + p[1] = (0xe0 + i.rm.regmem); // mod = 11, reg = 100, rm = i.rm.regmem;
8473 + p[2] = 0xff & ~align_mask;
8478 +static int
8479 +frag_is_a_call (void)
8481 + if (i.tm.base_opcode == 0xe8) {
8482 + // direct calls
8483 + return 1;
8485 + else if (i.tm.base_opcode == 0xff) {
8486 + // possibly indirect calls
8487 + return (i.rm.mode == 3) && (i.rm.reg == 2);
8489 + else {
8490 + return 0;
8495 +static void
8496 +output_insn (void)
8498 + fragS *insn_start_frag;
8499 + offsetT insn_start_off;
8501 + // DCS -- New code for NativeClient.
8502 + // Frag_align_code sets the alignment on the current fragment and may
8503 + // create a new one. Because of this we remember the current fragment
8504 + // before calling frag_align_code.
8505 + insn_start_frag = frag_now;
8507 + if (nacl_alignment > 0) {
8508 + frag_align_code(0, 0);
8509 +#ifdef DCS
8510 + // TODO: this code seems unnecessary. Remove it.
8511 + // Really ugly stuff to avoid splitting call and its subsequent alignment
8512 + // across two fragments.
8513 + if (frag_is_a_call() &&
8514 + obstack_room(&frchain_now->frch_obstack) < (unsigned)((1<<(nacl_alignment+1))-1)) {
8515 + fragS *temp_frag = frag_now;
8516 + frag_align_code(nacl_alignment + 1, 0);
8517 + temp_frag->fr_offset = 0;
8518 + temp_frag->fr_subtype = 0;
8520 +#endif /* DCS */
8523 + /* Tie dwarf2 debug info to the address at the start of the insn.
8524 + We can't do this after the insn has been output as the current
8525 + frag may have been closed off. eg. by frag_var. */
8526 + dwarf2_emit_insn (0);
8528 + insn_start_off = frag_now_fix ();
8530 + if (nacl_alignment > 0) {
8531 + if (!strcmp(i.tm.name, "naclcall")) {
8532 + insert_sandbox_code();
8534 + else if (!strcmp(i.tm.name, "nacljmp")) {
8535 + insert_sandbox_code();
8537 + else if (!strcmp(i.tm.name, "naclret")) {
8538 + insert_sandbox_code();
8542 + /* Output jumps. */
8543 + if (i.tm.opcode_modifier & Jump)
8544 + output_branch ();
8545 + else if (i.tm.opcode_modifier & (JumpByte | JumpDword))
8546 + output_jump ();
8547 + else if (i.tm.opcode_modifier & JumpInterSegment)
8548 + output_interseg_jump ();
8549 + else
8551 + /* Output normal instructions here. */
8552 + char *p;
8553 + unsigned char *q;
8554 + unsigned int prefix;
8556 + /* All opcodes on i386 have either 1 or 2 bytes. SSSE3 and
8557 + SSE4 instructions have 3 bytes. We may use one more higher
8558 + byte to specify a prefix the instruction requires. Exclude
8559 + instructions which are in both SSE4 and ABM. */
8560 + if ((i.tm.cpu_flags & (CpuSSSE3 | CpuSSE4)) != 0
8561 + && (i.tm.cpu_flags & CpuABM) == 0)
8563 + if (i.tm.base_opcode & 0xff000000)
8565 + prefix = (i.tm.base_opcode >> 24) & 0xff;
8566 + goto check_prefix;
8569 + else if ((i.tm.base_opcode & 0xff0000) != 0)
8571 + prefix = (i.tm.base_opcode >> 16) & 0xff;
8572 + if ((i.tm.cpu_flags & CpuPadLock) != 0)
8574 + check_prefix:
8575 + if (prefix != REPE_PREFIX_OPCODE
8576 + || i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
8577 + add_prefix (prefix);
8579 + else
8580 + add_prefix (prefix);
8583 + /* The prefix bytes. */
8584 + for (q = i.prefix;
8585 + q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]);
8586 + q++)
8588 + if (*q)
8590 + p = frag_more (1);
8591 + md_number_to_chars (p, (valueT) *q, 1);
8595 + /* Now the opcode; be careful about word order here! */
8596 + if (fits_in_unsigned_byte (i.tm.base_opcode))
8598 + FRAG_APPEND_1_CHAR (i.tm.base_opcode);
8600 + else
8602 + if ((i.tm.cpu_flags & (CpuSSSE3 | CpuSSE4)) != 0
8603 + && (i.tm.cpu_flags & CpuABM) == 0)
8605 + p = frag_more (3);
8606 + *p++ = (i.tm.base_opcode >> 16) & 0xff;
8608 + else
8609 + p = frag_more (2);
8611 + /* Put out high byte first: can't use md_number_to_chars! */
8612 + *p++ = (i.tm.base_opcode >> 8) & 0xff;
8613 + *p = i.tm.base_opcode & 0xff;
8616 + /* Now the modrm byte and sib byte (if present). */
8617 + if (i.tm.opcode_modifier & Modrm)
8619 + p = frag_more (1);
8620 + md_number_to_chars (p,
8621 + (valueT) (i.rm.regmem << 0
8622 + | i.rm.reg << 3
8623 + | i.rm.mode << 6),
8624 + 1);
8625 + /* If i.rm.regmem == ESP (4)
8626 + && i.rm.mode != (Register mode)
8627 + && not 16 bit
8628 + ==> need second modrm byte. */
8629 + if (i.rm.regmem == ESCAPE_TO_TWO_BYTE_ADDRESSING
8630 + && i.rm.mode != 3
8631 + && !(i.base_reg && (i.base_reg->reg_type & Reg16) != 0))
8633 + p = frag_more (1);
8634 + md_number_to_chars (p,
8635 + (valueT) (i.sib.base << 0
8636 + | i.sib.index << 3
8637 + | i.sib.scale << 6),
8638 + 1);
8642 + if (i.disp_operands)
8643 + output_disp (frag_now, insn_start_off);
8645 + if (i.imm_operands)
8646 + output_imm (frag_now, insn_start_off);
8649 +#ifdef DEBUG386
8650 + if (flag_debug)
8652 + pi ("" /*line*/, &i);
8654 +#endif /* DEBUG386 */
8655 + /*
8656 + * We want to make sure no instruction straddles a (1 << nacl_alignment)
8657 + * boundary. We do this by setting the fragment alignment to
8658 + * (1 << nacl_alignment), but allowing no more than the size of the
8659 + * instruction as fill.
8660 + */
8661 + if (nacl_alignment > 0) {
8662 + int align_base;
8663 + int call_align;
8664 + int instrsize = (int) frag_now_fix();
8666 + /*
8667 + * "library mode" enables compatible library builds for either 16 or
8668 + * 32 byte alignment. Using the strictest alignment requirement for
8669 + * instructions makes them 0mod16 aligned. Calls need to end a 32 byte
8670 + * region.
8671 + */
8672 + if (nacl_library_mode) {
8673 + align_base = 4;
8674 + call_align = 5;
8676 + else {
8677 + align_base = nacl_alignment;
8678 + call_align = nacl_alignment;
8681 + switch (instrsize) {
8682 + case 0:
8683 + // We get zero size for jump instructions. Go to their biggest.
8684 + insn_start_frag->fr_offset = align_base;
8685 + insn_start_frag->fr_subtype = 5;
8686 + break;
8688 + case 1:
8689 + if ((i.tm.base_opcode == 0xf3) || (i.tm.base_opcode == 0xf2) ||
8690 + (i.tm.base_opcode == 0xf0)) {
8691 + // rep and lock refixes are treated as separate instructions.
8692 + // I don't know any other patch but to force an alignment to 0,
8693 + // i.e., waste as many bytes as it takes.
8694 + insn_start_frag->fr_offset = align_base;
8695 + insn_start_frag->fr_subtype = 0;
8697 + else {
8698 + // Don't align other one-byte instructions.
8699 + insn_start_frag->fr_offset = 0;
8700 + insn_start_frag->fr_subtype = 0;
8702 + break;
8704 + default:
8705 + // Don't use more than size-1 bytes to pad.
8706 + insn_start_frag->fr_offset = align_base;
8707 + insn_start_frag->fr_subtype = instrsize-1;
8708 + break;
8712 + /*
8713 + * Calls need to fall at the end of a (1 << call_align) region. We
8714 + * make sure there are no instructions after the call until the next
8715 + * alignment. During writing of the object we swap the nops before the
8716 + * instruction.
8717 + */
8718 + if (frag_is_a_call()) {
8719 + frag_now->is_call = 1;
8720 + frag_align_code(call_align,0);
8725 +/* Return the size of the displacement operand N. */
8727 +static int
8728 +disp_size (unsigned int n)
8730 + int size = 4;
8731 + if (i.types[n] & (Disp8 | Disp16 | Disp64))
8733 + size = 2;
8734 + if (i.types[n] & Disp8)
8735 + size = 1;
8736 + if (i.types[n] & Disp64)
8737 + size = 8;
8739 + return size;
8742 +/* Return the size of the immediate operand N. */
8744 +static int
8745 +imm_size (unsigned int n)
8747 + int size = 4;
8748 + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
8750 + size = 2;
8751 + if (i.types[n] & (Imm8 | Imm8S))
8752 + size = 1;
8753 + if (i.types[n] & Imm64)
8754 + size = 8;
8756 + return size;
8759 +static void
8760 +output_disp (fragS *insn_start_frag, offsetT insn_start_off)
8762 + char *p;
8763 + unsigned int n;
8765 + for (n = 0; n < i.operands; n++)
8767 + if (i.types[n] & Disp)
8769 + if (i.op[n].disps->X_op == O_constant)
8771 + int size = disp_size (n);
8772 + offsetT val;
8774 + val = offset_in_range (i.op[n].disps->X_add_number,
8775 + size);
8776 + p = frag_more (size);
8777 + md_number_to_chars (p, val, size);
8779 + else
8781 + enum bfd_reloc_code_real reloc_type;
8782 + int size = disp_size (n);
8783 + int sign = (i.types[n] & Disp32S) != 0;
8784 + int pcrel = (i.flags[n] & Operand_PCrel) != 0;
8786 + /* We can't have 8 bit displacement here. */
8787 + assert ((i.types[n] & Disp8) == 0);
8789 + /* The PC relative address is computed relative
8790 + to the instruction boundary, so in case immediate
8791 + fields follows, we need to adjust the value. */
8792 + if (pcrel && i.imm_operands)
8794 + unsigned int n1;
8795 + int sz = 0;
8797 + for (n1 = 0; n1 < i.operands; n1++)
8798 + if (i.types[n1] & Imm)
8800 + /* Only one immediate is allowed for PC
8801 + relative address. */
8802 + assert (sz == 0);
8803 + sz = imm_size (n1);
8804 + i.op[n].disps->X_add_number -= sz;
8806 + /* We should find the immediate. */
8807 + assert (sz != 0);
8810 + p = frag_more (size);
8811 + reloc_type = reloc (size, pcrel, sign, i.reloc[n]);
8812 + if (GOT_symbol
8813 + && GOT_symbol == i.op[n].disps->X_add_symbol
8814 + && (((reloc_type == BFD_RELOC_32
8815 + || reloc_type == BFD_RELOC_X86_64_32S
8816 + || (reloc_type == BFD_RELOC_64
8817 + && object_64bit))
8818 + && (i.op[n].disps->X_op == O_symbol
8819 + || (i.op[n].disps->X_op == O_add
8820 + && ((symbol_get_value_expression
8821 + (i.op[n].disps->X_op_symbol)->X_op)
8822 + == O_subtract))))
8823 + || reloc_type == BFD_RELOC_32_PCREL))
8825 + offsetT add;
8827 + if (insn_start_frag == frag_now)
8828 + add = (p - frag_now->fr_literal) - insn_start_off;
8829 + else
8831 + fragS *fr;
8833 + add = insn_start_frag->fr_fix - insn_start_off;
8834 + for (fr = insn_start_frag->fr_next;
8835 + fr && fr != frag_now; fr = fr->fr_next)
8836 + add += fr->fr_fix;
8837 + add += p - frag_now->fr_literal;
8840 + if (!object_64bit)
8842 + reloc_type = BFD_RELOC_386_GOTPC;
8843 + i.op[n].imms->X_add_number += add;
8845 + else if (reloc_type == BFD_RELOC_64)
8846 + reloc_type = BFD_RELOC_X86_64_GOTPC64;
8847 + else
8848 + /* Don't do the adjustment for x86-64, as there
8849 + the pcrel addressing is relative to the _next_
8850 + insn, and that is taken care of in other code. */
8851 + reloc_type = BFD_RELOC_X86_64_GOTPC32;
8853 + fix_new_exp (frag_now, p - frag_now->fr_literal, size,
8854 + i.op[n].disps, pcrel, reloc_type);
8860 +static void
8861 +output_imm (fragS *insn_start_frag, offsetT insn_start_off)
8863 + char *p;
8864 + unsigned int n;
8866 + for (n = 0; n < i.operands; n++)
8868 + if (i.types[n] & Imm)
8870 + if (i.op[n].imms->X_op == O_constant)
8872 + int size = imm_size (n);
8873 + offsetT val;
8875 + val = offset_in_range (i.op[n].imms->X_add_number,
8876 + size);
8877 + p = frag_more (size);
8878 + md_number_to_chars (p, val, size);
8880 + else
8882 + /* Not absolute_section.
8883 + Need a 32-bit fixup (don't support 8bit
8884 + non-absolute imms). Try to support other
8885 + sizes ... */
8886 + enum bfd_reloc_code_real reloc_type;
8887 + int size = imm_size (n);
8888 + int sign;
8890 + if ((i.types[n] & (Imm32S))
8891 + && (i.suffix == QWORD_MNEM_SUFFIX
8892 + || (!i.suffix && (i.tm.opcode_modifier & No_lSuf))))
8893 + sign = 1;
8894 + else
8895 + sign = 0;
8897 + p = frag_more (size);
8898 + reloc_type = reloc (size, 0, sign, i.reloc[n]);
8900 + /* This is tough to explain. We end up with this one if we
8901 + * have operands that look like
8902 + * "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal here is to
8903 + * obtain the absolute address of the GOT, and it is strongly
8904 + * preferable from a performance point of view to avoid using
8905 + * a runtime relocation for this. The actual sequence of
8906 + * instructions often look something like:
8908 + * call .L66
8909 + * .L66:
8910 + * popl %ebx
8911 + * addl $_GLOBAL_OFFSET_TABLE_+[.-.L66],%ebx
8913 + * The call and pop essentially return the absolute address
8914 + * of the label .L66 and store it in %ebx. The linker itself
8915 + * will ultimately change the first operand of the addl so
8916 + * that %ebx points to the GOT, but to keep things simple, the
8917 + * .o file must have this operand set so that it generates not
8918 + * the absolute address of .L66, but the absolute address of
8919 + * itself. This allows the linker itself simply treat a GOTPC
8920 + * relocation as asking for a pcrel offset to the GOT to be
8921 + * added in, and the addend of the relocation is stored in the
8922 + * operand field for the instruction itself.
8924 + * Our job here is to fix the operand so that it would add
8925 + * the correct offset so that %ebx would point to itself. The
8926 + * thing that is tricky is that .-.L66 will point to the
8927 + * beginning of the instruction, so we need to further modify
8928 + * the operand so that it will point to itself. There are
8929 + * other cases where you have something like:
8931 + * .long $_GLOBAL_OFFSET_TABLE_+[.-.L66]
8933 + * and here no correction would be required. Internally in
8934 + * the assembler we treat operands of this form as not being
8935 + * pcrel since the '.' is explicitly mentioned, and I wonder
8936 + * whether it would simplify matters to do it this way. Who
8937 + * knows. In earlier versions of the PIC patches, the
8938 + * pcrel_adjust field was used to store the correction, but
8939 + * since the expression is not pcrel, I felt it would be
8940 + * confusing to do it this way. */
8942 + if ((reloc_type == BFD_RELOC_32
8943 + || reloc_type == BFD_RELOC_X86_64_32S
8944 + || reloc_type == BFD_RELOC_64)
8945 + && GOT_symbol
8946 + && GOT_symbol == i.op[n].imms->X_add_symbol
8947 + && (i.op[n].imms->X_op == O_symbol
8948 + || (i.op[n].imms->X_op == O_add
8949 + && ((symbol_get_value_expression
8950 + (i.op[n].imms->X_op_symbol)->X_op)
8951 + == O_subtract))))
8953 + offsetT add;
8955 + if (insn_start_frag == frag_now)
8956 + add = (p - frag_now->fr_literal) - insn_start_off;
8957 + else
8959 + fragS *fr;
8961 + add = insn_start_frag->fr_fix - insn_start_off;
8962 + for (fr = insn_start_frag->fr_next;
8963 + fr && fr != frag_now; fr = fr->fr_next)
8964 + add += fr->fr_fix;
8965 + add += p - frag_now->fr_literal;
8968 + if (!object_64bit)
8969 + reloc_type = BFD_RELOC_386_GOTPC;
8970 + else if (size == 4)
8971 + reloc_type = BFD_RELOC_X86_64_GOTPC32;
8972 + else if (size == 8)
8973 + reloc_type = BFD_RELOC_X86_64_GOTPC64;
8974 + i.op[n].imms->X_add_number += add;
8976 + fix_new_exp (frag_now, p - frag_now->fr_literal, size,
8977 + i.op[n].imms, 0, reloc_type);
8983 +/* x86_cons_fix_new is called via the expression parsing code when a
8984 + reloc is needed. We use this hook to get the correct .got reloc. */
8985 +static enum bfd_reloc_code_real got_reloc = NO_RELOC;
8986 +static int cons_sign = -1;
8988 +void
8989 +x86_cons_fix_new (fragS *frag, unsigned int off, unsigned int len,
8990 + expressionS *exp)
8992 + enum bfd_reloc_code_real r = reloc (len, 0, cons_sign, got_reloc);
8994 + got_reloc = NO_RELOC;
8996 +#ifdef TE_PE
8997 + if (exp->X_op == O_secrel)
8999 + exp->X_op = O_symbol;
9000 + r = BFD_RELOC_32_SECREL;
9002 +#endif
9004 + fix_new_exp (frag, off, len, exp, 0, r);
9007 +#if (!defined (OBJ_ELF) && !defined (OBJ_MAYBE_ELF)) || defined (LEX_AT)
9008 +# define lex_got(reloc, adjust, types) NULL
9009 +#else
9010 +/* Parse operands of the form
9011 + <symbol>@GOTOFF+<nnn>
9012 + and similar .plt or .got references.
9014 + If we find one, set up the correct relocation in RELOC and copy the
9015 + input string, minus the `@GOTOFF' into a malloc'd buffer for
9016 + parsing by the calling routine. Return this buffer, and if ADJUST
9017 + is non-null set it to the length of the string we removed from the
9018 + input line. Otherwise return NULL. */
9019 +static char *
9020 +lex_got (enum bfd_reloc_code_real *reloc,
9021 + int *adjust,
9022 + unsigned int *types)
9024 + /* Some of the relocations depend on the size of what field is to
9025 + be relocated. But in our callers i386_immediate and i386_displacement
9026 + we don't yet know the operand size (this will be set by insn
9027 + matching). Hence we record the word32 relocation here,
9028 + and adjust the reloc according to the real size in reloc(). */
9029 + static const struct {
9030 + const char *str;
9031 + const enum bfd_reloc_code_real rel[2];
9032 + const unsigned int types64;
9033 + } gotrel[] = {
9034 + { "PLTOFF", { 0,
9035 + BFD_RELOC_X86_64_PLTOFF64 },
9036 + Imm64 },
9037 + { "PLT", { BFD_RELOC_386_PLT32,
9038 + BFD_RELOC_X86_64_PLT32 },
9039 + Imm32 | Imm32S | Disp32 },
9040 + { "GOTPLT", { 0,
9041 + BFD_RELOC_X86_64_GOTPLT64 },
9042 + Imm64 | Disp64 },
9043 + { "GOTOFF", { BFD_RELOC_386_GOTOFF,
9044 + BFD_RELOC_X86_64_GOTOFF64 },
9045 + Imm64 | Disp64 },
9046 + { "GOTPCREL", { 0,
9047 + BFD_RELOC_X86_64_GOTPCREL },
9048 + Imm32 | Imm32S | Disp32 },
9049 + { "TLSGD", { BFD_RELOC_386_TLS_GD,
9050 + BFD_RELOC_X86_64_TLSGD },
9051 + Imm32 | Imm32S | Disp32 },
9052 + { "TLSLDM", { BFD_RELOC_386_TLS_LDM,
9053 + 0 },
9054 + 0 },
9055 + { "TLSLD", { 0,
9056 + BFD_RELOC_X86_64_TLSLD },
9057 + Imm32 | Imm32S | Disp32 },
9058 + { "GOTTPOFF", { BFD_RELOC_386_TLS_IE_32,
9059 + BFD_RELOC_X86_64_GOTTPOFF },
9060 + Imm32 | Imm32S | Disp32 },
9061 + { "TPOFF", { BFD_RELOC_386_TLS_LE_32,
9062 + BFD_RELOC_X86_64_TPOFF32 },
9063 + Imm32 | Imm32S | Imm64 | Disp32 | Disp64 },
9064 + { "NTPOFF", { BFD_RELOC_386_TLS_LE,
9065 + 0 },
9066 + 0 },
9067 + { "DTPOFF", { BFD_RELOC_386_TLS_LDO_32,
9068 + BFD_RELOC_X86_64_DTPOFF32 },
9069 + Imm32 | Imm32S | Imm64 | Disp32 | Disp64 },
9070 + { "GOTNTPOFF",{ BFD_RELOC_386_TLS_GOTIE,
9071 + 0 },
9072 + 0 },
9073 + { "INDNTPOFF",{ BFD_RELOC_386_TLS_IE,
9074 + 0 },
9075 + 0 },
9076 + { "GOT", { BFD_RELOC_386_GOT32,
9077 + BFD_RELOC_X86_64_GOT32 },
9078 + Imm32 | Imm32S | Disp32 | Imm64 },
9079 + { "TLSDESC", { BFD_RELOC_386_TLS_GOTDESC,
9080 + BFD_RELOC_X86_64_GOTPC32_TLSDESC },
9081 + Imm32 | Imm32S | Disp32 },
9082 + { "TLSCALL", { BFD_RELOC_386_TLS_DESC_CALL,
9083 + BFD_RELOC_X86_64_TLSDESC_CALL },
9084 + Imm32 | Imm32S | Disp32 }
9085 + };
9086 + char *cp;
9087 + unsigned int j;
9089 + if (!IS_ELF)
9090 + return NULL;
9092 + for (cp = input_line_pointer; *cp != '@'; cp++)
9093 + if (is_end_of_line[(unsigned char) *cp] || *cp == ',')
9094 + return NULL;
9096 + for (j = 0; j < sizeof (gotrel) / sizeof (gotrel[0]); j++)
9098 + int len;
9100 + len = strlen (gotrel[j].str);
9101 + if (strncasecmp (cp + 1, gotrel[j].str, len) == 0)
9103 + if (gotrel[j].rel[object_64bit] != 0)
9105 + int first, second;
9106 + char *tmpbuf, *past_reloc;
9108 + *reloc = gotrel[j].rel[object_64bit];
9109 + if (adjust)
9110 + *adjust = len;
9112 + if (types)
9114 + if (flag_code != CODE_64BIT)
9115 + *types = Imm32 | Disp32;
9116 + else
9117 + *types = gotrel[j].types64;
9120 + if (GOT_symbol == NULL)
9121 + GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
9123 + /* The length of the first part of our input line. */
9124 + first = cp - input_line_pointer;
9126 + /* The second part goes from after the reloc token until
9127 + (and including) an end_of_line char or comma. */
9128 + past_reloc = cp + 1 + len;
9129 + cp = past_reloc;
9130 + while (!is_end_of_line[(unsigned char) *cp] && *cp != ',')
9131 + ++cp;
9132 + second = cp + 1 - past_reloc;
9134 + /* Allocate and copy string. The trailing NUL shouldn't
9135 + be necessary, but be safe. */
9136 + tmpbuf = xmalloc (first + second + 2);
9137 + memcpy (tmpbuf, input_line_pointer, first);
9138 + if (second != 0 && *past_reloc != ' ')
9139 + /* Replace the relocation token with ' ', so that
9140 + errors like foo@GOTOFF1 will be detected. */
9141 + tmpbuf[first++] = ' ';
9142 + memcpy (tmpbuf + first, past_reloc, second);
9143 + tmpbuf[first + second] = '\0';
9144 + return tmpbuf;
9147 + as_bad (_("@%s reloc is not supported with %d-bit output format"),
9148 + gotrel[j].str, 1 << (5 + object_64bit));
9149 + return NULL;
9153 + /* Might be a symbol version string. Don't as_bad here. */
9154 + return NULL;
9157 +void
9158 +x86_cons (expressionS *exp, int size)
9160 + if (size == 4 || (object_64bit && size == 8))
9162 + /* Handle @GOTOFF and the like in an expression. */
9163 + char *save;
9164 + char *gotfree_input_line;
9165 + int adjust;
9167 + save = input_line_pointer;
9168 + gotfree_input_line = lex_got (&got_reloc, &adjust, NULL);
9169 + if (gotfree_input_line)
9170 + input_line_pointer = gotfree_input_line;
9172 + expression (exp);
9174 + if (gotfree_input_line)
9176 + /* expression () has merrily parsed up to the end of line,
9177 + or a comma - in the wrong buffer. Transfer how far
9178 + input_line_pointer has moved to the right buffer. */
9179 + input_line_pointer = (save
9180 + + (input_line_pointer - gotfree_input_line)
9181 + + adjust);
9182 + free (gotfree_input_line);
9185 + else
9186 + expression (exp);
9188 +#endif
9190 +static void signed_cons (int size)
9192 + if (flag_code == CODE_64BIT)
9193 + cons_sign = 1;
9194 + cons (size);
9195 + cons_sign = -1;
9198 +#ifdef TE_PE
9199 +static void
9200 +pe_directive_secrel (dummy)
9201 + int dummy ATTRIBUTE_UNUSED;
9203 + expressionS exp;
9205 + do
9207 + expression (&exp);
9208 + if (exp.X_op == O_symbol)
9209 + exp.X_op = O_secrel;
9211 + emit_expr (&exp, 4);
9213 + while (*input_line_pointer++ == ',');
9215 + input_line_pointer--;
9216 + demand_empty_rest_of_line ();
9218 +#endif
9220 +static int
9221 +i386_immediate (char *imm_start)
9223 + char *save_input_line_pointer;
9224 + char *gotfree_input_line;
9225 + segT exp_seg = 0;
9226 + expressionS *exp;
9227 + unsigned int types = ~0U;
9229 + if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
9231 + as_bad (_("at most %d immediate operands are allowed"),
9232 + MAX_IMMEDIATE_OPERANDS);
9233 + return 0;
9236 + exp = &im_expressions[i.imm_operands++];
9237 + i.op[this_operand].imms = exp;
9239 + if (is_space_char (*imm_start))
9240 + ++imm_start;
9242 + save_input_line_pointer = input_line_pointer;
9243 + input_line_pointer = imm_start;
9245 + gotfree_input_line = lex_got (&i.reloc[this_operand], NULL, &types);
9246 + if (gotfree_input_line)
9247 + input_line_pointer = gotfree_input_line;
9249 + exp_seg = expression (exp);
9251 + SKIP_WHITESPACE ();
9252 + if (*input_line_pointer)
9253 + as_bad (_("junk `%s' after expression"), input_line_pointer);
9255 + input_line_pointer = save_input_line_pointer;
9256 + if (gotfree_input_line)
9257 + free (gotfree_input_line);
9259 + if (exp->X_op == O_absent || exp->X_op == O_big)
9261 + /* Missing or bad expr becomes absolute 0. */
9262 + as_bad (_("missing or invalid immediate expression `%s' taken as 0"),
9263 + imm_start);
9264 + exp->X_op = O_constant;
9265 + exp->X_add_number = 0;
9266 + exp->X_add_symbol = (symbolS *) 0;
9267 + exp->X_op_symbol = (symbolS *) 0;
9269 + else if (exp->X_op == O_constant)
9271 + /* Size it properly later. */
9272 + i.types[this_operand] |= Imm64;
9273 + /* If BFD64, sign extend val. */
9274 + if (!use_rela_relocations
9275 + && (exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0)
9276 + exp->X_add_number
9277 + = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
9279 +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
9280 + else if (OUTPUT_FLAVOR == bfd_target_aout_flavour
9281 + && exp_seg != absolute_section
9282 + && exp_seg != text_section
9283 + && exp_seg != data_section
9284 + && exp_seg != bss_section
9285 + && exp_seg != undefined_section
9286 + && !bfd_is_com_section (exp_seg))
9288 + as_bad (_("unimplemented segment %s in operand"), exp_seg->name);
9289 + return 0;
9291 +#endif
9292 + else if (!intel_syntax && exp->X_op == O_register)
9294 + as_bad (_("illegal immediate register operand %s"), imm_start);
9295 + return 0;
9297 + else
9299 + /* This is an address. The size of the address will be
9300 + determined later, depending on destination register,
9301 + suffix, or the default for the section. */
9302 + i.types[this_operand] |= Imm8 | Imm16 | Imm32 | Imm32S | Imm64;
9303 + i.types[this_operand] &= types;
9306 + return 1;
9309 +static char *
9310 +i386_scale (char *scale)
9312 + offsetT val;
9313 + char *save = input_line_pointer;
9315 + input_line_pointer = scale;
9316 + val = get_absolute_expression ();
9318 + switch (val)
9320 + case 1:
9321 + i.log2_scale_factor = 0;
9322 + break;
9323 + case 2:
9324 + i.log2_scale_factor = 1;
9325 + break;
9326 + case 4:
9327 + i.log2_scale_factor = 2;
9328 + break;
9329 + case 8:
9330 + i.log2_scale_factor = 3;
9331 + break;
9332 + default:
9334 + char sep = *input_line_pointer;
9336 + *input_line_pointer = '\0';
9337 + as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"),
9338 + scale);
9339 + *input_line_pointer = sep;
9340 + input_line_pointer = save;
9341 + return NULL;
9344 + if (i.log2_scale_factor != 0 && i.index_reg == 0)
9346 + as_warn (_("scale factor of %d without an index register"),
9347 + 1 << i.log2_scale_factor);
9348 +#if SCALE1_WHEN_NO_INDEX
9349 + i.log2_scale_factor = 0;
9350 +#endif
9352 + scale = input_line_pointer;
9353 + input_line_pointer = save;
9354 + return scale;
9357 +static int
9358 +i386_displacement (char *disp_start, char *disp_end)
9360 + expressionS *exp;
9361 + segT exp_seg = 0;
9362 + char *save_input_line_pointer;
9363 + char *gotfree_input_line;
9364 + int bigdisp, override;
9365 + unsigned int types = Disp;
9367 + if (i.disp_operands == MAX_MEMORY_OPERANDS)
9369 + as_bad (_("at most %d displacement operands are allowed"),
9370 + MAX_MEMORY_OPERANDS);
9371 + return 0;
9374 + if ((i.types[this_operand] & JumpAbsolute)
9375 + || !(current_templates->start->opcode_modifier & (Jump | JumpDword)))
9377 + bigdisp = Disp32;
9378 + override = (i.prefix[ADDR_PREFIX] != 0);
9380 + else
9382 + /* For PC-relative branches, the width of the displacement
9383 + is dependent upon data size, not address size. */
9384 + bigdisp = 0;
9385 + override = (i.prefix[DATA_PREFIX] != 0);
9387 + if (flag_code == CODE_64BIT)
9389 + if (!bigdisp)
9390 + bigdisp = ((override || i.suffix == WORD_MNEM_SUFFIX)
9391 + ? Disp16
9392 + : Disp32S | Disp32);
9393 + else if (!override)
9394 + bigdisp = Disp64 | Disp32S | Disp32;
9396 + else
9398 + if (!bigdisp)
9400 + if (!override)
9401 + override = (i.suffix == (flag_code != CODE_16BIT
9402 + ? WORD_MNEM_SUFFIX
9403 + : LONG_MNEM_SUFFIX));
9404 + bigdisp = Disp32;
9406 + if ((flag_code == CODE_16BIT) ^ override)
9407 + bigdisp = Disp16;
9409 + i.types[this_operand] |= bigdisp;
9411 + exp = &disp_expressions[i.disp_operands];
9412 + i.op[this_operand].disps = exp;
9413 + i.disp_operands++;
9414 + save_input_line_pointer = input_line_pointer;
9415 + input_line_pointer = disp_start;
9416 + END_STRING_AND_SAVE (disp_end);
9418 +#ifndef GCC_ASM_O_HACK
9419 +#define GCC_ASM_O_HACK 0
9420 +#endif
9421 +#if GCC_ASM_O_HACK
9422 + END_STRING_AND_SAVE (disp_end + 1);
9423 + if ((i.types[this_operand] & BaseIndex) != 0
9424 + && displacement_string_end[-1] == '+')
9426 + /* This hack is to avoid a warning when using the "o"
9427 + constraint within gcc asm statements.
9428 + For instance:
9430 + #define _set_tssldt_desc(n,addr,limit,type) \
9431 + __asm__ __volatile__ ( \
9432 + "movw %w2,%0\n\t" \
9433 + "movw %w1,2+%0\n\t" \
9434 + "rorl $16,%1\n\t" \
9435 + "movb %b1,4+%0\n\t" \
9436 + "movb %4,5+%0\n\t" \
9437 + "movb $0,6+%0\n\t" \
9438 + "movb %h1,7+%0\n\t" \
9439 + "rorl $16,%1" \
9440 + : "=o"(*(n)) : "q" (addr), "ri"(limit), "i"(type))
9442 + This works great except that the output assembler ends
9443 + up looking a bit weird if it turns out that there is
9444 + no offset. You end up producing code that looks like:
9446 + #APP
9447 + movw $235,(%eax)
9448 + movw %dx,2+(%eax)
9449 + rorl $16,%edx
9450 + movb %dl,4+(%eax)
9451 + movb $137,5+(%eax)
9452 + movb $0,6+(%eax)
9453 + movb %dh,7+(%eax)
9454 + rorl $16,%edx
9455 + #NO_APP
9457 + So here we provide the missing zero. */
9459 + *displacement_string_end = '0';
9461 +#endif
9462 + gotfree_input_line = lex_got (&i.reloc[this_operand], NULL, &types);
9463 + if (gotfree_input_line)
9464 + input_line_pointer = gotfree_input_line;
9466 + exp_seg = expression (exp);
9468 + SKIP_WHITESPACE ();
9469 + if (*input_line_pointer)
9470 + as_bad (_("junk `%s' after expression"), input_line_pointer);
9471 +#if GCC_ASM_O_HACK
9472 + RESTORE_END_STRING (disp_end + 1);
9473 +#endif
9474 + RESTORE_END_STRING (disp_end);
9475 + input_line_pointer = save_input_line_pointer;
9476 + if (gotfree_input_line)
9477 + free (gotfree_input_line);
9479 + /* We do this to make sure that the section symbol is in
9480 + the symbol table. We will ultimately change the relocation
9481 + to be relative to the beginning of the section. */
9482 + if (i.reloc[this_operand] == BFD_RELOC_386_GOTOFF
9483 + || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL
9484 + || i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
9486 + if (exp->X_op != O_symbol)
9488 + as_bad (_("bad expression used with @%s"),
9489 + (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL
9490 + ? "GOTPCREL"
9491 + : "GOTOFF"));
9492 + return 0;
9495 + if (S_IS_LOCAL (exp->X_add_symbol)
9496 + && S_GET_SEGMENT (exp->X_add_symbol) != undefined_section)
9497 + section_symbol (S_GET_SEGMENT (exp->X_add_symbol));
9498 + exp->X_op = O_subtract;
9499 + exp->X_op_symbol = GOT_symbol;
9500 + if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL)
9501 + i.reloc[this_operand] = BFD_RELOC_32_PCREL;
9502 + else if (i.reloc[this_operand] == BFD_RELOC_X86_64_GOTOFF64)
9503 + i.reloc[this_operand] = BFD_RELOC_64;
9504 + else
9505 + i.reloc[this_operand] = BFD_RELOC_32;
9508 + if (exp->X_op == O_absent || exp->X_op == O_big)
9510 + /* Missing or bad expr becomes absolute 0. */
9511 + as_bad (_("missing or invalid displacement expression `%s' taken as 0"),
9512 + disp_start);
9513 + exp->X_op = O_constant;
9514 + exp->X_add_number = 0;
9515 + exp->X_add_symbol = (symbolS *) 0;
9516 + exp->X_op_symbol = (symbolS *) 0;
9519 +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
9520 + if (exp->X_op != O_constant
9521 + && OUTPUT_FLAVOR == bfd_target_aout_flavour
9522 + && exp_seg != absolute_section
9523 + && exp_seg != text_section
9524 + && exp_seg != data_section
9525 + && exp_seg != bss_section
9526 + && exp_seg != undefined_section
9527 + && !bfd_is_com_section (exp_seg))
9529 + as_bad (_("unimplemented segment %s in operand"), exp_seg->name);
9530 + return 0;
9532 +#endif
9534 + if (!(i.types[this_operand] & ~Disp))
9535 + i.types[this_operand] &= types;
9537 + return 1;
9540 +/* Make sure the memory operand we've been dealt is valid.
9541 + Return 1 on success, 0 on a failure. */
9543 +static int
9544 +i386_index_check (const char *operand_string)
9546 + int ok;
9547 +#if INFER_ADDR_PREFIX
9548 + int fudged = 0;
9550 + tryprefix:
9551 +#endif
9552 + ok = 1;
9553 + if ((current_templates->start->cpu_flags & CpuSVME)
9554 + && current_templates->end[-1].operand_types[0] == AnyMem)
9556 + /* Memory operands of SVME insns are special in that they only allow
9557 + rAX as their memory address and ignore any segment override. */
9558 + unsigned RegXX;
9560 + /* SKINIT is even more restrictive: it always requires EAX. */
9561 + if (strcmp (current_templates->start->name, "skinit") == 0)
9562 + RegXX = Reg32;
9563 + else if (flag_code == CODE_64BIT)
9564 + RegXX = i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32;
9565 + else
9566 + RegXX = ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
9567 + ? Reg16
9568 + : Reg32);
9569 + if (!i.base_reg
9570 + || !(i.base_reg->reg_type & Acc)
9571 + || !(i.base_reg->reg_type & RegXX)
9572 + || i.index_reg
9573 + || (i.types[0] & Disp))
9574 + ok = 0;
9576 + else if (flag_code == CODE_64BIT)
9578 + unsigned RegXX = (i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32);
9580 + if ((i.base_reg
9581 + && ((i.base_reg->reg_type & RegXX) == 0)
9582 + && (i.base_reg->reg_type != BaseIndex
9583 + || i.index_reg))
9584 + || (i.index_reg
9585 + && ((i.index_reg->reg_type & (RegXX | BaseIndex))
9586 + != (RegXX | BaseIndex))))
9587 + ok = 0;
9589 + else
9591 + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
9593 + /* 16bit checks. */
9594 + if ((i.base_reg
9595 + && ((i.base_reg->reg_type & (Reg16 | BaseIndex | RegRex))
9596 + != (Reg16 | BaseIndex)))
9597 + || (i.index_reg
9598 + && (((i.index_reg->reg_type & (Reg16 | BaseIndex))
9599 + != (Reg16 | BaseIndex))
9600 + || !(i.base_reg
9601 + && i.base_reg->reg_num < 6
9602 + && i.index_reg->reg_num >= 6
9603 + && i.log2_scale_factor == 0))))
9604 + ok = 0;
9606 + else
9608 + /* 32bit checks. */
9609 + if ((i.base_reg
9610 + && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32)
9611 + || (i.index_reg
9612 + && ((i.index_reg->reg_type & (Reg32 | BaseIndex | RegRex))
9613 + != (Reg32 | BaseIndex))))
9614 + ok = 0;
9617 + if (!ok)
9619 +#if INFER_ADDR_PREFIX
9620 + if (i.prefix[ADDR_PREFIX] == 0)
9622 + i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE;
9623 + i.prefixes += 1;
9624 + /* Change the size of any displacement too. At most one of
9625 + Disp16 or Disp32 is set.
9626 + FIXME. There doesn't seem to be any real need for separate
9627 + Disp16 and Disp32 flags. The same goes for Imm16 and Imm32.
9628 + Removing them would probably clean up the code quite a lot. */
9629 + if (flag_code != CODE_64BIT
9630 + && (i.types[this_operand] & (Disp16 | Disp32)))
9631 + i.types[this_operand] ^= (Disp16 | Disp32);
9632 + fudged = 1;
9633 + goto tryprefix;
9635 + if (fudged)
9636 + as_bad (_("`%s' is not a valid base/index expression"),
9637 + operand_string);
9638 + else
9639 +#endif
9640 + as_bad (_("`%s' is not a valid %s bit base/index expression"),
9641 + operand_string,
9642 + flag_code_names[flag_code]);
9644 + return ok;
9647 +/* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero
9648 + on error. */
9650 +static int
9651 +i386_operand (char *operand_string)
9653 + const reg_entry *r;
9654 + char *end_op;
9655 + char *op_string = operand_string;
9657 + if (is_space_char (*op_string))
9658 + ++op_string;
9660 + /* We check for an absolute prefix (differentiating,
9661 + for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */
9662 + if (*op_string == ABSOLUTE_PREFIX)
9664 + ++op_string;
9665 + if (is_space_char (*op_string))
9666 + ++op_string;
9667 + i.types[this_operand] |= JumpAbsolute;
9670 + /* Check if operand is a register. */
9671 + if ((r = parse_register (op_string, &end_op)) != NULL)
9673 + /* Check for a segment override by searching for ':' after a
9674 + segment register. */
9675 + op_string = end_op;
9676 + if (is_space_char (*op_string))
9677 + ++op_string;
9678 + if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3)))
9680 + switch (r->reg_num)
9682 + case 0:
9683 + i.seg[i.mem_operands] = &es;
9684 + break;
9685 + case 1:
9686 + i.seg[i.mem_operands] = &cs;
9687 + break;
9688 + case 2:
9689 + i.seg[i.mem_operands] = &ss;
9690 + break;
9691 + case 3:
9692 + i.seg[i.mem_operands] = &ds;
9693 + break;
9694 + case 4:
9695 + i.seg[i.mem_operands] = &fs;
9696 + break;
9697 + case 5:
9698 + i.seg[i.mem_operands] = &gs;
9699 + break;
9702 + /* Skip the ':' and whitespace. */
9703 + ++op_string;
9704 + if (is_space_char (*op_string))
9705 + ++op_string;
9707 + if (!is_digit_char (*op_string)
9708 + && !is_identifier_char (*op_string)
9709 + && *op_string != '('
9710 + && *op_string != ABSOLUTE_PREFIX)
9712 + as_bad (_("bad memory operand `%s'"), op_string);
9713 + return 0;
9715 + /* Handle case of %es:*foo. */
9716 + if (*op_string == ABSOLUTE_PREFIX)
9718 + ++op_string;
9719 + if (is_space_char (*op_string))
9720 + ++op_string;
9721 + i.types[this_operand] |= JumpAbsolute;
9723 + goto do_memory_reference;
9725 + if (*op_string)
9727 + as_bad (_("junk `%s' after register"), op_string);
9728 + return 0;
9730 + i.types[this_operand] |= r->reg_type & ~BaseIndex;
9731 + i.op[this_operand].regs = r;
9732 + i.reg_operands++;
9734 + else if (*op_string == REGISTER_PREFIX)
9736 + as_bad (_("bad register name `%s'"), op_string);
9737 + return 0;
9739 + else if (*op_string == IMMEDIATE_PREFIX)
9741 + ++op_string;
9742 + if (i.types[this_operand] & JumpAbsolute)
9744 + as_bad (_("immediate operand illegal with absolute jump"));
9745 + return 0;
9747 + if (!i386_immediate (op_string))
9748 + return 0;
9750 + else if (is_digit_char (*op_string)
9751 + || is_identifier_char (*op_string)
9752 + || *op_string == '(')
9754 + /* This is a memory reference of some sort. */
9755 + char *base_string;
9757 + /* Start and end of displacement string expression (if found). */
9758 + char *displacement_string_start;
9759 + char *displacement_string_end;
9761 + do_memory_reference:
9762 + if ((i.mem_operands == 1
9763 + && (current_templates->start->opcode_modifier & IsString) == 0)
9764 + || i.mem_operands == 2)
9766 + as_bad (_("too many memory references for `%s'"),
9767 + current_templates->start->name);
9768 + return 0;
9771 + /* Check for base index form. We detect the base index form by
9772 + looking for an ')' at the end of the operand, searching
9773 + for the '(' matching it, and finding a REGISTER_PREFIX or ','
9774 + after the '('. */
9775 + base_string = op_string + strlen (op_string);
9777 + --base_string;
9778 + if (is_space_char (*base_string))
9779 + --base_string;
9781 + /* If we only have a displacement, set-up for it to be parsed later. */
9782 + displacement_string_start = op_string;
9783 + displacement_string_end = base_string + 1;
9785 + if (*base_string == ')')
9787 + char *temp_string;
9788 + unsigned int parens_balanced = 1;
9789 + /* We've already checked that the number of left & right ()'s are
9790 + equal, so this loop will not be infinite. */
9791 + do
9793 + base_string--;
9794 + if (*base_string == ')')
9795 + parens_balanced++;
9796 + if (*base_string == '(')
9797 + parens_balanced--;
9799 + while (parens_balanced);
9801 + temp_string = base_string;
9803 + /* Skip past '(' and whitespace. */
9804 + ++base_string;
9805 + if (is_space_char (*base_string))
9806 + ++base_string;
9808 + if (*base_string == ','
9809 + || ((i.base_reg = parse_register (base_string, &end_op))
9810 + != NULL))
9812 + displacement_string_end = temp_string;
9814 + i.types[this_operand] |= BaseIndex;
9816 + if (i.base_reg)
9818 + base_string = end_op;
9819 + if (is_space_char (*base_string))
9820 + ++base_string;
9823 + /* There may be an index reg or scale factor here. */
9824 + if (*base_string == ',')
9826 + ++base_string;
9827 + if (is_space_char (*base_string))
9828 + ++base_string;
9830 + if ((i.index_reg = parse_register (base_string, &end_op))
9831 + != NULL)
9833 + base_string = end_op;
9834 + if (is_space_char (*base_string))
9835 + ++base_string;
9836 + if (*base_string == ',')
9838 + ++base_string;
9839 + if (is_space_char (*base_string))
9840 + ++base_string;
9842 + else if (*base_string != ')')
9844 + as_bad (_("expecting `,' or `)' "
9845 + "after index register in `%s'"),
9846 + operand_string);
9847 + return 0;
9850 + else if (*base_string == REGISTER_PREFIX)
9852 + as_bad (_("bad register name `%s'"), base_string);
9853 + return 0;
9856 + /* Check for scale factor. */
9857 + if (*base_string != ')')
9859 + char *end_scale = i386_scale (base_string);
9861 + if (!end_scale)
9862 + return 0;
9864 + base_string = end_scale;
9865 + if (is_space_char (*base_string))
9866 + ++base_string;
9867 + if (*base_string != ')')
9869 + as_bad (_("expecting `)' "
9870 + "after scale factor in `%s'"),
9871 + operand_string);
9872 + return 0;
9875 + else if (!i.index_reg)
9877 + as_bad (_("expecting index register or scale factor "
9878 + "after `,'; got '%c'"),
9879 + *base_string);
9880 + return 0;
9883 + else if (*base_string != ')')
9885 + as_bad (_("expecting `,' or `)' "
9886 + "after base register in `%s'"),
9887 + operand_string);
9888 + return 0;
9891 + else if (*base_string == REGISTER_PREFIX)
9893 + as_bad (_("bad register name `%s'"), base_string);
9894 + return 0;
9898 + /* If there's an expression beginning the operand, parse it,
9899 + assuming displacement_string_start and
9900 + displacement_string_end are meaningful. */
9901 + if (displacement_string_start != displacement_string_end)
9903 + if (!i386_displacement (displacement_string_start,
9904 + displacement_string_end))
9905 + return 0;
9908 + /* Special case for (%dx) while doing input/output op. */
9909 + if (i.base_reg
9910 + && i.base_reg->reg_type == (Reg16 | InOutPortReg)
9911 + && i.index_reg == 0
9912 + && i.log2_scale_factor == 0
9913 + && i.seg[i.mem_operands] == 0
9914 + && (i.types[this_operand] & Disp) == 0)
9916 + i.types[this_operand] = InOutPortReg;
9917 + return 1;
9920 + if (i386_index_check (operand_string) == 0)
9921 + return 0;
9922 + i.mem_operands++;
9924 + else
9926 + /* It's not a memory operand; argh! */
9927 + as_bad (_("invalid char %s beginning operand %d `%s'"),
9928 + output_invalid (*op_string),
9929 + this_operand + 1,
9930 + op_string);
9931 + return 0;
9933 + return 1; /* Normal return. */
9936 +/* md_estimate_size_before_relax()
9938 + Called just before relax() for rs_machine_dependent frags. The x86
9939 + assembler uses these frags to handle variable size jump
9940 + instructions.
9942 + Any symbol that is now undefined will not become defined.
9943 + Return the correct fr_subtype in the frag.
9944 + Return the initial "guess for variable size of frag" to caller.
9945 + The guess is actually the growth beyond the fixed part. Whatever
9946 + we do to grow the fixed or variable part contributes to our
9947 + returned value. */
9949 +int
9950 +md_estimate_size_before_relax (fragP, segment)
9951 + fragS *fragP;
9952 + segT segment;
9954 + /* We've already got fragP->fr_subtype right; all we have to do is
9955 + check for un-relaxable symbols. On an ELF system, we can't relax
9956 + an externally visible symbol, because it may be overridden by a
9957 + shared library. */
9958 + if (S_GET_SEGMENT (fragP->fr_symbol) != segment
9959 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
9960 + || (IS_ELF
9961 + && (S_IS_EXTERNAL (fragP->fr_symbol)
9962 + || S_IS_WEAK (fragP->fr_symbol)))
9963 +#endif
9966 + /* Symbol is undefined in this segment, or we need to keep a
9967 + reloc so that weak symbols can be overridden. */
9968 + int size = (fragP->fr_subtype & CODE16) ? 2 : 4;
9969 + enum bfd_reloc_code_real reloc_type;
9970 + unsigned char *opcode;
9971 + int old_fr_fix;
9973 + if (fragP->fr_var != NO_RELOC)
9974 + reloc_type = fragP->fr_var;
9975 + else if (size == 2)
9976 + reloc_type = BFD_RELOC_16_PCREL;
9977 + else
9978 + reloc_type = BFD_RELOC_32_PCREL;
9980 + old_fr_fix = fragP->fr_fix;
9981 + opcode = (unsigned char *) fragP->fr_opcode;
9983 + switch (TYPE_FROM_RELAX_STATE (fragP->fr_subtype))
9985 + case UNCOND_JUMP:
9986 + /* Make jmp (0xeb) a (d)word displacement jump. */
9987 + opcode[0] = 0xe9;
9988 + fragP->fr_fix += size;
9989 + fix_new (fragP, old_fr_fix, size,
9990 + fragP->fr_symbol,
9991 + fragP->fr_offset, 1,
9992 + reloc_type);
9993 + break;
9995 + case COND_JUMP86:
9996 + if (size == 2
9997 + && (!no_cond_jump_promotion || fragP->fr_var != NO_RELOC))
9999 + /* Negate the condition, and branch past an
10000 + unconditional jump. */
10001 + opcode[0] ^= 1;
10002 + opcode[1] = 3;
10003 + /* Insert an unconditional jump. */
10004 + opcode[2] = 0xe9;
10005 + /* We added two extra opcode bytes, and have a two byte
10006 + offset. */
10007 + fragP->fr_fix += 2 + 2;
10008 + fix_new (fragP, old_fr_fix + 2, 2,
10009 + fragP->fr_symbol,
10010 + fragP->fr_offset, 1,
10011 + reloc_type);
10012 + break;
10014 + /* Fall through. */
10016 + case COND_JUMP:
10017 + if (no_cond_jump_promotion && fragP->fr_var == NO_RELOC)
10019 + fixS *fixP;
10021 + fragP->fr_fix += 1;
10022 + fixP = fix_new (fragP, old_fr_fix, 1,
10023 + fragP->fr_symbol,
10024 + fragP->fr_offset, 1,
10025 + BFD_RELOC_8_PCREL);
10026 + fixP->fx_signed = 1;
10027 + break;
10030 + /* This changes the byte-displacement jump 0x7N
10031 + to the (d)word-displacement jump 0x0f,0x8N. */
10032 + opcode[1] = opcode[0] + 0x10;
10033 + opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
10034 + /* We've added an opcode byte. */
10035 + fragP->fr_fix += 1 + size;
10036 + fix_new (fragP, old_fr_fix + 1, size,
10037 + fragP->fr_symbol,
10038 + fragP->fr_offset, 1,
10039 + reloc_type);
10040 + break;
10042 + default:
10043 + BAD_CASE (fragP->fr_subtype);
10044 + break;
10046 + frag_wane (fragP);
10047 + return fragP->fr_fix - old_fr_fix;
10050 + /* Guess size depending on current relax state. Initially the relax
10051 + state will correspond to a short jump and we return 1, because
10052 + the variable part of the frag (the branch offset) is one byte
10053 + long. However, we can relax a section more than once and in that
10054 + case we must either set fr_subtype back to the unrelaxed state,
10055 + or return the value for the appropriate branch. */
10056 + return md_relax_table[fragP->fr_subtype].rlx_length;
10059 +/* Called after relax() is finished.
10061 + In: Address of frag.
10062 + fr_type == rs_machine_dependent.
10063 + fr_subtype is what the address relaxed to.
10065 + Out: Any fixSs and constants are set up.
10066 + Caller will turn frag into a ".space 0". */
10068 +void
10069 +md_convert_frag (abfd, sec, fragP)
10070 + bfd *abfd ATTRIBUTE_UNUSED;
10071 + segT sec ATTRIBUTE_UNUSED;
10072 + fragS *fragP;
10074 + unsigned char *opcode;
10075 + unsigned char *where_to_put_displacement = NULL;
10076 + offsetT target_address;
10077 + offsetT opcode_address;
10078 + unsigned int extension = 0;
10079 + offsetT displacement_from_opcode_start;
10081 + opcode = (unsigned char *) fragP->fr_opcode;
10083 + /* Address we want to reach in file space. */
10084 + target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
10086 + /* Address opcode resides at in file space. */
10087 + opcode_address = fragP->fr_address + fragP->fr_fix;
10089 + /* Displacement from opcode start to fill into instruction. */
10090 + displacement_from_opcode_start = target_address - opcode_address;
10092 + if ((fragP->fr_subtype & BIG) == 0)
10094 + /* Don't have to change opcode. */
10095 + extension = 1; /* 1 opcode + 1 displacement */
10096 + where_to_put_displacement = &opcode[1];
10098 + else
10100 + if (no_cond_jump_promotion
10101 + && TYPE_FROM_RELAX_STATE (fragP->fr_subtype) != UNCOND_JUMP)
10102 + as_warn_where (fragP->fr_file, fragP->fr_line,
10103 + _("long jump required"));
10105 + switch (fragP->fr_subtype)
10107 + case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG):
10108 + extension = 4; /* 1 opcode + 4 displacement */
10109 + opcode[0] = 0xe9;
10110 + where_to_put_displacement = &opcode[1];
10111 + break;
10113 + case ENCODE_RELAX_STATE (UNCOND_JUMP, BIG16):
10114 + extension = 2; /* 1 opcode + 2 displacement */
10115 + opcode[0] = 0xe9;
10116 + where_to_put_displacement = &opcode[1];
10117 + break;
10119 + case ENCODE_RELAX_STATE (COND_JUMP, BIG):
10120 + case ENCODE_RELAX_STATE (COND_JUMP86, BIG):
10121 + extension = 5; /* 2 opcode + 4 displacement */
10122 + opcode[1] = opcode[0] + 0x10;
10123 + opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
10124 + where_to_put_displacement = &opcode[2];
10125 + break;
10127 + case ENCODE_RELAX_STATE (COND_JUMP, BIG16):
10128 + extension = 3; /* 2 opcode + 2 displacement */
10129 + opcode[1] = opcode[0] + 0x10;
10130 + opcode[0] = TWO_BYTE_OPCODE_ESCAPE;
10131 + where_to_put_displacement = &opcode[2];
10132 + break;
10134 + case ENCODE_RELAX_STATE (COND_JUMP86, BIG16):
10135 + extension = 4;
10136 + opcode[0] ^= 1;
10137 + opcode[1] = 3;
10138 + opcode[2] = 0xe9;
10139 + where_to_put_displacement = &opcode[3];
10140 + break;
10142 + default:
10143 + BAD_CASE (fragP->fr_subtype);
10144 + break;
10148 + /* If size if less then four we are sure that the operand fits,
10149 + but if it's 4, then it could be that the displacement is larger
10150 + then -/+ 2GB. */
10151 + if (DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype) == 4
10152 + && object_64bit
10153 + && ((addressT) (displacement_from_opcode_start - extension
10154 + + ((addressT) 1 << 31))
10155 + > (((addressT) 2 << 31) - 1)))
10157 + as_bad_where (fragP->fr_file, fragP->fr_line,
10158 + _("jump target out of range"));
10159 + /* Make us emit 0. */
10160 + displacement_from_opcode_start = extension;
10162 + /* Now put displacement after opcode. */
10163 + md_number_to_chars ((char *) where_to_put_displacement,
10164 + (valueT) (displacement_from_opcode_start - extension),
10165 + DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype));
10166 + fragP->fr_fix += extension;
10169 +/* Size of byte displacement jmp. */
10170 +int md_short_jump_size = 2;
10172 +/* Size of dword displacement jmp. */
10173 +int md_long_jump_size = 5;
10175 +void
10176 +md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
10177 + char *ptr;
10178 + addressT from_addr, to_addr;
10179 + fragS *frag ATTRIBUTE_UNUSED;
10180 + symbolS *to_symbol ATTRIBUTE_UNUSED;
10182 + offsetT offset;
10184 + offset = to_addr - (from_addr + 2);
10185 + /* Opcode for byte-disp jump. */
10186 + md_number_to_chars (ptr, (valueT) 0xeb, 1);
10187 + md_number_to_chars (ptr + 1, (valueT) offset, 1);
10190 +void
10191 +md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
10192 + char *ptr;
10193 + addressT from_addr, to_addr;
10194 + fragS *frag ATTRIBUTE_UNUSED;
10195 + symbolS *to_symbol ATTRIBUTE_UNUSED;
10197 + offsetT offset;
10199 + offset = to_addr - (from_addr + 5);
10200 + md_number_to_chars (ptr, (valueT) 0xe9, 1);
10201 + md_number_to_chars (ptr + 1, (valueT) offset, 4);
10204 +/* Apply a fixup (fixS) to segment data, once it has been determined
10205 + by our caller that we have all the info we need to fix it up.
10207 + On the 386, immediates, displacements, and data pointers are all in
10208 + the same (little-endian) format, so we don't need to care about which
10209 + we are handling. */
10211 +void
10212 +md_apply_fix (fixP, valP, seg)
10213 + /* The fix we're to put in. */
10214 + fixS *fixP;
10215 + /* Pointer to the value of the bits. */
10216 + valueT *valP;
10217 + /* Segment fix is from. */
10218 + segT seg ATTRIBUTE_UNUSED;
10220 + char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
10221 + valueT value = *valP;
10223 +#if !defined (TE_Mach)
10224 + if (fixP->fx_pcrel)
10226 + switch (fixP->fx_r_type)
10228 + default:
10229 + break;
10231 + case BFD_RELOC_64:
10232 + fixP->fx_r_type = BFD_RELOC_64_PCREL;
10233 + break;
10234 + case BFD_RELOC_32:
10235 + case BFD_RELOC_X86_64_32S:
10236 + fixP->fx_r_type = BFD_RELOC_32_PCREL;
10237 + break;
10238 + case BFD_RELOC_16:
10239 + fixP->fx_r_type = BFD_RELOC_16_PCREL;
10240 + break;
10241 + case BFD_RELOC_8:
10242 + fixP->fx_r_type = BFD_RELOC_8_PCREL;
10243 + break;
10247 + if (fixP->fx_addsy != NULL
10248 + && (fixP->fx_r_type == BFD_RELOC_32_PCREL
10249 + || fixP->fx_r_type == BFD_RELOC_64_PCREL
10250 + || fixP->fx_r_type == BFD_RELOC_16_PCREL
10251 + || fixP->fx_r_type == BFD_RELOC_8_PCREL)
10252 + && !use_rela_relocations)
10254 + /* This is a hack. There should be a better way to handle this.
10255 + This covers for the fact that bfd_install_relocation will
10256 + subtract the current location (for partial_inplace, PC relative
10257 + relocations); see more below. */
10258 +#ifndef OBJ_AOUT
10259 + if (IS_ELF
10260 +#ifdef TE_PE
10261 + || OUTPUT_FLAVOR == bfd_target_coff_flavour
10262 +#endif
10264 + value += fixP->fx_where + fixP->fx_frag->fr_address;
10265 +#endif
10266 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10267 + if (IS_ELF)
10269 + segT sym_seg = S_GET_SEGMENT (fixP->fx_addsy);
10271 + if ((sym_seg == seg
10272 + || (symbol_section_p (fixP->fx_addsy)
10273 + && sym_seg != absolute_section))
10274 + && !generic_force_reloc (fixP))
10276 + /* Yes, we add the values in twice. This is because
10277 + bfd_install_relocation subtracts them out again. I think
10278 + bfd_install_relocation is broken, but I don't dare change
10279 + it. FIXME. */
10280 + value += fixP->fx_where + fixP->fx_frag->fr_address;
10283 +#endif
10284 +#if defined (OBJ_COFF) && defined (TE_PE)
10285 + /* For some reason, the PE format does not store a
10286 + section address offset for a PC relative symbol. */
10287 + if (S_GET_SEGMENT (fixP->fx_addsy) != seg
10288 + || S_IS_WEAK (fixP->fx_addsy))
10289 + value += md_pcrel_from (fixP);
10290 +#endif
10293 + /* Fix a few things - the dynamic linker expects certain values here,
10294 + and we must not disappoint it. */
10295 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10296 + if (IS_ELF && fixP->fx_addsy)
10297 + switch (fixP->fx_r_type)
10299 + case BFD_RELOC_386_PLT32:
10300 + case BFD_RELOC_X86_64_PLT32:
10301 + /* Make the jump instruction point to the address of the operand. At
10302 + runtime we merely add the offset to the actual PLT entry. */
10303 + value = -4;
10304 + break;
10306 + case BFD_RELOC_386_TLS_GD:
10307 + case BFD_RELOC_386_TLS_LDM:
10308 + case BFD_RELOC_386_TLS_IE_32:
10309 + case BFD_RELOC_386_TLS_IE:
10310 + case BFD_RELOC_386_TLS_GOTIE:
10311 + case BFD_RELOC_386_TLS_GOTDESC:
10312 + case BFD_RELOC_X86_64_TLSGD:
10313 + case BFD_RELOC_X86_64_TLSLD:
10314 + case BFD_RELOC_X86_64_GOTTPOFF:
10315 + case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
10316 + value = 0; /* Fully resolved at runtime. No addend. */
10317 + /* Fallthrough */
10318 + case BFD_RELOC_386_TLS_LE:
10319 + case BFD_RELOC_386_TLS_LDO_32:
10320 + case BFD_RELOC_386_TLS_LE_32:
10321 + case BFD_RELOC_X86_64_DTPOFF32:
10322 + case BFD_RELOC_X86_64_DTPOFF64:
10323 + case BFD_RELOC_X86_64_TPOFF32:
10324 + case BFD_RELOC_X86_64_TPOFF64:
10325 + S_SET_THREAD_LOCAL (fixP->fx_addsy);
10326 + break;
10328 + case BFD_RELOC_386_TLS_DESC_CALL:
10329 + case BFD_RELOC_X86_64_TLSDESC_CALL:
10330 + value = 0; /* Fully resolved at runtime. No addend. */
10331 + S_SET_THREAD_LOCAL (fixP->fx_addsy);
10332 + fixP->fx_done = 0;
10333 + return;
10335 + case BFD_RELOC_386_GOT32:
10336 + case BFD_RELOC_X86_64_GOT32:
10337 + value = 0; /* Fully resolved at runtime. No addend. */
10338 + break;
10340 + case BFD_RELOC_VTABLE_INHERIT:
10341 + case BFD_RELOC_VTABLE_ENTRY:
10342 + fixP->fx_done = 0;
10343 + return;
10345 + default:
10346 + break;
10348 +#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */
10349 + *valP = value;
10350 +#endif /* !defined (TE_Mach) */
10352 + /* Are we finished with this relocation now? */
10353 + if (fixP->fx_addsy == NULL)
10354 + fixP->fx_done = 1;
10355 + else if (use_rela_relocations)
10357 + fixP->fx_no_overflow = 1;
10358 + /* Remember value for tc_gen_reloc. */
10359 + fixP->fx_addnumber = value;
10360 + value = 0;
10363 + md_number_to_chars (p, value, fixP->fx_size);
10366 +#define MAX_LITTLENUMS 6
10368 +/* Turn the string pointed to by litP into a floating point constant
10369 + of type TYPE, and emit the appropriate bytes. The number of
10370 + LITTLENUMS emitted is stored in *SIZEP. An error message is
10371 + returned, or NULL on OK. */
10373 +char *
10374 +md_atof (type, litP, sizeP)
10375 + int type;
10376 + char *litP;
10377 + int *sizeP;
10379 + int prec;
10380 + LITTLENUM_TYPE words[MAX_LITTLENUMS];
10381 + LITTLENUM_TYPE *wordP;
10382 + char *t;
10384 + switch (type)
10386 + case 'f':
10387 + case 'F':
10388 + prec = 2;
10389 + break;
10391 + case 'd':
10392 + case 'D':
10393 + prec = 4;
10394 + break;
10396 + case 'x':
10397 + case 'X':
10398 + prec = 5;
10399 + break;
10401 + default:
10402 + *sizeP = 0;
10403 + return _("Bad call to md_atof ()");
10405 + t = atof_ieee (input_line_pointer, type, words);
10406 + if (t)
10407 + input_line_pointer = t;
10409 + *sizeP = prec * sizeof (LITTLENUM_TYPE);
10410 + /* This loops outputs the LITTLENUMs in REVERSE order; in accord with
10411 + the bigendian 386. */
10412 + for (wordP = words + prec - 1; prec--;)
10414 + md_number_to_chars (litP, (valueT) (*wordP--), sizeof (LITTLENUM_TYPE));
10415 + litP += sizeof (LITTLENUM_TYPE);
10417 + return 0;
10420 +static char output_invalid_buf[sizeof (unsigned char) * 2 + 6];
10422 +static char *
10423 +output_invalid (int c)
10425 + if (ISPRINT (c))
10426 + snprintf (output_invalid_buf, sizeof (output_invalid_buf),
10427 + "'%c'", c);
10428 + else
10429 + snprintf (output_invalid_buf, sizeof (output_invalid_buf),
10430 + "(0x%x)", (unsigned char) c);
10431 + return output_invalid_buf;
10434 +/* REG_STRING starts *before* REGISTER_PREFIX. */
10436 +static const reg_entry *
10437 +parse_real_register (char *reg_string, char **end_op)
10439 + char *s = reg_string;
10440 + char *p;
10441 + char reg_name_given[MAX_REG_NAME_SIZE + 1];
10442 + const reg_entry *r;
10444 + /* Skip possible REGISTER_PREFIX and possible whitespace. */
10445 + if (*s == REGISTER_PREFIX)
10446 + ++s;
10448 + if (is_space_char (*s))
10449 + ++s;
10451 + p = reg_name_given;
10452 + while ((*p++ = register_chars[(unsigned char) *s]) != '\0')
10454 + if (p >= reg_name_given + MAX_REG_NAME_SIZE)
10455 + return (const reg_entry *) NULL;
10456 + s++;
10459 + /* For naked regs, make sure that we are not dealing with an identifier.
10460 + This prevents confusing an identifier like `eax_var' with register
10461 + `eax'. */
10462 + if (allow_naked_reg && identifier_chars[(unsigned char) *s])
10463 + return (const reg_entry *) NULL;
10465 + *end_op = s;
10467 + r = (const reg_entry *) hash_find (reg_hash, reg_name_given);
10469 + /* Handle floating point regs, allowing spaces in the (i) part. */
10470 + if (r == i386_regtab /* %st is first entry of table */)
10472 + if (is_space_char (*s))
10473 + ++s;
10474 + if (*s == '(')
10476 + ++s;
10477 + if (is_space_char (*s))
10478 + ++s;
10479 + if (*s >= '0' && *s <= '7')
10481 + int fpr = *s - '0';
10482 + ++s;
10483 + if (is_space_char (*s))
10484 + ++s;
10485 + if (*s == ')')
10487 + *end_op = s + 1;
10488 + r = hash_find (reg_hash, "st(0)");
10489 + know (r);
10490 + return r + fpr;
10493 + /* We have "%st(" then garbage. */
10494 + return (const reg_entry *) NULL;
10498 + if (r != NULL
10499 + && ((r->reg_flags & (RegRex64 | RegRex)) | (r->reg_type & Reg64)) != 0
10500 + && (r->reg_type != Control || !(cpu_arch_flags & CpuSledgehammer))
10501 + && flag_code != CODE_64BIT)
10502 + return (const reg_entry *) NULL;
10504 + return r;
10507 +/* REG_STRING starts *before* REGISTER_PREFIX. */
10509 +static const reg_entry *
10510 +parse_register (char *reg_string, char **end_op)
10512 + const reg_entry *r;
10514 + if (*reg_string == REGISTER_PREFIX || allow_naked_reg)
10515 + r = parse_real_register (reg_string, end_op);
10516 + else
10517 + r = NULL;
10518 + if (!r)
10520 + char *save = input_line_pointer;
10521 + char c;
10522 + symbolS *symbolP;
10524 + input_line_pointer = reg_string;
10525 + c = get_symbol_end ();
10526 + symbolP = symbol_find (reg_string);
10527 + if (symbolP && S_GET_SEGMENT (symbolP) == reg_section)
10529 + const expressionS *e = symbol_get_value_expression (symbolP);
10531 + know (e->X_op == O_register);
10532 + know (e->X_add_number >= 0
10533 + && (valueT) e->X_add_number < i386_regtab_size);
10534 + r = i386_regtab + e->X_add_number;
10535 + *end_op = input_line_pointer;
10537 + *input_line_pointer = c;
10538 + input_line_pointer = save;
10540 + return r;
10543 +int
10544 +i386_parse_name (char *name, expressionS *e, char *nextcharP)
10546 + const reg_entry *r;
10547 + char *end = input_line_pointer;
10549 + *end = *nextcharP;
10550 + r = parse_register (name, &input_line_pointer);
10551 + if (r && end <= input_line_pointer)
10553 + *nextcharP = *input_line_pointer;
10554 + *input_line_pointer = 0;
10555 + e->X_op = O_register;
10556 + e->X_add_number = r - i386_regtab;
10557 + return 1;
10559 + input_line_pointer = end;
10560 + *end = 0;
10561 + return 0;
10564 +void
10565 +md_operand (expressionS *e)
10567 + if (*input_line_pointer == REGISTER_PREFIX)
10569 + char *end;
10570 + const reg_entry *r = parse_real_register (input_line_pointer, &end);
10572 + if (r)
10574 + e->X_op = O_register;
10575 + e->X_add_number = r - i386_regtab;
10576 + input_line_pointer = end;
10582 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10583 +const char *md_shortopts = "kVQ:sqn";
10584 +#else
10585 +const char *md_shortopts = "qn";
10586 +#endif
10588 +#define OPTION_32 (OPTION_MD_BASE + 0)
10589 +#define OPTION_64 (OPTION_MD_BASE + 1)
10590 +#define OPTION_DIVIDE (OPTION_MD_BASE + 2)
10591 +#define OPTION_MARCH (OPTION_MD_BASE + 3)
10592 +#define OPTION_MTUNE (OPTION_MD_BASE + 4)
10593 +#define OPTION_NACL_ALIGN (OPTION_MD_BASE + 5)
10594 +#define OPTION_NACL_LIBRARY_MODE (OPTION_MD_BASE + 6)
10597 +struct option md_longopts[] =
10599 + {"32", no_argument, NULL, OPTION_32},
10600 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
10601 + {"64", no_argument, NULL, OPTION_64},
10602 +#endif
10603 + {"divide", no_argument, NULL, OPTION_DIVIDE},
10604 + {"march", required_argument, NULL, OPTION_MARCH},
10605 + {"mtune", required_argument, NULL, OPTION_MTUNE},
10606 + {"nacl-align", required_argument, NULL, OPTION_NACL_ALIGN},
10607 + {"nacl-library-mode", no_argument, NULL, OPTION_NACL_LIBRARY_MODE},
10608 + {NULL, no_argument, NULL, 0}
10610 +size_t md_longopts_size = sizeof (md_longopts);
10612 +int
10613 +md_parse_option (int c, char *arg)
10615 + unsigned int i;
10617 + switch (c)
10619 + case 'n':
10620 + optimize_align_code = 0;
10621 + break;
10623 + case 'q':
10624 + quiet_warnings = 1;
10625 + break;
10627 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10628 + /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section
10629 + should be emitted or not. FIXME: Not implemented. */
10630 + case 'Q':
10631 + break;
10633 + /* -V: SVR4 argument to print version ID. */
10634 + case 'V':
10635 + print_version_id ();
10636 + break;
10638 + /* -k: Ignore for FreeBSD compatibility. */
10639 + case 'k':
10640 + break;
10642 + case 's':
10643 + /* -s: On i386 Solaris, this tells the native assembler to use
10644 + .stab instead of .stab.excl. We always use .stab anyhow. */
10645 + break;
10646 +#endif
10647 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
10648 + case OPTION_64:
10650 + const char **list, **l;
10652 + list = bfd_target_list ();
10653 + for (l = list; *l != NULL; l++)
10654 + if (CONST_STRNEQ (*l, "elf64-x86-64")
10655 + || strcmp (*l, "coff-x86-64") == 0
10656 + || strcmp (*l, "pe-x86-64") == 0
10657 + || strcmp (*l, "pei-x86-64") == 0)
10659 + default_arch = "x86_64";
10660 + break;
10662 + if (*l == NULL)
10663 + as_fatal (_("No compiled in support for x86_64"));
10664 + free (list);
10666 + break;
10667 +#endif
10669 + case OPTION_32:
10670 + default_arch = "i386";
10671 + break;
10673 + case OPTION_DIVIDE:
10674 +#ifdef SVR4_COMMENT_CHARS
10676 + char *n, *t;
10677 + const char *s;
10679 + n = (char *) xmalloc (strlen (i386_comment_chars) + 1);
10680 + t = n;
10681 + for (s = i386_comment_chars; *s != '\0'; s++)
10682 + if (*s != '/')
10683 + *t++ = *s;
10684 + *t = '\0';
10685 + i386_comment_chars = n;
10687 +#endif
10688 + break;
10690 + case OPTION_MARCH:
10691 + if (*arg == '.')
10692 + as_fatal (_("Invalid -march= option: `%s'"), arg);
10693 + for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
10695 + if (strcmp (arg, cpu_arch [i].name) == 0)
10697 + cpu_arch_isa = cpu_arch[i].type;
10698 + cpu_arch_isa_flags = cpu_arch[i].flags;
10699 + if (!cpu_arch_tune_set)
10701 + cpu_arch_tune = cpu_arch_isa;
10702 + cpu_arch_tune_flags = cpu_arch_isa_flags;
10704 + break;
10707 + if (i >= ARRAY_SIZE (cpu_arch))
10708 + as_fatal (_("Invalid -march= option: `%s'"), arg);
10709 + break;
10711 + case OPTION_MTUNE:
10712 + if (*arg == '.')
10713 + as_fatal (_("Invalid -mtune= option: `%s'"), arg);
10714 + for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
10716 + if (strcmp (arg, cpu_arch [i].name) == 0)
10718 + cpu_arch_tune_set = 1;
10719 + cpu_arch_tune = cpu_arch [i].type;
10720 + cpu_arch_tune_flags = cpu_arch[i].flags;
10721 + break;
10724 + if (i >= ARRAY_SIZE (cpu_arch))
10725 + as_fatal (_("Invalid -mtune= option: `%s'"), arg);
10726 + break;
10728 + case OPTION_NACL_ALIGN:
10730 + nacl_alignment = atoi (optarg);
10731 + if (nacl_alignment < 0)
10732 + as_fatal (_("--nacl-align needs a non-negative argument"));
10733 + break;
10736 + case OPTION_NACL_LIBRARY_MODE:
10738 + nacl_library_mode = 1;
10739 + break;
10742 + default:
10743 + return 0;
10745 + return 1;
10748 +void
10749 +md_show_usage (stream)
10750 + FILE *stream;
10752 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10753 + fprintf (stream, _("\
10754 + -Q ignored\n\
10755 + -V print assembler version number\n\
10756 + -k ignored\n"));
10757 +#endif
10758 + fprintf (stream, _("\
10759 + -n Do not optimize code alignment\n\
10760 + -q quieten some warnings\n"));
10761 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10762 + fprintf (stream, _("\
10763 + -s ignored\n"));
10764 +#endif
10765 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
10766 + fprintf (stream, _("\
10767 + --32/--64 generate 32bit/64bit code\n"));
10768 +#endif
10769 +#ifdef SVR4_COMMENT_CHARS
10770 + fprintf (stream, _("\
10771 + --divide do not treat `/' as a comment character\n"));
10772 +#else
10773 + fprintf (stream, _("\
10774 + --divide ignored\n"));
10775 +#endif
10776 + fprintf (stream, _("\
10777 + -march=CPU/-mtune=CPU generate code/optimize for CPU, where CPU is one of:\n\
10778 + i386, i486, pentium, pentiumpro, pentium4, nocona,\n\
10779 + core, core2, k6, athlon, k8, generic32, generic64\n"));
10783 +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
10784 + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PEP))
10786 +/* Pick the target format to use. */
10788 +const char *
10789 +i386_target_format (void)
10791 + if (!strcmp (default_arch, "x86_64"))
10793 + set_code_flag (CODE_64BIT);
10794 + if (cpu_arch_isa_flags == 0)
10795 + cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386|Cpu486
10796 + |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
10797 + |CpuSSE|CpuSSE2;
10798 + if (cpu_arch_tune_flags == 0)
10799 + cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386|Cpu486
10800 + |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
10801 + |CpuSSE|CpuSSE2;
10803 + else if (!strcmp (default_arch, "i386"))
10805 + set_code_flag (CODE_32BIT);
10806 + if (cpu_arch_isa_flags == 0)
10807 + cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386;
10808 + if (cpu_arch_tune_flags == 0)
10809 + cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386;
10811 + else
10812 + as_fatal (_("Unknown architecture"));
10813 + switch (OUTPUT_FLAVOR)
10815 +#ifdef TE_PEP
10816 + case bfd_target_coff_flavour:
10817 + return flag_code == CODE_64BIT ? COFF_TARGET_FORMAT : "coff-i386";
10818 + break;
10819 +#endif
10820 +#ifdef OBJ_MAYBE_AOUT
10821 + case bfd_target_aout_flavour:
10822 + return AOUT_TARGET_FORMAT;
10823 +#endif
10824 +#ifdef OBJ_MAYBE_COFF
10825 + case bfd_target_coff_flavour:
10826 + return "coff-i386";
10827 +#endif
10828 +#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
10829 + case bfd_target_elf_flavour:
10831 + if (flag_code == CODE_64BIT)
10833 + object_64bit = 1;
10834 + use_rela_relocations = 1;
10836 + return flag_code == CODE_64BIT ? ELF_TARGET_FORMAT64 : ELF_TARGET_FORMAT;
10838 +#endif
10839 + default:
10840 + abort ();
10841 + return NULL;
10845 +#endif /* OBJ_MAYBE_ more than one */
10847 +#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
10848 +void
10849 +i386_elf_emit_arch_note (void)
10851 + if (IS_ELF && cpu_arch_name != NULL)
10853 + char *p;
10854 + asection *seg = now_seg;
10855 + subsegT subseg = now_subseg;
10856 + Elf_Internal_Note i_note;
10857 + Elf_External_Note e_note;
10858 + asection *note_secp;
10859 + int len;
10861 + /* Create the .note section. */
10862 + note_secp = subseg_new (".note", 0);
10863 + bfd_set_section_flags (stdoutput,
10864 + note_secp,
10865 + SEC_HAS_CONTENTS | SEC_READONLY);
10867 + /* Process the arch string. */
10868 + len = strlen (cpu_arch_name);
10870 + i_note.namesz = len + 1;
10871 + i_note.descsz = 0;
10872 + i_note.type = NT_ARCH;
10873 + p = frag_more (sizeof (e_note.namesz));
10874 + md_number_to_chars (p, (valueT) i_note.namesz, sizeof (e_note.namesz));
10875 + p = frag_more (sizeof (e_note.descsz));
10876 + md_number_to_chars (p, (valueT) i_note.descsz, sizeof (e_note.descsz));
10877 + p = frag_more (sizeof (e_note.type));
10878 + md_number_to_chars (p, (valueT) i_note.type, sizeof (e_note.type));
10879 + p = frag_more (len + 1);
10880 + strcpy (p, cpu_arch_name);
10882 + frag_align (2, 0, 0);
10884 + subseg_set (seg, subseg);
10887 +#endif
10889 +symbolS *
10890 +md_undefined_symbol (name)
10891 + char *name;
10893 + if (name[0] == GLOBAL_OFFSET_TABLE_NAME[0]
10894 + && name[1] == GLOBAL_OFFSET_TABLE_NAME[1]
10895 + && name[2] == GLOBAL_OFFSET_TABLE_NAME[2]
10896 + && strcmp (name, GLOBAL_OFFSET_TABLE_NAME) == 0)
10898 + if (!GOT_symbol)
10900 + if (symbol_find (name))
10901 + as_bad (_("GOT already in symbol table"));
10902 + GOT_symbol = symbol_new (name, undefined_section,
10903 + (valueT) 0, &zero_address_frag);
10904 + };
10905 + return GOT_symbol;
10907 + return 0;
10910 +/* Round up a section size to the appropriate boundary. */
10912 +valueT
10913 +md_section_align (segment, size)
10914 + segT segment ATTRIBUTE_UNUSED;
10915 + valueT size;
10917 +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
10918 + if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
10920 + /* For a.out, force the section size to be aligned. If we don't do
10921 + this, BFD will align it for us, but it will not write out the
10922 + final bytes of the section. This may be a bug in BFD, but it is
10923 + easier to fix it here since that is how the other a.out targets
10924 + work. */
10925 + int align;
10927 + align = bfd_get_section_alignment (stdoutput, segment);
10928 + size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
10930 +#endif
10932 + return size;
10935 +/* On the i386, PC-relative offsets are relative to the start of the
10936 + next instruction. That is, the address of the offset, plus its
10937 + size, since the offset is always the last part of the insn. */
10939 +long
10940 +md_pcrel_from (fixS *fixP)
10942 + return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
10945 +#ifndef I386COFF
10947 +static void
10948 +s_bss (int ignore ATTRIBUTE_UNUSED)
10950 + int temp;
10952 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
10953 + if (IS_ELF)
10954 + obj_elf_section_change_hook ();
10955 +#endif
10956 + temp = get_absolute_expression ();
10957 + subseg_set (bss_section, (subsegT) temp);
10958 + demand_empty_rest_of_line ();
10961 +#endif
10963 +void
10964 +i386_validate_fix (fixS *fixp)
10966 + if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol)
10968 + if (fixp->fx_r_type == BFD_RELOC_32_PCREL)
10970 + if (!object_64bit)
10971 + abort ();
10972 + fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
10974 + else
10976 + if (!object_64bit)
10977 + fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
10978 + else
10979 + fixp->fx_r_type = BFD_RELOC_X86_64_GOTOFF64;
10981 + fixp->fx_subsy = 0;
10985 +arelent *
10986 +tc_gen_reloc (section, fixp)
10987 + asection *section ATTRIBUTE_UNUSED;
10988 + fixS *fixp;
10990 + arelent *rel;
10991 + bfd_reloc_code_real_type code;
10993 + switch (fixp->fx_r_type)
10995 + case BFD_RELOC_X86_64_PLT32:
10996 + case BFD_RELOC_X86_64_GOT32:
10997 + case BFD_RELOC_X86_64_GOTPCREL:
10998 + case BFD_RELOC_386_PLT32:
10999 + case BFD_RELOC_386_GOT32:
11000 + case BFD_RELOC_386_GOTOFF:
11001 + case BFD_RELOC_386_GOTPC:
11002 + case BFD_RELOC_386_TLS_GD:
11003 + case BFD_RELOC_386_TLS_LDM:
11004 + case BFD_RELOC_386_TLS_LDO_32:
11005 + case BFD_RELOC_386_TLS_IE_32:
11006 + case BFD_RELOC_386_TLS_IE:
11007 + case BFD_RELOC_386_TLS_GOTIE:
11008 + case BFD_RELOC_386_TLS_LE_32:
11009 + case BFD_RELOC_386_TLS_LE:
11010 + case BFD_RELOC_386_TLS_GOTDESC:
11011 + case BFD_RELOC_386_TLS_DESC_CALL:
11012 + case BFD_RELOC_X86_64_TLSGD:
11013 + case BFD_RELOC_X86_64_TLSLD:
11014 + case BFD_RELOC_X86_64_DTPOFF32:
11015 + case BFD_RELOC_X86_64_DTPOFF64:
11016 + case BFD_RELOC_X86_64_GOTTPOFF:
11017 + case BFD_RELOC_X86_64_TPOFF32:
11018 + case BFD_RELOC_X86_64_TPOFF64:
11019 + case BFD_RELOC_X86_64_GOTOFF64:
11020 + case BFD_RELOC_X86_64_GOTPC32:
11021 + case BFD_RELOC_X86_64_GOT64:
11022 + case BFD_RELOC_X86_64_GOTPCREL64:
11023 + case BFD_RELOC_X86_64_GOTPC64:
11024 + case BFD_RELOC_X86_64_GOTPLT64:
11025 + case BFD_RELOC_X86_64_PLTOFF64:
11026 + case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
11027 + case BFD_RELOC_X86_64_TLSDESC_CALL:
11028 + case BFD_RELOC_RVA:
11029 + case BFD_RELOC_VTABLE_ENTRY:
11030 + case BFD_RELOC_VTABLE_INHERIT:
11031 +#ifdef TE_PE
11032 + case BFD_RELOC_32_SECREL:
11033 +#endif
11034 + code = fixp->fx_r_type;
11035 + break;
11036 + case BFD_RELOC_X86_64_32S:
11037 + if (!fixp->fx_pcrel)
11039 + /* Don't turn BFD_RELOC_X86_64_32S into BFD_RELOC_32. */
11040 + code = fixp->fx_r_type;
11041 + break;
11043 + default:
11044 + if (fixp->fx_pcrel)
11046 + switch (fixp->fx_size)
11048 + default:
11049 + as_bad_where (fixp->fx_file, fixp->fx_line,
11050 + _("can not do %d byte pc-relative relocation"),
11051 + fixp->fx_size);
11052 + code = BFD_RELOC_32_PCREL;
11053 + break;
11054 + case 1: code = BFD_RELOC_8_PCREL; break;
11055 + case 2: code = BFD_RELOC_16_PCREL; break;
11056 + case 4: code = BFD_RELOC_32_PCREL; break;
11057 +#ifdef BFD64
11058 + case 8: code = BFD_RELOC_64_PCREL; break;
11059 +#endif
11062 + else
11064 + switch (fixp->fx_size)
11066 + default:
11067 + as_bad_where (fixp->fx_file, fixp->fx_line,
11068 + _("can not do %d byte relocation"),
11069 + fixp->fx_size);
11070 + code = BFD_RELOC_32;
11071 + break;
11072 + case 1: code = BFD_RELOC_8; break;
11073 + case 2: code = BFD_RELOC_16; break;
11074 + case 4: code = BFD_RELOC_32; break;
11075 +#ifdef BFD64
11076 + case 8: code = BFD_RELOC_64; break;
11077 +#endif
11080 + break;
11083 + if ((code == BFD_RELOC_32
11084 + || code == BFD_RELOC_32_PCREL
11085 + || code == BFD_RELOC_X86_64_32S)
11086 + && GOT_symbol
11087 + && fixp->fx_addsy == GOT_symbol)
11089 + if (!object_64bit)
11090 + code = BFD_RELOC_386_GOTPC;
11091 + else
11092 + code = BFD_RELOC_X86_64_GOTPC32;
11094 + if ((code == BFD_RELOC_64 || code == BFD_RELOC_64_PCREL)
11095 + && GOT_symbol
11096 + && fixp->fx_addsy == GOT_symbol)
11098 + code = BFD_RELOC_X86_64_GOTPC64;
11101 + rel = (arelent *) xmalloc (sizeof (arelent));
11102 + rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
11103 + *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
11105 + rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
11107 + if (!use_rela_relocations)
11109 + /* HACK: Since i386 ELF uses Rel instead of Rela, encode the
11110 + vtable entry to be used in the relocation's section offset. */
11111 + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
11112 + rel->address = fixp->fx_offset;
11114 + rel->addend = 0;
11116 + /* Use the rela in 64bit mode. */
11117 + else
11119 + if (!fixp->fx_pcrel)
11120 + rel->addend = fixp->fx_offset;
11121 + else
11122 + switch (code)
11124 + case BFD_RELOC_X86_64_PLT32:
11125 + case BFD_RELOC_X86_64_GOT32:
11126 + case BFD_RELOC_X86_64_GOTPCREL:
11127 + case BFD_RELOC_X86_64_TLSGD:
11128 + case BFD_RELOC_X86_64_TLSLD:
11129 + case BFD_RELOC_X86_64_GOTTPOFF:
11130 + case BFD_RELOC_X86_64_GOTPC32_TLSDESC:
11131 + case BFD_RELOC_X86_64_TLSDESC_CALL:
11132 + rel->addend = fixp->fx_offset - fixp->fx_size;
11133 + break;
11134 + default:
11135 + rel->addend = (section->vma
11136 + - fixp->fx_size
11137 + + fixp->fx_addnumber
11138 + + md_pcrel_from (fixp));
11139 + break;
11143 + rel->howto = bfd_reloc_type_lookup (stdoutput, code);
11144 + if (rel->howto == NULL)
11146 + as_bad_where (fixp->fx_file, fixp->fx_line,
11147 + _("cannot represent relocation type %s"),
11148 + bfd_get_reloc_code_name (code));
11149 + /* Set howto to a garbage value so that we can keep going. */
11150 + rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
11151 + assert (rel->howto != NULL);
11154 + return rel;
11158 +/* Parse operands using Intel syntax. This implements a recursive descent
11159 + parser based on the BNF grammar published in Appendix B of the MASM 6.1
11160 + Programmer's Guide.
11162 + FIXME: We do not recognize the full operand grammar defined in the MASM
11163 + documentation. In particular, all the structure/union and
11164 + high-level macro operands are missing.
11166 + Uppercase words are terminals, lower case words are non-terminals.
11167 + Objects surrounded by double brackets '[[' ']]' are optional. Vertical
11168 + bars '|' denote choices. Most grammar productions are implemented in
11169 + functions called 'intel_<production>'.
11171 + Initial production is 'expr'.
11173 + addOp + | -
11175 + alpha [a-zA-Z]
11177 + binOp & | AND | \| | OR | ^ | XOR
11179 + byteRegister AL | AH | BL | BH | CL | CH | DL | DH
11181 + constant digits [[ radixOverride ]]
11183 + dataType BYTE | WORD | DWORD | FWORD | QWORD | TBYTE | OWORD | XMMWORD
11185 + digits decdigit
11186 + | digits decdigit
11187 + | digits hexdigit
11189 + decdigit [0-9]
11191 + e04 e04 addOp e05
11192 + | e05
11194 + e05 e05 binOp e06
11195 + | e06
11197 + e06 e06 mulOp e09
11198 + | e09
11200 + e09 OFFSET e10
11201 + | SHORT e10
11202 + | + e10
11203 + | - e10
11204 + | ~ e10
11205 + | NOT e10
11206 + | e09 PTR e10
11207 + | e09 : e10
11208 + | e10
11210 + e10 e10 [ expr ]
11211 + | e11
11213 + e11 ( expr )
11214 + | [ expr ]
11215 + | constant
11216 + | dataType
11217 + | id
11218 + | $
11219 + | register
11221 + => expr expr cmpOp e04
11222 + | e04
11224 + gpRegister AX | EAX | BX | EBX | CX | ECX | DX | EDX
11225 + | BP | EBP | SP | ESP | DI | EDI | SI | ESI
11227 + hexdigit a | b | c | d | e | f
11228 + | A | B | C | D | E | F
11230 + id alpha
11231 + | id alpha
11232 + | id decdigit
11234 + mulOp * | / | % | MOD | << | SHL | >> | SHR
11236 + quote " | '
11238 + register specialRegister
11239 + | gpRegister
11240 + | byteRegister
11242 + segmentRegister CS | DS | ES | FS | GS | SS
11244 + specialRegister CR0 | CR2 | CR3 | CR4
11245 + | DR0 | DR1 | DR2 | DR3 | DR6 | DR7
11246 + | TR3 | TR4 | TR5 | TR6 | TR7
11248 + We simplify the grammar in obvious places (e.g., register parsing is
11249 + done by calling parse_register) and eliminate immediate left recursion
11250 + to implement a recursive-descent parser.
11252 + expr e04 expr'
11254 + expr' cmpOp e04 expr'
11255 + | Empty
11257 + e04 e05 e04'
11259 + e04' addOp e05 e04'
11260 + | Empty
11262 + e05 e06 e05'
11264 + e05' binOp e06 e05'
11265 + | Empty
11267 + e06 e09 e06'
11269 + e06' mulOp e09 e06'
11270 + | Empty
11272 + e09 OFFSET e10 e09'
11273 + | SHORT e10'
11274 + | + e10'
11275 + | - e10'
11276 + | ~ e10'
11277 + | NOT e10'
11278 + | e10 e09'
11280 + e09' PTR e10 e09'
11281 + | : e10 e09'
11282 + | Empty
11284 + e10 e11 e10'
11286 + e10' [ expr ] e10'
11287 + | Empty
11289 + e11 ( expr )
11290 + | [ expr ]
11291 + | BYTE
11292 + | WORD
11293 + | DWORD
11294 + | FWORD
11295 + | QWORD
11296 + | TBYTE
11297 + | OWORD
11298 + | XMMWORD
11299 + | .
11300 + | $
11301 + | register
11302 + | id
11303 + | constant */
11305 +/* Parsing structure for the intel syntax parser. Used to implement the
11306 + semantic actions for the operand grammar. */
11307 +struct intel_parser_s
11309 + char *op_string; /* The string being parsed. */
11310 + int got_a_float; /* Whether the operand is a float. */
11311 + int op_modifier; /* Operand modifier. */
11312 + int is_mem; /* 1 if operand is memory reference. */
11313 + int in_offset; /* >=1 if parsing operand of offset. */
11314 + int in_bracket; /* >=1 if parsing operand in brackets. */
11315 + const reg_entry *reg; /* Last register reference found. */
11316 + char *disp; /* Displacement string being built. */
11317 + char *next_operand; /* Resume point when splitting operands. */
11318 + };
11320 +static struct intel_parser_s intel_parser;
11322 +/* Token structure for parsing intel syntax. */
11323 +struct intel_token
11325 + int code; /* Token code. */
11326 + const reg_entry *reg; /* Register entry for register tokens. */
11327 + char *str; /* String representation. */
11328 + };
11330 +static struct intel_token cur_token, prev_token;
11332 +/* Token codes for the intel parser. Since T_SHORT is already used
11333 + by COFF, undefine it first to prevent a warning. */
11334 +#define T_NIL -1
11335 +#define T_CONST 1
11336 +#define T_REG 2
11337 +#define T_BYTE 3
11338 +#define T_WORD 4
11339 +#define T_DWORD 5
11340 +#define T_FWORD 6
11341 +#define T_QWORD 7
11342 +#define T_TBYTE 8
11343 +#define T_XMMWORD 9
11344 +#undef T_SHORT
11345 +#define T_SHORT 10
11346 +#define T_OFFSET 11
11347 +#define T_PTR 12
11348 +#define T_ID 13
11349 +#define T_SHL 14
11350 +#define T_SHR 15
11352 +/* Prototypes for intel parser functions. */
11353 +static int intel_match_token (int);
11354 +static void intel_putback_token (void);
11355 +static void intel_get_token (void);
11356 +static int intel_expr (void);
11357 +static int intel_e04 (void);
11358 +static int intel_e05 (void);
11359 +static int intel_e06 (void);
11360 +static int intel_e09 (void);
11361 +static int intel_e10 (void);
11362 +static int intel_e11 (void);
11364 +static int
11365 +i386_intel_operand (char *operand_string, int got_a_float)
11367 + int ret;
11368 + char *p;
11370 + p = intel_parser.op_string = xstrdup (operand_string);
11371 + intel_parser.disp = (char *) xmalloc (strlen (operand_string) + 1);
11373 + for (;;)
11375 + /* Initialize token holders. */
11376 + cur_token.code = prev_token.code = T_NIL;
11377 + cur_token.reg = prev_token.reg = NULL;
11378 + cur_token.str = prev_token.str = NULL;
11380 + /* Initialize parser structure. */
11381 + intel_parser.got_a_float = got_a_float;
11382 + intel_parser.op_modifier = 0;
11383 + intel_parser.is_mem = 0;
11384 + intel_parser.in_offset = 0;
11385 + intel_parser.in_bracket = 0;
11386 + intel_parser.reg = NULL;
11387 + intel_parser.disp[0] = '\0';
11388 + intel_parser.next_operand = NULL;
11390 + /* Read the first token and start the parser. */
11391 + intel_get_token ();
11392 + ret = intel_expr ();
11394 + if (!ret)
11395 + break;
11397 + if (cur_token.code != T_NIL)
11399 + as_bad (_("invalid operand for '%s' ('%s' unexpected)"),
11400 + current_templates->start->name, cur_token.str);
11401 + ret = 0;
11403 + /* If we found a memory reference, hand it over to i386_displacement
11404 + to fill in the rest of the operand fields. */
11405 + else if (intel_parser.is_mem)
11407 + if ((i.mem_operands == 1
11408 + && (current_templates->start->opcode_modifier & IsString) == 0)
11409 + || i.mem_operands == 2)
11411 + as_bad (_("too many memory references for '%s'"),
11412 + current_templates->start->name);
11413 + ret = 0;
11415 + else
11417 + char *s = intel_parser.disp;
11418 + i.mem_operands++;
11420 + if (!quiet_warnings && intel_parser.is_mem < 0)
11421 + /* See the comments in intel_bracket_expr. */
11422 + as_warn (_("Treating `%s' as memory reference"), operand_string);
11424 + /* Add the displacement expression. */
11425 + if (*s != '\0')
11426 + ret = i386_displacement (s, s + strlen (s));
11427 + if (ret)
11429 + /* Swap base and index in 16-bit memory operands like
11430 + [si+bx]. Since i386_index_check is also used in AT&T
11431 + mode we have to do that here. */
11432 + if (i.base_reg
11433 + && i.index_reg
11434 + && (i.base_reg->reg_type & Reg16)
11435 + && (i.index_reg->reg_type & Reg16)
11436 + && i.base_reg->reg_num >= 6
11437 + && i.index_reg->reg_num < 6)
11439 + const reg_entry *base = i.index_reg;
11441 + i.index_reg = i.base_reg;
11442 + i.base_reg = base;
11444 + ret = i386_index_check (operand_string);
11449 + /* Constant and OFFSET expressions are handled by i386_immediate. */
11450 + else if ((intel_parser.op_modifier & (1 << T_OFFSET))
11451 + || intel_parser.reg == NULL)
11452 + ret = i386_immediate (intel_parser.disp);
11454 + if (intel_parser.next_operand && this_operand >= MAX_OPERANDS - 1)
11455 + ret = 0;
11456 + if (!ret || !intel_parser.next_operand)
11457 + break;
11458 + intel_parser.op_string = intel_parser.next_operand;
11459 + this_operand = i.operands++;
11462 + free (p);
11463 + free (intel_parser.disp);
11465 + return ret;
11468 +#define NUM_ADDRESS_REGS (!!i.base_reg + !!i.index_reg)
11470 +/* expr e04 expr'
11472 + expr' cmpOp e04 expr'
11473 + | Empty */
11474 +static int
11475 +intel_expr (void)
11477 + /* XXX Implement the comparison operators. */
11478 + return intel_e04 ();
11481 +/* e04 e05 e04'
11483 + e04' addOp e05 e04'
11484 + | Empty */
11485 +static int
11486 +intel_e04 (void)
11488 + int nregs = -1;
11490 + for (;;)
11492 + if (!intel_e05())
11493 + return 0;
11495 + if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
11496 + i.base_reg = i386_regtab + REGNAM_AL; /* al is invalid as base */
11498 + if (cur_token.code == '+')
11499 + nregs = -1;
11500 + else if (cur_token.code == '-')
11501 + nregs = NUM_ADDRESS_REGS;
11502 + else
11503 + return 1;
11505 + strcat (intel_parser.disp, cur_token.str);
11506 + intel_match_token (cur_token.code);
11510 +/* e05 e06 e05'
11512 + e05' binOp e06 e05'
11513 + | Empty */
11514 +static int
11515 +intel_e05 (void)
11517 + int nregs = ~NUM_ADDRESS_REGS;
11519 + for (;;)
11521 + if (!intel_e06())
11522 + return 0;
11524 + if (cur_token.code == '&'
11525 + || cur_token.code == '|'
11526 + || cur_token.code == '^')
11528 + char str[2];
11530 + str[0] = cur_token.code;
11531 + str[1] = 0;
11532 + strcat (intel_parser.disp, str);
11534 + else
11535 + break;
11537 + intel_match_token (cur_token.code);
11539 + if (nregs < 0)
11540 + nregs = ~nregs;
11542 + if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
11543 + i.base_reg = i386_regtab + REGNAM_AL + 1; /* cl is invalid as base */
11544 + return 1;
11547 +/* e06 e09 e06'
11549 + e06' mulOp e09 e06'
11550 + | Empty */
11551 +static int
11552 +intel_e06 (void)
11554 + int nregs = ~NUM_ADDRESS_REGS;
11556 + for (;;)
11558 + if (!intel_e09())
11559 + return 0;
11561 + if (cur_token.code == '*'
11562 + || cur_token.code == '/'
11563 + || cur_token.code == '%')
11565 + char str[2];
11567 + str[0] = cur_token.code;
11568 + str[1] = 0;
11569 + strcat (intel_parser.disp, str);
11571 + else if (cur_token.code == T_SHL)
11572 + strcat (intel_parser.disp, "<<");
11573 + else if (cur_token.code == T_SHR)
11574 + strcat (intel_parser.disp, ">>");
11575 + else
11576 + break;
11578 + intel_match_token (cur_token.code);
11580 + if (nregs < 0)
11581 + nregs = ~nregs;
11583 + if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
11584 + i.base_reg = i386_regtab + REGNAM_AL + 2; /* dl is invalid as base */
11585 + return 1;
11588 +/* e09 OFFSET e09
11589 + | SHORT e09
11590 + | + e09
11591 + | - e09
11592 + | ~ e09
11593 + | NOT e09
11594 + | e10 e09'
11596 + e09' PTR e10 e09'
11597 + | : e10 e09'
11598 + | Empty */
11599 +static int
11600 +intel_e09 (void)
11602 + int nregs = ~NUM_ADDRESS_REGS;
11603 + int in_offset = 0;
11605 + for (;;)
11607 + /* Don't consume constants here. */
11608 + if (cur_token.code == '+' || cur_token.code == '-')
11610 + /* Need to look one token ahead - if the next token
11611 + is a constant, the current token is its sign. */
11612 + int next_code;
11614 + intel_match_token (cur_token.code);
11615 + next_code = cur_token.code;
11616 + intel_putback_token ();
11617 + if (next_code == T_CONST)
11618 + break;
11621 + /* e09 OFFSET e09 */
11622 + if (cur_token.code == T_OFFSET)
11624 + if (!in_offset++)
11625 + ++intel_parser.in_offset;
11628 + /* e09 SHORT e09 */
11629 + else if (cur_token.code == T_SHORT)
11630 + intel_parser.op_modifier |= 1 << T_SHORT;
11632 + /* e09 + e09 */
11633 + else if (cur_token.code == '+')
11634 + strcat (intel_parser.disp, "+");
11636 + /* e09 - e09
11637 + | ~ e09
11638 + | NOT e09 */
11639 + else if (cur_token.code == '-' || cur_token.code == '~')
11641 + char str[2];
11643 + if (nregs < 0)
11644 + nregs = ~nregs;
11645 + str[0] = cur_token.code;
11646 + str[1] = 0;
11647 + strcat (intel_parser.disp, str);
11650 + /* e09 e10 e09' */
11651 + else
11652 + break;
11654 + intel_match_token (cur_token.code);
11657 + for (;;)
11659 + if (!intel_e10 ())
11660 + return 0;
11662 + /* e09' PTR e10 e09' */
11663 + if (cur_token.code == T_PTR)
11665 + char suffix;
11667 + if (prev_token.code == T_BYTE)
11668 + suffix = BYTE_MNEM_SUFFIX;
11670 + else if (prev_token.code == T_WORD)
11672 + if (current_templates->start->name[0] == 'l'
11673 + && current_templates->start->name[2] == 's'
11674 + && current_templates->start->name[3] == 0)
11675 + suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
11676 + else if (intel_parser.got_a_float == 2) /* "fi..." */
11677 + suffix = SHORT_MNEM_SUFFIX;
11678 + else
11679 + suffix = WORD_MNEM_SUFFIX;
11682 + else if (prev_token.code == T_DWORD)
11684 + if (current_templates->start->name[0] == 'l'
11685 + && current_templates->start->name[2] == 's'
11686 + && current_templates->start->name[3] == 0)
11687 + suffix = WORD_MNEM_SUFFIX;
11688 + else if (flag_code == CODE_16BIT
11689 + && (current_templates->start->opcode_modifier
11690 + & (Jump | JumpDword)))
11691 + suffix = LONG_DOUBLE_MNEM_SUFFIX;
11692 + else if (intel_parser.got_a_float == 1) /* "f..." */
11693 + suffix = SHORT_MNEM_SUFFIX;
11694 + else
11695 + suffix = LONG_MNEM_SUFFIX;
11698 + else if (prev_token.code == T_FWORD)
11700 + if (current_templates->start->name[0] == 'l'
11701 + && current_templates->start->name[2] == 's'
11702 + && current_templates->start->name[3] == 0)
11703 + suffix = LONG_MNEM_SUFFIX;
11704 + else if (!intel_parser.got_a_float)
11706 + if (flag_code == CODE_16BIT)
11707 + add_prefix (DATA_PREFIX_OPCODE);
11708 + suffix = LONG_DOUBLE_MNEM_SUFFIX;
11710 + else
11711 + suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
11714 + else if (prev_token.code == T_QWORD)
11716 + if (intel_parser.got_a_float == 1) /* "f..." */
11717 + suffix = LONG_MNEM_SUFFIX;
11718 + else
11719 + suffix = QWORD_MNEM_SUFFIX;
11722 + else if (prev_token.code == T_TBYTE)
11724 + if (intel_parser.got_a_float == 1)
11725 + suffix = LONG_DOUBLE_MNEM_SUFFIX;
11726 + else
11727 + suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
11730 + else if (prev_token.code == T_XMMWORD)
11732 + /* XXX ignored for now, but accepted since gcc uses it */
11733 + suffix = 0;
11736 + else
11738 + as_bad (_("Unknown operand modifier `%s'"), prev_token.str);
11739 + return 0;
11742 + /* Operands for jump/call using 'ptr' notation denote absolute
11743 + addresses. */
11744 + if (current_templates->start->opcode_modifier & (Jump | JumpDword))
11745 + i.types[this_operand] |= JumpAbsolute;
11747 + if (current_templates->start->base_opcode == 0x8d /* lea */)
11749 + else if (!i.suffix)
11750 + i.suffix = suffix;
11751 + else if (i.suffix != suffix)
11753 + as_bad (_("Conflicting operand modifiers"));
11754 + return 0;
11759 + /* e09' : e10 e09' */
11760 + else if (cur_token.code == ':')
11762 + if (prev_token.code != T_REG)
11764 + /* While {call,jmp} SSSS:OOOO is MASM syntax only when SSSS is a
11765 + segment/group identifier (which we don't have), using comma
11766 + as the operand separator there is even less consistent, since
11767 + there all branches only have a single operand. */
11768 + if (this_operand != 0
11769 + || intel_parser.in_offset
11770 + || intel_parser.in_bracket
11771 + || (!(current_templates->start->opcode_modifier
11772 + & (Jump|JumpDword|JumpInterSegment))
11773 + && !(current_templates->start->operand_types[0]
11774 + & JumpAbsolute)))
11775 + return intel_match_token (T_NIL);
11776 + /* Remember the start of the 2nd operand and terminate 1st
11777 + operand here.
11778 + XXX This isn't right, yet (when SSSS:OOOO is right operand of
11779 + another expression), but it gets at least the simplest case
11780 + (a plain number or symbol on the left side) right. */
11781 + intel_parser.next_operand = intel_parser.op_string;
11782 + *--intel_parser.op_string = '\0';
11783 + return intel_match_token (':');
11787 + /* e09' Empty */
11788 + else
11789 + break;
11791 + intel_match_token (cur_token.code);
11795 + if (in_offset)
11797 + --intel_parser.in_offset;
11798 + if (nregs < 0)
11799 + nregs = ~nregs;
11800 + if (NUM_ADDRESS_REGS > nregs)
11802 + as_bad (_("Invalid operand to `OFFSET'"));
11803 + return 0;
11805 + intel_parser.op_modifier |= 1 << T_OFFSET;
11808 + if (nregs >= 0 && NUM_ADDRESS_REGS > nregs)
11809 + i.base_reg = i386_regtab + REGNAM_AL + 3; /* bl is invalid as base */
11810 + return 1;
11813 +static int
11814 +intel_bracket_expr (void)
11816 + int was_offset = intel_parser.op_modifier & (1 << T_OFFSET);
11817 + const char *start = intel_parser.op_string;
11818 + int len;
11820 + if (i.op[this_operand].regs)
11821 + return intel_match_token (T_NIL);
11823 + intel_match_token ('[');
11825 + /* Mark as a memory operand only if it's not already known to be an
11826 + offset expression. If it's an offset expression, we need to keep
11827 + the brace in. */
11828 + if (!intel_parser.in_offset)
11830 + ++intel_parser.in_bracket;
11832 + /* Operands for jump/call inside brackets denote absolute addresses. */
11833 + if (current_templates->start->opcode_modifier & (Jump | JumpDword))
11834 + i.types[this_operand] |= JumpAbsolute;
11836 + /* Unfortunately gas always diverged from MASM in a respect that can't
11837 + be easily fixed without risking to break code sequences likely to be
11838 + encountered (the testsuite even check for this): MASM doesn't consider
11839 + an expression inside brackets unconditionally as a memory reference.
11840 + When that is e.g. a constant, an offset expression, or the sum of the
11841 + two, this is still taken as a constant load. gas, however, always
11842 + treated these as memory references. As a compromise, we'll try to make
11843 + offset expressions inside brackets work the MASM way (since that's
11844 + less likely to be found in real world code), but make constants alone
11845 + continue to work the traditional gas way. In either case, issue a
11846 + warning. */
11847 + intel_parser.op_modifier &= ~was_offset;
11849 + else
11850 + strcat (intel_parser.disp, "[");
11852 + /* Add a '+' to the displacement string if necessary. */
11853 + if (*intel_parser.disp != '\0'
11854 + && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+')
11855 + strcat (intel_parser.disp, "+");
11857 + if (intel_expr ()
11858 + && (len = intel_parser.op_string - start - 1,
11859 + intel_match_token (']')))
11861 + /* Preserve brackets when the operand is an offset expression. */
11862 + if (intel_parser.in_offset)
11863 + strcat (intel_parser.disp, "]");
11864 + else
11866 + --intel_parser.in_bracket;
11867 + if (i.base_reg || i.index_reg)
11868 + intel_parser.is_mem = 1;
11869 + if (!intel_parser.is_mem)
11871 + if (!(intel_parser.op_modifier & (1 << T_OFFSET)))
11872 + /* Defer the warning until all of the operand was parsed. */
11873 + intel_parser.is_mem = -1;
11874 + else if (!quiet_warnings)
11875 + as_warn (_("`[%.*s]' taken to mean just `%.*s'"),
11876 + len, start, len, start);
11879 + intel_parser.op_modifier |= was_offset;
11881 + return 1;
11883 + return 0;
11886 +/* e10 e11 e10'
11888 + e10' [ expr ] e10'
11889 + | Empty */
11890 +static int
11891 +intel_e10 (void)
11893 + if (!intel_e11 ())
11894 + return 0;
11896 + while (cur_token.code == '[')
11898 + if (!intel_bracket_expr ())
11899 + return 0;
11902 + return 1;
11905 +/* e11 ( expr )
11906 + | [ expr ]
11907 + | BYTE
11908 + | WORD
11909 + | DWORD
11910 + | FWORD
11911 + | QWORD
11912 + | TBYTE
11913 + | OWORD
11914 + | XMMWORD
11915 + | $
11916 + | .
11917 + | register
11918 + | id
11919 + | constant */
11920 +static int
11921 +intel_e11 (void)
11923 + switch (cur_token.code)
11925 + /* e11 ( expr ) */
11926 + case '(':
11927 + intel_match_token ('(');
11928 + strcat (intel_parser.disp, "(");
11930 + if (intel_expr () && intel_match_token (')'))
11932 + strcat (intel_parser.disp, ")");
11933 + return 1;
11935 + return 0;
11937 + /* e11 [ expr ] */
11938 + case '[':
11939 + return intel_bracket_expr ();
11941 + /* e11 $
11942 + | . */
11943 + case '.':
11944 + strcat (intel_parser.disp, cur_token.str);
11945 + intel_match_token (cur_token.code);
11947 + /* Mark as a memory operand only if it's not already known to be an
11948 + offset expression. */
11949 + if (!intel_parser.in_offset)
11950 + intel_parser.is_mem = 1;
11952 + return 1;
11954 + /* e11 register */
11955 + case T_REG:
11957 + const reg_entry *reg = intel_parser.reg = cur_token.reg;
11959 + intel_match_token (T_REG);
11961 + /* Check for segment change. */
11962 + if (cur_token.code == ':')
11964 + if (!(reg->reg_type & (SReg2 | SReg3)))
11966 + as_bad (_("`%s' is not a valid segment register"),
11967 + reg->reg_name);
11968 + return 0;
11970 + else if (i.seg[i.mem_operands])
11971 + as_warn (_("Extra segment override ignored"));
11972 + else
11974 + if (!intel_parser.in_offset)
11975 + intel_parser.is_mem = 1;
11976 + switch (reg->reg_num)
11978 + case 0:
11979 + i.seg[i.mem_operands] = &es;
11980 + break;
11981 + case 1:
11982 + i.seg[i.mem_operands] = &cs;
11983 + break;
11984 + case 2:
11985 + i.seg[i.mem_operands] = &ss;
11986 + break;
11987 + case 3:
11988 + i.seg[i.mem_operands] = &ds;
11989 + break;
11990 + case 4:
11991 + i.seg[i.mem_operands] = &fs;
11992 + break;
11993 + case 5:
11994 + i.seg[i.mem_operands] = &gs;
11995 + break;
12000 + /* Not a segment register. Check for register scaling. */
12001 + else if (cur_token.code == '*')
12003 + if (!intel_parser.in_bracket)
12005 + as_bad (_("Register scaling only allowed in memory operands"));
12006 + return 0;
12009 + if (reg->reg_type & Reg16) /* Disallow things like [si*1]. */
12010 + reg = i386_regtab + REGNAM_AX + 4; /* sp is invalid as index */
12011 + else if (i.index_reg)
12012 + reg = i386_regtab + REGNAM_EAX + 4; /* esp is invalid as index */
12014 + /* What follows must be a valid scale. */
12015 + intel_match_token ('*');
12016 + i.index_reg = reg;
12017 + i.types[this_operand] |= BaseIndex;
12019 + /* Set the scale after setting the register (otherwise,
12020 + i386_scale will complain) */
12021 + if (cur_token.code == '+' || cur_token.code == '-')
12023 + char *str, sign = cur_token.code;
12024 + intel_match_token (cur_token.code);
12025 + if (cur_token.code != T_CONST)
12027 + as_bad (_("Syntax error: Expecting a constant, got `%s'"),
12028 + cur_token.str);
12029 + return 0;
12031 + str = (char *) xmalloc (strlen (cur_token.str) + 2);
12032 + strcpy (str + 1, cur_token.str);
12033 + *str = sign;
12034 + if (!i386_scale (str))
12035 + return 0;
12036 + free (str);
12038 + else if (!i386_scale (cur_token.str))
12039 + return 0;
12040 + intel_match_token (cur_token.code);
12043 + /* No scaling. If this is a memory operand, the register is either a
12044 + base register (first occurrence) or an index register (second
12045 + occurrence). */
12046 + else if (intel_parser.in_bracket)
12049 + if (!i.base_reg)
12050 + i.base_reg = reg;
12051 + else if (!i.index_reg)
12052 + i.index_reg = reg;
12053 + else
12055 + as_bad (_("Too many register references in memory operand"));
12056 + return 0;
12059 + i.types[this_operand] |= BaseIndex;
12062 + /* It's neither base nor index. */
12063 + else if (!intel_parser.in_offset && !intel_parser.is_mem)
12065 + i.types[this_operand] |= reg->reg_type & ~BaseIndex;
12066 + i.op[this_operand].regs = reg;
12067 + i.reg_operands++;
12069 + else
12071 + as_bad (_("Invalid use of register"));
12072 + return 0;
12075 + /* Since registers are not part of the displacement string (except
12076 + when we're parsing offset operands), we may need to remove any
12077 + preceding '+' from the displacement string. */
12078 + if (*intel_parser.disp != '\0'
12079 + && !intel_parser.in_offset)
12081 + char *s = intel_parser.disp;
12082 + s += strlen (s) - 1;
12083 + if (*s == '+')
12084 + *s = '\0';
12087 + return 1;
12090 + /* e11 BYTE
12091 + | WORD
12092 + | DWORD
12093 + | FWORD
12094 + | QWORD
12095 + | TBYTE
12096 + | OWORD
12097 + | XMMWORD */
12098 + case T_BYTE:
12099 + case T_WORD:
12100 + case T_DWORD:
12101 + case T_FWORD:
12102 + case T_QWORD:
12103 + case T_TBYTE:
12104 + case T_XMMWORD:
12105 + intel_match_token (cur_token.code);
12107 + if (cur_token.code == T_PTR)
12108 + return 1;
12110 + /* It must have been an identifier. */
12111 + intel_putback_token ();
12112 + cur_token.code = T_ID;
12113 + /* FALLTHRU */
12115 + /* e11 id
12116 + | constant */
12117 + case T_ID:
12118 + if (!intel_parser.in_offset && intel_parser.is_mem <= 0)
12120 + symbolS *symbolP;
12122 + /* The identifier represents a memory reference only if it's not
12123 + preceded by an offset modifier and if it's not an equate. */
12124 + symbolP = symbol_find(cur_token.str);
12125 + if (!symbolP || S_GET_SEGMENT(symbolP) != absolute_section)
12126 + intel_parser.is_mem = 1;
12128 + /* FALLTHRU */
12130 + case T_CONST:
12131 + case '-':
12132 + case '+':
12134 + char *save_str, sign = 0;
12136 + /* Allow constants that start with `+' or `-'. */
12137 + if (cur_token.code == '-' || cur_token.code == '+')
12139 + sign = cur_token.code;
12140 + intel_match_token (cur_token.code);
12141 + if (cur_token.code != T_CONST)
12143 + as_bad (_("Syntax error: Expecting a constant, got `%s'"),
12144 + cur_token.str);
12145 + return 0;
12149 + save_str = (char *) xmalloc (strlen (cur_token.str) + 2);
12150 + strcpy (save_str + !!sign, cur_token.str);
12151 + if (sign)
12152 + *save_str = sign;
12154 + /* Get the next token to check for register scaling. */
12155 + intel_match_token (cur_token.code);
12157 + /* Check if this constant is a scaling factor for an
12158 + index register. */
12159 + if (cur_token.code == '*')
12161 + if (intel_match_token ('*') && cur_token.code == T_REG)
12163 + const reg_entry *reg = cur_token.reg;
12165 + if (!intel_parser.in_bracket)
12167 + as_bad (_("Register scaling only allowed "
12168 + "in memory operands"));
12169 + return 0;
12172 + /* Disallow things like [1*si].
12173 + sp and esp are invalid as index. */
12174 + if (reg->reg_type & Reg16)
12175 + reg = i386_regtab + REGNAM_AX + 4;
12176 + else if (i.index_reg)
12177 + reg = i386_regtab + REGNAM_EAX + 4;
12179 + /* The constant is followed by `* reg', so it must be
12180 + a valid scale. */
12181 + i.index_reg = reg;
12182 + i.types[this_operand] |= BaseIndex;
12184 + /* Set the scale after setting the register (otherwise,
12185 + i386_scale will complain) */
12186 + if (!i386_scale (save_str))
12187 + return 0;
12188 + intel_match_token (T_REG);
12190 + /* Since registers are not part of the displacement
12191 + string, we may need to remove any preceding '+' from
12192 + the displacement string. */
12193 + if (*intel_parser.disp != '\0')
12195 + char *s = intel_parser.disp;
12196 + s += strlen (s) - 1;
12197 + if (*s == '+')
12198 + *s = '\0';
12201 + free (save_str);
12203 + return 1;
12206 + /* The constant was not used for register scaling. Since we have
12207 + already consumed the token following `*' we now need to put it
12208 + back in the stream. */
12209 + intel_putback_token ();
12212 + /* Add the constant to the displacement string. */
12213 + strcat (intel_parser.disp, save_str);
12214 + free (save_str);
12216 + return 1;
12220 + as_bad (_("Unrecognized token '%s'"), cur_token.str);
12221 + return 0;
12224 +/* Match the given token against cur_token. If they match, read the next
12225 + token from the operand string. */
12226 +static int
12227 +intel_match_token (int code)
12229 + if (cur_token.code == code)
12231 + intel_get_token ();
12232 + return 1;
12234 + else
12236 + as_bad (_("Unexpected token `%s'"), cur_token.str);
12237 + return 0;
12241 +/* Read a new token from intel_parser.op_string and store it in cur_token. */
12242 +static void
12243 +intel_get_token (void)
12245 + char *end_op;
12246 + const reg_entry *reg;
12247 + struct intel_token new_token;
12249 + new_token.code = T_NIL;
12250 + new_token.reg = NULL;
12251 + new_token.str = NULL;
12253 + /* Free the memory allocated to the previous token and move
12254 + cur_token to prev_token. */
12255 + if (prev_token.str)
12256 + free (prev_token.str);
12258 + prev_token = cur_token;
12260 + /* Skip whitespace. */
12261 + while (is_space_char (*intel_parser.op_string))
12262 + intel_parser.op_string++;
12264 + /* Return an empty token if we find nothing else on the line. */
12265 + if (*intel_parser.op_string == '\0')
12267 + cur_token = new_token;
12268 + return;
12271 + /* The new token cannot be larger than the remainder of the operand
12272 + string. */
12273 + new_token.str = (char *) xmalloc (strlen (intel_parser.op_string) + 1);
12274 + new_token.str[0] = '\0';
12276 + if (strchr ("0123456789", *intel_parser.op_string))
12278 + char *p = new_token.str;
12279 + char *q = intel_parser.op_string;
12280 + new_token.code = T_CONST;
12282 + /* Allow any kind of identifier char to encompass floating point and
12283 + hexadecimal numbers. */
12284 + while (is_identifier_char (*q))
12285 + *p++ = *q++;
12286 + *p = '\0';
12288 + /* Recognize special symbol names [0-9][bf]. */
12289 + if (strlen (intel_parser.op_string) == 2
12290 + && (intel_parser.op_string[1] == 'b'
12291 + || intel_parser.op_string[1] == 'f'))
12292 + new_token.code = T_ID;
12295 + else if ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL)
12297 + size_t len = end_op - intel_parser.op_string;
12299 + new_token.code = T_REG;
12300 + new_token.reg = reg;
12302 + memcpy (new_token.str, intel_parser.op_string, len);
12303 + new_token.str[len] = '\0';
12306 + else if (is_identifier_char (*intel_parser.op_string))
12308 + char *p = new_token.str;
12309 + char *q = intel_parser.op_string;
12311 + /* A '.' or '$' followed by an identifier char is an identifier.
12312 + Otherwise, it's operator '.' followed by an expression. */
12313 + if ((*q == '.' || *q == '$') && !is_identifier_char (*(q + 1)))
12315 + new_token.code = '.';
12316 + new_token.str[0] = '.';
12317 + new_token.str[1] = '\0';
12319 + else
12321 + while (is_identifier_char (*q) || *q == '@')
12322 + *p++ = *q++;
12323 + *p = '\0';
12325 + if (strcasecmp (new_token.str, "NOT") == 0)
12326 + new_token.code = '~';
12328 + else if (strcasecmp (new_token.str, "MOD") == 0)
12329 + new_token.code = '%';
12331 + else if (strcasecmp (new_token.str, "AND") == 0)
12332 + new_token.code = '&';
12334 + else if (strcasecmp (new_token.str, "OR") == 0)
12335 + new_token.code = '|';
12337 + else if (strcasecmp (new_token.str, "XOR") == 0)
12338 + new_token.code = '^';
12340 + else if (strcasecmp (new_token.str, "SHL") == 0)
12341 + new_token.code = T_SHL;
12343 + else if (strcasecmp (new_token.str, "SHR") == 0)
12344 + new_token.code = T_SHR;
12346 + else if (strcasecmp (new_token.str, "BYTE") == 0)
12347 + new_token.code = T_BYTE;
12349 + else if (strcasecmp (new_token.str, "WORD") == 0)
12350 + new_token.code = T_WORD;
12352 + else if (strcasecmp (new_token.str, "DWORD") == 0)
12353 + new_token.code = T_DWORD;
12355 + else if (strcasecmp (new_token.str, "FWORD") == 0)
12356 + new_token.code = T_FWORD;
12358 + else if (strcasecmp (new_token.str, "QWORD") == 0)
12359 + new_token.code = T_QWORD;
12361 + else if (strcasecmp (new_token.str, "TBYTE") == 0
12362 + /* XXX remove (gcc still uses it) */
12363 + || strcasecmp (new_token.str, "XWORD") == 0)
12364 + new_token.code = T_TBYTE;
12366 + else if (strcasecmp (new_token.str, "XMMWORD") == 0
12367 + || strcasecmp (new_token.str, "OWORD") == 0)
12368 + new_token.code = T_XMMWORD;
12370 + else if (strcasecmp (new_token.str, "PTR") == 0)
12371 + new_token.code = T_PTR;
12373 + else if (strcasecmp (new_token.str, "SHORT") == 0)
12374 + new_token.code = T_SHORT;
12376 + else if (strcasecmp (new_token.str, "OFFSET") == 0)
12378 + new_token.code = T_OFFSET;
12380 + /* ??? This is not mentioned in the MASM grammar but gcc
12381 + makes use of it with -mintel-syntax. OFFSET may be
12382 + followed by FLAT: */
12383 + if (strncasecmp (q, " FLAT:", 6) == 0)
12384 + strcat (new_token.str, " FLAT:");
12387 + /* ??? This is not mentioned in the MASM grammar. */
12388 + else if (strcasecmp (new_token.str, "FLAT") == 0)
12390 + new_token.code = T_OFFSET;
12391 + if (*q == ':')
12392 + strcat (new_token.str, ":");
12393 + else
12394 + as_bad (_("`:' expected"));
12397 + else
12398 + new_token.code = T_ID;
12402 + else if (strchr ("+-/*%|&^:[]()~", *intel_parser.op_string))
12404 + new_token.code = *intel_parser.op_string;
12405 + new_token.str[0] = *intel_parser.op_string;
12406 + new_token.str[1] = '\0';
12409 + else if (strchr ("<>", *intel_parser.op_string)
12410 + && *intel_parser.op_string == *(intel_parser.op_string + 1))
12412 + new_token.code = *intel_parser.op_string == '<' ? T_SHL : T_SHR;
12413 + new_token.str[0] = *intel_parser.op_string;
12414 + new_token.str[1] = *intel_parser.op_string;
12415 + new_token.str[2] = '\0';
12418 + else
12419 + as_bad (_("Unrecognized token `%s'"), intel_parser.op_string);
12421 + intel_parser.op_string += strlen (new_token.str);
12422 + cur_token = new_token;
12425 +/* Put cur_token back into the token stream and make cur_token point to
12426 + prev_token. */
12427 +static void
12428 +intel_putback_token (void)
12430 + if (cur_token.code != T_NIL)
12432 + intel_parser.op_string -= strlen (cur_token.str);
12433 + free (cur_token.str);
12435 + cur_token = prev_token;
12437 + /* Forget prev_token. */
12438 + prev_token.code = T_NIL;
12439 + prev_token.reg = NULL;
12440 + prev_token.str = NULL;
12443 +int
12444 +tc_x86_regname_to_dw2regnum (char *regname)
12446 + unsigned int regnum;
12447 + unsigned int regnames_count;
12448 + static const char *const regnames_32[] =
12450 + "eax", "ecx", "edx", "ebx",
12451 + "esp", "ebp", "esi", "edi",
12452 + "eip", "eflags", NULL,
12453 + "st0", "st1", "st2", "st3",
12454 + "st4", "st5", "st6", "st7",
12455 + NULL, NULL,
12456 + "xmm0", "xmm1", "xmm2", "xmm3",
12457 + "xmm4", "xmm5", "xmm6", "xmm7",
12458 + "mm0", "mm1", "mm2", "mm3",
12459 + "mm4", "mm5", "mm6", "mm7",
12460 + "fcw", "fsw", "mxcsr",
12461 + "es", "cs", "ss", "ds", "fs", "gs", NULL, NULL,
12462 + "tr", "ldtr"
12463 + };
12464 + static const char *const regnames_64[] =
12466 + "rax", "rdx", "rcx", "rbx",
12467 + "rsi", "rdi", "rbp", "rsp",
12468 + "r8", "r9", "r10", "r11",
12469 + "r12", "r13", "r14", "r15",
12470 + "rip",
12471 + "xmm0", "xmm1", "xmm2", "xmm3",
12472 + "xmm4", "xmm5", "xmm6", "xmm7",
12473 + "xmm8", "xmm9", "xmm10", "xmm11",
12474 + "xmm12", "xmm13", "xmm14", "xmm15",
12475 + "st0", "st1", "st2", "st3",
12476 + "st4", "st5", "st6", "st7",
12477 + "mm0", "mm1", "mm2", "mm3",
12478 + "mm4", "mm5", "mm6", "mm7",
12479 + "rflags",
12480 + "es", "cs", "ss", "ds", "fs", "gs", NULL, NULL,
12481 + "fs.base", "gs.base", NULL, NULL,
12482 + "tr", "ldtr",
12483 + "mxcsr", "fcw", "fsw"
12484 + };
12485 + const char *const *regnames;
12487 + if (flag_code == CODE_64BIT)
12489 + regnames = regnames_64;
12490 + regnames_count = ARRAY_SIZE (regnames_64);
12492 + else
12494 + regnames = regnames_32;
12495 + regnames_count = ARRAY_SIZE (regnames_32);
12498 + for (regnum = 0; regnum < regnames_count; regnum++)
12499 + if (regnames[regnum] != NULL
12500 + && strcmp (regname, regnames[regnum]) == 0)
12501 + return regnum;
12503 + return -1;
12506 +void
12507 +tc_x86_frame_initial_instructions (void)
12509 + static unsigned int sp_regno;
12511 + if (!sp_regno)
12512 + sp_regno = tc_x86_regname_to_dw2regnum (flag_code == CODE_64BIT
12513 + ? "rsp" : "esp");
12515 + cfi_add_CFA_def_cfa (sp_regno, -x86_cie_data_alignment);
12516 + cfi_add_CFA_offset (x86_dwarf2_return_column, x86_cie_data_alignment);
12519 +int
12520 +i386_elf_section_type (const char *str, size_t len)
12522 + if (flag_code == CODE_64BIT
12523 + && len == sizeof ("unwind") - 1
12524 + && strncmp (str, "unwind", 6) == 0)
12525 + return SHT_X86_64_UNWIND;
12527 + return -1;
12530 +#ifdef TE_PE
12531 +void
12532 +tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
12534 + expressionS expr;
12536 + expr.X_op = O_secrel;
12537 + expr.X_add_symbol = symbol;
12538 + expr.X_add_number = 0;
12539 + emit_expr (&expr, size);
12541 +#endif
12543 +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
12544 +/* For ELF on x86-64, add support for SHF_X86_64_LARGE. */
12546 +int
12547 +x86_64_section_letter (int letter, char **ptr_msg)
12549 + if (flag_code == CODE_64BIT)
12551 + if (letter == 'l')
12552 + return SHF_X86_64_LARGE;
12554 + *ptr_msg = _("Bad .section directive: want a,l,w,x,M,S,G,T in string");
12556 + else
12557 + *ptr_msg = _("Bad .section directive: want a,w,x,M,S,G,T in string");
12558 + return -1;
12561 +int
12562 +x86_64_section_word (char *str, size_t len)
12564 + if (len == 5 && flag_code == CODE_64BIT && CONST_STRNEQ (str, "large"))
12565 + return SHF_X86_64_LARGE;
12567 + return -1;
12570 +static void
12571 +handle_large_common (int small ATTRIBUTE_UNUSED)
12573 + if (flag_code != CODE_64BIT)
12575 + s_comm_internal (0, elf_common_parse);
12576 + as_warn (_(".largecomm supported only in 64bit mode, producing .comm"));
12578 + else
12580 + static segT lbss_section;
12581 + asection *saved_com_section_ptr = elf_com_section_ptr;
12582 + asection *saved_bss_section = bss_section;
12584 + if (lbss_section == NULL)
12586 + flagword applicable;
12587 + segT seg = now_seg;
12588 + subsegT subseg = now_subseg;
12590 + /* The .lbss section is for local .largecomm symbols. */
12591 + lbss_section = subseg_new (".lbss", 0);
12592 + applicable = bfd_applicable_section_flags (stdoutput);
12593 + bfd_set_section_flags (stdoutput, lbss_section,
12594 + applicable & SEC_ALLOC);
12595 + seg_info (lbss_section)->bss = 1;
12597 + subseg_set (seg, subseg);
12600 + elf_com_section_ptr = &_bfd_elf_large_com_section;
12601 + bss_section = lbss_section;
12603 + s_comm_internal (0, elf_common_parse);
12605 + elf_com_section_ptr = saved_com_section_ptr;
12606 + bss_section = saved_bss_section;
12610 +void nacl_elf_final_processing(void)
12612 + elf_elfheader (stdoutput)->e_ident[EI_OSABI] = ELFOSABI_NACL;
12613 + elf_elfheader (stdoutput)->e_ident[EI_ABIVERSION] = EF_NACL_ABIVERSION;
12615 + elf_elfheader (stdoutput)->e_flags &= ~EF_NACL_ALIGN_MASK;
12616 + if (nacl_library_mode)
12617 + elf_elfheader (stdoutput)->e_flags |= EF_NACL_ALIGN_LIB;
12618 + else if (nacl_alignment == 4)
12619 + elf_elfheader (stdoutput)->e_flags |= EF_NACL_ALIGN_16;
12620 + else if (nacl_alignment == 5)
12621 + elf_elfheader (stdoutput)->e_flags |= EF_NACL_ALIGN_32;
12623 +#endif /* OBJ_ELF || OBJ_MAYBE_ELF */
12624 diff -Naur ../PRISTINE/binutils-2.18/gas/config/tc-nacl.h binutils-2.18/gas/config/tc-nacl.h
12625 --- ../PRISTINE/binutils-2.18/gas/config/tc-nacl.h 1969-12-31 16:00:00.000000000 -0800
12626 +++ binutils-2.18/gas/config/tc-nacl.h 2009-01-09 17:32:43.541696000 -0800
12627 @@ -0,0 +1,332 @@
12628 +/* tc-i386.h -- Header file for tc-i386.c
12629 + Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
12630 + 2001, 2002, 2003, 2004, 2005, 2006, 2007
12631 + Free Software Foundation, Inc.
12633 + This file is part of GAS, the GNU Assembler.
12635 + GAS is free software; you can redistribute it and/or modify
12636 + it under the terms of the GNU General Public License as published by
12637 + the Free Software Foundation; either version 3, or (at your option)
12638 + any later version.
12640 + GAS is distributed in the hope that it will be useful,
12641 + but WITHOUT ANY WARRANTY; without even the implied warranty of
12642 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12643 + GNU General Public License for more details.
12645 + You should have received a copy of the GNU General Public License
12646 + along with GAS; see the file COPYING. If not, write to the Free
12647 + Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
12648 + 02110-1301, USA. */
12650 +#ifndef TC_NACL
12651 +#define TC_NACL 1
12653 +#include "opcodes/i386-opc.h"
12655 +struct fix;
12657 +#define TARGET_BYTES_BIG_ENDIAN 0
12659 +#define TARGET_ARCH bfd_arch_i386
12660 +#define TARGET_MACH (i386_mach ())
12661 +extern unsigned long i386_mach (void);
12663 +#ifdef TE_FreeBSD
12664 +#define AOUT_TARGET_FORMAT "a.out-i386-freebsd"
12665 +#endif
12666 +#ifdef TE_NetBSD
12667 +#define AOUT_TARGET_FORMAT "a.out-i386-netbsd"
12668 +#endif
12669 +#ifdef TE_386BSD
12670 +#define AOUT_TARGET_FORMAT "a.out-i386-bsd"
12671 +#endif
12672 +#ifdef TE_LINUX
12673 +#define AOUT_TARGET_FORMAT "a.out-i386-linux"
12674 +#endif
12675 +#ifdef TE_Mach
12676 +#define AOUT_TARGET_FORMAT "a.out-mach3"
12677 +#endif
12678 +#ifdef TE_DYNIX
12679 +#define AOUT_TARGET_FORMAT "a.out-i386-dynix"
12680 +#endif
12681 +#ifndef AOUT_TARGET_FORMAT
12682 +#define AOUT_TARGET_FORMAT "a.out-i386"
12683 +#endif
12685 +#ifdef TE_FreeBSD
12686 +#define ELF_TARGET_FORMAT "elf32-i386-freebsd"
12687 +#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
12688 +#elif defined (TE_VXWORKS)
12689 +#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
12690 +#endif
12692 +#ifndef ELF_TARGET_FORMAT
12693 +#define ELF_TARGET_FORMAT "elf32-nacl"
12694 +#endif
12696 +#ifndef ELF_TARGET_FORMAT64
12697 +#define ELF_TARGET_FORMAT64 "elf64-x86-64"
12698 +#endif
12700 +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
12701 + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
12702 +extern const char *i386_target_format (void);
12703 +#define TARGET_FORMAT i386_target_format ()
12704 +#else
12705 +#ifdef OBJ_ELF
12706 +#define TARGET_FORMAT ELF_TARGET_FORMAT
12707 +#endif
12708 +#ifdef OBJ_AOUT
12709 +#define TARGET_FORMAT AOUT_TARGET_FORMAT
12710 +#endif
12711 +#endif
12713 +#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF))
12714 +#define md_end i386_elf_emit_arch_note
12715 +extern void i386_elf_emit_arch_note (void);
12716 +#endif
12718 +#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
12720 +#define LOCAL_LABELS_FB 1
12722 +extern const char extra_symbol_chars[];
12723 +#define tc_symbol_chars extra_symbol_chars
12725 +extern const char *i386_comment_chars;
12726 +#define tc_comment_chars i386_comment_chars
12728 +/* Prefixes will be emitted in the order defined below.
12729 + WAIT_PREFIX must be the first prefix since FWAIT is really is an
12730 + instruction, and so must come before any prefixes.
12731 + The preferred prefix order is SEG_PREFIX, ADDR_PREFIX, DATA_PREFIX,
12732 + LOCKREP_PREFIX. */
12733 +#define WAIT_PREFIX 0
12734 +#define SEG_PREFIX 1
12735 +#define ADDR_PREFIX 2
12736 +#define DATA_PREFIX 3
12737 +#define LOCKREP_PREFIX 4
12738 +#define REX_PREFIX 5 /* must come last. */
12739 +#define MAX_PREFIXES 6 /* max prefixes per opcode */
12741 +/* we define the syntax here (modulo base,index,scale syntax) */
12742 +#define REGISTER_PREFIX '%'
12743 +#define IMMEDIATE_PREFIX '$'
12744 +#define ABSOLUTE_PREFIX '*'
12746 +/* these are the instruction mnemonic suffixes. */
12747 +#define WORD_MNEM_SUFFIX 'w'
12748 +#define BYTE_MNEM_SUFFIX 'b'
12749 +#define SHORT_MNEM_SUFFIX 's'
12750 +#define LONG_MNEM_SUFFIX 'l'
12751 +#define QWORD_MNEM_SUFFIX 'q'
12752 +/* Intel Syntax */
12753 +#define LONG_DOUBLE_MNEM_SUFFIX 'x'
12755 +#define END_OF_INSN '\0'
12758 + 'templates' is for grouping together 'template' structures for opcodes
12759 + of the same name. This is only used for storing the insns in the grand
12760 + ole hash table of insns.
12761 + The templates themselves start at START and range up to (but not including)
12762 + END.
12763 + */
12764 +typedef struct
12766 + const template *start;
12767 + const template *end;
12769 +templates;
12771 +/* 386 operand encoding bytes: see 386 book for details of this. */
12772 +typedef struct
12774 + unsigned int regmem; /* codes register or memory operand */
12775 + unsigned int reg; /* codes register operand (or extended opcode) */
12776 + unsigned int mode; /* how to interpret regmem & reg */
12778 +modrm_byte;
12780 +/* x86-64 extension prefix. */
12781 +typedef int rex_byte;
12783 +/* 386 opcode byte to code indirect addressing. */
12784 +typedef struct
12786 + unsigned base;
12787 + unsigned index;
12788 + unsigned scale;
12790 +sib_byte;
12792 +enum processor_type
12794 + PROCESSOR_UNKNOWN,
12795 + PROCESSOR_I386,
12796 + PROCESSOR_I486,
12797 + PROCESSOR_PENTIUM,
12798 + PROCESSOR_PENTIUMPRO,
12799 + PROCESSOR_PENTIUM4,
12800 + PROCESSOR_NOCONA,
12801 + PROCESSOR_CORE,
12802 + PROCESSOR_CORE2,
12803 + PROCESSOR_K6,
12804 + PROCESSOR_ATHLON,
12805 + PROCESSOR_K8,
12806 + PROCESSOR_GENERIC32,
12807 + PROCESSOR_GENERIC64,
12808 + PROCESSOR_AMDFAM10
12811 +/* x86 arch names, types and features */
12812 +typedef struct
12814 + const char *name; /* arch name */
12815 + enum processor_type type; /* arch type */
12816 + unsigned int flags; /* cpu feature flags */
12818 +arch_entry;
12820 +/* The name of the global offset table generated by the compiler. Allow
12821 + this to be overridden if need be. */
12822 +#ifndef GLOBAL_OFFSET_TABLE_NAME
12823 +#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
12824 +#endif
12826 +#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (LEX_AT)
12827 +#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES)
12828 +extern void x86_cons (expressionS *, int);
12830 +#endif
12832 +#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_cons_fix_new(FRAG, OFF, LEN, EXP)
12833 +extern void x86_cons_fix_new
12834 + (fragS *, unsigned int, unsigned int, expressionS *);
12836 +#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
12838 +#define NO_RELOC BFD_RELOC_NONE
12840 +void i386_validate_fix (struct fix *);
12841 +#define TC_VALIDATE_FIX(FIX,SEGTYPE,SKIP) i386_validate_fix(FIX)
12843 +#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
12844 +extern int tc_i386_fix_adjustable (struct fix *);
12846 +/* Values passed to md_apply_fix don't include the symbol value. */
12847 +#define MD_APPLY_SYM_VALUE(FIX) 0
12849 +/* ELF wants external syms kept, as does PE COFF. */
12850 +#if defined (TE_PE) && defined (STRICT_PE_FORMAT)
12851 +#define EXTERN_FORCE_RELOC \
12852 + (OUTPUT_FLAVOR == bfd_target_elf_flavour \
12853 + || OUTPUT_FLAVOR == bfd_target_coff_flavour)
12854 +#else
12855 +#define EXTERN_FORCE_RELOC \
12856 + (OUTPUT_FLAVOR == bfd_target_elf_flavour)
12857 +#endif
12859 +/* This expression evaluates to true if the relocation is for a local
12860 + object for which we still want to do the relocation at runtime.
12861 + False if we are willing to perform this relocation while building
12862 + the .o file. GOTOFF does not need to be checked here because it is
12863 + not pcrel. I am not sure if some of the others are ever used with
12864 + pcrel, but it is easier to be safe than sorry. */
12866 +#define TC_FORCE_RELOCATION_LOCAL(FIX) \
12867 + (!(FIX)->fx_pcrel \
12868 + || (FIX)->fx_r_type == BFD_RELOC_386_PLT32 \
12869 + || (FIX)->fx_r_type == BFD_RELOC_386_GOT32 \
12870 + || (FIX)->fx_r_type == BFD_RELOC_386_GOTPC \
12871 + || TC_FORCE_RELOCATION (FIX))
12873 +extern int i386_parse_name (char *, expressionS *, char *);
12874 +#define md_parse_name(s, e, m, c) i386_parse_name (s, e, c)
12876 +extern const struct relax_type md_relax_table[];
12877 +#define TC_GENERIC_RELAX_TABLE md_relax_table
12879 +extern int optimize_align_code;
12881 +#define md_do_align(n, fill, len, max, around) \
12882 +if ((n) \
12883 + && !need_pass_2 \
12884 + && optimize_align_code \
12885 + && (!(fill) \
12886 + || ((char)*(fill) == (char)0x90 && (len) == 1)) \
12887 + && subseg_text_p (now_seg)) \
12888 + { \
12889 + frag_align_code ((n), (max)); \
12890 + goto around; \
12893 +#define MAX_MEM_FOR_RS_ALIGN_CODE 31
12895 +extern void i386_align_code (fragS *, int);
12897 +#define HANDLE_ALIGN(fragP) \
12898 +if (fragP->fr_type == rs_align_code) \
12899 + i386_align_code (fragP, (fragP->fr_next->fr_address \
12900 + - fragP->fr_address \
12901 + - fragP->fr_fix));
12903 +void i386_print_statistics (FILE *);
12904 +#define tc_print_statistics i386_print_statistics
12906 +#define md_number_to_chars number_to_chars_littleendian
12908 +#ifdef SCO_ELF
12909 +#define tc_init_after_args() sco_id ()
12910 +extern void sco_id (void);
12911 +#endif
12913 +#define WORKING_DOT_WORD 1
12915 +/* We want .cfi_* pseudo-ops for generating unwind info. */
12916 +#define TARGET_USE_CFIPOP 1
12918 +extern unsigned int x86_dwarf2_return_column;
12919 +#define DWARF2_DEFAULT_RETURN_COLUMN x86_dwarf2_return_column
12921 +extern int x86_cie_data_alignment;
12922 +#define DWARF2_CIE_DATA_ALIGNMENT x86_cie_data_alignment
12924 +#define tc_regname_to_dw2regnum tc_x86_regname_to_dw2regnum
12925 +extern int tc_x86_regname_to_dw2regnum (char *);
12927 +#define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions
12928 +extern void tc_x86_frame_initial_instructions (void);
12930 +#define md_elf_section_type(str,len) i386_elf_section_type (str, len)
12931 +extern int i386_elf_section_type (const char *, size_t);
12933 +/* Support for SHF_X86_64_LARGE */
12934 +extern int x86_64_section_word (char *, size_t);
12935 +extern int x86_64_section_letter (int, char **);
12936 +#define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
12937 +#define md_elf_section_word(STR, LEN) x86_64_section_word (STR, LEN)
12939 +#ifdef TE_PE
12941 +#define O_secrel O_md1
12943 +#define TC_DWARF2_EMIT_OFFSET tc_pe_dwarf2_emit_offset
12944 +void tc_pe_dwarf2_emit_offset (symbolS *, unsigned int);
12946 +#endif /* TE_PE */
12948 +/* NativeClient specific additions. */
12950 +/* log2 of the instruction alignment */
12951 +extern int nacl_alignment;
12953 +/* library mode: 16-byte alignment, calls end 32-byte chunks. */
12954 +extern int nacl_library_mode;
12956 +#define elf_tc_final_processing nacl_elf_final_processing
12957 +extern void nacl_elf_final_processing PARAMS ((void));
12959 +#endif /* TC_NACL */
12960 diff -Naur ../PRISTINE/binutils-2.18/gas/configure.tgt binutils-2.18/gas/configure.tgt
12961 --- ../PRISTINE/binutils-2.18/gas/configure.tgt 2007-08-28 10:19:36.000000000 -0700
12962 +++ binutils-2.18/gas/configure.tgt 2009-01-09 17:32:43.545689000 -0800
12963 @@ -57,6 +57,7 @@
12964 mips*el) cpu_type=mips endian=little ;;
12965 mips*) cpu_type=mips endian=big ;;
12966 mt) cpu_type=mt endian=big ;;
12967 + nacl*) cpu_type=nacl arch=i386 ;;
12968 or32*) cpu_type=or32 endian=big ;;
12969 pjl*) cpu_type=pj endian=little ;;
12970 pj*) cpu_type=pj endian=big ;;
12971 @@ -193,6 +194,7 @@
12972 i386-*-linux*coff*) fmt=coff em=linux ;;
12973 i386-*-linux-*) fmt=elf em=linux ;;
12974 i386-*-lynxos*) fmt=elf em=lynx ;;
12975 + i386-*-nacl*) fmt=elf em=linux cpu_type=nacl;;
12976 i386-*-sysv[45]*) fmt=elf ;;
12977 i386-*-solaris*) fmt=elf ;;
12978 i386-*-freebsdaout*) fmt=aout em=386bsd ;;
12979 diff -Naur ../PRISTINE/binutils-2.18/gas/frags.c binutils-2.18/gas/frags.c
12980 --- ../PRISTINE/binutils-2.18/gas/frags.c 2007-08-06 12:59:50.000000000 -0700
12981 +++ binutils-2.18/gas/frags.c 2009-01-09 17:32:43.553690000 -0800
12982 @@ -35,6 +35,7 @@
12983 zero_address_frag.fr_type = rs_fill;
12984 bss_address_frag.fr_type = rs_fill;
12988 /* Check that we're not trying to assemble into a section that can't
12989 allocate frags (currently, this is only possible in the absolute
12990 @@ -69,6 +70,16 @@
12991 (void) obstack_alloc (ob, 0);
12992 oalign = obstack_alignment_mask (ob);
12993 obstack_alignment_mask (ob) = 0;
12995 + /* If there isn't adequate space for a frag plus its contents plus the
12996 + * alignment contents in the current chunk, force the allocation of a new
12997 + * chunk. */
12999 + int space = obstack_room (ob);
13000 + if (space < SIZEOF_STRUCT_FRAG + (1 <<(nacl_alignment + 2))) {
13001 + (void) obstack_alloc (ob, space-1);
13004 ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG);
13005 obstack_alignment_mask (ob) = oalign;
13006 memset (ptr, 0, SIZEOF_STRUCT_FRAG);
13007 diff -Naur ../PRISTINE/binutils-2.18/gas/frags.h binutils-2.18/gas/frags.h
13008 --- ../PRISTINE/binutils-2.18/gas/frags.h 2007-08-06 12:59:51.000000000 -0700
13009 +++ binutils-2.18/gas/frags.h 2009-01-09 17:32:43.557676000 -0800
13010 @@ -77,10 +77,22 @@
13011 unsigned int has_code:1;
13012 unsigned int insn_addr:6;
13014 + /* NativeClient support:
13015 + * Set if this fragment contains a call in a native client assembly. These
13016 + * need to end an alignment unit.
13017 + */
13018 + unsigned int is_call:1;
13020 /* What state is my tail in? */
13021 relax_stateT fr_type;
13022 relax_substateT fr_subtype;
13024 + /* NativeClient support:
13025 + * If this fragment contains a call, we will need to tweak the fixup to
13026 + * reflect the padding to put the call at the end of the fragment.
13027 + */
13028 + fixS *nacl_fixup;
13030 #ifdef USING_CGEN
13031 /* Don't include this unless using CGEN to keep frag size down. */
13032 struct {
13033 diff -Naur ../PRISTINE/binutils-2.18/gas/write.c binutils-2.18/gas/write.c
13034 --- ../PRISTINE/binutils-2.18/gas/write.c 2007-08-06 12:59:51.000000000 -0700
13035 +++ binutils-2.18/gas/write.c 2009-01-09 17:32:43.565664000 -0800
13036 @@ -150,6 +150,8 @@
13038 fixP = obstack_alloc (&notes, sizeof (fixS));
13040 + frag->nacl_fixup = fixP;
13042 fixP->fx_frag = frag;
13043 fixP->fx_where = where;
13044 fixP->fx_size = size;
13045 @@ -414,6 +416,38 @@
13048 static void
13049 +move_call_insn_to_end(fragS *fragP, fragS *next ATTRIBUTE_UNUSED)
13051 + if (fragP->fr_offset != 0) {
13052 + // fragP->fr_fix is the start of the fixup code (i.e. nops).
13053 + int i;
13054 + unsigned char *tmp = alloca(fragP->fr_fix);
13055 + memcpy(tmp, fragP->fr_literal, fragP->fr_fix);
13056 + for (i = 0; i < fragP->fr_var; i++) {
13057 + fragP->fr_literal[i] = fragP->fr_literal[fragP->fr_fix+i];
13059 + for (i = 0; i< fragP->fr_fix; i++) {
13060 + fragP->fr_literal[fragP->fr_var+i] = tmp[i];
13062 + // TODO: this code should be obsolete. Remove it.
13063 + // If it was a direct call, there's a fixup for the target address.
13064 + // This needs to corrected to point to the new location of the
13065 + // constant after we moved the nops.
13066 + // If there is no fixup, but this is a call, then it is an indirect
13067 + // call, and we need to put in the fixups for the sandbox code.
13068 + if (fragP->nacl_fixup) {
13069 + fragP->nacl_fixup->fx_where += fragP->fr_var;
13071 + else if (getenv("NACL_CONTROL_ENFORCE_RANGE")) {
13072 + symbolS* and_mask = symbol_find_or_make("__nacl_and_mask");
13073 + symbolS* exec_start = symbol_find_or_make("__executable_start");
13074 + fix_new (fragP, 2+fragP->fr_var, 4, and_mask, 0, 0, BFD_RELOC_32);
13075 + fix_new (fragP, 8+fragP->fr_var, 4, exec_start, 0, 0, BFD_RELOC_32);
13080 +static void
13081 cvt_frag_to_fill (segT sec ATTRIBUTE_UNUSED, fragS *fragP)
13083 switch (fragP->fr_type)
13084 @@ -437,6 +471,10 @@
13085 (long) fragP->fr_offset);
13086 fragP->fr_offset = 0;
13089 + if (fragP->is_call && (nacl_alignment > 0)) {
13090 + move_call_insn_to_end(fragP, NULL);
13092 fragP->fr_type = rs_fill;
13093 break;
13095 @@ -1151,6 +1189,8 @@
13097 int j;
13098 int fx_size, slack;
13099 + /* NativeClient change here to handle moving calls. */
13100 + int limitsize;
13101 offsetT loc;
13103 if (fixp->fx_done)
13104 @@ -1161,7 +1201,10 @@
13105 if (slack > 0)
13106 fx_size = fx_size > slack ? fx_size - slack : 0;
13107 loc = fixp->fx_where + fx_size;
13108 - if (slack >= 0 && loc > fixp->fx_frag->fr_fix)
13109 + limitsize = (fixp->fx_frag->is_call ?
13110 + (fixp->fx_frag->fr_fix + fixp->fx_frag->fr_var) :
13111 + fixp->fx_frag->fr_fix);
13112 + if (slack >= 0 && loc > limitsize)
13113 as_bad_where (fixp->fx_file, fixp->fx_line,
13114 _("internal error: fixup not contained within frag"));
13116 diff -Naur ../PRISTINE/binutils-2.18/gprof/gprof.1 binutils-2.18/gprof/gprof.1
13117 --- ../PRISTINE/binutils-2.18/gprof/gprof.1 2007-08-06 13:39:31.000000000 -0700
13118 +++ binutils-2.18/gprof/gprof.1 2009-01-09 17:32:43.575664000 -0800
13119 @@ -1,4 +1,4 @@
13120 -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
13121 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
13123 .\" Standard preamble:
13124 .\" ========================================================================
13125 @@ -25,11 +25,11 @@
13127 .\" Set up some character translations and predefined strings. \*(-- will
13128 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
13129 -.\" double quote, and \*(R" will give a right double quote. \*(C+ will
13130 -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
13131 -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
13132 -.\" nothing in troff, for use with C<>.
13133 -.tr \(*W-
13134 +.\" double quote, and \*(R" will give a right double quote. | will give a
13135 +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
13136 +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
13137 +.\" expand to `' in nroff, nothing in troff, for use with C<>.
13138 +.tr \(*W-|\(bv\*(Tr
13139 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
13140 .ie n \{\
13141 . ds -- \(*W-
13142 @@ -128,7 +128,7 @@
13143 .\" ========================================================================
13145 .IX Title "GPROF 1"
13146 -.TH GPROF 1 "2007-08-06" "binutils-2.17.90" "GNU"
13147 +.TH GPROF 1 "2008-04-04" "binutils-2.18" "GNU"
13148 .SH "NAME"
13149 gprof \- display call graph profile data
13150 .SH "SYNOPSIS"
13151 diff -Naur ../PRISTINE/binutils-2.18/include/elf/common.h binutils-2.18/include/elf/common.h
13152 --- ../PRISTINE/binutils-2.18/include/elf/common.h 2007-08-28 10:19:40.000000000 -0700
13153 +++ binutils-2.18/include/elf/common.h 2009-01-09 17:32:43.586651000 -0800
13154 @@ -75,6 +75,7 @@
13155 #define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
13156 #define ELFOSABI_AROS 15 /* Amiga Research OS */
13157 #define ELFOSABI_ARM 97 /* ARM */
13158 +#define ELFOSABI_NACL 123 /* x86 NativeClient */
13159 #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
13161 #define EI_ABIVERSION 8 /* ABI version */
13162 diff -Naur ../PRISTINE/binutils-2.18/include/elf/nacl.h binutils-2.18/include/elf/nacl.h
13163 --- ../PRISTINE/binutils-2.18/include/elf/nacl.h 1969-12-31 16:00:00.000000000 -0800
13164 +++ binutils-2.18/include/elf/nacl.h 2009-01-09 17:32:43.590639000 -0800
13165 @@ -0,0 +1,33 @@
13166 +/* ix86 ELF support for BFD.
13167 + Copyright 1998, 1999, 2000, 2002, 2004, 2005, 2006
13168 + Free Software Foundation, Inc.
13170 + This file is part of BFD, the Binary File Descriptor library.
13172 + This program is free software; you can redistribute it and/or modify
13173 + it under the terms of the GNU General Public License as published by
13174 + the Free Software Foundation; either version 2 of the License, or
13175 + (at your option) any later version.
13177 + This program is distributed in the hope that it will be useful,
13178 + but WITHOUT ANY WARRANTY; without even the implied warranty of
13179 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13180 + GNU General Public License for more details.
13182 + You should have received a copy of the GNU General Public License
13183 + along with this program; if not, write to the Free Software Foundation,
13184 + Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
13186 +#ifndef _ELF_NACL_H
13187 +#define _ELF_NACL_H
13189 +/* e_flags settings for NativeClient. */
13190 +#define EF_NACL_ALIGN_MASK 0x300000 /* bits indicating alignment */
13191 +#define EF_NACL_ALIGN_16 0x100000 /* aligned zero mod 16 */
13192 +#define EF_NACL_ALIGN_32 0x200000 /* aligned zero mod 32 */
13193 +#define EF_NACL_ALIGN_LIB 0x000000 /* aligned to pass either way */
13195 +/* ABI version number -- increment when ABI changes are incompatible. */
13196 +#define EF_NACL_ABIVERSION 3
13198 +#endif
13199 diff -Naur ../PRISTINE/binutils-2.18/ld/Makefile.am binutils-2.18/ld/Makefile.am
13200 --- ../PRISTINE/binutils-2.18/ld/Makefile.am 2007-08-06 13:00:17.000000000 -0700
13201 +++ binutils-2.18/ld/Makefile.am 2009-01-09 17:32:43.596640000 -0800
13202 @@ -206,6 +206,7 @@
13203 eelf_i386_fbsd.o \
13204 eelf_i386_ldso.o \
13205 eelf_i386_vxworks.o \
13206 + eelf_nacl.o \
13207 eelf_s390.o \
13208 egld960.o \
13209 egld960coff.o \
13210 @@ -981,6 +982,9 @@
13211 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
13212 $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13213 ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
13214 +eelf_nacl.c: $(srcdir)/emulparams/elf_nacl.sh \
13215 + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13216 + ${GENSCRIPTS} elf_nacl "$(tdir_elf_nacl)"
13217 eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
13218 $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13219 ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
13220 diff -Naur ../PRISTINE/binutils-2.18/ld/Makefile.in binutils-2.18/ld/Makefile.in
13221 --- ../PRISTINE/binutils-2.18/ld/Makefile.in 2007-08-06 13:29:54.000000000 -0700
13222 +++ binutils-2.18/ld/Makefile.in 2009-01-09 17:32:43.643588000 -0800
13223 @@ -453,6 +453,7 @@
13224 eelf_i386_fbsd.o \
13225 eelf_i386_ldso.o \
13226 eelf_i386_vxworks.o \
13227 + eelf_nacl.o \
13228 eelf_s390.o \
13229 egld960.o \
13230 egld960coff.o \
13231 @@ -1807,6 +1808,9 @@
13232 eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
13233 $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13234 ${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
13235 +eelf_nacl.c: $(srcdir)/emulparams/elf_nacl.sh \
13236 + $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13237 + ${GENSCRIPTS} elf_nacl "$(tdir_elf_nacl)"
13238 eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
13239 $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
13240 ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
13241 diff -Naur ../PRISTINE/binutils-2.18/ld/configure.tgt binutils-2.18/ld/configure.tgt
13242 --- ../PRISTINE/binutils-2.18/ld/configure.tgt 2007-08-28 10:19:42.000000000 -0700
13243 +++ binutils-2.18/ld/configure.tgt 2009-01-09 17:32:43.652590000 -0800
13244 @@ -220,6 +220,7 @@
13245 targ_extra_ofiles="deffilep.o pe-dll.o" ;;
13246 i[3-7]86-*-netbsd*) targ_emul=i386nbsd
13247 targ_extra_emuls=elf_i386 ;;
13248 +i[3-7]86-*-nacl*) targ_emul=elf_nacl ;;
13249 x86_64-*-netbsd*) targ_emul=elf_x86_64
13250 targ_extra_emuls="elf_i386 i386nbsd"
13251 tdir_elf_i386=`echo ${targ_alias} | \
13252 diff -Naur ../PRISTINE/binutils-2.18/ld/emulparams/elf_nacl.sh binutils-2.18/ld/emulparams/elf_nacl.sh
13253 --- ../PRISTINE/binutils-2.18/ld/emulparams/elf_nacl.sh 1969-12-31 16:00:00.000000000 -0800
13254 +++ binutils-2.18/ld/emulparams/elf_nacl.sh 2009-01-09 17:32:43.658577000 -0800
13255 @@ -0,0 +1,13 @@
13256 +SCRIPT_NAME=naclelf
13257 +OUTPUT_FORMAT="elf32-nacl"
13258 +TEXT_START_ADDR=0x00010000
13259 +MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
13260 +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
13261 +ARCH=i386
13262 +MACHINE=
13263 +NOP=0x90909090
13264 +TEMPLATE_NAME=elf32
13265 +GENERATE_SHLIB_SCRIPT=yes
13266 +GENERATE_PIE_SCRIPT=yes
13267 +NO_SMALL_DATA=yes
13268 +SEPARATE_GOTPLT=12
13269 diff -Naur ../PRISTINE/binutils-2.18/ld/ld.1 binutils-2.18/ld/ld.1
13270 --- ../PRISTINE/binutils-2.18/ld/ld.1 2007-08-28 13:24:23.000000000 -0700
13271 +++ binutils-2.18/ld/ld.1 2009-01-09 17:32:43.670563000 -0800
13272 @@ -1,4 +1,4 @@
13273 -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
13274 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
13276 .\" Standard preamble:
13277 .\" ========================================================================
13278 @@ -25,11 +25,11 @@
13280 .\" Set up some character translations and predefined strings. \*(-- will
13281 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
13282 -.\" double quote, and \*(R" will give a right double quote. \*(C+ will
13283 -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
13284 -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
13285 -.\" nothing in troff, for use with C<>.
13286 -.tr \(*W-
13287 +.\" double quote, and \*(R" will give a right double quote. | will give a
13288 +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
13289 +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
13290 +.\" expand to `' in nroff, nothing in troff, for use with C<>.
13291 +.tr \(*W-|\(bv\*(Tr
13292 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
13293 .ie n \{\
13294 . ds -- \(*W-
13295 @@ -128,7 +128,7 @@
13296 .\" ========================================================================
13298 .IX Title "LD 1"
13299 -.TH LD 1 "2007-08-28" "binutils-2.18" "GNU Development Tools"
13300 +.TH LD 1 "2008-04-04" "binutils-2.18" "GNU Development Tools"
13301 .SH "NAME"
13302 ld \- The GNU linker
13303 .SH "SYNOPSIS"
13304 diff -Naur ../PRISTINE/binutils-2.18/ld/ldexp.c binutils-2.18/ld/ldexp.c
13305 --- ../PRISTINE/binutils-2.18/ld/ldexp.c 2007-08-06 13:00:20.000000000 -0700
13306 +++ binutils-2.18/ld/ldexp.c 2009-01-09 17:32:43.676555000 -0800
13307 @@ -46,6 +46,8 @@
13308 static void exp_fold_tree_1 (etree_type *);
13309 static void exp_fold_tree_no_dot (etree_type *);
13310 static bfd_vma align_n (bfd_vma, bfd_vma);
13311 +static bfd_vma ceilp2 (bfd_vma);
13312 +static bfd_vma nacl_mask (bfd_vma);
13314 segment_type *segments;
13316 @@ -269,6 +271,20 @@
13317 expld.result.valid_p = FALSE;
13318 break;
13320 + case CEILP2:
13321 + if (expld.phase != lang_first_phase_enum)
13322 + expld.result.value = ceilp2 (expld.result.value);
13323 + else
13324 + expld.result.valid_p = FALSE;
13325 + break;
13327 + case NACL_MASK:
13328 + if (expld.phase != lang_first_phase_enum)
13329 + expld.result.value = nacl_mask (expld.result.value);
13330 + else
13331 + expld.result.valid_p = FALSE;
13332 + break;
13334 default:
13335 FAIL ();
13336 break;
13337 @@ -1151,3 +1167,27 @@
13338 value = (value + align - 1) / align;
13339 return value * align;
13342 +static bfd_vma
13343 +ceilp2 (bfd_vma value)
13345 + value |= (value >> 1);
13346 + value |= (value >> 2);
13347 + value |= (value >> 4);
13348 + value |= (value >> 8);
13349 + value |= (value >> 16);
13350 + return value + 1;
13353 +static bfd_vma
13354 +nacl_mask (bfd_vma value)
13356 + char* str = getenv ("NACL_CONTROL_ENFORCE_ALIGN");
13357 + if (str) {
13358 + int nacl_alignment = atoi (str);
13359 + return (value - 1) & ~((1 << nacl_alignment) - 1);
13361 + else {
13362 + return value - 1;
13365 diff -Naur ../PRISTINE/binutils-2.18/ld/ldgram.c binutils-2.18/ld/ldgram.c
13366 --- ../PRISTINE/binutils-2.18/ld/ldgram.c 2007-08-06 13:39:31.000000000 -0700
13367 +++ binutils-2.18/ld/ldgram.c 2009-01-09 17:32:43.707541000 -0800
13368 @@ -1,9 +1,7 @@
13369 -/* A Bison parser, made by GNU Bison 2.3. */
13370 +/* A Bison parser, made by GNU Bison 2.1. */
13372 -/* Skeleton implementation for Bison's Yacc-like parsers in C
13374 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
13375 - Free Software Foundation, Inc.
13376 +/* Skeleton parser for Yacc-like parsing with Bison,
13377 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
13379 This program is free software; you can redistribute it and/or modify
13380 it under the terms of the GNU General Public License as published by
13381 @@ -20,21 +18,13 @@
13382 Foundation, Inc., 51 Franklin Street, Fifth Floor,
13383 Boston, MA 02110-1301, USA. */
13385 -/* As a special exception, you may create a larger work that contains
13386 - part or all of the Bison parser skeleton and distribute that work
13387 - under terms of your choice, so long as that work isn't itself a
13388 - parser generator using the skeleton or a modified version thereof
13389 - as a parser skeleton. Alternatively, if you modify or redistribute
13390 - the parser skeleton itself, you may (at your option) remove this
13391 - special exception, which will cause the skeleton and the resulting
13392 - Bison output files to be licensed under the GNU General Public
13393 - License without this special exception.
13395 - This special exception was added by the Free Software Foundation in
13396 - version 2.2 of Bison. */
13397 +/* As a special exception, when this file is copied by Bison into a
13398 + Bison output file, you may use that output file without restriction.
13399 + This special exception was added by the Free Software Foundation
13400 + in version 1.24 of Bison. */
13402 -/* C LALR(1) parser skeleton written by Richard Stallman, by
13403 - simplifying the original so-called "semantic" parser. */
13404 +/* Written by Richard Stallman by simplifying the original so called
13405 + ``semantic'' parser. */
13407 /* All symbols defined below should begin with yy or YY, to avoid
13408 infringing on user name space. This should be done even for local
13409 @@ -47,7 +37,7 @@
13410 #define YYBISON 1
13412 /* Bison version. */
13413 -#define YYBISON_VERSION "2.3"
13414 +#define YYBISON_VERSION "2.1"
13416 /* Skeleton name. */
13417 #define YYSKELETON_NAME "yacc.c"
13418 @@ -127,62 +117,64 @@
13419 LOADADDR = 316,
13420 MAX_K = 317,
13421 MIN_K = 318,
13422 - STARTUP = 319,
13423 - HLL = 320,
13424 - SYSLIB = 321,
13425 - FLOAT = 322,
13426 - NOFLOAT = 323,
13427 - NOCROSSREFS = 324,
13428 - ORIGIN = 325,
13429 - FILL = 326,
13430 - LENGTH = 327,
13431 - CREATE_OBJECT_SYMBOLS = 328,
13432 - INPUT = 329,
13433 - GROUP = 330,
13434 - OUTPUT = 331,
13435 - CONSTRUCTORS = 332,
13436 - ALIGNMOD = 333,
13437 - AT = 334,
13438 - SUBALIGN = 335,
13439 - PROVIDE = 336,
13440 - PROVIDE_HIDDEN = 337,
13441 - AS_NEEDED = 338,
13442 - CHIP = 339,
13443 - LIST = 340,
13444 - SECT = 341,
13445 - ABSOLUTE = 342,
13446 - LOAD = 343,
13447 - NEWLINE = 344,
13448 - ENDWORD = 345,
13449 - ORDER = 346,
13450 - NAMEWORD = 347,
13451 - ASSERT_K = 348,
13452 - FORMAT = 349,
13453 - PUBLIC = 350,
13454 - DEFSYMEND = 351,
13455 - BASE = 352,
13456 - ALIAS = 353,
13457 - TRUNCATE = 354,
13458 - REL = 355,
13459 - INPUT_SCRIPT = 356,
13460 - INPUT_MRI_SCRIPT = 357,
13461 - INPUT_DEFSYM = 358,
13462 - CASE = 359,
13463 - EXTERN = 360,
13464 - START = 361,
13465 - VERS_TAG = 362,
13466 - VERS_IDENTIFIER = 363,
13467 - GLOBAL = 364,
13468 - LOCAL = 365,
13469 - VERSIONK = 366,
13470 - INPUT_VERSION_SCRIPT = 367,
13471 - KEEP = 368,
13472 - ONLY_IF_RO = 369,
13473 - ONLY_IF_RW = 370,
13474 - SPECIAL = 371,
13475 - EXCLUDE_FILE = 372,
13476 - CONSTANT = 373,
13477 - INPUT_DYNAMIC_LIST = 374
13478 + CEILP2 = 319,
13479 + NACL_MASK = 320,
13480 + STARTUP = 321,
13481 + HLL = 322,
13482 + SYSLIB = 323,
13483 + FLOAT = 324,
13484 + NOFLOAT = 325,
13485 + NOCROSSREFS = 326,
13486 + ORIGIN = 327,
13487 + FILL = 328,
13488 + LENGTH = 329,
13489 + CREATE_OBJECT_SYMBOLS = 330,
13490 + INPUT = 331,
13491 + GROUP = 332,
13492 + OUTPUT = 333,
13493 + CONSTRUCTORS = 334,
13494 + ALIGNMOD = 335,
13495 + AT = 336,
13496 + SUBALIGN = 337,
13497 + PROVIDE = 338,
13498 + PROVIDE_HIDDEN = 339,
13499 + AS_NEEDED = 340,
13500 + CHIP = 341,
13501 + LIST = 342,
13502 + SECT = 343,
13503 + ABSOLUTE = 344,
13504 + LOAD = 345,
13505 + NEWLINE = 346,
13506 + ENDWORD = 347,
13507 + ORDER = 348,
13508 + NAMEWORD = 349,
13509 + ASSERT_K = 350,
13510 + FORMAT = 351,
13511 + PUBLIC = 352,
13512 + DEFSYMEND = 353,
13513 + BASE = 354,
13514 + ALIAS = 355,
13515 + TRUNCATE = 356,
13516 + REL = 357,
13517 + INPUT_SCRIPT = 358,
13518 + INPUT_MRI_SCRIPT = 359,
13519 + INPUT_DEFSYM = 360,
13520 + CASE = 361,
13521 + EXTERN = 362,
13522 + START = 363,
13523 + VERS_TAG = 364,
13524 + VERS_IDENTIFIER = 365,
13525 + GLOBAL = 366,
13526 + LOCAL = 367,
13527 + VERSIONK = 368,
13528 + INPUT_VERSION_SCRIPT = 369,
13529 + KEEP = 370,
13530 + ONLY_IF_RO = 371,
13531 + ONLY_IF_RW = 372,
13532 + SPECIAL = 373,
13533 + EXCLUDE_FILE = 374,
13534 + CONSTANT = 375,
13535 + INPUT_DYNAMIC_LIST = 376
13537 #endif
13538 /* Tokens. */
13539 @@ -247,62 +239,64 @@
13540 #define LOADADDR 316
13541 #define MAX_K 317
13542 #define MIN_K 318
13543 -#define STARTUP 319
13544 -#define HLL 320
13545 -#define SYSLIB 321
13546 -#define FLOAT 322
13547 -#define NOFLOAT 323
13548 -#define NOCROSSREFS 324
13549 -#define ORIGIN 325
13550 -#define FILL 326
13551 -#define LENGTH 327
13552 -#define CREATE_OBJECT_SYMBOLS 328
13553 -#define INPUT 329
13554 -#define GROUP 330
13555 -#define OUTPUT 331
13556 -#define CONSTRUCTORS 332
13557 -#define ALIGNMOD 333
13558 -#define AT 334
13559 -#define SUBALIGN 335
13560 -#define PROVIDE 336
13561 -#define PROVIDE_HIDDEN 337
13562 -#define AS_NEEDED 338
13563 -#define CHIP 339
13564 -#define LIST 340
13565 -#define SECT 341
13566 -#define ABSOLUTE 342
13567 -#define LOAD 343
13568 -#define NEWLINE 344
13569 -#define ENDWORD 345
13570 -#define ORDER 346
13571 -#define NAMEWORD 347
13572 -#define ASSERT_K 348
13573 -#define FORMAT 349
13574 -#define PUBLIC 350
13575 -#define DEFSYMEND 351
13576 -#define BASE 352
13577 -#define ALIAS 353
13578 -#define TRUNCATE 354
13579 -#define REL 355
13580 -#define INPUT_SCRIPT 356
13581 -#define INPUT_MRI_SCRIPT 357
13582 -#define INPUT_DEFSYM 358
13583 -#define CASE 359
13584 -#define EXTERN 360
13585 -#define START 361
13586 -#define VERS_TAG 362
13587 -#define VERS_IDENTIFIER 363
13588 -#define GLOBAL 364
13589 -#define LOCAL 365
13590 -#define VERSIONK 366
13591 -#define INPUT_VERSION_SCRIPT 367
13592 -#define KEEP 368
13593 -#define ONLY_IF_RO 369
13594 -#define ONLY_IF_RW 370
13595 -#define SPECIAL 371
13596 -#define EXCLUDE_FILE 372
13597 -#define CONSTANT 373
13598 -#define INPUT_DYNAMIC_LIST 374
13599 +#define CEILP2 319
13600 +#define NACL_MASK 320
13601 +#define STARTUP 321
13602 +#define HLL 322
13603 +#define SYSLIB 323
13604 +#define FLOAT 324
13605 +#define NOFLOAT 325
13606 +#define NOCROSSREFS 326
13607 +#define ORIGIN 327
13608 +#define FILL 328
13609 +#define LENGTH 329
13610 +#define CREATE_OBJECT_SYMBOLS 330
13611 +#define INPUT 331
13612 +#define GROUP 332
13613 +#define OUTPUT 333
13614 +#define CONSTRUCTORS 334
13615 +#define ALIGNMOD 335
13616 +#define AT 336
13617 +#define SUBALIGN 337
13618 +#define PROVIDE 338
13619 +#define PROVIDE_HIDDEN 339
13620 +#define AS_NEEDED 340
13621 +#define CHIP 341
13622 +#define LIST 342
13623 +#define SECT 343
13624 +#define ABSOLUTE 344
13625 +#define LOAD 345
13626 +#define NEWLINE 346
13627 +#define ENDWORD 347
13628 +#define ORDER 348
13629 +#define NAMEWORD 349
13630 +#define ASSERT_K 350
13631 +#define FORMAT 351
13632 +#define PUBLIC 352
13633 +#define DEFSYMEND 353
13634 +#define BASE 354
13635 +#define ALIAS 355
13636 +#define TRUNCATE 356
13637 +#define REL 357
13638 +#define INPUT_SCRIPT 358
13639 +#define INPUT_MRI_SCRIPT 359
13640 +#define INPUT_DEFSYM 360
13641 +#define CASE 361
13642 +#define EXTERN 362
13643 +#define START 363
13644 +#define VERS_TAG 364
13645 +#define VERS_IDENTIFIER 365
13646 +#define GLOBAL 366
13647 +#define LOCAL 367
13648 +#define VERSIONK 368
13649 +#define INPUT_VERSION_SCRIPT 369
13650 +#define KEEP 370
13651 +#define ONLY_IF_RO 371
13652 +#define ONLY_IF_RW 372
13653 +#define SPECIAL 373
13654 +#define EXCLUDE_FILE 374
13655 +#define CONSTANT 375
13656 +#define INPUT_DYNAMIC_LIST 376
13660 @@ -371,10 +365,9 @@
13661 # define YYTOKEN_TABLE 0
13662 #endif
13664 -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
13665 -typedef union YYSTYPE
13666 +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
13667 #line 66 "ldgram.y"
13669 +typedef union YYSTYPE {
13670 bfd_vma integer;
13671 struct big_int
13673 @@ -401,10 +394,9 @@
13674 struct bfd_elf_version_deps *deflist;
13675 struct bfd_elf_version_expr *versyms;
13676 struct bfd_elf_version_tree *versnode;
13678 -/* Line 187 of yacc.c. */
13679 -#line 407 "ldgram.c"
13680 - YYSTYPE;
13681 +} YYSTYPE;
13682 +/* Line 196 of yacc.c. */
13683 +#line 400 "ldgram.c"
13684 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
13685 # define YYSTYPE_IS_DECLARED 1
13686 # define YYSTYPE_IS_TRIVIAL 1
13687 @@ -415,56 +407,23 @@
13688 /* Copy the second part of user declarations. */
13691 -/* Line 216 of yacc.c. */
13692 -#line 420 "ldgram.c"
13693 +/* Line 219 of yacc.c. */
13694 +#line 412 "ldgram.c"
13696 -#ifdef short
13697 -# undef short
13698 +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
13699 +# define YYSIZE_T __SIZE_TYPE__
13700 #endif
13702 -#ifdef YYTYPE_UINT8
13703 -typedef YYTYPE_UINT8 yytype_uint8;
13704 -#else
13705 -typedef unsigned char yytype_uint8;
13706 +#if ! defined (YYSIZE_T) && defined (size_t)
13707 +# define YYSIZE_T size_t
13708 #endif
13710 -#ifdef YYTYPE_INT8
13711 -typedef YYTYPE_INT8 yytype_int8;
13712 -#elif (defined __STDC__ || defined __C99__FUNC__ \
13713 - || defined __cplusplus || defined _MSC_VER)
13714 -typedef signed char yytype_int8;
13715 -#else
13716 -typedef short int yytype_int8;
13717 +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
13718 +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
13719 +# define YYSIZE_T size_t
13720 #endif
13722 -#ifdef YYTYPE_UINT16
13723 -typedef YYTYPE_UINT16 yytype_uint16;
13724 -#else
13725 -typedef unsigned short int yytype_uint16;
13726 +#if ! defined (YYSIZE_T)
13727 +# define YYSIZE_T unsigned int
13728 #endif
13730 -#ifdef YYTYPE_INT16
13731 -typedef YYTYPE_INT16 yytype_int16;
13732 -#else
13733 -typedef short int yytype_int16;
13734 -#endif
13736 -#ifndef YYSIZE_T
13737 -# ifdef __SIZE_TYPE__
13738 -# define YYSIZE_T __SIZE_TYPE__
13739 -# elif defined size_t
13740 -# define YYSIZE_T size_t
13741 -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
13742 - || defined __cplusplus || defined _MSC_VER)
13743 -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
13744 -# define YYSIZE_T size_t
13745 -# else
13746 -# define YYSIZE_T unsigned int
13747 -# endif
13748 -#endif
13750 -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
13752 #ifndef YY_
13753 # if YYENABLE_NLS
13754 # if ENABLE_NLS
13755 @@ -477,32 +436,7 @@
13756 # endif
13757 #endif
13759 -/* Suppress unused-variable warnings by "using" E. */
13760 -#if ! defined lint || defined __GNUC__
13761 -# define YYUSE(e) ((void) (e))
13762 -#else
13763 -# define YYUSE(e) /* empty */
13764 -#endif
13766 -/* Identity function, used to suppress warnings about constant conditions. */
13767 -#ifndef lint
13768 -# define YYID(n) (n)
13769 -#else
13770 -#if (defined __STDC__ || defined __C99__FUNC__ \
13771 - || defined __cplusplus || defined _MSC_VER)
13772 -static int
13773 -YYID (int i)
13774 -#else
13775 -static int
13776 -YYID (i)
13777 - int i;
13778 -#endif
13780 - return i;
13782 -#endif
13784 -#if ! defined yyoverflow || YYERROR_VERBOSE
13785 +#if ! defined (yyoverflow) || YYERROR_VERBOSE
13787 /* The parser invokes alloca or malloc; define the necessary symbols. */
13789 @@ -510,76 +444,64 @@
13790 # if YYSTACK_USE_ALLOCA
13791 # ifdef __GNUC__
13792 # define YYSTACK_ALLOC __builtin_alloca
13793 -# elif defined __BUILTIN_VA_ARG_INCR
13794 -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
13795 -# elif defined _AIX
13796 -# define YYSTACK_ALLOC __alloca
13797 -# elif defined _MSC_VER
13798 -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
13799 -# define alloca _alloca
13800 # else
13801 # define YYSTACK_ALLOC alloca
13802 -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
13803 - || defined __cplusplus || defined _MSC_VER)
13804 +# if defined (__STDC__) || defined (__cplusplus)
13805 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
13806 -# ifndef _STDLIB_H
13807 -# define _STDLIB_H 1
13808 -# endif
13809 +# define YYINCLUDED_STDLIB_H
13810 # endif
13811 # endif
13812 # endif
13813 # endif
13815 # ifdef YYSTACK_ALLOC
13816 - /* Pacify GCC's `empty if-body' warning. */
13817 -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
13818 + /* Pacify GCC's `empty if-body' warning. */
13819 +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
13820 # ifndef YYSTACK_ALLOC_MAXIMUM
13821 /* The OS might guarantee only one guard page at the bottom of the stack,
13822 and a page size can be as small as 4096 bytes. So we cannot safely
13823 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
13824 to allow for a few compiler-allocated temporary stack slots. */
13825 -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
13826 +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
13827 # endif
13828 # else
13829 # define YYSTACK_ALLOC YYMALLOC
13830 # define YYSTACK_FREE YYFREE
13831 # ifndef YYSTACK_ALLOC_MAXIMUM
13832 -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
13833 +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
13834 # endif
13835 -# if (defined __cplusplus && ! defined _STDLIB_H \
13836 - && ! ((defined YYMALLOC || defined malloc) \
13837 - && (defined YYFREE || defined free)))
13838 -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
13839 -# ifndef _STDLIB_H
13840 -# define _STDLIB_H 1
13841 -# endif
13842 +# ifdef __cplusplus
13843 +extern "C" {
13844 # endif
13845 # ifndef YYMALLOC
13846 # define YYMALLOC malloc
13847 -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
13848 - || defined __cplusplus || defined _MSC_VER)
13849 +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
13850 + && (defined (__STDC__) || defined (__cplusplus)))
13851 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
13852 # endif
13853 # endif
13854 # ifndef YYFREE
13855 # define YYFREE free
13856 -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
13857 - || defined __cplusplus || defined _MSC_VER)
13858 +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
13859 + && (defined (__STDC__) || defined (__cplusplus)))
13860 void free (void *); /* INFRINGES ON USER NAME SPACE */
13861 # endif
13862 # endif
13863 +# ifdef __cplusplus
13865 +# endif
13866 # endif
13867 -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
13868 +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
13871 -#if (! defined yyoverflow \
13872 - && (! defined __cplusplus \
13873 - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
13874 +#if (! defined (yyoverflow) \
13875 + && (! defined (__cplusplus) \
13876 + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
13878 /* A type that is properly aligned for any stack member. */
13879 union yyalloc
13881 - yytype_int16 yyss;
13882 + short int yyss;
13883 YYSTYPE yyvs;
13886 @@ -589,13 +511,13 @@
13887 /* The size of an array large to enough to hold all stacks, each with
13888 N elements. */
13889 # define YYSTACK_BYTES(N) \
13890 - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
13891 + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
13892 + YYSTACK_GAP_MAXIMUM)
13894 /* Copy COUNT objects from FROM to TO. The source and destination do
13895 not overlap. */
13896 # ifndef YYCOPY
13897 -# if defined __GNUC__ && 1 < __GNUC__
13898 +# if defined (__GNUC__) && 1 < __GNUC__
13899 # define YYCOPY(To, From, Count) \
13900 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
13901 # else
13902 @@ -606,7 +528,7 @@
13903 for (yyi = 0; yyi < (Count); yyi++) \
13904 (To)[yyi] = (From)[yyi]; \
13906 - while (YYID (0))
13907 + while (0)
13908 # endif
13909 # endif
13911 @@ -624,47 +546,53 @@
13912 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
13913 yyptr += yynewbytes / sizeof (*yyptr); \
13915 - while (YYID (0))
13916 + while (0)
13918 +#endif
13920 +#if defined (__STDC__) || defined (__cplusplus)
13921 + typedef signed char yysigned_char;
13922 +#else
13923 + typedef short int yysigned_char;
13924 #endif
13926 -/* YYFINAL -- State number of the termination state. */
13927 +/* YYFINAL -- State number of the termination state. */
13928 #define YYFINAL 17
13929 /* YYLAST -- Last index in YYTABLE. */
13930 -#define YYLAST 1716
13931 +#define YYLAST 1774
13933 -/* YYNTOKENS -- Number of terminals. */
13934 -#define YYNTOKENS 143
13935 -/* YYNNTS -- Number of nonterminals. */
13936 +/* YYNTOKENS -- Number of terminals. */
13937 +#define YYNTOKENS 145
13938 +/* YYNNTS -- Number of nonterminals. */
13939 #define YYNNTS 122
13940 -/* YYNRULES -- Number of rules. */
13941 -#define YYNRULES 346
13942 -/* YYNRULES -- Number of states. */
13943 -#define YYNSTATES 737
13944 +/* YYNRULES -- Number of rules. */
13945 +#define YYNRULES 348
13946 +/* YYNRULES -- Number of states. */
13947 +#define YYNSTATES 745
13949 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
13950 #define YYUNDEFTOK 2
13951 -#define YYMAXUTOK 374
13952 +#define YYMAXUTOK 376
13954 #define YYTRANSLATE(YYX) \
13955 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
13957 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
13958 -static const yytype_uint8 yytranslate[] =
13959 +static const unsigned char yytranslate[] =
13961 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13962 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13963 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13964 - 2, 2, 2, 141, 2, 2, 2, 34, 21, 2,
13965 - 37, 138, 32, 30, 136, 31, 2, 33, 2, 2,
13966 - 2, 2, 2, 2, 2, 2, 2, 2, 16, 137,
13967 + 2, 2, 2, 143, 2, 2, 2, 34, 21, 2,
13968 + 37, 140, 32, 30, 138, 31, 2, 33, 2, 2,
13969 + 2, 2, 2, 2, 2, 2, 2, 2, 16, 139,
13970 24, 6, 25, 15, 2, 2, 2, 2, 2, 2,
13971 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13972 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13973 - 2, 139, 2, 140, 20, 2, 2, 2, 2, 2,
13974 + 2, 141, 2, 142, 20, 2, 2, 2, 2, 2,
13975 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13976 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13977 - 2, 2, 2, 53, 19, 54, 142, 2, 2, 2,
13978 + 2, 2, 2, 53, 19, 54, 144, 2, 2, 2,
13979 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13980 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13981 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13982 @@ -689,13 +617,13 @@
13983 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
13984 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
13985 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,
13986 - 131, 132, 133, 134, 135
13987 + 131, 132, 133, 134, 135, 136, 137
13990 #if YYDEBUG
13991 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
13992 YYRHS. */
13993 -static const yytype_uint16 yyprhs[] =
13994 +static const unsigned short int yyprhs[] =
13996 0, 0, 3, 6, 9, 12, 15, 18, 20, 21,
13997 26, 27, 30, 34, 35, 38, 43, 45, 47, 50,
13998 @@ -721,146 +649,147 @@
13999 694, 698, 702, 706, 710, 714, 718, 722, 726, 730,
14000 734, 740, 744, 748, 753, 755, 757, 762, 767, 772,
14001 777, 782, 787, 792, 799, 806, 813, 818, 825, 830,
14002 - 832, 839, 846, 853, 858, 863, 867, 868, 873, 874,
14003 - 879, 880, 885, 886, 888, 890, 892, 893, 894, 895,
14004 - 896, 897, 898, 918, 919, 920, 921, 922, 923, 942,
14005 - 943, 944, 952, 954, 956, 958, 960, 962, 966, 967,
14006 - 970, 974, 977, 984, 995, 998, 1000, 1001, 1003, 1006,
14007 - 1007, 1008, 1012, 1013, 1014, 1015, 1016, 1028, 1033, 1034,
14008 - 1037, 1038, 1039, 1046, 1048, 1049, 1053, 1059, 1060, 1064,
14009 - 1065, 1068, 1070, 1073, 1078, 1081, 1082, 1085, 1086, 1092,
14010 - 1094, 1097, 1102, 1108, 1115, 1117, 1120, 1121, 1124, 1129,
14011 - 1134, 1143, 1145, 1147, 1151, 1155, 1156, 1166, 1167, 1175,
14012 - 1177, 1181, 1183, 1187, 1189, 1193, 1194
14013 + 832, 839, 846, 851, 856, 863, 868, 873, 877, 878,
14014 + 883, 884, 889, 890, 895, 896, 898, 900, 902, 903,
14015 + 904, 905, 906, 907, 908, 928, 929, 930, 931, 932,
14016 + 933, 952, 953, 954, 962, 964, 966, 968, 970, 972,
14017 + 976, 977, 980, 984, 987, 994, 1005, 1008, 1010, 1011,
14018 + 1013, 1016, 1017, 1018, 1022, 1023, 1024, 1025, 1026, 1038,
14019 + 1043, 1044, 1047, 1048, 1049, 1056, 1058, 1059, 1063, 1069,
14020 + 1070, 1074, 1075, 1078, 1080, 1083, 1088, 1091, 1092, 1095,
14021 + 1096, 1102, 1104, 1107, 1112, 1118, 1125, 1127, 1130, 1131,
14022 + 1134, 1139, 1144, 1153, 1155, 1157, 1161, 1165, 1166, 1176,
14023 + 1177, 1185, 1187, 1191, 1193, 1197, 1199, 1203, 1204
14026 -/* YYRHS -- A `-1'-separated list of the rules' RHS. */
14027 -static const yytype_int16 yyrhs[] =
14028 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */
14029 +static const short int yyrhs[] =
14031 - 144, 0, -1, 117, 160, -1, 118, 148, -1, 128,
14032 - 253, -1, 135, 248, -1, 119, 146, -1, 4, -1,
14033 - -1, 147, 4, 6, 210, -1, -1, 149, 150, -1,
14034 - 150, 151, 105, -1, -1, 100, 210, -1, 100, 210,
14035 - 136, 210, -1, 4, -1, 101, -1, 107, 153, -1,
14036 - 106, -1, 111, 4, 6, 210, -1, 111, 4, 136,
14037 - 210, -1, 111, 4, 210, -1, 110, 4, -1, 102,
14038 - 4, 136, 210, -1, 102, 4, 210, -1, 102, 4,
14039 - 6, 210, -1, 38, 4, 6, 210, -1, 38, 4,
14040 - 136, 210, -1, 94, 4, 6, 210, -1, 94, 4,
14041 - 136, 210, -1, 103, 155, -1, 104, 154, -1, 108,
14042 - 4, -1, 114, 4, 136, 4, -1, 114, 4, 136,
14043 - 3, -1, 113, 210, -1, 115, 3, -1, 120, 156,
14044 - -1, 121, 157, -1, -1, 61, 145, 152, 150, 36,
14045 - -1, 122, 4, -1, -1, 153, 136, 4, -1, 153,
14046 - 4, -1, -1, 4, -1, 154, 136, 4, -1, 4,
14047 - -1, 155, 136, 4, -1, -1, 4, -1, 156, 136,
14048 - 4, -1, -1, 158, 159, -1, 4, -1, 159, 4,
14049 - -1, 159, 136, 4, -1, -1, 161, 162, -1, 162,
14050 - 163, -1, -1, 192, -1, 170, -1, 240, -1, 201,
14051 - -1, 202, -1, 204, -1, 206, -1, 172, -1, 255,
14052 - -1, 137, -1, 69, 37, 4, 138, -1, 70, 37,
14053 - 145, 138, -1, 92, 37, 145, 138, -1, 56, 37,
14054 - 4, 138, -1, 56, 37, 4, 136, 4, 136, 4,
14055 - 138, -1, 58, 37, 4, 138, -1, 57, -1, 59,
14056 - -1, 90, 37, 166, 138, -1, -1, 91, 164, 37,
14057 - 166, 138, -1, 71, 37, 145, 138, -1, -1, 61,
14058 - 145, 165, 162, 36, -1, 85, 37, 207, 138, -1,
14059 - 121, 37, 157, 138, -1, 4, -1, 166, 136, 4,
14060 - -1, 166, 4, -1, 5, -1, 166, 136, 5, -1,
14061 - 166, 5, -1, -1, 99, 37, 167, 166, 138, -1,
14062 - -1, 166, 136, 99, 37, 168, 166, 138, -1, -1,
14063 - 166, 99, 37, 169, 166, 138, -1, 46, 53, 171,
14064 - 54, -1, 171, 216, -1, 171, 172, -1, -1, 72,
14065 - 37, 4, 138, -1, 190, 189, -1, -1, 109, 173,
14066 - 37, 210, 136, 4, 138, -1, 4, -1, 32, -1,
14067 - 15, -1, 174, -1, 133, 37, 176, 138, 174, -1,
14068 - 51, 37, 174, 138, -1, 52, 37, 174, 138, -1,
14069 - 51, 37, 52, 37, 174, 138, 138, -1, 51, 37,
14070 - 51, 37, 174, 138, 138, -1, 52, 37, 51, 37,
14071 - 174, 138, 138, -1, 52, 37, 52, 37, 174, 138,
14072 - 138, -1, 51, 37, 133, 37, 176, 138, 174, 138,
14073 - -1, 176, 174, -1, 174, -1, 177, 191, 175, -1,
14074 - 175, -1, 4, -1, 139, 177, 140, -1, 175, 37,
14075 - 177, 138, -1, 178, -1, -1, 129, 37, 180, 178,
14076 - 138, -1, 190, 189, -1, 89, -1, 137, -1, 93,
14077 - -1, 51, 37, 93, 138, -1, 179, -1, 185, 37,
14078 - 208, 138, -1, 87, 37, 186, 138, -1, -1, 109,
14079 - 182, 37, 210, 136, 4, 138, 189, -1, 183, 181,
14080 - -1, 181, -1, -1, 183, -1, 41, -1, 42, -1,
14081 - 43, -1, 44, -1, 45, -1, 208, -1, 6, 186,
14082 + 146, 0, -1, 119, 162, -1, 120, 150, -1, 130,
14083 + 255, -1, 137, 250, -1, 121, 148, -1, 4, -1,
14084 + -1, 149, 4, 6, 212, -1, -1, 151, 152, -1,
14085 + 152, 153, 107, -1, -1, 102, 212, -1, 102, 212,
14086 + 138, 212, -1, 4, -1, 103, -1, 109, 155, -1,
14087 + 108, -1, 113, 4, 6, 212, -1, 113, 4, 138,
14088 + 212, -1, 113, 4, 212, -1, 112, 4, -1, 104,
14089 + 4, 138, 212, -1, 104, 4, 212, -1, 104, 4,
14090 + 6, 212, -1, 38, 4, 6, 212, -1, 38, 4,
14091 + 138, 212, -1, 96, 4, 6, 212, -1, 96, 4,
14092 + 138, 212, -1, 105, 157, -1, 106, 156, -1, 110,
14093 + 4, -1, 116, 4, 138, 4, -1, 116, 4, 138,
14094 + 3, -1, 115, 212, -1, 117, 3, -1, 122, 158,
14095 + -1, 123, 159, -1, -1, 61, 147, 154, 152, 36,
14096 + -1, 124, 4, -1, -1, 155, 138, 4, -1, 155,
14097 + 4, -1, -1, 4, -1, 156, 138, 4, -1, 4,
14098 + -1, 157, 138, 4, -1, -1, 4, -1, 158, 138,
14099 + 4, -1, -1, 160, 161, -1, 4, -1, 161, 4,
14100 + -1, 161, 138, 4, -1, -1, 163, 164, -1, 164,
14101 + 165, -1, -1, 194, -1, 172, -1, 242, -1, 203,
14102 + -1, 204, -1, 206, -1, 208, -1, 174, -1, 257,
14103 + -1, 139, -1, 69, 37, 4, 140, -1, 70, 37,
14104 + 147, 140, -1, 94, 37, 147, 140, -1, 56, 37,
14105 + 4, 140, -1, 56, 37, 4, 138, 4, 138, 4,
14106 + 140, -1, 58, 37, 4, 140, -1, 57, -1, 59,
14107 + -1, 92, 37, 168, 140, -1, -1, 93, 166, 37,
14108 + 168, 140, -1, 71, 37, 147, 140, -1, -1, 61,
14109 + 147, 167, 164, 36, -1, 87, 37, 209, 140, -1,
14110 + 123, 37, 159, 140, -1, 4, -1, 168, 138, 4,
14111 + -1, 168, 4, -1, 5, -1, 168, 138, 5, -1,
14112 + 168, 5, -1, -1, 101, 37, 169, 168, 140, -1,
14113 + -1, 168, 138, 101, 37, 170, 168, 140, -1, -1,
14114 + 168, 101, 37, 171, 168, 140, -1, 46, 53, 173,
14115 + 54, -1, 173, 218, -1, 173, 174, -1, -1, 72,
14116 + 37, 4, 140, -1, 192, 191, -1, -1, 111, 175,
14117 + 37, 212, 138, 4, 140, -1, 4, -1, 32, -1,
14118 + 15, -1, 176, -1, 135, 37, 178, 140, 176, -1,
14119 + 51, 37, 176, 140, -1, 52, 37, 176, 140, -1,
14120 + 51, 37, 52, 37, 176, 140, 140, -1, 51, 37,
14121 + 51, 37, 176, 140, 140, -1, 52, 37, 51, 37,
14122 + 176, 140, 140, -1, 52, 37, 52, 37, 176, 140,
14123 + 140, -1, 51, 37, 135, 37, 178, 140, 176, 140,
14124 + -1, 178, 176, -1, 176, -1, 179, 193, 177, -1,
14125 + 177, -1, 4, -1, 141, 179, 142, -1, 177, 37,
14126 + 179, 140, -1, 180, -1, -1, 131, 37, 182, 180,
14127 + 140, -1, 192, 191, -1, 91, -1, 139, -1, 95,
14128 + -1, 51, 37, 95, 140, -1, 181, -1, 187, 37,
14129 + 210, 140, -1, 89, 37, 188, 140, -1, -1, 111,
14130 + 184, 37, 212, 138, 4, 140, 191, -1, 185, 183,
14131 + -1, 183, -1, -1, 185, -1, 41, -1, 42, -1,
14132 + 43, -1, 44, -1, 45, -1, 210, -1, 6, 188,
14133 -1, -1, 14, -1, 13, -1, 12, -1, 11, -1,
14134 - 10, -1, 9, -1, 8, -1, 7, -1, 137, -1,
14135 - 136, -1, 4, 6, 208, -1, 4, 188, 208, -1,
14136 - 97, 37, 4, 6, 208, 138, -1, 98, 37, 4,
14137 - 6, 208, 138, -1, 136, -1, -1, 62, 53, 194,
14138 - 193, 54, -1, 193, 194, -1, 193, 136, 194, -1,
14139 - -1, -1, 4, 195, 198, 16, 196, 191, 197, -1,
14140 - 86, 6, 208, -1, 88, 6, 208, -1, -1, 37,
14141 - 199, 138, -1, 200, -1, 199, 200, -1, 4, -1,
14142 - 141, 4, -1, 80, 37, 145, 138, -1, 81, 37,
14143 - 203, 138, -1, 81, 37, 138, -1, 203, 191, 145,
14144 - -1, 145, -1, 82, 37, 205, 138, -1, 205, 191,
14145 - 145, -1, -1, 83, -1, 84, -1, -1, 4, 207,
14146 - -1, 4, 136, 207, -1, -1, 209, 210, -1, 31,
14147 - 210, -1, 37, 210, 138, -1, 73, 37, 210, 138,
14148 - -1, 141, 210, -1, 30, 210, -1, 142, 210, -1,
14149 - 210, 32, 210, -1, 210, 33, 210, -1, 210, 34,
14150 - 210, -1, 210, 30, 210, -1, 210, 31, 210, -1,
14151 - 210, 29, 210, -1, 210, 28, 210, -1, 210, 23,
14152 - 210, -1, 210, 22, 210, -1, 210, 27, 210, -1,
14153 - 210, 26, 210, -1, 210, 24, 210, -1, 210, 25,
14154 - 210, -1, 210, 21, 210, -1, 210, 20, 210, -1,
14155 - 210, 19, 210, -1, 210, 15, 210, 16, 210, -1,
14156 - 210, 18, 210, -1, 210, 17, 210, -1, 68, 37,
14157 - 4, 138, -1, 3, -1, 55, -1, 75, 37, 4,
14158 - 138, -1, 74, 37, 4, 138, -1, 76, 37, 4,
14159 - 138, -1, 77, 37, 4, 138, -1, 134, 37, 4,
14160 - 138, -1, 103, 37, 210, 138, -1, 38, 37, 210,
14161 - 138, -1, 38, 37, 210, 136, 210, 138, -1, 48,
14162 - 37, 210, 136, 210, 138, -1, 49, 37, 210, 136,
14163 - 210, 138, -1, 50, 37, 210, 138, -1, 60, 37,
14164 - 4, 136, 210, 138, -1, 39, 37, 210, 138, -1,
14165 - 4, -1, 78, 37, 210, 136, 210, 138, -1, 79,
14166 - 37, 210, 136, 210, 138, -1, 109, 37, 210, 136,
14167 - 4, 138, -1, 86, 37, 4, 138, -1, 88, 37,
14168 - 4, 138, -1, 95, 25, 4, -1, -1, 95, 37,
14169 - 210, 138, -1, -1, 38, 37, 210, 138, -1, -1,
14170 - 96, 37, 210, 138, -1, -1, 130, -1, 131, -1,
14171 - 132, -1, -1, -1, -1, -1, -1, -1, 4, 217,
14172 - 231, 212, 213, 214, 218, 215, 53, 219, 184, 54,
14173 - 220, 234, 211, 235, 187, 221, 191, -1, -1, -1,
14174 - -1, -1, -1, 67, 222, 232, 233, 212, 214, 223,
14175 - 53, 224, 236, 54, 225, 234, 211, 235, 187, 226,
14176 - 191, -1, -1, -1, 91, 227, 231, 228, 53, 171,
14177 + 10, -1, 9, -1, 8, -1, 7, -1, 139, -1,
14178 + 138, -1, 4, 6, 210, -1, 4, 190, 210, -1,
14179 + 99, 37, 4, 6, 210, 140, -1, 100, 37, 4,
14180 + 6, 210, 140, -1, 138, -1, -1, 62, 53, 196,
14181 + 195, 54, -1, 195, 196, -1, 195, 138, 196, -1,
14182 + -1, -1, 4, 197, 200, 16, 198, 193, 199, -1,
14183 + 88, 6, 210, -1, 90, 6, 210, -1, -1, 37,
14184 + 201, 140, -1, 202, -1, 201, 202, -1, 4, -1,
14185 + 143, 4, -1, 82, 37, 147, 140, -1, 83, 37,
14186 + 205, 140, -1, 83, 37, 140, -1, 205, 193, 147,
14187 + -1, 147, -1, 84, 37, 207, 140, -1, 207, 193,
14188 + 147, -1, -1, 85, -1, 86, -1, -1, 4, 209,
14189 + -1, 4, 138, 209, -1, -1, 211, 212, -1, 31,
14190 + 212, -1, 37, 212, 140, -1, 73, 37, 212, 140,
14191 + -1, 143, 212, -1, 30, 212, -1, 144, 212, -1,
14192 + 212, 32, 212, -1, 212, 33, 212, -1, 212, 34,
14193 + 212, -1, 212, 30, 212, -1, 212, 31, 212, -1,
14194 + 212, 29, 212, -1, 212, 28, 212, -1, 212, 23,
14195 + 212, -1, 212, 22, 212, -1, 212, 27, 212, -1,
14196 + 212, 26, 212, -1, 212, 24, 212, -1, 212, 25,
14197 + 212, -1, 212, 21, 212, -1, 212, 20, 212, -1,
14198 + 212, 19, 212, -1, 212, 15, 212, 16, 212, -1,
14199 + 212, 18, 212, -1, 212, 17, 212, -1, 68, 37,
14200 + 4, 140, -1, 3, -1, 55, -1, 75, 37, 4,
14201 + 140, -1, 74, 37, 4, 140, -1, 76, 37, 4,
14202 + 140, -1, 77, 37, 4, 140, -1, 136, 37, 4,
14203 + 140, -1, 105, 37, 212, 140, -1, 38, 37, 212,
14204 + 140, -1, 38, 37, 212, 138, 212, 140, -1, 48,
14205 + 37, 212, 138, 212, 140, -1, 49, 37, 212, 138,
14206 + 212, 140, -1, 50, 37, 212, 140, -1, 60, 37,
14207 + 4, 138, 212, 140, -1, 39, 37, 212, 140, -1,
14208 + 4, -1, 78, 37, 212, 138, 212, 140, -1, 79,
14209 + 37, 212, 138, 212, 140, -1, 80, 37, 212, 140,
14210 + -1, 81, 37, 212, 140, -1, 111, 37, 212, 138,
14211 + 4, 140, -1, 88, 37, 4, 140, -1, 90, 37,
14212 + 4, 140, -1, 97, 25, 4, -1, -1, 97, 37,
14213 + 212, 140, -1, -1, 38, 37, 212, 140, -1, -1,
14214 + 98, 37, 212, 140, -1, -1, 132, -1, 133, -1,
14215 + 134, -1, -1, -1, -1, -1, -1, -1, 4, 219,
14216 + 233, 214, 215, 216, 220, 217, 53, 221, 186, 54,
14217 + 222, 236, 213, 237, 189, 223, 193, -1, -1, -1,
14218 + -1, -1, -1, 67, 224, 234, 235, 214, 216, 225,
14219 + 53, 226, 238, 54, 227, 236, 213, 237, 189, 228,
14220 + 193, -1, -1, -1, 93, 229, 233, 230, 53, 173,
14221 54, -1, 63, -1, 64, -1, 65, -1, 66, -1,
14222 - 67, -1, 37, 229, 138, -1, -1, 37, 138, -1,
14223 - 210, 230, 16, -1, 230, 16, -1, 40, 37, 210,
14224 - 138, 230, 16, -1, 40, 37, 210, 138, 39, 37,
14225 - 210, 138, 230, 16, -1, 210, 16, -1, 16, -1,
14226 - -1, 85, -1, 25, 4, -1, -1, -1, 235, 16,
14227 - 4, -1, -1, -1, -1, -1, 236, 4, 237, 53,
14228 - 184, 54, 238, 235, 187, 239, 191, -1, 47, 53,
14229 - 241, 54, -1, -1, 241, 242, -1, -1, -1, 4,
14230 - 243, 245, 246, 244, 137, -1, 210, -1, -1, 4,
14231 - 247, 246, -1, 95, 37, 210, 138, 246, -1, -1,
14232 - 37, 210, 138, -1, -1, 249, 250, -1, 251, -1,
14233 - 250, 251, -1, 53, 252, 54, 137, -1, 261, 137,
14234 - -1, -1, 254, 257, -1, -1, 256, 127, 53, 257,
14235 - 54, -1, 258, -1, 257, 258, -1, 53, 260, 54,
14236 - 137, -1, 123, 53, 260, 54, 137, -1, 123, 53,
14237 - 260, 54, 259, 137, -1, 123, -1, 259, 123, -1,
14238 - -1, 261, 137, -1, 125, 16, 261, 137, -1, 126,
14239 - 16, 261, 137, -1, 125, 16, 261, 137, 126, 16,
14240 - 261, 137, -1, 124, -1, 4, -1, 261, 137, 124,
14241 - -1, 261, 137, 4, -1, -1, 261, 137, 121, 4,
14242 - 53, 262, 261, 264, 54, -1, -1, 121, 4, 53,
14243 - 263, 261, 264, 54, -1, 125, -1, 261, 137, 125,
14244 - -1, 126, -1, 261, 137, 126, -1, 121, -1, 261,
14245 - 137, 121, -1, -1, 137, -1
14246 + 67, -1, 37, 231, 140, -1, -1, 37, 140, -1,
14247 + 212, 232, 16, -1, 232, 16, -1, 40, 37, 212,
14248 + 140, 232, 16, -1, 40, 37, 212, 140, 39, 37,
14249 + 212, 140, 232, 16, -1, 212, 16, -1, 16, -1,
14250 + -1, 87, -1, 25, 4, -1, -1, -1, 237, 16,
14251 + 4, -1, -1, -1, -1, -1, 238, 4, 239, 53,
14252 + 186, 54, 240, 237, 189, 241, 193, -1, 47, 53,
14253 + 243, 54, -1, -1, 243, 244, -1, -1, -1, 4,
14254 + 245, 247, 248, 246, 139, -1, 212, -1, -1, 4,
14255 + 249, 248, -1, 97, 37, 212, 140, 248, -1, -1,
14256 + 37, 212, 140, -1, -1, 251, 252, -1, 253, -1,
14257 + 252, 253, -1, 53, 254, 54, 139, -1, 263, 139,
14258 + -1, -1, 256, 259, -1, -1, 258, 129, 53, 259,
14259 + 54, -1, 260, -1, 259, 260, -1, 53, 262, 54,
14260 + 139, -1, 125, 53, 262, 54, 139, -1, 125, 53,
14261 + 262, 54, 261, 139, -1, 125, -1, 261, 125, -1,
14262 + -1, 263, 139, -1, 127, 16, 263, 139, -1, 128,
14263 + 16, 263, 139, -1, 127, 16, 263, 139, 128, 16,
14264 + 263, 139, -1, 126, -1, 4, -1, 263, 139, 126,
14265 + -1, 263, 139, 4, -1, -1, 263, 139, 123, 4,
14266 + 53, 264, 263, 266, 54, -1, -1, 123, 4, 53,
14267 + 265, 263, 266, 54, -1, 127, -1, 263, 139, 127,
14268 + -1, 128, -1, 263, 139, 128, -1, 123, -1, 263,
14269 + 139, 123, -1, -1, 139, -1
14272 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
14273 -static const yytype_uint16 yyrline[] =
14274 +static const unsigned short int yyrline[] =
14276 0, 164, 164, 165, 166, 167, 168, 172, 176, 176,
14277 186, 186, 199, 200, 204, 205, 206, 209, 212, 213,
14278 @@ -886,23 +815,23 @@
14279 811, 813, 815, 817, 819, 821, 823, 825, 827, 829,
14280 831, 833, 835, 837, 839, 841, 844, 846, 848, 850,
14281 852, 854, 856, 858, 860, 862, 864, 866, 875, 877,
14282 - 879, 881, 883, 885, 887, 893, 894, 898, 899, 903,
14283 - 904, 908, 909, 913, 914, 915, 916, 919, 923, 926,
14284 - 932, 934, 919, 941, 943, 945, 950, 952, 940, 962,
14285 - 964, 962, 972, 973, 974, 975, 976, 980, 981, 982,
14286 - 986, 987, 992, 993, 998, 999, 1004, 1005, 1010, 1012,
14287 - 1017, 1020, 1033, 1037, 1042, 1044, 1035, 1052, 1055, 1057,
14288 - 1061, 1062, 1061, 1071, 1116, 1119, 1131, 1140, 1143, 1150,
14289 - 1150, 1162, 1163, 1167, 1171, 1180, 1180, 1194, 1194, 1204,
14290 - 1205, 1209, 1213, 1217, 1224, 1228, 1236, 1239, 1243, 1247,
14291 - 1251, 1258, 1262, 1266, 1270, 1275, 1274, 1288, 1287, 1297,
14292 - 1301, 1305, 1309, 1313, 1317, 1323, 1325
14293 + 879, 881, 883, 885, 887, 889, 891, 897, 898, 902,
14294 + 903, 907, 908, 912, 913, 917, 918, 919, 920, 923,
14295 + 927, 930, 936, 938, 923, 945, 947, 949, 954, 956,
14296 + 944, 966, 968, 966, 976, 977, 978, 979, 980, 984,
14297 + 985, 986, 990, 991, 996, 997, 1002, 1003, 1008, 1009,
14298 + 1014, 1016, 1021, 1024, 1037, 1041, 1046, 1048, 1039, 1056,
14299 + 1059, 1061, 1065, 1066, 1065, 1075, 1120, 1123, 1135, 1144,
14300 + 1147, 1154, 1154, 1166, 1167, 1171, 1175, 1184, 1184, 1198,
14301 + 1198, 1208, 1209, 1213, 1217, 1221, 1228, 1232, 1240, 1243,
14302 + 1247, 1251, 1255, 1262, 1266, 1270, 1274, 1279, 1278, 1292,
14303 + 1291, 1301, 1305, 1309, 1313, 1317, 1321, 1327, 1329
14305 #endif
14307 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
14308 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
14309 - First, the terminals, then, starting at YYNTOKENS, nonterminals. */
14310 + First, the terminals, then, starting at YYNTOKENS, nonterminals. */
14311 static const char *const yytname[] =
14313 "$end", "error", "$undefined", "INT", "NAME", "LNAME", "'='", "OREQ",
14314 @@ -916,50 +845,51 @@
14315 "FORCE_COMMON_ALLOCATION", "OUTPUT_ARCH", "INHIBIT_COMMON_ALLOCATION",
14316 "SEGMENT_START", "INCLUDE", "MEMORY", "NOLOAD", "DSECT", "COPY", "INFO",
14317 "OVERLAY", "DEFINED", "TARGET_K", "SEARCH_DIR", "MAP", "ENTRY", "NEXT",
14318 - "SIZEOF", "ALIGNOF", "ADDR", "LOADADDR", "MAX_K", "MIN_K", "STARTUP",
14319 - "HLL", "SYSLIB", "FLOAT", "NOFLOAT", "NOCROSSREFS", "ORIGIN", "FILL",
14320 - "LENGTH", "CREATE_OBJECT_SYMBOLS", "INPUT", "GROUP", "OUTPUT",
14321 - "CONSTRUCTORS", "ALIGNMOD", "AT", "SUBALIGN", "PROVIDE",
14322 - "PROVIDE_HIDDEN", "AS_NEEDED", "CHIP", "LIST", "SECT", "ABSOLUTE",
14323 - "LOAD", "NEWLINE", "ENDWORD", "ORDER", "NAMEWORD", "ASSERT_K", "FORMAT",
14324 - "PUBLIC", "DEFSYMEND", "BASE", "ALIAS", "TRUNCATE", "REL",
14325 - "INPUT_SCRIPT", "INPUT_MRI_SCRIPT", "INPUT_DEFSYM", "CASE", "EXTERN",
14326 - "START", "VERS_TAG", "VERS_IDENTIFIER", "GLOBAL", "LOCAL", "VERSIONK",
14327 - "INPUT_VERSION_SCRIPT", "KEEP", "ONLY_IF_RO", "ONLY_IF_RW", "SPECIAL",
14328 - "EXCLUDE_FILE", "CONSTANT", "INPUT_DYNAMIC_LIST", "','", "';'", "')'",
14329 - "'['", "']'", "'!'", "'~'", "$accept", "file", "filename", "defsym_expr",
14330 - "@1", "mri_script_file", "@2", "mri_script_lines", "mri_script_command",
14331 - "@3", "ordernamelist", "mri_load_name_list", "mri_abs_name_list",
14332 - "casesymlist", "extern_name_list", "@4", "extern_name_list_body",
14333 - "script_file", "@5", "ifile_list", "ifile_p1", "@6", "@7", "input_list",
14334 - "@8", "@9", "@10", "sections", "sec_or_group_p1", "statement_anywhere",
14335 - "@11", "wildcard_name", "wildcard_spec", "exclude_name_list",
14336 - "file_NAME_list", "input_section_spec_no_keep", "input_section_spec",
14337 - "@12", "statement", "@13", "statement_list", "statement_list_opt",
14338 - "length", "fill_exp", "fill_opt", "assign_op", "end", "assignment",
14339 - "opt_comma", "memory", "memory_spec_list", "memory_spec", "@14",
14340 - "origin_spec", "length_spec", "attributes_opt", "attributes_list",
14341 - "attributes_string", "startup", "high_level_library",
14342 - "high_level_library_NAME_list", "low_level_library",
14343 - "low_level_library_NAME_list", "floating_point_support",
14344 - "nocrossref_list", "mustbe_exp", "@15", "exp", "memspec_at_opt",
14345 - "opt_at", "opt_align", "opt_subalign", "sect_constraint", "section",
14346 - "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25",
14347 - "@26", "@27", "type", "atype", "opt_exp_with_type",
14348 - "opt_exp_without_type", "opt_nocrossrefs", "memspec_opt", "phdr_opt",
14349 - "overlay_section", "@28", "@29", "@30", "phdrs", "phdr_list", "phdr",
14350 - "@31", "@32", "phdr_type", "phdr_qualifiers", "phdr_val",
14351 - "dynamic_list_file", "@33", "dynamic_list_nodes", "dynamic_list_node",
14352 - "dynamic_list_tag", "version_script_file", "@34", "version", "@35",
14353 - "vers_nodes", "vers_node", "verdep", "vers_tag", "vers_defns", "@36",
14354 - "@37", "opt_semicolon", 0
14355 + "SIZEOF", "ALIGNOF", "ADDR", "LOADADDR", "MAX_K", "MIN_K", "CEILP2",
14356 + "NACL_MASK", "STARTUP", "HLL", "SYSLIB", "FLOAT", "NOFLOAT",
14357 + "NOCROSSREFS", "ORIGIN", "FILL", "LENGTH", "CREATE_OBJECT_SYMBOLS",
14358 + "INPUT", "GROUP", "OUTPUT", "CONSTRUCTORS", "ALIGNMOD", "AT", "SUBALIGN",
14359 + "PROVIDE", "PROVIDE_HIDDEN", "AS_NEEDED", "CHIP", "LIST", "SECT",
14360 + "ABSOLUTE", "LOAD", "NEWLINE", "ENDWORD", "ORDER", "NAMEWORD",
14361 + "ASSERT_K", "FORMAT", "PUBLIC", "DEFSYMEND", "BASE", "ALIAS", "TRUNCATE",
14362 + "REL", "INPUT_SCRIPT", "INPUT_MRI_SCRIPT", "INPUT_DEFSYM", "CASE",
14363 + "EXTERN", "START", "VERS_TAG", "VERS_IDENTIFIER", "GLOBAL", "LOCAL",
14364 + "VERSIONK", "INPUT_VERSION_SCRIPT", "KEEP", "ONLY_IF_RO", "ONLY_IF_RW",
14365 + "SPECIAL", "EXCLUDE_FILE", "CONSTANT", "INPUT_DYNAMIC_LIST", "','",
14366 + "';'", "')'", "'['", "']'", "'!'", "'~'", "$accept", "file", "filename",
14367 + "defsym_expr", "@1", "mri_script_file", "@2", "mri_script_lines",
14368 + "mri_script_command", "@3", "ordernamelist", "mri_load_name_list",
14369 + "mri_abs_name_list", "casesymlist", "extern_name_list", "@4",
14370 + "extern_name_list_body", "script_file", "@5", "ifile_list", "ifile_p1",
14371 + "@6", "@7", "input_list", "@8", "@9", "@10", "sections",
14372 + "sec_or_group_p1", "statement_anywhere", "@11", "wildcard_name",
14373 + "wildcard_spec", "exclude_name_list", "file_NAME_list",
14374 + "input_section_spec_no_keep", "input_section_spec", "@12", "statement",
14375 + "@13", "statement_list", "statement_list_opt", "length", "fill_exp",
14376 + "fill_opt", "assign_op", "end", "assignment", "opt_comma", "memory",
14377 + "memory_spec_list", "memory_spec", "@14", "origin_spec", "length_spec",
14378 + "attributes_opt", "attributes_list", "attributes_string", "startup",
14379 + "high_level_library", "high_level_library_NAME_list",
14380 + "low_level_library", "low_level_library_NAME_list",
14381 + "floating_point_support", "nocrossref_list", "mustbe_exp", "@15", "exp",
14382 + "memspec_at_opt", "opt_at", "opt_align", "opt_subalign",
14383 + "sect_constraint", "section", "@16", "@17", "@18", "@19", "@20", "@21",
14384 + "@22", "@23", "@24", "@25", "@26", "@27", "type", "atype",
14385 + "opt_exp_with_type", "opt_exp_without_type", "opt_nocrossrefs",
14386 + "memspec_opt", "phdr_opt", "overlay_section", "@28", "@29", "@30",
14387 + "phdrs", "phdr_list", "phdr", "@31", "@32", "phdr_type",
14388 + "phdr_qualifiers", "phdr_val", "dynamic_list_file", "@33",
14389 + "dynamic_list_nodes", "dynamic_list_node", "dynamic_list_tag",
14390 + "version_script_file", "@34", "version", "@35", "vers_nodes",
14391 + "vers_node", "verdep", "vers_tag", "vers_defns", "@36", "@37",
14392 + "opt_semicolon", 0
14394 #endif
14396 # ifdef YYPRINT
14397 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
14398 token YYLEX-NUM. */
14399 -static const yytype_uint16 yytoknum[] =
14400 +static const unsigned short int yytoknum[] =
14402 0, 256, 257, 258, 259, 260, 61, 261, 262, 263,
14403 264, 265, 266, 267, 268, 63, 58, 269, 270, 124,
14404 @@ -974,53 +904,53 @@
14405 339, 340, 341, 342, 343, 344, 345, 346, 347, 348,
14406 349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
14407 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
14408 - 369, 370, 371, 372, 373, 374, 44, 59, 41, 91,
14409 - 93, 33, 126
14410 + 369, 370, 371, 372, 373, 374, 375, 376, 44, 59,
14411 + 41, 91, 93, 33, 126
14413 # endif
14415 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
14416 -static const yytype_uint16 yyr1[] =
14417 +static const unsigned short int yyr1[] =
14419 - 0, 143, 144, 144, 144, 144, 144, 145, 147, 146,
14420 - 149, 148, 150, 150, 151, 151, 151, 151, 151, 151,
14421 - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
14422 - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
14423 - 152, 151, 151, 151, 153, 153, 153, 154, 154, 155,
14424 - 155, 156, 156, 156, 158, 157, 159, 159, 159, 161,
14425 - 160, 162, 162, 163, 163, 163, 163, 163, 163, 163,
14426 - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
14427 - 163, 163, 164, 163, 163, 165, 163, 163, 163, 166,
14428 - 166, 166, 166, 166, 166, 167, 166, 168, 166, 169,
14429 - 166, 170, 171, 171, 171, 172, 172, 173, 172, 174,
14430 - 174, 174, 175, 175, 175, 175, 175, 175, 175, 175,
14431 - 175, 176, 176, 177, 177, 178, 178, 178, 179, 180,
14432 - 179, 181, 181, 181, 181, 181, 181, 181, 181, 182,
14433 - 181, 183, 183, 184, 184, 185, 185, 185, 185, 185,
14434 - 186, 187, 187, 188, 188, 188, 188, 188, 188, 188,
14435 - 188, 189, 189, 190, 190, 190, 190, 191, 191, 192,
14436 - 193, 193, 193, 195, 194, 196, 197, 198, 198, 199,
14437 - 199, 200, 200, 201, 202, 202, 203, 203, 204, 205,
14438 - 205, 206, 206, 207, 207, 207, 209, 208, 210, 210,
14439 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
14440 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
14441 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
14442 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
14443 - 210, 210, 210, 210, 210, 211, 211, 212, 212, 213,
14444 - 213, 214, 214, 215, 215, 215, 215, 217, 218, 219,
14445 - 220, 221, 216, 222, 223, 224, 225, 226, 216, 227,
14446 - 228, 216, 229, 229, 229, 229, 229, 230, 230, 230,
14447 - 231, 231, 231, 231, 232, 232, 233, 233, 234, 234,
14448 - 235, 235, 236, 237, 238, 239, 236, 240, 241, 241,
14449 - 243, 244, 242, 245, 246, 246, 246, 247, 247, 249,
14450 - 248, 250, 250, 251, 252, 254, 253, 256, 255, 257,
14451 - 257, 258, 258, 258, 259, 259, 260, 260, 260, 260,
14452 - 260, 261, 261, 261, 261, 262, 261, 263, 261, 261,
14453 - 261, 261, 261, 261, 261, 264, 264
14454 + 0, 145, 146, 146, 146, 146, 146, 147, 149, 148,
14455 + 151, 150, 152, 152, 153, 153, 153, 153, 153, 153,
14456 + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
14457 + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
14458 + 154, 153, 153, 153, 155, 155, 155, 156, 156, 157,
14459 + 157, 158, 158, 158, 160, 159, 161, 161, 161, 163,
14460 + 162, 164, 164, 165, 165, 165, 165, 165, 165, 165,
14461 + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
14462 + 165, 165, 166, 165, 165, 167, 165, 165, 165, 168,
14463 + 168, 168, 168, 168, 168, 169, 168, 170, 168, 171,
14464 + 168, 172, 173, 173, 173, 174, 174, 175, 174, 176,
14465 + 176, 176, 177, 177, 177, 177, 177, 177, 177, 177,
14466 + 177, 178, 178, 179, 179, 180, 180, 180, 181, 182,
14467 + 181, 183, 183, 183, 183, 183, 183, 183, 183, 184,
14468 + 183, 185, 185, 186, 186, 187, 187, 187, 187, 187,
14469 + 188, 189, 189, 190, 190, 190, 190, 190, 190, 190,
14470 + 190, 191, 191, 192, 192, 192, 192, 193, 193, 194,
14471 + 195, 195, 195, 197, 196, 198, 199, 200, 200, 201,
14472 + 201, 202, 202, 203, 204, 204, 205, 205, 206, 207,
14473 + 207, 208, 208, 209, 209, 209, 211, 210, 212, 212,
14474 + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
14475 + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
14476 + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
14477 + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
14478 + 212, 212, 212, 212, 212, 212, 212, 213, 213, 214,
14479 + 214, 215, 215, 216, 216, 217, 217, 217, 217, 219,
14480 + 220, 221, 222, 223, 218, 224, 225, 226, 227, 228,
14481 + 218, 229, 230, 218, 231, 231, 231, 231, 231, 232,
14482 + 232, 232, 233, 233, 233, 233, 234, 234, 235, 235,
14483 + 236, 236, 237, 237, 238, 239, 240, 241, 238, 242,
14484 + 243, 243, 245, 246, 244, 247, 248, 248, 248, 249,
14485 + 249, 251, 250, 252, 252, 253, 254, 256, 255, 258,
14486 + 257, 259, 259, 260, 260, 260, 261, 261, 262, 262,
14487 + 262, 262, 262, 263, 263, 263, 263, 264, 263, 265,
14488 + 263, 263, 263, 263, 263, 263, 263, 266, 266
14491 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
14492 -static const yytype_uint8 yyr2[] =
14493 +static const unsigned char yyr2[] =
14495 0, 2, 2, 2, 2, 2, 2, 1, 0, 4,
14496 0, 2, 3, 0, 2, 4, 1, 1, 2, 1,
14497 @@ -1046,652 +976,667 @@
14498 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
14499 5, 3, 3, 4, 1, 1, 4, 4, 4, 4,
14500 4, 4, 4, 6, 6, 6, 4, 6, 4, 1,
14501 - 6, 6, 6, 4, 4, 3, 0, 4, 0, 4,
14502 - 0, 4, 0, 1, 1, 1, 0, 0, 0, 0,
14503 - 0, 0, 19, 0, 0, 0, 0, 0, 18, 0,
14504 - 0, 7, 1, 1, 1, 1, 1, 3, 0, 2,
14505 - 3, 2, 6, 10, 2, 1, 0, 1, 2, 0,
14506 - 0, 3, 0, 0, 0, 0, 11, 4, 0, 2,
14507 - 0, 0, 6, 1, 0, 3, 5, 0, 3, 0,
14508 - 2, 1, 2, 4, 2, 0, 2, 0, 5, 1,
14509 - 2, 4, 5, 6, 1, 2, 0, 2, 4, 4,
14510 - 8, 1, 1, 3, 3, 0, 9, 0, 7, 1,
14511 - 3, 1, 3, 1, 3, 0, 1
14512 + 6, 6, 4, 4, 6, 4, 4, 3, 0, 4,
14513 + 0, 4, 0, 4, 0, 1, 1, 1, 0, 0,
14514 + 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
14515 + 18, 0, 0, 7, 1, 1, 1, 1, 1, 3,
14516 + 0, 2, 3, 2, 6, 10, 2, 1, 0, 1,
14517 + 2, 0, 0, 3, 0, 0, 0, 0, 11, 4,
14518 + 0, 2, 0, 0, 6, 1, 0, 3, 5, 0,
14519 + 3, 0, 2, 1, 2, 4, 2, 0, 2, 0,
14520 + 5, 1, 2, 4, 5, 6, 1, 2, 0, 2,
14521 + 4, 4, 8, 1, 1, 3, 3, 0, 9, 0,
14522 + 7, 1, 3, 1, 3, 1, 3, 0, 1
14525 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
14526 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
14527 means the default is an error. */
14528 -static const yytype_uint16 yydefact[] =
14529 +static const unsigned short int yydefact[] =
14531 - 0, 59, 10, 8, 315, 309, 0, 2, 62, 3,
14532 + 0, 59, 10, 8, 317, 311, 0, 2, 62, 3,
14533 13, 6, 0, 4, 0, 5, 0, 1, 60, 11,
14534 - 0, 326, 0, 316, 319, 0, 310, 311, 0, 0,
14535 + 0, 328, 0, 318, 321, 0, 312, 313, 0, 0,
14536 0, 0, 79, 0, 80, 0, 0, 0, 0, 0,
14537 0, 0, 0, 0, 191, 192, 0, 0, 82, 0,
14538 0, 0, 107, 0, 72, 61, 64, 70, 0, 63,
14539 66, 67, 68, 69, 65, 71, 0, 16, 0, 0,
14540 0, 0, 17, 0, 0, 0, 19, 46, 0, 0,
14541 - 0, 0, 0, 0, 51, 54, 0, 0, 0, 332,
14542 - 343, 331, 339, 341, 0, 0, 326, 320, 339, 341,
14543 - 0, 0, 312, 196, 160, 159, 158, 157, 156, 155,
14544 - 154, 153, 196, 104, 298, 0, 0, 7, 85, 0,
14545 + 0, 0, 0, 0, 51, 54, 0, 0, 0, 334,
14546 + 345, 333, 341, 343, 0, 0, 328, 322, 341, 343,
14547 + 0, 0, 314, 196, 160, 159, 158, 157, 156, 155,
14548 + 154, 153, 196, 104, 300, 0, 0, 7, 85, 0,
14549 0, 0, 0, 0, 0, 0, 190, 193, 0, 0,
14550 0, 0, 0, 0, 54, 162, 161, 106, 0, 0,
14551 40, 0, 224, 239, 0, 0, 0, 0, 0, 0,
14552 0, 0, 225, 0, 0, 0, 0, 0, 0, 0,
14553 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 14,
14554 - 0, 49, 31, 47, 32, 18, 33, 23, 0, 36,
14555 - 0, 37, 52, 38, 39, 0, 42, 12, 9, 0,
14556 - 0, 0, 0, 327, 0, 0, 314, 163, 0, 164,
14557 - 0, 0, 0, 0, 62, 173, 172, 0, 0, 0,
14558 - 0, 0, 185, 187, 168, 168, 193, 0, 89, 92,
14559 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14560 - 0, 13, 0, 0, 202, 198, 0, 0, 0, 0,
14561 + 0, 14, 0, 49, 31, 47, 32, 18, 33, 23,
14562 + 0, 36, 0, 37, 52, 38, 39, 0, 42, 12,
14563 + 9, 0, 0, 0, 0, 329, 0, 0, 316, 163,
14564 + 0, 164, 0, 0, 0, 0, 62, 173, 172, 0,
14565 + 0, 0, 0, 0, 185, 187, 168, 168, 193, 0,
14566 + 89, 92, 0, 0, 0, 0, 0, 0, 0, 0,
14567 + 0, 0, 0, 13, 0, 0, 202, 198, 0, 0,
14568 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14569 - 0, 0, 0, 0, 0, 0, 201, 203, 0, 0,
14570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14571 + 201, 203, 0, 0, 0, 0, 0, 0, 0, 0,
14572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14573 - 25, 0, 0, 45, 0, 0, 0, 22, 0, 0,
14574 - 56, 55, 337, 0, 0, 321, 334, 344, 333, 340,
14575 - 342, 0, 313, 197, 257, 101, 263, 269, 103, 102,
14576 - 300, 297, 299, 0, 76, 78, 317, 177, 0, 73,
14577 - 74, 84, 105, 183, 167, 184, 0, 188, 0, 193,
14578 - 194, 87, 95, 91, 94, 0, 0, 81, 0, 75,
14579 - 196, 196, 0, 88, 0, 27, 28, 43, 29, 30,
14580 - 199, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14581 + 0, 0, 0, 0, 25, 0, 0, 45, 0, 0,
14582 + 0, 22, 0, 0, 56, 55, 339, 0, 0, 323,
14583 + 336, 346, 335, 342, 344, 0, 315, 197, 259, 101,
14584 + 265, 271, 103, 102, 302, 299, 301, 0, 76, 78,
14585 + 319, 177, 0, 73, 74, 84, 105, 183, 167, 184,
14586 + 0, 188, 0, 193, 194, 87, 95, 91, 94, 0,
14587 + 0, 81, 0, 75, 196, 196, 0, 88, 0, 27,
14588 + 28, 43, 29, 30, 199, 0, 0, 0, 0, 0,
14589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14590 - 0, 222, 221, 219, 218, 217, 212, 211, 215, 216,
14591 - 214, 213, 210, 209, 207, 208, 204, 205, 206, 15,
14592 - 26, 24, 50, 48, 44, 20, 21, 35, 34, 53,
14593 - 57, 0, 0, 328, 329, 0, 324, 322, 0, 278,
14594 - 0, 278, 0, 0, 86, 0, 0, 169, 0, 170,
14595 - 186, 189, 195, 0, 99, 90, 93, 0, 83, 0,
14596 - 0, 0, 318, 41, 0, 232, 238, 0, 0, 236,
14597 - 0, 223, 200, 227, 226, 228, 229, 0, 0, 243,
14598 - 244, 231, 0, 230, 0, 58, 345, 342, 335, 325,
14599 - 323, 0, 0, 278, 0, 248, 285, 0, 286, 270,
14600 - 303, 304, 0, 181, 0, 0, 179, 0, 171, 0,
14601 - 0, 97, 165, 166, 0, 0, 0, 0, 0, 0,
14602 - 0, 0, 220, 346, 0, 0, 0, 272, 273, 274,
14603 - 275, 276, 279, 0, 0, 0, 0, 281, 0, 250,
14604 - 284, 287, 248, 0, 307, 0, 301, 0, 182, 178,
14605 - 180, 0, 168, 96, 0, 0, 108, 233, 234, 235,
14606 - 237, 240, 241, 242, 338, 0, 345, 277, 0, 280,
14607 - 0, 0, 252, 252, 104, 0, 304, 0, 0, 77,
14608 - 196, 0, 100, 0, 330, 0, 278, 0, 0, 0,
14609 - 258, 264, 0, 0, 305, 0, 302, 175, 0, 174,
14610 - 98, 336, 0, 0, 247, 0, 0, 256, 0, 271,
14611 - 308, 304, 196, 0, 282, 249, 0, 253, 254, 255,
14612 - 0, 265, 306, 176, 0, 251, 259, 292, 278, 143,
14613 - 0, 0, 125, 111, 110, 145, 146, 147, 148, 149,
14614 - 0, 0, 0, 132, 134, 139, 0, 0, 133, 0,
14615 - 112, 0, 128, 136, 142, 144, 0, 0, 0, 293,
14616 - 266, 283, 0, 0, 196, 0, 129, 0, 109, 0,
14617 - 124, 168, 0, 141, 260, 196, 131, 0, 289, 0,
14618 - 0, 0, 0, 0, 0, 0, 0, 0, 150, 0,
14619 - 0, 122, 0, 0, 126, 0, 168, 289, 0, 143,
14620 - 0, 246, 0, 0, 135, 0, 114, 0, 0, 115,
14621 - 138, 0, 109, 0, 0, 121, 123, 127, 246, 137,
14622 - 0, 288, 0, 290, 0, 0, 0, 0, 0, 0,
14623 - 130, 113, 290, 294, 0, 152, 0, 0, 0, 0,
14624 - 0, 0, 152, 290, 245, 196, 0, 267, 117, 116,
14625 - 0, 118, 119, 0, 261, 152, 151, 291, 168, 120,
14626 - 140, 168, 295, 268, 262, 168, 296
14627 + 0, 0, 0, 0, 0, 0, 0, 222, 221, 219,
14628 + 218, 217, 212, 211, 215, 216, 214, 213, 210, 209,
14629 + 207, 208, 204, 205, 206, 15, 26, 24, 50, 48,
14630 + 44, 20, 21, 35, 34, 53, 57, 0, 0, 330,
14631 + 331, 0, 326, 324, 0, 280, 0, 280, 0, 0,
14632 + 86, 0, 0, 169, 0, 170, 186, 189, 195, 0,
14633 + 99, 90, 93, 0, 83, 0, 0, 0, 320, 41,
14634 + 0, 232, 238, 0, 0, 236, 0, 223, 200, 227,
14635 + 226, 228, 229, 0, 0, 242, 243, 245, 246, 231,
14636 + 0, 230, 0, 58, 347, 344, 337, 327, 325, 0,
14637 + 0, 280, 0, 250, 287, 0, 288, 272, 305, 306,
14638 + 0, 181, 0, 0, 179, 0, 171, 0, 0, 97,
14639 + 165, 166, 0, 0, 0, 0, 0, 0, 0, 0,
14640 + 220, 348, 0, 0, 0, 274, 275, 276, 277, 278,
14641 + 281, 0, 0, 0, 0, 283, 0, 252, 286, 289,
14642 + 250, 0, 309, 0, 303, 0, 182, 178, 180, 0,
14643 + 168, 96, 0, 0, 108, 233, 234, 235, 237, 240,
14644 + 241, 244, 340, 0, 347, 279, 0, 282, 0, 0,
14645 + 254, 254, 104, 0, 306, 0, 0, 77, 196, 0,
14646 + 100, 0, 332, 0, 280, 0, 0, 0, 260, 266,
14647 + 0, 0, 307, 0, 304, 175, 0, 174, 98, 338,
14648 + 0, 0, 249, 0, 0, 258, 0, 273, 310, 306,
14649 + 196, 0, 284, 251, 0, 255, 256, 257, 0, 267,
14650 + 308, 176, 0, 253, 261, 294, 280, 143, 0, 0,
14651 + 125, 111, 110, 145, 146, 147, 148, 149, 0, 0,
14652 + 0, 132, 134, 139, 0, 0, 133, 0, 112, 0,
14653 + 128, 136, 142, 144, 0, 0, 0, 295, 268, 285,
14654 + 0, 0, 196, 0, 129, 0, 109, 0, 124, 168,
14655 + 0, 141, 262, 196, 131, 0, 291, 0, 0, 0,
14656 + 0, 0, 0, 0, 0, 0, 150, 0, 0, 122,
14657 + 0, 0, 126, 0, 168, 291, 0, 143, 0, 248,
14658 + 0, 0, 135, 0, 114, 0, 0, 115, 138, 0,
14659 + 109, 0, 0, 121, 123, 127, 248, 137, 0, 290,
14660 + 0, 292, 0, 0, 0, 0, 0, 0, 130, 113,
14661 + 292, 296, 0, 152, 0, 0, 0, 0, 0, 0,
14662 + 152, 292, 247, 196, 0, 269, 117, 116, 0, 118,
14663 + 119, 0, 263, 152, 151, 293, 168, 120, 140, 168,
14664 + 297, 270, 264, 168, 298
14667 -/* YYDEFGOTO[NTERM-NUM]. */
14668 -static const yytype_int16 yydefgoto[] =
14669 +/* YYDEFGOTO[NTERM-NUM]. */
14670 +static const short int yydefgoto[] =
14672 - -1, 6, 118, 11, 12, 9, 10, 19, 87, 231,
14673 - 175, 174, 172, 183, 184, 185, 291, 7, 8, 18,
14674 - 55, 129, 204, 221, 423, 525, 480, 56, 200, 57,
14675 - 133, 620, 621, 662, 641, 622, 623, 660, 624, 635,
14676 - 625, 626, 627, 657, 717, 112, 137, 58, 665, 59,
14677 - 318, 206, 317, 522, 569, 416, 475, 476, 60, 61,
14678 - 214, 62, 215, 63, 217, 658, 198, 236, 693, 509,
14679 - 542, 560, 590, 309, 409, 577, 599, 667, 731, 410,
14680 - 578, 597, 648, 728, 411, 513, 503, 464, 465, 468,
14681 - 512, 671, 705, 600, 647, 713, 735, 64, 201, 312,
14682 - 412, 548, 471, 516, 546, 15, 16, 26, 27, 100,
14683 - 13, 14, 65, 66, 23, 24, 408, 94, 95, 496,
14684 - 402, 494
14685 + -1, 6, 118, 11, 12, 9, 10, 19, 87, 233,
14686 + 177, 176, 174, 185, 186, 187, 295, 7, 8, 18,
14687 + 55, 129, 206, 223, 429, 533, 488, 56, 202, 57,
14688 + 133, 628, 629, 670, 649, 630, 631, 668, 632, 643,
14689 + 633, 634, 635, 665, 725, 112, 137, 58, 673, 59,
14690 + 322, 208, 321, 530, 577, 422, 483, 484, 60, 61,
14691 + 216, 62, 217, 63, 219, 666, 200, 238, 701, 517,
14692 + 550, 568, 598, 313, 415, 585, 607, 675, 739, 416,
14693 + 586, 605, 656, 736, 417, 521, 511, 472, 473, 476,
14694 + 520, 679, 713, 608, 655, 721, 743, 64, 203, 316,
14695 + 418, 556, 479, 524, 554, 15, 16, 26, 27, 100,
14696 + 13, 14, 65, 66, 23, 24, 414, 94, 95, 504,
14697 + 408, 502
14700 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
14701 STATE-NUM. */
14702 -#define YYPACT_NINF -675
14703 -static const yytype_int16 yypact[] =
14704 +#define YYPACT_NINF -673
14705 +static const short int yypact[] =
14707 - 293, -675, -675, -675, -675, -675, 42, -675, -675, -675,
14708 - -675, -675, 46, -675, -18, -675, 14, -675, 736, 1472,
14709 - 65, 104, 51, -18, -675, 206, 14, -675, 445, 57,
14710 - 63, 40, -675, 86, -675, 124, 119, 139, 140, 144,
14711 - 189, 190, 196, 204, -675, -675, 209, 220, -675, 223,
14712 - 231, 236, -675, 238, -675, -675, -675, -675, -4, -675,
14713 - -675, -675, -675, -675, -675, -675, 153, -675, 147, 124,
14714 - 277, 613, -675, 279, 280, 283, -675, -675, 285, 294,
14715 - 296, 613, 298, 301, 302, -675, 303, 205, 613, -675,
14716 - 305, -675, 307, 308, 259, 180, 104, -675, -675, -675,
14717 - 264, 184, -675, -675, -675, -675, -675, -675, -675, -675,
14718 - -675, -675, -675, -675, -675, 321, 324, -675, -675, 331,
14719 - 333, 124, 124, 338, 124, 16, -675, 339, 20, 309,
14720 - 124, 346, 348, 317, -675, -675, -675, -675, 311, 28,
14721 - -675, 35, -675, -675, 613, 613, 613, 320, 325, 328,
14722 - 344, 345, -675, 347, 350, 351, 355, 356, 357, 358,
14723 - 363, 368, 369, 370, 371, 376, 395, 613, 613, 1295,
14724 - 217, -675, 225, -675, 295, 10, -675, -675, 341, 1667,
14725 - 299, -675, -675, 300, -675, 381, -675, -675, 1667, 390,
14726 - 206, 206, 310, 249, 380, 323, 249, -675, 613, -675,
14727 - 394, 22, -25, 326, -675, -675, -675, 327, 329, 330,
14728 - 332, 334, -675, -675, 73, 100, 11, 335, -675, -675,
14729 - 408, 27, 20, 362, 440, 465, 613, 364, -18, 613,
14730 - 613, -675, 613, 613, -675, -675, 929, 613, 613, 613,
14731 - 613, 613, 480, 482, 613, 484, 489, 490, 491, 613,
14732 - 613, 497, 500, 613, 613, 502, -675, -675, 613, 613,
14733 - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
14734 - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
14735 - 1667, 506, 507, -675, 511, 613, 613, 1667, 136, 512,
14736 - -675, 24, -675, 384, 385, -675, -675, 514, -675, -675,
14737 - -675, -75, -675, 1667, 445, -675, -675, -675, -675, -675,
14738 - -675, -675, -675, 519, -675, -675, 808, 488, 98, -675,
14739 - -675, -675, -675, -675, -675, -675, 124, -675, 124, 339,
14740 - -675, -675, -675, -675, -675, 492, 32, -675, 81, -675,
14741 - -675, -675, 1315, -675, -14, 1667, 1667, 1496, 1667, 1667,
14742 - -675, 745, 949, 1335, 1355, 969, 406, 388, 989, 393,
14743 - 405, 410, 411, 1375, 1395, 412, 413, 1009, 1415, 422,
14744 - 1627, 1494, 1516, 1682, 909, 701, 894, 894, 525, 525,
14745 - 525, 525, 392, 392, 152, 152, -675, -675, -675, 1667,
14746 - 1667, 1667, -675, -675, -675, 1667, 1667, -675, -675, -675,
14747 - -675, 526, 206, 278, 249, 508, -675, -675, -68, 459,
14748 - 536, 459, 613, 427, -675, 4, 548, -675, 331, -675,
14749 - -675, -675, -675, 20, -675, -675, -675, 532, -675, 432,
14750 - 438, 573, -675, -675, 613, -675, -675, 613, 613, -675,
14751 - 613, -675, -675, -675, -675, -675, -675, 613, 613, -675,
14752 - -675, -675, 574, -675, 613, -675, 442, 564, -675, -675,
14753 - -675, 15, 544, 1604, 566, 503, -675, 1647, 510, -675,
14754 - 1667, 25, 583, -675, 588, 3, -675, 513, -675, 125,
14755 - 20, -675, -675, -675, 464, 1029, 1051, 1071, 1091, 1111,
14756 - 1131, 467, 1667, 249, 543, 206, 206, -675, -675, -675,
14757 - -675, -675, -675, 468, 613, 375, 587, -675, 570, 580,
14758 - -675, -675, 503, 555, 584, 586, -675, 487, -675, -675,
14759 - -675, 620, 495, -675, 133, 20, -675, -675, -675, -675,
14760 - -675, -675, -675, -675, -675, 496, 442, -675, 1151, -675,
14761 - 613, 590, 540, 540, -675, 613, 25, 613, 501, -675,
14762 - -675, 549, -675, 138, 249, 592, 212, 1173, 613, 591,
14763 - -675, -675, 474, 1193, -675, 1213, -675, -675, 634, -675,
14764 - -675, -675, 605, 631, -675, 1233, 613, 113, 595, -675,
14765 - -675, 25, -675, 613, -675, -675, 1253, -675, -675, -675,
14766 - 596, -675, -675, -675, 1273, -675, -675, -675, 617, 652,
14767 - 68, 639, 699, -675, -675, -675, -675, -675, -675, -675,
14768 - 621, 622, 623, -675, -675, -675, 627, 629, -675, 227,
14769 - -675, 632, -675, -675, -675, 652, 603, 635, -4, -675,
14770 - -675, -675, 304, 282, -675, 637, -675, 284, -675, 638,
14771 - -675, -93, 227, -675, -675, -675, -675, 618, 651, 642,
14772 - 643, 545, 645, 547, 661, 663, 576, 577, -675, 613,
14773 - 83, -675, 12, 297, -675, 227, 114, 651, 579, 652,
14774 - 698, 624, 284, 284, -675, 284, -675, 284, 284, -675,
14775 - -675, 1435, 582, 599, 284, -675, -675, -675, 624, -675,
14776 - 664, -675, 696, -675, 600, 604, 80, 606, 608, 739,
14777 - -675, -675, -675, -675, 744, 43, 614, 615, 284, 619,
14778 - 646, 648, 43, -675, -675, -675, 747, -675, -675, -675,
14779 - 649, -675, -675, -4, -675, 43, -675, -675, 495, -675,
14780 - -675, 495, -675, -675, -675, 495, -675
14781 + 185, -673, -673, -673, -673, -673, 43, -673, -673, -673,
14782 + -673, -673, 46, -673, -11, -673, 19, -673, 789, 875,
14783 + 63, 119, 51, -11, -673, 128, 19, -673, 884, 66,
14784 + 71, 116, -673, 176, -673, 123, 125, 194, 201, 213,
14785 + 220, 221, 226, 237, -673, -673, 249, 250, -673, 251,
14786 + 252, 254, -673, 255, -673, -673, -673, -673, 96, -673,
14787 + -673, -673, -673, -673, -673, -673, 164, -673, 304, 123,
14788 + 305, 646, -673, 309, 310, 312, -673, -673, 315, 316,
14789 + 319, 646, 320, 322, 325, -673, 328, 229, 646, -673,
14790 + 336, -673, 326, 327, 287, 209, 119, -673, -673, -673,
14791 + 295, 218, -673, -673, -673, -673, -673, -673, -673, -673,
14792 + -673, -673, -673, -673, -673, 348, 352, -673, -673, 357,
14793 + 363, 123, 123, 367, 123, 22, -673, 372, 20, 343,
14794 + 123, 383, 384, 353, -673, -673, -673, -673, 340, 28,
14795 + -673, 41, -673, -673, 646, 646, 646, 362, 364, 368,
14796 + 369, 376, -673, 379, 382, 393, 394, 395, 397, 399,
14797 + 402, 403, 406, 407, 408, 409, 411, 412, 413, 646,
14798 + 646, 1378, 222, -673, 256, -673, 262, 35, -673, -673,
14799 + 347, 1622, 265, -673, -673, 313, -673, 385, -673, -673,
14800 + 1622, 380, 128, 128, 314, 211, 401, 317, 211, -673,
14801 + 646, -673, 375, 33, -3, 324, -673, -673, -673, 329,
14802 + 333, 338, 339, 341, -673, -673, 76, 89, 36, 354,
14803 + -673, -673, 428, 16, 20, 356, 460, 470, 646, 361,
14804 + -11, 646, 646, -673, 646, 646, -673, -673, 798, 646,
14805 + 646, 646, 646, 646, 476, 488, 646, 498, 499, 504,
14806 + 505, 646, 646, 646, 646, 506, 508, 646, 646, 510,
14807 + -673, -673, 646, 646, 646, 646, 646, 646, 646, 646,
14808 + 646, 646, 646, 646, 646, 646, 646, 646, 646, 646,
14809 + 646, 646, 646, 646, 1622, 514, 515, -673, 517, 646,
14810 + 646, 1622, 138, 520, -673, 47, -673, 386, 389, -673,
14811 + -673, 525, -673, -673, -673, -84, -673, 1622, 884, -673,
14812 + -673, -673, -673, -673, -673, -673, -673, 527, -673, -673,
14813 + 863, 495, 82, -673, -673, -673, -673, -673, -673, -673,
14814 + 123, -673, 123, 372, -673, -673, -673, -673, -673, 496,
14815 + 24, -673, 27, -673, -673, -673, 1398, -673, -18, 1622,
14816 + 1622, 1571, 1622, 1622, -673, 746, 986, 1418, 1438, 1006,
14817 + 415, 398, 1026, 416, 418, 419, 429, 1458, 1500, 1046,
14818 + 1066, 433, 434, 1086, 1520, 435, 1681, 1559, 1480, 1716,
14819 + 637, 1729, 1740, 1740, 600, 600, 600, 600, 378, 378,
14820 + 156, 156, -673, -673, -673, 1622, 1622, 1622, -673, -673,
14821 + -673, 1622, 1622, -673, -673, -673, -673, 530, 128, 236,
14822 + 211, 484, -673, -673, -28, 467, 567, 467, 646, 438,
14823 + -673, 4, 523, -673, 357, -673, -673, -673, -673, 20,
14824 + -673, -673, -673, 540, -673, 441, 442, 547, -673, -673,
14825 + 646, -673, -673, 646, 646, -673, 646, -673, -673, -673,
14826 + -673, -673, -673, 646, 646, -673, -673, -673, -673, -673,
14827 + 580, -673, 646, -673, 446, 570, -673, -673, -673, 15,
14828 + 550, 1593, 572, 502, -673, 1701, 513, -673, 1622, 18,
14829 + 589, -673, 598, 3, -673, 519, -673, 129, 20, -673,
14830 + -673, -673, 468, 1110, 1130, 1150, 1170, 1190, 1210, 469,
14831 + 1622, 211, 558, 128, 128, -673, -673, -673, -673, -673,
14832 + -673, 474, 646, 396, 602, -673, 582, 583, -673, -673,
14833 + 502, 571, 586, 599, -673, 480, -673, -673, -673, 620,
14834 + 500, -673, 135, 20, -673, -673, -673, -673, -673, -673,
14835 + -673, -673, -673, 512, 446, -673, 1234, -673, 646, 615,
14836 + 539, 539, -673, 646, 18, 646, 534, -673, -673, 549,
14837 + -673, 140, 211, 621, 225, 1254, 646, 616, -673, -673,
14838 + 400, 1274, -673, 1294, -673, -673, 648, -673, -673, -673,
14839 + 619, 658, -673, 1314, 646, 90, 626, -673, -673, 18,
14840 + -673, 646, -673, -673, 1334, -673, -673, -673, 627, -673,
14841 + -673, -673, 1358, -673, -673, -673, 644, 703, 58, 666,
14842 + 554, -673, -673, -673, -673, -673, -673, -673, 649, 650,
14843 + 651, -673, -673, -673, 652, 653, -673, 279, -673, 654,
14844 + -673, -673, -673, 703, 638, 656, 96, -673, -673, -673,
14845 + 233, 366, -673, 660, -673, 217, -673, 661, -673, -20,
14846 + 279, -673, -673, -673, -673, 647, 674, 665, 667, 565,
14847 + 671, 569, 675, 676, 575, 576, -673, 646, 98, -673,
14848 + 12, 303, -673, 279, 141, 674, 577, 703, 724, 632,
14849 + 217, 217, -673, 217, -673, 217, 217, -673, -673, 1540,
14850 + 590, 591, 217, -673, -673, -673, 632, -673, 678, -673,
14851 + 708, -673, 597, 601, 44, 603, 609, 734, -673, -673,
14852 + -673, -673, 735, 61, 610, 612, 217, 613, 618, 622,
14853 + 61, -673, -673, -673, 736, -673, -673, -673, 641, -673,
14854 + -673, 96, -673, 61, -673, -673, 500, -673, -673, 500,
14855 + -673, -673, -673, 500, -673
14858 /* YYPGOTO[NTERM-NUM]. */
14859 -static const yytype_int16 yypgoto[] =
14860 +static const short int yypgoto[] =
14862 - -675, -675, -64, -675, -675, -675, -675, 527, -675, -675,
14863 - -675, -675, -675, -675, 625, -675, -675, -675, -675, 552,
14864 - -675, -675, -675, -210, -675, -675, -675, -675, 244, -194,
14865 - -675, -43, -407, 105, 148, 141, -675, -675, 171, -675,
14866 - -675, 130, -675, 85, -674, -675, -606, -569, -211, -675,
14867 - -675, -297, -675, -675, -675, -675, -675, 336, -675, -675,
14868 - -675, -675, -675, -675, -193, -101, -675, -71, 115, 290,
14869 - -675, 261, -675, -675, -675, -675, -675, -675, -675, -675,
14870 - -675, -675, -675, -675, -675, -675, -675, -450, 398, -675,
14871 - -675, 143, -588, -675, -675, -675, -675, -675, -675, -675,
14872 - -675, -675, -675, -513, -675, -675, -675, -675, 787, -675,
14873 - -675, -675, -675, -675, 594, -22, -675, 718, -16, -675,
14874 - -675, 287
14875 + -673, -673, -64, -673, -673, -673, -673, 509, -673, -673,
14876 + -673, -673, -673, -673, 625, -673, -673, -673, -673, 578,
14877 + -673, -673, -673, -212, -673, -673, -673, -673, 204, -196,
14878 + -673, -91, -542, 77, 133, 117, -673, -673, 153, -673,
14879 + -673, 110, -673, 65, -649, -673, -621, -577, -213, -673,
14880 + -673, -308, -673, -673, -673, -673, -673, 308, -673, -673,
14881 + -673, -673, -673, -673, -195, -101, -673, -71, 99, 276,
14882 + -673, 246, -673, -673, -673, -673, -673, -673, -673, -673,
14883 + -673, -673, -673, -673, -673, -673, -673, -458, 387, -673,
14884 + -673, 124, -672, -673, -673, -673, -673, -673, -673, -673,
14885 + -673, -673, -673, -521, -673, -673, -673, -673, 774, -673,
14886 + -673, -673, -673, -673, 579, -22, -673, 705, -16, -673,
14887 + -673, 261
14890 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
14891 positive, shift that token. If negative, reduce the rule which
14892 number is the opposite. If zero, do what YYDEFACT says.
14893 If YYTABLE_NINF, syntax error. */
14894 -#define YYTABLE_NINF -318
14895 -static const yytype_int16 yytable[] =
14896 +#define YYTABLE_NINF -320
14897 +static const short int yytable[] =
14899 - 169, 97, 197, 326, 328, 140, 308, 473, 473, 101,
14900 - 179, 199, 338, 506, 283, 216, 638, 188, 142, 143,
14901 - 117, 419, 646, 330, 218, 219, 310, 603, 400, 514,
14902 - 628, 333, 334, 564, 229, 21, 425, 426, 724, 21,
14903 - 432, 232, 17, 324, 604, 144, 145, 664, 406, 715,
14904 - 20, 732, 146, 147, 148, 459, 628, 208, 209, 716,
14905 - 211, 213, 407, 149, 150, 151, 223, 25, 592, 460,
14906 - 152, 88, 629, 234, 235, 153, 311, 115, 497, 498,
14907 - 499, 500, 501, 154, 638, 333, 334, 682, 155, 156,
14908 - 157, 158, 159, 160, 161, 603, 256, 257, 603, 280,
14909 - 628, 162, 205, 163, 96, 22, 573, 287, 89, 22,
14910 - 113, 313, 604, 314, 712, 604, 114, 730, 164, 220,
14911 - 515, 478, 630, 116, 165, 725, 335, 303, 117, 333,
14912 - 334, 427, 135, 136, 639, 611, 422, 333, 334, 397,
14913 - 398, 519, 333, 334, 474, 474, 284, 329, 601, 166,
14914 - 684, 139, 417, 502, 212, 342, 167, 168, 345, 346,
14915 - 401, 348, 349, 336, 230, 337, 351, 352, 353, 354,
14916 - 355, 233, 119, 358, 293, 294, 120, 121, 363, 364,
14917 - 335, 122, 367, 368, 274, 275, 276, 370, 371, 372,
14918 - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
14919 - 383, 384, 385, 386, 387, 388, 389, 390, 391, 324,
14920 - 89, 325, 640, 479, 395, 396, 617, 336, 708, 428,
14921 - 142, 143, 619, 278, 335, 90, 123, 124, 91, 92,
14922 - 93, 638, 335, 125, 418, 640, 324, 335, 327, 429,
14923 - 430, 126, 603, 587, 588, 589, 127, 144, 145, 505,
14924 - 324, 572, 687, 296, 146, 147, 148, 128, 686, 604,
14925 - 130, 336, 420, 523, 421, 149, 150, 151, 131, 336,
14926 - 524, 552, 152, 132, 336, 134, 570, 153, 639, 611,
14927 - 138, 141, 296, 170, 171, 154, 638, 173, 638, 176,
14928 - 155, 156, 157, 158, 159, 160, 161, 603, 177, 603,
14929 - 178, 638, 180, 162, 181, 163, 182, 186, 638, 189,
14930 - 187, 551, 603, 192, 604, 553, 604, 193, 195, 603,
14931 - 164, 196, 97, 190, 191, 202, 165, 90, 203, 604,
14932 - 91, 98, 99, 654, 655, 205, 604, 207, 463, 467,
14933 - 463, 470, 210, 216, 142, 143, 222, 285, 649, 650,
14934 - 224, 166, 225, 279, 226, 649, 650, 237, 167, 168,
14935 - 617, 281, 238, 485, 228, 239, 486, 487, 308, 488,
14936 - 297, 144, 145, 298, 299, 300, 489, 490, 146, 147,
14937 - 148, 240, 241, 492, 242, 290, 456, 243, 244, 149,
14938 - 150, 151, 245, 246, 247, 248, 152, 651, 304, 297,
14939 - 249, 153, 298, 299, 457, 250, 251, 252, 253, 154,
14940 - 1, 2, 3, 254, 155, 156, 157, 158, 159, 160,
14941 - 161, 4, 272, 273, 274, 275, 276, 162, 5, 163,
14942 - 652, 282, 255, 538, 301, 288, 289, 652, 497, 498,
14943 - 499, 500, 501, 292, 164, 332, 340, 295, 305, 567,
14944 - 165, 103, 104, 105, 106, 107, 108, 109, 110, 111,
14945 - 302, 306, 142, 143, 315, 319, 40, 320, 321, 557,
14946 - 322, 341, 323, 331, 563, 166, 565, 286, 304, 535,
14947 - 536, 593, 167, 168, 356, 307, 357, 575, 359, 144,
14948 - 145, 50, 51, 360, 361, 362, 461, 147, 148, 462,
14949 - 339, 365, 343, 52, 366, 586, 369, 149, 150, 151,
14950 - 392, 393, 594, 502, 152, 394, 399, 733, 405, 153,
14951 - 734, 403, 404, 413, 736, 415, 441, 154, 579, 424,
14952 - 455, 443, 155, 156, 157, 158, 159, 160, 161, 142,
14953 - 143, 306, 440, 444, 668, 162, 40, 163, 445, 446,
14954 - 449, 450, 466, 270, 271, 272, 273, 274, 275, 276,
14955 - 453, 458, 164, 472, 477, 307, 144, 145, 165, 481,
14956 - 482, 50, 51, 146, 147, 148, 483, 484, 491, 493,
14957 - 495, 504, 507, 52, 149, 150, 151, 517, 681, 653,
14958 - 656, 152, 518, 166, 661, 511, 153, 534, 508, 521,
14959 - 167, 168, 526, 539, 154, 533, 537, 540, 544, 155,
14960 - 156, 157, 158, 159, 160, 161, 142, 143, 541, 685,
14961 - 653, 545, 162, 547, 163, 549, 550, 558, 576, 694,
14962 - 695, 324, 661, 554, 697, 698, 559, 568, 566, 164,
14963 - 582, 701, 583, 144, 145, 165, 571, 584, 591, 596,
14964 - 146, 147, 148, 685, 505, 631, 602, 644, 632, 633,
14965 - 634, 149, 150, 151, 636, 720, 637, 603, 152, 642,
14966 - 166, 669, 645, 153, 659, 663, 670, 167, 168, 672,
14967 - 673, 154, 675, 674, 604, 676, 155, 156, 157, 158,
14968 - 159, 160, 161, 605, 606, 607, 608, 609, 677, 162,
14969 - 678, 163, 691, 610, 611, 103, 104, 105, 106, 107,
14970 - 108, 109, 110, 111, 679, 680, 164, 689, 703, 692,
14971 - -125, 704, 165, 264, 265, 266, 267, 268, 269, 270,
14972 - 271, 272, 273, 274, 275, 276, -109, 700, 706, 612,
14973 - 28, 613, 707, 711, 709, 614, 710, 166, 714, 50,
14974 - 51, 727, 718, 719, 167, 168, 316, 721, 347, 227,
14975 - 258, 615, 259, 260, 261, 262, 263, 264, 265, 266,
14976 + 171, 97, 199, 330, 332, 140, 312, 481, 481, 101,
14977 + 181, 201, 342, 514, 425, 654, 646, 190, 142, 143,
14978 + 337, 338, 522, 334, 220, 221, 117, 611, 431, 432,
14979 + 636, 337, 338, 572, 231, 21, 438, 314, 720, 287,
14980 + 218, 412, 21, 17, 612, 144, 145, 234, 646, 733,
14981 + 20, 406, 146, 147, 148, 413, 636, 210, 211, 611,
14982 + 213, 215, 637, 149, 150, 151, 225, 723, 600, 88,
14983 + 152, 732, 25, 236, 237, 153, 612, 724, 505, 506,
14984 + 507, 508, 509, 154, 740, 648, 207, 315, 155, 156,
14985 + 157, 158, 159, 160, 161, 162, 163, 467, 260, 261,
14986 + 636, 284, 690, 164, 96, 165, 581, 22, 648, 291,
14987 + 738, 468, 638, 611, 22, 523, 486, 339, 328, 113,
14988 + 166, 222, 672, 89, 114, 433, 167, 117, 339, 307,
14989 + 612, 694, 89, 337, 338, 317, 423, 318, 428, 337,
14990 + 338, 403, 404, 527, 337, 338, 482, 482, 609, 647,
14991 + 619, 168, 692, 115, 340, 510, 341, 346, 169, 170,
14992 + 349, 350, 214, 352, 353, 340, 232, 434, 355, 356,
14993 + 357, 358, 359, 288, 333, 362, 297, 298, 119, 235,
14994 + 367, 368, 369, 370, 716, 407, 373, 374, 278, 279,
14995 + 280, 376, 377, 378, 379, 380, 381, 382, 383, 384,
14996 + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
14997 + 395, 396, 397, 116, 328, 300, 329, 487, 401, 402,
14998 + 424, 646, 595, 596, 597, 142, 143, 328, 282, 331,
14999 + 339, 120, 611, 625, 135, 136, 339, 646, 121, 627,
15000 + 300, 339, 90, 435, 436, 91, 92, 93, 611, 612,
15001 + 122, 90, 144, 145, 91, 98, 99, 123, 124, 146,
15002 + 147, 148, 513, 125, 580, 612, 426, 340, 427, 531,
15003 + 149, 150, 151, 340, 126, 560, 532, 152, 340, 328,
15004 + 578, 695, 153, 646, 657, 658, 127, 128, 130, 131,
15005 + 154, 132, 134, 138, 611, 155, 156, 157, 158, 159,
15006 + 160, 161, 162, 163, 1, 2, 3, 646, 139, 141,
15007 + 164, 612, 165, 172, 173, 4, 175, 559, 611, 178,
15008 + 179, 561, 5, 180, 182, 183, 97, 166, 659, 184,
15009 + 647, 619, 188, 167, 301, 612, 189, 302, 303, 304,
15010 + 191, 194, 192, 193, 471, 475, 471, 478, 195, 197,
15011 + 142, 143, 204, 289, 657, 658, 205, 198, 168, 301,
15012 + 283, 207, 302, 303, 465, 169, 170, 209, 660, 493,
15013 + 646, 212, 494, 495, 312, 496, 218, 144, 145, 308,
15014 + 224, 611, 497, 498, 146, 147, 148, 226, 227, 294,
15015 + 228, 500, 464, 230, 285, 149, 150, 151, 612, 239,
15016 + 286, 240, 152, 292, 308, 241, 242, 153, 276, 277,
15017 + 278, 279, 280, 243, 625, 154, 244, 662, 663, 245,
15018 + 155, 156, 157, 158, 159, 160, 161, 162, 163, 309,
15019 + 246, 247, 248, 296, 249, 164, 250, 165, 660, 251,
15020 + 252, 546, 310, 253, 254, 255, 256, 40, 257, 258,
15021 + 259, 293, 166, 299, 587, 305, 306, 575, 167, 505,
15022 + 506, 507, 508, 509, 319, 336, 344, 310, 311, 323,
15023 + 142, 143, 40, 324, 50, 51, 345, 565, 325, 326,
15024 + 360, 327, 571, 168, 573, 290, 52, 543, 544, 601,
15025 + 169, 170, 361, 311, 335, 583, 343, 144, 145, 50,
15026 + 51, 347, 363, 364, 469, 147, 148, 470, 365, 366,
15027 + 371, 52, 372, 594, 375, 149, 150, 151, 398, 399,
15028 + 602, 400, 152, 741, 405, 409, 742, 153, 410, 411,
15029 + 744, 419, 421, 430, 463, 154, 510, 466, 447, 485,
15030 + 155, 156, 157, 158, 159, 160, 161, 162, 163, 661,
15031 + 664, 492, 676, 446, 669, 164, 449, 165, 450, 451,
15032 + 103, 104, 105, 106, 107, 108, 109, 110, 111, 452,
15033 + 142, 143, 166, 457, 458, 461, 480, 489, 167, 693,
15034 + 661, 490, 491, 474, 499, 501, 503, 512, 515, 702,
15035 + 703, -109, 669, 525, 705, 706, 689, 144, 145, 516,
15036 + 519, 709, 526, 168, 146, 147, 148, 529, 534, 541,
15037 + 169, 170, 542, 693, 545, 149, 150, 151, 547, 548,
15038 + 557, 549, 152, 553, 552, 728, 558, 153, 274, 275,
15039 + 276, 277, 278, 279, 280, 154, 555, 567, 328, 576,
15040 + 155, 156, 157, 158, 159, 160, 161, 162, 163, 142,
15041 + 143, 562, 566, 584, 590, 164, 591, 165, 267, 268,
15042 + 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
15043 + 279, 280, 166, 574, 592, 579, 144, 145, 167, 599,
15044 + 604, 513, 639, 146, 147, 148, 640, 641, 642, 644,
15045 + 645, 650, 652, 653, 149, 150, 151, 667, 671, 678,
15046 + 677, 152, 680, 168, 681, 682, 153, 610, 683, 684,
15047 + 169, 170, 685, 686, 154, 687, 688, 697, 611, 155,
15048 + 156, 157, 158, 159, 160, 161, 162, 163, 699, 700,
15049 + -125, 708, 711, 712, 164, 612, 165, 714, 719, 722,
15050 + 735, 715, 351, 717, 613, 614, 615, 616, 617, 718,
15051 + 726, 166, 727, 729, 618, 619, 570, 167, 730, 229,
15052 + 704, 262, 731, 263, 264, 265, 266, 267, 268, 269,
15053 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15054 + 280, 737, 168, 674, 320, 691, 651, 698, 734, 169,
15055 + 170, 528, 620, 28, 621, 710, 551, 569, 622, 696,
15056 + 102, 196, 50, 51, 477, 563, 0, 0, 0, 348,
15057 + 0, 0, 0, 262, 623, 263, 264, 265, 266, 267,
15058 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15059 + 278, 279, 280, 0, 624, 29, 30, 0, 625, 0,
15060 + 0, 0, 626, 0, 627, 31, 32, 33, 34, 0,
15061 + 35, 36, 0, 0, 0, 0, 0, 0, 37, 38,
15062 + 39, 40, 0, 0, 0, 0, 0, 28, 0, 0,
15063 + 0, 41, 42, 43, 44, 45, 46, 0, 0, 67,
15064 + 0, 47, 48, 49, 440, 0, 441, 0, 50, 51,
15065 + 103, 104, 105, 106, 107, 108, 109, 110, 111, 420,
15066 + 52, 0, 0, 0, 0, 0, 0, 0, 0, 29,
15067 + 30, 0, 53, 68, 0, 0, 0, 0, -319, 31,
15068 + 32, 33, 34, 0, 35, 36, 0, 0, 54, 0,
15069 + 0, 0, 37, 38, 39, 40, 69, 0, 354, 0,
15070 + 0, 0, 0, 0, 0, 41, 42, 43, 44, 45,
15071 + 46, 0, 0, 0, 0, 47, 48, 49, 0, 0,
15072 + 0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
15073 + 0, 70, 0, 0, 52, 0, 0, 71, 72, 73,
15074 + 74, 75, -43, 76, 77, 78, 53, 79, 80, 0,
15075 + 81, 82, 83, 0, 0, 0, 0, 84, 85, 86,
15076 + 0, 262, 54, 263, 264, 265, 266, 267, 268, 269,
15077 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15078 + 280, 262, 0, 263, 264, 265, 266, 267, 268, 269,
15079 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15080 + 280, 262, 0, 263, 264, 265, 266, 267, 268, 269,
15081 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15082 + 280, 262, 0, 263, 264, 265, 266, 267, 268, 269,
15083 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15084 + 280, 262, 0, 263, 264, 265, 266, 267, 268, 269,
15085 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15086 + 280, 262, 0, 263, 264, 265, 266, 267, 268, 269,
15087 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15088 + 280, 0, 0, 0, 0, 262, 442, 263, 264, 265,
15089 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15090 + 276, 277, 278, 279, 280, 262, 445, 263, 264, 265,
15091 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15092 + 276, 277, 278, 279, 280, 262, 448, 263, 264, 265,
15093 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15094 + 276, 277, 278, 279, 280, 262, 455, 263, 264, 265,
15095 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15096 + 276, 277, 278, 279, 280, 262, 456, 263, 264, 265,
15097 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15098 + 276, 277, 278, 279, 280, 262, 459, 263, 264, 265,
15099 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15100 + 276, 277, 278, 279, 280, 0, 0, 0, 0, 262,
15101 + 535, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15102 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 262,
15103 + 536, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15104 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 262,
15105 + 537, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15106 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 262,
15107 + 538, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15108 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 262,
15109 + 539, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15110 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 262,
15111 + 540, 263, 264, 265, 266, 267, 268, 269, 270, 271,
15112 + 272, 273, 274, 275, 276, 277, 278, 279, 280, 0,
15113 + 0, 0, 0, 262, 564, 263, 264, 265, 266, 267,
15114 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15115 + 278, 279, 280, 262, 582, 263, 264, 265, 266, 267,
15116 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15117 + 278, 279, 280, 262, 588, 263, 264, 265, 266, 267,
15118 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15119 + 278, 279, 280, 262, 589, 263, 264, 265, 266, 267,
15120 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15121 + 278, 279, 280, 262, 593, 263, 264, 265, 266, 267,
15122 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15123 + 278, 279, 280, 262, 603, 263, 264, 265, 266, 267,
15124 + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
15125 + 278, 279, 280, 0, 0, 0, 0, 0, 606, 265,
15126 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15127 + 276, 277, 278, 279, 280, 262, 281, 263, 264, 265,
15128 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15129 + 276, 277, 278, 279, 280, 262, 437, 263, 264, 265,
15130 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15131 + 276, 277, 278, 279, 280, 262, 443, 263, 264, 265,
15132 + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15133 + 276, 277, 278, 279, 280, 67, 444, 264, 265, 266,
15134 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15135 - 696, 616, 29, 30, 722, 617, 723, 729, 562, 618,
15136 - 666, 619, 31, 32, 33, 34, 643, 35, 36, 690,
15137 - 726, 683, 543, 702, 561, 37, 38, 39, 40, 469,
15138 - 688, 520, 28, 102, 194, 0, 41, 42, 43, 44,
15139 - 45, 46, 344, 555, 0, 0, 47, 48, 49, 0,
15140 - 0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
15141 - 0, 0, 0, 0, 414, 52, 0, 0, 0, 0,
15142 - 0, 0, 0, 0, 29, 30, 0, 53, 0, 0,
15143 - 0, 0, 0, -317, 31, 32, 33, 34, 0, 35,
15144 - 36, 0, 0, 54, 0, 0, 0, 37, 38, 39,
15145 - 40, 434, 0, 435, 0, 0, 0, 0, 41, 42,
15146 - 43, 44, 45, 46, 0, 0, 0, 0, 47, 48,
15147 - 49, 0, 0, 0, 0, 50, 51, 0, 0, 0,
15148 - 0, 0, 0, 0, 0, 0, 0, 52, 266, 267,
15149 - 268, 269, 270, 271, 272, 273, 274, 275, 276, 53,
15150 + 277, 278, 279, 280, 0, 0, 453, 0, 0, 0,
15151 + 0, 0, 0, 0, 0, 0, 0, 439, 262, 68,
15152 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15153 - 273, 274, 275, 276, 258, 54, 259, 260, 261, 262,
15154 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15155 - 273, 274, 275, 276, 258, 0, 259, 260, 261, 262,
15156 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15157 - 273, 274, 275, 276, 258, 0, 259, 260, 261, 262,
15158 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15159 - 273, 274, 275, 276, 258, 0, 259, 260, 261, 262,
15160 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15161 - 273, 274, 275, 276, 258, 0, 259, 260, 261, 262,
15162 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15163 - 273, 274, 275, 276, 258, 0, 259, 260, 261, 262,
15164 - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
15165 - 273, 274, 275, 276, 0, 0, 258, 350, 259, 260,
15166 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15167 - 271, 272, 273, 274, 275, 276, 258, 436, 259, 260,
15168 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15169 - 271, 272, 273, 274, 275, 276, 258, 439, 259, 260,
15170 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15171 - 271, 272, 273, 274, 275, 276, 258, 442, 259, 260,
15172 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15173 - 271, 272, 273, 274, 275, 276, 258, 451, 259, 260,
15174 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15175 - 271, 272, 273, 274, 275, 276, 258, 527, 259, 260,
15176 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15177 - 271, 272, 273, 274, 275, 276, 0, 0, 258, 528,
15178 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15179 - 269, 270, 271, 272, 273, 274, 275, 276, 258, 529,
15180 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15181 - 269, 270, 271, 272, 273, 274, 275, 276, 258, 530,
15182 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15183 - 269, 270, 271, 272, 273, 274, 275, 276, 258, 531,
15184 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15185 - 269, 270, 271, 272, 273, 274, 275, 276, 258, 532,
15186 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15187 - 269, 270, 271, 272, 273, 274, 275, 276, 258, 556,
15188 - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
15189 - 269, 270, 271, 272, 273, 274, 275, 276, 0, 0,
15190 - 258, 574, 259, 260, 261, 262, 263, 264, 265, 266,
15191 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15192 - 258, 580, 259, 260, 261, 262, 263, 264, 265, 266,
15193 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15194 - 258, 581, 259, 260, 261, 262, 263, 264, 265, 266,
15195 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15196 - 258, 585, 259, 260, 261, 262, 263, 264, 265, 266,
15197 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15198 - 258, 595, 259, 260, 261, 262, 263, 264, 265, 266,
15199 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15200 - 258, 598, 259, 260, 261, 262, 263, 264, 265, 266,
15201 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15202 - 258, 277, 259, 260, 261, 262, 263, 264, 265, 266,
15203 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15204 - 258, 431, 259, 260, 261, 262, 263, 264, 265, 266,
15205 - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15206 - 0, 437, 0, 0, 0, 0, 67, 0, 0, 0,
15207 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15208 - 0, 438, 0, 0, 0, 0, 0, 0, 0, 0,
15209 - 67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15210 - 68, 447, 260, 261, 262, 263, 264, 265, 266, 267,
15211 - 268, 269, 270, 271, 272, 273, 274, 275, 276, 0,
15212 - 0, 448, 433, 69, 68, 261, 262, 263, 264, 265,
15213 - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
15214 - 276, 452, 0, 0, 0, 0, 0, 69, 0, 0,
15215 - 0, 0, 0, 0, 0, 0, 70, 0, 0, 0,
15216 - 0, 699, 71, 72, 73, 74, 75, -43, 76, 77,
15217 - 78, 0, 79, 80, 0, 81, 82, 83, 0, 0,
15218 - 70, 0, 84, 85, 86, 0, 71, 72, 73, 74,
15219 - 75, 0, 76, 77, 78, 0, 79, 80, 0, 81,
15220 - 82, 83, 0, 0, 0, 0, 84, 85, 86, 258,
15221 - 0, 259, 260, 261, 262, 263, 264, 265, 266, 267,
15222 - 268, 269, 270, 271, 272, 273, 274, 275, 276, 0,
15223 - 0, 505, 258, 454, 259, 260, 261, 262, 263, 264,
15224 + 273, 274, 275, 276, 277, 278, 279, 280, 0, 0,
15225 + 513, 0, 69, 0, 0, 0, 0, 262, 454, 263,
15226 + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
15227 + 274, 275, 276, 277, 278, 279, 280, 0, 460, 0,
15228 + 0, 0, 0, 0, 0, 0, 0, 70, 0, 0,
15229 + 0, 0, 0, 71, 72, 73, 74, 75, 707, 76,
15230 + 77, 78, 0, 79, 80, 0, 81, 82, 83, 0,
15231 + 0, 0, 0, 84, 85, 86, 262, 462, 263, 264,
15232 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
15233 - 275, 276, 258, 510, 259, 260, 261, 262, 263, 264,
15234 + 275, 276, 277, 278, 279, 280, 262, 518, 263, 264,
15235 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
15236 - 275, 276, 258, 0, 259, 260, 261, 262, 263, 264,
15237 - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
15238 - 275, 276, 262, 263, 264, 265, 266, 267, 268, 269,
15239 - 270, 271, 272, 273, 274, 275, 276
15240 + 275, 276, 277, 278, 279, 280, 266, 267, 268, 269,
15241 + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
15242 + 280, 268, 269, 270, 271, 272, 273, 274, 275, 276,
15243 + 277, 278, 279, 280, 270, 271, 272, 273, 274, 275,
15244 + 276, 277, 278, 279, 280
15247 -static const yytype_int16 yycheck[] =
15248 +static const short int yycheck[] =
15250 - 71, 23, 103, 214, 215, 69, 200, 4, 4, 25,
15251 - 81, 112, 222, 463, 4, 4, 4, 88, 3, 4,
15252 - 4, 318, 628, 216, 4, 5, 4, 15, 4, 4,
15253 - 599, 4, 5, 546, 6, 53, 4, 5, 712, 53,
15254 - 54, 6, 0, 136, 32, 30, 31, 140, 123, 6,
15255 - 4, 725, 37, 38, 39, 123, 625, 121, 122, 16,
15256 - 124, 125, 137, 48, 49, 50, 130, 53, 581, 137,
15257 - 55, 6, 4, 144, 145, 60, 54, 37, 63, 64,
15258 - 65, 66, 67, 68, 4, 4, 5, 4, 73, 74,
15259 - 75, 76, 77, 78, 79, 15, 167, 168, 15, 170,
15260 - 669, 86, 4, 88, 53, 123, 556, 178, 4, 123,
15261 - 53, 136, 32, 138, 702, 32, 53, 723, 103, 99,
15262 - 95, 418, 54, 37, 109, 713, 99, 198, 4, 4,
15263 - 5, 99, 136, 137, 51, 52, 329, 4, 5, 3,
15264 - 4, 138, 4, 5, 141, 141, 136, 136, 598, 134,
15265 - 138, 4, 54, 138, 138, 226, 141, 142, 229, 230,
15266 - 136, 232, 233, 136, 136, 138, 237, 238, 239, 240,
15267 - 241, 136, 53, 244, 190, 191, 37, 37, 249, 250,
15268 - 99, 37, 253, 254, 32, 33, 34, 258, 259, 260,
15269 - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15270 - 271, 272, 273, 274, 275, 276, 277, 278, 279, 136,
15271 - 4, 138, 619, 423, 285, 286, 133, 136, 138, 138,
15272 - 3, 4, 139, 6, 99, 121, 37, 37, 124, 125,
15273 - 126, 4, 99, 37, 136, 642, 136, 99, 138, 340,
15274 - 341, 37, 15, 130, 131, 132, 37, 30, 31, 37,
15275 - 136, 39, 138, 4, 37, 38, 39, 37, 665, 32,
15276 - 37, 136, 326, 138, 328, 48, 49, 50, 37, 136,
15277 - 480, 138, 55, 37, 136, 37, 138, 60, 51, 52,
15278 - 127, 4, 4, 4, 4, 68, 4, 4, 4, 4,
15279 - 73, 74, 75, 76, 77, 78, 79, 15, 4, 15,
15280 - 4, 4, 4, 86, 3, 88, 4, 4, 4, 4,
15281 - 105, 522, 15, 54, 32, 525, 32, 137, 54, 15,
15282 - 103, 137, 344, 16, 16, 4, 109, 121, 4, 32,
15283 - 124, 125, 126, 51, 52, 4, 32, 4, 409, 410,
15284 - 411, 412, 4, 4, 3, 4, 37, 6, 51, 52,
15285 - 4, 134, 4, 136, 37, 51, 52, 37, 141, 142,
15286 - 133, 136, 37, 434, 53, 37, 437, 438, 562, 440,
15287 - 121, 30, 31, 124, 125, 126, 447, 448, 37, 38,
15288 - 39, 37, 37, 454, 37, 4, 402, 37, 37, 48,
15289 - 49, 50, 37, 37, 37, 37, 55, 93, 4, 121,
15290 - 37, 60, 124, 125, 126, 37, 37, 37, 37, 68,
15291 - 117, 118, 119, 37, 73, 74, 75, 76, 77, 78,
15292 - 79, 128, 30, 31, 32, 33, 34, 86, 135, 88,
15293 - 133, 136, 37, 504, 54, 136, 136, 133, 63, 64,
15294 - 65, 66, 67, 53, 103, 37, 6, 137, 54, 550,
15295 - 109, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15296 - 137, 67, 3, 4, 138, 138, 72, 138, 138, 540,
15297 - 138, 6, 138, 138, 545, 134, 547, 136, 4, 495,
15298 - 496, 582, 141, 142, 4, 91, 4, 558, 4, 30,
15299 - 31, 97, 98, 4, 4, 4, 37, 38, 39, 40,
15300 - 138, 4, 138, 109, 4, 576, 4, 48, 49, 50,
15301 - 4, 4, 583, 138, 55, 4, 4, 728, 4, 60,
15302 - 731, 137, 137, 4, 735, 37, 138, 68, 54, 37,
15303 - 4, 138, 73, 74, 75, 76, 77, 78, 79, 3,
15304 - 4, 67, 136, 138, 645, 86, 72, 88, 138, 138,
15305 - 138, 138, 16, 28, 29, 30, 31, 32, 33, 34,
15306 - 138, 53, 103, 136, 16, 91, 30, 31, 109, 37,
15307 - 138, 97, 98, 37, 38, 39, 138, 4, 4, 137,
15308 - 16, 37, 16, 109, 48, 49, 50, 4, 659, 632,
15309 - 633, 55, 4, 134, 637, 85, 60, 54, 95, 86,
15310 - 141, 142, 138, 16, 68, 138, 138, 37, 53, 73,
15311 - 74, 75, 76, 77, 78, 79, 3, 4, 38, 662,
15312 - 663, 37, 86, 37, 88, 138, 6, 37, 37, 672,
15313 - 673, 136, 675, 137, 677, 678, 96, 88, 137, 103,
15314 - 6, 684, 37, 30, 31, 109, 54, 16, 53, 53,
15315 - 37, 38, 39, 696, 37, 16, 4, 54, 37, 37,
15316 - 37, 48, 49, 50, 37, 708, 37, 15, 55, 37,
15317 - 134, 53, 37, 60, 37, 37, 25, 141, 142, 37,
15318 - 37, 68, 37, 138, 32, 138, 73, 74, 75, 76,
15319 - 77, 78, 79, 41, 42, 43, 44, 45, 37, 86,
15320 - 37, 88, 4, 51, 52, 6, 7, 8, 9, 10,
15321 - 11, 12, 13, 14, 138, 138, 103, 138, 54, 95,
15322 - 138, 25, 109, 22, 23, 24, 25, 26, 27, 28,
15323 - 29, 30, 31, 32, 33, 34, 37, 138, 138, 87,
15324 - 4, 89, 138, 4, 138, 93, 138, 134, 4, 97,
15325 - 98, 4, 138, 138, 141, 142, 204, 138, 231, 134,
15326 - 15, 109, 17, 18, 19, 20, 21, 22, 23, 24,
15327 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15328 - 675, 129, 46, 47, 138, 133, 138, 138, 544, 137,
15329 - 642, 139, 56, 57, 58, 59, 625, 61, 62, 669,
15330 - 715, 660, 512, 688, 543, 69, 70, 71, 72, 411,
15331 - 667, 475, 4, 26, 96, -1, 80, 81, 82, 83,
15332 - 84, 85, 228, 536, -1, -1, 90, 91, 92, -1,
15333 - -1, -1, -1, 97, 98, -1, -1, -1, -1, -1,
15334 - -1, -1, -1, -1, 36, 109, -1, -1, -1, -1,
15335 - -1, -1, -1, -1, 46, 47, -1, 121, -1, -1,
15336 - -1, -1, -1, 127, 56, 57, 58, 59, -1, 61,
15337 - 62, -1, -1, 137, -1, -1, -1, 69, 70, 71,
15338 - 72, 136, -1, 138, -1, -1, -1, -1, 80, 81,
15339 - 82, 83, 84, 85, -1, -1, -1, -1, 90, 91,
15340 - 92, -1, -1, -1, -1, 97, 98, -1, -1, -1,
15341 - -1, -1, -1, -1, -1, -1, -1, 109, 24, 25,
15342 - 26, 27, 28, 29, 30, 31, 32, 33, 34, 121,
15343 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15344 - 31, 32, 33, 34, 15, 137, 17, 18, 19, 20,
15345 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15346 - 31, 32, 33, 34, 15, -1, 17, 18, 19, 20,
15347 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15348 - 31, 32, 33, 34, 15, -1, 17, 18, 19, 20,
15349 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15350 - 31, 32, 33, 34, 15, -1, 17, 18, 19, 20,
15351 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15352 - 31, 32, 33, 34, 15, -1, 17, 18, 19, 20,
15353 - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15354 - 31, 32, 33, 34, 15, -1, 17, 18, 19, 20,
15355 + 71, 23, 103, 216, 217, 69, 202, 4, 4, 25,
15356 + 81, 112, 224, 471, 322, 636, 4, 88, 3, 4,
15357 + 4, 5, 4, 218, 4, 5, 4, 15, 4, 5,
15358 + 607, 4, 5, 554, 6, 53, 54, 4, 710, 4,
15359 + 4, 125, 53, 0, 32, 30, 31, 6, 4, 721,
15360 + 4, 4, 37, 38, 39, 139, 633, 121, 122, 15,
15361 + 124, 125, 4, 48, 49, 50, 130, 6, 589, 6,
15362 + 55, 720, 53, 144, 145, 60, 32, 16, 63, 64,
15363 + 65, 66, 67, 68, 733, 627, 4, 54, 73, 74,
15364 + 75, 76, 77, 78, 79, 80, 81, 125, 169, 170,
15365 + 677, 172, 4, 88, 53, 90, 564, 125, 650, 180,
15366 + 731, 139, 54, 15, 125, 97, 424, 101, 138, 53,
15367 + 105, 101, 142, 4, 53, 101, 111, 4, 101, 200,
15368 + 32, 673, 4, 4, 5, 138, 54, 140, 333, 4,
15369 + 5, 3, 4, 140, 4, 5, 143, 143, 606, 51,
15370 + 52, 136, 140, 37, 138, 140, 140, 228, 143, 144,
15371 + 231, 232, 140, 234, 235, 138, 138, 140, 239, 240,
15372 + 241, 242, 243, 138, 138, 246, 192, 193, 53, 138,
15373 + 251, 252, 253, 254, 140, 138, 257, 258, 32, 33,
15374 + 34, 262, 263, 264, 265, 266, 267, 268, 269, 270,
15375 + 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
15376 + 281, 282, 283, 37, 138, 4, 140, 429, 289, 290,
15377 + 138, 4, 132, 133, 134, 3, 4, 138, 6, 140,
15378 + 101, 37, 15, 135, 138, 139, 101, 4, 37, 141,
15379 + 4, 101, 123, 344, 345, 126, 127, 128, 15, 32,
15380 + 37, 123, 30, 31, 126, 127, 128, 37, 37, 37,
15381 + 38, 39, 37, 37, 39, 32, 330, 138, 332, 140,
15382 + 48, 49, 50, 138, 37, 140, 488, 55, 138, 138,
15383 + 140, 140, 60, 4, 51, 52, 37, 37, 37, 37,
15384 + 68, 37, 37, 129, 15, 73, 74, 75, 76, 77,
15385 + 78, 79, 80, 81, 119, 120, 121, 4, 4, 4,
15386 + 88, 32, 90, 4, 4, 130, 4, 530, 15, 4,
15387 + 4, 533, 137, 4, 4, 3, 348, 105, 95, 4,
15388 + 51, 52, 4, 111, 123, 32, 107, 126, 127, 128,
15389 + 4, 54, 16, 16, 415, 416, 417, 418, 139, 54,
15390 + 3, 4, 4, 6, 51, 52, 4, 139, 136, 123,
15391 + 138, 4, 126, 127, 128, 143, 144, 4, 135, 440,
15392 + 4, 4, 443, 444, 570, 446, 4, 30, 31, 4,
15393 + 37, 15, 453, 454, 37, 38, 39, 4, 4, 4,
15394 + 37, 462, 408, 53, 138, 48, 49, 50, 32, 37,
15395 + 138, 37, 55, 138, 4, 37, 37, 60, 30, 31,
15396 + 32, 33, 34, 37, 135, 68, 37, 51, 52, 37,
15397 + 73, 74, 75, 76, 77, 78, 79, 80, 81, 54,
15398 + 37, 37, 37, 53, 37, 88, 37, 90, 135, 37,
15399 + 37, 512, 67, 37, 37, 37, 37, 72, 37, 37,
15400 + 37, 138, 105, 139, 54, 54, 139, 558, 111, 63,
15401 + 64, 65, 66, 67, 140, 37, 6, 67, 93, 140,
15402 + 3, 4, 72, 140, 99, 100, 6, 548, 140, 140,
15403 + 4, 140, 553, 136, 555, 138, 111, 503, 504, 590,
15404 + 143, 144, 4, 93, 140, 566, 140, 30, 31, 99,
15405 + 100, 140, 4, 4, 37, 38, 39, 40, 4, 4,
15406 + 4, 111, 4, 584, 4, 48, 49, 50, 4, 4,
15407 + 591, 4, 55, 736, 4, 139, 739, 60, 139, 4,
15408 + 743, 4, 37, 37, 4, 68, 140, 53, 140, 16,
15409 + 73, 74, 75, 76, 77, 78, 79, 80, 81, 640,
15410 + 641, 4, 653, 138, 645, 88, 140, 90, 140, 140,
15411 + 6, 7, 8, 9, 10, 11, 12, 13, 14, 140,
15412 + 3, 4, 105, 140, 140, 140, 138, 37, 111, 670,
15413 + 671, 140, 140, 16, 4, 139, 16, 37, 16, 680,
15414 + 681, 37, 683, 4, 685, 686, 667, 30, 31, 97,
15415 + 87, 692, 4, 136, 37, 38, 39, 88, 140, 140,
15416 + 143, 144, 54, 704, 140, 48, 49, 50, 16, 37,
15417 + 140, 38, 55, 37, 53, 716, 6, 60, 28, 29,
15418 + 30, 31, 32, 33, 34, 68, 37, 98, 138, 90,
15419 + 73, 74, 75, 76, 77, 78, 79, 80, 81, 3,
15420 + 4, 139, 37, 37, 6, 88, 37, 90, 21, 22,
15421 + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
15422 + 33, 34, 105, 139, 16, 54, 30, 31, 111, 53,
15423 + 53, 37, 16, 37, 38, 39, 37, 37, 37, 37,
15424 + 37, 37, 54, 37, 48, 49, 50, 37, 37, 25,
15425 + 53, 55, 37, 136, 37, 140, 60, 4, 37, 140,
15426 + 143, 144, 37, 37, 68, 140, 140, 140, 15, 73,
15427 + 74, 75, 76, 77, 78, 79, 80, 81, 4, 97,
15428 + 140, 140, 54, 25, 88, 32, 90, 140, 4, 4,
15429 + 4, 140, 233, 140, 41, 42, 43, 44, 45, 140,
15430 + 140, 105, 140, 140, 51, 52, 552, 111, 140, 134,
15431 + 683, 15, 140, 17, 18, 19, 20, 21, 22, 23,
15432 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15433 + 34, 140, 136, 650, 206, 668, 633, 677, 723, 143,
15434 + 144, 483, 89, 4, 91, 696, 520, 551, 95, 675,
15435 + 26, 96, 99, 100, 417, 544, -1, -1, -1, 230,
15436 + -1, -1, -1, 15, 111, 17, 18, 19, 20, 21,
15437 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15438 + 32, 33, 34, -1, 131, 46, 47, -1, 135, -1,
15439 + -1, -1, 139, -1, 141, 56, 57, 58, 59, -1,
15440 + 61, 62, -1, -1, -1, -1, -1, -1, 69, 70,
15441 + 71, 72, -1, -1, -1, -1, -1, 4, -1, -1,
15442 + -1, 82, 83, 84, 85, 86, 87, -1, -1, 4,
15443 + -1, 92, 93, 94, 138, -1, 140, -1, 99, 100,
15444 + 6, 7, 8, 9, 10, 11, 12, 13, 14, 36,
15445 + 111, -1, -1, -1, -1, -1, -1, -1, -1, 46,
15446 + 47, -1, 123, 38, -1, -1, -1, -1, 129, 56,
15447 + 57, 58, 59, -1, 61, 62, -1, -1, 139, -1,
15448 + -1, -1, 69, 70, 71, 72, 61, -1, 140, -1,
15449 + -1, -1, -1, -1, -1, 82, 83, 84, 85, 86,
15450 + 87, -1, -1, -1, -1, 92, 93, 94, -1, -1,
15451 + -1, -1, 99, 100, -1, -1, -1, -1, -1, -1,
15452 + -1, 96, -1, -1, 111, -1, -1, 102, 103, 104,
15453 + 105, 106, 107, 108, 109, 110, 123, 112, 113, -1,
15454 + 115, 116, 117, -1, -1, -1, -1, 122, 123, 124,
15455 + -1, 15, 139, 17, 18, 19, 20, 21, 22, 23,
15456 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15457 + 34, 15, -1, 17, 18, 19, 20, 21, 22, 23,
15458 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15459 + 34, 15, -1, 17, 18, 19, 20, 21, 22, 23,
15460 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15461 + 34, 15, -1, 17, 18, 19, 20, 21, 22, 23,
15462 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15463 + 34, 15, -1, 17, 18, 19, 20, 21, 22, 23,
15464 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15465 + 34, 15, -1, 17, 18, 19, 20, 21, 22, 23,
15466 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15467 + 34, -1, -1, -1, -1, 15, 140, 17, 18, 19,
15468 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15469 + 30, 31, 32, 33, 34, 15, 140, 17, 18, 19,
15470 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15471 + 30, 31, 32, 33, 34, 15, 140, 17, 18, 19,
15472 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15473 + 30, 31, 32, 33, 34, 15, 140, 17, 18, 19,
15474 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15475 + 30, 31, 32, 33, 34, 15, 140, 17, 18, 19,
15476 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15477 + 30, 31, 32, 33, 34, 15, 140, 17, 18, 19,
15478 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15479 + 30, 31, 32, 33, 34, -1, -1, -1, -1, 15,
15480 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15481 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 15,
15482 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15483 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 15,
15484 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15485 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 15,
15486 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15487 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 15,
15488 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15489 + 26, 27, 28, 29, 30, 31, 32, 33, 34, 15,
15490 + 140, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15491 + 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
15492 + -1, -1, -1, 15, 140, 17, 18, 19, 20, 21,
15493 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15494 + 32, 33, 34, 15, 140, 17, 18, 19, 20, 21,
15495 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15496 + 32, 33, 34, 15, 140, 17, 18, 19, 20, 21,
15497 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15498 + 32, 33, 34, 15, 140, 17, 18, 19, 20, 21,
15499 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15500 + 32, 33, 34, 15, 140, 17, 18, 19, 20, 21,
15501 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15502 + 32, 33, 34, 15, 140, 17, 18, 19, 20, 21,
15503 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
15504 + 32, 33, 34, -1, -1, -1, -1, -1, 140, 19,
15505 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15506 + 30, 31, 32, 33, 34, 15, 138, 17, 18, 19,
15507 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15508 + 30, 31, 32, 33, 34, 15, 138, 17, 18, 19,
15509 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15510 + 30, 31, 32, 33, 34, 15, 138, 17, 18, 19,
15511 + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
15512 + 30, 31, 32, 33, 34, 4, 138, 18, 19, 20,
15513 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15514 - 31, 32, 33, 34, -1, -1, 15, 138, 17, 18,
15515 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15516 - 29, 30, 31, 32, 33, 34, 15, 138, 17, 18,
15517 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15518 - 29, 30, 31, 32, 33, 34, 15, 138, 17, 18,
15519 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15520 - 29, 30, 31, 32, 33, 34, 15, 138, 17, 18,
15521 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15522 - 29, 30, 31, 32, 33, 34, 15, 138, 17, 18,
15523 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15524 - 29, 30, 31, 32, 33, 34, 15, 138, 17, 18,
15525 - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15526 - 29, 30, 31, 32, 33, 34, -1, -1, 15, 138,
15527 - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15528 - 27, 28, 29, 30, 31, 32, 33, 34, 15, 138,
15529 - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15530 - 27, 28, 29, 30, 31, 32, 33, 34, 15, 138,
15531 - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15532 - 27, 28, 29, 30, 31, 32, 33, 34, 15, 138,
15533 - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15534 - 27, 28, 29, 30, 31, 32, 33, 34, 15, 138,
15535 - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15536 - 27, 28, 29, 30, 31, 32, 33, 34, 15, 138,
15537 + 31, 32, 33, 34, -1, -1, 138, -1, -1, -1,
15538 + -1, -1, -1, -1, -1, -1, -1, 36, 15, 38,
15539 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
15540 27, 28, 29, 30, 31, 32, 33, 34, -1, -1,
15541 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15542 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15543 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15544 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15545 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15546 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15547 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15548 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15549 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15550 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15551 - 15, 138, 17, 18, 19, 20, 21, 22, 23, 24,
15552 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15553 - 15, 136, 17, 18, 19, 20, 21, 22, 23, 24,
15554 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15555 - 15, 136, 17, 18, 19, 20, 21, 22, 23, 24,
15556 - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
15557 - -1, 136, -1, -1, -1, -1, 4, -1, -1, -1,
15558 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
15559 - -1, 136, -1, -1, -1, -1, -1, -1, -1, -1,
15560 - 4, -1, -1, -1, -1, -1, -1, -1, -1, -1,
15561 - 38, 136, 18, 19, 20, 21, 22, 23, 24, 25,
15562 - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
15563 - -1, 136, 36, 61, 38, 19, 20, 21, 22, 23,
15564 + 37, -1, 61, -1, -1, -1, -1, 15, 138, 17,
15565 + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
15566 + 28, 29, 30, 31, 32, 33, 34, -1, 138, -1,
15567 + -1, -1, -1, -1, -1, -1, -1, 96, -1, -1,
15568 + -1, -1, -1, 102, 103, 104, 105, 106, 138, 108,
15569 + 109, 110, -1, 112, 113, -1, 115, 116, 117, -1,
15570 + -1, -1, -1, 122, 123, 124, 15, 16, 17, 18,
15571 + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15572 + 29, 30, 31, 32, 33, 34, 15, 16, 17, 18,
15573 + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
15574 + 29, 30, 31, 32, 33, 34, 20, 21, 22, 23,
15575 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15576 - 34, 136, -1, -1, -1, -1, -1, 61, -1, -1,
15577 - -1, -1, -1, -1, -1, -1, 94, -1, -1, -1,
15578 - -1, 136, 100, 101, 102, 103, 104, 105, 106, 107,
15579 - 108, -1, 110, 111, -1, 113, 114, 115, -1, -1,
15580 - 94, -1, 120, 121, 122, -1, 100, 101, 102, 103,
15581 - 104, -1, 106, 107, 108, -1, 110, 111, -1, 113,
15582 - 114, 115, -1, -1, -1, -1, 120, 121, 122, 15,
15583 - -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
15584 - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1,
15585 - -1, 37, 15, 16, 17, 18, 19, 20, 21, 22,
15586 - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
15587 - 33, 34, 15, 16, 17, 18, 19, 20, 21, 22,
15588 - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
15589 - 33, 34, 15, -1, 17, 18, 19, 20, 21, 22,
15590 - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
15591 - 33, 34, 20, 21, 22, 23, 24, 25, 26, 27,
15592 - 28, 29, 30, 31, 32, 33, 34
15593 + 34, 22, 23, 24, 25, 26, 27, 28, 29, 30,
15594 + 31, 32, 33, 34, 24, 25, 26, 27, 28, 29,
15595 + 30, 31, 32, 33, 34
15598 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
15599 symbol of state STATE-NUM. */
15600 -static const yytype_uint16 yystos[] =
15601 +static const unsigned short int yystos[] =
15603 - 0, 117, 118, 119, 128, 135, 144, 160, 161, 148,
15604 - 149, 146, 147, 253, 254, 248, 249, 0, 162, 150,
15605 - 4, 53, 123, 257, 258, 53, 250, 251, 4, 46,
15606 + 0, 119, 120, 121, 130, 137, 146, 162, 163, 150,
15607 + 151, 148, 149, 255, 256, 250, 251, 0, 164, 152,
15608 + 4, 53, 125, 259, 260, 53, 252, 253, 4, 46,
15609 47, 56, 57, 58, 59, 61, 62, 69, 70, 71,
15610 - 72, 80, 81, 82, 83, 84, 85, 90, 91, 92,
15611 - 97, 98, 109, 121, 137, 163, 170, 172, 190, 192,
15612 - 201, 202, 204, 206, 240, 255, 256, 4, 38, 61,
15613 - 94, 100, 101, 102, 103, 104, 106, 107, 108, 110,
15614 - 111, 113, 114, 115, 120, 121, 122, 151, 6, 4,
15615 - 121, 124, 125, 126, 260, 261, 53, 258, 125, 126,
15616 - 252, 261, 251, 6, 7, 8, 9, 10, 11, 12,
15617 - 13, 14, 188, 53, 53, 37, 37, 4, 145, 53,
15618 - 37, 37, 37, 37, 37, 37, 37, 37, 37, 164,
15619 - 37, 37, 37, 173, 37, 136, 137, 189, 127, 4,
15620 - 145, 4, 3, 4, 30, 31, 37, 38, 39, 48,
15621 + 72, 82, 83, 84, 85, 86, 87, 92, 93, 94,
15622 + 99, 100, 111, 123, 139, 165, 172, 174, 192, 194,
15623 + 203, 204, 206, 208, 242, 257, 258, 4, 38, 61,
15624 + 96, 102, 103, 104, 105, 106, 108, 109, 110, 112,
15625 + 113, 115, 116, 117, 122, 123, 124, 153, 6, 4,
15626 + 123, 126, 127, 128, 262, 263, 53, 260, 127, 128,
15627 + 254, 263, 253, 6, 7, 8, 9, 10, 11, 12,
15628 + 13, 14, 190, 53, 53, 37, 37, 4, 147, 53,
15629 + 37, 37, 37, 37, 37, 37, 37, 37, 37, 166,
15630 + 37, 37, 37, 175, 37, 138, 139, 191, 129, 4,
15631 + 147, 4, 3, 4, 30, 31, 37, 38, 39, 48,
15632 49, 50, 55, 60, 68, 73, 74, 75, 76, 77,
15633 - 78, 79, 86, 88, 103, 109, 134, 141, 142, 210,
15634 - 4, 4, 155, 4, 154, 153, 4, 4, 4, 210,
15635 - 4, 3, 4, 156, 157, 158, 4, 105, 210, 4,
15636 - 16, 16, 54, 137, 260, 54, 137, 208, 209, 208,
15637 - 171, 241, 4, 4, 165, 4, 194, 4, 145, 145,
15638 - 4, 145, 138, 145, 203, 205, 4, 207, 4, 5,
15639 - 99, 166, 37, 145, 4, 4, 37, 157, 53, 6,
15640 - 136, 152, 6, 136, 210, 210, 210, 37, 37, 37,
15641 + 78, 79, 80, 81, 88, 90, 105, 111, 136, 143,
15642 + 144, 212, 4, 4, 157, 4, 156, 155, 4, 4,
15643 + 4, 212, 4, 3, 4, 158, 159, 160, 4, 107,
15644 + 212, 4, 16, 16, 54, 139, 262, 54, 139, 210,
15645 + 211, 210, 173, 243, 4, 4, 167, 4, 196, 4,
15646 + 147, 147, 4, 147, 140, 147, 205, 207, 4, 209,
15647 + 4, 5, 101, 168, 37, 147, 4, 4, 37, 159,
15648 + 53, 6, 138, 154, 6, 138, 212, 212, 212, 37,
15649 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
15650 - 37, 37, 37, 37, 37, 37, 210, 210, 15, 17,
15651 - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
15652 - 28, 29, 30, 31, 32, 33, 34, 136, 6, 136,
15653 - 210, 136, 136, 4, 136, 6, 136, 210, 136, 136,
15654 - 4, 159, 53, 261, 261, 137, 4, 121, 124, 125,
15655 - 126, 54, 137, 210, 4, 54, 67, 91, 172, 216,
15656 - 4, 54, 242, 136, 138, 138, 162, 195, 193, 138,
15657 - 138, 138, 138, 138, 136, 138, 191, 138, 191, 136,
15658 - 207, 138, 37, 4, 5, 99, 136, 138, 166, 138,
15659 - 6, 6, 210, 138, 257, 210, 210, 150, 210, 210,
15660 - 138, 210, 210, 210, 210, 210, 4, 4, 210, 4,
15661 - 4, 4, 4, 210, 210, 4, 4, 210, 210, 4,
15662 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
15663 - 210, 210, 210, 210, 210, 210, 210, 210, 210, 210,
15664 - 210, 210, 4, 4, 4, 210, 210, 3, 4, 4,
15665 - 4, 136, 263, 137, 137, 4, 123, 137, 259, 217,
15666 - 222, 227, 243, 4, 36, 37, 198, 54, 136, 194,
15667 - 145, 145, 207, 167, 37, 4, 5, 99, 138, 208,
15668 - 208, 136, 54, 36, 136, 138, 138, 136, 136, 138,
15669 - 136, 138, 138, 138, 138, 138, 138, 136, 136, 138,
15670 - 138, 138, 136, 138, 16, 4, 261, 126, 53, 123,
15671 - 137, 37, 40, 210, 230, 231, 16, 210, 232, 231,
15672 - 210, 245, 136, 4, 141, 199, 200, 16, 194, 166,
15673 - 169, 37, 138, 138, 4, 210, 210, 210, 210, 210,
15674 - 210, 4, 210, 137, 264, 16, 262, 63, 64, 65,
15675 - 66, 67, 138, 229, 37, 37, 230, 16, 95, 212,
15676 - 16, 85, 233, 228, 4, 95, 246, 4, 4, 138,
15677 - 200, 86, 196, 138, 166, 168, 138, 138, 138, 138,
15678 - 138, 138, 138, 138, 54, 261, 261, 138, 210, 16,
15679 - 37, 38, 213, 212, 53, 37, 247, 37, 244, 138,
15680 - 6, 191, 138, 166, 137, 264, 138, 210, 37, 96,
15681 - 214, 214, 171, 210, 246, 210, 137, 208, 88, 197,
15682 - 138, 54, 39, 230, 138, 210, 37, 218, 223, 54,
15683 - 138, 138, 6, 37, 16, 138, 210, 130, 131, 132,
15684 - 215, 53, 246, 208, 210, 138, 53, 224, 138, 219,
15685 - 236, 230, 4, 15, 32, 41, 42, 43, 44, 45,
15686 - 51, 52, 87, 89, 93, 109, 129, 133, 137, 139,
15687 - 174, 175, 178, 179, 181, 183, 184, 185, 190, 4,
15688 - 54, 16, 37, 37, 37, 182, 37, 37, 4, 51,
15689 - 175, 177, 37, 181, 54, 37, 189, 237, 225, 51,
15690 - 52, 93, 133, 174, 51, 52, 174, 186, 208, 37,
15691 - 180, 174, 176, 37, 140, 191, 177, 220, 208, 53,
15692 - 25, 234, 37, 37, 138, 37, 138, 37, 37, 138,
15693 - 138, 210, 4, 178, 138, 174, 175, 138, 234, 138,
15694 - 184, 4, 95, 211, 174, 174, 176, 174, 174, 136,
15695 - 138, 174, 211, 54, 25, 235, 138, 138, 138, 138,
15696 - 138, 4, 235, 238, 4, 6, 16, 187, 138, 138,
15697 - 174, 138, 138, 138, 187, 235, 186, 4, 226, 138,
15698 - 189, 221, 187, 191, 191, 239, 191
15699 + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
15700 + 212, 212, 15, 17, 18, 19, 20, 21, 22, 23,
15701 + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
15702 + 34, 138, 6, 138, 212, 138, 138, 4, 138, 6,
15703 + 138, 212, 138, 138, 4, 161, 53, 263, 263, 139,
15704 + 4, 123, 126, 127, 128, 54, 139, 212, 4, 54,
15705 + 67, 93, 174, 218, 4, 54, 244, 138, 140, 140,
15706 + 164, 197, 195, 140, 140, 140, 140, 140, 138, 140,
15707 + 193, 140, 193, 138, 209, 140, 37, 4, 5, 101,
15708 + 138, 140, 168, 140, 6, 6, 212, 140, 259, 212,
15709 + 212, 152, 212, 212, 140, 212, 212, 212, 212, 212,
15710 + 4, 4, 212, 4, 4, 4, 4, 212, 212, 212,
15711 + 212, 4, 4, 212, 212, 4, 212, 212, 212, 212,
15712 + 212, 212, 212, 212, 212, 212, 212, 212, 212, 212,
15713 + 212, 212, 212, 212, 212, 212, 212, 212, 4, 4,
15714 + 4, 212, 212, 3, 4, 4, 4, 138, 265, 139,
15715 + 139, 4, 125, 139, 261, 219, 224, 229, 245, 4,
15716 + 36, 37, 200, 54, 138, 196, 147, 147, 209, 169,
15717 + 37, 4, 5, 101, 140, 210, 210, 138, 54, 36,
15718 + 138, 140, 140, 138, 138, 140, 138, 140, 140, 140,
15719 + 140, 140, 140, 138, 138, 140, 140, 140, 140, 140,
15720 + 138, 140, 16, 4, 263, 128, 53, 125, 139, 37,
15721 + 40, 212, 232, 233, 16, 212, 234, 233, 212, 247,
15722 + 138, 4, 143, 201, 202, 16, 196, 168, 171, 37,
15723 + 140, 140, 4, 212, 212, 212, 212, 212, 212, 4,
15724 + 212, 139, 266, 16, 264, 63, 64, 65, 66, 67,
15725 + 140, 231, 37, 37, 232, 16, 97, 214, 16, 87,
15726 + 235, 230, 4, 97, 248, 4, 4, 140, 202, 88,
15727 + 198, 140, 168, 170, 140, 140, 140, 140, 140, 140,
15728 + 140, 140, 54, 263, 263, 140, 212, 16, 37, 38,
15729 + 215, 214, 53, 37, 249, 37, 246, 140, 6, 193,
15730 + 140, 168, 139, 266, 140, 212, 37, 98, 216, 216,
15731 + 173, 212, 248, 212, 139, 210, 90, 199, 140, 54,
15732 + 39, 232, 140, 212, 37, 220, 225, 54, 140, 140,
15733 + 6, 37, 16, 140, 212, 132, 133, 134, 217, 53,
15734 + 248, 210, 212, 140, 53, 226, 140, 221, 238, 232,
15735 + 4, 15, 32, 41, 42, 43, 44, 45, 51, 52,
15736 + 89, 91, 95, 111, 131, 135, 139, 141, 176, 177,
15737 + 180, 181, 183, 185, 186, 187, 192, 4, 54, 16,
15738 + 37, 37, 37, 184, 37, 37, 4, 51, 177, 179,
15739 + 37, 183, 54, 37, 191, 239, 227, 51, 52, 95,
15740 + 135, 176, 51, 52, 176, 188, 210, 37, 182, 176,
15741 + 178, 37, 142, 193, 179, 222, 210, 53, 25, 236,
15742 + 37, 37, 140, 37, 140, 37, 37, 140, 140, 212,
15743 + 4, 180, 140, 176, 177, 140, 236, 140, 186, 4,
15744 + 97, 213, 176, 176, 178, 176, 176, 138, 140, 176,
15745 + 213, 54, 25, 237, 140, 140, 140, 140, 140, 4,
15746 + 237, 240, 4, 6, 16, 189, 140, 140, 176, 140,
15747 + 140, 140, 189, 237, 188, 4, 228, 140, 191, 223,
15748 + 189, 193, 193, 241, 193
15751 #define yyerrok (yyerrstatus = 0)
15752 @@ -1719,7 +1664,7 @@
15753 yychar = (Token); \
15754 yylval = (Value); \
15755 yytoken = YYTRANSLATE (yychar); \
15756 - YYPOPSTACK (1); \
15757 + YYPOPSTACK; \
15758 goto yybackup; \
15760 else \
15761 @@ -1727,7 +1672,7 @@
15762 yyerror (YY_("syntax error: cannot back up")); \
15763 YYERROR; \
15765 -while (YYID (0))
15766 +while (0)
15769 #define YYTERROR 1
15770 @@ -1742,7 +1687,7 @@
15771 #ifndef YYLLOC_DEFAULT
15772 # define YYLLOC_DEFAULT(Current, Rhs, N) \
15773 do \
15774 - if (YYID (N)) \
15775 + if (N) \
15777 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
15778 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
15779 @@ -1756,7 +1701,7 @@
15780 (Current).first_column = (Current).last_column = \
15781 YYRHSLOC (Rhs, 0).last_column; \
15783 - while (YYID (0))
15784 + while (0)
15785 #endif
15788 @@ -1768,8 +1713,8 @@
15789 # if YYLTYPE_IS_TRIVIAL
15790 # define YY_LOCATION_PRINT(File, Loc) \
15791 fprintf (File, "%d.%d-%d.%d", \
15792 - (Loc).first_line, (Loc).first_column, \
15793 - (Loc).last_line, (Loc).last_column)
15794 + (Loc).first_line, (Loc).first_column, \
15795 + (Loc).last_line, (Loc).last_column)
15796 # else
15797 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
15798 # endif
15799 @@ -1796,96 +1741,36 @@
15800 do { \
15801 if (yydebug) \
15802 YYFPRINTF Args; \
15803 -} while (YYID (0))
15805 -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
15806 -do { \
15807 - if (yydebug) \
15808 - { \
15809 - YYFPRINTF (stderr, "%s ", Title); \
15810 - yy_symbol_print (stderr, \
15811 - Type, Value); \
15812 - YYFPRINTF (stderr, "\n"); \
15813 - } \
15814 -} while (YYID (0))
15815 +} while (0)
15818 -/*--------------------------------.
15819 -| Print this symbol on YYOUTPUT. |
15820 -`--------------------------------*/
15822 -/*ARGSUSED*/
15823 -#if (defined __STDC__ || defined __C99__FUNC__ \
15824 - || defined __cplusplus || defined _MSC_VER)
15825 -static void
15826 -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
15827 -#else
15828 -static void
15829 -yy_symbol_value_print (yyoutput, yytype, yyvaluep)
15830 - FILE *yyoutput;
15831 - int yytype;
15832 - YYSTYPE const * const yyvaluep;
15833 -#endif
15835 - if (!yyvaluep)
15836 - return;
15837 -# ifdef YYPRINT
15838 - if (yytype < YYNTOKENS)
15839 - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
15840 -# else
15841 - YYUSE (yyoutput);
15842 -# endif
15843 - switch (yytype)
15845 - default:
15846 - break;
15851 -/*--------------------------------.
15852 -| Print this symbol on YYOUTPUT. |
15853 -`--------------------------------*/
15855 -#if (defined __STDC__ || defined __C99__FUNC__ \
15856 - || defined __cplusplus || defined _MSC_VER)
15857 -static void
15858 -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
15859 -#else
15860 -static void
15861 -yy_symbol_print (yyoutput, yytype, yyvaluep)
15862 - FILE *yyoutput;
15863 - int yytype;
15864 - YYSTYPE const * const yyvaluep;
15865 -#endif
15867 - if (yytype < YYNTOKENS)
15868 - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
15869 - else
15870 - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
15872 - yy_symbol_value_print (yyoutput, yytype, yyvaluep);
15873 - YYFPRINTF (yyoutput, ")");
15875 +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
15876 +do { \
15877 + if (yydebug) \
15878 + { \
15879 + YYFPRINTF (stderr, "%s ", Title); \
15880 + yysymprint (stderr, \
15881 + Type, Value); \
15882 + YYFPRINTF (stderr, "\n"); \
15883 + } \
15884 +} while (0)
15886 /*------------------------------------------------------------------.
15887 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
15888 | TOP (included). |
15889 `------------------------------------------------------------------*/
15891 -#if (defined __STDC__ || defined __C99__FUNC__ \
15892 - || defined __cplusplus || defined _MSC_VER)
15893 +#if defined (__STDC__) || defined (__cplusplus)
15894 static void
15895 -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
15896 +yy_stack_print (short int *bottom, short int *top)
15897 #else
15898 static void
15899 yy_stack_print (bottom, top)
15900 - yytype_int16 *bottom;
15901 - yytype_int16 *top;
15902 + short int *bottom;
15903 + short int *top;
15904 #endif
15906 YYFPRINTF (stderr, "Stack now");
15907 - for (; bottom <= top; ++bottom)
15908 + for (/* Nothing. */; bottom <= top; ++bottom)
15909 YYFPRINTF (stderr, " %d", *bottom);
15910 YYFPRINTF (stderr, "\n");
15912 @@ -1894,45 +1779,37 @@
15913 do { \
15914 if (yydebug) \
15915 yy_stack_print ((Bottom), (Top)); \
15916 -} while (YYID (0))
15917 +} while (0)
15920 /*------------------------------------------------.
15921 | Report that the YYRULE is going to be reduced. |
15922 `------------------------------------------------*/
15924 -#if (defined __STDC__ || defined __C99__FUNC__ \
15925 - || defined __cplusplus || defined _MSC_VER)
15926 +#if defined (__STDC__) || defined (__cplusplus)
15927 static void
15928 -yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
15929 +yy_reduce_print (int yyrule)
15930 #else
15931 static void
15932 -yy_reduce_print (yyvsp, yyrule)
15933 - YYSTYPE *yyvsp;
15934 +yy_reduce_print (yyrule)
15935 int yyrule;
15936 #endif
15938 - int yynrhs = yyr2[yyrule];
15939 int yyi;
15940 unsigned long int yylno = yyrline[yyrule];
15941 - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
15942 - yyrule - 1, yylno);
15943 - /* The symbols being reduced. */
15944 - for (yyi = 0; yyi < yynrhs; yyi++)
15946 - fprintf (stderr, " $%d = ", yyi + 1);
15947 - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
15948 - &(yyvsp[(yyi + 1) - (yynrhs)])
15949 - );
15950 - fprintf (stderr, "\n");
15952 + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
15953 + yyrule - 1, yylno);
15954 + /* Print the symbols being reduced, and their result. */
15955 + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
15956 + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
15957 + YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
15960 # define YY_REDUCE_PRINT(Rule) \
15961 do { \
15962 if (yydebug) \
15963 - yy_reduce_print (yyvsp, Rule); \
15964 -} while (YYID (0))
15965 + yy_reduce_print (Rule); \
15966 +} while (0)
15968 /* Nonzero means print parse trace. It is left uninitialized so that
15969 multiple parsers can coexist. */
15970 @@ -1966,44 +1843,42 @@
15971 #if YYERROR_VERBOSE
15973 # ifndef yystrlen
15974 -# if defined __GLIBC__ && defined _STRING_H
15975 +# if defined (__GLIBC__) && defined (_STRING_H)
15976 # define yystrlen strlen
15977 # else
15978 /* Return the length of YYSTR. */
15979 -#if (defined __STDC__ || defined __C99__FUNC__ \
15980 - || defined __cplusplus || defined _MSC_VER)
15981 static YYSIZE_T
15982 +# if defined (__STDC__) || defined (__cplusplus)
15983 yystrlen (const char *yystr)
15984 -#else
15985 -static YYSIZE_T
15986 +# else
15987 yystrlen (yystr)
15988 - const char *yystr;
15989 -#endif
15990 + const char *yystr;
15991 +# endif
15993 - YYSIZE_T yylen;
15994 - for (yylen = 0; yystr[yylen]; yylen++)
15995 + const char *yys = yystr;
15997 + while (*yys++ != '\0')
15998 continue;
15999 - return yylen;
16001 + return yys - yystr - 1;
16003 # endif
16004 # endif
16006 # ifndef yystpcpy
16007 -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
16008 +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
16009 # define yystpcpy stpcpy
16010 # else
16011 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
16012 YYDEST. */
16013 -#if (defined __STDC__ || defined __C99__FUNC__ \
16014 - || defined __cplusplus || defined _MSC_VER)
16015 static char *
16016 +# if defined (__STDC__) || defined (__cplusplus)
16017 yystpcpy (char *yydest, const char *yysrc)
16018 -#else
16019 -static char *
16020 +# else
16021 yystpcpy (yydest, yysrc)
16022 - char *yydest;
16023 - const char *yysrc;
16024 -#endif
16025 + char *yydest;
16026 + const char *yysrc;
16027 +# endif
16029 char *yyd = yydest;
16030 const char *yys = yysrc;
16031 @@ -2029,7 +1904,7 @@
16033 if (*yystr == '"')
16035 - YYSIZE_T yyn = 0;
16036 + size_t yyn = 0;
16037 char const *yyp = yystr;
16039 for (;;)
16040 @@ -2064,123 +1939,53 @@
16042 # endif
16044 -/* Copy into YYRESULT an error message about the unexpected token
16045 - YYCHAR while in state YYSTATE. Return the number of bytes copied,
16046 - including the terminating null byte. If YYRESULT is null, do not
16047 - copy anything; just return the number of bytes that would be
16048 - copied. As a special case, return 0 if an ordinary "syntax error"
16049 - message will do. Return YYSIZE_MAXIMUM if overflow occurs during
16050 - size calculation. */
16051 -static YYSIZE_T
16052 -yysyntax_error (char *yyresult, int yystate, int yychar)
16054 - int yyn = yypact[yystate];
16055 +#endif /* YYERROR_VERBOSE */
16057 - if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
16058 - return 0;
16059 - else
16061 - int yytype = YYTRANSLATE (yychar);
16062 - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
16063 - YYSIZE_T yysize = yysize0;
16064 - YYSIZE_T yysize1;
16065 - int yysize_overflow = 0;
16066 - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
16067 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
16068 - int yyx;
16070 -# if 0
16071 - /* This is so xgettext sees the translatable formats that are
16072 - constructed on the fly. */
16073 - YY_("syntax error, unexpected %s");
16074 - YY_("syntax error, unexpected %s, expecting %s");
16075 - YY_("syntax error, unexpected %s, expecting %s or %s");
16076 - YY_("syntax error, unexpected %s, expecting %s or %s or %s");
16077 - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
16078 -# endif
16079 - char *yyfmt;
16080 - char const *yyf;
16081 - static char const yyunexpected[] = "syntax error, unexpected %s";
16082 - static char const yyexpecting[] = ", expecting %s";
16083 - static char const yyor[] = " or %s";
16084 - char yyformat[sizeof yyunexpected
16085 - + sizeof yyexpecting - 1
16086 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
16087 - * (sizeof yyor - 1))];
16088 - char const *yyprefix = yyexpecting;
16090 - /* Start YYX at -YYN if negative to avoid negative indexes in
16091 - YYCHECK. */
16092 - int yyxbegin = yyn < 0 ? -yyn : 0;
16094 - /* Stay within bounds of both yycheck and yytname. */
16095 - int yychecklim = YYLAST - yyn + 1;
16096 - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
16097 - int yycount = 1;
16100 - yyarg[0] = yytname[yytype];
16101 - yyfmt = yystpcpy (yyformat, yyunexpected);
16102 +#if YYDEBUG
16103 +/*--------------------------------.
16104 +| Print this symbol on YYOUTPUT. |
16105 +`--------------------------------*/
16107 - for (yyx = yyxbegin; yyx < yyxend; ++yyx)
16108 - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
16110 - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
16112 - yycount = 1;
16113 - yysize = yysize0;
16114 - yyformat[sizeof yyunexpected - 1] = '\0';
16115 - break;
16117 - yyarg[yycount++] = yytname[yyx];
16118 - yysize1 = yysize + yytnamerr (0, yytname[yyx]);
16119 - yysize_overflow |= (yysize1 < yysize);
16120 - yysize = yysize1;
16121 - yyfmt = yystpcpy (yyfmt, yyprefix);
16122 - yyprefix = yyor;
16124 +#if defined (__STDC__) || defined (__cplusplus)
16125 +static void
16126 +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
16127 +#else
16128 +static void
16129 +yysymprint (yyoutput, yytype, yyvaluep)
16130 + FILE *yyoutput;
16131 + int yytype;
16132 + YYSTYPE *yyvaluep;
16133 +#endif
16135 + /* Pacify ``unused variable'' warnings. */
16136 + (void) yyvaluep;
16138 - yyf = YY_(yyformat);
16139 - yysize1 = yysize + yystrlen (yyf);
16140 - yysize_overflow |= (yysize1 < yysize);
16141 - yysize = yysize1;
16142 + if (yytype < YYNTOKENS)
16143 + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
16144 + else
16145 + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
16147 - if (yysize_overflow)
16148 - return YYSIZE_MAXIMUM;
16150 - if (yyresult)
16152 - /* Avoid sprintf, as that infringes on the user's name space.
16153 - Don't have undefined behavior even if the translation
16154 - produced a string with the wrong number of "%s"s. */
16155 - char *yyp = yyresult;
16156 - int yyi = 0;
16157 - while ((*yyp = *yyf) != '\0')
16159 - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
16161 - yyp += yytnamerr (yyp, yyarg[yyi++]);
16162 - yyf += 2;
16164 - else
16166 - yyp++;
16167 - yyf++;
16171 - return yysize;
16172 +# ifdef YYPRINT
16173 + if (yytype < YYNTOKENS)
16174 + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
16175 +# endif
16176 + switch (yytype)
16178 + default:
16179 + break;
16181 + YYFPRINTF (yyoutput, ")");
16183 -#endif /* YYERROR_VERBOSE */
16186 +#endif /* ! YYDEBUG */
16187 /*-----------------------------------------------.
16188 | Release the memory associated to this symbol. |
16189 `-----------------------------------------------*/
16191 -/*ARGSUSED*/
16192 -#if (defined __STDC__ || defined __C99__FUNC__ \
16193 - || defined __cplusplus || defined _MSC_VER)
16194 +#if defined (__STDC__) || defined (__cplusplus)
16195 static void
16196 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
16197 #else
16198 @@ -2191,7 +1996,8 @@
16199 YYSTYPE *yyvaluep;
16200 #endif
16202 - YYUSE (yyvaluep);
16203 + /* Pacify ``unused variable'' warnings. */
16204 + (void) yyvaluep;
16206 if (!yymsg)
16207 yymsg = "Deleting";
16208 @@ -2201,7 +2007,7 @@
16211 default:
16212 - break;
16213 + break;
16217 @@ -2209,13 +2015,13 @@
16218 /* Prevent warnings from -Wmissing-prototypes. */
16220 #ifdef YYPARSE_PARAM
16221 -#if defined __STDC__ || defined __cplusplus
16222 +# if defined (__STDC__) || defined (__cplusplus)
16223 int yyparse (void *YYPARSE_PARAM);
16224 -#else
16225 +# else
16226 int yyparse ();
16227 -#endif
16228 +# endif
16229 #else /* ! YYPARSE_PARAM */
16230 -#if defined __STDC__ || defined __cplusplus
16231 +#if defined (__STDC__) || defined (__cplusplus)
16232 int yyparse (void);
16233 #else
16234 int yyparse ();
16235 @@ -2240,24 +2046,20 @@
16236 `----------*/
16238 #ifdef YYPARSE_PARAM
16239 -#if (defined __STDC__ || defined __C99__FUNC__ \
16240 - || defined __cplusplus || defined _MSC_VER)
16241 -int
16242 -yyparse (void *YYPARSE_PARAM)
16243 -#else
16244 -int
16245 -yyparse (YYPARSE_PARAM)
16246 - void *YYPARSE_PARAM;
16247 -#endif
16248 +# if defined (__STDC__) || defined (__cplusplus)
16249 +int yyparse (void *YYPARSE_PARAM)
16250 +# else
16251 +int yyparse (YYPARSE_PARAM)
16252 + void *YYPARSE_PARAM;
16253 +# endif
16254 #else /* ! YYPARSE_PARAM */
16255 -#if (defined __STDC__ || defined __C99__FUNC__ \
16256 - || defined __cplusplus || defined _MSC_VER)
16257 +#if defined (__STDC__) || defined (__cplusplus)
16259 yyparse (void)
16260 #else
16262 yyparse ()
16265 #endif
16266 #endif
16268 @@ -2269,12 +2071,6 @@
16269 int yyerrstatus;
16270 /* Look-ahead token as an internal (translated) token number. */
16271 int yytoken = 0;
16272 -#if YYERROR_VERBOSE
16273 - /* Buffer for error messages, and its allocated size. */
16274 - char yymsgbuf[128];
16275 - char *yymsg = yymsgbuf;
16276 - YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
16277 -#endif
16279 /* Three stacks and their tools:
16280 `yyss': related to states,
16281 @@ -2285,9 +2081,9 @@
16282 to reallocate them elsewhere. */
16284 /* The state stack. */
16285 - yytype_int16 yyssa[YYINITDEPTH];
16286 - yytype_int16 *yyss = yyssa;
16287 - yytype_int16 *yyssp;
16288 + short int yyssa[YYINITDEPTH];
16289 + short int *yyss = yyssa;
16290 + short int *yyssp;
16292 /* The semantic value stack. */
16293 YYSTYPE yyvsa[YYINITDEPTH];
16294 @@ -2296,7 +2092,7 @@
16298 -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
16299 +#define YYPOPSTACK (yyvsp--, yyssp--)
16301 YYSIZE_T yystacksize = YYINITDEPTH;
16303 @@ -2305,9 +2101,9 @@
16304 YYSTYPE yyval;
16307 - /* The number of symbols on the RHS of the reduced rule.
16308 - Keep to zero when no symbol should be popped. */
16309 - int yylen = 0;
16310 + /* When reducing, the number of symbols on the RHS of the reduced
16311 + rule. */
16312 + int yylen;
16314 YYDPRINTF ((stderr, "Starting parse\n"));
16316 @@ -2331,7 +2127,8 @@
16317 `------------------------------------------------------------*/
16318 yynewstate:
16319 /* In all cases, when you get here, the value and location stacks
16320 - have just been pushed. So pushing a state here evens the stacks. */
16321 + have just been pushed. so pushing a state here evens the stacks.
16322 + */
16323 yyssp++;
16325 yysetstate:
16326 @@ -2344,11 +2141,11 @@
16328 #ifdef yyoverflow
16330 - /* Give user a chance to reallocate the stack. Use copies of
16331 + /* Give user a chance to reallocate the stack. Use copies of
16332 these so that the &'s don't force the real ones into
16333 memory. */
16334 YYSTYPE *yyvs1 = yyvs;
16335 - yytype_int16 *yyss1 = yyss;
16336 + short int *yyss1 = yyss;
16339 /* Each stack pointer address is followed by the size of the
16340 @@ -2376,7 +2173,7 @@
16341 yystacksize = YYMAXDEPTH;
16344 - yytype_int16 *yyss1 = yyss;
16345 + short int *yyss1 = yyss;
16346 union yyalloc *yyptr =
16347 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
16348 if (! yyptr)
16349 @@ -2411,10 +2208,12 @@
16350 `-----------*/
16351 yybackup:
16353 - /* Do appropriate processing given the current state. Read a
16354 - look-ahead token if we need one and don't already have one. */
16355 +/* Do appropriate processing given the current state. */
16356 +/* Read a look-ahead token if we need one and don't already have one. */
16357 +/* yyresume: */
16359 /* First try to decide what to do without reference to look-ahead token. */
16361 yyn = yypact[yystate];
16362 if (yyn == YYPACT_NINF)
16363 goto yydefault;
16364 @@ -2456,21 +2255,22 @@
16365 if (yyn == YYFINAL)
16366 YYACCEPT;
16368 - /* Count tokens shifted since error; after three, turn off error
16369 - status. */
16370 - if (yyerrstatus)
16371 - yyerrstatus--;
16373 /* Shift the look-ahead token. */
16374 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
16376 - /* Discard the shifted token unless it is eof. */
16377 + /* Discard the token being shifted unless it is eof. */
16378 if (yychar != YYEOF)
16379 yychar = YYEMPTY;
16381 - yystate = yyn;
16382 *++yyvsp = yylval;
16385 + /* Count tokens shifted since error; after three, turn off error
16386 + status. */
16387 + if (yyerrstatus)
16388 + yyerrstatus--;
16390 + yystate = yyn;
16391 goto yynewstate;
16394 @@ -2514,7 +2314,7 @@
16395 #line 178 "ldgram.y"
16397 ldlex_popstate();
16398 - lang_add_assignment(exp_assop((yyvsp[(3) - (4)].token),(yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].etree)));
16399 + lang_add_assignment(exp_assop((yyvsp[-1].token),(yyvsp[-2].name),(yyvsp[0].etree)));
16401 break;
16403 @@ -2538,7 +2338,7 @@
16404 case 16:
16405 #line 206 "ldgram.y"
16407 - einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),(yyvsp[(1) - (1)].name));
16408 + einfo(_("%P%F: unrecognised keyword in MRI style script '%s'\n"),(yyvsp[0].name));
16410 break;
16412 @@ -2551,87 +2351,87 @@
16414 case 20:
16415 #line 215 "ldgram.y"
16416 - { mri_public((yyvsp[(2) - (4)].name), (yyvsp[(4) - (4)].etree)); }
16417 + { mri_public((yyvsp[-2].name), (yyvsp[0].etree)); }
16418 break;
16420 case 21:
16421 #line 217 "ldgram.y"
16422 - { mri_public((yyvsp[(2) - (4)].name), (yyvsp[(4) - (4)].etree)); }
16423 + { mri_public((yyvsp[-2].name), (yyvsp[0].etree)); }
16424 break;
16426 case 22:
16427 #line 219 "ldgram.y"
16428 - { mri_public((yyvsp[(2) - (3)].name), (yyvsp[(3) - (3)].etree)); }
16429 + { mri_public((yyvsp[-1].name), (yyvsp[0].etree)); }
16430 break;
16432 case 23:
16433 #line 221 "ldgram.y"
16434 - { mri_format((yyvsp[(2) - (2)].name)); }
16435 + { mri_format((yyvsp[0].name)); }
16436 break;
16438 case 24:
16439 #line 223 "ldgram.y"
16440 - { mri_output_section((yyvsp[(2) - (4)].name), (yyvsp[(4) - (4)].etree));}
16441 + { mri_output_section((yyvsp[-2].name), (yyvsp[0].etree));}
16442 break;
16444 case 25:
16445 #line 225 "ldgram.y"
16446 - { mri_output_section((yyvsp[(2) - (3)].name), (yyvsp[(3) - (3)].etree));}
16447 + { mri_output_section((yyvsp[-1].name), (yyvsp[0].etree));}
16448 break;
16450 case 26:
16451 #line 227 "ldgram.y"
16452 - { mri_output_section((yyvsp[(2) - (4)].name), (yyvsp[(4) - (4)].etree));}
16453 + { mri_output_section((yyvsp[-2].name), (yyvsp[0].etree));}
16454 break;
16456 case 27:
16457 #line 229 "ldgram.y"
16458 - { mri_align((yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].etree)); }
16459 + { mri_align((yyvsp[-2].name),(yyvsp[0].etree)); }
16460 break;
16462 case 28:
16463 #line 231 "ldgram.y"
16464 - { mri_align((yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].etree)); }
16465 + { mri_align((yyvsp[-2].name),(yyvsp[0].etree)); }
16466 break;
16468 case 29:
16469 #line 233 "ldgram.y"
16470 - { mri_alignmod((yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].etree)); }
16471 + { mri_alignmod((yyvsp[-2].name),(yyvsp[0].etree)); }
16472 break;
16474 case 30:
16475 #line 235 "ldgram.y"
16476 - { mri_alignmod((yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].etree)); }
16477 + { mri_alignmod((yyvsp[-2].name),(yyvsp[0].etree)); }
16478 break;
16480 case 33:
16481 #line 239 "ldgram.y"
16482 - { mri_name((yyvsp[(2) - (2)].name)); }
16483 + { mri_name((yyvsp[0].name)); }
16484 break;
16486 case 34:
16487 #line 241 "ldgram.y"
16488 - { mri_alias((yyvsp[(2) - (4)].name),(yyvsp[(4) - (4)].name),0);}
16489 + { mri_alias((yyvsp[-2].name),(yyvsp[0].name),0);}
16490 break;
16492 case 35:
16493 #line 243 "ldgram.y"
16494 - { mri_alias ((yyvsp[(2) - (4)].name), 0, (int) (yyvsp[(4) - (4)].bigint).integer); }
16495 + { mri_alias ((yyvsp[-2].name), 0, (int) (yyvsp[0].bigint).integer); }
16496 break;
16498 case 36:
16499 #line 245 "ldgram.y"
16500 - { mri_base((yyvsp[(2) - (2)].etree)); }
16501 + { mri_base((yyvsp[0].etree)); }
16502 break;
16504 case 37:
16505 #line 247 "ldgram.y"
16506 - { mri_truncate ((unsigned int) (yyvsp[(2) - (2)].bigint).integer); }
16507 + { mri_truncate ((unsigned int) (yyvsp[0].bigint).integer); }
16508 break;
16510 case 40:
16511 #line 251 "ldgram.y"
16512 - { ldlex_script (); ldfile_open_command_file((yyvsp[(2) - (2)].name)); }
16513 + { ldlex_script (); ldfile_open_command_file((yyvsp[0].name)); }
16514 break;
16516 case 41:
16517 @@ -2641,37 +2441,37 @@
16519 case 42:
16520 #line 255 "ldgram.y"
16521 - { lang_add_entry ((yyvsp[(2) - (2)].name), FALSE); }
16522 + { lang_add_entry ((yyvsp[0].name), FALSE); }
16523 break;
16525 case 44:
16526 #line 260 "ldgram.y"
16527 - { mri_order((yyvsp[(3) - (3)].name)); }
16528 + { mri_order((yyvsp[0].name)); }
16529 break;
16531 case 45:
16532 #line 261 "ldgram.y"
16533 - { mri_order((yyvsp[(2) - (2)].name)); }
16534 + { mri_order((yyvsp[0].name)); }
16535 break;
16537 case 47:
16538 #line 267 "ldgram.y"
16539 - { mri_load((yyvsp[(1) - (1)].name)); }
16540 + { mri_load((yyvsp[0].name)); }
16541 break;
16543 case 48:
16544 #line 268 "ldgram.y"
16545 - { mri_load((yyvsp[(3) - (3)].name)); }
16546 + { mri_load((yyvsp[0].name)); }
16547 break;
16549 case 49:
16550 #line 273 "ldgram.y"
16551 - { mri_only_load((yyvsp[(1) - (1)].name)); }
16552 + { mri_only_load((yyvsp[0].name)); }
16553 break;
16555 case 50:
16556 #line 275 "ldgram.y"
16557 - { mri_only_load((yyvsp[(3) - (3)].name)); }
16558 + { mri_only_load((yyvsp[0].name)); }
16559 break;
16561 case 51:
16562 @@ -2691,17 +2491,17 @@
16564 case 56:
16565 #line 292 "ldgram.y"
16566 - { ldlang_add_undef ((yyvsp[(1) - (1)].name)); }
16567 + { ldlang_add_undef ((yyvsp[0].name)); }
16568 break;
16570 case 57:
16571 #line 294 "ldgram.y"
16572 - { ldlang_add_undef ((yyvsp[(2) - (2)].name)); }
16573 + { ldlang_add_undef ((yyvsp[0].name)); }
16574 break;
16576 case 58:
16577 #line 296 "ldgram.y"
16578 - { ldlang_add_undef ((yyvsp[(3) - (3)].name)); }
16579 + { ldlang_add_undef ((yyvsp[0].name)); }
16580 break;
16582 case 59:
16583 @@ -2716,33 +2516,33 @@
16585 case 73:
16586 #line 323 "ldgram.y"
16587 - { lang_add_target((yyvsp[(3) - (4)].name)); }
16588 + { lang_add_target((yyvsp[-1].name)); }
16589 break;
16591 case 74:
16592 #line 325 "ldgram.y"
16593 - { ldfile_add_library_path ((yyvsp[(3) - (4)].name), FALSE); }
16594 + { ldfile_add_library_path ((yyvsp[-1].name), FALSE); }
16595 break;
16597 case 75:
16598 #line 327 "ldgram.y"
16599 - { lang_add_output((yyvsp[(3) - (4)].name), 1); }
16600 + { lang_add_output((yyvsp[-1].name), 1); }
16601 break;
16603 case 76:
16604 #line 329 "ldgram.y"
16605 - { lang_add_output_format ((yyvsp[(3) - (4)].name), (char *) NULL,
16606 + { lang_add_output_format ((yyvsp[-1].name), (char *) NULL,
16607 (char *) NULL, 1); }
16608 break;
16610 case 77:
16611 #line 332 "ldgram.y"
16612 - { lang_add_output_format ((yyvsp[(3) - (8)].name), (yyvsp[(5) - (8)].name), (yyvsp[(7) - (8)].name), 1); }
16613 + { lang_add_output_format ((yyvsp[-5].name), (yyvsp[-3].name), (yyvsp[-1].name), 1); }
16614 break;
16616 case 78:
16617 #line 334 "ldgram.y"
16618 - { ldfile_set_output_arch ((yyvsp[(3) - (4)].name), bfd_arch_unknown); }
16619 + { ldfile_set_output_arch ((yyvsp[-1].name), bfd_arch_unknown); }
16620 break;
16622 case 79:
16623 @@ -2767,12 +2567,12 @@
16625 case 84:
16626 #line 345 "ldgram.y"
16627 - { lang_add_map((yyvsp[(3) - (4)].name)); }
16628 + { lang_add_map((yyvsp[-1].name)); }
16629 break;
16631 case 85:
16632 #line 347 "ldgram.y"
16633 - { ldlex_script (); ldfile_open_command_file((yyvsp[(2) - (2)].name)); }
16634 + { ldlex_script (); ldfile_open_command_file((yyvsp[0].name)); }
16635 break;
16637 case 86:
16638 @@ -2783,43 +2583,43 @@
16639 case 87:
16640 #line 351 "ldgram.y"
16642 - lang_add_nocrossref ((yyvsp[(3) - (4)].nocrossref));
16643 + lang_add_nocrossref ((yyvsp[-1].nocrossref));
16645 break;
16647 case 89:
16648 #line 359 "ldgram.y"
16649 - { lang_add_input_file((yyvsp[(1) - (1)].name),lang_input_file_is_search_file_enum,
16650 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_search_file_enum,
16651 (char *)NULL); }
16652 break;
16654 case 90:
16655 #line 362 "ldgram.y"
16656 - { lang_add_input_file((yyvsp[(3) - (3)].name),lang_input_file_is_search_file_enum,
16657 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_search_file_enum,
16658 (char *)NULL); }
16659 break;
16661 case 91:
16662 #line 365 "ldgram.y"
16663 - { lang_add_input_file((yyvsp[(2) - (2)].name),lang_input_file_is_search_file_enum,
16664 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_search_file_enum,
16665 (char *)NULL); }
16666 break;
16668 case 92:
16669 #line 368 "ldgram.y"
16670 - { lang_add_input_file((yyvsp[(1) - (1)].name),lang_input_file_is_l_enum,
16671 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_l_enum,
16672 (char *)NULL); }
16673 break;
16675 case 93:
16676 #line 371 "ldgram.y"
16677 - { lang_add_input_file((yyvsp[(3) - (3)].name),lang_input_file_is_l_enum,
16678 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_l_enum,
16679 (char *)NULL); }
16680 break;
16682 case 94:
16683 #line 374 "ldgram.y"
16684 - { lang_add_input_file((yyvsp[(2) - (2)].name),lang_input_file_is_l_enum,
16685 + { lang_add_input_file((yyvsp[0].name),lang_input_file_is_l_enum,
16686 (char *)NULL); }
16687 break;
16689 @@ -2830,7 +2630,7 @@
16691 case 96:
16692 #line 379 "ldgram.y"
16693 - { as_needed = (yyvsp[(3) - (5)].integer); }
16694 + { as_needed = (yyvsp[-2].integer); }
16695 break;
16697 case 97:
16698 @@ -2840,7 +2640,7 @@
16700 case 98:
16701 #line 383 "ldgram.y"
16702 - { as_needed = (yyvsp[(5) - (7)].integer); }
16703 + { as_needed = (yyvsp[-2].integer); }
16704 break;
16706 case 99:
16707 @@ -2850,12 +2650,12 @@
16709 case 100:
16710 #line 387 "ldgram.y"
16711 - { as_needed = (yyvsp[(4) - (6)].integer); }
16712 + { as_needed = (yyvsp[-2].integer); }
16713 break;
16715 case 105:
16716 #line 402 "ldgram.y"
16717 - { lang_add_entry ((yyvsp[(3) - (4)].name), FALSE); }
16718 + { lang_add_entry ((yyvsp[-1].name), FALSE); }
16719 break;
16721 case 107:
16722 @@ -2866,13 +2666,13 @@
16723 case 108:
16724 #line 405 "ldgram.y"
16725 { ldlex_popstate ();
16726 - lang_add_assignment (exp_assert ((yyvsp[(4) - (7)].etree), (yyvsp[(6) - (7)].name))); }
16727 + lang_add_assignment (exp_assert ((yyvsp[-3].etree), (yyvsp[-1].name))); }
16728 break;
16730 case 109:
16731 #line 413 "ldgram.y"
16733 - (yyval.cname) = (yyvsp[(1) - (1)].name);
16734 + (yyval.cname) = (yyvsp[0].name);
16736 break;
16738 @@ -2893,7 +2693,7 @@
16739 case 112:
16740 #line 428 "ldgram.y"
16742 - (yyval.wildcard).name = (yyvsp[(1) - (1)].cname);
16743 + (yyval.wildcard).name = (yyvsp[0].cname);
16744 (yyval.wildcard).sorted = none;
16745 (yyval.wildcard).exclude_name_list = NULL;
16747 @@ -2902,16 +2702,16 @@
16748 case 113:
16749 #line 434 "ldgram.y"
16751 - (yyval.wildcard).name = (yyvsp[(5) - (5)].cname);
16752 + (yyval.wildcard).name = (yyvsp[0].cname);
16753 (yyval.wildcard).sorted = none;
16754 - (yyval.wildcard).exclude_name_list = (yyvsp[(3) - (5)].name_list);
16755 + (yyval.wildcard).exclude_name_list = (yyvsp[-2].name_list);
16757 break;
16759 case 114:
16760 #line 440 "ldgram.y"
16762 - (yyval.wildcard).name = (yyvsp[(3) - (4)].cname);
16763 + (yyval.wildcard).name = (yyvsp[-1].cname);
16764 (yyval.wildcard).sorted = by_name;
16765 (yyval.wildcard).exclude_name_list = NULL;
16767 @@ -2920,7 +2720,7 @@
16768 case 115:
16769 #line 446 "ldgram.y"
16771 - (yyval.wildcard).name = (yyvsp[(3) - (4)].cname);
16772 + (yyval.wildcard).name = (yyvsp[-1].cname);
16773 (yyval.wildcard).sorted = by_alignment;
16774 (yyval.wildcard).exclude_name_list = NULL;
16776 @@ -2929,7 +2729,7 @@
16777 case 116:
16778 #line 452 "ldgram.y"
16780 - (yyval.wildcard).name = (yyvsp[(5) - (7)].cname);
16781 + (yyval.wildcard).name = (yyvsp[-2].cname);
16782 (yyval.wildcard).sorted = by_name_alignment;
16783 (yyval.wildcard).exclude_name_list = NULL;
16785 @@ -2938,7 +2738,7 @@
16786 case 117:
16787 #line 458 "ldgram.y"
16789 - (yyval.wildcard).name = (yyvsp[(5) - (7)].cname);
16790 + (yyval.wildcard).name = (yyvsp[-2].cname);
16791 (yyval.wildcard).sorted = by_name;
16792 (yyval.wildcard).exclude_name_list = NULL;
16794 @@ -2947,7 +2747,7 @@
16795 case 118:
16796 #line 464 "ldgram.y"
16798 - (yyval.wildcard).name = (yyvsp[(5) - (7)].cname);
16799 + (yyval.wildcard).name = (yyvsp[-2].cname);
16800 (yyval.wildcard).sorted = by_alignment_name;
16801 (yyval.wildcard).exclude_name_list = NULL;
16803 @@ -2956,7 +2756,7 @@
16804 case 119:
16805 #line 470 "ldgram.y"
16807 - (yyval.wildcard).name = (yyvsp[(5) - (7)].cname);
16808 + (yyval.wildcard).name = (yyvsp[-2].cname);
16809 (yyval.wildcard).sorted = by_alignment;
16810 (yyval.wildcard).exclude_name_list = NULL;
16812 @@ -2965,9 +2765,9 @@
16813 case 120:
16814 #line 476 "ldgram.y"
16816 - (yyval.wildcard).name = (yyvsp[(7) - (8)].cname);
16817 + (yyval.wildcard).name = (yyvsp[-1].cname);
16818 (yyval.wildcard).sorted = by_name;
16819 - (yyval.wildcard).exclude_name_list = (yyvsp[(5) - (8)].name_list);
16820 + (yyval.wildcard).exclude_name_list = (yyvsp[-3].name_list);
16822 break;
16824 @@ -2976,8 +2776,8 @@
16826 struct name_list *tmp;
16827 tmp = (struct name_list *) xmalloc (sizeof *tmp);
16828 - tmp->name = (yyvsp[(2) - (2)].cname);
16829 - tmp->next = (yyvsp[(1) - (2)].name_list);
16830 + tmp->name = (yyvsp[0].cname);
16831 + tmp->next = (yyvsp[-1].name_list);
16832 (yyval.name_list) = tmp;
16834 break;
16835 @@ -2987,7 +2787,7 @@
16837 struct name_list *tmp;
16838 tmp = (struct name_list *) xmalloc (sizeof *tmp);
16839 - tmp->name = (yyvsp[(1) - (1)].cname);
16840 + tmp->name = (yyvsp[0].cname);
16841 tmp->next = NULL;
16842 (yyval.name_list) = tmp;
16844 @@ -2998,8 +2798,8 @@
16846 struct wildcard_list *tmp;
16847 tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
16848 - tmp->next = (yyvsp[(1) - (3)].wildcard_list);
16849 - tmp->spec = (yyvsp[(3) - (3)].wildcard);
16850 + tmp->next = (yyvsp[-2].wildcard_list);
16851 + tmp->spec = (yyvsp[0].wildcard);
16852 (yyval.wildcard_list) = tmp;
16854 break;
16855 @@ -3010,7 +2810,7 @@
16856 struct wildcard_list *tmp;
16857 tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
16858 tmp->next = NULL;
16859 - tmp->spec = (yyvsp[(1) - (1)].wildcard);
16860 + tmp->spec = (yyvsp[0].wildcard);
16861 (yyval.wildcard_list) = tmp;
16863 break;
16864 @@ -3019,7 +2819,7 @@
16865 #line 525 "ldgram.y"
16867 struct wildcard_spec tmp;
16868 - tmp.name = (yyvsp[(1) - (1)].name);
16869 + tmp.name = (yyvsp[0].name);
16870 tmp.exclude_name_list = NULL;
16871 tmp.sorted = none;
16872 lang_add_wild (&tmp, NULL, ldgram_had_keep);
16873 @@ -3029,14 +2829,14 @@
16874 case 126:
16875 #line 533 "ldgram.y"
16877 - lang_add_wild (NULL, (yyvsp[(2) - (3)].wildcard_list), ldgram_had_keep);
16878 + lang_add_wild (NULL, (yyvsp[-1].wildcard_list), ldgram_had_keep);
16880 break;
16882 case 127:
16883 #line 537 "ldgram.y"
16885 - lang_add_wild (&(yyvsp[(1) - (4)].wildcard), (yyvsp[(3) - (4)].wildcard_list), ldgram_had_keep);
16886 + lang_add_wild (&(yyvsp[-3].wildcard), (yyvsp[-1].wildcard_list), ldgram_had_keep);
16888 break;
16890 @@ -3076,14 +2876,14 @@
16891 case 137:
16892 #line 569 "ldgram.y"
16894 - lang_add_data ((int) (yyvsp[(1) - (4)].integer), (yyvsp[(3) - (4)].etree));
16895 + lang_add_data ((int) (yyvsp[-3].integer), (yyvsp[-1].etree));
16897 break;
16899 case 138:
16900 #line 574 "ldgram.y"
16902 - lang_add_fill ((yyvsp[(3) - (4)].fill));
16903 + lang_add_fill ((yyvsp[-1].fill));
16905 break;
16907 @@ -3095,44 +2895,44 @@
16908 case 140:
16909 #line 578 "ldgram.y"
16910 { ldlex_popstate ();
16911 - lang_add_assignment (exp_assert ((yyvsp[(4) - (8)].etree), (yyvsp[(6) - (8)].name))); }
16912 + lang_add_assignment (exp_assert ((yyvsp[-4].etree), (yyvsp[-2].name))); }
16913 break;
16915 case 145:
16916 #line 594 "ldgram.y"
16917 - { (yyval.integer) = (yyvsp[(1) - (1)].token); }
16918 + { (yyval.integer) = (yyvsp[0].token); }
16919 break;
16921 case 146:
16922 #line 596 "ldgram.y"
16923 - { (yyval.integer) = (yyvsp[(1) - (1)].token); }
16924 + { (yyval.integer) = (yyvsp[0].token); }
16925 break;
16927 case 147:
16928 #line 598 "ldgram.y"
16929 - { (yyval.integer) = (yyvsp[(1) - (1)].token); }
16930 + { (yyval.integer) = (yyvsp[0].token); }
16931 break;
16933 case 148:
16934 #line 600 "ldgram.y"
16935 - { (yyval.integer) = (yyvsp[(1) - (1)].token); }
16936 + { (yyval.integer) = (yyvsp[0].token); }
16937 break;
16939 case 149:
16940 #line 602 "ldgram.y"
16941 - { (yyval.integer) = (yyvsp[(1) - (1)].token); }
16942 + { (yyval.integer) = (yyvsp[0].token); }
16943 break;
16945 case 150:
16946 #line 607 "ldgram.y"
16948 - (yyval.fill) = exp_get_fill ((yyvsp[(1) - (1)].etree), 0, "fill value");
16949 + (yyval.fill) = exp_get_fill ((yyvsp[0].etree), 0, "fill value");
16951 break;
16953 case 151:
16954 #line 614 "ldgram.y"
16955 - { (yyval.fill) = (yyvsp[(2) - (2)].fill); }
16956 + { (yyval.fill) = (yyvsp[0].fill); }
16957 break;
16959 case 152:
16960 @@ -3183,38 +2983,38 @@
16961 case 163:
16962 #line 644 "ldgram.y"
16964 - lang_add_assignment (exp_assop ((yyvsp[(2) - (3)].token), (yyvsp[(1) - (3)].name), (yyvsp[(3) - (3)].etree)));
16965 + lang_add_assignment (exp_assop ((yyvsp[-1].token), (yyvsp[-2].name), (yyvsp[0].etree)));
16967 break;
16969 case 164:
16970 #line 648 "ldgram.y"
16972 - lang_add_assignment (exp_assop ('=', (yyvsp[(1) - (3)].name),
16973 - exp_binop ((yyvsp[(2) - (3)].token),
16974 + lang_add_assignment (exp_assop ('=', (yyvsp[-2].name),
16975 + exp_binop ((yyvsp[-1].token),
16976 exp_nameop (NAME,
16977 - (yyvsp[(1) - (3)].name)),
16978 - (yyvsp[(3) - (3)].etree))));
16979 + (yyvsp[-2].name)),
16980 + (yyvsp[0].etree))));
16982 break;
16984 case 165:
16985 #line 656 "ldgram.y"
16987 - lang_add_assignment (exp_provide ((yyvsp[(3) - (6)].name), (yyvsp[(5) - (6)].etree), FALSE));
16988 + lang_add_assignment (exp_provide ((yyvsp[-3].name), (yyvsp[-1].etree), FALSE));
16990 break;
16992 case 166:
16993 #line 660 "ldgram.y"
16995 - lang_add_assignment (exp_provide ((yyvsp[(3) - (6)].name), (yyvsp[(5) - (6)].etree), TRUE));
16996 + lang_add_assignment (exp_provide ((yyvsp[-3].name), (yyvsp[-1].etree), TRUE));
16998 break;
17000 case 173:
17001 #line 682 "ldgram.y"
17002 - { region = lang_memory_region_lookup ((yyvsp[(1) - (1)].name), TRUE); }
17003 + { region = lang_memory_region_lookup ((yyvsp[0].name), TRUE); }
17004 break;
17006 case 174:
17007 @@ -3225,7 +3025,7 @@
17008 case 175:
17009 #line 690 "ldgram.y"
17011 - region->origin = exp_get_vma ((yyvsp[(3) - (3)].etree), 0, "origin");
17012 + region->origin = exp_get_vma ((yyvsp[0].etree), 0, "origin");
17013 region->current = region->origin;
17015 break;
17016 @@ -3233,7 +3033,7 @@
17017 case 176:
17018 #line 698 "ldgram.y"
17020 - region->length = exp_get_vma ((yyvsp[(3) - (3)].etree), -1, "length");
17021 + region->length = exp_get_vma ((yyvsp[0].etree), -1, "length");
17023 break;
17025 @@ -3244,17 +3044,17 @@
17027 case 181:
17028 #line 716 "ldgram.y"
17029 - { lang_set_flags (region, (yyvsp[(1) - (1)].name), 0); }
17030 + { lang_set_flags (region, (yyvsp[0].name), 0); }
17031 break;
17033 case 182:
17034 #line 718 "ldgram.y"
17035 - { lang_set_flags (region, (yyvsp[(2) - (2)].name), 1); }
17036 + { lang_set_flags (region, (yyvsp[0].name), 1); }
17037 break;
17039 case 183:
17040 #line 723 "ldgram.y"
17041 - { lang_startup((yyvsp[(3) - (4)].name)); }
17042 + { lang_startup((yyvsp[-1].name)); }
17043 break;
17045 case 185:
17046 @@ -3264,17 +3064,17 @@
17048 case 186:
17049 #line 734 "ldgram.y"
17050 - { ldemul_hll((yyvsp[(3) - (3)].name)); }
17051 + { ldemul_hll((yyvsp[0].name)); }
17052 break;
17054 case 187:
17055 #line 736 "ldgram.y"
17056 - { ldemul_hll((yyvsp[(1) - (1)].name)); }
17057 + { ldemul_hll((yyvsp[0].name)); }
17058 break;
17060 case 189:
17061 #line 744 "ldgram.y"
17062 - { ldemul_syslib((yyvsp[(3) - (3)].name)); }
17063 + { ldemul_syslib((yyvsp[0].name)); }
17064 break;
17066 case 191:
17067 @@ -3300,8 +3100,8 @@
17068 struct lang_nocrossref *n;
17070 n = (struct lang_nocrossref *) xmalloc (sizeof *n);
17071 - n->name = (yyvsp[(1) - (2)].name);
17072 - n->next = (yyvsp[(2) - (2)].nocrossref);
17073 + n->name = (yyvsp[-1].name);
17074 + n->next = (yyvsp[0].nocrossref);
17075 (yyval.nocrossref) = n;
17077 break;
17078 @@ -3312,8 +3112,8 @@
17079 struct lang_nocrossref *n;
17081 n = (struct lang_nocrossref *) xmalloc (sizeof *n);
17082 - n->name = (yyvsp[(1) - (3)].name);
17083 - n->next = (yyvsp[(3) - (3)].nocrossref);
17084 + n->name = (yyvsp[-2].name);
17085 + n->next = (yyvsp[0].nocrossref);
17086 (yyval.nocrossref) = n;
17088 break;
17089 @@ -3325,142 +3125,142 @@
17091 case 197:
17092 #line 782 "ldgram.y"
17093 - { ldlex_popstate (); (yyval.etree)=(yyvsp[(2) - (2)].etree);}
17094 + { ldlex_popstate (); (yyval.etree)=(yyvsp[0].etree);}
17095 break;
17097 case 198:
17098 #line 787 "ldgram.y"
17099 - { (yyval.etree) = exp_unop ('-', (yyvsp[(2) - (2)].etree)); }
17100 + { (yyval.etree) = exp_unop ('-', (yyvsp[0].etree)); }
17101 break;
17103 case 199:
17104 #line 789 "ldgram.y"
17105 - { (yyval.etree) = (yyvsp[(2) - (3)].etree); }
17106 + { (yyval.etree) = (yyvsp[-1].etree); }
17107 break;
17109 case 200:
17110 #line 791 "ldgram.y"
17111 - { (yyval.etree) = exp_unop ((int) (yyvsp[(1) - (4)].integer),(yyvsp[(3) - (4)].etree)); }
17112 + { (yyval.etree) = exp_unop ((int) (yyvsp[-3].integer),(yyvsp[-1].etree)); }
17113 break;
17115 case 201:
17116 #line 793 "ldgram.y"
17117 - { (yyval.etree) = exp_unop ('!', (yyvsp[(2) - (2)].etree)); }
17118 + { (yyval.etree) = exp_unop ('!', (yyvsp[0].etree)); }
17119 break;
17121 case 202:
17122 #line 795 "ldgram.y"
17123 - { (yyval.etree) = (yyvsp[(2) - (2)].etree); }
17124 + { (yyval.etree) = (yyvsp[0].etree); }
17125 break;
17127 case 203:
17128 #line 797 "ldgram.y"
17129 - { (yyval.etree) = exp_unop ('~', (yyvsp[(2) - (2)].etree));}
17130 + { (yyval.etree) = exp_unop ('~', (yyvsp[0].etree));}
17131 break;
17133 case 204:
17134 #line 800 "ldgram.y"
17135 - { (yyval.etree) = exp_binop ('*', (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17136 + { (yyval.etree) = exp_binop ('*', (yyvsp[-2].etree), (yyvsp[0].etree)); }
17137 break;
17139 case 205:
17140 #line 802 "ldgram.y"
17141 - { (yyval.etree) = exp_binop ('/', (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17142 + { (yyval.etree) = exp_binop ('/', (yyvsp[-2].etree), (yyvsp[0].etree)); }
17143 break;
17145 case 206:
17146 #line 804 "ldgram.y"
17147 - { (yyval.etree) = exp_binop ('%', (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17148 + { (yyval.etree) = exp_binop ('%', (yyvsp[-2].etree), (yyvsp[0].etree)); }
17149 break;
17151 case 207:
17152 #line 806 "ldgram.y"
17153 - { (yyval.etree) = exp_binop ('+', (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17154 + { (yyval.etree) = exp_binop ('+', (yyvsp[-2].etree), (yyvsp[0].etree)); }
17155 break;
17157 case 208:
17158 #line 808 "ldgram.y"
17159 - { (yyval.etree) = exp_binop ('-' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17160 + { (yyval.etree) = exp_binop ('-' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17161 break;
17163 case 209:
17164 #line 810 "ldgram.y"
17165 - { (yyval.etree) = exp_binop (LSHIFT , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17166 + { (yyval.etree) = exp_binop (LSHIFT , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17167 break;
17169 case 210:
17170 #line 812 "ldgram.y"
17171 - { (yyval.etree) = exp_binop (RSHIFT , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17172 + { (yyval.etree) = exp_binop (RSHIFT , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17173 break;
17175 case 211:
17176 #line 814 "ldgram.y"
17177 - { (yyval.etree) = exp_binop (EQ , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17178 + { (yyval.etree) = exp_binop (EQ , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17179 break;
17181 case 212:
17182 #line 816 "ldgram.y"
17183 - { (yyval.etree) = exp_binop (NE , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17184 + { (yyval.etree) = exp_binop (NE , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17185 break;
17187 case 213:
17188 #line 818 "ldgram.y"
17189 - { (yyval.etree) = exp_binop (LE , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17190 + { (yyval.etree) = exp_binop (LE , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17191 break;
17193 case 214:
17194 #line 820 "ldgram.y"
17195 - { (yyval.etree) = exp_binop (GE , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17196 + { (yyval.etree) = exp_binop (GE , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17197 break;
17199 case 215:
17200 #line 822 "ldgram.y"
17201 - { (yyval.etree) = exp_binop ('<' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17202 + { (yyval.etree) = exp_binop ('<' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17203 break;
17205 case 216:
17206 #line 824 "ldgram.y"
17207 - { (yyval.etree) = exp_binop ('>' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17208 + { (yyval.etree) = exp_binop ('>' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17209 break;
17211 case 217:
17212 #line 826 "ldgram.y"
17213 - { (yyval.etree) = exp_binop ('&' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17214 + { (yyval.etree) = exp_binop ('&' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17215 break;
17217 case 218:
17218 #line 828 "ldgram.y"
17219 - { (yyval.etree) = exp_binop ('^' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17220 + { (yyval.etree) = exp_binop ('^' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17221 break;
17223 case 219:
17224 #line 830 "ldgram.y"
17225 - { (yyval.etree) = exp_binop ('|' , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17226 + { (yyval.etree) = exp_binop ('|' , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17227 break;
17229 case 220:
17230 #line 832 "ldgram.y"
17231 - { (yyval.etree) = exp_trinop ('?' , (yyvsp[(1) - (5)].etree), (yyvsp[(3) - (5)].etree), (yyvsp[(5) - (5)].etree)); }
17232 + { (yyval.etree) = exp_trinop ('?' , (yyvsp[-4].etree), (yyvsp[-2].etree), (yyvsp[0].etree)); }
17233 break;
17235 case 221:
17236 #line 834 "ldgram.y"
17237 - { (yyval.etree) = exp_binop (ANDAND , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17238 + { (yyval.etree) = exp_binop (ANDAND , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17239 break;
17241 case 222:
17242 #line 836 "ldgram.y"
17243 - { (yyval.etree) = exp_binop (OROR , (yyvsp[(1) - (3)].etree), (yyvsp[(3) - (3)].etree)); }
17244 + { (yyval.etree) = exp_binop (OROR , (yyvsp[-2].etree), (yyvsp[0].etree)); }
17245 break;
17247 case 223:
17248 #line 838 "ldgram.y"
17249 - { (yyval.etree) = exp_nameop (DEFINED, (yyvsp[(3) - (4)].name)); }
17250 + { (yyval.etree) = exp_nameop (DEFINED, (yyvsp[-1].name)); }
17251 break;
17253 case 224:
17254 #line 840 "ldgram.y"
17255 - { (yyval.etree) = exp_bigintop ((yyvsp[(1) - (1)].bigint).integer, (yyvsp[(1) - (1)].bigint).str); }
17256 + { (yyval.etree) = exp_bigintop ((yyvsp[0].bigint).integer, (yyvsp[0].bigint).str); }
17257 break;
17259 case 225:
17260 @@ -3470,57 +3270,57 @@
17262 case 226:
17263 #line 845 "ldgram.y"
17264 - { (yyval.etree) = exp_nameop (ALIGNOF,(yyvsp[(3) - (4)].name)); }
17265 + { (yyval.etree) = exp_nameop (ALIGNOF,(yyvsp[-1].name)); }
17266 break;
17268 case 227:
17269 #line 847 "ldgram.y"
17270 - { (yyval.etree) = exp_nameop (SIZEOF,(yyvsp[(3) - (4)].name)); }
17271 + { (yyval.etree) = exp_nameop (SIZEOF,(yyvsp[-1].name)); }
17272 break;
17274 case 228:
17275 #line 849 "ldgram.y"
17276 - { (yyval.etree) = exp_nameop (ADDR,(yyvsp[(3) - (4)].name)); }
17277 + { (yyval.etree) = exp_nameop (ADDR,(yyvsp[-1].name)); }
17278 break;
17280 case 229:
17281 #line 851 "ldgram.y"
17282 - { (yyval.etree) = exp_nameop (LOADADDR,(yyvsp[(3) - (4)].name)); }
17283 + { (yyval.etree) = exp_nameop (LOADADDR,(yyvsp[-1].name)); }
17284 break;
17286 case 230:
17287 #line 853 "ldgram.y"
17288 - { (yyval.etree) = exp_nameop (CONSTANT,(yyvsp[(3) - (4)].name)); }
17289 + { (yyval.etree) = exp_nameop (CONSTANT,(yyvsp[-1].name)); }
17290 break;
17292 case 231:
17293 #line 855 "ldgram.y"
17294 - { (yyval.etree) = exp_unop (ABSOLUTE, (yyvsp[(3) - (4)].etree)); }
17295 + { (yyval.etree) = exp_unop (ABSOLUTE, (yyvsp[-1].etree)); }
17296 break;
17298 case 232:
17299 #line 857 "ldgram.y"
17300 - { (yyval.etree) = exp_unop (ALIGN_K,(yyvsp[(3) - (4)].etree)); }
17301 + { (yyval.etree) = exp_unop (ALIGN_K,(yyvsp[-1].etree)); }
17302 break;
17304 case 233:
17305 #line 859 "ldgram.y"
17306 - { (yyval.etree) = exp_binop (ALIGN_K,(yyvsp[(3) - (6)].etree),(yyvsp[(5) - (6)].etree)); }
17307 + { (yyval.etree) = exp_binop (ALIGN_K,(yyvsp[-3].etree),(yyvsp[-1].etree)); }
17308 break;
17310 case 234:
17311 #line 861 "ldgram.y"
17312 - { (yyval.etree) = exp_binop (DATA_SEGMENT_ALIGN, (yyvsp[(3) - (6)].etree), (yyvsp[(5) - (6)].etree)); }
17313 + { (yyval.etree) = exp_binop (DATA_SEGMENT_ALIGN, (yyvsp[-3].etree), (yyvsp[-1].etree)); }
17314 break;
17316 case 235:
17317 #line 863 "ldgram.y"
17318 - { (yyval.etree) = exp_binop (DATA_SEGMENT_RELRO_END, (yyvsp[(5) - (6)].etree), (yyvsp[(3) - (6)].etree)); }
17319 + { (yyval.etree) = exp_binop (DATA_SEGMENT_RELRO_END, (yyvsp[-1].etree), (yyvsp[-3].etree)); }
17320 break;
17322 case 236:
17323 #line 865 "ldgram.y"
17324 - { (yyval.etree) = exp_unop (DATA_SEGMENT_END, (yyvsp[(3) - (4)].etree)); }
17325 + { (yyval.etree) = exp_unop (DATA_SEGMENT_END, (yyvsp[-1].etree)); }
17326 break;
17328 case 237:
17329 @@ -3531,338 +3331,348 @@
17330 that allows us to reuse more code in
17331 fold_binary. */
17332 (yyval.etree) = exp_binop (SEGMENT_START,
17333 - (yyvsp[(5) - (6)].etree),
17334 - exp_nameop (NAME, (yyvsp[(3) - (6)].name))); }
17335 + (yyvsp[-1].etree),
17336 + exp_nameop (NAME, (yyvsp[-3].name))); }
17337 break;
17339 case 238:
17340 #line 876 "ldgram.y"
17341 - { (yyval.etree) = exp_unop (ALIGN_K,(yyvsp[(3) - (4)].etree)); }
17342 + { (yyval.etree) = exp_unop (ALIGN_K,(yyvsp[-1].etree)); }
17343 break;
17345 case 239:
17346 #line 878 "ldgram.y"
17347 - { (yyval.etree) = exp_nameop (NAME,(yyvsp[(1) - (1)].name)); }
17348 + { (yyval.etree) = exp_nameop (NAME,(yyvsp[0].name)); }
17349 break;
17351 case 240:
17352 #line 880 "ldgram.y"
17353 - { (yyval.etree) = exp_binop (MAX_K, (yyvsp[(3) - (6)].etree), (yyvsp[(5) - (6)].etree) ); }
17354 + { (yyval.etree) = exp_binop (MAX_K, (yyvsp[-3].etree), (yyvsp[-1].etree) ); }
17355 break;
17357 case 241:
17358 #line 882 "ldgram.y"
17359 - { (yyval.etree) = exp_binop (MIN_K, (yyvsp[(3) - (6)].etree), (yyvsp[(5) - (6)].etree) ); }
17360 + { (yyval.etree) = exp_binop (MIN_K, (yyvsp[-3].etree), (yyvsp[-1].etree) ); }
17361 break;
17363 case 242:
17364 #line 884 "ldgram.y"
17365 - { (yyval.etree) = exp_assert ((yyvsp[(3) - (6)].etree), (yyvsp[(5) - (6)].name)); }
17366 + { (yyval.etree) = exp_unop (CEILP2, (yyvsp[-1].etree)); }
17367 break;
17369 case 243:
17370 #line 886 "ldgram.y"
17371 - { (yyval.etree) = exp_nameop (ORIGIN, (yyvsp[(3) - (4)].name)); }
17372 + { (yyval.etree) = exp_unop (NACL_MASK, (yyvsp[-1].etree)); }
17373 break;
17375 case 244:
17376 #line 888 "ldgram.y"
17377 - { (yyval.etree) = exp_nameop (LENGTH, (yyvsp[(3) - (4)].name)); }
17378 + { (yyval.etree) = exp_assert ((yyvsp[-3].etree), (yyvsp[-1].name)); }
17379 break;
17381 case 245:
17382 -#line 893 "ldgram.y"
17383 - { (yyval.name) = (yyvsp[(3) - (3)].name); }
17384 +#line 890 "ldgram.y"
17385 + { (yyval.etree) = exp_nameop (ORIGIN, (yyvsp[-1].name)); }
17386 break;
17388 case 246:
17389 -#line 894 "ldgram.y"
17390 - { (yyval.name) = 0; }
17391 +#line 892 "ldgram.y"
17392 + { (yyval.etree) = exp_nameop (LENGTH, (yyvsp[-1].name)); }
17393 break;
17395 case 247:
17396 -#line 898 "ldgram.y"
17397 - { (yyval.etree) = (yyvsp[(3) - (4)].etree); }
17398 +#line 897 "ldgram.y"
17399 + { (yyval.name) = (yyvsp[0].name); }
17400 break;
17402 case 248:
17403 -#line 899 "ldgram.y"
17404 - { (yyval.etree) = 0; }
17405 +#line 898 "ldgram.y"
17406 + { (yyval.name) = 0; }
17407 break;
17409 case 249:
17410 -#line 903 "ldgram.y"
17411 - { (yyval.etree) = (yyvsp[(3) - (4)].etree); }
17412 +#line 902 "ldgram.y"
17413 + { (yyval.etree) = (yyvsp[-1].etree); }
17414 break;
17416 case 250:
17417 -#line 904 "ldgram.y"
17418 +#line 903 "ldgram.y"
17419 { (yyval.etree) = 0; }
17420 break;
17422 case 251:
17423 -#line 908 "ldgram.y"
17424 - { (yyval.etree) = (yyvsp[(3) - (4)].etree); }
17425 +#line 907 "ldgram.y"
17426 + { (yyval.etree) = (yyvsp[-1].etree); }
17427 break;
17429 case 252:
17430 -#line 909 "ldgram.y"
17431 +#line 908 "ldgram.y"
17432 { (yyval.etree) = 0; }
17433 break;
17435 case 253:
17436 -#line 913 "ldgram.y"
17437 - { (yyval.token) = ONLY_IF_RO; }
17438 +#line 912 "ldgram.y"
17439 + { (yyval.etree) = (yyvsp[-1].etree); }
17440 break;
17442 case 254:
17443 -#line 914 "ldgram.y"
17444 - { (yyval.token) = ONLY_IF_RW; }
17445 +#line 913 "ldgram.y"
17446 + { (yyval.etree) = 0; }
17447 break;
17449 case 255:
17450 -#line 915 "ldgram.y"
17451 - { (yyval.token) = SPECIAL; }
17452 +#line 917 "ldgram.y"
17453 + { (yyval.token) = ONLY_IF_RO; }
17454 break;
17456 case 256:
17457 -#line 916 "ldgram.y"
17458 - { (yyval.token) = 0; }
17459 +#line 918 "ldgram.y"
17460 + { (yyval.token) = ONLY_IF_RW; }
17461 break;
17463 case 257:
17464 #line 919 "ldgram.y"
17465 - { ldlex_expression(); }
17466 + { (yyval.token) = SPECIAL; }
17467 break;
17469 case 258:
17470 +#line 920 "ldgram.y"
17471 + { (yyval.token) = 0; }
17472 + break;
17474 + case 259:
17475 #line 923 "ldgram.y"
17476 + { ldlex_expression(); }
17477 + break;
17479 + case 260:
17480 +#line 927 "ldgram.y"
17481 { ldlex_popstate (); ldlex_script (); }
17482 break;
17484 - case 259:
17485 -#line 926 "ldgram.y"
17486 + case 261:
17487 +#line 930 "ldgram.y"
17489 - lang_enter_output_section_statement((yyvsp[(1) - (9)].name), (yyvsp[(3) - (9)].etree),
17490 + lang_enter_output_section_statement((yyvsp[-8].name), (yyvsp[-6].etree),
17491 sectype,
17492 - (yyvsp[(5) - (9)].etree), (yyvsp[(6) - (9)].etree), (yyvsp[(4) - (9)].etree), (yyvsp[(8) - (9)].token));
17493 + (yyvsp[-4].etree), (yyvsp[-3].etree), (yyvsp[-5].etree), (yyvsp[-1].token));
17495 break;
17497 - case 260:
17498 -#line 932 "ldgram.y"
17499 + case 262:
17500 +#line 936 "ldgram.y"
17501 { ldlex_popstate (); ldlex_expression (); }
17502 break;
17504 - case 261:
17505 -#line 934 "ldgram.y"
17506 + case 263:
17507 +#line 938 "ldgram.y"
17509 ldlex_popstate ();
17510 - lang_leave_output_section_statement ((yyvsp[(17) - (17)].fill), (yyvsp[(14) - (17)].name), (yyvsp[(16) - (17)].section_phdr), (yyvsp[(15) - (17)].name));
17511 + lang_leave_output_section_statement ((yyvsp[0].fill), (yyvsp[-3].name), (yyvsp[-1].section_phdr), (yyvsp[-2].name));
17513 break;
17515 - case 262:
17516 -#line 939 "ldgram.y"
17517 + case 264:
17518 +#line 943 "ldgram.y"
17520 break;
17522 - case 263:
17523 -#line 941 "ldgram.y"
17524 + case 265:
17525 +#line 945 "ldgram.y"
17526 { ldlex_expression (); }
17527 break;
17529 - case 264:
17530 -#line 943 "ldgram.y"
17531 + case 266:
17532 +#line 947 "ldgram.y"
17533 { ldlex_popstate (); ldlex_script (); }
17534 break;
17536 - case 265:
17537 -#line 945 "ldgram.y"
17538 + case 267:
17539 +#line 949 "ldgram.y"
17541 - lang_enter_overlay ((yyvsp[(3) - (8)].etree), (yyvsp[(6) - (8)].etree));
17542 + lang_enter_overlay ((yyvsp[-5].etree), (yyvsp[-2].etree));
17544 break;
17546 - case 266:
17547 -#line 950 "ldgram.y"
17548 + case 268:
17549 +#line 954 "ldgram.y"
17550 { ldlex_popstate (); ldlex_expression (); }
17551 break;
17553 - case 267:
17554 -#line 952 "ldgram.y"
17555 + case 269:
17556 +#line 956 "ldgram.y"
17558 ldlex_popstate ();
17559 - lang_leave_overlay ((yyvsp[(5) - (16)].etree), (int) (yyvsp[(4) - (16)].integer),
17560 - (yyvsp[(16) - (16)].fill), (yyvsp[(13) - (16)].name), (yyvsp[(15) - (16)].section_phdr), (yyvsp[(14) - (16)].name));
17561 + lang_leave_overlay ((yyvsp[-11].etree), (int) (yyvsp[-12].integer),
17562 + (yyvsp[0].fill), (yyvsp[-3].name), (yyvsp[-1].section_phdr), (yyvsp[-2].name));
17564 break;
17566 - case 269:
17567 -#line 962 "ldgram.y"
17568 + case 271:
17569 +#line 966 "ldgram.y"
17570 { ldlex_expression (); }
17571 break;
17573 - case 270:
17574 -#line 964 "ldgram.y"
17575 + case 272:
17576 +#line 968 "ldgram.y"
17578 ldlex_popstate ();
17579 - lang_add_assignment (exp_assop ('=', ".", (yyvsp[(3) - (3)].etree)));
17580 + lang_add_assignment (exp_assop ('=', ".", (yyvsp[0].etree)));
17582 break;
17584 - case 272:
17585 -#line 972 "ldgram.y"
17586 - { sectype = noload_section; }
17587 - break;
17589 - case 273:
17590 -#line 973 "ldgram.y"
17591 - { sectype = noalloc_section; }
17592 - break;
17594 case 274:
17595 -#line 974 "ldgram.y"
17596 - { sectype = noalloc_section; }
17597 +#line 976 "ldgram.y"
17598 + { sectype = noload_section; }
17599 break;
17601 case 275:
17602 -#line 975 "ldgram.y"
17603 +#line 977 "ldgram.y"
17604 { sectype = noalloc_section; }
17605 break;
17607 case 276:
17608 -#line 976 "ldgram.y"
17609 +#line 978 "ldgram.y"
17610 { sectype = noalloc_section; }
17611 break;
17613 - case 278:
17614 -#line 981 "ldgram.y"
17615 - { sectype = normal_section; }
17616 + case 277:
17617 +#line 979 "ldgram.y"
17618 + { sectype = noalloc_section; }
17619 break;
17621 - case 279:
17622 -#line 982 "ldgram.y"
17623 - { sectype = normal_section; }
17624 + case 278:
17625 +#line 980 "ldgram.y"
17626 + { sectype = noalloc_section; }
17627 break;
17629 case 280:
17630 -#line 986 "ldgram.y"
17631 - { (yyval.etree) = (yyvsp[(1) - (3)].etree); }
17632 +#line 985 "ldgram.y"
17633 + { sectype = normal_section; }
17634 break;
17636 case 281:
17637 -#line 987 "ldgram.y"
17638 - { (yyval.etree) = (etree_type *)NULL; }
17639 +#line 986 "ldgram.y"
17640 + { sectype = normal_section; }
17641 break;
17643 case 282:
17644 -#line 992 "ldgram.y"
17645 - { (yyval.etree) = (yyvsp[(3) - (6)].etree); }
17646 +#line 990 "ldgram.y"
17647 + { (yyval.etree) = (yyvsp[-2].etree); }
17648 break;
17650 case 283:
17651 -#line 994 "ldgram.y"
17652 - { (yyval.etree) = (yyvsp[(3) - (10)].etree); }
17653 +#line 991 "ldgram.y"
17654 + { (yyval.etree) = (etree_type *)NULL; }
17655 break;
17657 case 284:
17658 -#line 998 "ldgram.y"
17659 - { (yyval.etree) = (yyvsp[(1) - (2)].etree); }
17660 +#line 996 "ldgram.y"
17661 + { (yyval.etree) = (yyvsp[-3].etree); }
17662 break;
17664 case 285:
17665 -#line 999 "ldgram.y"
17666 - { (yyval.etree) = (etree_type *) NULL; }
17667 +#line 998 "ldgram.y"
17668 + { (yyval.etree) = (yyvsp[-7].etree); }
17669 break;
17671 case 286:
17672 -#line 1004 "ldgram.y"
17673 - { (yyval.integer) = 0; }
17674 +#line 1002 "ldgram.y"
17675 + { (yyval.etree) = (yyvsp[-1].etree); }
17676 break;
17678 case 287:
17679 -#line 1006 "ldgram.y"
17680 - { (yyval.integer) = 1; }
17681 +#line 1003 "ldgram.y"
17682 + { (yyval.etree) = (etree_type *) NULL; }
17683 break;
17685 case 288:
17686 -#line 1011 "ldgram.y"
17687 - { (yyval.name) = (yyvsp[(2) - (2)].name); }
17688 +#line 1008 "ldgram.y"
17689 + { (yyval.integer) = 0; }
17690 break;
17692 case 289:
17693 -#line 1012 "ldgram.y"
17694 - { (yyval.name) = DEFAULT_MEMORY_REGION; }
17695 +#line 1010 "ldgram.y"
17696 + { (yyval.integer) = 1; }
17697 break;
17699 case 290:
17700 -#line 1017 "ldgram.y"
17701 +#line 1015 "ldgram.y"
17702 + { (yyval.name) = (yyvsp[0].name); }
17703 + break;
17705 + case 291:
17706 +#line 1016 "ldgram.y"
17707 + { (yyval.name) = DEFAULT_MEMORY_REGION; }
17708 + break;
17710 + case 292:
17711 +#line 1021 "ldgram.y"
17713 (yyval.section_phdr) = NULL;
17715 break;
17717 - case 291:
17718 -#line 1021 "ldgram.y"
17719 + case 293:
17720 +#line 1025 "ldgram.y"
17722 struct lang_output_section_phdr_list *n;
17724 n = ((struct lang_output_section_phdr_list *)
17725 xmalloc (sizeof *n));
17726 - n->name = (yyvsp[(3) - (3)].name);
17727 + n->name = (yyvsp[0].name);
17728 n->used = FALSE;
17729 - n->next = (yyvsp[(1) - (3)].section_phdr);
17730 + n->next = (yyvsp[-2].section_phdr);
17731 (yyval.section_phdr) = n;
17733 break;
17735 - case 293:
17736 -#line 1037 "ldgram.y"
17737 + case 295:
17738 +#line 1041 "ldgram.y"
17740 ldlex_script ();
17741 - lang_enter_overlay_section ((yyvsp[(2) - (2)].name));
17742 + lang_enter_overlay_section ((yyvsp[0].name));
17744 break;
17746 - case 294:
17747 -#line 1042 "ldgram.y"
17748 + case 296:
17749 +#line 1046 "ldgram.y"
17750 { ldlex_popstate (); ldlex_expression (); }
17751 break;
17753 - case 295:
17754 -#line 1044 "ldgram.y"
17755 + case 297:
17756 +#line 1048 "ldgram.y"
17758 ldlex_popstate ();
17759 - lang_leave_overlay_section ((yyvsp[(9) - (9)].fill), (yyvsp[(8) - (9)].section_phdr));
17760 + lang_leave_overlay_section ((yyvsp[0].fill), (yyvsp[-1].section_phdr));
17762 break;
17764 - case 300:
17765 -#line 1061 "ldgram.y"
17766 + case 302:
17767 +#line 1065 "ldgram.y"
17768 { ldlex_expression (); }
17769 break;
17771 - case 301:
17772 -#line 1062 "ldgram.y"
17773 + case 303:
17774 +#line 1066 "ldgram.y"
17775 { ldlex_popstate (); }
17776 break;
17778 - case 302:
17779 -#line 1064 "ldgram.y"
17780 + case 304:
17781 +#line 1068 "ldgram.y"
17783 - lang_new_phdr ((yyvsp[(1) - (6)].name), (yyvsp[(3) - (6)].etree), (yyvsp[(4) - (6)].phdr).filehdr, (yyvsp[(4) - (6)].phdr).phdrs, (yyvsp[(4) - (6)].phdr).at,
17784 - (yyvsp[(4) - (6)].phdr).flags);
17785 + lang_new_phdr ((yyvsp[-5].name), (yyvsp[-3].etree), (yyvsp[-2].phdr).filehdr, (yyvsp[-2].phdr).phdrs, (yyvsp[-2].phdr).at,
17786 + (yyvsp[-2].phdr).flags);
17788 break;
17790 - case 303:
17791 -#line 1072 "ldgram.y"
17792 + case 305:
17793 +#line 1076 "ldgram.y"
17795 - (yyval.etree) = (yyvsp[(1) - (1)].etree);
17796 + (yyval.etree) = (yyvsp[0].etree);
17798 - if ((yyvsp[(1) - (1)].etree)->type.node_class == etree_name
17799 - && (yyvsp[(1) - (1)].etree)->type.node_code == NAME)
17800 + if ((yyvsp[0].etree)->type.node_class == etree_name
17801 + && (yyvsp[0].etree)->type.node_code == NAME)
17803 const char *s;
17804 unsigned int i;
17805 @@ -3873,7 +3683,7 @@
17806 "PT_PHDR", "PT_TLS"
17809 - s = (yyvsp[(1) - (1)].etree)->name.name;
17810 + s = (yyvsp[0].etree)->name.name;
17811 for (i = 0;
17812 i < sizeof phdr_types / sizeof phdr_types[0];
17813 i++)
17814 @@ -3900,287 +3710,289 @@
17816 break;
17818 - case 304:
17819 -#line 1116 "ldgram.y"
17820 + case 306:
17821 +#line 1120 "ldgram.y"
17823 memset (&(yyval.phdr), 0, sizeof (struct phdr_info));
17825 break;
17827 - case 305:
17828 -#line 1120 "ldgram.y"
17829 + case 307:
17830 +#line 1124 "ldgram.y"
17832 - (yyval.phdr) = (yyvsp[(3) - (3)].phdr);
17833 - if (strcmp ((yyvsp[(1) - (3)].name), "FILEHDR") == 0 && (yyvsp[(2) - (3)].etree) == NULL)
17834 + (yyval.phdr) = (yyvsp[0].phdr);
17835 + if (strcmp ((yyvsp[-2].name), "FILEHDR") == 0 && (yyvsp[-1].etree) == NULL)
17836 (yyval.phdr).filehdr = TRUE;
17837 - else if (strcmp ((yyvsp[(1) - (3)].name), "PHDRS") == 0 && (yyvsp[(2) - (3)].etree) == NULL)
17838 + else if (strcmp ((yyvsp[-2].name), "PHDRS") == 0 && (yyvsp[-1].etree) == NULL)
17839 (yyval.phdr).phdrs = TRUE;
17840 - else if (strcmp ((yyvsp[(1) - (3)].name), "FLAGS") == 0 && (yyvsp[(2) - (3)].etree) != NULL)
17841 - (yyval.phdr).flags = (yyvsp[(2) - (3)].etree);
17842 + else if (strcmp ((yyvsp[-2].name), "FLAGS") == 0 && (yyvsp[-1].etree) != NULL)
17843 + (yyval.phdr).flags = (yyvsp[-1].etree);
17844 else
17845 - einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"), (yyvsp[(1) - (3)].name));
17846 + einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"), (yyvsp[-2].name));
17848 break;
17850 - case 306:
17851 -#line 1132 "ldgram.y"
17852 + case 308:
17853 +#line 1136 "ldgram.y"
17855 - (yyval.phdr) = (yyvsp[(5) - (5)].phdr);
17856 - (yyval.phdr).at = (yyvsp[(3) - (5)].etree);
17857 + (yyval.phdr) = (yyvsp[0].phdr);
17858 + (yyval.phdr).at = (yyvsp[-2].etree);
17860 break;
17862 - case 307:
17863 -#line 1140 "ldgram.y"
17864 + case 309:
17865 +#line 1144 "ldgram.y"
17867 (yyval.etree) = NULL;
17869 break;
17871 - case 308:
17872 -#line 1144 "ldgram.y"
17873 + case 310:
17874 +#line 1148 "ldgram.y"
17876 - (yyval.etree) = (yyvsp[(2) - (3)].etree);
17877 + (yyval.etree) = (yyvsp[-1].etree);
17879 break;
17881 - case 309:
17882 -#line 1150 "ldgram.y"
17883 + case 311:
17884 +#line 1154 "ldgram.y"
17886 ldlex_version_file ();
17887 PUSH_ERROR (_("dynamic list"));
17889 break;
17891 - case 310:
17892 -#line 1155 "ldgram.y"
17893 + case 312:
17894 +#line 1159 "ldgram.y"
17896 ldlex_popstate ();
17897 POP_ERROR ();
17899 break;
17901 - case 314:
17902 -#line 1172 "ldgram.y"
17903 + case 316:
17904 +#line 1176 "ldgram.y"
17906 - lang_append_dynamic_list ((yyvsp[(1) - (2)].versyms));
17907 + lang_append_dynamic_list ((yyvsp[-1].versyms));
17909 break;
17911 - case 315:
17912 -#line 1180 "ldgram.y"
17913 + case 317:
17914 +#line 1184 "ldgram.y"
17916 ldlex_version_file ();
17917 PUSH_ERROR (_("VERSION script"));
17919 break;
17921 - case 316:
17922 -#line 1185 "ldgram.y"
17923 + case 318:
17924 +#line 1189 "ldgram.y"
17926 ldlex_popstate ();
17927 POP_ERROR ();
17929 break;
17931 - case 317:
17932 -#line 1194 "ldgram.y"
17933 + case 319:
17934 +#line 1198 "ldgram.y"
17936 ldlex_version_script ();
17938 break;
17940 - case 318:
17941 -#line 1198 "ldgram.y"
17942 + case 320:
17943 +#line 1202 "ldgram.y"
17945 ldlex_popstate ();
17947 break;
17949 - case 321:
17950 -#line 1210 "ldgram.y"
17952 - lang_register_vers_node (NULL, (yyvsp[(2) - (4)].versnode), NULL);
17954 - break;
17956 - case 322:
17957 -#line 1214 "ldgram.y"
17959 - lang_register_vers_node ((yyvsp[(1) - (5)].name), (yyvsp[(3) - (5)].versnode), NULL);
17961 - break;
17963 case 323:
17964 -#line 1218 "ldgram.y"
17965 +#line 1214 "ldgram.y"
17967 - lang_register_vers_node ((yyvsp[(1) - (6)].name), (yyvsp[(3) - (6)].versnode), (yyvsp[(5) - (6)].deflist));
17968 + lang_register_vers_node (NULL, (yyvsp[-2].versnode), NULL);
17970 break;
17972 case 324:
17973 -#line 1225 "ldgram.y"
17974 +#line 1218 "ldgram.y"
17976 - (yyval.deflist) = lang_add_vers_depend (NULL, (yyvsp[(1) - (1)].name));
17977 + lang_register_vers_node ((yyvsp[-4].name), (yyvsp[-2].versnode), NULL);
17979 break;
17981 case 325:
17982 -#line 1229 "ldgram.y"
17983 +#line 1222 "ldgram.y"
17985 - (yyval.deflist) = lang_add_vers_depend ((yyvsp[(1) - (2)].deflist), (yyvsp[(2) - (2)].name));
17986 + lang_register_vers_node ((yyvsp[-5].name), (yyvsp[-3].versnode), (yyvsp[-1].deflist));
17988 break;
17990 case 326:
17991 -#line 1236 "ldgram.y"
17992 +#line 1229 "ldgram.y"
17994 - (yyval.versnode) = lang_new_vers_node (NULL, NULL);
17995 + (yyval.deflist) = lang_add_vers_depend (NULL, (yyvsp[0].name));
17997 break;
17999 case 327:
18000 -#line 1240 "ldgram.y"
18001 +#line 1233 "ldgram.y"
18003 - (yyval.versnode) = lang_new_vers_node ((yyvsp[(1) - (2)].versyms), NULL);
18004 + (yyval.deflist) = lang_add_vers_depend ((yyvsp[-1].deflist), (yyvsp[0].name));
18006 break;
18008 case 328:
18009 -#line 1244 "ldgram.y"
18010 +#line 1240 "ldgram.y"
18012 - (yyval.versnode) = lang_new_vers_node ((yyvsp[(3) - (4)].versyms), NULL);
18013 + (yyval.versnode) = lang_new_vers_node (NULL, NULL);
18015 break;
18017 case 329:
18018 -#line 1248 "ldgram.y"
18019 +#line 1244 "ldgram.y"
18021 - (yyval.versnode) = lang_new_vers_node (NULL, (yyvsp[(3) - (4)].versyms));
18022 + (yyval.versnode) = lang_new_vers_node ((yyvsp[-1].versyms), NULL);
18024 break;
18026 case 330:
18027 -#line 1252 "ldgram.y"
18028 +#line 1248 "ldgram.y"
18030 - (yyval.versnode) = lang_new_vers_node ((yyvsp[(3) - (8)].versyms), (yyvsp[(7) - (8)].versyms));
18031 + (yyval.versnode) = lang_new_vers_node ((yyvsp[-1].versyms), NULL);
18033 break;
18035 case 331:
18036 -#line 1259 "ldgram.y"
18037 +#line 1252 "ldgram.y"
18039 - (yyval.versyms) = lang_new_vers_pattern (NULL, (yyvsp[(1) - (1)].name), ldgram_vers_current_lang, FALSE);
18040 + (yyval.versnode) = lang_new_vers_node (NULL, (yyvsp[-1].versyms));
18042 break;
18044 case 332:
18045 -#line 1263 "ldgram.y"
18046 +#line 1256 "ldgram.y"
18048 - (yyval.versyms) = lang_new_vers_pattern (NULL, (yyvsp[(1) - (1)].name), ldgram_vers_current_lang, TRUE);
18049 + (yyval.versnode) = lang_new_vers_node ((yyvsp[-5].versyms), (yyvsp[-1].versyms));
18051 break;
18053 case 333:
18054 -#line 1267 "ldgram.y"
18055 +#line 1263 "ldgram.y"
18057 - (yyval.versyms) = lang_new_vers_pattern ((yyvsp[(1) - (3)].versyms), (yyvsp[(3) - (3)].name), ldgram_vers_current_lang, FALSE);
18058 + (yyval.versyms) = lang_new_vers_pattern (NULL, (yyvsp[0].name), ldgram_vers_current_lang, FALSE);
18060 break;
18062 case 334:
18063 -#line 1271 "ldgram.y"
18064 +#line 1267 "ldgram.y"
18066 - (yyval.versyms) = lang_new_vers_pattern ((yyvsp[(1) - (3)].versyms), (yyvsp[(3) - (3)].name), ldgram_vers_current_lang, TRUE);
18067 + (yyval.versyms) = lang_new_vers_pattern (NULL, (yyvsp[0].name), ldgram_vers_current_lang, TRUE);
18069 break;
18071 case 335:
18072 -#line 1275 "ldgram.y"
18073 +#line 1271 "ldgram.y"
18075 - (yyval.name) = ldgram_vers_current_lang;
18076 - ldgram_vers_current_lang = (yyvsp[(4) - (5)].name);
18078 + (yyval.versyms) = lang_new_vers_pattern ((yyvsp[-2].versyms), (yyvsp[0].name), ldgram_vers_current_lang, FALSE);
18080 break;
18082 case 336:
18083 -#line 1280 "ldgram.y"
18084 +#line 1275 "ldgram.y"
18086 - struct bfd_elf_version_expr *pat;
18087 - for (pat = (yyvsp[(7) - (9)].versyms); pat->next != NULL; pat = pat->next);
18088 - pat->next = (yyvsp[(1) - (9)].versyms);
18089 - (yyval.versyms) = (yyvsp[(7) - (9)].versyms);
18090 - ldgram_vers_current_lang = (yyvsp[(6) - (9)].name);
18092 + (yyval.versyms) = lang_new_vers_pattern ((yyvsp[-2].versyms), (yyvsp[0].name), ldgram_vers_current_lang, TRUE);
18094 break;
18096 case 337:
18097 -#line 1288 "ldgram.y"
18098 +#line 1279 "ldgram.y"
18100 (yyval.name) = ldgram_vers_current_lang;
18101 - ldgram_vers_current_lang = (yyvsp[(2) - (3)].name);
18102 + ldgram_vers_current_lang = (yyvsp[-1].name);
18104 break;
18106 case 338:
18107 -#line 1293 "ldgram.y"
18108 +#line 1284 "ldgram.y"
18110 - (yyval.versyms) = (yyvsp[(5) - (7)].versyms);
18111 - ldgram_vers_current_lang = (yyvsp[(4) - (7)].name);
18112 + struct bfd_elf_version_expr *pat;
18113 + for (pat = (yyvsp[-2].versyms); pat->next != NULL; pat = pat->next);
18114 + pat->next = (yyvsp[-8].versyms);
18115 + (yyval.versyms) = (yyvsp[-2].versyms);
18116 + ldgram_vers_current_lang = (yyvsp[-3].name);
18118 break;
18120 case 339:
18121 -#line 1298 "ldgram.y"
18122 +#line 1292 "ldgram.y"
18124 - (yyval.versyms) = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
18126 + (yyval.name) = ldgram_vers_current_lang;
18127 + ldgram_vers_current_lang = (yyvsp[-1].name);
18129 break;
18131 case 340:
18132 +#line 1297 "ldgram.y"
18134 + (yyval.versyms) = (yyvsp[-2].versyms);
18135 + ldgram_vers_current_lang = (yyvsp[-3].name);
18137 + break;
18139 + case 341:
18140 #line 1302 "ldgram.y"
18142 - (yyval.versyms) = lang_new_vers_pattern ((yyvsp[(1) - (3)].versyms), "global", ldgram_vers_current_lang, FALSE);
18143 + (yyval.versyms) = lang_new_vers_pattern (NULL, "global", ldgram_vers_current_lang, FALSE);
18145 break;
18147 - case 341:
18148 + case 342:
18149 #line 1306 "ldgram.y"
18151 - (yyval.versyms) = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
18152 + (yyval.versyms) = lang_new_vers_pattern ((yyvsp[-2].versyms), "global", ldgram_vers_current_lang, FALSE);
18154 break;
18156 - case 342:
18157 + case 343:
18158 #line 1310 "ldgram.y"
18160 - (yyval.versyms) = lang_new_vers_pattern ((yyvsp[(1) - (3)].versyms), "local", ldgram_vers_current_lang, FALSE);
18161 + (yyval.versyms) = lang_new_vers_pattern (NULL, "local", ldgram_vers_current_lang, FALSE);
18163 break;
18165 - case 343:
18166 + case 344:
18167 #line 1314 "ldgram.y"
18169 - (yyval.versyms) = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
18170 + (yyval.versyms) = lang_new_vers_pattern ((yyvsp[-2].versyms), "local", ldgram_vers_current_lang, FALSE);
18172 break;
18174 - case 344:
18175 + case 345:
18176 #line 1318 "ldgram.y"
18178 - (yyval.versyms) = lang_new_vers_pattern ((yyvsp[(1) - (3)].versyms), "extern", ldgram_vers_current_lang, FALSE);
18179 + (yyval.versyms) = lang_new_vers_pattern (NULL, "extern", ldgram_vers_current_lang, FALSE);
18181 + break;
18183 + case 346:
18184 +#line 1322 "ldgram.y"
18186 + (yyval.versyms) = lang_new_vers_pattern ((yyvsp[-2].versyms), "extern", ldgram_vers_current_lang, FALSE);
18188 break;
18191 -/* Line 1267 of yacc.c. */
18192 -#line 4178 "ldgram.c"
18193 default: break;
18195 - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
18197 - YYPOPSTACK (yylen);
18198 - yylen = 0;
18199 +/* Line 1126 of yacc.c. */
18200 +#line 3991 "ldgram.c"
18202 + yyvsp -= yylen;
18203 + yyssp -= yylen;
18206 YY_STACK_PRINT (yyss, yyssp);
18208 *++yyvsp = yyval;
18209 @@ -4209,41 +4021,110 @@
18210 if (!yyerrstatus)
18212 ++yynerrs;
18213 -#if ! YYERROR_VERBOSE
18214 - yyerror (YY_("syntax error"));
18215 -#else
18217 - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
18218 - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
18220 - YYSIZE_T yyalloc = 2 * yysize;
18221 - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
18222 - yyalloc = YYSTACK_ALLOC_MAXIMUM;
18223 - if (yymsg != yymsgbuf)
18224 - YYSTACK_FREE (yymsg);
18225 - yymsg = (char *) YYSTACK_ALLOC (yyalloc);
18226 - if (yymsg)
18227 - yymsg_alloc = yyalloc;
18228 - else
18229 +#if YYERROR_VERBOSE
18230 + yyn = yypact[yystate];
18232 + if (YYPACT_NINF < yyn && yyn < YYLAST)
18234 + int yytype = YYTRANSLATE (yychar);
18235 + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
18236 + YYSIZE_T yysize = yysize0;
18237 + YYSIZE_T yysize1;
18238 + int yysize_overflow = 0;
18239 + char *yymsg = 0;
18240 +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
18241 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
18242 + int yyx;
18244 +#if 0
18245 + /* This is so xgettext sees the translatable formats that are
18246 + constructed on the fly. */
18247 + YY_("syntax error, unexpected %s");
18248 + YY_("syntax error, unexpected %s, expecting %s");
18249 + YY_("syntax error, unexpected %s, expecting %s or %s");
18250 + YY_("syntax error, unexpected %s, expecting %s or %s or %s");
18251 + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
18252 +#endif
18253 + char *yyfmt;
18254 + char const *yyf;
18255 + static char const yyunexpected[] = "syntax error, unexpected %s";
18256 + static char const yyexpecting[] = ", expecting %s";
18257 + static char const yyor[] = " or %s";
18258 + char yyformat[sizeof yyunexpected
18259 + + sizeof yyexpecting - 1
18260 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
18261 + * (sizeof yyor - 1))];
18262 + char const *yyprefix = yyexpecting;
18264 + /* Start YYX at -YYN if negative to avoid negative indexes in
18265 + YYCHECK. */
18266 + int yyxbegin = yyn < 0 ? -yyn : 0;
18268 + /* Stay within bounds of both yycheck and yytname. */
18269 + int yychecklim = YYLAST - yyn;
18270 + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
18271 + int yycount = 1;
18273 + yyarg[0] = yytname[yytype];
18274 + yyfmt = yystpcpy (yyformat, yyunexpected);
18276 + for (yyx = yyxbegin; yyx < yyxend; ++yyx)
18277 + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
18279 - yymsg = yymsgbuf;
18280 - yymsg_alloc = sizeof yymsgbuf;
18281 + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
18283 + yycount = 1;
18284 + yysize = yysize0;
18285 + yyformat[sizeof yyunexpected - 1] = '\0';
18286 + break;
18288 + yyarg[yycount++] = yytname[yyx];
18289 + yysize1 = yysize + yytnamerr (0, yytname[yyx]);
18290 + yysize_overflow |= yysize1 < yysize;
18291 + yysize = yysize1;
18292 + yyfmt = yystpcpy (yyfmt, yyprefix);
18293 + yyprefix = yyor;
18297 - if (0 < yysize && yysize <= yymsg_alloc)
18299 - (void) yysyntax_error (yymsg, yystate, yychar);
18300 - yyerror (yymsg);
18302 - else
18304 - yyerror (YY_("syntax error"));
18305 - if (yysize != 0)
18306 + yyf = YY_(yyformat);
18307 + yysize1 = yysize + yystrlen (yyf);
18308 + yysize_overflow |= yysize1 < yysize;
18309 + yysize = yysize1;
18311 + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
18312 + yymsg = (char *) YYSTACK_ALLOC (yysize);
18313 + if (yymsg)
18315 + /* Avoid sprintf, as that infringes on the user's name space.
18316 + Don't have undefined behavior even if the translation
18317 + produced a string with the wrong number of "%s"s. */
18318 + char *yyp = yymsg;
18319 + int yyi = 0;
18320 + while ((*yyp = *yyf))
18322 + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
18324 + yyp += yytnamerr (yyp, yyarg[yyi++]);
18325 + yyf += 2;
18327 + else
18329 + yyp++;
18330 + yyf++;
18333 + yyerror (yymsg);
18334 + YYSTACK_FREE (yymsg);
18336 + else
18338 + yyerror (YY_("syntax error"));
18339 goto yyexhaustedlab;
18342 -#endif
18345 + else
18346 +#endif /* YYERROR_VERBOSE */
18347 + yyerror (YY_("syntax error"));
18351 @@ -4254,15 +4135,14 @@
18352 error, discard it. */
18354 if (yychar <= YYEOF)
18357 /* Return failure if at end of input. */
18358 if (yychar == YYEOF)
18359 YYABORT;
18362 else
18364 - yydestruct ("Error: discarding",
18365 - yytoken, &yylval);
18366 + yydestruct ("Error: discarding", yytoken, &yylval);
18367 yychar = YYEMPTY;
18370 @@ -4280,14 +4160,11 @@
18371 /* Pacify compilers like GCC when the user code never invokes
18372 YYERROR and the label yyerrorlab therefore never appears in user
18373 code. */
18374 - if (/*CONSTCOND*/ 0)
18375 + if (0)
18376 goto yyerrorlab;
18378 - /* Do not reclaim the symbols of the rule which action triggered
18379 - this YYERROR. */
18380 - YYPOPSTACK (yylen);
18381 - yylen = 0;
18382 - YY_STACK_PRINT (yyss, yyssp);
18383 +yyvsp -= yylen;
18384 + yyssp -= yylen;
18385 yystate = *yyssp;
18386 goto yyerrlab1;
18388 @@ -4317,9 +4194,8 @@
18389 YYABORT;
18392 - yydestruct ("Error: popping",
18393 - yystos[yystate], yyvsp);
18394 - YYPOPSTACK (1);
18395 + yydestruct ("Error: popping", yystos[yystate], yyvsp);
18396 + YYPOPSTACK;
18397 yystate = *yyssp;
18398 YY_STACK_PRINT (yyss, yyssp);
18400 @@ -4330,7 +4206,7 @@
18401 *++yyvsp = yylval;
18404 - /* Shift the error token. */
18405 + /* Shift the error token. */
18406 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
18408 yystate = yyn;
18409 @@ -4365,30 +4241,21 @@
18410 if (yychar != YYEOF && yychar != YYEMPTY)
18411 yydestruct ("Cleanup: discarding lookahead",
18412 yytoken, &yylval);
18413 - /* Do not reclaim the symbols of the rule which action triggered
18414 - this YYABORT or YYACCEPT. */
18415 - YYPOPSTACK (yylen);
18416 - YY_STACK_PRINT (yyss, yyssp);
18417 while (yyssp != yyss)
18419 yydestruct ("Cleanup: popping",
18420 yystos[*yyssp], yyvsp);
18421 - YYPOPSTACK (1);
18422 + YYPOPSTACK;
18424 #ifndef yyoverflow
18425 if (yyss != yyssa)
18426 YYSTACK_FREE (yyss);
18427 #endif
18428 -#if YYERROR_VERBOSE
18429 - if (yymsg != yymsgbuf)
18430 - YYSTACK_FREE (yymsg);
18431 -#endif
18432 - /* Make sure YYID is used. */
18433 - return YYID (yyresult);
18434 + return yyresult;
18438 -#line 1328 "ldgram.y"
18439 +#line 1332 "ldgram.y"
18441 void
18442 yyerror(arg)
18443 diff -Naur ../PRISTINE/binutils-2.18/ld/ldgram.h binutils-2.18/ld/ldgram.h
18444 --- ../PRISTINE/binutils-2.18/ld/ldgram.h 2007-08-06 13:39:31.000000000 -0700
18445 +++ binutils-2.18/ld/ldgram.h 2009-01-09 17:32:43.719512000 -0800
18446 @@ -1,9 +1,7 @@
18447 -/* A Bison parser, made by GNU Bison 2.3. */
18448 +/* A Bison parser, made by GNU Bison 2.1. */
18450 -/* Skeleton interface for Bison's Yacc-like parsers in C
18452 - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
18453 - Free Software Foundation, Inc.
18454 +/* Skeleton parser for Yacc-like parsing with Bison,
18455 + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
18457 This program is free software; you can redistribute it and/or modify
18458 it under the terms of the GNU General Public License as published by
18459 @@ -20,18 +18,10 @@
18460 Foundation, Inc., 51 Franklin Street, Fifth Floor,
18461 Boston, MA 02110-1301, USA. */
18463 -/* As a special exception, you may create a larger work that contains
18464 - part or all of the Bison parser skeleton and distribute that work
18465 - under terms of your choice, so long as that work isn't itself a
18466 - parser generator using the skeleton or a modified version thereof
18467 - as a parser skeleton. Alternatively, if you modify or redistribute
18468 - the parser skeleton itself, you may (at your option) remove this
18469 - special exception, which will cause the skeleton and the resulting
18470 - Bison output files to be licensed under the GNU General Public
18471 - License without this special exception.
18473 - This special exception was added by the Free Software Foundation in
18474 - version 2.2 of Bison. */
18475 +/* As a special exception, when this file is copied by Bison into a
18476 + Bison output file, you may use that output file without restriction.
18477 + This special exception was added by the Free Software Foundation
18478 + in version 1.24 of Bison. */
18480 /* Tokens. */
18481 #ifndef YYTOKENTYPE
18482 @@ -100,62 +90,64 @@
18483 LOADADDR = 316,
18484 MAX_K = 317,
18485 MIN_K = 318,
18486 - STARTUP = 319,
18487 - HLL = 320,
18488 - SYSLIB = 321,
18489 - FLOAT = 322,
18490 - NOFLOAT = 323,
18491 - NOCROSSREFS = 324,
18492 - ORIGIN = 325,
18493 - FILL = 326,
18494 - LENGTH = 327,
18495 - CREATE_OBJECT_SYMBOLS = 328,
18496 - INPUT = 329,
18497 - GROUP = 330,
18498 - OUTPUT = 331,
18499 - CONSTRUCTORS = 332,
18500 - ALIGNMOD = 333,
18501 - AT = 334,
18502 - SUBALIGN = 335,
18503 - PROVIDE = 336,
18504 - PROVIDE_HIDDEN = 337,
18505 - AS_NEEDED = 338,
18506 - CHIP = 339,
18507 - LIST = 340,
18508 - SECT = 341,
18509 - ABSOLUTE = 342,
18510 - LOAD = 343,
18511 - NEWLINE = 344,
18512 - ENDWORD = 345,
18513 - ORDER = 346,
18514 - NAMEWORD = 347,
18515 - ASSERT_K = 348,
18516 - FORMAT = 349,
18517 - PUBLIC = 350,
18518 - DEFSYMEND = 351,
18519 - BASE = 352,
18520 - ALIAS = 353,
18521 - TRUNCATE = 354,
18522 - REL = 355,
18523 - INPUT_SCRIPT = 356,
18524 - INPUT_MRI_SCRIPT = 357,
18525 - INPUT_DEFSYM = 358,
18526 - CASE = 359,
18527 - EXTERN = 360,
18528 - START = 361,
18529 - VERS_TAG = 362,
18530 - VERS_IDENTIFIER = 363,
18531 - GLOBAL = 364,
18532 - LOCAL = 365,
18533 - VERSIONK = 366,
18534 - INPUT_VERSION_SCRIPT = 367,
18535 - KEEP = 368,
18536 - ONLY_IF_RO = 369,
18537 - ONLY_IF_RW = 370,
18538 - SPECIAL = 371,
18539 - EXCLUDE_FILE = 372,
18540 - CONSTANT = 373,
18541 - INPUT_DYNAMIC_LIST = 374
18542 + CEILP2 = 319,
18543 + NACL_MASK = 320,
18544 + STARTUP = 321,
18545 + HLL = 322,
18546 + SYSLIB = 323,
18547 + FLOAT = 324,
18548 + NOFLOAT = 325,
18549 + NOCROSSREFS = 326,
18550 + ORIGIN = 327,
18551 + FILL = 328,
18552 + LENGTH = 329,
18553 + CREATE_OBJECT_SYMBOLS = 330,
18554 + INPUT = 331,
18555 + GROUP = 332,
18556 + OUTPUT = 333,
18557 + CONSTRUCTORS = 334,
18558 + ALIGNMOD = 335,
18559 + AT = 336,
18560 + SUBALIGN = 337,
18561 + PROVIDE = 338,
18562 + PROVIDE_HIDDEN = 339,
18563 + AS_NEEDED = 340,
18564 + CHIP = 341,
18565 + LIST = 342,
18566 + SECT = 343,
18567 + ABSOLUTE = 344,
18568 + LOAD = 345,
18569 + NEWLINE = 346,
18570 + ENDWORD = 347,
18571 + ORDER = 348,
18572 + NAMEWORD = 349,
18573 + ASSERT_K = 350,
18574 + FORMAT = 351,
18575 + PUBLIC = 352,
18576 + DEFSYMEND = 353,
18577 + BASE = 354,
18578 + ALIAS = 355,
18579 + TRUNCATE = 356,
18580 + REL = 357,
18581 + INPUT_SCRIPT = 358,
18582 + INPUT_MRI_SCRIPT = 359,
18583 + INPUT_DEFSYM = 360,
18584 + CASE = 361,
18585 + EXTERN = 362,
18586 + START = 363,
18587 + VERS_TAG = 364,
18588 + VERS_IDENTIFIER = 365,
18589 + GLOBAL = 366,
18590 + LOCAL = 367,
18591 + VERSIONK = 368,
18592 + INPUT_VERSION_SCRIPT = 369,
18593 + KEEP = 370,
18594 + ONLY_IF_RO = 371,
18595 + ONLY_IF_RW = 372,
18596 + SPECIAL = 373,
18597 + EXCLUDE_FILE = 374,
18598 + CONSTANT = 375,
18599 + INPUT_DYNAMIC_LIST = 376
18601 #endif
18602 /* Tokens. */
18603 @@ -220,70 +212,71 @@
18604 #define LOADADDR 316
18605 #define MAX_K 317
18606 #define MIN_K 318
18607 -#define STARTUP 319
18608 -#define HLL 320
18609 -#define SYSLIB 321
18610 -#define FLOAT 322
18611 -#define NOFLOAT 323
18612 -#define NOCROSSREFS 324
18613 -#define ORIGIN 325
18614 -#define FILL 326
18615 -#define LENGTH 327
18616 -#define CREATE_OBJECT_SYMBOLS 328
18617 -#define INPUT 329
18618 -#define GROUP 330
18619 -#define OUTPUT 331
18620 -#define CONSTRUCTORS 332
18621 -#define ALIGNMOD 333
18622 -#define AT 334
18623 -#define SUBALIGN 335
18624 -#define PROVIDE 336
18625 -#define PROVIDE_HIDDEN 337
18626 -#define AS_NEEDED 338
18627 -#define CHIP 339
18628 -#define LIST 340
18629 -#define SECT 341
18630 -#define ABSOLUTE 342
18631 -#define LOAD 343
18632 -#define NEWLINE 344
18633 -#define ENDWORD 345
18634 -#define ORDER 346
18635 -#define NAMEWORD 347
18636 -#define ASSERT_K 348
18637 -#define FORMAT 349
18638 -#define PUBLIC 350
18639 -#define DEFSYMEND 351
18640 -#define BASE 352
18641 -#define ALIAS 353
18642 -#define TRUNCATE 354
18643 -#define REL 355
18644 -#define INPUT_SCRIPT 356
18645 -#define INPUT_MRI_SCRIPT 357
18646 -#define INPUT_DEFSYM 358
18647 -#define CASE 359
18648 -#define EXTERN 360
18649 -#define START 361
18650 -#define VERS_TAG 362
18651 -#define VERS_IDENTIFIER 363
18652 -#define GLOBAL 364
18653 -#define LOCAL 365
18654 -#define VERSIONK 366
18655 -#define INPUT_VERSION_SCRIPT 367
18656 -#define KEEP 368
18657 -#define ONLY_IF_RO 369
18658 -#define ONLY_IF_RW 370
18659 -#define SPECIAL 371
18660 -#define EXCLUDE_FILE 372
18661 -#define CONSTANT 373
18662 -#define INPUT_DYNAMIC_LIST 374
18663 +#define CEILP2 319
18664 +#define NACL_MASK 320
18665 +#define STARTUP 321
18666 +#define HLL 322
18667 +#define SYSLIB 323
18668 +#define FLOAT 324
18669 +#define NOFLOAT 325
18670 +#define NOCROSSREFS 326
18671 +#define ORIGIN 327
18672 +#define FILL 328
18673 +#define LENGTH 329
18674 +#define CREATE_OBJECT_SYMBOLS 330
18675 +#define INPUT 331
18676 +#define GROUP 332
18677 +#define OUTPUT 333
18678 +#define CONSTRUCTORS 334
18679 +#define ALIGNMOD 335
18680 +#define AT 336
18681 +#define SUBALIGN 337
18682 +#define PROVIDE 338
18683 +#define PROVIDE_HIDDEN 339
18684 +#define AS_NEEDED 340
18685 +#define CHIP 341
18686 +#define LIST 342
18687 +#define SECT 343
18688 +#define ABSOLUTE 344
18689 +#define LOAD 345
18690 +#define NEWLINE 346
18691 +#define ENDWORD 347
18692 +#define ORDER 348
18693 +#define NAMEWORD 349
18694 +#define ASSERT_K 350
18695 +#define FORMAT 351
18696 +#define PUBLIC 352
18697 +#define DEFSYMEND 353
18698 +#define BASE 354
18699 +#define ALIAS 355
18700 +#define TRUNCATE 356
18701 +#define REL 357
18702 +#define INPUT_SCRIPT 358
18703 +#define INPUT_MRI_SCRIPT 359
18704 +#define INPUT_DEFSYM 360
18705 +#define CASE 361
18706 +#define EXTERN 362
18707 +#define START 363
18708 +#define VERS_TAG 364
18709 +#define VERS_IDENTIFIER 365
18710 +#define GLOBAL 366
18711 +#define LOCAL 367
18712 +#define VERSIONK 368
18713 +#define INPUT_VERSION_SCRIPT 369
18714 +#define KEEP 370
18715 +#define ONLY_IF_RO 371
18716 +#define ONLY_IF_RW 372
18717 +#define SPECIAL 373
18718 +#define EXCLUDE_FILE 374
18719 +#define CONSTANT 375
18720 +#define INPUT_DYNAMIC_LIST 376
18725 -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
18726 -typedef union YYSTYPE
18727 +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
18728 #line 66 "ldgram.y"
18730 +typedef union YYSTYPE {
18731 bfd_vma integer;
18732 struct big_int
18734 @@ -310,10 +303,9 @@
18735 struct bfd_elf_version_deps *deflist;
18736 struct bfd_elf_version_expr *versyms;
18737 struct bfd_elf_version_tree *versnode;
18739 -/* Line 1489 of yacc.c. */
18740 -#line 316 "ldgram.h"
18741 - YYSTYPE;
18742 +} YYSTYPE;
18743 +/* Line 1447 of yacc.c. */
18744 +#line 309 "ldgram.h"
18745 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
18746 # define YYSTYPE_IS_DECLARED 1
18747 # define YYSTYPE_IS_TRIVIAL 1
18748 @@ -321,3 +313,5 @@
18750 extern YYSTYPE yylval;
18754 diff -Naur ../PRISTINE/binutils-2.18/ld/ldgram.y binutils-2.18/ld/ldgram.y
18755 --- ../PRISTINE/binutils-2.18/ld/ldgram.y 2007-08-06 13:00:20.000000000 -0700
18756 +++ binutils-2.18/ld/ldgram.y 2009-01-09 17:32:43.739493000 -0800
18757 @@ -138,7 +138,7 @@
18758 %token NOLOAD DSECT COPY INFO OVERLAY
18759 %token DEFINED TARGET_K SEARCH_DIR MAP ENTRY
18760 %token <integer> NEXT
18761 -%token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K
18762 +%token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K CEILP2 NACL_MASK
18763 %token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
18764 %token ORIGIN FILL
18765 %token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
18766 @@ -880,6 +880,10 @@
18767 { $$ = exp_binop (MAX_K, $3, $5 ); }
18768 | MIN_K '(' exp ',' exp ')'
18769 { $$ = exp_binop (MIN_K, $3, $5 ); }
18770 + | CEILP2 '(' exp ')'
18771 + { $$ = exp_unop (CEILP2, $3); }
18772 + | NACL_MASK '(' exp ')'
18773 + { $$ = exp_unop (NACL_MASK, $3); }
18774 | ASSERT_K '(' exp ',' NAME ')'
18775 { $$ = exp_assert ($3, $5); }
18776 | ORIGIN '(' NAME ')'
18777 diff -Naur ../PRISTINE/binutils-2.18/ld/ldlex.c binutils-2.18/ld/ldlex.c
18778 --- ../PRISTINE/binutils-2.18/ld/ldlex.c 2007-08-06 13:39:31.000000000 -0700
18779 +++ binutils-2.18/ld/ldlex.c 2009-01-09 17:32:43.757484000 -0800
18780 @@ -8,7 +8,7 @@
18781 #define FLEX_SCANNER
18782 #define YY_FLEX_MAJOR_VERSION 2
18783 #define YY_FLEX_MINOR_VERSION 5
18784 -#define YY_FLEX_SUBMINOR_VERSION 33
18785 +#define YY_FLEX_SUBMINOR_VERSION 31
18786 #if YY_FLEX_SUBMINOR_VERSION > 0
18787 #define FLEX_BETA
18788 #endif
18789 @@ -30,15 +30,7 @@
18791 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
18793 -#if __STDC_VERSION__ >= 199901L
18795 -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
18796 - * if you want the limit (max/min) macros for int types.
18797 - */
18798 -#ifndef __STDC_LIMIT_MACROS
18799 -#define __STDC_LIMIT_MACROS 1
18800 -#endif
18802 +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
18803 #include <inttypes.h>
18804 typedef int8_t flex_int8_t;
18805 typedef uint8_t flex_uint8_t;
18806 @@ -142,10 +134,6 @@
18807 #define YY_BUF_SIZE 16384
18808 #endif
18810 -/* The state buf must be large enough to hold one state per character in the main buffer.
18811 - */
18812 -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
18814 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
18815 #define YY_TYPEDEF_YY_BUFFER_STATE
18816 typedef struct yy_buffer_state *YY_BUFFER_STATE;
18817 @@ -279,7 +267,7 @@
18819 /* Points to current character in buffer. */
18820 static char *yy_c_buf_p = (char *) 0;
18821 -static int yy_init = 0; /* whether we need to initialize */
18822 +static int yy_init = 1; /* whether we need to initialize */
18823 static int yy_start = 0; /* start state number */
18825 /* Flag which is used to allow yywrap()'s to do buffer switches
18826 @@ -363,8 +351,8 @@
18827 *yy_cp = '\0'; \
18828 (yy_c_buf_p) = yy_cp;
18830 -#define YY_NUM_RULES 186
18831 -#define YY_END_OF_BUFFER 187
18832 +#define YY_NUM_RULES 188
18833 +#define YY_END_OF_BUFFER 189
18834 /* This struct is not used in this scanner,
18835 but its presence is necessary. */
18836 struct yy_trans_info
18837 @@ -372,177 +360,180 @@
18838 flex_int32_t yy_verify;
18839 flex_int32_t yy_nxt;
18841 -static yyconst flex_int16_t yy_accept[1536] =
18842 +static yyconst flex_int16_t yy_accept[1562] =
18843 { 0,
18844 - 0, 0, 166, 166, 0, 0, 0, 0, 0, 0,
18845 - 0, 0, 0, 0, 0, 0, 0, 0, 187, 186,
18846 - 184, 169, 168, 32, 184, 166, 38, 29, 44, 43,
18847 - 34, 35, 28, 36, 166, 37, 8, 8, 45, 46,
18848 - 39, 40, 27, 33, 166, 166, 166, 166, 166, 166,
18849 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18850 - 166, 166, 166, 10, 9, 166, 111, 109, 166, 42,
18851 - 30, 41, 31, 185, 169, 32, 185, 164, 38, 29,
18852 - 44, 43, 34, 35, 28, 36, 164, 37, 8, 8,
18853 - 45, 46, 39, 40, 27, 33, 164, 164, 164, 164,
18854 + 0, 0, 168, 168, 0, 0, 0, 0, 0, 0,
18855 + 0, 0, 0, 0, 0, 0, 0, 0, 189, 188,
18856 + 186, 171, 170, 32, 186, 168, 38, 29, 44, 43,
18857 + 34, 35, 28, 36, 168, 37, 8, 8, 45, 46,
18858 + 39, 40, 27, 33, 168, 168, 168, 168, 168, 168,
18859 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18860 + 168, 168, 168, 10, 9, 168, 113, 111, 168, 42,
18861 + 30, 41, 31, 187, 171, 32, 187, 166, 38, 29,
18862 + 44, 43, 34, 35, 28, 36, 166, 37, 8, 8,
18863 + 45, 46, 39, 40, 27, 33, 166, 166, 166, 166,
18865 - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18866 - 164, 10, 9, 164, 164, 42, 30, 41, 31, 162,
18867 - 36, 162, 37, 8, 8, 162, 162, 162, 162, 162,
18868 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18869 - 162, 162, 162, 162, 162, 111, 109, 162, 31, 4,
18870 - 3, 2, 4, 5, 123, 122, 161, 34, 35, 28,
18871 - 36, 161, 37, 8, 8, 45, 46, 40, 33, 161,
18872 - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161,
18873 - 161, 10, 9, 161, 161, 161, 161, 161, 161, 161,
18874 - 161, 161, 161, 161, 31, 183, 181, 182, 184, 176,
18876 - 175, 170, 177, 178, 174, 174, 174, 174, 179, 180,
18877 - 169, 15, 0, 167, 166, 8, 26, 24, 22, 20,
18878 - 21, 1, 23, 8, 8, 166, 18, 17, 14, 16,
18879 - 19, 166, 166, 166, 166, 115, 166, 166, 166, 166,
18880 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18881 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18882 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18883 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18884 - 166, 25, 13, 164, 6, 22, 20, 21, 0, 1,
18885 - 23, 8, 0, 7, 7, 8, 7, 14, 164, 7,
18887 - 7, 7, 164, 164, 115, 7, 164, 164, 7, 164,
18888 - 164, 164, 7, 164, 164, 164, 164, 164, 164, 164,
18889 + 166, 10, 9, 166, 166, 42, 30, 41, 31, 164,
18890 + 36, 164, 37, 8, 8, 164, 164, 164, 164, 164,
18891 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18892 - 7, 164, 162, 8, 0, 23, 8, 0, 162, 162,
18893 - 162, 162, 115, 162, 162, 162, 162, 162, 162, 162,
18894 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18895 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18896 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18897 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 4,
18898 - 4, 122, 122, 161, 6, 124, 22, 125, 161, 7,
18900 - 7, 7, 161, 161, 161, 7, 161, 7, 7, 161,
18901 - 161, 161, 161, 161, 161, 161, 161, 7, 161, 161,
18902 - 161, 7, 161, 7, 7, 161, 161, 161, 161, 161,
18903 - 161, 161, 161, 183, 182, 175, 174, 0, 174, 174,
18904 - 174, 11, 12, 166, 166, 166, 166, 166, 166, 166,
18905 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18906 - 166, 166, 166, 166, 87, 166, 166, 166, 166, 166,
18907 - 166, 166, 166, 69, 166, 166, 166, 166, 166, 166,
18908 - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18909 + 164, 164, 164, 164, 164, 113, 111, 164, 31, 4,
18910 + 3, 2, 4, 5, 125, 124, 163, 34, 35, 28,
18911 + 36, 163, 37, 8, 8, 45, 46, 40, 33, 163,
18912 + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
18913 + 163, 10, 9, 163, 163, 163, 163, 163, 163, 163,
18914 + 163, 163, 163, 163, 31, 185, 183, 184, 186, 178,
18916 + 177, 172, 179, 180, 176, 176, 176, 176, 181, 182,
18917 + 171, 15, 0, 169, 168, 8, 26, 24, 22, 20,
18918 + 21, 1, 23, 8, 8, 168, 18, 17, 14, 16,
18919 + 19, 168, 168, 168, 168, 117, 168, 168, 168, 168,
18920 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18921 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18922 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18923 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18924 + 168, 25, 13, 166, 6, 22, 20, 21, 0, 1,
18925 + 23, 8, 0, 7, 7, 8, 7, 14, 166, 7,
18927 + 7, 7, 166, 166, 117, 7, 166, 166, 166, 7,
18928 + 166, 166, 166, 7, 166, 166, 166, 166, 166, 166,
18929 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18930 + 166, 166, 7, 166, 164, 8, 0, 23, 8, 0,
18931 + 164, 164, 164, 164, 117, 164, 164, 164, 164, 164,
18932 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18933 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18934 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18935 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18936 + 164, 164, 164, 4, 4, 124, 124, 163, 6, 126,
18938 - 112, 110, 166, 8, 165, 8, 164, 7, 164, 164,
18939 + 22, 127, 163, 7, 7, 7, 163, 163, 163, 7,
18940 + 163, 7, 7, 163, 163, 163, 163, 163, 163, 163,
18941 + 163, 7, 163, 163, 163, 7, 163, 7, 7, 163,
18942 + 163, 163, 163, 163, 163, 163, 163, 185, 184, 177,
18943 + 176, 0, 176, 176, 176, 11, 12, 168, 168, 168,
18944 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18945 + 168, 168, 168, 168, 168, 168, 168, 168, 89, 168,
18946 + 168, 168, 168, 168, 168, 168, 168, 71, 168, 168,
18947 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18948 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
18950 + 168, 168, 168, 168, 114, 112, 168, 8, 167, 8,
18951 + 166, 7, 166, 166, 166, 166, 166, 166, 166, 166,
18952 + 166, 166, 166, 166, 166, 166, 166, 166, 166, 60,
18953 + 61, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18954 + 166, 166, 166, 166, 166, 8, 165, 164, 164, 164,
18955 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18956 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 89,
18957 + 164, 164, 164, 164, 164, 164, 164, 164, 71, 60,
18958 + 164, 61, 164, 164, 164, 164, 164, 164, 164, 164,
18959 164, 164, 164, 164, 164, 164, 164, 164, 164, 164,
18960 - 164, 164, 164, 164, 60, 61, 164, 164, 164, 164,
18961 - 164, 164, 164, 164, 164, 164, 164, 164, 164, 8,
18962 - 163, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18963 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18964 - 162, 162, 87, 162, 162, 162, 162, 162, 162, 162,
18965 - 162, 69, 60, 162, 61, 162, 162, 162, 162, 162,
18966 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18967 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
18969 - 112, 110, 162, 4, 8, 161, 161, 161, 161, 161,
18970 - 126, 161, 161, 161, 161, 161, 161, 161, 161, 161,
18971 - 161, 161, 161, 161, 161, 161, 143, 161, 161, 161,
18972 - 161, 161, 161, 161, 161, 161, 161, 174, 174, 174,
18973 - 166, 57, 166, 166, 166, 51, 166, 94, 166, 103,
18974 - 166, 166, 166, 166, 166, 166, 166, 83, 166, 166,
18975 - 166, 166, 104, 166, 166, 119, 166, 166, 92, 166,
18976 - 65, 166, 166, 166, 166, 166, 166, 166, 166, 166,
18977 - 90, 166, 166, 166, 166, 166, 100, 166, 166, 166,
18978 - 166, 166, 166, 166, 166, 166, 164, 57, 164, 164,
18980 - 164, 51, 164, 164, 103, 164, 164, 164, 164, 164,
18981 - 104, 119, 164, 164, 65, 164, 164, 164, 164, 164,
18982 - 164, 164, 164, 164, 164, 164, 164, 162, 57, 162,
18983 - 162, 162, 51, 162, 94, 162, 103, 162, 162, 162,
18984 - 162, 162, 162, 162, 83, 162, 162, 162, 162, 104,
18985 - 162, 162, 119, 162, 162, 92, 162, 65, 162, 162,
18986 - 162, 162, 162, 162, 162, 162, 162, 90, 162, 162,
18987 - 162, 162, 162, 100, 162, 162, 162, 162, 162, 162,
18988 - 162, 162, 162, 161, 161, 161, 130, 138, 129, 161,
18989 - 161, 140, 133, 136, 161, 161, 141, 161, 161, 161,
18991 - 161, 161, 147, 155, 146, 161, 161, 158, 150, 153,
18992 - 161, 161, 159, 161, 161, 174, 174, 174, 166, 53,
18993 - 166, 166, 50, 166, 166, 166, 166, 102, 63, 166,
18994 - 166, 89, 166, 75, 166, 166, 74, 166, 166, 166,
18995 - 166, 166, 166, 166, 166, 166, 166, 114, 166, 166,
18996 - 166, 166, 93, 166, 166, 166, 91, 166, 166, 166,
18997 - 166, 166, 166, 166, 164, 53, 164, 164, 50, 164,
18998 - 164, 164, 102, 164, 75, 164, 164, 164, 164, 164,
18999 - 164, 164, 164, 164, 164, 164, 164, 164, 164, 162,
19000 - 53, 162, 162, 50, 162, 162, 162, 162, 102, 63,
19002 - 162, 162, 89, 162, 75, 162, 162, 74, 162, 162,
19003 - 162, 162, 162, 162, 162, 162, 162, 162, 114, 162,
19004 - 162, 162, 162, 93, 162, 162, 162, 91, 162, 162,
19005 - 162, 162, 162, 162, 162, 161, 131, 128, 161, 161,
19006 - 140, 140, 135, 161, 139, 161, 161, 148, 145, 161,
19007 - 161, 158, 158, 152, 161, 157, 161, 174, 174, 172,
19008 - 166, 166, 62, 166, 166, 166, 166, 166, 166, 166,
19009 - 64, 166, 166, 166, 52, 166, 47, 166, 166, 101,
19010 - 166, 48, 73, 166, 166, 166, 166, 166, 70, 166,
19011 - 166, 166, 166, 88, 71, 166, 166, 166, 164, 164,
19013 - 62, 164, 164, 164, 164, 164, 52, 164, 164, 101,
19014 - 164, 48, 164, 164, 164, 70, 164, 164, 164, 164,
19015 - 162, 162, 62, 162, 162, 162, 162, 162, 162, 162,
19016 - 64, 162, 162, 162, 52, 162, 47, 162, 162, 101,
19017 - 162, 48, 73, 162, 162, 162, 162, 162, 70, 162,
19018 - 162, 162, 162, 88, 71, 162, 162, 162, 161, 161,
19019 - 64, 137, 134, 161, 161, 161, 156, 154, 151, 161,
19020 - 173, 171, 166, 59, 166, 166, 166, 166, 166, 77,
19021 - 166, 166, 113, 166, 166, 166, 95, 166, 166, 97,
19022 - 117, 166, 166, 166, 166, 166, 108, 84, 166, 49,
19024 - 166, 166, 164, 59, 164, 164, 164, 77, 164, 164,
19025 - 164, 164, 105, 117, 164, 164, 108, 164, 164, 164,
19026 - 162, 59, 162, 162, 162, 162, 162, 77, 162, 162,
19027 - 113, 162, 162, 162, 95, 162, 162, 97, 117, 162,
19028 - 162, 162, 162, 162, 108, 84, 162, 49, 162, 162,
19029 - 161, 161, 161, 161, 161, 161, 142, 166, 121, 166,
19030 - 166, 166, 166, 166, 166, 58, 166, 166, 166, 166,
19031 - 166, 166, 82, 166, 166, 166, 116, 160, 166, 142,
19032 - 164, 121, 164, 164, 58, 164, 164, 164, 164, 164,
19033 - 116, 160, 164, 142, 162, 121, 162, 162, 162, 162,
19035 - 162, 162, 58, 162, 162, 162, 162, 162, 162, 82,
19036 - 162, 162, 162, 116, 160, 162, 142, 127, 132, 160,
19037 - 144, 149, 76, 166, 166, 166, 166, 166, 166, 166,
19039 + 164, 164, 164, 164, 164, 164, 164, 164, 114, 112,
19040 + 164, 4, 8, 163, 163, 163, 163, 163, 128, 163,
19041 + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
19042 + 163, 163, 163, 163, 145, 163, 163, 163, 163, 163,
19043 + 163, 163, 163, 163, 163, 176, 176, 176, 168, 57,
19044 + 168, 168, 168, 51, 168, 96, 168, 105, 168, 168,
19045 + 168, 168, 168, 168, 168, 85, 168, 168, 168, 168,
19046 + 106, 168, 168, 121, 168, 168, 94, 168, 67, 168,
19047 + 168, 168, 168, 168, 168, 168, 168, 168, 92, 168,
19048 + 168, 168, 168, 168, 102, 168, 168, 168, 168, 168,
19050 + 168, 168, 168, 168, 166, 57, 166, 166, 166, 51,
19051 + 166, 166, 166, 105, 166, 166, 166, 166, 166, 106,
19052 + 121, 166, 166, 166, 67, 166, 166, 166, 166, 166,
19053 + 166, 166, 166, 166, 166, 166, 166, 164, 57, 164,
19054 + 164, 164, 51, 164, 96, 164, 164, 105, 164, 164,
19055 + 164, 164, 164, 164, 164, 85, 164, 164, 164, 164,
19056 + 106, 164, 164, 121, 164, 164, 94, 164, 164, 67,
19057 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 92,
19058 + 164, 164, 164, 164, 164, 102, 164, 164, 164, 164,
19059 + 164, 164, 164, 164, 164, 163, 163, 163, 132, 140,
19061 + 131, 163, 163, 142, 135, 138, 163, 163, 143, 163,
19062 + 163, 163, 163, 163, 149, 157, 148, 163, 163, 160,
19063 + 152, 155, 163, 163, 161, 163, 163, 176, 176, 176,
19064 + 168, 53, 168, 168, 50, 168, 168, 168, 168, 104,
19065 + 65, 168, 168, 91, 168, 77, 168, 168, 76, 168,
19066 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 116,
19067 + 168, 168, 168, 168, 95, 168, 168, 168, 93, 168,
19068 + 168, 168, 168, 168, 168, 168, 166, 53, 166, 166,
19069 + 50, 166, 166, 166, 166, 104, 166, 77, 166, 166,
19070 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
19071 - 76, 164, 164, 164, 164, 164, 164, 164, 164, 76,
19072 - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
19073 - 162, 162, 162, 162, 162, 162, 162, 166, 166, 166,
19074 - 166, 166, 166, 166, 106, 107, 166, 166, 166, 72,
19075 - 166, 166, 166, 166, 166, 164, 164, 164, 106, 107,
19076 - 164, 164, 164, 164, 162, 162, 162, 162, 162, 162,
19078 - 162, 106, 107, 162, 162, 162, 72, 162, 162, 162,
19079 - 162, 162, 166, 166, 166, 166, 166, 166, 96, 86,
19080 - 166, 166, 166, 166, 166, 166, 166, 164, 164, 96,
19081 - 164, 164, 164, 164, 162, 162, 162, 162, 162, 162,
19082 - 96, 86, 162, 162, 162, 162, 162, 162, 162, 79,
19083 - 166, 166, 120, 166, 166, 166, 166, 166, 166, 166,
19084 - 98, 166, 164, 120, 164, 164, 164, 164, 79, 162,
19085 - 162, 120, 162, 162, 162, 162, 162, 162, 162, 98,
19086 - 162, 166, 166, 166, 166, 85, 166, 68, 166, 166,
19087 - 166, 164, 164, 68, 164, 164, 162, 162, 162, 162,
19089 - 85, 162, 68, 162, 162, 162, 166, 166, 166, 166,
19090 - 166, 166, 118, 67, 166, 66, 164, 164, 164, 118,
19091 - 67, 66, 162, 162, 162, 162, 162, 162, 118, 67,
19092 - 162, 66, 166, 166, 166, 166, 166, 166, 166, 164,
19093 - 164, 164, 162, 162, 162, 162, 162, 162, 162, 166,
19094 - 166, 56, 166, 166, 166, 166, 164, 56, 164, 162,
19095 - 162, 56, 162, 162, 162, 162, 166, 166, 166, 166,
19096 - 166, 99, 164, 164, 162, 162, 162, 162, 162, 99,
19097 - 166, 54, 166, 166, 166, 54, 164, 162, 54, 162,
19098 - 162, 162, 166, 166, 166, 166, 164, 162, 162, 162,
19100 - 162, 166, 166, 166, 166, 164, 162, 162, 162, 162,
19101 - 78, 166, 166, 166, 164, 78, 162, 162, 162, 55,
19102 - 166, 166, 55, 55, 162, 162, 80, 166, 80, 162,
19103 - 166, 162, 81, 81, 0
19105 + 166, 166, 166, 164, 53, 164, 164, 50, 164, 164,
19106 + 164, 164, 164, 104, 65, 164, 164, 91, 164, 77,
19107 + 164, 164, 76, 164, 164, 164, 164, 164, 164, 164,
19108 + 164, 164, 164, 164, 116, 164, 164, 164, 164, 95,
19109 + 164, 164, 164, 93, 164, 164, 164, 164, 164, 164,
19110 + 164, 163, 133, 130, 163, 163, 142, 142, 137, 163,
19111 + 141, 163, 163, 150, 147, 163, 163, 160, 160, 154,
19112 + 163, 159, 163, 176, 176, 174, 168, 168, 64, 168,
19113 + 168, 168, 168, 168, 168, 168, 66, 168, 168, 168,
19114 + 52, 168, 47, 168, 168, 103, 168, 48, 75, 168,
19116 + 168, 168, 168, 168, 72, 168, 168, 168, 168, 90,
19117 + 73, 168, 168, 168, 166, 166, 64, 166, 62, 166,
19118 + 166, 166, 166, 52, 166, 166, 166, 103, 166, 48,
19119 + 166, 166, 166, 72, 166, 166, 166, 166, 164, 164,
19120 + 64, 164, 62, 164, 164, 164, 164, 164, 164, 66,
19121 + 164, 164, 164, 52, 164, 47, 164, 164, 164, 103,
19122 + 164, 48, 75, 164, 164, 164, 164, 164, 72, 164,
19123 + 164, 164, 164, 90, 73, 164, 164, 164, 163, 163,
19124 + 66, 139, 136, 163, 163, 163, 158, 156, 153, 163,
19125 + 175, 173, 168, 59, 168, 168, 168, 168, 168, 79,
19127 + 168, 168, 115, 168, 168, 168, 97, 168, 168, 99,
19128 + 119, 168, 168, 168, 168, 168, 110, 86, 168, 49,
19129 + 168, 168, 166, 59, 166, 166, 166, 79, 166, 166,
19130 + 166, 166, 166, 107, 119, 166, 166, 110, 166, 166,
19131 + 166, 164, 59, 164, 164, 164, 164, 164, 79, 164,
19132 + 164, 115, 164, 164, 164, 164, 97, 164, 164, 99,
19133 + 119, 164, 164, 164, 164, 164, 110, 86, 164, 49,
19134 + 164, 164, 163, 163, 163, 163, 163, 163, 144, 168,
19135 + 123, 168, 168, 168, 168, 168, 168, 58, 168, 168,
19136 + 168, 168, 168, 168, 84, 168, 168, 168, 118, 162,
19138 + 168, 144, 166, 123, 166, 166, 58, 166, 166, 166,
19139 + 166, 166, 166, 118, 162, 166, 144, 164, 123, 164,
19140 + 164, 164, 164, 164, 164, 58, 164, 164, 164, 164,
19141 + 164, 164, 164, 84, 164, 164, 164, 118, 162, 164,
19142 + 144, 129, 134, 162, 146, 151, 78, 168, 168, 168,
19143 + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
19144 + 168, 168, 168, 168, 78, 166, 166, 63, 166, 166,
19145 + 166, 166, 166, 166, 78, 164, 164, 164, 164, 164,
19146 + 164, 63, 164, 164, 164, 164, 164, 164, 164, 164,
19147 + 164, 164, 164, 168, 168, 168, 168, 168, 168, 168,
19149 + 108, 109, 168, 168, 168, 74, 168, 168, 168, 168,
19150 + 168, 166, 166, 166, 108, 109, 166, 166, 166, 166,
19151 + 164, 164, 164, 164, 164, 164, 164, 108, 109, 164,
19152 + 164, 164, 74, 164, 164, 164, 164, 164, 168, 168,
19153 + 168, 168, 168, 168, 98, 88, 168, 168, 168, 168,
19154 + 168, 168, 168, 166, 166, 98, 166, 166, 166, 166,
19155 + 164, 164, 164, 164, 164, 164, 98, 88, 164, 164,
19156 + 164, 164, 164, 164, 164, 81, 168, 168, 122, 168,
19157 + 168, 168, 168, 168, 168, 168, 100, 168, 166, 122,
19158 + 166, 166, 166, 166, 81, 164, 164, 122, 164, 164,
19160 + 164, 164, 164, 164, 164, 100, 164, 168, 168, 168,
19161 + 168, 87, 168, 70, 168, 168, 168, 166, 166, 70,
19162 + 166, 166, 164, 164, 164, 164, 87, 164, 70, 164,
19163 + 164, 164, 168, 168, 168, 168, 168, 168, 120, 69,
19164 + 168, 68, 166, 166, 166, 120, 69, 68, 164, 164,
19165 + 164, 164, 164, 164, 120, 69, 164, 68, 168, 168,
19166 + 168, 168, 168, 168, 168, 166, 166, 166, 164, 164,
19167 + 164, 164, 164, 164, 164, 168, 168, 56, 168, 168,
19168 + 168, 168, 166, 56, 166, 164, 164, 56, 164, 164,
19169 + 164, 164, 168, 168, 168, 168, 168, 101, 166, 166,
19171 + 164, 164, 164, 164, 164, 101, 168, 54, 168, 168,
19172 + 168, 54, 166, 164, 54, 164, 164, 164, 168, 168,
19173 + 168, 168, 166, 164, 164, 164, 164, 168, 168, 168,
19174 + 168, 166, 164, 164, 164, 164, 80, 168, 168, 168,
19175 + 166, 80, 164, 164, 164, 55, 168, 168, 55, 55,
19176 + 164, 164, 82, 168, 82, 164, 168, 164, 83, 83,
19180 static yyconst flex_int32_t yy_ec[256] =
19181 @@ -551,16 +542,16 @@
19182 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
19183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
19184 1, 2, 4, 5, 6, 7, 8, 9, 1, 10,
19185 - 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
19186 - 19, 19, 19, 19, 19, 19, 19, 20, 21, 22,
19187 - 23, 24, 25, 1, 26, 27, 28, 29, 30, 31,
19188 - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
19189 - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
19190 - 52, 53, 54, 55, 56, 1, 57, 58, 59, 60,
19192 - 61, 62, 63, 64, 65, 16, 66, 67, 68, 69,
19193 - 70, 71, 16, 72, 73, 74, 75, 16, 16, 76,
19194 - 16, 77, 78, 79, 80, 81, 1, 1, 1, 1,
19195 + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
19196 + 19, 19, 19, 19, 19, 19, 19, 21, 22, 23,
19197 + 24, 25, 26, 1, 27, 28, 29, 30, 31, 32,
19198 + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
19199 + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
19200 + 53, 54, 55, 56, 57, 1, 58, 59, 60, 61,
19202 + 62, 63, 64, 65, 66, 16, 67, 68, 69, 70,
19203 + 71, 72, 16, 73, 74, 75, 76, 16, 16, 77,
19204 + 16, 78, 79, 80, 81, 82, 1, 1, 1, 1,
19205 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
19206 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
19207 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
19208 @@ -577,657 +568,670 @@
19209 1, 1, 1, 1, 1
19212 -static yyconst flex_int32_t yy_meta[82] =
19213 +static yyconst flex_int32_t yy_meta[83] =
19214 { 0,
19215 1, 1, 2, 3, 1, 1, 4, 1, 1, 1,
19216 - 1, 5, 6, 7, 8, 9, 10, 11, 11, 8,
19217 - 1, 1, 7, 1, 5, 11, 11, 11, 11, 11,
19218 - 11, 9, 9, 9, 9, 9, 9, 9, 9, 9,
19219 - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
19220 - 9, 8, 4, 8, 3, 9, 11, 11, 11, 11,
19221 + 1, 5, 6, 7, 8, 9, 10, 11, 11, 11,
19222 + 8, 1, 1, 7, 1, 5, 11, 11, 11, 11,
19223 11, 11, 9, 9, 9, 9, 9, 9, 9, 9,
19224 - 9, 9, 9, 9, 9, 9, 9, 1, 1, 1,
19225 - 10
19226 + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
19227 + 9, 9, 8, 4, 8, 3, 9, 11, 11, 11,
19228 + 11, 11, 11, 9, 9, 9, 9, 9, 9, 9,
19229 + 9, 9, 9, 9, 9, 9, 9, 9, 1, 1,
19230 + 1, 10
19233 -static yyconst flex_int16_t yy_base[1560] =
19234 +static yyconst flex_int16_t yy_base[1586] =
19235 { 0,
19236 - 0, 0, 0, 0, 81, 0, 162, 0, 243, 323,
19237 - 403, 0, 271, 273, 484, 565, 646, 727, 2496, 2497,
19238 - 2497, 2493, 2497, 2471, 2488, 791, 2497, 260, 2497, 2497,
19239 - 2469, 2468, 0, 2467, 0, 247, 321, 492, 0, 2497,
19240 - 249, 2466, 257, 0, 255, 252, 251, 275, 254, 270,
19241 - 2445, 2450, 2447, 2455, 266, 282, 320, 270, 319, 2438,
19242 - 350, 2457, 2452, 0, 0, 2423, 2419, 2407, 2413, 2497,
19243 - 288, 2497, 0, 2497, 2475, 2453, 2470, 836, 2497, 345,
19244 - 2497, 2497, 2451, 2450, 2497, 291, 0, 341, 881, 211,
19245 - 2497, 2497, 333, 2449, 342, 2497, 940, 487, 506, 565,
19247 - 577, 571, 2428, 2431, 2439, 331, 347, 339, 476, 2425,
19248 - 352, 2497, 2497, 644, 2402, 2497, 295, 2497, 0, 999,
19249 - 477, 0, 376, 735, 747, 596, 492, 477, 515, 473,
19250 - 515, 2423, 2428, 2425, 2433, 517, 567, 573, 585, 594,
19251 - 2416, 645, 2435, 2430, 2401, 2397, 2385, 2391, 0, 1044,
19252 - 2497, 2497, 0, 2497, 2497, 2452, 1089, 2431, 2430, 2497,
19253 - 2429, 0, 2428, 0, 442, 2497, 0, 2427, 2497, 1134,
19254 - 635, 666, 602, 657, 671, 500, 2423, 2405, 2401, 551,
19255 - 2403, 2497, 2497, 685, 677, 732, 694, 730, 250, 2388,
19256 - 2372, 2368, 302, 2370, 0, 2439, 2497, 0, 2428, 2497,
19258 - 0, 2497, 2497, 2497, 2419, 536, 505, 541, 2497, 2497,
19259 - 2436, 2497, 2432, 2497, 0, 1193, 2497, 2497, 0, 0,
19260 - 0, 0, 0, 757, 0, 736, 2413, 2497, 0, 2497,
19261 - 2412, 2390, 2404, 2398, 586, 0, 2392, 2390, 2384, 566,
19262 - 2398, 2382, 2395, 2395, 2379, 608, 2386, 2382, 2378, 2380,
19263 - 2382, 727, 2388, 2378, 346, 2375, 2377, 2365, 646, 2376,
19264 - 2378, 2366, 2380, 2380, 2368, 2381, 691, 2366, 2354, 2361,
19265 - 2373, 2356, 2375, 2373, 2355, 2355, 2354, 2323, 2326, 2331,
19266 - 2316, 2497, 2497, 0, 1244, 2497, 2497, 2497, 0, 2497,
19267 - 2497, 478, 808, 0, 2497, 2497, 0, 2497, 787, 841,
19269 - 844, 0, 2358, 594, 0, 889, 2352, 2350, 641, 917,
19270 - 976, 2359, 2360, 2347, 2355, 2355, 2345, 2357, 2333, 2342,
19271 - 2331, 673, 2342, 2344, 2347, 2336, 2343, 2323, 2343, 2345,
19272 - 949, 2294, 0, 1295, 0, 0, 884, 0, 2326, 2340,
19273 - 2334, 735, 0, 2328, 2326, 2320, 677, 2334, 2318, 2331,
19274 - 2331, 2315, 711, 2322, 2318, 2314, 2316, 2318, 802, 2324,
19275 - 2314, 738, 656, 2314, 2312, 2301, 750, 2312, 2314, 2302,
19276 - 2316, 2316, 2304, 2317, 754, 2302, 2290, 2297, 2309, 2292,
19277 - 2311, 2309, 2291, 2291, 2290, 2259, 2262, 2267, 2252, 0,
19278 - 1346, 2325, 2497, 0, 1397, 0, 0, 0, 801, 888,
19280 - 802, 0, 2293, 928, 937, 2292, 2296, 2279, 2280, 2278,
19281 - 2295, 2282, 2290, 2291, 2289, 2290, 2269, 810, 2249, 832,
19282 - 850, 2248, 2252, 2237, 2238, 2236, 2251, 2239, 2246, 2247,
19283 - 2245, 2246, 2227, 2299, 0, 0, 2280, 2279, 816, 722,
19284 - 656, 2497, 2497, 2258, 2254, 2264, 2265, 2255, 2264, 2264,
19285 - 2261, 2246, 2239, 2262, 2261, 2252, 2257, 2241, 2246, 2252,
19286 - 2244, 2254, 2251, 2232, 0, 2240, 2236, 2241, 2228, 2232,
19287 - 2240, 2242, 2238, 0, 2229, 2223, 2224, 2229, 2225, 2214,
19288 - 2231, 2221, 2218, 2217, 2212, 2229, 2214, 2211, 2217, 2211,
19289 - 2223, 2207, 2223, 2224, 2206, 2222, 2210, 2214, 2201, 2174,
19291 - 0, 0, 2182, 0, 0, 970, 2202, 1004, 2209, 2210,
19292 - 2200, 2209, 2209, 2192, 2185, 2208, 1008, 2205, 2195, 2185,
19293 - 2190, 2188, 2196, 2198, 0, 0, 2181, 2182, 2184, 2173,
19294 - 2190, 2178, 2173, 2181, 2188, 2189, 2190, 2145, 2153, 0,
19295 - 0, 2173, 2169, 2179, 2180, 2170, 2179, 2179, 2176, 2161,
19296 - 2154, 2177, 2176, 2167, 2172, 2156, 2161, 2167, 2159, 2169,
19297 - 2166, 2147, 0, 2155, 2151, 2156, 2143, 2147, 2155, 2157,
19298 - 2153, 0, 0, 2144, 0, 2138, 2139, 2144, 2140, 2129,
19299 - 2146, 2136, 2133, 2132, 2127, 2144, 2129, 2126, 2132, 2126,
19300 - 2138, 2122, 2138, 2139, 2121, 2137, 2125, 2129, 2116, 2089,
19302 - 0, 0, 2097, 0, 0, 2117, 808, 2126, 2125, 2113,
19303 - 0, 2123, 2114, 2106, 2121, 2119, 2118, 2110, 2101, 2102,
19304 - 2105, 2073, 872, 2081, 2080, 2069, 0, 2078, 2070, 2063,
19305 - 2076, 2074, 2073, 2066, 2058, 2059, 2061, 700, 821, 742,
19306 - 2092, 0, 2089, 2084, 2096, 0, 2089, 0, 2079, 0,
19307 - 2078, 2066, 2082, 2075, 2069, 2072, 2074, 0, 2071, 2085,
19308 - 2073, 2067, 0, 2085, 2066, 0, 2065, 2083, 0, 2065,
19309 - 0, 2067, 2066, 2079, 2048, 2069, 2056, 2064, 2056, 2065,
19310 - 0, 2070, 2063, 2066, 2050, 2054, 2037, 2058, 2062, 2045,
19311 - 2052, 2054, 2057, 2052, 2018, 2014, 2046, 0, 2043, 2038,
19313 - 2050, 0, 2043, 2033, 0, 2021, 2037, 2030, 2028, 2032,
19314 - 0, 0, 2027, 2045, 0, 2030, 2043, 2012, 2033, 2029,
19315 - 2031, 2034, 2023, 2028, 2024, 1993, 1989, 2021, 0, 2018,
19316 - 2013, 2025, 0, 2018, 0, 2008, 0, 2007, 1995, 2011,
19317 - 2004, 1998, 2001, 2003, 0, 2000, 2014, 2002, 1996, 0,
19318 - 2014, 1995, 0, 1994, 2012, 0, 1994, 0, 1996, 1995,
19319 - 2008, 1977, 1998, 1985, 1993, 1985, 1994, 0, 1999, 1992,
19320 - 1995, 1979, 1983, 1966, 1987, 1991, 1965, 1962, 1954, 1947,
19321 - 1935, 1896, 1891, 1921, 1911, 1915, 0, 0, 0, 1906,
19322 - 1912, 1465, 0, 0, 1884, 1882, 0, 1865, 1880, 1825,
19324 - 1818, 1821, 0, 0, 0, 1817, 1824, 1545, 0, 0,
19325 - 1803, 213, 0, 211, 335, 841, 825, 860, 467, 508,
19326 - 508, 569, 0, 832, 604, 591, 628, 0, 0, 671,
19327 - 758, 0, 742, 0, 783, 808, 0, 823, 831, 822,
19328 - 847, 866, 872, 870, 867, 879, 902, 0, 902, 903,
19329 - 897, 909, 0, 922, 929, 934, 0, 917, 941, 952,
19330 - 937, 943, 912, 926, 944, 951, 947, 965, 0, 970,
19331 - 965, 981, 0, 983, 0, 981, 986, 975, 994, 990,
19332 - 993, 1008, 1010, 1001, 1012, 1018, 1012, 975, 989, 1008,
19333 - 1015, 1019, 1035, 0, 1040, 1037, 1024, 1039, 0, 0,
19335 - 1047, 1038, 0, 1022, 0, 1050, 1046, 0, 1048, 1053,
19336 - 1034, 1041, 1060, 1058, 1054, 1050, 1045, 1065, 0, 1063,
19337 - 1060, 1054, 1056, 0, 1065, 1070, 1072, 0, 1053, 1066,
19338 - 1082, 1065, 1071, 1037, 1051, 1068, 0, 1083, 1083, 1078,
19339 - 0, 1625, 0, 1096, 0, 1099, 1051, 0, 1059, 1059,
19340 - 1055, 0, 1705, 0, 1071, 0, 1074, 1112, 1113, 1114,
19341 - 1090, 1105, 0, 1108, 1099, 1093, 1084, 1111, 1113, 1113,
19342 - 0, 1116, 1115, 1109, 0, 1126, 0, 1112, 1112, 0,
19343 - 1127, 0, 1103, 1116, 1138, 1113, 1131, 1127, 1117, 1125,
19344 - 1139, 1136, 1146, 0, 0, 1140, 1108, 1128, 1140, 1155,
19346 - 0, 1158, 1149, 1159, 1161, 1167, 0, 1170, 1156, 0,
19347 - 1170, 0, 1152, 1173, 1160, 1150, 1170, 1176, 1135, 1157,
19348 - 1169, 1184, 0, 1187, 1178, 1172, 1169, 1196, 1198, 1198,
19349 - 0, 1202, 1202, 1188, 0, 1205, 0, 1191, 1191, 0,
19350 - 1206, 0, 1182, 1189, 1210, 1185, 1203, 1198, 1188, 1195,
19351 - 1209, 1206, 1216, 0, 0, 1210, 1182, 1201, 1213, 1220,
19352 - 0, 0, 0, 1219, 1191, 1196, 0, 0, 0, 1193,
19353 - 1248, 1249, 1246, 0, 1247, 1233, 1251, 1241, 1251, 0,
19354 - 1228, 1245, 0, 1230, 1244, 1245, 0, 1233, 1264, 0,
19355 - 1235, 1263, 1249, 1238, 1263, 1241, 0, 0, 1259, 0,
19357 - 1238, 1236, 1277, 0, 1278, 1264, 1279, 0, 1259, 1273,
19358 - 1274, 1262, 0, 1263, 1264, 1294, 0, 1289, 1268, 1266,
19359 - 1302, 0, 1304, 1290, 1308, 1297, 1306, 0, 1283, 1300,
19360 - 0, 1285, 1299, 1300, 0, 1288, 1319, 0, 1290, 1318,
19361 - 1304, 1293, 1318, 1302, 0, 0, 1320, 0, 1299, 1298,
19362 - 1336, 1338, 1338, 1308, 1310, 1310, 0, 1349, 0, 1334,
19363 - 1353, 1343, 1352, 1347, 1358, 0, 1357, 1345, 1346, 1350,
19364 - 1358, 1358, 0, 1349, 1364, 1370, 0, 0, 1334, 0,
19365 - 1368, 0, 1360, 1368, 0, 1370, 1358, 1369, 1366, 1381,
19366 - 0, 0, 1352, 0, 1388, 0, 1373, 1392, 1382, 1390,
19368 - 1384, 1401, 0, 1400, 1388, 1389, 1394, 1403, 1403, 0,
19369 - 1394, 1409, 1414, 0, 0, 1380, 0, 0, 0, 0,
19370 - 0, 0, 0, 1402, 1408, 1414, 1411, 1408, 1407, 1417,
19371 - 1412, 1421, 1407, 1417, 1418, 1417, 1438, 1431, 1446, 1421,
19372 - 0, 1450, 1447, 1451, 1443, 1450, 1440, 1466, 1436, 0,
19373 - 1454, 1460, 1466, 1463, 1460, 1459, 1469, 1461, 1474, 1460,
19374 - 1470, 1462, 1461, 1481, 1471, 1484, 1454, 1469, 1483, 1475,
19375 - 1478, 1476, 1479, 1474, 0, 0, 1486, 1483, 1493, 0,
19376 - 1497, 1495, 1491, 1488, 1467, 1489, 1492, 1486, 0, 0,
19377 - 1502, 1506, 1504, 1474, 1492, 1506, 1498, 1501, 1499, 1502,
19379 - 1497, 0, 0, 1509, 1510, 1523, 0, 1532, 1531, 1527,
19380 - 1524, 1503, 1520, 1537, 1526, 1542, 1534, 1536, 0, 0,
19381 - 1549, 1547, 1534, 1548, 1547, 1550, 1520, 1537, 1553, 0,
19382 - 1555, 1542, 1556, 1526, 1544, 1561, 1545, 1561, 1553, 1555,
19383 - 0, 0, 1568, 1566, 1553, 1567, 1566, 1569, 1540, 0,
19384 - 1557, 1547, 0, 1548, 1565, 1561, 1577, 1563, 1566, 1571,
19385 - 0, 1539, 1556, 0, 1583, 1569, 1572, 1544, 0, 1572,
19386 - 1562, 0, 1563, 1580, 1576, 1592, 1583, 1589, 1599, 0,
19387 - 1568, 1585, 1625, 1616, 1604, 0, 1605, 0, 1601, 1614,
19388 - 1580, 1628, 1617, 0, 1613, 1586, 1604, 1635, 1636, 1624,
19390 - 0, 1625, 0, 1622, 1629, 1596, 1626, 1635, 1634, 1644,
19391 - 1638, 1620, 0, 0, 1647, 0, 1642, 1642, 1652, 0,
19392 - 0, 0, 1639, 1647, 1646, 1656, 1650, 1632, 0, 0,
19393 - 1659, 0, 1640, 1657, 1663, 1656, 1657, 1669, 1657, 1663,
19394 - 1669, 1662, 1650, 1667, 1673, 1671, 1675, 1692, 1681, 1683,
19395 - 1690, 0, 1680, 1684, 1688, 1686, 1700, 0, 1690, 1696,
19396 - 1703, 0, 1693, 1697, 1701, 1694, 1713, 1702, 1702, 1715,
19397 - 1707, 0, 1706, 1706, 1720, 1709, 1709, 1722, 1714, 0,
19398 - 1712, 0, 1697, 1728, 1715, 0, 1700, 1717, 0, 1702,
19399 - 1733, 1721, 1725, 1733, 1719, 1737, 1736, 1730, 1738, 1724,
19401 - 1742, 1727, 1733, 1739, 1748, 1736, 1732, 1738, 1744, 1753,
19402 - 0, 1751, 1741, 1737, 1757, 0, 1758, 1748, 1744, 0,
19403 - 1751, 1757, 0, 0, 1753, 1759, 0, 1754, 0, 1755,
19404 - 1757, 1758, 0, 0, 2497, 1797, 1808, 1819, 1830, 1841,
19405 - 1852, 1860, 1868, 1876, 1884, 1895, 1903, 1914, 1925, 1936,
19406 - 1939, 1948, 1956, 1862, 1964, 1975, 1986, 1997, 2008
19407 + 0, 0, 0, 0, 82, 0, 164, 0, 246, 327,
19408 + 408, 0, 275, 277, 490, 572, 654, 736, 2557, 2558,
19409 + 2558, 2554, 2558, 2531, 2549, 801, 2558, 264, 2558, 2558,
19410 + 2529, 2528, 0, 2527, 0, 250, 581, 499, 0, 2558,
19411 + 252, 2526, 260, 0, 259, 255, 254, 255, 263, 273,
19412 + 2505, 2510, 2507, 2515, 276, 285, 278, 315, 276, 2498,
19413 + 326, 2517, 2512, 0, 0, 2483, 2479, 2467, 2473, 2558,
19414 + 291, 2558, 0, 2558, 2536, 2513, 2531, 847, 2558, 334,
19415 + 2558, 2558, 2511, 2510, 2558, 297, 0, 352, 893, 241,
19416 + 2558, 2558, 299, 2509, 350, 2558, 953, 351, 357, 494,
19418 + 503, 576, 2488, 2491, 2499, 353, 343, 496, 486, 2485,
19419 + 516, 2558, 2558, 652, 2462, 2558, 320, 2558, 0, 1013,
19420 + 482, 0, 380, 745, 757, 655, 572, 511, 534, 351,
19421 + 519, 2483, 2488, 2485, 2493, 571, 578, 588, 590, 598,
19422 + 2476, 661, 2495, 2490, 2461, 2457, 2445, 2451, 0, 1059,
19423 + 2558, 2558, 0, 2558, 2558, 2513, 1105, 2491, 2490, 2558,
19424 + 2489, 0, 2488, 0, 316, 2558, 0, 2487, 2558, 1151,
19425 + 608, 686, 605, 677, 653, 364, 2483, 2465, 2461, 489,
19426 + 2463, 2558, 2558, 724, 611, 661, 702, 740, 493, 2448,
19427 + 2432, 2428, 541, 2430, 0, 2500, 2558, 0, 2489, 2558,
19429 + 0, 2558, 2558, 2558, 2479, 567, 619, 546, 2558, 2558,
19430 + 2497, 2558, 2493, 2558, 0, 1211, 2558, 2558, 0, 0,
19431 + 0, 0, 0, 768, 0, 730, 2473, 2558, 0, 2558,
19432 + 2472, 2450, 2464, 2458, 664, 0, 2452, 2450, 2444, 605,
19433 + 2458, 2442, 2455, 2455, 2439, 595, 2446, 2442, 2438, 2440,
19434 + 2442, 807, 2448, 2438, 683, 2435, 2437, 2425, 742, 2436,
19435 + 2438, 2426, 2440, 2440, 2428, 2441, 811, 2426, 2414, 2421,
19436 + 2433, 2416, 2435, 2433, 2415, 2415, 2414, 2383, 2386, 2391,
19437 + 2376, 2558, 2558, 0, 1263, 2558, 2558, 2558, 0, 2558,
19438 + 2558, 479, 864, 0, 2558, 2558, 0, 2558, 763, 842,
19440 + 929, 0, 2418, 686, 0, 962, 2412, 2410, 991, 644,
19441 + 1018, 1021, 2419, 2420, 2407, 2415, 2415, 2405, 2417, 2393,
19442 + 2402, 2412, 2390, 632, 2401, 2403, 2406, 2395, 2402, 2382,
19443 + 2402, 2404, 1024, 2353, 0, 1315, 0, 0, 878, 0,
19444 + 2385, 2399, 2393, 728, 0, 2387, 2385, 2379, 2389, 783,
19445 + 2392, 2376, 2389, 2389, 2373, 760, 2380, 2376, 2372, 2374,
19446 + 2376, 813, 2382, 2372, 763, 760, 2372, 2370, 2380, 2358,
19447 + 814, 2369, 2371, 2359, 2373, 2373, 2361, 2374, 821, 2359,
19448 + 2347, 2354, 2366, 2349, 2368, 2366, 2348, 2348, 2347, 2316,
19449 + 2319, 2324, 2309, 0, 1367, 2383, 2558, 0, 1419, 0,
19451 + 0, 0, 830, 857, 843, 0, 2350, 890, 891, 2349,
19452 + 2353, 2336, 2337, 2335, 2352, 2339, 2347, 2348, 2346, 2347,
19453 + 2326, 866, 2306, 948, 951, 2305, 2309, 2294, 2295, 2293,
19454 + 2308, 2296, 2303, 2304, 2302, 2303, 2284, 2357, 0, 0,
19455 + 2337, 2336, 869, 868, 813, 2558, 2558, 2315, 2311, 2321,
19456 + 2322, 2312, 2321, 2321, 2318, 2303, 2296, 2319, 2318, 2309,
19457 + 2314, 2298, 2303, 2309, 2301, 2311, 2308, 2289, 0, 2297,
19458 + 2293, 2298, 2285, 2289, 2297, 2299, 2295, 0, 2286, 2280,
19459 + 2281, 2286, 2282, 2271, 2288, 2278, 2275, 2274, 2269, 2286,
19460 + 2271, 2268, 2274, 2268, 2280, 2264, 2280, 2281, 2263, 2279,
19462 + 2267, 2271, 2258, 2231, 0, 0, 2239, 0, 0, 926,
19463 + 2259, 1055, 2266, 2267, 2257, 2266, 2266, 2256, 2248, 2241,
19464 + 2264, 1067, 2261, 2251, 2241, 2246, 2244, 2252, 2254, 0,
19465 + 0, 2245, 2236, 2237, 2239, 2228, 2245, 2233, 2228, 2236,
19466 + 2243, 2244, 2245, 2200, 2208, 0, 0, 2228, 2224, 2234,
19467 + 2235, 2225, 2234, 2234, 2231, 2223, 2215, 2208, 2231, 2230,
19468 + 2221, 2226, 2210, 2215, 2221, 2213, 2223, 2220, 2201, 0,
19469 + 2209, 2205, 2210, 2197, 2201, 2209, 2211, 2207, 0, 0,
19470 + 2198, 0, 2200, 2191, 2192, 2197, 2193, 2182, 2199, 2189,
19471 + 2186, 2185, 2180, 2197, 2182, 2179, 2185, 2179, 2191, 2175,
19473 + 2191, 2192, 2174, 2190, 2178, 2182, 2169, 2142, 0, 0,
19474 + 2150, 0, 0, 2170, 824, 2179, 2178, 2166, 0, 2176,
19475 + 2167, 2159, 2174, 2172, 2171, 2163, 2154, 2155, 2158, 2126,
19476 + 828, 2134, 2133, 2122, 0, 2131, 2123, 2116, 2129, 2127,
19477 + 2126, 2119, 2111, 2112, 2114, 667, 707, 835, 2145, 0,
19478 + 2142, 2137, 2149, 0, 2142, 0, 2132, 0, 2131, 2119,
19479 + 2135, 2128, 2122, 2125, 2127, 0, 2124, 2138, 2126, 2120,
19480 + 0, 2138, 2119, 0, 2118, 2136, 0, 2118, 0, 2120,
19481 + 2119, 2132, 2101, 2122, 2109, 2117, 2109, 2118, 0, 2123,
19482 + 2116, 2119, 2103, 2107, 2090, 2111, 2115, 2098, 2105, 2107,
19484 + 2110, 2105, 2071, 2067, 2099, 0, 2096, 2091, 2103, 0,
19485 + 2096, 2090, 2085, 0, 2073, 2089, 2082, 2080, 2084, 0,
19486 + 0, 2079, 2097, 2066, 0, 2081, 2094, 2063, 2084, 2080,
19487 + 2082, 2085, 2074, 2079, 2075, 2044, 2040, 2072, 0, 2069,
19488 + 2064, 2076, 0, 2069, 0, 2063, 2058, 0, 2057, 2045,
19489 + 2061, 2054, 2048, 2051, 2053, 0, 2050, 2064, 2052, 2046,
19490 + 0, 2064, 2045, 0, 2044, 2062, 0, 2044, 2030, 0,
19491 + 2045, 2044, 2057, 2026, 2047, 2034, 2033, 2015, 2014, 0,
19492 + 2009, 1995, 1993, 1976, 1978, 1959, 1980, 1980, 1953, 1950,
19493 + 1942, 1940, 1934, 1885, 1881, 1913, 1905, 1902, 0, 0,
19495 + 0, 1892, 236, 1488, 0, 0, 252, 289, 0, 344,
19496 + 468, 460, 488, 538, 0, 0, 0, 538, 608, 1569,
19497 + 0, 0, 633, 659, 0, 657, 688, 895, 879, 870,
19498 + 704, 729, 735, 782, 0, 922, 796, 808, 838, 0,
19499 + 0, 869, 886, 0, 885, 0, 916, 913, 0, 916,
19500 + 931, 918, 932, 951, 958, 961, 957, 955, 975, 0,
19501 + 974, 971, 965, 969, 0, 978, 989, 993, 0, 976,
19502 + 992, 1000, 988, 994, 962, 976, 1000, 1009, 1009, 1026,
19503 + 0, 1038, 1033, 1016, 1034, 0, 1038, 0, 1046, 1051,
19504 + 1043, 1039, 1062, 1059, 1056, 1076, 1074, 1066, 1075, 1081,
19506 + 1074, 1034, 1048, 1067, 1074, 1070, 1095, 0, 1107, 1101,
19507 + 1098, 1085, 1100, 0, 0, 1108, 1099, 0, 1083, 0,
19508 + 1111, 1107, 0, 1109, 1114, 1095, 1108, 1103, 1122, 1120,
19509 + 1116, 1112, 1107, 1127, 0, 1125, 1122, 1116, 1118, 0,
19510 + 1127, 1132, 1134, 0, 1115, 1137, 1145, 1128, 1134, 1100,
19511 + 1114, 1137, 0, 1147, 1147, 1142, 0, 1650, 0, 1161,
19512 + 0, 1164, 1117, 0, 1125, 1125, 1121, 0, 1731, 0,
19513 + 1137, 0, 1140, 1179, 1178, 1181, 1157, 1172, 0, 1175,
19514 + 1166, 1160, 1151, 1184, 1187, 1187, 0, 1190, 1189, 1175,
19515 + 0, 1193, 0, 1179, 1179, 0, 1194, 0, 1170, 1181,
19517 + 1202, 1177, 1195, 1190, 1180, 1193, 1207, 1205, 1218, 0,
19518 + 0, 1212, 1178, 1197, 1209, 1224, 0, 1227, 0, 1218,
19519 + 1228, 1230, 1230, 0, 1232, 1236, 1219, 0, 1233, 0,
19520 + 1215, 1236, 1222, 1218, 1238, 1244, 1204, 1227, 1239, 1254,
19521 + 0, 1257, 0, 1248, 1242, 1239, 1266, 1268, 1268, 0,
19522 + 1272, 1272, 1258, 0, 1275, 0, 1279, 1262, 1262, 0,
19523 + 1277, 0, 1253, 1260, 1281, 1256, 1274, 1269, 1259, 1266,
19524 + 1280, 1277, 1287, 0, 0, 1287, 1253, 1272, 1285, 1295,
19525 + 0, 0, 0, 1291, 1263, 1268, 0, 0, 0, 1265,
19526 + 1320, 1327, 1318, 0, 1319, 1305, 1324, 1314, 1323, 0,
19528 + 1300, 1317, 0, 1302, 1316, 1317, 0, 1305, 1336, 0,
19529 + 1307, 1335, 1321, 1310, 1335, 1313, 0, 0, 1331, 0,
19530 + 1310, 1314, 1349, 0, 1350, 1337, 1355, 0, 1332, 1346,
19531 + 1346, 1348, 1336, 0, 1343, 1344, 1368, 0, 1363, 1343,
19532 + 1342, 1377, 0, 1378, 1364, 1382, 1371, 1380, 0, 1357,
19533 + 1374, 0, 1359, 1373, 1373, 1375, 0, 1363, 1408, 0,
19534 + 1364, 1392, 1378, 1367, 1397, 1375, 0, 0, 1393, 0,
19535 + 1379, 1377, 1412, 1414, 1414, 1390, 1392, 1392, 0, 1425,
19536 + 0, 1411, 1431, 1421, 1429, 1423, 1434, 0, 1433, 1421,
19537 + 1422, 1426, 1434, 1434, 0, 1425, 1440, 1445, 0, 0,
19539 + 1411, 0, 1444, 0, 1436, 1444, 0, 1446, 1453, 1443,
19540 + 1457, 1450, 1470, 0, 0, 1441, 0, 1474, 0, 1459,
19541 + 1478, 1468, 1476, 1470, 1486, 0, 1479, 1486, 1474, 1475,
19542 + 1479, 1487, 1487, 0, 1478, 1493, 1498, 0, 0, 1464,
19543 + 0, 0, 0, 0, 0, 0, 0, 1486, 1492, 1498,
19544 + 1495, 1492, 1491, 1501, 1493, 1506, 1492, 1502, 1495, 1494,
19545 + 1514, 1505, 1518, 1488, 0, 1516, 1513, 0, 1517, 1509,
19546 + 1516, 1506, 1526, 1496, 0, 1514, 1520, 1526, 1524, 1521,
19547 + 1520, 0, 1530, 1523, 1534, 1521, 1531, 1532, 1536, 1557,
19548 + 1547, 1559, 1529, 1544, 1558, 1550, 1558, 1556, 1559, 1554,
19550 + 0, 0, 1566, 1562, 1572, 0, 1576, 1574, 1570, 1567,
19551 + 1546, 1568, 1571, 1565, 0, 0, 1581, 1585, 1583, 1553,
19552 + 1571, 1585, 1577, 1580, 1578, 1581, 1576, 0, 0, 1588,
19553 + 1584, 1594, 0, 1599, 1597, 1593, 1590, 1569, 1586, 1603,
19554 + 1587, 1603, 1595, 1597, 0, 0, 1610, 1608, 1595, 1609,
19555 + 1608, 1611, 1581, 1598, 1614, 0, 1616, 1603, 1622, 1595,
19556 + 1618, 1636, 1620, 1636, 1628, 1630, 0, 0, 1643, 1641,
19557 + 1633, 1647, 1646, 1649, 1619, 0, 1636, 1626, 0, 1627,
19558 + 1644, 1640, 1656, 1642, 1645, 1650, 0, 1618, 1635, 0,
19559 + 1662, 1648, 1651, 1623, 0, 1651, 1641, 0, 1642, 1659,
19561 + 1655, 1671, 1657, 1660, 1665, 0, 1634, 1651, 1682, 1683,
19562 + 1671, 0, 1672, 0, 1669, 1676, 1642, 1690, 1678, 0,
19563 + 1674, 1646, 1665, 1717, 1696, 1684, 0, 1685, 0, 1682,
19564 + 1689, 1664, 1701, 1709, 1709, 1719, 1713, 1695, 0, 0,
19565 + 1727, 0, 1721, 1720, 1731, 0, 0, 0, 1718, 1726,
19566 + 1725, 1735, 1729, 1711, 0, 0, 1738, 0, 1719, 1736,
19567 + 1742, 1735, 1736, 1748, 1736, 1742, 1748, 1741, 1729, 1746,
19568 + 1752, 1745, 1746, 1758, 1746, 1749, 1756, 0, 1746, 1750,
19569 + 1754, 1747, 1761, 0, 1751, 1757, 1764, 0, 1754, 1758,
19570 + 1762, 1755, 1774, 1763, 1763, 1776, 1768, 0, 1767, 1767,
19572 + 1781, 1773, 1773, 1786, 1778, 0, 1776, 0, 1761, 1792,
19573 + 1779, 0, 1764, 1781, 0, 1766, 1797, 1784, 1788, 1796,
19574 + 1782, 1800, 1799, 1793, 1801, 1787, 1805, 1790, 1796, 1802,
19575 + 1811, 1799, 1795, 1801, 1807, 1816, 0, 1814, 1804, 1800,
19576 + 1817, 0, 1818, 1808, 1804, 0, 1811, 1817, 0, 0,
19577 + 1813, 1819, 0, 1814, 0, 1815, 1817, 1818, 0, 0,
19578 + 2558, 1858, 1869, 1880, 1891, 1902, 1913, 1921, 1929, 1937,
19579 + 1945, 1956, 1964, 1975, 1986, 1997, 2000, 2009, 2017, 1923,
19580 + 2025, 2036, 2047, 2058, 2069
19583 -static yyconst flex_int16_t yy_def[1560] =
19584 +static yyconst flex_int16_t yy_def[1586] =
19585 { 0,
19586 - 1536, 1536, 1535, 3, 1535, 5, 1535, 7, 1537, 1537,
19587 - 1535, 11, 1538, 1538, 1539, 1539, 1540, 1540, 1535, 1535,
19588 - 1535, 1535, 1535, 1535, 1541, 1542, 1535, 1535, 1535, 1535,
19589 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1535,
19590 - 1535, 1542, 1535, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19591 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19592 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1535,
19593 - 1535, 1535, 1542, 1535, 1535, 1535, 1541, 1543, 1535, 1535,
19594 - 1535, 1535, 1535, 1535, 1535, 1535, 1543, 1543, 1535, 89,
19595 - 1535, 1535, 1535, 1535, 1535, 1535, 1543, 97, 97, 97,
19597 - 97, 97, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19598 - 1543, 1535, 1535, 97, 1543, 1535, 1535, 1535, 1543, 1544,
19599 - 1535, 1544, 1544, 1535, 1535, 1544, 1544, 1544, 1544, 1544,
19600 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19601 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1545,
19602 - 1535, 1535, 1545, 1535, 1535, 1546, 1547, 1548, 1535, 1535,
19603 - 1535, 1547, 1547, 89, 89, 1535, 1549, 1535, 1535, 1547,
19604 - 170, 170, 170, 170, 170, 1547, 1547, 1547, 1547, 1547,
19605 - 1547, 1535, 1535, 170, 170, 170, 170, 170, 1547, 1547,
19606 - 1547, 1547, 1547, 1547, 1547, 1535, 1535, 1550, 1535, 1535,
19608 - 1551, 1535, 1535, 1535, 1552, 1552, 1552, 1552, 1535, 1535,
19609 - 1535, 1535, 1541, 1535, 1542, 1542, 1535, 1535, 1542, 1542,
19610 - 1542, 1542, 1542, 1542, 1542, 216, 1535, 1535, 1542, 1535,
19611 - 1535, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19612 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19613 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19614 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19615 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19616 - 1542, 1535, 1535, 1543, 1543, 1535, 1535, 1535, 1553, 1535,
19617 - 1535, 89, 89, 293, 1535, 1535, 1554, 1535, 97, 97,
19619 - 97, 1543, 1543, 1543, 1543, 97, 1543, 1543, 1543, 97,
19620 - 97, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19621 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19622 - 97, 1543, 1544, 1544, 1555, 1544, 1535, 1554, 1544, 1544,
19623 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19624 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19625 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19626 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19627 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1545,
19628 - 1545, 1546, 1535, 1547, 1547, 1548, 1548, 1549, 170, 170,
19630 - 170, 1547, 1547, 170, 170, 1547, 1547, 1547, 1547, 1547,
19631 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 170, 1547, 170,
19632 - 170, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19633 - 1547, 1547, 1547, 1535, 1550, 1551, 1552, 1535, 1552, 1552,
19634 - 1552, 1535, 1535, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19635 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19636 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19637 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19638 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19639 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19641 - 1542, 1542, 1542, 1543, 1553, 1554, 1543, 97, 1543, 1543,
19642 - 1543, 1543, 1543, 1543, 1543, 1543, 97, 1543, 1543, 1543,
19643 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19644 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1544,
19645 - 1555, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19646 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19647 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19648 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19649 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19650 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19652 - 1544, 1544, 1544, 1545, 1547, 1547, 1547, 1547, 1547, 1547,
19653 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19654 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19655 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1552, 1552, 1552,
19656 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19657 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19658 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19659 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19660 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19661 - 1542, 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1543, 1543,
19663 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19664 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19665 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1544, 1544, 1544,
19666 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19667 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19668 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19669 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19670 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19671 - 1544, 1544, 1544, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19672 - 1547, 1556, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19674 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1557, 1547, 1547,
19675 - 1547, 1547, 1547, 1547, 1547, 1552, 1552, 1552, 1542, 1542,
19676 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19677 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19678 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19679 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19680 - 1542, 1542, 1542, 1542, 1543, 1543, 1543, 1543, 1543, 1543,
19681 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19682 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1544,
19683 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19685 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19686 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19687 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19688 - 1544, 1544, 1544, 1544, 1544, 1547, 1547, 1547, 1547, 1547,
19689 - 1558, 1556, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19690 - 1547, 1559, 1557, 1547, 1547, 1547, 1547, 1552, 1552, 1552,
19691 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19692 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19693 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19694 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1543, 1543,
19696 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19697 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19698 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19699 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19700 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19701 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1547, 1547,
19702 - 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547, 1547,
19703 - 1552, 1552, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19704 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19705 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19707 - 1542, 1542, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19708 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19709 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19710 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19711 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19712 - 1547, 1547, 1547, 1547, 1547, 1547, 1542, 1542, 1542, 1542,
19713 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19714 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1543,
19715 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543,
19716 - 1543, 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19718 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19719 - 1544, 1544, 1544, 1544, 1544, 1544, 1547, 1547, 1547, 1547,
19720 - 1547, 1547, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19721 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19722 - 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1543, 1544,
19723 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19724 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1542, 1542, 1542,
19725 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19726 - 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1543, 1543, 1543,
19727 - 1543, 1543, 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544,
19729 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19730 - 1544, 1544, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19731 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1543,
19732 - 1543, 1543, 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544,
19733 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1542,
19734 - 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19735 - 1542, 1542, 1543, 1543, 1543, 1543, 1543, 1543, 1544, 1544,
19736 - 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19737 - 1544, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
19738 - 1542, 1543, 1543, 1543, 1543, 1543, 1544, 1544, 1544, 1544,
19740 - 1544, 1544, 1544, 1544, 1544, 1544, 1542, 1542, 1542, 1542,
19741 - 1542, 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1543, 1543,
19742 - 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1544,
19743 - 1544, 1544, 1542, 1542, 1542, 1542, 1542, 1542, 1542, 1543,
19744 - 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544, 1544, 1542,
19745 - 1542, 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1543, 1544,
19746 - 1544, 1544, 1544, 1544, 1544, 1544, 1542, 1542, 1542, 1542,
19747 - 1542, 1542, 1543, 1543, 1544, 1544, 1544, 1544, 1544, 1544,
19748 - 1542, 1542, 1542, 1542, 1542, 1543, 1543, 1544, 1544, 1544,
19749 - 1544, 1544, 1542, 1542, 1542, 1542, 1543, 1544, 1544, 1544,
19751 - 1544, 1542, 1542, 1542, 1542, 1543, 1544, 1544, 1544, 1544,
19752 - 1542, 1542, 1542, 1542, 1543, 1544, 1544, 1544, 1544, 1542,
19753 - 1542, 1542, 1543, 1544, 1544, 1544, 1542, 1542, 1544, 1544,
19754 - 1542, 1544, 1542, 1544, 0, 1535, 1535, 1535, 1535, 1535,
19755 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
19756 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535
19757 + 1562, 1562, 1561, 3, 1561, 5, 1561, 7, 1563, 1563,
19758 + 1561, 11, 1564, 1564, 1565, 1565, 1566, 1566, 1561, 1561,
19759 + 1561, 1561, 1561, 1561, 1567, 1568, 1561, 1561, 1561, 1561,
19760 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1561,
19761 + 1561, 1568, 1561, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19762 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19763 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1561,
19764 + 1561, 1561, 1568, 1561, 1561, 1561, 1567, 1569, 1561, 1561,
19765 + 1561, 1561, 1561, 1561, 1561, 1561, 1569, 1569, 1561, 89,
19766 + 1561, 1561, 1561, 1561, 1561, 1561, 1569, 97, 97, 97,
19768 + 97, 97, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19769 + 1569, 1561, 1561, 97, 1569, 1561, 1561, 1561, 1569, 1570,
19770 + 1561, 1570, 1570, 1561, 1561, 1570, 1570, 1570, 1570, 1570,
19771 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19772 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1571,
19773 + 1561, 1561, 1571, 1561, 1561, 1572, 1573, 1574, 1561, 1561,
19774 + 1561, 1573, 1573, 89, 89, 1561, 1575, 1561, 1561, 1573,
19775 + 170, 170, 170, 170, 170, 1573, 1573, 1573, 1573, 1573,
19776 + 1573, 1561, 1561, 170, 170, 170, 170, 170, 1573, 1573,
19777 + 1573, 1573, 1573, 1573, 1573, 1561, 1561, 1576, 1561, 1561,
19779 + 1577, 1561, 1561, 1561, 1578, 1578, 1578, 1578, 1561, 1561,
19780 + 1561, 1561, 1567, 1561, 1568, 1568, 1561, 1561, 1568, 1568,
19781 + 1568, 1568, 1568, 1568, 1568, 216, 1561, 1561, 1568, 1561,
19782 + 1561, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19783 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19784 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19785 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19786 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19787 + 1568, 1561, 1561, 1569, 1569, 1561, 1561, 1561, 1579, 1561,
19788 + 1561, 89, 89, 293, 1561, 1561, 1580, 1561, 97, 97,
19790 + 97, 1569, 1569, 1569, 1569, 97, 1569, 1569, 97, 1569,
19791 + 97, 97, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19792 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19793 + 1569, 1569, 97, 1569, 1570, 1570, 1581, 1570, 1561, 1580,
19794 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19795 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19796 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19797 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19798 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19799 + 1570, 1570, 1570, 1571, 1571, 1572, 1561, 1573, 1573, 1574,
19801 + 1574, 1575, 170, 170, 170, 1573, 1573, 170, 170, 1573,
19802 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
19803 + 1573, 170, 1573, 170, 170, 1573, 1573, 1573, 1573, 1573,
19804 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1561, 1576, 1577,
19805 + 1578, 1561, 1578, 1578, 1578, 1561, 1561, 1568, 1568, 1568,
19806 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19807 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19808 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19809 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19810 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19812 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1569, 1579, 1580,
19813 + 1569, 97, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19814 + 1569, 97, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19815 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19816 + 1569, 1569, 1569, 1569, 1569, 1570, 1581, 1570, 1570, 1570,
19817 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19818 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19819 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19820 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19821 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19823 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19824 + 1570, 1571, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
19825 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
19826 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
19827 + 1573, 1573, 1573, 1573, 1573, 1578, 1578, 1578, 1568, 1568,
19828 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19829 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19830 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19831 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19832 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19834 + 1568, 1568, 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569,
19835 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19836 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19837 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1570, 1570, 1570,
19838 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19839 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19840 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19841 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19842 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19843 + 1570, 1570, 1570, 1570, 1570, 1573, 1573, 1573, 1573, 1573,
19845 + 1573, 1573, 1573, 1582, 1573, 1573, 1573, 1573, 1573, 1573,
19846 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1583,
19847 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1578, 1578, 1578,
19848 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19849 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19850 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19851 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19852 + 1568, 1568, 1568, 1568, 1568, 1568, 1569, 1569, 1569, 1569,
19853 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19854 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19856 + 1569, 1569, 1569, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19857 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19858 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19859 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19860 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19861 + 1570, 1573, 1573, 1573, 1573, 1573, 1584, 1582, 1573, 1573,
19862 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1585, 1583, 1573,
19863 + 1573, 1573, 1573, 1578, 1578, 1578, 1568, 1568, 1568, 1568,
19864 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19865 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19867 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19868 + 1568, 1568, 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569,
19869 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19870 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1570, 1570,
19871 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19872 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19873 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19874 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1573, 1573,
19875 + 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573, 1573,
19876 + 1578, 1578, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19878 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19879 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19880 + 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19881 + 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19882 + 1569, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19883 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19884 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19885 + 1570, 1570, 1573, 1573, 1573, 1573, 1573, 1573, 1568, 1568,
19886 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19887 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19889 + 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19890 + 1569, 1569, 1569, 1569, 1569, 1569, 1570, 1570, 1570, 1570,
19891 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19892 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19893 + 1573, 1573, 1573, 1573, 1573, 1573, 1568, 1568, 1568, 1568,
19894 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19895 + 1568, 1568, 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569,
19896 + 1569, 1569, 1569, 1569, 1570, 1570, 1570, 1570, 1570, 1570,
19897 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19898 + 1570, 1570, 1570, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19900 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19901 + 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19902 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19903 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1568, 1568,
19904 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19905 + 1568, 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1569,
19906 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19907 + 1570, 1570, 1570, 1570, 1570, 1568, 1568, 1568, 1568, 1568,
19908 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1569, 1569,
19909 + 1569, 1569, 1569, 1569, 1570, 1570, 1570, 1570, 1570, 1570,
19911 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1568, 1568, 1568,
19912 + 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1569, 1569, 1569,
19913 + 1569, 1569, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570,
19914 + 1570, 1570, 1568, 1568, 1568, 1568, 1568, 1568, 1568, 1568,
19915 + 1568, 1568, 1569, 1569, 1569, 1569, 1569, 1569, 1570, 1570,
19916 + 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1570, 1568, 1568,
19917 + 1568, 1568, 1568, 1568, 1568, 1569, 1569, 1569, 1570, 1570,
19918 + 1570, 1570, 1570, 1570, 1570, 1568, 1568, 1568, 1568, 1568,
19919 + 1568, 1568, 1569, 1569, 1569, 1570, 1570, 1570, 1570, 1570,
19920 + 1570, 1570, 1568, 1568, 1568, 1568, 1568, 1568, 1569, 1569,
19922 + 1570, 1570, 1570, 1570, 1570, 1570, 1568, 1568, 1568, 1568,
19923 + 1568, 1569, 1569, 1570, 1570, 1570, 1570, 1570, 1568, 1568,
19924 + 1568, 1568, 1569, 1570, 1570, 1570, 1570, 1568, 1568, 1568,
19925 + 1568, 1569, 1570, 1570, 1570, 1570, 1568, 1568, 1568, 1568,
19926 + 1569, 1570, 1570, 1570, 1570, 1568, 1568, 1568, 1569, 1570,
19927 + 1570, 1570, 1568, 1568, 1570, 1570, 1568, 1570, 1568, 1570,
19928 + 0, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
19929 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
19930 + 1561, 1561, 1561, 1561, 1561
19933 -static yyconst flex_int16_t yy_nxt[2579] =
19934 +static yyconst flex_int16_t yy_nxt[2641] =
19935 { 0,
19936 21, 22, 23, 24, 25, 21, 26, 27, 28, 29,
19937 - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
19938 - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
19939 - 50, 51, 52, 53, 35, 54, 55, 56, 57, 58,
19940 - 59, 60, 35, 61, 62, 35, 63, 35, 35, 35,
19941 - 35, 64, 35, 65, 21, 35, 66, 35, 35, 35,
19942 - 35, 35, 35, 35, 35, 35, 67, 35, 35, 68,
19943 - 35, 35, 69, 35, 35, 35, 35, 70, 71, 72,
19944 - 73, 74, 75, 23, 76, 77, 74, 78, 79, 80,
19945 - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
19947 - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
19948 - 101, 102, 103, 87, 104, 87, 105, 106, 107, 108,
19949 - 109, 110, 87, 87, 111, 87, 87, 87, 87, 87,
19950 - 87, 87, 112, 87, 113, 74, 87, 114, 102, 102,
19951 - 102, 102, 102, 87, 87, 87, 87, 87, 87, 87,
19952 - 87, 87, 87, 115, 87, 87, 87, 87, 116, 117,
19953 - 118, 119, 74, 75, 23, 76, 77, 74, 120, 79,
19954 - 80, 81, 82, 83, 84, 85, 121, 122, 123, 124,
19955 - 125, 91, 92, 93, 94, 95, 96, 126, 127, 128,
19956 - 129, 130, 131, 132, 133, 134, 122, 135, 136, 137,
19958 - 138, 139, 140, 141, 122, 142, 143, 122, 144, 122,
19959 - 122, 122, 122, 112, 122, 113, 74, 122, 145, 122,
19960 - 122, 122, 122, 122, 122, 122, 122, 122, 146, 122,
19961 - 122, 147, 122, 122, 148, 122, 122, 122, 122, 116,
19962 - 117, 118, 149, 74, 74, 20, 74, 74, 74, 150,
19963 - 74, 74, 74, 74, 74, 151, 74, 152, 222, 295,
19964 - 124, 125, 74, 74, 74, 154, 74, 74, 217, 223,
19965 - 227, 228, 196, 197, 196, 197, 198, 955, 198, 230,
19966 - 231, 232, 218, 233, 956, 237, 295, 199, 238, 199,
19967 - 240, 234, 245, 241, 74, 254, 74, 74, 235, 236,
19969 - 242, 239, 246, 247, 243, 255, 248, 256, 260, 249,
19970 - 282, 257, 261, 288, 426, 262, 263, 282, 244, 427,
19971 - 74, 74, 74, 74, 74, 20, 74, 74, 74, 150,
19972 - 74, 74, 74, 74, 74, 151, 74, 152, 224, 224,
19973 - 124, 125, 74, 74, 74, 154, 74, 74, 200, 258,
19974 - 200, 264, 290, 217, 227, 228, 225, 289, 225, 259,
19975 - 317, 265, 431, 291, 230, 231, 283, 218, 321, 226,
19976 - 318, 472, 319, 283, 74, 432, 74, 74, 322, 267,
19977 - 320, 327, 268, 269, 473, 328, 225, 290, 225, 270,
19978 - 271, 272, 329, 957, 273, 274, 226, 330, 336, 275,
19980 - 74, 74, 74, 21, 22, 155, 24, 21, 156, 157,
19981 - 27, 28, 29, 30, 158, 159, 160, 161, 162, 163,
19982 - 164, 165, 166, 167, 41, 168, 43, 169, 170, 171,
19983 - 172, 173, 174, 175, 162, 162, 162, 162, 162, 176,
19984 - 162, 177, 178, 179, 162, 162, 180, 181, 162, 162,
19985 - 162, 162, 162, 162, 182, 162, 183, 21, 162, 184,
19986 - 185, 186, 173, 187, 188, 162, 162, 162, 162, 189,
19987 - 162, 190, 191, 192, 162, 193, 194, 162, 162, 162,
19988 - 70, 71, 72, 195, 21, 196, 197, 21, 21, 198,
19989 - 295, 21, 21, 21, 21, 21, 21, 202, 21, 288,
19991 - 199, 21, 21, 202, 202, 21, 21, 21, 21, 224,
19992 - 224, 352, 961, 306, 323, 306, 347, 295, 324, 348,
19993 - 307, 353, 325, 308, 438, 344, 295, 225, 345, 225,
19994 - 284, 284, 306, 410, 306, 21, 21, 21, 21, 411,
19995 - 349, 346, 284, 335, 350, 309, 361, 962, 354, 284,
19996 - 284, 355, 963, 295, 356, 438, 362, 225, 351, 225,
19997 - 438, 203, 21, 204, 21, 21, 196, 197, 21, 21,
19998 - 198, 440, 21, 21, 21, 21, 21, 21, 202, 21,
19999 - 415, 199, 21, 21, 202, 202, 21, 21, 21, 21,
20000 - 310, 306, 363, 306, 311, 416, 364, 306, 964, 306,
20002 - 365, 284, 366, 306, 452, 306, 453, 284, 312, 284,
20003 - 441, 439, 367, 284, 284, 284, 21, 21, 21, 21,
20004 - 284, 284, 339, 368, 340, 313, 372, 369, 401, 447,
20005 - 370, 371, 341, 967, 968, 459, 373, 510, 394, 342,
20006 - 343, 448, 203, 21, 204, 21, 21, 196, 197, 511,
20007 - 25, 198, 460, 21, 21, 21, 21, 969, 21, 202,
20008 - 404, 401, 199, 21, 21, 202, 202, 21, 21, 21,
20009 - 306, 394, 306, 477, 375, 438, 478, 376, 377, 514,
20010 - 284, 515, 479, 401, 378, 379, 380, 284, 284, 381,
20011 - 382, 405, 401, 394, 383, 407, 572, 401, 406, 970,
20013 - 528, 331, 394, 401, 573, 408, 206, 394, 207, 529,
20014 - 409, 401, 208, 394, 640, 550, 487, 551, 488, 438,
20015 - 401, 394, 489, 209, 21, 210, 21, 21, 196, 197,
20016 - 394, 25, 198, 420, 21, 21, 21, 21, 557, 21,
20017 - 202, 438, 418, 199, 21, 21, 202, 202, 21, 21,
20018 - 21, 419, 337, 337, 466, 558, 401, 467, 401, 468,
20019 - 816, 438, 423, 570, 337, 337, 394, 469, 394, 424,
20020 - 296, 215, 296, 215, 224, 224, 571, 577, 545, 587,
20021 - 578, 588, 296, 338, 296, 589, 579, 206, 421, 207,
20022 - 546, 639, 225, 208, 225, 422, 971, 972, 818, 425,
20024 - 296, 215, 296, 215, 209, 21, 210, 21, 216, 216,
20025 - 338, 973, 296, 306, 296, 306, 216, 216, 216, 216,
20026 - 216, 216, 225, 284, 225, 293, 293, 401, 401, 564,
20027 - 284, 284, 565, 785, 566, 438, 401, 394, 394, 786,
20028 - 438, 974, 567, 1535, 438, 1535, 394, 216, 216, 216,
20029 - 216, 216, 216, 285, 285, 975, 295, 965, 401, 976,
20030 - 438, 285, 285, 285, 285, 285, 285, 306, 394, 306,
20031 - 306, 977, 508, 1535, 966, 1535, 401, 284, 817, 438,
20032 - 284, 959, 622, 295, 507, 284, 394, 284, 284, 638,
20033 - 978, 979, 285, 285, 285, 285, 285, 285, 292, 292,
20035 - 980, 337, 337, 981, 624, 982, 293, 294, 293, 294,
20036 - 293, 293, 958, 295, 401, 306, 296, 306, 296, 296,
20037 - 295, 296, 625, 983, 394, 284, 960, 984, 801, 297,
20038 - 985, 606, 284, 284, 802, 986, 987, 293, 294, 293,
20039 - 294, 293, 293, 306, 295, 306, 296, 988, 296, 296,
20040 - 295, 296, 989, 284, 401, 990, 297, 299, 299, 991,
20041 - 284, 516, 992, 401, 394, 299, 300, 299, 301, 299,
20042 - 299, 608, 302, 394, 993, 306, 303, 306, 994, 302,
20043 - 609, 995, 996, 304, 305, 284, 997, 998, 302, 999,
20044 - 1000, 1001, 284, 284, 1002, 1003, 299, 306, 299, 306,
20046 - 299, 299, 306, 302, 306, 296, 517, 296, 1004, 302,
20047 - 1005, 1006, 284, 1007, 1008, 302, 334, 334, 1009, 284,
20048 - 284, 538, 1010, 1011, 334, 334, 334, 334, 334, 334,
20049 - 306, 1012, 306, 1013, 306, 296, 306, 296, 1014, 1015,
20050 - 284, 707, 1016, 1017, 284, 1018, 698, 284, 284, 1019,
20051 - 1020, 284, 284, 1021, 1022, 334, 334, 334, 334, 334,
20052 - 334, 391, 391, 1023, 1024, 1025, 1027, 1028, 1029, 391,
20053 - 391, 391, 391, 391, 391, 1030, 1031, 1032, 1033, 1034,
20054 - 1035, 1036, 1026, 1037, 1038, 1039, 1040, 1041, 1042, 1043,
20055 - 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053,
20057 - 391, 391, 391, 391, 391, 391, 395, 395, 1054, 1055,
20058 - 1056, 1057, 1058, 1059, 395, 395, 395, 395, 395, 395,
20059 - 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069,
20060 - 1070, 438, 438, 438, 1073, 1074, 1075, 1076, 1077, 1078,
20061 - 1079, 1080, 1081, 1082, 1083, 395, 395, 395, 395, 395,
20062 - 395, 399, 399, 1084, 1085, 1086, 1087, 1088, 1089, 399,
20063 - 400, 399, 401, 399, 399, 1090, 402, 1091, 1092, 1093,
20064 - 403, 1094, 1095, 402, 1096, 1097, 1098, 1099, 1100, 1072,
20065 - 1071, 1101, 402, 1102, 1103, 1104, 1105, 1106, 1107, 1108,
20066 - 399, 401, 399, 401, 399, 399, 1109, 402, 1110, 1111,
20068 - 1112, 1113, 1114, 402, 1115, 1116, 1117, 1118, 1119, 402,
20069 - 216, 216, 1120, 1121, 1122, 1123, 1124, 1125, 216, 216,
20070 - 216, 216, 216, 216, 1126, 1127, 1128, 1129, 225, 1130,
20071 - 225, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139,
20072 - 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 216,
20073 - 216, 216, 216, 216, 216, 1149, 1150, 1151, 225, 1152,
20074 - 225, 285, 285, 1153, 1154, 1155, 1156, 438, 438, 285,
20075 - 285, 285, 285, 285, 285, 1157, 1158, 1159, 1160, 504,
20076 - 1161, 504, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169,
20077 - 1171, 1172, 1173, 1174, 1170, 1175, 1176, 1177, 1178, 1179,
20079 - 285, 285, 285, 285, 285, 285, 1180, 1181, 1182, 504,
20080 - 1183, 504, 334, 334, 1184, 1185, 1186, 1187, 1188, 1189,
20081 - 334, 334, 334, 334, 334, 334, 1190, 1191, 1192, 1193,
20082 - 540, 1194, 540, 1195, 1196, 1197, 1198, 1199, 1200, 1201,
20083 - 1202, 1203, 1204, 1205, 1206, 1208, 1209, 1210, 1211, 1207,
20084 - 1212, 334, 334, 334, 334, 334, 334, 1213, 1214, 1215,
20085 - 540, 1216, 540, 391, 391, 1217, 1218, 1219, 1220, 1221,
20086 - 1222, 391, 391, 391, 391, 391, 391, 1223, 1224, 1225,
20087 - 1226, 604, 1227, 604, 1228, 1229, 1230, 1231, 1232, 1233,
20088 - 1234, 1235, 1236, 1237, 1240, 1238, 1241, 1242, 1243, 1244,
20090 - 1245, 1246, 391, 391, 391, 391, 391, 391, 1239, 1247,
20091 - 1248, 604, 1249, 604, 395, 395, 1250, 1251, 1252, 1253,
20092 - 1254, 1255, 395, 395, 395, 395, 395, 395, 1256, 1257,
20093 - 1258, 1259, 605, 1260, 605, 1261, 1262, 1263, 1264, 1265,
20094 - 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1277, 1278,
20095 - 1279, 1275, 1266, 395, 395, 395, 395, 395, 395, 1276,
20096 - 1280, 1281, 605, 1282, 605, 941, 941, 1283, 941, 941,
20097 - 941, 1284, 941, 941, 941, 941, 941, 1285, 941, 1286,
20098 - 1287, 1288, 1289, 1291, 1292, 941, 941, 941, 941, 941,
20099 - 1290, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301,
20101 - 1302, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1303, 1311,
20102 - 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 941,
20103 - 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330,
20104 - 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340,
20105 - 1341, 1342, 941, 941, 941, 952, 952, 1343, 952, 952,
20106 - 952, 1344, 952, 952, 952, 952, 952, 1345, 952, 1346,
20107 - 1347, 1348, 1349, 1350, 1351, 952, 952, 952, 952, 952,
20108 - 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361,
20109 - 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371,
20110 - 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 952,
20112 - 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390,
20113 - 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400,
20114 - 1401, 1402, 952, 952, 952, 941, 941, 1403, 941, 941,
20115 - 941, 1404, 941, 941, 941, 941, 941, 1405, 941, 1406,
20116 - 1407, 1411, 1412, 1413, 1414, 941, 941, 941, 941, 941,
20117 - 1408, 1415, 1416, 1417, 1409, 1420, 1421, 1418, 1422, 1423,
20118 - 1424, 1427, 1428, 1429, 1425, 1430, 1431, 1410, 1432, 1433,
20119 - 1419, 1434, 1435, 1436, 1437, 1438, 1439, 1426, 1440, 941,
20120 - 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450,
20121 - 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460,
20123 - 1461, 1462, 941, 941, 941, 952, 952, 1463, 952, 952,
20124 - 952, 1464, 952, 952, 952, 952, 952, 1465, 952, 1466,
20125 - 1467, 1468, 1469, 1470, 1471, 952, 952, 952, 952, 952,
20126 - 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481,
20127 - 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491,
20128 - 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 952,
20129 - 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510,
20130 - 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520,
20131 - 1521, 1522, 952, 952, 952, 1523, 1524, 1525, 1526, 1527,
20132 - 1528, 1529, 1530, 1531, 1532, 1533, 1534, 20, 20, 20,
20134 - 20, 20, 20, 20, 20, 20, 20, 20, 153, 153,
20135 - 153, 153, 153, 153, 153, 153, 153, 153, 153, 21,
20136 + 30, 31, 32, 33, 34, 35, 36, 37, 38, 38,
20137 + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
20138 + 49, 50, 51, 52, 53, 35, 54, 55, 56, 57,
20139 + 58, 59, 60, 35, 61, 62, 35, 63, 35, 35,
20140 + 35, 35, 64, 35, 65, 21, 35, 66, 35, 35,
20141 + 35, 35, 35, 35, 35, 35, 35, 67, 35, 35,
20142 + 68, 35, 35, 69, 35, 35, 35, 35, 70, 71,
20143 + 72, 73, 74, 75, 23, 76, 77, 74, 78, 79,
20144 + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
20146 + 90, 90, 91, 92, 93, 94, 95, 96, 97, 98,
20147 + 99, 100, 101, 102, 103, 87, 104, 87, 105, 106,
20148 + 107, 108, 109, 110, 87, 87, 111, 87, 87, 87,
20149 + 87, 87, 87, 87, 112, 87, 113, 74, 87, 114,
20150 + 102, 102, 102, 102, 102, 87, 87, 87, 87, 87,
20151 + 87, 87, 87, 87, 87, 115, 87, 87, 87, 87,
20152 + 116, 117, 118, 119, 74, 75, 23, 76, 77, 74,
20153 + 120, 79, 80, 81, 82, 83, 84, 85, 121, 122,
20154 + 123, 124, 125, 125, 91, 92, 93, 94, 95, 96,
20155 + 126, 127, 128, 129, 130, 131, 132, 133, 134, 122,
20157 + 135, 136, 137, 138, 139, 140, 141, 122, 142, 143,
20158 + 122, 144, 122, 122, 122, 122, 112, 122, 113, 74,
20159 + 122, 145, 122, 122, 122, 122, 122, 122, 122, 122,
20160 + 122, 146, 122, 122, 147, 122, 122, 148, 122, 122,
20161 + 122, 122, 116, 117, 118, 149, 74, 74, 20, 74,
20162 + 74, 74, 150, 74, 74, 74, 74, 74, 151, 74,
20163 + 152, 222, 956, 124, 125, 125, 74, 74, 74, 154,
20164 + 74, 74, 217, 223, 227, 228, 196, 197, 196, 197,
20165 + 198, 242, 198, 230, 231, 243, 232, 218, 233, 237,
20166 + 295, 199, 238, 199, 240, 959, 234, 241, 74, 244,
20168 + 74, 74, 245, 235, 236, 239, 254, 247, 258, 264,
20169 + 248, 256, 246, 249, 282, 257, 255, 295, 259, 265,
20170 + 288, 227, 228, 960, 74, 74, 74, 74, 74, 20,
20171 + 74, 74, 74, 150, 74, 74, 74, 74, 74, 151,
20172 + 74, 152, 217, 282, 124, 125, 125, 74, 74, 74,
20173 + 154, 74, 74, 200, 260, 200, 267, 218, 261, 268,
20174 + 269, 262, 263, 290, 289, 295, 270, 271, 272, 320,
20175 + 283, 273, 274, 230, 231, 291, 275, 321, 306, 74,
20176 + 306, 74, 74, 318, 306, 307, 306, 309, 308, 961,
20177 + 355, 290, 295, 319, 284, 284, 284, 310, 414, 283,
20179 + 356, 284, 284, 338, 415, 74, 74, 74, 21, 22,
20180 + 155, 24, 21, 156, 157, 27, 28, 29, 30, 158,
20181 + 159, 160, 161, 162, 163, 164, 165, 165, 166, 167,
20182 + 41, 168, 43, 169, 170, 171, 172, 173, 174, 175,
20183 + 162, 162, 162, 162, 162, 176, 162, 177, 178, 179,
20184 + 162, 162, 180, 181, 162, 162, 162, 162, 162, 162,
20185 + 182, 162, 183, 21, 162, 184, 185, 186, 173, 187,
20186 + 188, 162, 162, 162, 162, 189, 162, 190, 191, 192,
20187 + 162, 193, 194, 162, 162, 162, 70, 71, 72, 195,
20188 + 21, 196, 197, 21, 21, 198, 962, 21, 21, 21,
20190 + 21, 21, 21, 202, 21, 288, 199, 21, 21, 21,
20191 + 202, 202, 21, 21, 21, 21, 224, 224, 224, 419,
20192 + 311, 306, 322, 306, 312, 325, 323, 963, 295, 326,
20193 + 306, 284, 306, 327, 420, 225, 324, 225, 313, 284,
20194 + 284, 349, 21, 21, 21, 21, 329, 284, 284, 337,
20195 + 330, 350, 314, 357, 351, 295, 358, 331, 430, 359,
20196 + 352, 964, 332, 431, 353, 225, 442, 225, 203, 21,
20197 + 204, 21, 21, 196, 197, 21, 21, 198, 354, 21,
20198 + 21, 21, 21, 21, 21, 202, 21, 442, 199, 21,
20199 + 21, 21, 202, 202, 21, 21, 21, 21, 224, 224,
20201 + 224, 364, 435, 306, 366, 306, 346, 965, 367, 347,
20202 + 966, 365, 368, 284, 369, 436, 445, 225, 370, 225,
20203 + 284, 284, 348, 463, 21, 21, 21, 21, 371, 372,
20204 + 226, 376, 405, 373, 408, 405, 374, 375, 405, 442,
20205 + 464, 377, 398, 443, 456, 398, 457, 225, 398, 225,
20206 + 203, 21, 204, 21, 21, 196, 197, 226, 25, 198,
20207 + 534, 21, 21, 21, 21, 967, 21, 202, 424, 535,
20208 + 199, 21, 21, 21, 202, 202, 21, 21, 21, 306,
20209 + 405, 306, 341, 519, 342, 520, 444, 442, 405, 284,
20210 + 398, 379, 343, 413, 380, 381, 284, 284, 398, 344,
20212 + 345, 382, 383, 384, 405, 970, 385, 386, 451, 476,
20213 + 333, 387, 409, 405, 398, 206, 411, 207, 425, 410,
20214 + 452, 208, 477, 398, 971, 426, 412, 442, 828, 405,
20215 + 514, 972, 209, 21, 210, 21, 21, 196, 197, 398,
20216 + 25, 198, 515, 21, 21, 21, 21, 973, 21, 202,
20217 + 977, 405, 199, 21, 21, 21, 202, 202, 21, 21,
20218 + 21, 398, 339, 339, 339, 829, 215, 405, 215, 978,
20219 + 481, 427, 551, 482, 339, 339, 339, 398, 428, 483,
20220 + 979, 296, 422, 296, 552, 224, 224, 224, 564, 577,
20221 + 306, 423, 306, 296, 340, 296, 215, 206, 215, 207,
20223 + 284, 579, 578, 208, 225, 565, 225, 284, 284, 580,
20224 + 429, 296, 980, 296, 209, 21, 210, 21, 216, 216,
20225 + 216, 340, 557, 296, 558, 296, 983, 216, 216, 216,
20226 + 216, 216, 216, 442, 225, 470, 225, 491, 471, 492,
20227 + 472, 571, 585, 493, 572, 586, 573, 595, 473, 596,
20228 + 797, 587, 984, 597, 574, 442, 798, 405, 216, 216,
20229 + 216, 216, 216, 216, 285, 285, 285, 398, 985, 306,
20230 + 405, 306, 648, 285, 285, 285, 285, 285, 285, 284,
20231 + 398, 293, 293, 293, 405, 813, 511, 284, 442, 442,
20232 + 442, 814, 830, 405, 398, 339, 339, 339, 986, 442,
20234 + 1561, 614, 1561, 398, 285, 285, 285, 285, 285, 285,
20235 + 292, 292, 292, 295, 296, 442, 296, 405, 405, 293,
20236 + 294, 293, 294, 293, 293, 987, 295, 398, 398, 296,
20237 + 1561, 296, 1561, 295, 616, 617, 975, 976, 647, 630,
20238 + 295, 988, 297, 646, 296, 989, 296, 990, 981, 991,
20239 + 293, 294, 293, 294, 293, 293, 306, 295, 512, 296,
20240 + 992, 296, 296, 295, 296, 982, 284, 974, 993, 297,
20241 + 299, 299, 299, 284, 284, 405, 994, 995, 405, 299,
20242 + 300, 299, 301, 299, 299, 398, 302, 996, 398, 306,
20243 + 303, 306, 296, 302, 296, 997, 998, 304, 305, 284,
20245 + 999, 1000, 302, 1001, 1002, 1003, 284, 284, 1004, 1005,
20246 + 299, 306, 299, 306, 299, 299, 1006, 302, 306, 1007,
20247 + 306, 632, 1008, 302, 633, 518, 1009, 1010, 284, 302,
20248 + 336, 336, 336, 1011, 1012, 284, 284, 1013, 1014, 336,
20249 + 336, 336, 336, 336, 336, 306, 1015, 306, 306, 1016,
20250 + 306, 306, 522, 306, 1017, 284, 1018, 1019, 284, 1020,
20251 + 1021, 284, 284, 521, 1022, 284, 284, 1023, 284, 284,
20252 + 336, 336, 336, 336, 336, 336, 395, 395, 395, 1024,
20253 + 1025, 1026, 306, 1027, 306, 395, 395, 395, 395, 395,
20254 + 395, 1028, 284, 1029, 306, 1030, 306, 544, 706, 284,
20256 + 284, 716, 1031, 1032, 284, 1033, 1034, 1035, 1036, 1037,
20257 + 1038, 284, 284, 1039, 1040, 1041, 395, 395, 395, 395,
20258 + 395, 395, 399, 399, 399, 1042, 1043, 1044, 1046, 1047,
20259 + 1048, 399, 399, 399, 399, 399, 399, 1049, 1050, 1051,
20260 + 1052, 1053, 1054, 1055, 1045, 1056, 1057, 1058, 1059, 1060,
20261 + 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070,
20262 + 1071, 1072, 399, 399, 399, 399, 399, 399, 403, 403,
20263 + 403, 1073, 1074, 1075, 1076, 1077, 1078, 403, 404, 403,
20264 + 405, 403, 403, 1079, 406, 1080, 1081, 1082, 407, 1083,
20265 + 1084, 406, 1085, 1086, 1087, 1088, 1089, 1090, 442, 442,
20267 + 406, 442, 1093, 1094, 1095, 1096, 1097, 1098, 403, 405,
20268 + 403, 405, 403, 403, 1099, 406, 1100, 1101, 1102, 1103,
20269 + 1104, 406, 1105, 1106, 1107, 1108, 1109, 406, 216, 216,
20270 + 216, 1110, 1111, 1112, 1113, 1114, 1115, 216, 216, 216,
20271 + 216, 216, 216, 1116, 1117, 1092, 1118, 225, 1091, 225,
20272 + 1119, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128,
20273 + 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 216, 216,
20274 + 216, 216, 216, 216, 1137, 1138, 1139, 225, 1140, 225,
20275 + 285, 285, 285, 1141, 1142, 1143, 1144, 1145, 1146, 285,
20276 + 285, 285, 285, 285, 285, 1147, 1148, 1149, 1150, 508,
20278 + 1151, 508, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159,
20279 + 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169,
20280 + 285, 285, 285, 285, 285, 285, 1170, 1171, 1172, 508,
20281 + 1173, 508, 336, 336, 336, 1174, 1175, 1176, 1177, 1178,
20282 + 442, 336, 336, 336, 336, 336, 336, 442, 1179, 1180,
20283 + 1181, 546, 1182, 546, 1183, 1184, 1185, 1186, 1187, 1188,
20284 + 1189, 1190, 1191, 1193, 1194, 1195, 1196, 1192, 1197, 1198,
20285 + 1199, 1200, 336, 336, 336, 336, 336, 336, 1201, 1202,
20286 + 1203, 546, 1204, 546, 395, 395, 395, 1205, 1206, 1207,
20287 + 1208, 1209, 1210, 395, 395, 395, 395, 395, 395, 1211,
20289 + 1212, 1213, 1214, 612, 1215, 612, 1216, 1217, 1218, 1219,
20290 + 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229,
20291 + 1232, 1233, 1234, 1235, 395, 395, 395, 395, 395, 395,
20292 + 1236, 1237, 1238, 612, 1230, 612, 399, 399, 399, 1231,
20293 + 1239, 1240, 1241, 1242, 1243, 399, 399, 399, 399, 399,
20294 + 399, 1244, 1245, 1246, 1247, 613, 1248, 613, 1249, 1250,
20295 + 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260,
20296 + 1261, 1262, 1264, 1265, 1266, 1267, 399, 399, 399, 399,
20297 + 399, 399, 1268, 1269, 1263, 613, 1270, 613, 957, 957,
20298 + 1271, 957, 957, 957, 1272, 957, 957, 957, 957, 957,
20300 + 1273, 957, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 957,
20301 + 957, 957, 957, 957, 1281, 1282, 1283, 1284, 1285, 1286,
20302 + 1287, 1288, 1289, 1290, 1291, 1293, 1294, 1295, 1296, 1297,
20303 + 1298, 1299, 1300, 1301, 1303, 1304, 1305, 1292, 1306, 1307,
20304 + 1308, 1302, 1309, 957, 1310, 1311, 1312, 1313, 1314, 1315,
20305 + 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1316, 1324, 1325,
20306 + 1326, 1327, 1330, 1328, 1331, 1332, 957, 957, 957, 968,
20307 + 968, 1329, 968, 968, 968, 1333, 968, 968, 968, 968,
20308 + 968, 1334, 968, 1335, 1336, 1337, 1338, 1339, 1340, 1341,
20309 + 968, 968, 968, 968, 968, 1342, 1343, 1344, 1345, 1346,
20311 + 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356,
20312 + 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366,
20313 + 1367, 1368, 1369, 1370, 968, 1371, 1372, 1373, 1374, 1375,
20314 + 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385,
20315 + 1386, 1387, 1388, 1389, 1390, 1391, 1392, 968, 968, 968,
20316 + 957, 957, 1393, 957, 957, 957, 1394, 957, 957, 957,
20317 + 957, 957, 1395, 957, 1396, 1397, 1398, 1399, 1400, 1401,
20318 + 1402, 957, 957, 957, 957, 957, 1403, 1404, 1405, 1406,
20319 + 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416,
20320 + 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426,
20322 + 1427, 1428, 1429, 1430, 1431, 957, 1432, 1433, 1434, 1437,
20323 + 1438, 1439, 1435, 1440, 1441, 1442, 1443, 1446, 1447, 1448,
20324 + 1444, 1449, 1453, 1454, 1455, 1436, 1456, 1457, 957, 957,
20325 + 957, 968, 968, 1445, 968, 968, 968, 1458, 968, 968,
20326 + 968, 968, 968, 1450, 968, 1459, 1460, 1451, 1461, 1462,
20327 + 1463, 1464, 968, 968, 968, 968, 968, 1465, 1466, 1467,
20328 + 1452, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476,
20329 + 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486,
20330 + 1487, 1488, 1489, 1490, 1491, 1492, 968, 1493, 1494, 1495,
20331 + 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505,
20333 + 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 968,
20334 + 968, 968, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522,
20335 + 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532,
20336 + 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542,
20337 + 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552,
20338 + 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 20, 20,
20339 + 20, 20, 20, 20, 20, 20, 20, 20, 20, 153,
20340 + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
20341 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
20342 - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201,
20343 - 201, 205, 205, 205, 205, 205, 205, 205, 205, 205,
20344 - 205, 205, 213, 213, 213, 213, 213, 213, 213, 213,
20345 - 213, 213, 213, 215, 215, 215, 215, 215, 215, 215,
20346 - 215, 284, 506, 284, 954, 284, 284, 284, 284, 333,
20347 - 951, 333, 333, 333, 333, 333, 333, 390, 950, 949,
20348 - 948, 947, 390, 390, 390, 392, 392, 392, 392, 392,
20350 - 392, 392, 392, 392, 392, 392, 394, 946, 394, 945,
20351 - 394, 394, 394, 394, 396, 944, 396, 396, 396, 396,
20352 - 396, 396, 396, 396, 396, 398, 943, 398, 398, 398,
20353 - 398, 398, 398, 398, 398, 398, 435, 940, 435, 435,
20354 - 435, 435, 435, 435, 435, 435, 435, 436, 939, 436,
20355 - 437, 437, 437, 938, 937, 437, 437, 936, 437, 505,
20356 - 935, 505, 934, 505, 505, 505, 505, 541, 933, 541,
20357 - 541, 541, 541, 541, 541, 942, 932, 942, 942, 942,
20358 - 942, 942, 942, 942, 942, 942, 953, 931, 953, 953,
20359 - 953, 953, 953, 953, 953, 953, 953, 941, 930, 941,
20361 - 941, 941, 941, 941, 941, 941, 941, 941, 952, 929,
20362 - 952, 952, 952, 952, 952, 952, 952, 952, 952, 928,
20363 - 927, 926, 925, 924, 923, 922, 921, 920, 919, 918,
20364 - 917, 916, 915, 914, 913, 912, 911, 910, 909, 908,
20365 - 907, 906, 905, 904, 903, 902, 901, 900, 899, 898,
20366 - 897, 896, 895, 894, 893, 892, 891, 890, 889, 888,
20367 - 887, 886, 885, 884, 883, 882, 881, 880, 879, 878,
20368 - 877, 876, 875, 874, 873, 872, 871, 870, 869, 868,
20369 - 867, 866, 865, 864, 863, 862, 861, 860, 859, 858,
20370 - 857, 856, 855, 854, 853, 852, 851, 850, 849, 848,
20372 - 847, 846, 845, 844, 843, 842, 841, 840, 839, 838,
20373 - 837, 836, 835, 834, 833, 832, 831, 830, 829, 828,
20374 - 827, 826, 825, 824, 823, 822, 821, 820, 819, 815,
20375 - 814, 813, 812, 811, 810, 809, 808, 807, 806, 805,
20376 - 804, 803, 800, 799, 798, 797, 796, 795, 794, 793,
20377 - 792, 791, 790, 789, 788, 787, 784, 783, 782, 781,
20378 - 780, 779, 778, 777, 776, 775, 774, 773, 772, 771,
20379 - 770, 769, 768, 767, 766, 765, 764, 763, 762, 761,
20380 - 760, 759, 758, 757, 756, 755, 754, 753, 752, 751,
20381 - 750, 749, 748, 747, 746, 745, 744, 743, 742, 741,
20383 - 740, 739, 738, 737, 736, 735, 734, 733, 732, 731,
20384 - 730, 729, 728, 727, 726, 725, 724, 723, 722, 721,
20385 - 720, 719, 718, 717, 716, 715, 714, 713, 712, 711,
20386 - 710, 709, 708, 706, 705, 704, 703, 702, 701, 700,
20387 - 699, 697, 696, 695, 694, 693, 692, 691, 690, 689,
20388 - 688, 687, 686, 685, 684, 683, 682, 681, 680, 679,
20389 - 678, 677, 676, 675, 674, 673, 672, 671, 670, 669,
20390 - 668, 667, 666, 665, 664, 663, 662, 661, 660, 659,
20391 - 658, 657, 656, 655, 654, 653, 652, 651, 650, 649,
20392 - 648, 647, 646, 645, 644, 643, 642, 641, 437, 438,
20394 - 434, 637, 636, 635, 634, 633, 632, 631, 630, 629,
20395 - 628, 627, 626, 623, 621, 620, 619, 618, 617, 616,
20396 - 615, 614, 613, 612, 611, 610, 607, 393, 603, 602,
20397 - 601, 600, 599, 598, 597, 596, 595, 594, 593, 592,
20398 - 591, 590, 586, 585, 584, 583, 582, 581, 580, 576,
20399 - 575, 574, 569, 568, 563, 562, 561, 560, 559, 556,
20400 - 555, 554, 553, 552, 549, 548, 547, 544, 543, 542,
20401 - 539, 537, 536, 535, 534, 533, 532, 531, 530, 527,
20402 - 526, 525, 524, 523, 522, 521, 520, 519, 518, 513,
20403 - 512, 509, 503, 502, 501, 500, 499, 498, 497, 496,
20405 - 495, 494, 493, 492, 491, 490, 486, 485, 484, 483,
20406 - 482, 481, 480, 476, 475, 474, 471, 470, 465, 464,
20407 - 463, 462, 461, 458, 457, 456, 455, 454, 451, 450,
20408 - 449, 446, 445, 444, 443, 442, 214, 211, 438, 290,
20409 - 434, 433, 430, 429, 428, 417, 414, 413, 412, 298,
20410 - 291, 288, 287, 397, 393, 389, 388, 387, 386, 385,
20411 - 384, 374, 360, 359, 358, 357, 332, 326, 316, 315,
20412 - 314, 298, 287, 286, 214, 212, 211, 281, 280, 279,
20413 - 278, 277, 276, 266, 253, 252, 251, 250, 229, 221,
20414 - 220, 219, 214, 212, 211, 1535, 19, 1535, 1535, 1535,
20416 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20417 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20418 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20419 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20420 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20421 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20422 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20423 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535
20424 + 21, 201, 201, 201, 201, 201, 201, 201, 201, 201,
20426 + 201, 201, 205, 205, 205, 205, 205, 205, 205, 205,
20427 + 205, 205, 205, 213, 213, 213, 213, 213, 213, 213,
20428 + 213, 213, 213, 213, 215, 215, 215, 215, 215, 215,
20429 + 215, 215, 284, 510, 284, 955, 284, 284, 284, 284,
20430 + 335, 954, 335, 335, 335, 335, 335, 335, 394, 953,
20431 + 952, 951, 950, 394, 394, 394, 396, 396, 396, 396,
20432 + 396, 396, 396, 396, 396, 396, 396, 398, 949, 398,
20433 + 948, 398, 398, 398, 398, 400, 947, 400, 400, 400,
20434 + 400, 400, 400, 400, 400, 400, 402, 946, 402, 402,
20435 + 402, 402, 402, 402, 402, 402, 402, 439, 945, 439,
20437 + 439, 439, 439, 439, 439, 439, 439, 439, 440, 944,
20438 + 440, 441, 441, 441, 943, 942, 441, 441, 941, 441,
20439 + 509, 940, 509, 939, 509, 509, 509, 509, 547, 938,
20440 + 547, 547, 547, 547, 547, 547, 958, 937, 958, 958,
20441 + 958, 958, 958, 958, 958, 958, 958, 969, 936, 969,
20442 + 969, 969, 969, 969, 969, 969, 969, 969, 957, 935,
20443 + 957, 957, 957, 957, 957, 957, 957, 957, 957, 968,
20444 + 934, 968, 968, 968, 968, 968, 968, 968, 968, 968,
20445 + 933, 932, 931, 930, 929, 928, 927, 926, 925, 924,
20446 + 923, 922, 921, 920, 919, 918, 917, 916, 915, 914,
20448 + 913, 912, 911, 910, 909, 908, 907, 906, 905, 904,
20449 + 903, 902, 901, 900, 899, 898, 897, 896, 895, 894,
20450 + 893, 892, 891, 890, 889, 888, 887, 886, 885, 884,
20451 + 883, 882, 881, 880, 879, 878, 877, 876, 875, 874,
20452 + 873, 872, 871, 870, 869, 868, 867, 866, 865, 864,
20453 + 863, 862, 861, 860, 859, 858, 857, 856, 855, 854,
20454 + 853, 852, 851, 850, 849, 848, 847, 846, 845, 844,
20455 + 843, 842, 841, 840, 839, 838, 837, 836, 835, 834,
20456 + 833, 832, 831, 827, 826, 825, 824, 823, 822, 821,
20457 + 820, 819, 818, 817, 816, 815, 812, 811, 810, 809,
20459 + 808, 807, 806, 805, 804, 803, 802, 801, 800, 799,
20460 + 796, 795, 794, 793, 792, 791, 790, 789, 788, 787,
20461 + 786, 785, 784, 783, 782, 781, 780, 779, 778, 777,
20462 + 776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
20463 + 766, 765, 764, 763, 762, 761, 760, 759, 758, 757,
20464 + 756, 755, 754, 753, 752, 751, 750, 749, 748, 747,
20465 + 746, 745, 744, 743, 742, 741, 740, 739, 738, 737,
20466 + 736, 735, 734, 733, 732, 731, 730, 729, 728, 727,
20467 + 726, 725, 724, 723, 722, 721, 720, 719, 718, 717,
20468 + 715, 714, 713, 712, 711, 710, 709, 708, 707, 705,
20470 + 704, 703, 702, 701, 700, 699, 698, 697, 696, 695,
20471 + 694, 693, 692, 691, 690, 689, 688, 687, 686, 685,
20472 + 684, 683, 682, 681, 680, 679, 678, 677, 676, 675,
20473 + 674, 673, 672, 671, 670, 669, 668, 667, 666, 665,
20474 + 664, 663, 662, 661, 660, 659, 658, 657, 656, 655,
20475 + 654, 653, 652, 651, 650, 649, 441, 442, 438, 645,
20476 + 644, 643, 642, 641, 640, 639, 638, 637, 636, 635,
20477 + 634, 631, 629, 628, 627, 626, 625, 624, 623, 622,
20478 + 621, 620, 619, 618, 615, 397, 611, 610, 609, 608,
20479 + 607, 606, 605, 604, 603, 602, 601, 600, 599, 598,
20481 + 594, 593, 592, 591, 590, 589, 588, 584, 583, 582,
20482 + 581, 576, 575, 570, 569, 568, 567, 566, 563, 562,
20483 + 561, 560, 559, 556, 555, 554, 553, 550, 549, 548,
20484 + 545, 543, 542, 541, 540, 539, 538, 537, 536, 533,
20485 + 532, 531, 530, 529, 528, 527, 526, 525, 524, 523,
20486 + 517, 516, 513, 507, 506, 505, 504, 503, 502, 501,
20487 + 500, 499, 498, 497, 496, 495, 494, 490, 489, 488,
20488 + 487, 486, 485, 484, 480, 479, 478, 475, 474, 469,
20489 + 468, 467, 466, 465, 462, 461, 460, 459, 458, 455,
20490 + 454, 453, 450, 449, 448, 447, 446, 214, 211, 442,
20492 + 290, 438, 437, 434, 433, 432, 421, 418, 417, 416,
20493 + 298, 291, 288, 287, 401, 397, 393, 392, 391, 390,
20494 + 389, 388, 378, 363, 362, 361, 360, 334, 328, 317,
20495 + 316, 315, 298, 287, 286, 214, 212, 211, 281, 280,
20496 + 279, 278, 277, 276, 266, 253, 252, 251, 250, 229,
20497 + 221, 220, 219, 214, 212, 211, 1561, 19, 1561, 1561,
20498 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20499 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20500 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20501 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20503 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20504 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20505 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
20506 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561
20509 -static yyconst flex_int16_t yy_chk[2579] =
20510 +static yyconst flex_int16_t yy_chk[2641] =
20511 { 0,
20512 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20513 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20514 @@ -1237,7 +1241,7 @@
20515 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20516 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20517 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20518 - 3, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20519 + 3, 3, 5, 5, 5, 5, 5, 5, 5, 5,
20520 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20522 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20523 @@ -1246,7 +1250,7 @@
20524 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20525 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20526 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
20527 - 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
20528 + 5, 5, 5, 5, 7, 7, 7, 7, 7, 7,
20529 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20530 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20531 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20532 @@ -1255,25 +1259,26 @@
20533 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20534 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20535 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
20536 - 7, 7, 7, 9, 9, 9, 9, 9, 9, 9,
20537 - 9, 9, 9, 9, 9, 9, 9, 9, 36, 90,
20538 - 9, 9, 9, 9, 9, 9, 9, 9, 28, 36,
20539 - 41, 41, 13, 13, 14, 14, 13, 812, 14, 43,
20540 - 43, 45, 28, 45, 814, 46, 90, 13, 46, 14,
20541 - 47, 45, 49, 47, 9, 55, 9, 9, 45, 45,
20543 - 48, 46, 49, 50, 48, 55, 50, 56, 58, 50,
20544 - 71, 56, 58, 86, 189, 58, 58, 117, 48, 189,
20545 - 9, 9, 9, 10, 10, 10, 10, 10, 10, 10,
20546 - 10, 10, 10, 10, 10, 10, 10, 10, 37, 37,
20547 - 10, 10, 10, 10, 10, 10, 10, 10, 13, 57,
20548 - 14, 59, 88, 80, 93, 93, 37, 86, 37, 57,
20549 - 106, 59, 193, 88, 95, 95, 71, 80, 108, 37,
20550 - 106, 255, 107, 117, 10, 193, 10, 10, 108, 61,
20551 - 107, 111, 61, 61, 255, 111, 37, 123, 37, 61,
20552 - 61, 61, 111, 815, 61, 61, 37, 111, 123, 61,
20553 + 7, 7, 7, 7, 7, 7, 9, 9, 9, 9,
20554 + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
20555 + 9, 36, 803, 9, 9, 9, 9, 9, 9, 9,
20556 + 9, 9, 28, 36, 41, 41, 13, 13, 14, 14,
20557 + 13, 48, 14, 43, 43, 48, 45, 28, 45, 46,
20558 + 90, 13, 46, 14, 47, 807, 45, 47, 9, 48,
20560 + 9, 9, 49, 45, 45, 46, 55, 50, 57, 59,
20561 + 50, 56, 49, 50, 71, 56, 55, 90, 57, 59,
20562 + 86, 93, 93, 808, 9, 9, 9, 10, 10, 10,
20563 + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
20564 + 10, 10, 80, 117, 10, 10, 10, 10, 10, 10,
20565 + 10, 10, 10, 13, 58, 14, 61, 80, 58, 61,
20566 + 61, 58, 58, 88, 86, 165, 61, 61, 61, 107,
20567 + 71, 61, 61, 95, 95, 88, 61, 107, 98, 10,
20568 + 98, 10, 10, 106, 99, 98, 99, 99, 98, 810,
20569 + 130, 123, 165, 106, 99, 98, 98, 99, 176, 117,
20571 - 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
20572 + 130, 99, 99, 123, 176, 10, 10, 10, 11, 11,
20573 + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20574 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20575 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20576 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20577 @@ -1281,237 +1286,243 @@
20578 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20579 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20580 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
20581 - 11, 11, 11, 11, 15, 15, 15, 15, 15, 15,
20582 - 165, 15, 15, 15, 15, 15, 15, 15, 15, 121,
20583 + 15, 15, 15, 15, 15, 15, 811, 15, 15, 15,
20585 - 15, 15, 15, 15, 15, 15, 15, 15, 15, 38,
20586 - 38, 130, 819, 98, 109, 98, 128, 165, 109, 128,
20587 - 98, 130, 109, 98, 207, 127, 292, 38, 127, 38,
20588 - 98, 98, 99, 176, 99, 15, 15, 15, 15, 176,
20589 - 129, 127, 99, 121, 129, 99, 136, 820, 131, 99,
20590 - 99, 131, 821, 292, 131, 206, 136, 38, 129, 38,
20591 - 208, 15, 15, 15, 15, 16, 16, 16, 16, 16,
20592 - 16, 207, 16, 16, 16, 16, 16, 16, 16, 16,
20593 - 180, 16, 16, 16, 16, 16, 16, 16, 16, 16,
20594 - 100, 100, 137, 100, 100, 180, 137, 102, 822, 102,
20596 - 137, 100, 138, 101, 240, 101, 240, 102, 100, 100,
20597 - 208, 206, 138, 101, 102, 102, 16, 16, 16, 16,
20598 - 101, 101, 126, 139, 126, 101, 140, 139, 173, 235,
20599 - 139, 139, 126, 825, 826, 246, 140, 304, 173, 126,
20600 - 126, 235, 16, 16, 16, 16, 17, 17, 17, 304,
20601 - 17, 17, 246, 17, 17, 17, 17, 827, 17, 17,
20602 - 171, 171, 17, 17, 17, 17, 17, 17, 17, 17,
20603 - 114, 171, 114, 259, 142, 441, 259, 142, 142, 309,
20604 - 114, 309, 259, 174, 142, 142, 142, 114, 114, 142,
20605 - 142, 172, 172, 174, 142, 174, 363, 175, 172, 830,
20607 - 322, 114, 172, 185, 363, 174, 17, 175, 17, 322,
20608 - 175, 184, 17, 185, 441, 347, 267, 347, 267, 638,
20609 - 187, 184, 267, 17, 17, 17, 17, 18, 18, 18,
20610 - 187, 18, 18, 185, 18, 18, 18, 18, 353, 18,
20611 - 18, 440, 184, 18, 18, 18, 18, 18, 18, 18,
20612 - 18, 184, 124, 124, 252, 353, 188, 252, 186, 252,
20613 - 638, 640, 187, 362, 125, 125, 188, 252, 186, 187,
20614 - 124, 226, 124, 226, 224, 224, 362, 367, 342, 375,
20615 - 367, 375, 125, 124, 125, 375, 367, 18, 186, 18,
20616 - 342, 440, 224, 18, 224, 186, 831, 833, 640, 188,
20618 - 124, 226, 124, 226, 18, 18, 18, 18, 26, 26,
20619 - 124, 835, 125, 299, 125, 299, 26, 26, 26, 26,
20620 - 26, 26, 224, 299, 224, 293, 293, 399, 401, 359,
20621 - 299, 299, 359, 607, 359, 439, 418, 399, 401, 607,
20622 - 639, 836, 359, 293, 817, 293, 418, 26, 26, 26,
20623 - 26, 26, 26, 78, 78, 838, 293, 824, 420, 839,
20624 - 816, 78, 78, 78, 78, 78, 78, 300, 420, 300,
20625 - 301, 840, 301, 293, 824, 293, 421, 300, 639, 818,
20626 - 301, 817, 418, 293, 300, 300, 421, 301, 301, 439,
20627 - 841, 842, 78, 78, 78, 78, 78, 78, 89, 89,
20629 - 843, 337, 337, 844, 420, 845, 89, 89, 89, 89,
20630 - 89, 89, 816, 89, 400, 306, 89, 306, 89, 337,
20631 - 89, 337, 421, 846, 400, 306, 818, 847, 623, 89,
20632 - 849, 400, 306, 306, 623, 850, 851, 89, 89, 89,
20633 - 89, 89, 89, 310, 89, 310, 89, 852, 89, 337,
20634 - 89, 337, 854, 310, 404, 855, 89, 97, 97, 856,
20635 - 310, 310, 858, 405, 404, 97, 97, 97, 97, 97,
20636 - 97, 404, 97, 405, 859, 331, 97, 331, 860, 97,
20637 - 405, 861, 862, 97, 97, 331, 863, 864, 97, 865,
20638 - 866, 867, 331, 331, 868, 870, 97, 97, 97, 97,
20640 - 97, 97, 311, 97, 311, 506, 311, 506, 871, 97,
20641 - 872, 874, 311, 876, 877, 97, 120, 120, 878, 311,
20642 - 311, 331, 879, 880, 120, 120, 120, 120, 120, 120,
20643 - 508, 881, 508, 882, 517, 506, 517, 506, 883, 884,
20644 - 508, 517, 885, 886, 517, 887, 508, 508, 508, 888,
20645 - 889, 517, 517, 890, 891, 120, 120, 120, 120, 120,
20646 - 120, 150, 150, 892, 893, 895, 896, 897, 898, 150,
20647 - 150, 150, 150, 150, 150, 901, 902, 904, 906, 907,
20648 - 909, 910, 895, 911, 912, 913, 914, 915, 916, 917,
20649 - 918, 920, 921, 922, 923, 925, 926, 927, 929, 930,
20651 - 150, 150, 150, 150, 150, 150, 157, 157, 931, 932,
20652 - 933, 934, 935, 936, 157, 157, 157, 157, 157, 157,
20653 - 938, 939, 940, 944, 946, 947, 949, 950, 951, 955,
20654 - 957, 958, 959, 960, 961, 962, 964, 965, 966, 967,
20655 - 968, 969, 970, 972, 973, 157, 157, 157, 157, 157,
20656 - 157, 170, 170, 974, 976, 978, 979, 981, 983, 170,
20657 - 170, 170, 170, 170, 170, 984, 170, 985, 986, 987,
20658 - 170, 988, 989, 170, 990, 991, 992, 993, 996, 959,
20659 - 958, 997, 170, 998, 999, 1000, 1002, 1003, 1004, 1005,
20660 - 170, 170, 170, 170, 170, 170, 1006, 170, 1008, 1009,
20662 - 1011, 1013, 1014, 170, 1015, 1016, 1017, 1018, 1019, 170,
20663 - 216, 216, 1020, 1021, 1022, 1024, 1025, 1026, 216, 216,
20664 - 216, 216, 216, 216, 1027, 1028, 1029, 1030, 216, 1032,
20665 - 216, 1033, 1034, 1036, 1038, 1039, 1041, 1043, 1044, 1045,
20666 - 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1056, 216,
20667 - 216, 216, 216, 216, 216, 1057, 1058, 1059, 216, 1060,
20668 - 216, 285, 285, 1064, 1065, 1066, 1070, 1071, 1072, 285,
20669 - 285, 285, 285, 285, 285, 1073, 1075, 1076, 1077, 285,
20670 - 1078, 285, 1079, 1081, 1082, 1084, 1085, 1086, 1088, 1089,
20671 - 1091, 1092, 1093, 1094, 1089, 1095, 1096, 1099, 1101, 1102,
20673 - 285, 285, 285, 285, 285, 285, 1103, 1105, 1106, 285,
20674 - 1107, 285, 334, 334, 1109, 1110, 1111, 1112, 1114, 1115,
20675 - 334, 334, 334, 334, 334, 334, 1116, 1118, 1119, 1120,
20676 - 334, 1121, 334, 1123, 1124, 1125, 1126, 1127, 1129, 1130,
20677 - 1132, 1133, 1134, 1136, 1137, 1139, 1140, 1141, 1142, 1137,
20678 - 1143, 334, 334, 334, 334, 334, 334, 1144, 1147, 1149,
20679 - 334, 1150, 334, 391, 391, 1151, 1152, 1153, 1154, 1155,
20680 - 1156, 391, 391, 391, 391, 391, 391, 1158, 1160, 1161,
20681 - 1162, 391, 1163, 391, 1164, 1165, 1167, 1168, 1169, 1170,
20682 - 1171, 1172, 1174, 1175, 1179, 1176, 1181, 1183, 1184, 1186,
20684 - 1187, 1188, 391, 391, 391, 391, 391, 391, 1176, 1189,
20685 - 1190, 391, 1193, 391, 395, 395, 1195, 1197, 1198, 1199,
20686 - 1200, 1201, 395, 395, 395, 395, 395, 395, 1202, 1204,
20687 - 1205, 1206, 395, 1207, 395, 1208, 1209, 1211, 1212, 1213,
20688 - 1216, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1232, 1233,
20689 - 1234, 1231, 1213, 395, 395, 395, 395, 395, 395, 1231,
20690 - 1235, 1236, 395, 1237, 395, 792, 792, 1238, 792, 792,
20691 - 792, 1239, 792, 792, 792, 792, 792, 1240, 792, 1242,
20692 - 1243, 1244, 1245, 1246, 1247, 792, 792, 792, 792, 792,
20693 - 1245, 1248, 1249, 1251, 1252, 1253, 1254, 1255, 1256, 1257,
20695 - 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1258, 1266,
20696 - 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1277, 792,
20697 - 1278, 1279, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288,
20698 - 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300,
20699 - 1301, 1304, 792, 792, 792, 808, 808, 1305, 808, 808,
20700 - 808, 1306, 808, 808, 808, 808, 808, 1308, 808, 1309,
20701 - 1310, 1311, 1312, 1313, 1314, 808, 808, 808, 808, 808,
20702 - 1315, 1316, 1317, 1318, 1321, 1322, 1323, 1324, 1325, 1326,
20703 - 1327, 1328, 1329, 1331, 1332, 1333, 1334, 1335, 1336, 1337,
20704 - 1338, 1339, 1340, 1343, 1344, 1345, 1346, 1347, 1348, 808,
20706 - 1349, 1351, 1352, 1354, 1355, 1356, 1357, 1358, 1359, 1360,
20707 - 1362, 1363, 1365, 1366, 1367, 1368, 1370, 1371, 1373, 1374,
20708 - 1375, 1376, 808, 808, 808, 942, 942, 1377, 942, 942,
20709 - 942, 1378, 942, 942, 942, 942, 942, 1379, 942, 1381,
20710 - 1382, 1384, 1385, 1387, 1389, 942, 942, 942, 942, 942,
20711 - 1383, 1390, 1391, 1392, 1383, 1393, 1395, 1392, 1396, 1397,
20712 - 1398, 1399, 1400, 1402, 1398, 1404, 1405, 1383, 1406, 1407,
20713 - 1392, 1408, 1409, 1410, 1411, 1412, 1415, 1398, 1417, 942,
20714 - 1418, 1419, 1423, 1424, 1425, 1426, 1427, 1428, 1431, 1433,
20715 - 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443,
20717 - 1444, 1445, 942, 942, 942, 953, 953, 1446, 953, 953,
20718 - 953, 1447, 953, 953, 953, 953, 953, 1448, 953, 1449,
20719 - 1450, 1451, 1453, 1454, 1455, 953, 953, 953, 953, 953,
20720 - 1456, 1457, 1459, 1460, 1461, 1463, 1464, 1465, 1466, 1467,
20721 - 1468, 1469, 1470, 1471, 1473, 1474, 1475, 1476, 1477, 1478,
20722 - 1479, 1481, 1483, 1484, 1485, 1487, 1488, 1490, 1491, 953,
20723 - 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501,
20724 - 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1512,
20725 - 1513, 1514, 953, 953, 953, 1515, 1517, 1518, 1519, 1521,
20726 - 1522, 1525, 1526, 1528, 1530, 1531, 1532, 1536, 1536, 1536,
20728 - 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1536, 1537, 1537,
20729 - 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1537, 1538,
20730 - 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538, 1538,
20731 - 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539, 1539,
20732 - 1539, 1540, 1540, 1540, 1540, 1540, 1540, 1540, 1540, 1540,
20733 - 1540, 1540, 1541, 1541, 1541, 1541, 1541, 1541, 1541, 1541,
20734 - 1541, 1541, 1541, 1542, 1542, 1542, 1542, 1542, 1542, 1542,
20735 - 1542, 1543, 1554, 1543, 811, 1543, 1543, 1543, 1543, 1544,
20736 - 807, 1544, 1544, 1544, 1544, 1544, 1544, 1545, 806, 802,
20737 - 801, 800, 1545, 1545, 1545, 1546, 1546, 1546, 1546, 1546,
20739 - 1546, 1546, 1546, 1546, 1546, 1546, 1547, 799, 1547, 798,
20740 - 1547, 1547, 1547, 1547, 1548, 796, 1548, 1548, 1548, 1548,
20741 - 1548, 1548, 1548, 1548, 1548, 1549, 795, 1549, 1549, 1549,
20742 - 1549, 1549, 1549, 1549, 1549, 1549, 1550, 791, 1550, 1550,
20743 - 1550, 1550, 1550, 1550, 1550, 1550, 1550, 1551, 790, 1551,
20744 - 1552, 1552, 1552, 786, 785, 1552, 1552, 784, 1552, 1553,
20745 - 783, 1553, 782, 1553, 1553, 1553, 1553, 1555, 781, 1555,
20746 - 1555, 1555, 1555, 1555, 1555, 1556, 780, 1556, 1556, 1556,
20747 - 1556, 1556, 1556, 1556, 1556, 1556, 1557, 779, 1557, 1557,
20748 - 1557, 1557, 1557, 1557, 1557, 1557, 1557, 1558, 778, 1558,
20750 - 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1558, 1559, 777,
20751 - 1559, 1559, 1559, 1559, 1559, 1559, 1559, 1559, 1559, 776,
20752 - 775, 774, 773, 772, 771, 770, 769, 767, 766, 765,
20753 - 764, 763, 762, 761, 760, 759, 757, 755, 754, 752,
20754 - 751, 749, 748, 747, 746, 744, 743, 742, 741, 740,
20755 - 739, 738, 736, 734, 732, 731, 730, 728, 727, 726,
20756 - 725, 724, 723, 722, 721, 720, 719, 718, 717, 716,
20757 - 714, 713, 710, 709, 708, 707, 706, 704, 703, 701,
20758 - 700, 699, 697, 696, 695, 694, 693, 692, 691, 690,
20759 - 689, 688, 687, 686, 685, 684, 683, 682, 680, 679,
20761 - 678, 677, 676, 675, 674, 673, 672, 670, 668, 667,
20762 - 665, 664, 662, 661, 660, 659, 657, 656, 655, 654,
20763 - 653, 652, 651, 649, 647, 645, 644, 643, 641, 637,
20764 - 636, 635, 634, 633, 632, 631, 630, 629, 628, 626,
20765 - 625, 624, 622, 621, 620, 619, 618, 617, 616, 615,
20766 - 614, 613, 612, 610, 609, 608, 606, 603, 600, 599,
20767 - 598, 597, 596, 595, 594, 593, 592, 591, 590, 589,
20768 - 588, 587, 586, 585, 584, 583, 582, 581, 580, 579,
20769 - 578, 577, 576, 574, 571, 570, 569, 568, 567, 566,
20770 - 565, 564, 562, 561, 560, 559, 558, 557, 556, 555,
20772 - 554, 553, 552, 551, 550, 549, 548, 547, 546, 545,
20773 - 544, 543, 542, 539, 538, 537, 536, 535, 534, 533,
20774 - 532, 531, 530, 529, 528, 527, 524, 523, 522, 521,
20775 - 520, 519, 518, 516, 515, 514, 513, 512, 511, 510,
20776 - 509, 507, 503, 500, 499, 498, 497, 496, 495, 494,
20777 - 493, 492, 491, 490, 489, 488, 487, 486, 485, 484,
20778 - 483, 482, 481, 480, 479, 478, 477, 476, 475, 473,
20779 - 472, 471, 470, 469, 468, 467, 466, 464, 463, 462,
20780 - 461, 460, 459, 458, 457, 456, 455, 454, 453, 452,
20781 - 451, 450, 449, 448, 447, 446, 445, 444, 438, 437,
20783 - 434, 433, 432, 431, 430, 429, 428, 427, 426, 425,
20784 - 424, 423, 422, 419, 417, 416, 415, 414, 413, 412,
20785 - 411, 410, 409, 408, 407, 406, 403, 392, 389, 388,
20786 - 387, 386, 385, 384, 383, 382, 381, 380, 379, 378,
20787 - 377, 376, 374, 373, 372, 371, 370, 369, 368, 366,
20788 - 365, 364, 361, 360, 358, 357, 356, 355, 354, 352,
20789 - 351, 350, 349, 348, 346, 345, 344, 341, 340, 339,
20790 - 332, 330, 329, 328, 327, 326, 325, 324, 323, 321,
20791 - 320, 319, 318, 317, 316, 315, 314, 313, 312, 308,
20792 - 307, 303, 281, 280, 279, 278, 277, 276, 275, 274,
20794 - 273, 272, 271, 270, 269, 268, 266, 265, 264, 263,
20795 - 262, 261, 260, 258, 257, 256, 254, 253, 251, 250,
20796 - 249, 248, 247, 245, 244, 243, 242, 241, 239, 238,
20797 - 237, 234, 233, 232, 231, 227, 213, 211, 205, 199,
20798 - 196, 194, 192, 191, 190, 181, 179, 178, 177, 168,
20799 - 163, 161, 159, 158, 156, 148, 147, 146, 145, 144,
20800 - 143, 141, 135, 134, 133, 132, 115, 110, 105, 104,
20801 - 103, 94, 84, 83, 77, 76, 75, 69, 68, 67,
20802 - 66, 63, 62, 60, 54, 53, 52, 51, 42, 34,
20803 - 32, 31, 25, 24, 22, 19, 1535, 1535, 1535, 1535,
20805 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20806 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20807 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20808 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20809 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20810 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20811 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535,
20812 - 1535, 1535, 1535, 1535, 1535, 1535, 1535, 1535
20813 + 15, 15, 15, 15, 15, 121, 15, 15, 15, 15,
20814 + 15, 15, 15, 15, 15, 15, 38, 38, 38, 180,
20815 + 100, 100, 108, 100, 100, 109, 108, 812, 292, 109,
20816 + 101, 100, 101, 109, 180, 38, 108, 38, 100, 100,
20817 + 101, 128, 15, 15, 15, 15, 111, 101, 101, 121,
20818 + 111, 128, 101, 131, 128, 292, 131, 111, 189, 131,
20819 + 129, 813, 111, 189, 129, 38, 208, 38, 15, 15,
20820 + 15, 15, 16, 16, 16, 16, 16, 16, 129, 16,
20821 + 16, 16, 16, 16, 16, 16, 16, 206, 16, 16,
20822 + 16, 16, 16, 16, 16, 16, 16, 16, 37, 37,
20824 + 37, 136, 193, 102, 137, 102, 127, 814, 137, 127,
20825 + 818, 136, 137, 102, 138, 193, 208, 37, 138, 37,
20826 + 102, 102, 127, 246, 16, 16, 16, 16, 138, 139,
20827 + 37, 140, 173, 139, 171, 171, 139, 139, 185, 207,
20828 + 246, 140, 173, 206, 240, 171, 240, 37, 185, 37,
20829 + 16, 16, 16, 16, 17, 17, 17, 37, 17, 17,
20830 + 324, 17, 17, 17, 17, 819, 17, 17, 185, 324,
20831 + 17, 17, 17, 17, 17, 17, 17, 17, 17, 114,
20832 + 175, 114, 126, 310, 126, 310, 207, 646, 186, 114,
20833 + 175, 142, 126, 175, 142, 142, 114, 114, 186, 126,
20835 + 126, 142, 142, 142, 174, 823, 142, 142, 235, 255,
20836 + 114, 142, 172, 172, 174, 17, 174, 17, 186, 172,
20837 + 235, 17, 255, 172, 824, 186, 174, 647, 646, 187,
20838 + 304, 826, 17, 17, 17, 17, 18, 18, 18, 187,
20839 + 18, 18, 304, 18, 18, 18, 18, 827, 18, 18,
20840 + 831, 184, 18, 18, 18, 18, 18, 18, 18, 18,
20841 + 18, 184, 124, 124, 124, 647, 226, 188, 226, 832,
20842 + 259, 187, 344, 259, 125, 125, 125, 188, 187, 259,
20843 + 833, 124, 184, 124, 344, 224, 224, 224, 356, 365,
20844 + 299, 184, 299, 125, 124, 125, 226, 18, 226, 18,
20846 + 299, 366, 365, 18, 224, 356, 224, 299, 299, 366,
20847 + 188, 124, 834, 124, 18, 18, 18, 18, 26, 26,
20848 + 26, 124, 350, 125, 350, 125, 837, 26, 26, 26,
20849 + 26, 26, 26, 445, 224, 252, 224, 267, 252, 267,
20850 + 252, 362, 371, 267, 362, 371, 362, 379, 252, 379,
20851 + 615, 371, 838, 379, 362, 648, 615, 403, 26, 26,
20852 + 26, 26, 26, 26, 78, 78, 78, 403, 839, 300,
20853 + 405, 300, 445, 78, 78, 78, 78, 78, 78, 300,
20854 + 405, 293, 293, 293, 404, 631, 300, 300, 444, 443,
20855 + 830, 631, 648, 422, 404, 339, 339, 339, 842, 829,
20857 + 293, 404, 293, 422, 78, 78, 78, 78, 78, 78,
20858 + 89, 89, 89, 293, 339, 828, 339, 408, 409, 89,
20859 + 89, 89, 89, 89, 89, 843, 89, 408, 409, 89,
20860 + 293, 89, 293, 89, 408, 409, 829, 830, 444, 422,
20861 + 293, 845, 89, 443, 339, 847, 339, 848, 836, 850,
20862 + 89, 89, 89, 89, 89, 89, 301, 89, 301, 89,
20863 + 851, 89, 510, 89, 510, 836, 301, 828, 852, 89,
20864 + 97, 97, 97, 301, 301, 424, 853, 854, 425, 97,
20865 + 97, 97, 97, 97, 97, 424, 97, 855, 425, 306,
20866 + 97, 306, 510, 97, 510, 856, 857, 97, 97, 306,
20868 + 858, 859, 97, 861, 862, 863, 306, 306, 864, 866,
20869 + 97, 97, 97, 97, 97, 97, 867, 97, 309, 868,
20870 + 309, 424, 870, 97, 425, 309, 871, 872, 309, 97,
20871 + 120, 120, 120, 873, 874, 309, 309, 875, 876, 120,
20872 + 120, 120, 120, 120, 120, 311, 877, 311, 312, 878,
20873 + 312, 333, 312, 333, 879, 311, 880, 882, 312, 883,
20874 + 884, 333, 311, 311, 885, 312, 312, 887, 333, 333,
20875 + 120, 120, 120, 120, 120, 120, 150, 150, 150, 889,
20876 + 890, 891, 512, 892, 512, 150, 150, 150, 150, 150,
20877 + 150, 893, 512, 894, 522, 895, 522, 333, 512, 512,
20879 + 512, 522, 896, 897, 522, 898, 899, 900, 901, 902,
20880 + 903, 522, 522, 904, 905, 906, 150, 150, 150, 150,
20881 + 150, 150, 157, 157, 157, 907, 909, 910, 911, 912,
20882 + 913, 157, 157, 157, 157, 157, 157, 916, 917, 919,
20883 + 921, 922, 924, 925, 910, 926, 927, 928, 929, 930,
20884 + 931, 932, 933, 934, 936, 937, 938, 939, 941, 942,
20885 + 943, 945, 157, 157, 157, 157, 157, 157, 170, 170,
20886 + 170, 946, 947, 948, 949, 950, 951, 170, 170, 170,
20887 + 170, 170, 170, 952, 170, 954, 955, 956, 170, 960,
20888 + 962, 170, 963, 965, 966, 967, 971, 973, 975, 974,
20890 + 170, 976, 977, 978, 980, 981, 982, 983, 170, 170,
20891 + 170, 170, 170, 170, 984, 170, 985, 986, 988, 989,
20892 + 990, 170, 992, 994, 995, 997, 999, 170, 216, 216,
20893 + 216, 1000, 1001, 1002, 1003, 1004, 1005, 216, 216, 216,
20894 + 216, 216, 216, 1006, 1007, 975, 1008, 216, 974, 216,
20895 + 1009, 1012, 1013, 1014, 1015, 1016, 1018, 1020, 1021, 1022,
20896 + 1023, 1025, 1026, 1027, 1029, 1031, 1032, 1033, 216, 216,
20897 + 216, 216, 216, 216, 1034, 1035, 1036, 216, 1037, 216,
20898 + 285, 285, 285, 1038, 1039, 1040, 1042, 1044, 1045, 285,
20899 + 285, 285, 285, 285, 285, 1046, 1047, 1048, 1049, 285,
20901 + 1051, 285, 1052, 1053, 1055, 1057, 1058, 1059, 1061, 1063,
20902 + 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073,
20903 + 285, 285, 285, 285, 285, 285, 1076, 1077, 1078, 285,
20904 + 1079, 285, 336, 336, 336, 1080, 1084, 1085, 1086, 1090,
20905 + 1091, 336, 336, 336, 336, 336, 336, 1092, 1093, 1095,
20906 + 1096, 336, 1097, 336, 1098, 1099, 1101, 1102, 1104, 1105,
20907 + 1106, 1108, 1109, 1111, 1112, 1113, 1114, 1109, 1115, 1116,
20908 + 1119, 1121, 336, 336, 336, 336, 336, 336, 1122, 1123,
20909 + 1125, 336, 1126, 336, 395, 395, 395, 1127, 1129, 1130,
20910 + 1131, 1132, 1133, 395, 395, 395, 395, 395, 395, 1135,
20912 + 1136, 1137, 1139, 395, 1140, 395, 1141, 1142, 1144, 1145,
20913 + 1146, 1147, 1148, 1150, 1151, 1153, 1154, 1155, 1156, 1158,
20914 + 1161, 1162, 1163, 1164, 395, 395, 395, 395, 395, 395,
20915 + 1165, 1166, 1169, 395, 1159, 395, 399, 399, 399, 1159,
20916 + 1171, 1172, 1173, 1174, 1175, 399, 399, 399, 399, 399,
20917 + 399, 1176, 1177, 1178, 1180, 399, 1182, 399, 1183, 1184,
20918 + 1185, 1186, 1187, 1189, 1190, 1191, 1192, 1193, 1194, 1196,
20919 + 1197, 1198, 1201, 1203, 1205, 1206, 399, 399, 399, 399,
20920 + 399, 399, 1208, 1209, 1198, 399, 1210, 399, 804, 804,
20921 + 1211, 804, 804, 804, 1212, 804, 804, 804, 804, 804,
20923 + 1213, 804, 1216, 1218, 1220, 1221, 1222, 1223, 1224, 804,
20924 + 804, 804, 804, 804, 1225, 1227, 1228, 1229, 1230, 1231,
20925 + 1232, 1233, 1235, 1236, 1237, 1240, 1248, 1249, 1250, 1251,
20926 + 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1237, 1259, 1260,
20927 + 1261, 1255, 1262, 804, 1263, 1264, 1266, 1267, 1269, 1270,
20928 + 1271, 1272, 1273, 1274, 1276, 1277, 1278, 1270, 1279, 1280,
20929 + 1281, 1283, 1285, 1284, 1286, 1287, 804, 804, 804, 820,
20930 + 820, 1284, 820, 820, 820, 1288, 820, 820, 820, 820,
20931 + 820, 1289, 820, 1290, 1291, 1292, 1293, 1294, 1295, 1296,
20932 + 820, 820, 820, 820, 820, 1297, 1298, 1299, 1300, 1303,
20934 + 1304, 1305, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314,
20935 + 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326,
20936 + 1327, 1330, 1331, 1332, 820, 1334, 1335, 1336, 1337, 1338,
20937 + 1339, 1340, 1341, 1342, 1343, 1344, 1347, 1348, 1349, 1350,
20938 + 1351, 1352, 1353, 1354, 1355, 1357, 1358, 820, 820, 820,
20939 + 958, 958, 1359, 958, 958, 958, 1360, 958, 958, 958,
20940 + 958, 958, 1361, 958, 1362, 1363, 1364, 1365, 1366, 1369,
20941 + 1370, 958, 958, 958, 958, 958, 1371, 1372, 1373, 1374,
20942 + 1375, 1377, 1378, 1380, 1381, 1382, 1383, 1384, 1385, 1386,
20943 + 1388, 1389, 1391, 1392, 1393, 1394, 1396, 1397, 1399, 1400,
20945 + 1401, 1402, 1403, 1404, 1405, 958, 1407, 1408, 1409, 1410,
20946 + 1411, 1413, 1409, 1415, 1416, 1417, 1418, 1419, 1421, 1422,
20947 + 1418, 1423, 1425, 1426, 1428, 1409, 1430, 1431, 958, 958,
20948 + 958, 969, 969, 1418, 969, 969, 969, 1432, 969, 969,
20949 + 969, 969, 969, 1424, 969, 1433, 1434, 1424, 1435, 1436,
20950 + 1437, 1438, 969, 969, 969, 969, 969, 1441, 1443, 1444,
20951 + 1424, 1445, 1449, 1450, 1451, 1452, 1453, 1454, 1457, 1459,
20952 + 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469,
20953 + 1470, 1471, 1472, 1473, 1474, 1475, 969, 1476, 1477, 1479,
20954 + 1480, 1481, 1482, 1483, 1485, 1486, 1487, 1489, 1490, 1491,
20956 + 1492, 1493, 1494, 1495, 1496, 1497, 1499, 1500, 1501, 969,
20957 + 969, 969, 1502, 1503, 1504, 1505, 1507, 1509, 1510, 1511,
20958 + 1513, 1514, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523,
20959 + 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533,
20960 + 1534, 1535, 1536, 1538, 1539, 1540, 1541, 1543, 1544, 1545,
20961 + 1547, 1548, 1551, 1552, 1554, 1556, 1557, 1558, 1562, 1562,
20962 + 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1562, 1563,
20963 + 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563, 1563,
20964 + 1564, 1564, 1564, 1564, 1564, 1564, 1564, 1564, 1564, 1564,
20965 + 1564, 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565, 1565,
20967 + 1565, 1565, 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
20968 + 1566, 1566, 1566, 1567, 1567, 1567, 1567, 1567, 1567, 1567,
20969 + 1567, 1567, 1567, 1567, 1568, 1568, 1568, 1568, 1568, 1568,
20970 + 1568, 1568, 1569, 1580, 1569, 802, 1569, 1569, 1569, 1569,
20971 + 1570, 798, 1570, 1570, 1570, 1570, 1570, 1570, 1571, 797,
20972 + 796, 795, 794, 1571, 1571, 1571, 1572, 1572, 1572, 1572,
20973 + 1572, 1572, 1572, 1572, 1572, 1572, 1572, 1573, 793, 1573,
20974 + 792, 1573, 1573, 1573, 1573, 1574, 791, 1574, 1574, 1574,
20975 + 1574, 1574, 1574, 1574, 1574, 1574, 1575, 790, 1575, 1575,
20976 + 1575, 1575, 1575, 1575, 1575, 1575, 1575, 1576, 789, 1576,
20978 + 1576, 1576, 1576, 1576, 1576, 1576, 1576, 1576, 1577, 788,
20979 + 1577, 1578, 1578, 1578, 787, 786, 1578, 1578, 785, 1578,
20980 + 1579, 784, 1579, 783, 1579, 1579, 1579, 1579, 1581, 782,
20981 + 1581, 1581, 1581, 1581, 1581, 1581, 1582, 781, 1582, 1582,
20982 + 1582, 1582, 1582, 1582, 1582, 1582, 1582, 1583, 779, 1583,
20983 + 1583, 1583, 1583, 1583, 1583, 1583, 1583, 1583, 1584, 778,
20984 + 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1584, 1585,
20985 + 777, 1585, 1585, 1585, 1585, 1585, 1585, 1585, 1585, 1585,
20986 + 776, 775, 774, 773, 772, 771, 769, 768, 766, 765,
20987 + 763, 762, 760, 759, 758, 757, 755, 754, 753, 752,
20989 + 751, 750, 749, 747, 746, 744, 742, 741, 740, 738,
20990 + 737, 736, 735, 734, 733, 732, 731, 730, 729, 728,
20991 + 727, 726, 724, 723, 722, 719, 718, 717, 716, 715,
20992 + 713, 712, 711, 709, 708, 707, 705, 704, 703, 702,
20993 + 701, 700, 699, 698, 697, 696, 695, 694, 693, 692,
20994 + 691, 690, 688, 687, 686, 685, 684, 683, 682, 681,
20995 + 680, 678, 676, 675, 673, 672, 670, 669, 668, 667,
20996 + 665, 664, 663, 662, 661, 660, 659, 657, 655, 653,
20997 + 652, 651, 649, 645, 644, 643, 642, 641, 640, 639,
20998 + 638, 637, 636, 634, 633, 632, 630, 629, 628, 627,
21000 + 626, 625, 624, 623, 622, 621, 620, 618, 617, 616,
21001 + 614, 611, 608, 607, 606, 605, 604, 603, 602, 601,
21002 + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591,
21003 + 590, 589, 588, 587, 586, 585, 584, 583, 581, 578,
21004 + 577, 576, 575, 574, 573, 572, 571, 569, 568, 567,
21005 + 566, 565, 564, 563, 562, 561, 560, 559, 558, 557,
21006 + 556, 555, 554, 553, 552, 551, 550, 549, 548, 545,
21007 + 544, 543, 542, 541, 540, 539, 538, 537, 536, 535,
21008 + 534, 533, 532, 529, 528, 527, 526, 525, 524, 523,
21009 + 521, 520, 519, 518, 517, 516, 515, 514, 513, 511,
21011 + 507, 504, 503, 502, 501, 500, 499, 498, 497, 496,
21012 + 495, 494, 493, 492, 491, 490, 489, 488, 487, 486,
21013 + 485, 484, 483, 482, 481, 480, 479, 477, 476, 475,
21014 + 474, 473, 472, 471, 470, 468, 467, 466, 465, 464,
21015 + 463, 462, 461, 460, 459, 458, 457, 456, 455, 454,
21016 + 453, 452, 451, 450, 449, 448, 442, 441, 438, 437,
21017 + 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
21018 + 426, 423, 421, 420, 419, 418, 417, 416, 415, 414,
21019 + 413, 412, 411, 410, 407, 396, 393, 392, 391, 390,
21020 + 389, 388, 387, 386, 385, 384, 383, 382, 381, 380,
21022 + 378, 377, 376, 375, 374, 373, 372, 370, 369, 368,
21023 + 367, 364, 363, 361, 360, 359, 358, 357, 355, 354,
21024 + 353, 352, 351, 349, 348, 347, 346, 343, 342, 341,
21025 + 334, 332, 331, 330, 329, 328, 327, 326, 325, 323,
21026 + 322, 321, 320, 319, 318, 317, 316, 315, 314, 313,
21027 + 308, 307, 303, 281, 280, 279, 278, 277, 276, 275,
21028 + 274, 273, 272, 271, 270, 269, 268, 266, 265, 264,
21029 + 263, 262, 261, 260, 258, 257, 256, 254, 253, 251,
21030 + 250, 249, 248, 247, 245, 244, 243, 242, 241, 239,
21031 + 238, 237, 234, 233, 232, 231, 227, 213, 211, 205,
21033 + 199, 196, 194, 192, 191, 190, 181, 179, 178, 177,
21034 + 168, 163, 161, 159, 158, 156, 148, 147, 146, 145,
21035 + 144, 143, 141, 135, 134, 133, 132, 115, 110, 105,
21036 + 104, 103, 94, 84, 83, 77, 76, 75, 69, 68,
21037 + 67, 66, 63, 62, 60, 54, 53, 52, 51, 42,
21038 + 34, 32, 31, 25, 24, 22, 19, 1561, 1561, 1561,
21039 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21040 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21041 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21042 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21044 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21045 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21046 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561,
21047 + 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561, 1561
21050 static yy_state_type yy_last_accepting_state;
21051 @@ -1627,7 +1638,7 @@
21055 -#line 1631 "ldlex.c"
21056 +#line 1642 "ldlex.c"
21058 #define INITIAL 0
21059 #define SCRIPT 1
21060 @@ -1651,8 +1662,6 @@
21061 #define YY_EXTRA_TYPE void *
21062 #endif
21064 -static int yy_init_globals (void );
21066 /* Macros after this point can all be overridden by user definitions in
21067 * section 1.
21069 @@ -1807,11 +1816,11 @@
21073 -#line 1811 "ldlex.c"
21074 +#line 1820 "ldlex.c"
21076 - if ( !(yy_init) )
21077 + if ( (yy_init) )
21079 - (yy_init) = 1;
21080 + (yy_init) = 0;
21082 #ifdef YY_USER_INIT
21083 YY_USER_INIT;
21084 @@ -1860,13 +1869,13 @@
21085 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
21087 yy_current_state = (int) yy_def[yy_current_state];
21088 - if ( yy_current_state >= 1536 )
21089 + if ( yy_current_state >= 1562 )
21090 yy_c = yy_meta[(unsigned int) yy_c];
21092 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
21093 ++yy_cp;
21095 - while ( yy_base[yy_current_state] != 2497 );
21096 + while ( yy_base[yy_current_state] != 2558 );
21098 yy_find_action:
21099 yy_act = yy_accept[yy_current_state];
21100 @@ -2254,192 +2263,192 @@
21101 case 62:
21102 YY_RULE_SETUP
21103 #line 256 "ldlex.l"
21104 -{ RTOKEN(ASSERT_K); }
21105 +{ RTOKEN(CEILP2); }
21106 YY_BREAK
21107 case 63:
21108 YY_RULE_SETUP
21109 #line 257 "ldlex.l"
21110 -{ RTOKEN(ENTRY);}
21111 +{ RTOKEN(NACL_MASK);}
21112 YY_BREAK
21113 case 64:
21114 YY_RULE_SETUP
21115 #line 258 "ldlex.l"
21116 -{ RTOKEN(EXTERN);}
21117 +{ RTOKEN(ASSERT_K); }
21118 YY_BREAK
21119 case 65:
21120 YY_RULE_SETUP
21121 #line 259 "ldlex.l"
21122 -{ RTOKEN(NEXT);}
21123 +{ RTOKEN(ENTRY);}
21124 YY_BREAK
21125 case 66:
21126 YY_RULE_SETUP
21127 #line 260 "ldlex.l"
21128 -{ RTOKEN(SIZEOF_HEADERS);}
21129 +{ RTOKEN(EXTERN);}
21130 YY_BREAK
21131 case 67:
21132 YY_RULE_SETUP
21133 #line 261 "ldlex.l"
21134 -{ RTOKEN(SIZEOF_HEADERS);}
21135 +{ RTOKEN(NEXT);}
21136 YY_BREAK
21137 case 68:
21138 YY_RULE_SETUP
21139 #line 262 "ldlex.l"
21140 -{ RTOKEN(SEGMENT_START);}
21141 +{ RTOKEN(SIZEOF_HEADERS);}
21142 YY_BREAK
21143 case 69:
21144 YY_RULE_SETUP
21145 #line 263 "ldlex.l"
21146 -{ RTOKEN(MAP);}
21147 +{ RTOKEN(SIZEOF_HEADERS);}
21148 YY_BREAK
21149 case 70:
21150 YY_RULE_SETUP
21151 #line 264 "ldlex.l"
21152 -{ RTOKEN(SIZEOF);}
21153 +{ RTOKEN(SEGMENT_START);}
21154 YY_BREAK
21155 case 71:
21156 YY_RULE_SETUP
21157 #line 265 "ldlex.l"
21158 -{ RTOKEN(TARGET_K);}
21159 +{ RTOKEN(MAP);}
21160 YY_BREAK
21161 case 72:
21162 YY_RULE_SETUP
21163 #line 266 "ldlex.l"
21164 -{ RTOKEN(SEARCH_DIR);}
21165 +{ RTOKEN(SIZEOF);}
21166 YY_BREAK
21167 case 73:
21168 YY_RULE_SETUP
21169 #line 267 "ldlex.l"
21170 -{ RTOKEN(OUTPUT);}
21171 +{ RTOKEN(TARGET_K);}
21172 YY_BREAK
21173 case 74:
21174 YY_RULE_SETUP
21175 #line 268 "ldlex.l"
21176 -{ RTOKEN(INPUT);}
21177 +{ RTOKEN(SEARCH_DIR);}
21178 YY_BREAK
21179 case 75:
21180 YY_RULE_SETUP
21181 #line 269 "ldlex.l"
21182 -{ RTOKEN(GROUP);}
21183 +{ RTOKEN(OUTPUT);}
21184 YY_BREAK
21185 case 76:
21186 YY_RULE_SETUP
21187 #line 270 "ldlex.l"
21188 -{ RTOKEN(AS_NEEDED);}
21189 +{ RTOKEN(INPUT);}
21190 YY_BREAK
21191 case 77:
21192 YY_RULE_SETUP
21193 #line 271 "ldlex.l"
21194 -{ RTOKEN(DEFINED);}
21195 +{ RTOKEN(GROUP);}
21196 YY_BREAK
21197 case 78:
21198 YY_RULE_SETUP
21199 #line 272 "ldlex.l"
21200 -{ RTOKEN(CREATE_OBJECT_SYMBOLS);}
21201 +{ RTOKEN(AS_NEEDED);}
21202 YY_BREAK
21203 case 79:
21204 YY_RULE_SETUP
21205 #line 273 "ldlex.l"
21206 -{ RTOKEN( CONSTRUCTORS);}
21207 +{ RTOKEN(DEFINED);}
21208 YY_BREAK
21209 case 80:
21210 YY_RULE_SETUP
21211 #line 274 "ldlex.l"
21212 -{ RTOKEN(FORCE_COMMON_ALLOCATION);}
21213 +{ RTOKEN(CREATE_OBJECT_SYMBOLS);}
21214 YY_BREAK
21215 case 81:
21216 YY_RULE_SETUP
21217 #line 275 "ldlex.l"
21218 -{ RTOKEN(INHIBIT_COMMON_ALLOCATION);}
21219 +{ RTOKEN( CONSTRUCTORS);}
21220 YY_BREAK
21221 case 82:
21222 YY_RULE_SETUP
21223 #line 276 "ldlex.l"
21224 -{ RTOKEN(SECTIONS);}
21225 +{ RTOKEN(FORCE_COMMON_ALLOCATION);}
21226 YY_BREAK
21227 case 83:
21228 YY_RULE_SETUP
21229 #line 277 "ldlex.l"
21230 -{ RTOKEN(FILL);}
21231 +{ RTOKEN(INHIBIT_COMMON_ALLOCATION);}
21232 YY_BREAK
21233 case 84:
21234 YY_RULE_SETUP
21235 #line 278 "ldlex.l"
21236 -{ RTOKEN(STARTUP);}
21237 +{ RTOKEN(SECTIONS);}
21238 YY_BREAK
21239 case 85:
21240 YY_RULE_SETUP
21241 #line 279 "ldlex.l"
21242 -{ RTOKEN(OUTPUT_FORMAT);}
21243 +{ RTOKEN(FILL);}
21244 YY_BREAK
21245 case 86:
21246 YY_RULE_SETUP
21247 #line 280 "ldlex.l"
21248 -{ RTOKEN( OUTPUT_ARCH);}
21249 +{ RTOKEN(STARTUP);}
21250 YY_BREAK
21251 case 87:
21252 YY_RULE_SETUP
21253 #line 281 "ldlex.l"
21254 -{ RTOKEN(HLL);}
21255 +{ RTOKEN(OUTPUT_FORMAT);}
21256 YY_BREAK
21257 case 88:
21258 YY_RULE_SETUP
21259 #line 282 "ldlex.l"
21260 -{ RTOKEN(SYSLIB);}
21261 +{ RTOKEN( OUTPUT_ARCH);}
21262 YY_BREAK
21263 case 89:
21264 YY_RULE_SETUP
21265 #line 283 "ldlex.l"
21266 -{ RTOKEN(FLOAT);}
21267 +{ RTOKEN(HLL);}
21268 YY_BREAK
21269 case 90:
21270 YY_RULE_SETUP
21271 #line 284 "ldlex.l"
21272 -{ RTOKEN( QUAD);}
21273 +{ RTOKEN(SYSLIB);}
21274 YY_BREAK
21275 case 91:
21276 YY_RULE_SETUP
21277 #line 285 "ldlex.l"
21278 -{ RTOKEN( SQUAD);}
21279 +{ RTOKEN(FLOAT);}
21280 YY_BREAK
21281 case 92:
21282 YY_RULE_SETUP
21283 #line 286 "ldlex.l"
21284 -{ RTOKEN( LONG);}
21285 +{ RTOKEN( QUAD);}
21286 YY_BREAK
21287 case 93:
21288 YY_RULE_SETUP
21289 #line 287 "ldlex.l"
21290 -{ RTOKEN( SHORT);}
21291 +{ RTOKEN( SQUAD);}
21292 YY_BREAK
21293 case 94:
21294 YY_RULE_SETUP
21295 #line 288 "ldlex.l"
21296 -{ RTOKEN( BYTE);}
21297 +{ RTOKEN( LONG);}
21298 YY_BREAK
21299 case 95:
21300 YY_RULE_SETUP
21301 #line 289 "ldlex.l"
21302 -{ RTOKEN(NOFLOAT);}
21303 +{ RTOKEN( SHORT);}
21304 YY_BREAK
21305 case 96:
21306 YY_RULE_SETUP
21307 #line 290 "ldlex.l"
21308 -{ RTOKEN(NOCROSSREFS);}
21309 +{ RTOKEN( BYTE);}
21310 YY_BREAK
21311 case 97:
21312 YY_RULE_SETUP
21313 #line 291 "ldlex.l"
21314 -{ RTOKEN(OVERLAY); }
21315 +{ RTOKEN(NOFLOAT);}
21316 YY_BREAK
21317 case 98:
21318 YY_RULE_SETUP
21319 #line 292 "ldlex.l"
21320 -{ RTOKEN(SORT_BY_NAME); }
21321 +{ RTOKEN(NOCROSSREFS);}
21322 YY_BREAK
21323 case 99:
21324 YY_RULE_SETUP
21325 #line 293 "ldlex.l"
21326 -{ RTOKEN(SORT_BY_ALIGNMENT); }
21327 +{ RTOKEN(OVERLAY); }
21328 YY_BREAK
21329 case 100:
21330 YY_RULE_SETUP
21331 @@ -2449,349 +2458,359 @@
21332 case 101:
21333 YY_RULE_SETUP
21334 #line 295 "ldlex.l"
21335 -{ RTOKEN(NOLOAD);}
21336 +{ RTOKEN(SORT_BY_ALIGNMENT); }
21337 YY_BREAK
21338 case 102:
21339 YY_RULE_SETUP
21340 #line 296 "ldlex.l"
21341 -{ RTOKEN(DSECT);}
21342 +{ RTOKEN(SORT_BY_NAME); }
21343 YY_BREAK
21344 case 103:
21345 YY_RULE_SETUP
21346 #line 297 "ldlex.l"
21347 -{ RTOKEN(COPY);}
21348 +{ RTOKEN(NOLOAD);}
21349 YY_BREAK
21350 case 104:
21351 YY_RULE_SETUP
21352 #line 298 "ldlex.l"
21353 -{ RTOKEN(INFO);}
21354 +{ RTOKEN(DSECT);}
21355 YY_BREAK
21356 case 105:
21357 YY_RULE_SETUP
21358 #line 299 "ldlex.l"
21359 -{ RTOKEN(OVERLAY);}
21360 +{ RTOKEN(COPY);}
21361 YY_BREAK
21362 case 106:
21363 YY_RULE_SETUP
21364 #line 300 "ldlex.l"
21365 -{ RTOKEN(ONLY_IF_RO); }
21366 +{ RTOKEN(INFO);}
21367 YY_BREAK
21368 case 107:
21369 YY_RULE_SETUP
21370 #line 301 "ldlex.l"
21371 -{ RTOKEN(ONLY_IF_RW); }
21372 +{ RTOKEN(OVERLAY);}
21373 YY_BREAK
21374 case 108:
21375 YY_RULE_SETUP
21376 #line 302 "ldlex.l"
21377 -{ RTOKEN(SPECIAL); }
21378 +{ RTOKEN(ONLY_IF_RO); }
21379 YY_BREAK
21380 case 109:
21381 YY_RULE_SETUP
21382 #line 303 "ldlex.l"
21383 -{ RTOKEN(ORIGIN);}
21384 +{ RTOKEN(ONLY_IF_RW); }
21385 YY_BREAK
21386 case 110:
21387 YY_RULE_SETUP
21388 #line 304 "ldlex.l"
21389 -{ RTOKEN(ORIGIN);}
21390 +{ RTOKEN(SPECIAL); }
21391 YY_BREAK
21392 case 111:
21393 YY_RULE_SETUP
21394 #line 305 "ldlex.l"
21395 -{ RTOKEN( LENGTH);}
21396 +{ RTOKEN(ORIGIN);}
21397 YY_BREAK
21398 case 112:
21399 YY_RULE_SETUP
21400 #line 306 "ldlex.l"
21401 -{ RTOKEN( LENGTH);}
21402 +{ RTOKEN(ORIGIN);}
21403 YY_BREAK
21404 case 113:
21405 YY_RULE_SETUP
21406 #line 307 "ldlex.l"
21407 -{ RTOKEN(INCLUDE);}
21408 +{ RTOKEN( LENGTH);}
21409 YY_BREAK
21410 case 114:
21411 YY_RULE_SETUP
21412 #line 308 "ldlex.l"
21413 -{ RTOKEN (PHDRS); }
21414 +{ RTOKEN( LENGTH);}
21415 YY_BREAK
21416 case 115:
21417 YY_RULE_SETUP
21418 #line 309 "ldlex.l"
21419 -{ RTOKEN(AT);}
21420 +{ RTOKEN(INCLUDE);}
21421 YY_BREAK
21422 case 116:
21423 YY_RULE_SETUP
21424 #line 310 "ldlex.l"
21425 -{ RTOKEN(SUBALIGN);}
21426 +{ RTOKEN (PHDRS); }
21427 YY_BREAK
21428 case 117:
21429 YY_RULE_SETUP
21430 #line 311 "ldlex.l"
21431 -{ RTOKEN(PROVIDE); }
21432 +{ RTOKEN(AT);}
21433 YY_BREAK
21434 case 118:
21435 YY_RULE_SETUP
21436 #line 312 "ldlex.l"
21437 -{ RTOKEN(PROVIDE_HIDDEN); }
21438 +{ RTOKEN(SUBALIGN);}
21439 YY_BREAK
21440 case 119:
21441 YY_RULE_SETUP
21442 #line 313 "ldlex.l"
21443 -{ RTOKEN(KEEP); }
21444 +{ RTOKEN(PROVIDE); }
21445 YY_BREAK
21446 case 120:
21447 YY_RULE_SETUP
21448 #line 314 "ldlex.l"
21449 -{ RTOKEN(EXCLUDE_FILE); }
21450 +{ RTOKEN(PROVIDE_HIDDEN); }
21451 YY_BREAK
21452 case 121:
21453 YY_RULE_SETUP
21454 #line 315 "ldlex.l"
21455 -{ RTOKEN(CONSTANT);}
21456 +{ RTOKEN(KEEP); }
21457 YY_BREAK
21458 case 122:
21459 -/* rule 122 can match eol */
21460 YY_RULE_SETUP
21461 #line 316 "ldlex.l"
21462 -{ ++ lineno; }
21463 +{ RTOKEN(EXCLUDE_FILE); }
21464 YY_BREAK
21465 case 123:
21466 -/* rule 123 can match eol */
21467 YY_RULE_SETUP
21468 #line 317 "ldlex.l"
21469 -{ ++ lineno; RTOKEN(NEWLINE); }
21470 +{ RTOKEN(CONSTANT);}
21471 YY_BREAK
21472 case 124:
21473 +/* rule 124 can match eol */
21474 YY_RULE_SETUP
21475 #line 318 "ldlex.l"
21476 -{ /* Mri comment line */ }
21477 +{ ++ lineno; }
21478 YY_BREAK
21479 case 125:
21480 +/* rule 125 can match eol */
21481 YY_RULE_SETUP
21482 #line 319 "ldlex.l"
21483 -{ /* Mri comment line */ }
21484 +{ ++ lineno; RTOKEN(NEWLINE); }
21485 YY_BREAK
21486 case 126:
21487 YY_RULE_SETUP
21488 #line 320 "ldlex.l"
21489 -{ RTOKEN(ENDWORD); }
21490 +{ /* Mri comment line */ }
21491 YY_BREAK
21492 case 127:
21493 YY_RULE_SETUP
21494 #line 321 "ldlex.l"
21495 -{ RTOKEN(ALIGNMOD);}
21496 +{ /* Mri comment line */ }
21497 YY_BREAK
21498 case 128:
21499 YY_RULE_SETUP
21500 #line 322 "ldlex.l"
21501 -{ RTOKEN(ALIGN_K);}
21502 +{ RTOKEN(ENDWORD); }
21503 YY_BREAK
21504 case 129:
21505 YY_RULE_SETUP
21506 #line 323 "ldlex.l"
21507 -{ RTOKEN(CHIP); }
21508 +{ RTOKEN(ALIGNMOD);}
21509 YY_BREAK
21510 case 130:
21511 YY_RULE_SETUP
21512 #line 324 "ldlex.l"
21513 -{ RTOKEN(BASE); }
21514 +{ RTOKEN(ALIGN_K);}
21515 YY_BREAK
21516 case 131:
21517 YY_RULE_SETUP
21518 #line 325 "ldlex.l"
21519 -{ RTOKEN(ALIAS); }
21520 +{ RTOKEN(CHIP); }
21521 YY_BREAK
21522 case 132:
21523 YY_RULE_SETUP
21524 #line 326 "ldlex.l"
21525 -{ RTOKEN(TRUNCATE); }
21526 +{ RTOKEN(BASE); }
21527 YY_BREAK
21528 case 133:
21529 YY_RULE_SETUP
21530 #line 327 "ldlex.l"
21531 -{ RTOKEN(LOAD); }
21532 +{ RTOKEN(ALIAS); }
21533 YY_BREAK
21534 case 134:
21535 YY_RULE_SETUP
21536 #line 328 "ldlex.l"
21537 -{ RTOKEN(PUBLIC); }
21538 +{ RTOKEN(TRUNCATE); }
21539 YY_BREAK
21540 case 135:
21541 YY_RULE_SETUP
21542 #line 329 "ldlex.l"
21543 -{ RTOKEN(ORDER); }
21544 +{ RTOKEN(LOAD); }
21545 YY_BREAK
21546 case 136:
21547 YY_RULE_SETUP
21548 #line 330 "ldlex.l"
21549 -{ RTOKEN(NAMEWORD); }
21550 +{ RTOKEN(PUBLIC); }
21551 YY_BREAK
21552 case 137:
21553 YY_RULE_SETUP
21554 #line 331 "ldlex.l"
21555 -{ RTOKEN(FORMAT); }
21556 +{ RTOKEN(ORDER); }
21557 YY_BREAK
21558 case 138:
21559 YY_RULE_SETUP
21560 #line 332 "ldlex.l"
21561 -{ RTOKEN(CASE); }
21562 +{ RTOKEN(NAMEWORD); }
21563 YY_BREAK
21564 case 139:
21565 YY_RULE_SETUP
21566 #line 333 "ldlex.l"
21567 -{ RTOKEN(START); }
21568 +{ RTOKEN(FORMAT); }
21569 YY_BREAK
21570 case 140:
21571 YY_RULE_SETUP
21572 #line 334 "ldlex.l"
21573 -{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
21574 +{ RTOKEN(CASE); }
21575 YY_BREAK
21576 case 141:
21577 YY_RULE_SETUP
21578 #line 335 "ldlex.l"
21579 -{ RTOKEN(SECT); }
21580 +{ RTOKEN(START); }
21581 YY_BREAK
21582 case 142:
21583 YY_RULE_SETUP
21584 #line 336 "ldlex.l"
21585 -{ RTOKEN(ABSOLUTE); }
21586 +{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
21587 YY_BREAK
21588 case 143:
21589 YY_RULE_SETUP
21590 #line 337 "ldlex.l"
21591 -{ RTOKEN(ENDWORD); }
21592 +{ RTOKEN(SECT); }
21593 YY_BREAK
21594 case 144:
21595 YY_RULE_SETUP
21596 #line 338 "ldlex.l"
21597 -{ RTOKEN(ALIGNMOD);}
21598 +{ RTOKEN(ABSOLUTE); }
21599 YY_BREAK
21600 case 145:
21601 YY_RULE_SETUP
21602 #line 339 "ldlex.l"
21603 -{ RTOKEN(ALIGN_K);}
21604 +{ RTOKEN(ENDWORD); }
21605 YY_BREAK
21606 case 146:
21607 YY_RULE_SETUP
21608 #line 340 "ldlex.l"
21609 -{ RTOKEN(CHIP); }
21610 +{ RTOKEN(ALIGNMOD);}
21611 YY_BREAK
21612 case 147:
21613 YY_RULE_SETUP
21614 #line 341 "ldlex.l"
21615 -{ RTOKEN(BASE); }
21616 +{ RTOKEN(ALIGN_K);}
21617 YY_BREAK
21618 case 148:
21619 YY_RULE_SETUP
21620 #line 342 "ldlex.l"
21621 -{ RTOKEN(ALIAS); }
21622 +{ RTOKEN(CHIP); }
21623 YY_BREAK
21624 case 149:
21625 YY_RULE_SETUP
21626 #line 343 "ldlex.l"
21627 -{ RTOKEN(TRUNCATE); }
21628 +{ RTOKEN(BASE); }
21629 YY_BREAK
21630 case 150:
21631 YY_RULE_SETUP
21632 #line 344 "ldlex.l"
21633 -{ RTOKEN(LOAD); }
21634 +{ RTOKEN(ALIAS); }
21635 YY_BREAK
21636 case 151:
21637 YY_RULE_SETUP
21638 #line 345 "ldlex.l"
21639 -{ RTOKEN(PUBLIC); }
21640 +{ RTOKEN(TRUNCATE); }
21641 YY_BREAK
21642 case 152:
21643 YY_RULE_SETUP
21644 #line 346 "ldlex.l"
21645 -{ RTOKEN(ORDER); }
21646 +{ RTOKEN(LOAD); }
21647 YY_BREAK
21648 case 153:
21649 YY_RULE_SETUP
21650 #line 347 "ldlex.l"
21651 -{ RTOKEN(NAMEWORD); }
21652 +{ RTOKEN(PUBLIC); }
21653 YY_BREAK
21654 case 154:
21655 YY_RULE_SETUP
21656 #line 348 "ldlex.l"
21657 -{ RTOKEN(FORMAT); }
21658 +{ RTOKEN(ORDER); }
21659 YY_BREAK
21660 case 155:
21661 YY_RULE_SETUP
21662 #line 349 "ldlex.l"
21663 -{ RTOKEN(CASE); }
21664 +{ RTOKEN(NAMEWORD); }
21665 YY_BREAK
21666 case 156:
21667 YY_RULE_SETUP
21668 #line 350 "ldlex.l"
21669 -{ RTOKEN(EXTERN); }
21670 +{ RTOKEN(FORMAT); }
21671 YY_BREAK
21672 case 157:
21673 YY_RULE_SETUP
21674 #line 351 "ldlex.l"
21675 -{ RTOKEN(START); }
21676 +{ RTOKEN(CASE); }
21677 YY_BREAK
21678 case 158:
21679 YY_RULE_SETUP
21680 #line 352 "ldlex.l"
21681 -{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
21682 +{ RTOKEN(EXTERN); }
21683 YY_BREAK
21684 case 159:
21685 YY_RULE_SETUP
21686 #line 353 "ldlex.l"
21687 -{ RTOKEN(SECT); }
21688 +{ RTOKEN(START); }
21689 YY_BREAK
21690 case 160:
21691 YY_RULE_SETUP
21692 #line 354 "ldlex.l"
21693 -{ RTOKEN(ABSOLUTE); }
21694 +{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
21695 YY_BREAK
21696 case 161:
21697 YY_RULE_SETUP
21698 +#line 355 "ldlex.l"
21699 +{ RTOKEN(SECT); }
21700 + YY_BREAK
21701 +case 162:
21702 +YY_RULE_SETUP
21703 #line 356 "ldlex.l"
21704 +{ RTOKEN(ABSOLUTE); }
21705 + YY_BREAK
21706 +case 163:
21707 +YY_RULE_SETUP
21708 +#line 358 "ldlex.l"
21710 /* Filename without commas, needed to parse mri stuff */
21711 yylval.name = xstrdup (yytext);
21712 return NAME;
21714 YY_BREAK
21715 -case 162:
21716 +case 164:
21717 YY_RULE_SETUP
21718 -#line 363 "ldlex.l"
21719 +#line 365 "ldlex.l"
21721 yylval.name = xstrdup (yytext);
21722 return NAME;
21724 YY_BREAK
21725 -case 163:
21726 +case 165:
21727 YY_RULE_SETUP
21728 -#line 367 "ldlex.l"
21729 +#line 369 "ldlex.l"
21731 yylval.name = xstrdup (yytext + 2);
21732 return LNAME;
21734 YY_BREAK
21735 -case 164:
21736 +case 166:
21737 YY_RULE_SETUP
21738 -#line 371 "ldlex.l"
21739 +#line 373 "ldlex.l"
21741 yylval.name = xstrdup (yytext);
21742 return NAME;
21744 YY_BREAK
21745 -case 165:
21746 +case 167:
21747 YY_RULE_SETUP
21748 -#line 375 "ldlex.l"
21749 +#line 377 "ldlex.l"
21751 yylval.name = xstrdup (yytext + 2);
21752 return LNAME;
21754 YY_BREAK
21755 -case 166:
21756 +case 168:
21757 YY_RULE_SETUP
21758 -#line 379 "ldlex.l"
21759 +#line 381 "ldlex.l"
21761 /* Annoyingly, this pattern can match comments, and we have
21762 longest match issues to consider. So if the first two
21763 @@ -2809,10 +2828,10 @@
21766 YY_BREAK
21767 -case 167:
21768 -/* rule 167 can match eol */
21769 +case 169:
21770 +/* rule 169 can match eol */
21771 YY_RULE_SETUP
21772 -#line 396 "ldlex.l"
21773 +#line 398 "ldlex.l"
21775 /* No matter the state, quotes
21776 give what's inside */
21777 @@ -2821,94 +2840,94 @@
21778 return NAME;
21780 YY_BREAK
21781 -case 168:
21782 -/* rule 168 can match eol */
21783 +case 170:
21784 +/* rule 170 can match eol */
21785 YY_RULE_SETUP
21786 -#line 403 "ldlex.l"
21787 +#line 405 "ldlex.l"
21788 { lineno++;}
21789 YY_BREAK
21790 -case 169:
21791 +case 171:
21792 YY_RULE_SETUP
21793 -#line 404 "ldlex.l"
21794 +#line 406 "ldlex.l"
21796 YY_BREAK
21797 -case 170:
21798 +case 172:
21799 YY_RULE_SETUP
21800 -#line 406 "ldlex.l"
21801 +#line 408 "ldlex.l"
21802 { return *yytext; }
21803 YY_BREAK
21804 -case 171:
21805 +case 173:
21806 YY_RULE_SETUP
21807 -#line 408 "ldlex.l"
21808 +#line 410 "ldlex.l"
21809 { RTOKEN(GLOBAL); }
21810 YY_BREAK
21811 -case 172:
21812 +case 174:
21813 YY_RULE_SETUP
21814 -#line 410 "ldlex.l"
21815 +#line 412 "ldlex.l"
21816 { RTOKEN(LOCAL); }
21817 YY_BREAK
21818 -case 173:
21819 +case 175:
21820 YY_RULE_SETUP
21821 -#line 412 "ldlex.l"
21822 +#line 414 "ldlex.l"
21823 { RTOKEN(EXTERN); }
21824 YY_BREAK
21825 -case 174:
21826 +case 176:
21827 YY_RULE_SETUP
21828 -#line 414 "ldlex.l"
21829 +#line 416 "ldlex.l"
21830 { yylval.name = xstrdup (yytext);
21831 return VERS_IDENTIFIER; }
21832 YY_BREAK
21833 -case 175:
21834 +case 177:
21835 YY_RULE_SETUP
21836 -#line 417 "ldlex.l"
21837 +#line 419 "ldlex.l"
21838 { yylval.name = xstrdup (yytext);
21839 return VERS_TAG; }
21840 YY_BREAK
21841 -case 176:
21842 +case 178:
21843 YY_RULE_SETUP
21844 -#line 420 "ldlex.l"
21845 +#line 422 "ldlex.l"
21846 { BEGIN(VERS_SCRIPT); return *yytext; }
21847 YY_BREAK
21848 -case 177:
21849 +case 179:
21850 YY_RULE_SETUP
21851 -#line 422 "ldlex.l"
21852 +#line 424 "ldlex.l"
21853 { BEGIN(VERS_NODE);
21854 vers_node_nesting = 0;
21855 return *yytext;
21857 YY_BREAK
21858 -case 178:
21859 +case 180:
21860 YY_RULE_SETUP
21861 -#line 426 "ldlex.l"
21862 +#line 428 "ldlex.l"
21863 { return *yytext; }
21864 YY_BREAK
21865 -case 179:
21866 +case 181:
21867 YY_RULE_SETUP
21868 -#line 427 "ldlex.l"
21869 +#line 429 "ldlex.l"
21870 { vers_node_nesting++; return *yytext; }
21871 YY_BREAK
21872 -case 180:
21873 +case 182:
21874 YY_RULE_SETUP
21875 -#line 428 "ldlex.l"
21876 +#line 430 "ldlex.l"
21877 { if (--vers_node_nesting < 0)
21878 BEGIN(VERS_SCRIPT);
21879 return *yytext;
21881 YY_BREAK
21882 -case 181:
21883 -/* rule 181 can match eol */
21884 +case 183:
21885 +/* rule 183 can match eol */
21886 YY_RULE_SETUP
21887 -#line 433 "ldlex.l"
21888 +#line 435 "ldlex.l"
21889 { lineno++; }
21890 YY_BREAK
21891 -case 182:
21892 +case 184:
21893 YY_RULE_SETUP
21894 -#line 435 "ldlex.l"
21895 +#line 437 "ldlex.l"
21896 { /* Eat up comments */ }
21897 YY_BREAK
21898 -case 183:
21899 +case 185:
21900 YY_RULE_SETUP
21901 -#line 437 "ldlex.l"
21902 +#line 439 "ldlex.l"
21903 { /* Eat up whitespace */ }
21904 YY_BREAK
21905 case YY_STATE_EOF(INITIAL):
21906 @@ -2920,7 +2939,7 @@
21907 case YY_STATE_EOF(VERS_START):
21908 case YY_STATE_EOF(VERS_SCRIPT):
21909 case YY_STATE_EOF(VERS_NODE):
21910 -#line 439 "ldlex.l"
21911 +#line 441 "ldlex.l"
21913 include_stack_ptr--;
21915 @@ -2939,22 +2958,22 @@
21916 return END;
21918 YY_BREAK
21919 -case 184:
21920 +case 186:
21921 YY_RULE_SETUP
21922 -#line 457 "ldlex.l"
21923 +#line 459 "ldlex.l"
21924 lex_warn_invalid (" in script", yytext);
21925 YY_BREAK
21926 -case 185:
21927 +case 187:
21928 YY_RULE_SETUP
21929 -#line 458 "ldlex.l"
21930 +#line 460 "ldlex.l"
21931 lex_warn_invalid (" in expression", yytext);
21932 YY_BREAK
21933 -case 186:
21934 +case 188:
21935 YY_RULE_SETUP
21936 -#line 460 "ldlex.l"
21937 +#line 462 "ldlex.l"
21938 ECHO;
21939 YY_BREAK
21940 -#line 2958 "ldlex.c"
21941 +#line 2977 "ldlex.c"
21943 case YY_END_OF_BUFFER:
21945 @@ -3183,7 +3202,7 @@
21947 /* Read in more data. */
21948 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
21949 - (yy_n_chars), (size_t) num_to_read );
21950 + (yy_n_chars), num_to_read );
21952 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
21954 @@ -3236,7 +3255,7 @@
21955 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
21957 yy_current_state = (int) yy_def[yy_current_state];
21958 - if ( yy_current_state >= 1536 )
21959 + if ( yy_current_state >= 1562 )
21960 yy_c = yy_meta[(unsigned int) yy_c];
21962 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
21963 @@ -3264,11 +3283,11 @@
21964 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
21966 yy_current_state = (int) yy_def[yy_current_state];
21967 - if ( yy_current_state >= 1536 )
21968 + if ( yy_current_state >= 1562 )
21969 yy_c = yy_meta[(unsigned int) yy_c];
21971 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
21972 - yy_is_jam = (yy_current_state == 1535);
21973 + yy_is_jam = (yy_current_state == 1561);
21975 return yy_is_jam ? 0 : yy_current_state;
21977 @@ -3684,16 +3703,16 @@
21979 /** Setup the input buffer state to scan a string. The next call to yylex() will
21980 * scan from a @e copy of @a str.
21981 - * @param yystr a NUL-terminated string to scan
21982 + * @param str a NUL-terminated string to scan
21984 * @return the newly allocated buffer state object.
21985 * @note If you want to scan bytes that may contain NUL values, then use
21986 * yy_scan_bytes() instead.
21988 -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
21989 +YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
21992 - return yy_scan_bytes(yystr,strlen(yystr) );
21993 + return yy_scan_bytes(yy_str,strlen(yy_str) );
21996 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
21997 @@ -3703,7 +3722,7 @@
21999 * @return the newly allocated buffer state object.
22001 -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
22002 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
22004 YY_BUFFER_STATE b;
22005 char *buf;
22006 @@ -3711,15 +3730,15 @@
22007 int i;
22009 /* Get memory for full buffer, including space for trailing EOB's. */
22010 - n = _yybytes_len + 2;
22011 + n = len + 2;
22012 buf = (char *) yyalloc(n );
22013 if ( ! buf )
22014 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
22016 - for ( i = 0; i < _yybytes_len; ++i )
22017 - buf[i] = yybytes[i];
22018 + for ( i = 0; i < len; ++i )
22019 + buf[i] = bytes[i];
22021 - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
22022 + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
22024 b = yy_scan_buffer(buf,n );
22025 if ( ! b )
22026 @@ -3840,34 +3859,6 @@
22027 yy_flex_debug = bdebug ;
22030 -static int yy_init_globals (void)
22032 - /* Initialization is the same as for the non-reentrant scanner.
22033 - * This function is called from yylex_destroy(), so don't allocate here.
22034 - */
22036 - (yy_buffer_stack) = 0;
22037 - (yy_buffer_stack_top) = 0;
22038 - (yy_buffer_stack_max) = 0;
22039 - (yy_c_buf_p) = (char *) 0;
22040 - (yy_init) = 0;
22041 - (yy_start) = 0;
22043 -/* Defined in main.c */
22044 -#ifdef YY_STDINIT
22045 - yyin = stdin;
22046 - yyout = stdout;
22047 -#else
22048 - yyin = (FILE *) 0;
22049 - yyout = (FILE *) 0;
22050 -#endif
22052 - /* For future reference: Set errno on error, since we are called by
22053 - * yylex_init()
22054 - */
22055 - return 0;
22058 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
22059 int yylex_destroy (void)
22061 @@ -3883,10 +3874,6 @@
22062 yyfree((yy_buffer_stack) );
22063 (yy_buffer_stack) = NULL;
22065 - /* Reset the globals. This is important in a non-reentrant scanner so the next time
22066 - * yylex() is called, initialization will occur. */
22067 - yy_init_globals( );
22069 return 0;
22072 @@ -3898,7 +3885,7 @@
22073 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
22075 register int i;
22076 - for ( i = 0; i < n; ++i )
22077 + for ( i = 0; i < n; ++i )
22078 s1[i] = s2[i];
22080 #endif
22081 @@ -3907,7 +3894,7 @@
22082 static int yy_flex_strlen (yyconst char * s )
22084 register int n;
22085 - for ( n = 0; s[n]; ++n )
22086 + for ( n = 0; s[n]; ++n )
22089 return n;
22090 @@ -3938,7 +3925,19 @@
22092 #define YYTABLES_NAME "yytables"
22094 -#line 460 "ldlex.l"
22095 +#undef YY_NEW_FILE
22096 +#undef YY_FLUSH_BUFFER
22097 +#undef yy_set_bol
22098 +#undef yy_new_buffer
22099 +#undef yy_set_interactive
22100 +#undef yytext_ptr
22101 +#undef YY_DO_BEFORE_ACTION
22103 +#ifdef YY_DECL_IS_OURS
22104 +#undef YY_DECL_IS_OURS
22105 +#undef YY_DECL
22106 +#endif
22107 +#line 462 "ldlex.l"
22111 diff -Naur ../PRISTINE/binutils-2.18/ld/ldlex.l binutils-2.18/ld/ldlex.l
22112 --- ../PRISTINE/binutils-2.18/ld/ldlex.l 2007-08-06 13:00:21.000000000 -0700
22113 +++ binutils-2.18/ld/ldlex.l 2009-01-09 17:32:43.763471000 -0800
22114 @@ -253,6 +253,8 @@
22115 <EXPRESSION,BOTH,SCRIPT>"ALIGNOF" { RTOKEN(ALIGNOF); }
22116 <EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
22117 <EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
22118 +<EXPRESSION,BOTH>"CEILP2" { RTOKEN(CEILP2); }
22119 +<EXPRESSION,BOTH>"NACL_MASK" { RTOKEN(NACL_MASK);}
22120 <EXPRESSION,BOTH,SCRIPT>"ASSERT" { RTOKEN(ASSERT_K); }
22121 <BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
22122 <BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
22123 diff -Naur ../PRISTINE/binutils-2.18/ld/scripttempl/naclelf.sc binutils-2.18/ld/scripttempl/naclelf.sc
22124 --- ../PRISTINE/binutils-2.18/ld/scripttempl/naclelf.sc 1969-12-31 16:00:00.000000000 -0800
22125 +++ binutils-2.18/ld/scripttempl/naclelf.sc 2009-01-09 17:32:43.784455000 -0800
22126 @@ -0,0 +1,552 @@
22128 +# Unusual variables checked by this code:
22129 +# NOP - four byte opcode for no-op (defaults to 0)
22130 +# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
22131 +# empty.
22132 +# SMALL_DATA_CTOR - .ctors contains small data.
22133 +# SMALL_DATA_DTOR - .dtors contains small data.
22134 +# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
22135 +# INITIAL_READONLY_SECTIONS - at start of text segment
22136 +# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
22137 +# (e.g., .PARISC.milli)
22138 +# OTHER_TEXT_SECTIONS - these get put in .text when relocating
22139 +# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
22140 +# (e.g., .PARISC.global)
22141 +# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
22142 +# (e.g. PPC32 .fixup, .got[12])
22143 +# OTHER_BSS_SECTIONS - other than .bss .sbss ...
22144 +# ATTRS_SECTIONS - at the end
22145 +# OTHER_SECTIONS - at the end
22146 +# EXECUTABLE_SYMBOLS - symbols that must be defined for an
22147 +# executable (e.g., _DYNAMIC_LINK)
22148 +# TEXT_START_ADDR - the first byte of the text segment, after any
22149 +# headers.
22150 +# TEXT_BASE_ADDRESS - the first byte of the text segment.
22151 +# TEXT_START_SYMBOLS - symbols that appear at the start of the
22152 +# .text section.
22153 +# DATA_START_SYMBOLS - symbols that appear at the start of the
22154 +# .data section.
22155 +# DATA_END_SYMBOLS - symbols that appear at the end of the
22156 +# writeable data sections.
22157 +# OTHER_GOT_SYMBOLS - symbols defined just before .got.
22158 +# OTHER_GOT_SECTIONS - sections just after .got.
22159 +# OTHER_SDATA_SECTIONS - sections just after .sdata.
22160 +# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
22161 +# .bss section besides __bss_start.
22162 +# DATA_PLT - .plt should be in data segment, not text segment.
22163 +# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
22164 +# BSS_PLT - .plt should be in bss segment
22165 +# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
22166 +# EMBEDDED - whether this is for an embedded system.
22167 +# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
22168 +# start address of shared library.
22169 +# INPUT_FILES - INPUT command of files to always include
22170 +# WRITABLE_RODATA - if set, the .rodata section should be writable
22171 +# INIT_START, INIT_END - statements just before and just after
22172 +# combination of .init sections.
22173 +# FINI_START, FINI_END - statements just before and just after
22174 +# combination of .fini sections.
22175 +# STACK_ADDR - start of a .stack section.
22176 +# OTHER_SYMBOLS - symbols to place right at the end of the script.
22177 +# ETEXT_NAME - name of a symbol for the end of the text section,
22178 +# normally etext.
22179 +# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
22180 +# so that .got can be in the RELRO area. It should be set to
22181 +# the number of bytes in the beginning of .got.plt which can be
22182 +# in the RELRO area as well.
22183 +# USER_LABEL_PREFIX - prefix to add to user-visible symbols.
22185 +# When adding sections, do note that the names of some sections are used
22186 +# when specifying the start address of the next.
22189 +# Many sections come in three flavours. There is the 'real' section,
22190 +# like ".data". Then there are the per-procedure or per-variable
22191 +# sections, generated by -ffunction-sections and -fdata-sections in GCC,
22192 +# and useful for --gc-sections, which for a variable "foo" might be
22193 +# ".data.foo". Then there are the linkonce sections, for which the linker
22194 +# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
22195 +# The exact correspondences are:
22197 +# Section Linkonce section
22198 +# .text .gnu.linkonce.t.foo
22199 +# .rodata .gnu.linkonce.r.foo
22200 +# .data .gnu.linkonce.d.foo
22201 +# .bss .gnu.linkonce.b.foo
22202 +# .sdata .gnu.linkonce.s.foo
22203 +# .sbss .gnu.linkonce.sb.foo
22204 +# .sdata2 .gnu.linkonce.s2.foo
22205 +# .sbss2 .gnu.linkonce.sb2.foo
22206 +# .debug_info .gnu.linkonce.wi.foo
22207 +# .tdata .gnu.linkonce.td.foo
22208 +# .tbss .gnu.linkonce.tb.foo
22209 +# .lrodata .gnu.linkonce.lr.foo
22210 +# .ldata .gnu.linkonce.l.foo
22211 +# .lbss .gnu.linkonce.lb.foo
22213 +# Each of these can also have corresponding .rel.* and .rela.* sections.
22215 +test -z "$ENTRY" && ENTRY=_start
22216 +test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
22217 +test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
22218 +if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
22219 +test -z "${ELFSIZE}" && ELFSIZE=32
22220 +test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
22221 +test "$LD_FLAG" = "N" && DATA_ADDR=.
22222 +test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
22223 +test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
22224 +test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
22225 +test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
22226 +test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }"
22227 +DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
22228 +DATA_SEGMENT_RELRO_END=""
22229 +DATA_SEGMENT_END=""
22230 +if test -n "${COMMONPAGESIZE}"; then
22231 + DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
22232 + DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
22233 + DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
22235 +if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
22236 + INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
22238 +if test -z "$PLT"; then
22239 + PLT=".plt ${RELOCATING-0} : { *(.plt) }"
22241 +test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes
22242 +if test -z "$GOT"; then
22243 + if test -z "$SEPARATE_GOTPLT"; then
22244 + GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
22245 + else
22246 + GOT=".got ${RELOCATING-0} : { *(.got) }"
22247 + GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
22248 + fi
22250 +DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
22251 +RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
22252 +DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }"
22253 +DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }"
22254 +if test -z "${NO_SMALL_DATA}"; then
22255 + SBSS=".sbss ${RELOCATING-0} :
22257 + ${RELOCATING+${SBSS_START_SYMBOLS}}
22258 + ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
22259 + *(.dynsbss)
22260 + *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
22261 + *(.scommon)
22262 + ${RELOCATING+${SBSS_END_SYMBOLS}}
22263 + }"
22264 + SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
22265 + SDATA="/* We want the small data sections together, so single-instruction offsets
22266 + can access them all, and initialized data all before uninitialized, so
22267 + we can shorten the on-disk segment size. */
22268 + .sdata ${RELOCATING-0} :
22270 + ${RELOCATING+${SDATA_START_SYMBOLS}}
22271 + ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
22272 + *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
22273 + }"
22274 + SDATA2=".sdata2 ${RELOCATING-0} :
22276 + ${RELOCATING+${SDATA2_START_SYMBOLS}}
22277 + *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*})
22278 + }"
22279 + REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
22280 + .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
22281 + REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
22282 + .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
22283 + REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
22284 + .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
22285 + REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
22286 + .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
22287 +else
22288 + NO_SMALL_DATA=" "
22290 +if test -z "${DATA_GOT}"; then
22291 + if test -n "${NO_SMALL_DATA}"; then
22292 + DATA_GOT=" "
22293 + fi
22295 +if test -z "${SDATA_GOT}"; then
22296 + if test -z "${NO_SMALL_DATA}"; then
22297 + SDATA_GOT=" "
22298 + fi
22300 +test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
22301 +test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
22302 + .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
22303 + .rela.ldata ${RELOCATING-0} : { *(.rela.ldata${RELOCATING+ .rela.ldata.* .rela.gnu.linkonce.l.*}) }
22304 + .rel.lbss ${RELOCATING-0} : { *(.rel.lbss${RELOCATING+ .rel.lbss.* .rel.gnu.linkonce.lb.*}) }
22305 + .rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }
22306 + .rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) }
22307 + .rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }"
22308 +test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS="
22309 + ${OTHER_BSS_SECTIONS}
22310 + .lbss ${RELOCATING-0} :
22312 + *(.dynlbss)
22313 + *(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
22314 + *(LARGE_COMMON)
22315 + }"
22316 +test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
22317 + .lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
22319 + *(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
22321 + .ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
22323 + *(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
22324 + ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
22325 + }"
22326 +CTOR=".ctors ${CONSTRUCTING-0} :
22328 + ${CONSTRUCTING+${CTOR_START}}
22329 + /* gcc uses crtbegin.o to find the start of
22330 + the constructors, so we make sure it is
22331 + first. Because this is a wildcard, it
22332 + doesn't matter if the user does not
22333 + actually link against crtbegin.o; the
22334 + linker won't look for a file to match a
22335 + wildcard. The wildcard also means that it
22336 + doesn't matter which directory crtbegin.o
22337 + is in. */
22339 + KEEP (*crtbegin.o(.ctors))
22340 + KEEP (*crtbegin?.o(.ctors))
22342 + /* We don't want to include the .ctor section from
22343 + the crtend.o file until after the sorted ctors.
22344 + The .ctor section from the crtend file contains the
22345 + end of ctors marker and it must be last */
22347 + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
22348 + KEEP (*(SORT(.ctors.*)))
22349 + KEEP (*(.ctors))
22350 + ${CONSTRUCTING+${CTOR_END}}
22351 + }"
22352 +DTOR=".dtors ${CONSTRUCTING-0} :
22354 + ${CONSTRUCTING+${DTOR_START}}
22355 + KEEP (*crtbegin.o(.dtors))
22356 + KEEP (*crtbegin?.o(.dtors))
22357 + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
22358 + KEEP (*(SORT(.dtors.*)))
22359 + KEEP (*(.dtors))
22360 + ${CONSTRUCTING+${DTOR_END}}
22361 + }"
22362 +STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
22364 + ${RELOCATING+_stack = .;}
22365 + *(.stack)
22366 + }"
22368 +# if this is for an embedded system (or nacl), don't add SIZEOF_HEADERS.
22369 +if [ -z "$EMBEDDED" ]; then
22370 + test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
22371 +else
22372 + test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
22375 +cat <<EOF
22376 +OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
22377 + "${LITTLE_OUTPUT_FORMAT}")
22378 +OUTPUT_ARCH(${OUTPUT_ARCH})
22379 +ENTRY(${ENTRY})
22381 +${RELOCATING+${LIB_SEARCH_DIRS}}
22382 +${RELOCATING+${EXECUTABLE_SYMBOLS}}
22383 +${RELOCATING+${INPUT_FILES}}
22384 +${RELOCATING- /* For some reason, the Solaris linker makes bad executables
22385 + if gld -r is used and the intermediate file has sections starting
22386 + at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
22387 + bug. But for now assigning the zero vmas works. */}
22389 +PHDRS
22391 + headers PT_PHDR FILEHDR PHDRS ; /* put the headers in a non-loadable seg */
22392 + text PT_LOAD FLAGS(5) ; /* read + execute */
22393 + rodata PT_LOAD FLAGS(4) ; /* read */
22394 + data PT_LOAD FLAGS(6) ; /* read + write */
22395 + /* TODO: do we need a stack? */
22398 +SECTIONS
22400 + /* Read-only sections, merged into text segment: */
22401 + ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
22402 + ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
22403 + ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
22404 + ${INITIAL_READONLY_SECTIONS}
22405 + .note.gnu.build-id : { *(.note.gnu.build-id) }
22406 + ${TEXT_DYNAMIC+${DYNAMIC}}
22407 + .hash ${RELOCATING-0} : { *(.hash) }
22408 + .gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
22409 + .dynsym ${RELOCATING-0} : { *(.dynsym) }
22410 + .dynstr ${RELOCATING-0} : { *(.dynstr) }
22411 + .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
22412 + .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
22413 + .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
22415 +EOF
22416 +if [ "x$COMBRELOC" = x ]; then
22417 + COMBRELOCCAT=cat
22418 +else
22419 + COMBRELOCCAT="cat > $COMBRELOC"
22421 +eval $COMBRELOCCAT <<EOF
22422 + .rel.init ${RELOCATING-0} : { *(.rel.init) }
22423 + .rela.init ${RELOCATING-0} : { *(.rela.init) }
22424 + .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
22425 + .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
22426 + .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
22427 + .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
22428 + .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
22429 + .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
22430 + ${OTHER_READONLY_RELOC_SECTIONS}
22431 + .rel.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+* .rel.gnu.linkonce.d.rel.ro.*}) }
22432 + .rela.data.rel.ro ${RELOCATING-0} : { *(.rela.data.rel.ro${RELOCATING+* .rela.gnu.linkonce.d.rel.ro.*}) }
22433 + .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
22434 + .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
22435 + .rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
22436 + .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
22437 + .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
22438 + .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
22439 + .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
22440 + .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
22441 + .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
22442 + .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
22443 + .rel.got ${RELOCATING-0} : { *(.rel.got) }
22444 + .rela.got ${RELOCATING-0} : { *(.rela.got) }
22445 + ${OTHER_GOT_RELOC_SECTIONS}
22446 + ${REL_SDATA}
22447 + ${REL_SBSS}
22448 + ${REL_SDATA2}
22449 + ${REL_SBSS2}
22450 + .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
22451 + .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
22452 + ${REL_LARGE}
22453 +EOF
22454 +if [ -n "$COMBRELOC" ]; then
22455 +cat <<EOF
22456 + .rel.dyn ${RELOCATING-0} :
22458 +EOF
22459 +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
22460 +cat <<EOF
22462 + .rela.dyn ${RELOCATING-0} :
22464 +EOF
22465 +sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
22466 +cat <<EOF
22468 +EOF
22470 +cat <<EOF
22471 + .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
22472 + .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
22473 + ${OTHER_PLT_RELOC_SECTIONS}
22475 + .init ${RELOCATING-0} :
22476 + {
22477 + ${RELOCATING+${INIT_START}}
22478 + KEEP (*(.init))
22479 + ${RELOCATING+${INIT_END}}
22480 + } :text =${NOP-0}
22482 + ${TEXT_PLT+${PLT}}
22483 + ${TINY_READONLY_SECTION}
22484 + .text ${RELOCATING-0} :
22486 + ${RELOCATING+${TEXT_START_SYMBOLS}}
22487 + *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
22488 + KEEP (*(.text.*personality*))
22489 + /* .gnu.warning sections are handled specially by elf32.em. */
22490 + *(.gnu.warning)
22491 + ${RELOCATING+${OTHER_TEXT_SECTIONS}}
22492 + } =${NOP-0}
22493 + .fini ${RELOCATING-0} :
22495 + ${RELOCATING+${FINI_START}}
22496 + KEEP (*(.fini))
22497 + ${RELOCATING+${FINI_END}}
22498 + } =${NOP-0}
22499 + ${RELOCATING+PROVIDE (__${ETEXT_NAME} = .);}
22500 + ${RELOCATING+PROVIDE (_${ETEXT_NAME} = .);}
22501 + ${RELOCATING+PROVIDE (${ETEXT_NAME} = .);}
22502 + ${RELOCATING+. = DEFINED (__executable_start) ?
22503 + ALIGN(CEILP2(. - __executable_start)) : .;}
22504 + ${RELOCATING+PROVIDE (__nacl_and_mask =
22505 + DEFINED (__executable_start) ?
22506 + NACL_MASK (. - __executable_start) : 0xffffffff);}
22507 + ${RELOCATING+. = ALIGN(${MAXPAGESIZE});} /* nacl wants page alignment */
22508 + ${WRITABLE_RODATA-${RODATA}} :rodata
22509 + .rodata1 ${RELOCATING-0} : { *(.rodata1) }
22510 + .nacl_rpc_methods : { *(.nacl_rpc_methods) }
22511 + ${CREATE_SHLIB-${SDATA2}}
22512 + ${CREATE_SHLIB-${SBSS2}}
22513 + ${OTHER_READONLY_SECTIONS}
22514 + .eh_frame_hdr : { *(.eh_frame_hdr) }
22515 + .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
22516 + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
22518 + /* Adjust the address for the data segment. We want to adjust up to
22519 + the same address within the page on the next page up. */
22520 + ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
22521 + ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
22522 + ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
22524 + /* Exception handling */
22525 + .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
22526 + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
22528 + /* Thread Local Storage sections */
22529 + .tdata ${RELOCATING-0} : {
22530 + ${RELOCATING+PROVIDE (__tls_template_start = .);}
22531 + *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*})
22532 + ${RELOCATING+PROVIDE (__tls_template_tdata_end = .);}
22534 + .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
22535 + /* The total size of the TLS template area must be a multiple of 32 */
22536 + /* . does not advance for tbss because it is not loaded. */
22537 + ${RELOCATING+PROVIDE (__tls_template_end =
22538 + __tls_template_start +
22539 + (((. + SIZEOF(.tbss)) - __tls_template_start + 31) &
22540 + ~(31))
22541 + );}
22543 + .preinit_array ${RELOCATING-0} :
22545 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
22546 + KEEP (*(.preinit_array))
22547 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
22549 + .init_array ${RELOCATING-0} :
22551 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
22552 + KEEP (*(SORT(.init_array.*)))
22553 + KEEP (*(.init_array))
22554 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
22556 + .fini_array ${RELOCATING-0} :
22558 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
22559 + KEEP (*(.fini_array))
22560 + KEEP (*(SORT(.fini_array.*)))
22561 + ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
22563 + ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
22564 + ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
22565 + .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
22567 + ${RELOCATING+${DATARELRO}}
22568 + ${OTHER_RELRO_SECTIONS}
22569 + ${TEXT_DYNAMIC-${DYNAMIC}}
22570 + ${DATA_GOT+${RELRO_NOW+${GOT}}}
22571 + ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
22572 + ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
22573 + ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
22574 + ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
22575 + ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
22577 + ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
22579 + ${RELOCATING+. = ALIGN(${MAXPAGESIZE});} /* nacl wants page alignment */
22580 + .data ${RELOCATING-0} :
22582 + ${RELOCATING+${DATA_START_SYMBOLS}}
22583 + *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
22584 + ${RELOCATING+KEEP (*(.gnu.linkonce.d.*personality*))}
22585 + ${CONSTRUCTING+SORT(CONSTRUCTORS)}
22586 + } :data
22587 + .data1 ${RELOCATING-0} : { *(.data1) }
22588 + ${WRITABLE_RODATA+${RODATA}}
22589 + ${OTHER_READWRITE_SECTIONS}
22590 + ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
22591 + ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
22592 + ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
22593 + ${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS}}}
22594 + ${SDATA_GOT+${GOT}}
22595 + ${SDATA_GOT+${OTHER_GOT_SECTIONS}}
22596 + ${SDATA}
22597 + ${OTHER_SDATA_SECTIONS}
22598 + ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
22599 + ${RELOCATING+__bss_start = .;}
22600 + ${RELOCATING+${OTHER_BSS_SYMBOLS}}
22601 + ${SBSS}
22602 + ${BSS_PLT+${PLT}}
22603 + .bss ${RELOCATING-0} :
22605 + *(.dynbss)
22606 + *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
22607 + *(COMMON)
22608 + /* Align here to ensure that the .bss section occupies space up to
22609 + _end. Align after .bss to ensure correct alignment even if the
22610 + .bss section disappears because there are no input sections.
22611 + FIXME: Why do we need it? When there is no .bss section, we don't
22612 + pad the .data section. */
22613 + ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
22615 + ${OTHER_BSS_SECTIONS}
22616 + ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
22617 + ${RELOCATING+. = ALIGN(${ALIGNMENT});}
22618 + ${LARGE_SECTIONS}
22619 + ${RELOCATING+. = ALIGN(${ALIGNMENT});}
22620 + ${RELOCATING+${OTHER_END_SYMBOLS}}
22621 + ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
22622 + ${RELOCATING+${DATA_SEGMENT_END}}
22624 + /* Stabs debugging sections. */
22625 + .stab 0 : { *(.stab) }
22626 + .stabstr 0 : { *(.stabstr) }
22627 + .stab.excl 0 : { *(.stab.excl) }
22628 + .stab.exclstr 0 : { *(.stab.exclstr) }
22629 + .stab.index 0 : { *(.stab.index) }
22630 + .stab.indexstr 0 : { *(.stab.indexstr) }
22632 + .comment 0 : { *(.comment) }
22634 + /* DWARF debug sections.
22635 + Symbols in the DWARF debugging sections are relative to the beginning
22636 + of the section so we begin them at 0. */
22638 + /* DWARF 1 */
22639 + .debug 0 : { *(.debug) }
22640 + .line 0 : { *(.line) }
22642 + /* GNU DWARF 1 extensions */
22643 + .debug_srcinfo 0 : { *(.debug_srcinfo) }
22644 + .debug_sfnames 0 : { *(.debug_sfnames) }
22646 + /* DWARF 1.1 and DWARF 2 */
22647 + .debug_aranges 0 : { *(.debug_aranges) }
22648 + .debug_pubnames 0 : { *(.debug_pubnames) }
22650 + /* DWARF 2 */
22651 + .debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
22652 + .debug_abbrev 0 : { *(.debug_abbrev) }
22653 + .debug_line 0 : { *(.debug_line) }
22654 + .debug_frame 0 : { *(.debug_frame) }
22655 + .debug_str 0 : { *(.debug_str) }
22656 + .debug_loc 0 : { *(.debug_loc) }
22657 + .debug_macinfo 0 : { *(.debug_macinfo) }
22659 + /* SGI/MIPS DWARF 2 extensions */
22660 + .debug_weaknames 0 : { *(.debug_weaknames) }
22661 + .debug_funcnames 0 : { *(.debug_funcnames) }
22662 + .debug_typenames 0 : { *(.debug_typenames) }
22663 + .debug_varnames 0 : { *(.debug_varnames) }
22665 + /* DWARF 3 */
22666 + .debug_pubtypes 0 : { *(.debug_pubtypes) }
22667 + .debug_ranges 0 : { *(.debug_ranges) }
22669 + ${TINY_DATA_SECTION}
22670 + ${TINY_BSS_SECTION}
22672 + ${STACK_ADDR+${STACK}}
22673 + ${ATTRS_SECTIONS}
22674 + ${OTHER_SECTIONS}
22675 + ${RELOCATING+${OTHER_SYMBOLS}}
22676 + ${RELOCATING+${DISCARDED}}
22678 +EOF
22679 diff -Naur ../PRISTINE/binutils-2.18/opcodes/i386-opc.tbl binutils-2.18/opcodes/i386-opc.tbl
22680 --- ../PRISTINE/binutils-2.18/opcodes/i386-opc.tbl 2007-08-12 17:11:33.000000000 -0700
22681 +++ binutils-2.18/opcodes/i386-opc.tbl 2009-01-09 17:32:43.806441000 -0800
22682 @@ -200,6 +200,10 @@
22683 or, 2, 0xc, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
22684 or, 2, 0x80, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
22686 +// Native client support instructions.
22687 +nacland, 2, 0x81, 0x4, 0, D|W|Modrm|No_sSuf|No_xSuf, { Imm32, Reg32 }
22688 +naclor, 2, 0x81, 0x1, 0, D|W|Modrm|No_sSuf|No_xSuf, { Imm32, Reg32 }
22690 xor, 2, 0x30, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
22691 xor, 2, 0x83, 0x6, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
22692 xor, 2, 0x34, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
22693 diff -Naur ../PRISTINE/binutils-2.18/opcodes/i386-tbl.h binutils-2.18/opcodes/i386-tbl.h
22694 --- ../PRISTINE/binutils-2.18/opcodes/i386-tbl.h 2007-08-12 17:11:33.000000000 -0700
22695 +++ binutils-2.18/opcodes/i386-tbl.h 2009-01-09 17:32:43.837404000 -0800
22696 @@ -4306,6 +4306,20 @@
22697 { "xstore", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock,
22698 No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
22699 { 0 } },
22700 + // Native client support instructions.
22701 + { "nacland", 2, 0x81, 0x4, 0,
22702 + D|W|Modrm|No_sSuf|No_xSuf,
22703 + { Imm32, Reg32 }},
22704 + { "naclor", 2, 0x81, 0x1, 0,
22705 + D|W|Modrm|No_sSuf|No_xSuf,
22706 + { Imm32, Reg32 }},
22707 + { "naclcall", 1, 0xff, 0x2, 0,
22708 + Modrm|DefaultSize|No_bSuf|No_lSuf|No_qSuf|No_sSuf|No_xSuf,
22709 + { Reg32 }},
22710 + { "nacljmp", 1, 0xff, 0x4, 0,
22711 + Modrm|DefaultSize|No_bSuf|No_lSuf|No_qSuf|No_sSuf|No_xSuf,
22712 + { Reg32 }},
22714 { NULL, 0, 0, 0, 0, 0, { 0 } }