1 # DP: updates from the binutils-2.22 branch
3 diff --git a/bfd/ChangeLog b/bfd/ChangeLog
4 index 0059346..a7199ae 100644
8 +2011-12-10 David Daney <david.daney@cavium.com>
10 + Backport from mainline:
12 + 2011-12-10 David Daney <david.daney@cavium.com>
14 + * elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove.
15 + (mips_elf_link_hash_table.rld_symbol): New field;
16 + (MIPS_ELF_RLD_MAP_SIZE): New macro.
17 + (_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol
19 + (_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol
21 + (_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map.
22 + (_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling.
23 + (_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to
24 + calculate DT_MIPS_RLD_MAP value.
25 + (_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol,
26 + quit initializing rld_value.
28 +2011-12-03 Alan Modra <amodra@gmail.com>
31 + * elflink.c (bfd_elf_final_link): Don't segfault when checking
32 + for DT_TEXTREL and .dynamic does not exist.
34 +2011-12-03 Alan Modra <amodra@gmail.com>
37 + * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive
38 + change in 2011-07-01 commit. Comment.
39 + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
41 +2011-12-01 Mikael Pettersson <mikpe@it.uu.se>
43 + Apply mainline patches
44 + * elf32-m68k.c (elf_m68k_check_relocs) <R_68K_8, R68K_16, R_68K_32>: For
45 + non-SEC_ALLOC sections break before GOT and PLT accounting.
47 +2011-12-01 Hans-Peter Nilsson <hp@axis.com>
49 + Apply mainline patches
50 + * elf32-cris.c (cris_elf_check_relocs) <plt accounting for
51 + R_CRIS_8, R_CRIS_16, and R_CRIS_32>: Move early break for
52 + non-SEC_ALLOC sections before GOT and PLT accounting.
54 2011-11-21 Tristan Gingold <gingold@adacore.com>
56 * configure.in: Bump version to 2.22.0
57 diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
58 index 243a8ec..310f6d1 100644
59 --- a/bfd/elf32-cris.c
60 +++ b/bfd/elf32-cris.c
61 @@ -3579,6 +3579,12 @@ cris_elf_check_relocs (bfd *abfd,
63 cris_elf_howto_table[r_type].name);
66 + /* We don't need to handle relocs into sections not going into
67 + the "real" output. */
68 + if ((sec->flags & SEC_ALLOC) == 0)
74 @@ -3608,11 +3614,6 @@ cris_elf_check_relocs (bfd *abfd,
78 - /* We don't need to handle relocs into sections not going into
79 - the "real" output. */
80 - if ((sec->flags & SEC_ALLOC) == 0)
83 /* We may need to create a reloc section in the dynobj and made room
86 diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
87 index 612525c..3e9ada9 100644
88 --- a/bfd/elf32-m68k.c
89 +++ b/bfd/elf32-m68k.c
90 @@ -2816,6 +2816,11 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
94 + /* We don't need to handle relocs into sections not going into
95 + the "real" output. */
96 + if ((sec->flags & SEC_ALLOC) == 0)
101 /* Make sure a plt entry is created for this symbol if it
102 @@ -2829,8 +2834,7 @@ elf_m68k_check_relocs (abfd, info, sec, relocs)
104 /* If we are creating a shared library, we need to copy the
105 reloc into the shared library. */
107 - && (sec->flags & SEC_ALLOC) != 0)
110 /* When creating a shared object, we must copy these
111 reloc types into the output file. We create a reloc
112 diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
113 index 0c25c3e..574cd98 100644
114 --- a/bfd/elf32-ppc.c
115 +++ b/bfd/elf32-ppc.c
116 @@ -2987,10 +2987,6 @@ ppc_elf_copy_indirect_symbol (struct bfd_link_info *info,
117 edir->elf.needs_plt |= eind->elf.needs_plt;
118 edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
120 - /* If we were called to copy over info for a weak sym, that's all. */
121 - if (eind->elf.root.type != bfd_link_hash_indirect)
124 if (eind->dyn_relocs != NULL)
126 if (edir->dyn_relocs != NULL)
127 @@ -3022,6 +3018,16 @@ ppc_elf_copy_indirect_symbol (struct bfd_link_info *info,
128 eind->dyn_relocs = NULL;
131 + /* If we were called to copy over info for a weak sym, that's all.
132 + You might think dyn_relocs need not be copied over; After all,
133 + both syms will be dynamic or both non-dynamic so we're just
134 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
135 + code in ppc_elf_adjust_dynamic_symbol needs to check for
136 + dyn_relocs in read-only sections, and it does so on what is the
138 + if (eind->elf.root.type != bfd_link_hash_indirect)
141 /* Copy over the GOT refcount entries that we may have already seen to
142 the symbol which just became indirect. */
143 edir->elf.got.refcount += eind->elf.got.refcount;
144 diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
145 index 93d1314..32a3430 100644
146 --- a/bfd/elf64-ppc.c
147 +++ b/bfd/elf64-ppc.c
148 @@ -4435,10 +4435,6 @@ ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info,
149 edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
150 edir->elf.needs_plt |= eind->elf.needs_plt;
152 - /* If we were called to copy over info for a weak sym, that's all. */
153 - if (eind->elf.root.type != bfd_link_hash_indirect)
156 /* Copy over any dynamic relocs we may have on the indirect sym. */
157 if (eind->dyn_relocs != NULL)
159 @@ -4471,6 +4467,16 @@ ppc64_elf_copy_indirect_symbol (struct bfd_link_info *info,
160 eind->dyn_relocs = NULL;
163 + /* If we were called to copy over info for a weak sym, that's all.
164 + You might think dyn_relocs need not be copied over; After all,
165 + both syms will be dynamic or both non-dynamic so we're just
166 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
167 + code in ppc64_elf_adjust_dynamic_symbol needs to check for
168 + dyn_relocs in read-only sections, and it does so on what is the
170 + if (eind->elf.root.type != bfd_link_hash_indirect)
173 /* Copy over got entries that we may have already seen to the
174 symbol which just became indirect. */
175 if (eind->elf.got.glist != NULL)
176 diff --git a/bfd/elflink.c b/bfd/elflink.c
177 index fc4266b..8556cec 100644
180 @@ -11188,15 +11188,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
183 /* Check for DT_TEXTREL (late, in case the backend removes it). */
184 - if ((info->warn_shared_textrel && info->shared)
185 - || info->error_textrel)
186 + if (((info->warn_shared_textrel && info->shared)
187 + || info->error_textrel)
188 + && (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL)
190 bfd_byte *dyncon, *dynconend;
192 - /* Fix up .dynamic entries. */
193 - o = bfd_get_section_by_name (dynobj, ".dynamic");
194 - BFD_ASSERT (o != NULL);
196 dyncon = o->contents;
197 dynconend = o->contents + o->size;
198 for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
199 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
200 index 33a454d..6b908ad 100644
201 --- a/bfd/elfxx-mips.c
202 +++ b/bfd/elfxx-mips.c
203 @@ -436,8 +436,8 @@ struct mips_elf_link_hash_table
204 entry is set to the address of __rld_obj_head as in IRIX5. */
205 bfd_boolean use_rld_obj_head;
207 - /* This is the value of the __rld_map or __rld_obj_head symbol. */
209 + /* The __rld_map or __rld_obj_head symbol. */
210 + struct elf_link_hash_entry *rld_symbol;
212 /* This is set if we see any mips16 stub sections. */
213 bfd_boolean mips16_stubs_seen;
214 @@ -768,6 +768,10 @@ static bfd *reldyn_sorting_bfd;
215 #define MIPS_ELF_GOT_SIZE(abfd) \
216 (get_elf_backend_data (abfd)->s->arch_size / 8)
218 +/* The size of the .rld_map section. */
219 +#define MIPS_ELF_RLD_MAP_SIZE(abfd) \
220 + (get_elf_backend_data (abfd)->s->arch_size / 8)
222 /* The size of a symbol-table entry. */
223 #define MIPS_ELF_SYM_SIZE(abfd) \
224 (get_elf_backend_data (abfd)->s->sizeof_sym)
225 @@ -7081,6 +7085,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
228 mips_elf_hash_table (info)->use_rld_obj_head = TRUE;
229 + mips_elf_hash_table (info)->rld_symbol = h;
232 /* If this is a mips16 text symbol, add 1 to the value to make it
233 @@ -7266,6 +7271,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
235 if (! bfd_elf_link_record_dynamic_symbol (info, h))
237 + mips_elf_hash_table (info)->rld_symbol = h;
241 @@ -9027,7 +9033,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
243 /* We add a room for __rld_map. It will be filled in by the
244 rtld to contain a pointer to the _r_debug structure. */
246 + s->size += MIPS_ELF_RLD_MAP_SIZE (output_bfd);
248 else if (SGI_COMPAT (output_bfd)
249 && CONST_STRNEQ (name, ".compact_rel"))
250 @@ -10030,31 +10036,6 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
251 if (IRIX_COMPAT (output_bfd) == ict_irix6)
252 mips_elf_irix6_finish_dynamic_symbol (output_bfd, name, sym);
254 - if (! info->shared)
256 - if (! mips_elf_hash_table (info)->use_rld_obj_head
257 - && (strcmp (name, "__rld_map") == 0
258 - || strcmp (name, "__RLD_MAP") == 0))
260 - asection *s = bfd_get_section_by_name (dynobj, ".rld_map");
261 - BFD_ASSERT (s != NULL);
262 - sym->st_value = s->output_section->vma + s->output_offset;
263 - bfd_put_32 (output_bfd, 0, s->contents);
264 - if (mips_elf_hash_table (info)->rld_value == 0)
265 - mips_elf_hash_table (info)->rld_value = sym->st_value;
267 - else if (mips_elf_hash_table (info)->use_rld_obj_head
268 - && strcmp (name, "__rld_obj_head") == 0)
270 - /* IRIX6 does not use a .rld_map section. */
271 - if (IRIX_COMPAT (output_bfd) == ict_irix5
272 - || IRIX_COMPAT (output_bfd) == ict_none)
273 - BFD_ASSERT (bfd_get_section_by_name (dynobj, ".rld_map")
275 - mips_elf_hash_table (info)->rld_value = sym->st_value;
279 /* Keep dynamic MIPS16 symbols odd. This allows the dynamic linker to
280 treat MIPS16 symbols like any other. */
281 if (ELF_ST_IS_MIPS16 (sym->st_other))
282 @@ -10517,7 +10498,19 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
285 case DT_MIPS_RLD_MAP:
286 - dyn.d_un.d_ptr = mips_elf_hash_table (info)->rld_value;
288 + struct elf_link_hash_entry *h;
289 + h = mips_elf_hash_table (info)->rld_symbol;
292 + dyn_to_skip = MIPS_ELF_DYN_SIZE (dynobj);
293 + swap_out_p = FALSE;
296 + s = h->root.u.def.section;
297 + dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset
298 + + h->root.u.def.value);
302 case DT_MIPS_OPTIONS:
303 @@ -12794,7 +12787,7 @@ _bfd_mips_elf_link_hash_table_create (bfd *abfd)
304 ret->procedure_count = 0;
305 ret->compact_rel_size = 0;
306 ret->use_rld_obj_head = FALSE;
307 - ret->rld_value = 0;
308 + ret->rld_symbol = NULL;
309 ret->mips16_stubs_seen = FALSE;
310 ret->use_plts_and_copy_relocs = FALSE;
311 ret->is_vxworks = FALSE;
312 diff --git a/bfd/version.h b/bfd/version.h
313 index c6800ec..cb20c1b 100644
317 -#define BFD_VERSION_DATE 20111121
318 +#define BFD_VERSION_DATE 20111211
319 #define BFD_VERSION @bfd_version@
320 #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
321 #define REPORT_BUGS_TO @report_bugs_to@
322 diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
323 index 233d962..1b84638 100644
324 --- a/ld/testsuite/ChangeLog
325 +++ b/ld/testsuite/ChangeLog
327 +2011-12-01 Hans-Peter Nilsson <hp@axis.com>
329 + * ld-cris/pic-gc-72.d: Revert last change to adjust for reverted
330 + cause for last change.
332 2011-11-10 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
334 Apply mainline patches.
335 diff --git a/ld/testsuite/ld-cris/pic-gc-72.d b/ld/testsuite/ld-cris/pic-gc-72.d
336 index 7e72752..7c30980 100644
337 --- a/ld/testsuite/ld-cris/pic-gc-72.d
338 +++ b/ld/testsuite/ld-cris/pic-gc-72.d
339 @@ -19,11 +19,10 @@ Contents of section .dynsym:
340 Contents of section .dynstr:
342 Contents of section .text:
345 Contents of section .dynamic:
348 Contents of section .got:
349 - 21cc 74210000 00000000 00000000 .*
350 + 21e4 8c210000 00000000 00000000 .*
351 Contents of section .data:
354 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
355 index a445030..26f759e 100644
356 --- a/opcodes/ChangeLog
357 +++ b/opcodes/ChangeLog
359 +2011-11-25 Pierre Muller <muller@ics.u-strasbg.fr>
361 + * mips-dis.c (print_insn_micromips): Rename local variable iprintf
362 + to infprintf to avoid shadow warning.
364 2011-10-27 Peter Bergner <bergner@vnet.ibm.com>
366 * ppc-opc.c (powerpc_opcodes) <drrndq, drrndq., dtstexq, dctqpq,
367 diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
368 index 4e18d8a..72285de 100644
369 --- a/opcodes/mips-dis.c
370 +++ b/opcodes/mips-dis.c
371 @@ -2260,7 +2260,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info)
373 print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
375 - const fprintf_ftype iprintf = info->fprintf_func;
376 + const fprintf_ftype infprintf = info->fprintf_func;
377 const struct mips_opcode *op, *opend;
378 unsigned int lsb, msbd, msb;
379 void *is = info->stream;
380 @@ -2307,7 +2307,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
381 status = (*info->read_memory_func) (memaddr + 2, buffer, 2, info);
384 - iprintf (is, "micromips 0x%x", higher);
385 + infprintf (is, "micromips 0x%x", higher);
386 (*info->memory_error_func) (status, memaddr + 2, info);
389 @@ -2320,7 +2320,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
390 status = (*info->read_memory_func) (memaddr + 4, buffer, 2, info);
393 - iprintf (is, "micromips 0x%x", higher);
394 + infprintf (is, "micromips 0x%x", higher);
395 (*info->memory_error_func) (status, memaddr + 4, info);
398 @@ -2328,7 +2328,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
399 insn = bfd_getb16 (buffer);
401 insn = bfd_getl16 (buffer);
402 - iprintf (is, "0x%x%04x (48-bit insn)", higher, insn);
403 + infprintf (is, "0x%x%04x (48-bit insn)", higher, insn);
405 info->insn_type = dis_noninsn;
407 @@ -2341,7 +2341,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
408 status = (*info->read_memory_func) (memaddr + 2, buffer, 2, info);
411 - iprintf (is, "micromips 0x%x", higher);
412 + infprintf (is, "micromips 0x%x", higher);
413 (*info->memory_error_func) (status, memaddr + 2, info);
416 @@ -2371,9 +2371,9 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
420 - iprintf (is, "%s", op->name);
421 + infprintf (is, "%s", op->name);
422 if (op->args[0] != '\0')
423 - iprintf (is, "\t");
424 + infprintf (is, "\t");
426 for (s = op->args; *s != '\0'; s++)
428 @@ -2382,37 +2382,37 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
432 - iprintf (is, "%c", *s);
433 + infprintf (is, "%c", *s);
437 delta = GET_OP (insn, OFFSET10);
440 - iprintf (is, "%d", delta);
441 + infprintf (is, "%d", delta);
445 - iprintf (is, "0x%lx", GET_OP (insn, STYPE));
446 + infprintf (is, "0x%lx", GET_OP (insn, STYPE));
450 - iprintf (is, "0x%lx", GET_OP (insn, SHAMT));
451 + infprintf (is, "0x%lx", GET_OP (insn, SHAMT));
455 - iprintf (is, "0x%lx", GET_OP (insn, 3BITPOS));
456 + infprintf (is, "0x%lx", GET_OP (insn, 3BITPOS));
460 - iprintf (is, "0x%lx", GET_OP (insn, TRAP));
461 + infprintf (is, "0x%lx", GET_OP (insn, TRAP));
465 delta = GET_OP (insn, OFFSET12);
468 - iprintf (is, "%d", delta);
469 + infprintf (is, "%d", delta);
473 @@ -2433,34 +2433,34 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
477 - iprintf (is, "%s", mips_gpr_names[GET_OP (insn, RS)]);
478 + infprintf (is, "%s", mips_gpr_names[GET_OP (insn, RS)]);
482 - iprintf (is, "0x%lx", GET_OP (insn, CODE));
483 + infprintf (is, "0x%lx", GET_OP (insn, CODE));
487 - iprintf (is, "%s", mips_gpr_names[GET_OP (insn, RD)]);
488 + infprintf (is, "%s", mips_gpr_names[GET_OP (insn, RD)]);
492 - iprintf (is, "0x%lx", GET_OP (insn, PREFX));
493 + infprintf (is, "0x%lx", GET_OP (insn, PREFX));
498 - iprintf (is, "0x%lx", GET_OP (insn, IMMEDIATE));
499 + infprintf (is, "0x%lx", GET_OP (insn, IMMEDIATE));
502 case 'j': /* Same as i, but sign-extended. */
504 delta = (GET_OP (insn, DELTA) ^ 0x8000) - 0x8000;
505 - iprintf (is, "%d", delta);
506 + infprintf (is, "%d", delta);
510 - iprintf (is, "0x%x", GET_OP (insn, CACHE));
511 + infprintf (is, "0x%x", GET_OP (insn, CACHE));
515 @@ -2472,26 +2472,26 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
516 if (s_reg_encode != 0)
518 if (s_reg_encode == 1)
519 - iprintf (is, "%s", mips_gpr_names[16]);
520 + infprintf (is, "%s", mips_gpr_names[16]);
521 else if (s_reg_encode < 9)
522 - iprintf (is, "%s-%s",
523 + infprintf (is, "%s-%s",
525 mips_gpr_names[15 + s_reg_encode]);
526 else if (s_reg_encode == 9)
527 - iprintf (is, "%s-%s,%s",
528 + infprintf (is, "%s-%s,%s",
533 - iprintf (is, "UNKNOWN");
534 + infprintf (is, "UNKNOWN");
537 if (immed & 0x10) /* For ra. */
539 if (s_reg_encode == 0)
540 - iprintf (is, "%s", mips_gpr_names[31]);
541 + infprintf (is, "%s", mips_gpr_names[31]);
543 - iprintf (is, ",%s", mips_gpr_names[31]);
544 + infprintf (is, ",%s", mips_gpr_names[31]);
548 @@ -2504,32 +2504,32 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
552 - iprintf (is, "0x%lx", GET_OP (insn, CODE2));
553 + infprintf (is, "0x%lx", GET_OP (insn, CODE2));
558 - iprintf (is, "%s", mips_gpr_names[GET_OP (insn, RT)]);
559 + infprintf (is, "%s", mips_gpr_names[GET_OP (insn, RT)]);
563 - iprintf (is, "%s", mips_gpr_names[GET_OP (insn, RS3)]);
564 + infprintf (is, "%s", mips_gpr_names[GET_OP (insn, RS3)]);
568 - iprintf (is, "%s", mips_gpr_names[0]);
569 + infprintf (is, "%s", mips_gpr_names[0]);
573 - iprintf (is, "0x%lx", GET_OP (insn, CODE10));
574 + infprintf (is, "0x%lx", GET_OP (insn, CODE10));
578 - iprintf (is, "0x%lx", GET_OP (insn, COPZ));
579 + infprintf (is, "0x%lx", GET_OP (insn, COPZ));
583 - iprintf (is, "%s", mips_fpr_names[GET_OP (insn, FD)]);
584 + infprintf (is, "%s", mips_fpr_names[GET_OP (insn, FD)]);
588 @@ -2540,7 +2540,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
589 'T' format. Therefore, until we gain understanding of
590 cp2 register names, we can simply print the register
592 - iprintf (is, "$%ld", GET_OP (insn, RT));
593 + infprintf (is, "$%ld", GET_OP (insn, RT));
597 @@ -2559,44 +2559,44 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
598 case 0x000002fc: /* mtc0 */
599 case 0x580000fc: /* dmfc0 */
600 case 0x580002fc: /* dmtc0 */
601 - iprintf (is, "%s", mips_cp0_names[GET_OP (insn, RS)]);
602 + infprintf (is, "%s", mips_cp0_names[GET_OP (insn, RS)]);
605 - iprintf (is, "$%ld", GET_OP (insn, RS));
606 + infprintf (is, "$%ld", GET_OP (insn, RS));
612 - iprintf (is, "%ld", GET_OP (insn, SEL));
613 + infprintf (is, "%ld", GET_OP (insn, SEL));
617 - iprintf (is, "%s", mips_hwr_names[GET_OP (insn, RS)]);
618 + infprintf (is, "%s", mips_hwr_names[GET_OP (insn, RS)]);
622 - iprintf (is, "$fcc%ld", GET_OP (insn, CCC));
623 + infprintf (is, "$fcc%ld", GET_OP (insn, CCC));
629 (op->pinfo & (FP_D | FP_S)) != 0
630 ? "$fcc%ld" : "$cc%ld",
635 - iprintf (is, "%s", mips_fpr_names[GET_OP (insn, FR)]);
636 + infprintf (is, "%s", mips_fpr_names[GET_OP (insn, FR)]);
641 - iprintf (is, "%s", mips_fpr_names[GET_OP (insn, FS)]);
642 + infprintf (is, "%s", mips_fpr_names[GET_OP (insn, FS)]);
646 - iprintf (is, "%s", mips_fpr_names[GET_OP (insn, FT)]);
647 + infprintf (is, "%s", mips_fpr_names[GET_OP (insn, FT)]);
651 @@ -2606,18 +2606,18 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
654 lsb = GET_OP (insn, EXTLSB);
655 - iprintf (is, "0x%x", lsb);
656 + infprintf (is, "0x%x", lsb);
660 msb = GET_OP (insn, INSMSB);
661 - iprintf (is, "0x%x", msb - lsb + 1);
662 + infprintf (is, "0x%x", msb - lsb + 1);
667 msbd = GET_OP (insn, EXTMSBD);
668 - iprintf (is, "0x%x", msbd + 1);
669 + infprintf (is, "0x%x", msbd + 1);
673 @@ -2637,30 +2637,30 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
674 mips_cp0sel_names_len,
677 - iprintf (is, "%s", n->name);
678 + infprintf (is, "%s", n->name);
680 - iprintf (is, "$%d,%d", cp0reg, sel);
681 + infprintf (is, "$%d,%d", cp0reg, sel);
686 lsb = GET_OP (insn, EXTLSB) + 32;
687 - iprintf (is, "0x%x", lsb);
688 + infprintf (is, "0x%x", lsb);
692 msb = GET_OP (insn, INSMSB) + 32;
693 - iprintf (is, "0x%x", msb - lsb + 1);
694 + infprintf (is, "0x%x", msb - lsb + 1);
698 msbd = GET_OP (insn, EXTMSBD) + 32;
699 - iprintf (is, "0x%x", msbd + 1);
700 + infprintf (is, "0x%x", msbd + 1);
704 /* xgettext:c-format */
707 _("# internal disassembler error, "
708 "unrecognized modifier (+%c)"),
710 @@ -2674,111 +2674,111 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
713 case 'a': /* global pointer. */
714 - iprintf (is, "%s", mips_gpr_names[28]);
715 + infprintf (is, "%s", mips_gpr_names[28]);
719 regno = micromips_to_32_reg_b_map[GET_OP (insn, MB)];
720 - iprintf (is, "%s", mips_gpr_names[regno]);
721 + infprintf (is, "%s", mips_gpr_names[regno]);
725 regno = micromips_to_32_reg_c_map[GET_OP (insn, MC)];
726 - iprintf (is, "%s", mips_gpr_names[regno]);
727 + infprintf (is, "%s", mips_gpr_names[regno]);
731 regno = micromips_to_32_reg_d_map[GET_OP (insn, MD)];
732 - iprintf (is, "%s", mips_gpr_names[regno]);
733 + infprintf (is, "%s", mips_gpr_names[regno]);
737 regno = micromips_to_32_reg_e_map[GET_OP (insn, ME)];
738 - iprintf (is, "%s", mips_gpr_names[regno]);
739 + infprintf (is, "%s", mips_gpr_names[regno]);
743 /* Save lastregno for "mt" to print out later. */
744 lastregno = micromips_to_32_reg_f_map[GET_OP (insn, MF)];
745 - iprintf (is, "%s", mips_gpr_names[lastregno]);
746 + infprintf (is, "%s", mips_gpr_names[lastregno]);
750 regno = micromips_to_32_reg_g_map[GET_OP (insn, MG)];
751 - iprintf (is, "%s", mips_gpr_names[regno]);
752 + infprintf (is, "%s", mips_gpr_names[regno]);
756 regno = micromips_to_32_reg_h_map[GET_OP (insn, MH)];
757 - iprintf (is, "%s", mips_gpr_names[regno]);
758 + infprintf (is, "%s", mips_gpr_names[regno]);
762 regno = micromips_to_32_reg_i_map[GET_OP (insn, MI)];
763 - iprintf (is, "%s", mips_gpr_names[regno]);
764 + infprintf (is, "%s", mips_gpr_names[regno]);
768 - iprintf (is, "%s", mips_gpr_names[GET_OP (insn, MJ)]);
769 + infprintf (is, "%s", mips_gpr_names[GET_OP (insn, MJ)]);
773 regno = micromips_to_32_reg_l_map[GET_OP (insn, ML)];
774 - iprintf (is, "%s", mips_gpr_names[regno]);
775 + infprintf (is, "%s", mips_gpr_names[regno]);
779 regno = micromips_to_32_reg_m_map[GET_OP (insn, MM)];
780 - iprintf (is, "%s", mips_gpr_names[regno]);
781 + infprintf (is, "%s", mips_gpr_names[regno]);
785 regno = micromips_to_32_reg_n_map[GET_OP (insn, MN)];
786 - iprintf (is, "%s", mips_gpr_names[regno]);
787 + infprintf (is, "%s", mips_gpr_names[regno]);
791 /* Save lastregno for "mt" to print out later. */
792 lastregno = GET_OP (insn, MP);
793 - iprintf (is, "%s", mips_gpr_names[lastregno]);
794 + infprintf (is, "%s", mips_gpr_names[lastregno]);
798 regno = micromips_to_32_reg_q_map[GET_OP (insn, MQ)];
799 - iprintf (is, "%s", mips_gpr_names[regno]);
800 + infprintf (is, "%s", mips_gpr_names[regno]);
803 case 'r': /* program counter. */
804 - iprintf (is, "$pc");
805 + infprintf (is, "$pc");
808 case 's': /* stack pointer. */
810 - iprintf (is, "%s", mips_gpr_names[29]);
811 + infprintf (is, "%s", mips_gpr_names[29]);
815 - iprintf (is, "%s", mips_gpr_names[lastregno]);
816 + infprintf (is, "%s", mips_gpr_names[lastregno]);
820 - iprintf (is, "%s", mips_gpr_names[0]);
821 + infprintf (is, "%s", mips_gpr_names[0]);
825 /* Sign-extend the immediate. */
826 immed = ((GET_OP (insn, IMMA) ^ 0x40) - 0x40) << 2;
827 - iprintf (is, "%d", immed);
828 + infprintf (is, "%d", immed);
832 immed = micromips_imm_b_map[GET_OP (insn, IMMB)];
833 - iprintf (is, "%d", immed);
834 + infprintf (is, "%d", immed);
838 immed = micromips_imm_c_map[GET_OP (insn, IMMC)];
839 - iprintf (is, "0x%lx", immed);
840 + infprintf (is, "0x%lx", immed);
844 @@ -2797,50 +2797,50 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
847 immed = GET_OP (insn, IMMF);
848 - iprintf (is, "0x%x", immed);
849 + infprintf (is, "0x%x", immed);
853 immed = (insn >> MICROMIPSOP_SH_IMMG) + 1;
854 immed = (immed & MICROMIPSOP_MASK_IMMG) - 1;
855 - iprintf (is, "%d", immed);
856 + infprintf (is, "%d", immed);
860 immed = GET_OP (insn, IMMH) << 1;
861 - iprintf (is, "%d", immed);
862 + infprintf (is, "%d", immed);
866 immed = (insn >> MICROMIPSOP_SH_IMMI) + 1;
867 immed = (immed & MICROMIPSOP_MASK_IMMI) - 1;
868 - iprintf (is, "%d", immed);
869 + infprintf (is, "%d", immed);
873 immed = GET_OP (insn, IMMJ) << 2;
874 - iprintf (is, "%d", immed);
875 + infprintf (is, "%d", immed);
879 immed = GET_OP (insn, IMML);
880 - iprintf (is, "%d", immed);
881 + infprintf (is, "%d", immed);
885 immed = (insn >> MICROMIPSOP_SH_IMMM) - 1;
886 immed = (immed & MICROMIPSOP_MASK_IMMM) + 1;
887 - iprintf (is, "%d", immed);
888 + infprintf (is, "%d", immed);
892 immed = GET_OP (insn, IMMN);
894 - iprintf (is, "%s,%s",
895 + infprintf (is, "%s,%s",
899 - iprintf (is, "%s-%s,%s",
900 + infprintf (is, "%s-%s,%s",
902 mips_gpr_names[16 + immed],
904 @@ -2848,35 +2848,35 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
907 immed = GET_OP (insn, IMMO);
908 - iprintf (is, "0x%x", immed);
909 + infprintf (is, "0x%x", immed);
913 immed = GET_OP (insn, IMMP) << 2;
914 - iprintf (is, "%d", immed);
915 + infprintf (is, "%d", immed);
919 /* Sign-extend the immediate. */
920 immed = (GET_OP (insn, IMMQ) ^ 0x400000) - 0x400000;
922 - iprintf (is, "%d", immed);
923 + infprintf (is, "%d", immed);
927 immed = GET_OP (insn, IMMU) << 2;
928 - iprintf (is, "%d", immed);
929 + infprintf (is, "%d", immed);
933 immed = GET_OP (insn, IMMW) << 2;
934 - iprintf (is, "%d", immed);
935 + infprintf (is, "%d", immed);
939 /* Sign-extend the immediate. */
940 immed = (GET_OP (insn, IMMX) ^ 0x8) - 0x8;
941 - iprintf (is, "%d", immed);
942 + infprintf (is, "%d", immed);
946 @@ -2885,12 +2885,12 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
947 if (immed >= -2 && immed <= 1)
950 - iprintf (is, "%d", immed);
951 + infprintf (is, "%d", immed);
955 /* xgettext:c-format */
958 _("# internal disassembler error, "
959 "unrecognized modifier (m%c)"),
961 @@ -2900,7 +2900,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
964 /* xgettext:c-format */
967 _("# internal disassembler error, "
968 "unrecognized modifier (%c)"),
970 @@ -2937,7 +2937,7 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
974 - iprintf (is, "0x%x", insn);
975 + infprintf (is, "0x%x", insn);
976 info->insn_type = dis_noninsn;