4 +2009-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
7 + * config/tc-m68k.c (mcf52235_ctrl): Remove non-existent CACR, ACR[01].
8 + (mcf53017_ctrl): Fix RAMBAR.
10 +2009-04-30 Nathan Sidwell <nathan@codesourcery.com>
12 + * release-notes-csl.xml: Add arm* TARGET for -mauto-it note.
14 +2009-04-23 Andrew Stubbs <ams@codesourcery.com>
18 + * release-notes-csl.xml: Document bug fix.
21 + * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
22 + fix discarded sections.
24 +2009-04-22 Daniel Jacobowitz <dan@codesourcery.com>
28 + * release-notes-csl.xml (Assembler fix for -mauto-it): New note.
31 + * config/tc-arm.c (handle_it_state): Use force_automatic_it_block_close
32 + to close the previous IT block. Only close the next IT block if we
33 + opened a new one for an IT-only instruction.
35 +2009-04-22 Nathan Sidwell <nathan@codesourcery.com>
39 + Backport 2009-04-22 Nathan Sidwell <nathan@codesourcery.com>
41 + * ld-scripts/rgn-at1.d: Cope with larger padding on sections.
42 + * ld-scripts/rgn-at2.d: Likewise.
43 + * ld-scripts/rgn-at3.d: Likewise.
45 + Backport 2009-04-03 Nathan Sidwell <nathan@codesourcery.com>
47 + * ld-scripts/rgn-at.s: Use explicit .section pseudos.
49 +2009-04-21 Andrew Jenner <andrew@codesourcery.com>
53 + * ld/testsuite/ld-elf/eh5.d: Accept 0b as well as 1b for the
54 + personality byte in the augmentation data.
56 +2009-04-20 Daniel Gutson <dgutson@codesourcery.com>
61 + * readelf.c (get_arm_section_type_name): Added support for
62 + new sections headers.
65 + * arm.h: (SHT_ARM_DEBUGOVERLAY): New define.
66 + (SHT_ARM_OVERLAYSECTION): New define.
68 + * release-notes-csl.xml: Document.
70 +2009-04-15 Nathan Froyd <froydnj@codesourcery.com>
72 + * release-notes-csl.xml: Fix typo.
74 +2009-04-14 Daniel Jacobowitz <dan@codesourcery.com>
76 + Issue #1956, #2786, #5144
77 + * release-notes-csl.xml (Mapping symbols): New note.
80 + * gas/arm/mapdir.d, gas/arm/mapdir.s: New files.
83 + * config/tc-arm.c (make_mapping_symbol): New function, from
84 + mapping_state. Save mapping symbols in the frag.
85 + (insert_data_mapping_symbol): New.
86 + (mapping_state): Use make_mapping_symbol.
87 + (mapping_state_2): New. Provide dummy definition.
88 + (opcode_select): Do not call mapping_state.
89 + (s_bss): Call md_elf_section_change_hook instead of mapping_state.
90 + (arm_handle_align): Update use of tc_frag_data.
91 + Call insert_data_mapping_symbol.
92 + (arm_init_frag): Update use of tc_frag_data. Call
94 + (check_mapping_symbols): New function.
95 + (arm_adjust_symtab): Use check_mapping_symbols.
96 + * config/tc-arm.h (struct arm_frag_type): New.
97 + (TC_FRAG_TYPE): Change to struct arm_frag_type.
98 + (TC_FRAG_INIT): Pass max_chars.
99 + (arm_init_frag): Update prototype.
102 + * ld-arm/thumb2-bl-blx-interwork.d: Correct disassembly.
103 + * ld-arm/script-type.sym: Add an additional $a mapping symbol.
105 + binutils/testsuite/
106 + * binutils-all/arm/thumb2-cond.s: Use instructions.
108 +2009-04-12 Daniel Jacobowitz <dan@codesourcery.com>
112 + * release-notes-csl.xml (Incorrect placement of linker-generated
113 + functions): New note.
116 + * elf32-arm.c (elf32_arm_next_input_section): Skip flags without
118 + (group_sections): Handle empty lists.
120 +2009-04-09 Daniel Jacobowitz <dan@codesourcery.com>
124 + * release-notes-csl.xml (Assembler floating point format): New note.
127 + * gas/arm/mapmisc.d: Correct expected output for .double and .dcb.d.
129 +2009-04-09 Daniel Gutson <dgutson@codesourcery.com>
134 + * gas/arm/arm-it-auto.d: fixed test case dump.
136 +2009-04-09 Catherine Moore <clm@codesourcery.com>
139 + * config/tc-mips.c (check_for_24k_errata): Adjust if block.
142 +2009-04-09 Daniel Gutson <dgutson@codesourcery.com>
146 + * config/tc-arm.c (do_automatic_it): New variable.
147 + (it_instruction_type): New enum.
148 + (arm_it): New field.
149 + (it_state): New enum.
150 + (current_it): New struct and global variable.
151 + (current_it_compatible): New function.
152 + (conditional_insn): New function.
153 + (set_it_insn_type): New macro.
154 + (set_it_insn_type_last): New macro.
155 + (do_t_add_sub): Call automatic IT machinery functions.
156 + (do_t_arit3): Likewise.
157 + (do_t_arit3c): Likewise.
158 + (do_t_blx): Likewise.
159 + (do_t_branch): Likewise.
160 + (do_t_bkpt): Likewise.
161 + (do_t_branch23): Likewise.
162 + (do_t_bx): Likewise.
163 + (do_t_bxj): Likewise.
164 + (do_t_cps): Likewise.
165 + (do_t_cpsi): Likewise.
166 + (do_t_cbz): Likewise.
167 + (do_t_it): Likewise.
168 + (encode_thumb2_ldmstm): Likewise.
169 + (do_t_ldst): Likewise.
170 + (do_t_mov_cmp): Likewise.
171 + (do_t_mvn_tst): Likewise.
172 + (do_t_mul): Likewise.
173 + (do_t_neg): Likewise.
174 + (do_t_setend): Likewise.
175 + (do_t_shift): Likewise.
176 + (do_t_tb): Likewise.
177 + (output_it_inst): New function.
178 + (new_automatic_it_block): New function.
179 + (close_automatic_it_block): New function.
180 + (current_it_add_mask): New function.
181 + (it_fsm_pre_encode): New function.
182 + (handle_it_state): New function.
183 + (it_fsm_post_encode): New function.
184 + (force_automatic_it_block_close): New function.
185 + (in_it_block): New function.
186 + (md_assemble): Call automatic IT block machinery functions.
187 + (arm_frob_label): Likewise.
188 + (arm_opts): New element.
189 + * doc/c-arm.texi: New option -mauto-it.
192 + * gas/arm/arm-it-auto.d: New test.
193 + * gas/arm/arm-it-auto.s: New file.
194 + * gas/arm/thumb2_it_auto.d: New test.
195 + * gas/arm/thumb2_it_bad.l: Error message updated.
196 + * gas/arm/thumb2_it_bad_auto.d: New test.
197 + * gas/arm/thumb2_it.d: Comment added.
198 + * gas/arm/thumb2_it_bad.d: Comment added.
200 + * release-notes-csl.xml: Document.
202 +2009-04-08 Daniel Gutson <dgutson@codesourcery.com>
205 + * gas/arm/thumb2_it.d: Removed obsolete regex.
207 +2009-04-08 Paul Brook <paul@codesourcery.com>
211 + * elf32-arm.c (make_branch_to_a8_stub): Ignore long branch stubs.
213 +2009-04-08 Catherine Moore <clm@codesourcery.com>
218 + * config/tc-mips.c (mips_fix_24k): Declare.
219 + (check_for_24k_errata): New.
220 + (mips_cleanup): Call check_for_24k_errata.
221 + (start_noreorder): Likewise.
222 + (md_mips_end): Likewise.
223 + (s_change_sec): Likewise.
224 + (s_change_section): Likewise.
225 + (append_insn): Call check_for_24k_errata. Prevent
226 + ERET/DERET instructions from being moved into delay
228 + (OPTION_FIX_24K): New.
229 + (OPTION_NO_FIX_24k): New.
230 + (md_longopts): Add "mfix-24k" and "mno-fix-24k".
231 + (md_parse_option): Handle fix-24k options.
232 + (md_show_usage): Display fix-24k options.
233 + * doc/c-mips.texi: Document.
234 + * testsuite/gas/mips/mips.exp: Run new tests.
235 + * testsuite/gas/mips/eret.s: New test.
236 + * testsuite/gas/mips/eret.d: New test output.
237 + * testsuite/gas/mips/eret.l: New test output.
239 + * release-notes-csl.xml: New note.
241 +2009-04-08 Nathan Froyd <froydnj@codesourcery.com>
245 + * release-notes-csl.xml (tlbilx encoding fix): New note.
247 + Backport from mainline:
250 + 2009-04-07 Peter Bergner <bergner@vnet.ibm.com>
252 + * ppc-opc.c (powerpc_opcodes) <"tlbilxlpid", "tlbilxpid", "tlbilxva",
253 + "tlbilx">: Use secondary opcode "18" as per the ISA 2.06 documentation.
254 + Reorder entries so the extended mnemonics are listed before tlbilx.
257 + 2009-04-07 Peter Bergner <bergner@vnet.ibm.com>
259 + * gas/ppc/e500mc.d: Update to match extended mnemonics.
261 +2009-04-06 Daniel Gutson <dgutson@codesourcery.com>
266 + * config/tc-arm.c (arm_frag_align_code): Fixed the string message.
267 + * config/tc-arm.h (MAX_MEM_ALIGNMENT_BYTES): New macro.
268 + (MAX_MEM_FOR_RS_ALIGN_CODE): Macro changed to use the above.
271 + * gas/arm/align64.d: New file.
272 + * gas/arm/align64.s: New file.
274 + * release-notes-csl.xml: Document.
276 +2009-04-06 Andrew Jenner <andrew@codesourcery.com>
279 + * elf32-arm.c: Move sysdep.h to start of file.
281 +2009-04-06 Kazu Hirata <kazu@codesourcery.com>
285 + 2009-04-06 Kazu Hirata <kazu@codesourcery.com>
286 + * ld.texinfo (-L): Mention that -L options do not affect how ld
287 + searches for a linker script unless -T option is specified.
288 + * ldfile.c (ldfile_find_command_file): Append the path obtained
289 + from the program name to the search path instead of
290 + prepending. Add a new parameter "default_only". Restrict the
291 + search to the default script location if the new parameter is
293 + (ldfile_open_command_file_1): New.
294 + (ldfile_open_command_file): Call ldfile_open_command_file_1.
295 + (ldfile_open_default_command_file): New.
297 + * ldfile.c (ldfile_find_command_file): Initialize result.
299 +2009-04-05 Kazu Hirata <kazu@codesourcery.com>
303 + * objcopy.c (maybe_sign_extend_vma): New.
304 + (setup_section): Call maybe_sign_extend_vma after manipulating
307 + * release-notes-csl.xml: Mention the bug fix above.
309 +2009-04-03 Julian Brown <julian@codesourcery.com>
311 + * release-notes-csl.xml (Cortex-A8 erratum workaround enabled
312 + for ARMv7-A): Add note.
314 +2009-04-03 Julian Brown <julian@codesourcery.com>
317 + * emultempl/armelf.em (OPTION_NO_FIX_CORTEX_A8): New.
318 + (PARSE_AND_LIST_LONGOPTS): Add --no-fix-cortex-a8 option. Remove
319 + argument from --fix-cortex-a8.
320 + (PARSE_AND_LIST_OPTIONS): Adjust for --[no-]fix-cortex-a8 syntax.
321 + (PARSE_FIX_CORTEX_A8, PARSE_NO_FIX_CORTEX_A8): Handle
322 + --[no-]fix-cortex-a8 syntax.
323 + * ld.texinfo (--fix-cortex-a8): Document.
326 + * elf32-arm.c (bfd_elf32_arm_set_cortex_a8_fix): Re-enable fix by
327 + default on ARM v7-A.
329 +2009-04-03 Nathan Sidwell <nathan@codesourcery.com>
333 + * ldlang.c (lang_leave_output_section_statement): Set lma_region
334 + if it is not overridden and section is for the same vma region as
335 + the previous section.
338 + * ld-scripts/rgn-at.exp: New.
339 + * ld-scripts/rgn-at.s: New.
340 + * ld-scripts/rgn-at1.d: New.
341 + * ld-scripts/rgn-at1.t: New.
342 + * ld-scripts/rgn-at2.d: New.
343 + * ld-scripts/rgn-at2.t: New.
344 + * ld-scripts/rgn-at3.d: New.
345 + * ld-scripts/rgn-at3.t: New.
347 + * release-notes-csl.xml: Add note.
349 +2009-04-02 Nathan Sidwell <nathan@codesourcery.com>
351 + Issues #4842, #5076
353 + * config/tc-armlinux-eabi.h (FPU_DEFAULT): Default to plain VFP.
354 + * config/tc-armeabi.h (FPU_DEFAULT): Likewise.
355 + * config/tc-arm.c (md_begin): If FPU_DEFAULT is set, don't infer
356 + the default FPU from the processor.
359 + * gas/arm/attr-mcpu.d: Add -mfpu=neon.
361 + * release-notes-csl.xml: Add note.
363 +2009-03-31 Paul Brook <paul@codesourcery.com>
368 + * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
369 + * bfd-in2.h: Regenerate.
370 + * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
371 + (_arm_elf_section_data): Add text and exidx fields.
372 + (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
373 + insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
374 + copy_exidx_entry): New functions.
375 + (elf32_arm_write_section): Fixup .ARM.exidx contents.
378 + * emultempl/armelf.em (compare_output_sec_vma): New function.
379 + (gld${EMULATION_NAME}_finish): Add exidx munging code.
382 + * ld-arm/arm.ld: Add .ARM.exidx and .ARM.extab.
383 + * ld-arm/arm-elf.exp: Add unwind-[1-4].
384 + * ld-arm/unwind-1.d: New test.
385 + * ld-arm/unwind-1.s: New test.
386 + * ld-arm/unwind-2.d: New test.
387 + * ld-arm/unwind-2.s: New test.
388 + * ld-arm/unwind-3.d: New test.
389 + * ld-arm/unwind-3.s: New test.
390 + * ld-arm/unwind-4.d: New test.
391 + * ld-arm/unwind-4.s: New test.
393 +2009-03-30 Andrew Jenner <andrew@codesourcery.com>
396 + * emultempl/octeonelf.em: Source mipself.em.
399 + * config/tc-arm.c: Move as.h to start of file.
401 +2009-03-30 Joseph Myers <joseph@codesourcery.com>
408 + * gas/arm/mapsecs.d, gas/arm/mapsecs.s: New.
411 + * arm-dis.c (print_insn): Also check section matches in backwards
412 + search for mapping symbol.
414 +2009-03-30 Julian Brown <julian@codesourcery.com>
417 + * elf32-arm.c (a8_erratum_fix): Add r_type, st_type, sym_name,
418 + non_a8_stub fields.
419 + (find_thumb_glue): Add forward declaration.
420 + (elf32_arm_size_stubs): Improve integration of Cortex-A8 erratum
421 + workaround and ARM/Thumb interworking.
424 + * ld-arm/cortex-a8-fix-b.s: Update for text at 0x8f00.
425 + * ld-arm/cortex-a8-fix-bl.s: Likewise.
426 + * ld-arm/cortex-a8-fix-bcc.s: Likewise.
427 + * ld-arm/cortex-a8-fix-blx.s: Likewise.
428 + * ld-arm/cortex-a8-fix-b.d: Update.
429 + * ld-arm/cortex-a8-fix-bl.d: Update.
430 + * ld-arm/cortex-a8-fix-bcc.d: Update.
431 + * ld-arm/cortex-a8-fix-blx.d: Update.
432 + * ld-arm/cortex-a8-arm-target.s: New.
433 + * ld-arm/cortex-a8-thumb-target.s: New.
434 + * ld-arm/cortex-a8-fix-b-rel.s: New.
435 + * ld-arm/cortex-a8-fix-b-rel-arm.d: New.
436 + * ld-arm/cortex-a8-fix-b-rel-thumb.d: New.
437 + * ld-arm/cortex-a8-fix-bl-rel.s: New.
438 + * ld-arm/cortex-a8-fix-bl-rel-arm.d: New.
439 + * ld-arm/cortex-a8-fix-bl-rel-thumb.d: New.
440 + * ld-arm/cortex-a8-fix-bcc-rel.s: New.
441 + * ld-arm/cortex-a8-fix-bcc-rel-thumb.d: New.
442 + * ld-arm/cortex-a8-fix-blx-rel.s: New.
443 + * ld-arm/cortex-a8-fix-blx-rel-arm.d: New.
444 + * ld-arm/cortex-a8-fix-blx-rel-thumb.d: New.
445 + * ld-arm/arm-elf.exp: Move text section to 0x8f00 in existing
446 + Cortex-A8 erratum workaround tests, and add above new tests.
448 +2009-03-29 Mark Mitchell <mark@codesourcery.com>
452 + 2009-03-28 Mark Mitchell <mark@codesourcery.com>
454 + * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
455 + "ERROR:", in error messages.
456 + * cpu-arm.c (bfd_arm_merge_machines): Likewise.
457 + * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
458 + * elf32-arm.c (tag_cpu_arch_combine): Likewise.
459 + (elf32_arm_merge_eabi_attributes): Likewise.
460 + (elf32_arm_merge_private_bfd_data): Likewise.
462 +2009-03-24 Daniel Jacobowitz <dan@codesourcery.com>
465 + * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
467 +2009-03-22 Mark Mitchell <mark@codesourcery.com>
470 + * ld-arm/arm-elf.exp (armelftests): Use -EL for Cortex-A8 tests.
472 +2009-03-20 Julian Brown <julian@codesourcery.com>
474 + * release-notes-csl.xml (Erratum workaround for Cortex-A8 processors):
477 +2009-03-20 Julian Brown <julian@codesourcery.com>
480 + * ld-arm/arm-elf.exp (Cortex-A8 erratum fix, b.w)
481 + (Cortex-A8 erratum fix, bl.w, Cortex-A8 erratum fix, bcc.w)
482 + (Cortex-A8 erratum fix, blx.w): Pass --fix-cortex-a8 option.
485 + * elf32-arm.c (bfd_elf32_arm_set_cortex_a8_fix): Disable fix by
486 + default in all cases.
488 +2009-03-20 Julian Brown <julian@codesourcery.com>
491 + * config/tc-arm.c (do_t_blx): Always use BFD_RELOC_THUMB_PCREL_BLX.
492 + (md_pcrel_from_section): Align address for BLX.
493 + (tc_gen_reloc): Change BFD_RELOC_THUMB_PCREL_BLX relocations to
494 + BFD_RELOC_THUMB_PCREL_BRANCH23 for EABI v4+.
497 + * ld-arm/arm-elf.exp (armeabitests): Add thumb2-bl-blx-interwork test.
498 + * ld-arm/thumb2-bl-blx-interwork.s: New.
499 + * ld-arm/thumb2-bl-blx-interwork.d: New.
501 +2009-03-20 Andrew Stubbs <ams@codesourcery.com>
503 + * release-note-csl.xml: Document issue #4250 changes.
505 +2009-03-20 Daniel Jacobowitz <dan@codesourcery.com>
507 + * release-notes-csl.xml (Incorrect linker-generated functions): New
510 +2009-03-19 Daniel Jacobowitz <dan@codesourcery.com>
515 + * emultempl/armelf.em (bfd_for_interwork, arm_elf_after_open)
516 + (arm_elf_set_bfd_for_interworking): Delete.
517 + (arm_elf_before_allocation): Do not set the interworking BFD.
518 + Move allocation inside not-dynamic block.
519 + (arm_elf_create_output_section_statements): Create glue sections
520 + and set the interworking BFD here.
521 + (LDEMUL_AFTER_OPEN): Delete.
524 + * ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
525 + ld-arm/farcall-group-size2.d, ld-arm/farcall-group.d: Update for
529 + * elf32-arm.c (elf32_arm_write_section): Declare early.
530 + (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
531 + (arm_allocate_glue_section_space): Exclude empty sections.
532 + (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
533 + (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
535 + (elf32_arm_output_glue_section, elf32_arm_final_link): New.
536 + (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
537 + (elf32_arm_size_dynamic_sections): Allocate interworking
539 + (bfd_elf32_bfd_final_link): Define.
541 +2009-03-18 Daniel Gutson <dgutson@codesourcery.com>
546 + * doc/c-arm.texi: Added entries for cpus ARM Cortex-M0 and Cortex-M1.
548 +2009-03-18 Andrew Stubbs <ams@codesourcery.com>
553 + * config/tc-arm.c (md_apply_fix): Check BFD_RELOC_ARM_IMMEDIATE and
554 + BFD_RELOC_ARM_ADRL_IMMEDIATE value is in the correct section.
555 + Check BFD_RELOC_ARM_ADRL_IMMEDIATE has a defined symbol.
558 + * gas/arm/adr-invalid.d: New file.
559 + * gas/arm/adr-invalid.l: New file.
560 + * gas/arm/adr-invalid.s: New file.
562 +2009-03-17 Daniel Gutson <dgutson@codesourcery.com>
567 + * config/tc-arm.c (arm_cpus): Added cortex-m0.
569 +2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
572 + * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
574 +2009-03-16 Daniel Gutson <dgutson@codesourcery.com>
578 + * gas/config/tc-arm.c (arm_cpus): Added cortex-m0.
580 +2009-03-16 Julian Brown <julian@codesourcery.com>
583 + * emultempl/armelf.em (fix_cortex_a8): New.
584 + (arm_elf_before_allocation): Call bfd_elf32_arm_set_cortex_a8_fix.
585 + (arm_elf_create_output_section_statements): Add fix_cortex_a8 to
586 + bfd_elf32_arm_set_target_relocs.
587 + (OPTION_FIX_CORTEX_A8): New.
588 + (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a8 options.
589 + (PARSE_AND_LIST_OPTIONS): Add fix-cortex-a8 option.
590 + (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_FIX_CORTEX_A8.
593 + * elf32-arm.c (stub_reloc_type): Remove.
594 + (THUMB32_INSN, THUMB32_B_INSN): New macros.
595 + (insn_sequence): Change type of reloc_type.
596 + (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
597 + (elf32_arm_stub_a8_veneer_blx): New stub sequences.
598 + (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
599 + arm_stub_a8_veneer_b, arm_stub_a8_veneer_bl and
600 + arm_stub_a8_veneer_blx.
601 + (_arm_elf_section_data): Add target_addend field.
602 + (a8_erratum_fix, a8_erratum_reloc): New structs.
603 + (elf32_arm_link_hash_table): Add a8_erratum_fixes,
604 + num_a8_erratum_fixes, fix_cortex_a8.
605 + (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
606 + (elf32_arm_final_link_relocate): Add forward declaration.
607 + (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
608 + relocations, multiple relocations per stub.
609 + (find_stub_size_and_template): New.
610 + (arm_size_one_stub): Use find_stub_size_and_template.
611 + (a8_reloc_compare): New.
612 + (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
613 + (bfd_elf32_arm_set_cortex_a8_fix): New.
614 + (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
615 + (arm_map_one_stub): Add THUMB32_TYPE support.
616 + (a8_branch_to_stub_data): New.
617 + (make_branch_to_a8_stub): New.
618 + (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
619 + * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
620 + * bfd-in2.h: Regenerate.
623 + * ld-arm/cortex-a8-fix-b.s: New.
624 + * ld-arm/cortex-a8-fix-b.d: New.
625 + * ld-arm/cortex-a8-fix-bl.s: New.
626 + * ld-arm/cortex-a8-fix-bl.d: New.
627 + * ld-arm/cortex-a8-fix-bcc.s: New.
628 + * ld-arm/cortex-a8-fix-bcc.d: New.
629 + * ld-arm/cortex-a8-fix-blx.s: New.
630 + * ld-arm/cortex-a8-fix-blx.d: New.
632 +2009-03-16 Andrew Stubbs <ams@codesourcery.com>
634 + * release-notes-csl.xml: Document linker bug fix.
636 +2009-03-16 Andrew Stubbs <ams@codesourcery.com>
639 + * dwarf2.c (read_section): Always use rawsize, if available.
642 + 2009-03-16 Alan Modra <amodra@bigpond.net.au>
643 + * simple.c (bfd_simple_get_relocated_section_contents): Use larger
644 + of rawsize and size for buffer.
646 +2009-03-12 Andrew Stubbs <ams@codesourcery.com>
649 + * dwarf2.c (read_section): Always check the offset, even when the
650 + section has been read before.
652 +2009-03-11 Joseph Myers <joseph@codesourcery.com>
654 + binutils/testsuite/
655 + * binutils-all/objdump.W, binutils-all/objdump.s: Don't match
656 + literal "tmpdir/" in expected output.
658 +2009-03-09 Catherine Moore <clm@codesourcery.com>
664 + 2009-03-03 Alan Modra <amodra@bigpond.net.au>
666 + * objdump.c (disassemble_section): Mask address before sign
669 +2009-03-08 Mark Mitchell <mark@codesourcery.com>
672 + * ld-elfcomm/elfcomm.exp: Compile with -fcommon.
674 +2009-03-06 Catherine Moore <clm@codesourcery.com>
680 + 2009-03-05 Nick Clifton <nickc@redhat.com>
682 + * objdump.c (disassemble_section): If the computed next offset is
683 + not beyond the current offset then just continue to the end.
685 +2009-03-05 Joseph Myers <joseph@codesourcery.com>
692 + 2009-03-05 Joseph Myers <joseph@codesourcery.com>
693 + * read.c (s_fill, s_space, s_float_space, float_cons, stringer,
694 + s_incbin): Call md_cons_align (1).
697 + 2009-03-05 Joseph Myers <joseph@codesourcery.com>
698 + * gas/arm/mapmisc.d, gas/arm/mapmisc.dat, gas/arm/mapmisc.s: New.
700 +2009-03-01 Mark Mitchell <mark@codesourcery.com>
704 + * release-notes-csl.xml: Document change.
706 + * config/tc-arm.c (md_assemble): Allow barrier instructions on
709 + * arm/archv6m.s: Add dmb, dsb, and isb.
710 + * arm/archv6m.d: Likewise.
712 +2009-02-24 Sandra Loosemore <sandra@codesourcery.com>
715 + Patch applied simultaneously on mainline.
718 + * ld.texinfo (Options): Correct typos in example. Recommend
719 + using joined forms of syntax for passing options with arguments
721 + (-a): Use consistent syntax for documenting option arguments.
722 + Clean up indexing and markup.
723 + (-A/--architecture): Likewise.
724 + (-f/--auxiliary): Likewise.
725 + (-F/--filter): Likewise.
727 + (-G/--gpsize): Likewise.
728 + (-h/-soname):Likewise.
730 + (-l/--library): Likewise.
731 + (-L/--library-path): Likewise.
733 + (--defsym): Likewise.
734 + (-I/--dynamic-linker): Likewise.
736 + (--oformat): Likewise.
737 + (--retain-symbols-file): Likewise.
738 + (-rpath): Likewise.
739 + (-rpath-link): Likewise.
740 + (--sort-common): Likewise.
741 + (--sort-section): Likewise.
742 + (--split-by-file): Likewise.
743 + (--split-by-reloc): Likewise.
744 + (--sysroot): Likewise.
745 + (--section-start): Likewise.
746 + (-Tbss, -Tdata, -Ttext): Likewise.
747 + (-Ttext-segment): Likewise.
748 + (--version-script): Likewise.
749 + (--wrap): Likewise.
751 +2009-02-24 Maxim Kuvyrkov <maxim@codesourcery.com>
755 + 2009-02-19 Maxim Kuvyrkov <maxim@codesourcery.com>
759 + * elf.c (_bfd_elf_map_sections_to_segments): Fix sanity check.
761 + 2008-03-25 Maxim Kuvyrkov <maxim@codesourcery.com>
765 + * elf.c (_bfd_elf_map_sections_to_segments): Check user's
766 + mapping of section to segments.
768 +2009-02-22 Mark Mitchell <mark@codesourcery.com>
770 + * release-notes-csl.xml: Document change.
772 + * config/tc-arm.c (warn_deprecated_sp): New macro.
773 + (do_t_mov_cmp): Permit R13 as the second
774 + argument to "cmp.n".
776 + * gas/arm/thumb2_bad_reg.s: Update.
777 + * gas/arm/thumb2_bad_reg.l: Likewise.
779 +2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
782 + * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
783 + to elf32_arm_stub_long_branch_any_arm_pic.
784 + (elf32_arm_stub_long_branch_any_thumb_pic): New.
785 + (enum elf32_arm_stub_type, arm_type_of_stub)
786 + (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
790 + * ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
791 + ld-arm/farcall-arm-thumb-pic-veneer.d,
792 + ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Update for fixed
795 +2009-02-23 Joseph Myers <joseph@codesourcery.com>
798 + * elf32-arm.c (PREV_SEC): Update comment.
799 + (group_sections): Rename argument to stubs_always_after_branch.
800 + Reverse the list and place stubs at the end of input sections.
802 + (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
805 + * ld.texinfo (ARM): Document changed meaning of --stub-group-size.
806 + * emultempl/armelf.em (hook_in_stub): Insert after the input section.
807 + (elf32_arm_add_stub_section): Update comment.
808 + (PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size.
810 +2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
813 + * ld-arm/arm-elf.exp (armeabitests): Update duplicate test names.
814 + Use normal output files for big-endian.
815 + * ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete.
816 + * ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
817 + ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
818 + ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
819 + ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
820 + ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
821 + ld-arm/farcall-thumb-arm-be8.d,
822 + ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
823 + ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d,
824 + ld-arm/farcall-thumb-arm.d,
825 + ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
826 + ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
827 + ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d,
828 + ld-arm/thumb2-bl-bad.d: Update for moved stubs.
830 +2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
834 + 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
837 + * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
839 + (arm_size_one_stub): Remove unnecessary break.
840 + (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
842 + 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
845 + * ld-arm/arm-elf.exp (armeabitests): Run new tests. Correct BE8 output
847 + * ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: New.
849 + 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
852 + * elf32-arm.c (stub_insn_type): New type.
853 + (stub_reloc_type): Likewise.
854 + (insn_sequence): Likewise.
855 + (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
856 + (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
857 + (elf32_arm_stub_long_branch_thumb_only): Likewise.
858 + (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
859 + (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
860 + (elf32_arm_stub_long_branch_any_any_pic): Likewise.
861 + (elf32_arm_stub_hash_entry): Add new helper fields.
862 + (stub_hash_newfunc): Initialize these new fields.
863 + (arm_build_one_stub): Encode Arm and Thumb instructions separately
864 + to take endianness into account.
865 + (arm_size_one_stub): Compute size of stubs using insn_sequence.
866 + (arm_map_one_stub): Code is now more generic, thanks to
870 + * ld-arm/arm-elf.exp: Add new farcall-thumb-arm-be8 test.
871 + * ld-arm/farcall-thumb-arm-be8.d: New expected result.
872 + * ld-arm/farcall-arm-arm-be8.d: Replace wildcards by instructions.
874 + 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
877 + * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
879 + (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
880 + (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
881 + BLX is not available. Fix typo in warning message. Add comments
882 + and improve formatting.
883 + (arm_build_one_stub): Adjust to new
884 + elf32_arm_stub_long_branch_v4t_thumb_arm stub.
885 + (arm_map_one_stub): Likewise.
888 + * ld-arm/arm-elf.exp: Rewrite non-EABI variants of
889 + thumb2-bl-as-thumb1-bad and thumb2-bl-bad tests, which now
890 + pass. farcall-thumb-thumb now passes in EABI mode.
891 + * ld-arm/farcall-thumb-arm-pic-veneer.d: Fixed name, source, as
892 + and ld flags to match intended test.
893 + * ld-arm/farcall-thumb-arm.d: New expected result.
894 + * ld-arm/farcall-thumb-thumb-m.d: Likewise.
895 + * ld-arm/farcall-thumb-thumb-m-pic-veneer.d: Fixed name and ld
897 + * ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
898 + * ld-arm/farcall-thumb-thumb.d: New expected result, this test is
899 + now expected to pass.
900 + * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: Likewise.
901 + * ld-arm/thumb2-bl-bad-noeabi.d: Likewise.
902 + * ld-arm/thumb2-bl-as-thumb1-bad.d: Update addresses according to
904 + * ld-arm/thumb2-bl-as-thumb1-bad.s: Update comment.
906 + 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
909 + * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
910 + stub. Catch default case error.
911 + (arm_map_one_stub): Add missing Thumb mapping symbol.
914 + * ld-arm/farcall-arm-arm-pic-veneer.d,
915 + ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
916 + ld-arm/farcall-arm-thumb-pic-veneer.d,
917 + ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
918 + ld-arm/farcall-thumb-thumb-blx-pic-veneer.d: Fix expected stub
921 + 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
924 + * elf32-arm.c (arm_long_branch_stub,
925 + arm_thumb_v4t_long_branch_stub,
926 + arm_thumb_thumb_long_branch_stub,
927 + arm_thumb_arm_v4t_long_branch_stub,
928 + arm_thumb_arm_v4t_short_branch_stub,
929 + arm_pic_long_branch_stub):
930 + Renamed to elf32_arm_stub_long_branch_any_any,
931 + elf32_arm_stub_long_branch_v4t_arm_thumb,
932 + elf32_arm_stub_long_branch_thumb_only,
933 + elf32_arm_stub_long_branch_v4t_thumb_arm,
934 + elf32_arm_stub_short_branch_v4t_thumb_arm,
935 + elf32_arm_stub_long_branch_any_any_pic.
936 + (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
937 + arm_thumb_thumb_stub_long_branch,
938 + arm_thumb_arm_v4t_stub_long_branch,
939 + arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
940 + Renamed to arm_stub_long_branch_any_any,
941 + arm_stub_long_branch_v4t_arm_thumb,
942 + arm_stub_long_branch_thumb_only,
943 + arm_stub_long_branch_v4t_thumb_arm,
944 + arm_stub_short_branch_v4t_thumb_arm,
945 + arm_stub_long_branch_any_any_pic.
947 +2009-02-22 Mark Mitchell <mark@codesourcery.com>
950 + * release-notes-csl.xml: Document fix.
953 + 2009-02-21 Mark Mitchell <mark@codesourcery.com>
954 + * make-temp-file.c (<windows.h>): Include on Windows.
955 + (choose_tmpdir): On Windows, use GetTempPath.
957 +2009-02-19 Maxim Kuvyrkov <maxim@codesourcery.com>
962 + * elf.c (_bfd_elf_map_sections_to_segments): Fix sanity check.
964 +2009-02-18 Nathan Sidwell <nathan@codesourcery.com>
968 + * config/tc-arm.c (do_nop): Generate v6k nops whenever possible.
969 + (arm_handle_align): Generate v6k ARM, thumb2 wide & narrow nops
973 + * gas/arm/align.s, gas/arm/align.d: New.
974 + * gas/arm/thumb32.d, gas/arm/arch6zk.d, gas/arm/arch6zk.s,
975 + arm/thumb2_relax.d: Adjust for align changes.
977 +2009-02-05 Joseph Myers <joseph@codesourcery.com>
980 + * elf.c: Revert local version of issue 3598 patch.
982 +2009-02-05 Joseph Myers <joseph@codesourcery.com>
985 + * elflink.c: Resync with upstream.
988 + * sysdep.h: Resync with upstream.
990 +2009-02-05 Joseph Myers <joseph@codesourcery.com>
993 + * config/tc-m68k.c: Resync whitespace with upstream.
994 + * config/tc-mips.c: Remove duplicate 74kf3_2 entry.
997 + * gas/arm/backslash-at.d: Resync with upstream.
1000 + * mips.h: Remove relics of old Octeon support.
1002 +2009-02-05 Joseph Myers <joseph@codesourcery.com>
1005 + * config/tc-mips.c: Remove relics of old Octeon support. Adjust
1006 + error checking in line with
1007 + <https://intranet.codesourcery.com/ml/gnu-mips-sgxx/2008-08/msg00069.html>.
1010 + * gas/mips/octeon1.l, gas/mips/octeon3.d, gas/mips/octeon3.s:
1011 + Update for assembler changes.
1014 + * mips-dis.c: Remove relics of old Octeon support.
1015 + * mips-opc.c: Restore Octeon sync instructions.
1017 +2009-02-04 Maxim Kuvyrkov <maxim@codesourcery.com>
1019 + Clean up m68k TLS implementation after upstream contribution.
1022 + * ld-m68k/tls-gd-ie-1.d: Update.
1023 + * ld-m68k/tls-gd-3.d, ld-m68k/tls-gd-3.s: Move to gas testsuite.
1024 + * ld-m68k/m68k.exp (merge isa-a isa-a:nodiv): Fix test.
1025 + (tls-*): Run only for m68k-*-linux* targets.
1028 + * gas/m68k/tls-gd-3.d, gas/m68k/tls-gd-3.s: New test.
1029 + * gas/m68k/all.exp: Run it.
1032 + * config/tc-m68k.c: Fix whitespace.
1035 + * elf32-m68k.c: Fix formatting.
1036 + (elf_m68k_relocate_section): Remove duplicate code. Use
1037 + SYMBOL_REFERENCES_LOCAL.
1038 + (elf_m68k_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1040 +2009-02-04 Andrew Jenner <andrew@codesourcery.com>
1043 + * configure.tgt: Handle mips-montavista-elf.
1045 +2009-02-03 Kazu Hirata <kazu@codesourcery.com>
1048 + * mh-mingw (BOOT_CFLAGS): Remove -D__USE_MINGW_ACCESS.
1049 + (CFLAGS): Comment out.
1052 + * cygpath.c (msvcrt_dll): Change the return type to HMODULE.
1053 + (msvcrt_fopen): Use HMODULE for the return value from msvcrt_dll.OB
1055 +2009-02-03 Joseph Myers <joseph@codesourcery.com>
1060 + * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1063 +2009-02-02 Kazu Hirata <kazu@codesourcery.com>
1066 + * gprof.h: Include gconfig.h. #undef PACKAGE.
1069 + * gprof.h: Include config.h.
1071 +2009-01-30 Catherine Moore <clm@codesourcery.com>
1074 + elf32-m68k.c (elf_m68k_relocate_section): Pass relocation
1075 + type to elf_m68k_init_got_entry_key.
1077 +2009-01-29 Joseph Myers <joseph@codesourcery.com>
1080 + * elf32-arm.c: Resync whitespace with upstream.
1083 + * doc/c-mips.texi: Remove duplicate 74kf3_2 entry.
1086 + * configure.in: Replace AC_ERROR with AC_MSG_ERROR.
1087 + * emultempl/m68kelf.em: Resync whitespace with upstream.
1089 +2009-01-29 Catherine Moore <clm@codesourcery.com>
1092 + elfxx-mips.c (mips_elf_calculate_relocation): Add check
1095 +2009-01-28 Joseph Myers <joseph@codesourcery.com>
1098 + * elfxx-mips.c (mips_mach_extensions): Remove duplicate Octeon
1102 + * config/tc-mips.c (CPU_HAS_DROR): Remove Octeon handling.
1103 + (CPU_HAS_INS): Remove.
1106 + * gas/mips/mips.exp: Resync whitespace with upstream.
1109 + * mips.h: Resync whitespace with upstream.
1112 + * mips.h (OPCODE_IS_MEMBER): Remove duplicate Octeon check.
1115 + * mips-opc.c (mips_builtin_opcodes): Remove duplicate pop
1118 +2009-01-28 Joseph Myers <joseph@codesourcery.com>
1120 + * config.sub: Remove XLR targets.
1121 + * configure.ac: Move mips*-sde-elf* case to upstream location.
1122 + Don't add target-sdemdi.
1123 + * configure: Regenerate.
1126 + * elf.c: Remove duplicate if conditional.
1127 + * elf32-m68k.c: Remove conflict marker.
1128 + * elfxx-mips.c: Resync whitespace with upstream. Remove duplicate
1132 + * mt-sde: Revert difference from upstream.
1135 + * ld-arm/arm-elf.exp: Remove duplicate runs of some tests.
1138 + * ppc-dis.c: Remove duplicate if conditional.
1140 +2009-01-25 Maxim Kuvyrkov <maxim@codesourcery.com>
1143 + * elf32-m68k.c (elf_m68k_finalize_got_offsets): Fix condition.
1145 +2009-01-25 Maxim Kuvyrkov <maxim@codesourcery.com>
1148 + * elf32-m68k.c (struct elf_m68k_finalize_got_offsets_arg): Remove
1149 + use_neg_got_offsets_p field.
1150 + (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets):
1151 + Update, don't use not initialized data, initialize data before
1154 +2009-01-21 Andrew Stubbs <ams@codesourcery.com>
1159 + * config/tc-arm.c (attributes_set_explicitly): New array.
1160 + (s_arm_eabi_attribute): Check return value from s_vendor_attribute.
1161 + (cpu_arch): Add ARM_ARCH_V5T.
1162 + (aeabi_set_attribute_int): New function.
1163 + (aeabi_set_attribute_string): New function.
1164 + (aeabi_set_public_attributes): Set attributes according to the user's
1165 + intentions, rather than the actual state of the binary.
1166 + Use aeabi_set_attribute_int and aeabi_set_attribute_string instead of
1167 + bfd_elf_add_proc_attr_int and bfd_elf_add_proc_attr_string.
1168 + Support WMMXv2. Use attribute names instead of numbers.
1169 + * read.c (s_vendor_attribute): Change return type to int.
1170 + Return the tag number that was set.
1171 + * read.h (s_vendor_attribute): Change return type to int.
1174 + * gas/arm/attr-cpu-directive.d: New file.
1175 + * gas/arm/attr-cpu-directive.s: New file.
1176 + * gas/arm/attr-default.d: New file.
1177 + * gas/arm/attr-march-all.d: New file.
1178 + * gas/arm/attr-march-armv1.d: New file.
1179 + * gas/arm/attr-march-armv2.d: New file.
1180 + * gas/arm/attr-march-armv2a.d: New file.
1181 + * gas/arm/attr-march-armv2s.d: New file.
1182 + * gas/arm/attr-march-armv3.d: New file.
1183 + * gas/arm/attr-march-armv3m.d: New file.
1184 + * gas/arm/attr-march-armv4.d: New file.
1185 + * gas/arm/attr-march-armv4t.d: New file.
1186 + * gas/arm/attr-march-armv4txm.d: New file.
1187 + * gas/arm/attr-march-armv4xm.d: New file.
1188 + * gas/arm/attr-march-armv5.d: New file.
1189 + * gas/arm/attr-march-armv5t.d: New file.
1190 + * gas/arm/attr-march-armv5te.d: New file.
1191 + * gas/arm/attr-march-armv5tej.d: New file.
1192 + * gas/arm/attr-march-armv5texp.d: New file.
1193 + * gas/arm/attr-march-armv5txm.d: New file.
1194 + * gas/arm/attr-march-armv6-m.d: New file.
1195 + * gas/arm/attr-march-armv6.d: New file.
1196 + * gas/arm/attr-march-armv6j.d: New file.
1197 + * gas/arm/attr-march-armv6k.d: New file.
1198 + * gas/arm/attr-march-armv6kt2.d: New file.
1199 + * gas/arm/attr-march-armv6t2.d: New file.
1200 + * gas/arm/attr-march-armv6z.d: New file.
1201 + * gas/arm/attr-march-armv6zk.d: New file.
1202 + * gas/arm/attr-march-armv6zkt2.d: New file.
1203 + * gas/arm/attr-march-armv6zt2.d: New file.
1204 + * gas/arm/attr-march-armv7-a.d: New file.
1205 + * gas/arm/attr-march-armv7-m.d: New file.
1206 + * gas/arm/attr-march-armv7-r.d: New file.
1207 + * gas/arm/attr-march-armv7.d: New file.
1208 + * gas/arm/attr-march-armv7a.d: New file.
1209 + * gas/arm/attr-march-armv7m.d: New file.
1210 + * gas/arm/attr-march-armv7r.d: New file.
1211 + * gas/arm/attr-march-iwmmxt.d: New file.
1212 + * gas/arm/attr-march-iwmmxt2.d: New file.
1213 + * gas/arm/attr-march-marvell-f.d: New file.
1214 + * gas/arm/attr-march-xscale.d: New file.
1215 + * gas/arm/attr-mcpu.d: New file.
1216 + * gas/arm/attr-mfpu-arm1020e.d: New file.
1217 + * gas/arm/attr-mfpu-arm1020t.d: New file.
1218 + * gas/arm/attr-mfpu-arm1136jf-s.d: New file.
1219 + * gas/arm/attr-mfpu-arm1136jfs.d: New file.
1220 + * gas/arm/attr-mfpu-arm7500fe.d: New file.
1221 + * gas/arm/attr-mfpu-fpa.d: New file.
1222 + * gas/arm/attr-mfpu-fpa10.d: New file.
1223 + * gas/arm/attr-mfpu-fpa11.d: New file.
1224 + * gas/arm/attr-mfpu-fpe.d: New file.
1225 + * gas/arm/attr-mfpu-fpe2.d: New file.
1226 + * gas/arm/attr-mfpu-fpe3.d: New file.
1227 + * gas/arm/attr-mfpu-maverick.d: New file.
1228 + * gas/arm/attr-mfpu-neon-fp16.d: New file.
1229 + * gas/arm/attr-mfpu-neon.d: New file.
1230 + * gas/arm/attr-mfpu-softfpa.d: New file.
1231 + * gas/arm/attr-mfpu-softvfp+vfp.d: New file.
1232 + * gas/arm/attr-mfpu-softvfp.d: New file.
1233 + * gas/arm/attr-mfpu-vfp.d: New file.
1234 + * gas/arm/attr-mfpu-vfp10-r0.d: New file.
1235 + * gas/arm/attr-mfpu-vfp10.d: New file.
1236 + * gas/arm/attr-mfpu-vfp3.d: New file.
1237 + * gas/arm/attr-mfpu-vfp9.d: New file.
1238 + * gas/arm/attr-mfpu-vfpv2.d: New file.
1239 + * gas/arm/attr-mfpu-vfpv3-d16.d: New file.
1240 + * gas/arm/attr-mfpu-vfpv3.d: New file.
1241 + * gas/arm/attr-mfpu-vfpxd.d: New file.
1242 + * gas/arm/attr-order.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.
1243 + * gas/arm/attr-override-cpu-directive.d: New file.
1244 + * gas/arm/attr-override-cpu-directive.s: New file.
1245 + * gas/arm/attr-override-mcpu.d: New file.
1246 + * gas/arm/attr-override-mcpu.s: New file.
1247 + * gas/arm/blank.s: New file.
1248 + * gas/arm/eabi_attr_1.d: Update Tag_ARM_ISA_use and Tag_THUMB_ISA_use.
1251 + * ld-arm/attr-merge-3.attr: Update following gas change.
1252 + * ld-arm/attr-merge-2.attr: Update Tag_ARM_ISA_use and
1253 + Tag_THUMB_ISA_use following gas changes.
1254 + * ld-arm/attr-merge-4.attr: Likewise.
1255 + * ld-arm/attr-merge-5.attr: Likewise.
1256 + * ld-arm/attr-merge-arch-1.attr: Likewise.
1257 + * ld-arm/attr-merge-arch-2.attr: Likewise.
1258 + * ld-arm/attr-merge-unknown-2.d: Likewise.
1259 + * ld-arm/attr-merge-unknown-2r.d: Likewise.
1260 + * ld-arm/attr-merge-unknown-3.d: Likewise.
1261 + * ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
1262 + * ld-arm/attr-merge-wchar-00.d: Likewise.
1263 + * ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
1264 + * ld-arm/attr-merge-wchar-02.d: Likewise.
1265 + * ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
1266 + * ld-arm/attr-merge-wchar-04.d: Likewise.
1267 + * ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
1268 + * ld-arm/attr-merge-wchar-20.d: Likewise.
1269 + * ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
1270 + * ld-arm/attr-merge-wchar-22.d: Likewise.
1271 + * ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
1272 + * ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
1273 + * ld-arm/attr-merge-wchar-40.d: Likewise.
1274 + * ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
1275 + * ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
1276 + * ld-arm/attr-merge-wchar-44.d: Likewise.
1277 + * ld-arm/attr-merge.attr: Likewise.
1279 +2009-01-21 Andrew Stubbs <ams@codesourcery.com>
1282 + * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
1283 + (obj_attr_size): Likewise.
1284 + (write_obj_attribute): Likewise.
1285 + (_bfd_elf_copy_obj_attributes): Likewise.
1286 + (_bfd_elf_parse_attributes): Likewise.
1287 + * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
1288 + (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
1289 + (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
1290 + (ATTR_TYPE_HAS_NO_DEFAULT): New define.
1291 + * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
1294 +2009-01-06 Andrew Stubbs <ams@codesourcery.com>
1296 + * release-notes-csl.xml: Document ARM attributes improvements.
1298 +2009-01-01 Joseph Myers <joseph@codesourcery.com>
1300 + Backport from FSF:
1303 + 2008-12-23 Nick Clifton <nickc@redhat.com>
1305 + * elf32-arm.c (bfd_elf32_arm_init_maps): Only process ARM ELF
1308 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1311 + * ld-arm/arm-elf.exp (armeabitests): Add EABI attribute merging 3,
1312 + EABI attribute merging 4, and EABI attribute merging 5,
1313 + EABI attribute arch merging 1, EABI attribute arch merging 1 reversed,
1314 + EABI attribute arch merging 2, EABI attribute arch merging 2 reversed.
1315 + Add attr-merge-unknown-1, attr-merge-unknown-2, attr-merge-unknown-2r,
1316 + and attr-merge-unknown-3 dump tests.
1317 + * ld-arm/arch-v6.s: New file.
1318 + * ld-arm/arch-v6k.s: New file.
1319 + * ld-arm/arch-v6t2.s: New file.
1320 + * ld-arm/attr-merge-3.attr: New file.
1321 + * ld-arm/attr-merge-3a.s: New file.
1322 + * ld-arm/attr-merge-3b.s: New file.
1323 + * ld-arm/attr-merge-4.attr: New file.
1324 + * ld-arm/attr-merge-4a.s: New file.
1325 + * ld-arm/attr-merge-4b.s: New file.
1326 + * ld-arm/attr-merge-5.attr: New file.
1327 + * ld-arm/attr-merge-5.s: New file.
1328 + * ld-arm/attr-merge-arch-1.attr: New file.
1329 + * ld-arm/attr-merge-arch-2.attr: New file.
1330 + * ld-arm/attr-merge-unknown-1.d: New file.
1331 + * ld-arm/attr-merge-unknown-1.s: New file.
1332 + * ld-arm/attr-merge-unknown-2.d: New file.
1333 + * ld-arm/attr-merge-unknown-2.s: New file.
1334 + * ld-arm/attr-merge-unknown-2r.d: New file.
1335 + * ld-arm/attr-merge-unknown-3.d: New file.
1336 + * ld-arm/blank.s: New file.
1338 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1341 + * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
1342 + * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
1343 + * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
1344 + (elf_backend_obj_attrs_order): New define.
1345 + * elfxx-target.h (elf_backend_obj_attrs_order): New define.
1346 + (elfNN_bed): Add elf_backend_obj_attrs_order.
1349 + * gas/arm/attr-order.d: New file.
1350 + * gas/arm/attr-order.s: New file.
1352 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1355 + * elf-attrs.c (is_default_attr): Support defaultless attributes.
1356 + (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
1357 + (bfd_elf_add_obj_attr_string): Likewise.
1358 + (bfd_elf_add_obj_attr_int_string): Likewise.
1359 + (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
1360 + * elf-bfd.h (struct obj_attribute): Document new flag bit.
1361 + * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
1362 + Tag_nodefaults has no default value.
1363 + (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
1364 + comment to reflect the new state.
1367 + * read.c (s_vendor_attribute): Allow for unknown flag bits in type.
1369 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1370 + Daniel Jacobowitz <dan@codesourcery.com>
1375 + * config/tc-arm.c (arm_copy_symbol_attributes): New function.
1376 + * config/tc-arm.h (arm_copy_symbol_attributes): New prototype.
1377 + (CONVERT_SYMBOLIC_ATTRIBUTE): New define.
1378 + * read.c (s_vendor_attribute): Add support for symbolic tag names.
1379 + Improve string parser.
1380 + * doc/c-arm.texi (ARM Machine Directives): Document
1381 + .eabi_attribute symbolic tag names.
1384 + * gas/arm/attr-syntax.d: New file.
1385 + * gas/arm/attr-syntax.s: New file.
1387 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1388 + Julian Brown <julian@codesourcery.com>
1391 + * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
1392 + ARM attributes in ABI 2.07.
1393 + * elf32-arm.c (get_secondary_compatible_arch): New function.
1394 + (set_secondary_compatible_arch): New function.
1395 + (tag_cpu_arch_combine): New function.
1396 + (elf32_arm_copy_one_eabi_other_attribute): Delete function.
1397 + (elf32_arm_copy_eabi_other_attribute_list): Delete function.
1398 + (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
1399 + make it fit with order_01243.
1400 + Add support for Tag_also_compatible_with,
1401 + Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
1402 + Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
1403 + Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
1404 + Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
1405 + Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
1406 + Tag_VFP_arch and Tag_ABI_FP_16bit_format.
1407 + Rework the way unknown attributes are handled.
1408 + Defer errors until all attributes have been processed.
1411 + * config/tc-arm.c (cpu_arch): Change ARM_ARCH_V6M to 11.
1414 + * arm.h (TAG_CPU_ARCH_V6_M, TAG_CPU_ARCH_V6S_M): New defines.
1415 + (MAX_TAG_CPU_ARCH, TAG_CPU_ARCH_V4T_PLUS_V6_M): New defines.
1416 + (Tag_NEON_arch): Rename to Tag_Advanced_SIMD_arch to match ARM ABI
1418 + (Tag_undefined39, Tag_nodefaults): New enum values.
1419 + (Tag_also_compatible_with, Tag_T2EE_use): Likewise.
1420 + (Tag_conformance, Tag_Virtualization_use): Likewise.
1421 + (Tag_undefined69, Tag_MPextension_use): Likewise.
1423 +2008-12-24 Andrew Stubbs <ams@codesourcery.com>
1426 + * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
1427 + bfd_elf_add_obj_attr_int_string.
1428 + Read Tag_compatibility from its new location in the attribute array,
1429 + rather than the attribute list.
1430 + (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
1431 + bfd_elf_add_obj_attr_int_string.
1432 + (_bfd_elf_parse_attributes): Likewise.
1433 + (_bfd_elf_merge_object_attributes): There's now only one
1434 + Tag_compatibility, and it's in the array, not the list.
1435 + * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
1436 + Tag_compatibility.
1437 + (bfd_elf_add_obj_attr_compat): Rename to
1438 + bfd_elf_add_obj_attr_int_string.
1439 + (bfd_elf_add_proc_attr_compat): Rename to
1440 + bfd_elf_add_proc_attr_int_string.
1441 + elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
1442 + Tag_compatibility.
1445 + * read.c (s_vendor_attribute): bfd_elf_add_obj_attr_compat ->
1446 + bfd_elf_add_obj_attr_int_string.
1448 +2008-12-11 Nathan Sidwell <nathan@codesourcery.com>
1451 + * config/tc-m68k.c (m68k_cpus): Add 51jm.
1453 +2008-12-09 Andrew Stubbs <ams@codesourcery.com>
1456 + * readelf.c (arm_attr_tag_CPU_arch): Add "v6-M" and "v6S-M".
1457 + (arm_attr_tag_WMMX_arch): Add "WMMXv2".
1458 + (arm_attr_tag_NEON_arch): Rename to ...
1459 + (arm_attr_tag_Advanced_SIMD_arch): ... official name.
1460 + (arm_attr_tag_ABI_PCS_config): Rename to ...
1461 + (arm_attr_tag_PCS_config): ... official name.
1462 + (arm_attr_tag_ABI_PCS_RO_DATA): Rename to ...
1463 + (arm_attr_tag_ABI_PCS_RO_data): ... official name.
1464 + (arm_attr_tag_ABI_FP_denormal): Add "Sign only".
1465 + (arm_attr_tag_CPU_unaligned_access): New array.
1466 + (arm_attr_tag_T2EE_use): New array.
1467 + (arm_attr_tag_Virtualization_use): New array.
1468 + (arm_attr_tag_MPextension_use): New array.
1469 + (arm_attr_publ): NEON_arch -> Advanced_SIMD_arch.
1470 + ABI_PCS_config -> PCS_config.
1471 + ABI_PCS_RO_DATA -> ABI_PCS_RO_data.
1472 + Add CPU_unaligned_access, nodefaults, also_compatible_with,
1473 + T2EE_use, conformance, Virtualization_use and MPextension_use.
1474 + (display_arm_attribute): Handle Tag_nodefaults and
1475 + Tag_also_compatible_with.
1477 +2008-12-01 Daniel Jacobowitz <dan@codesourcery.com>
1480 + * release-notes-csl.xml: Document attribute fix.
1483 + * elf-attrs.c (elf_new_obj_attr, bfd_elf_get_obj_attr_int): Correct
1485 + (_bfd_elf_merge_object_attributes): Support final Tag_compatibility.
1487 +2008-11-30 Maxim Kuvyrkov <maxim@codesourcery.com>
1490 + * elf32-m68k.c (elf_m68k_relocate_section): Fix indentation,
1491 + adjust relocation when appropriate.
1493 +2008-11-24 Joseph Myers <joseph@codesourcery.com>
1496 + * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn
1497 + branches to undefine weak symbols into branches to the next
1498 + instruction if creating PLT entries for those symbols.
1501 + * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New.
1502 + * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test.
1504 +2008-11-14 Catheirne Moore <clm@codesourcery.com>
1507 + * mips-opc.c (sync, sync.p, sync.l, synci): Remove duplicates.
1509 +2008-11-12 Catherine Moore <clm@codesourcery.com>
1512 + * gas/mips/mips.exp (mips32-sync): Only run for mips targets.
1514 +2008-11-09 Catherine Moore <clm@codesourcery.com>
1518 + Backport from mainline:
1520 + 2008-11-06 Chao-ying Fu <fu@mips.com>
1523 + * mips-opc.c (synciobdma, syncs, syncw, syncws): Move these
1525 + (sync): New instruction with 5-bit sync type.
1526 + * mips-dis.c (print_insn_args: Add case '1' to print 5-bit values.
1529 + * config/tc-mips.c (validate_mips_insn): Add case '1'.
1530 + (mips_ip): Add case '1' to process sync type.
1533 + * gas/mips/mips32-sync.d, gas/mip/mips32-sync.s: New tests.
1534 + * gas/mips/mips.exp: Run them.
1537 + * mips.h: Doucument '1' for 5-bit sync type.
1539 +2008-11-07 Catherine Moore <clm@codesourcery.com>
1543 + * bfd/elfxx-mips.c (_bfd_mips_elf_always_size_sections): Move
1544 + the sizing of the nonpic to pic stubs prior to the check for
1545 + the presence of a dynamic object.
1547 +2008-10-24 Maxim Kuvyrkov <maxim@codesourcery.com>
1550 + * config/tc-m68k.c (md_pseudo_table): Use .long instead of .word
1551 + to handle TLS debug information.
1552 + (m68k_elf_cons): Remove workaround.
1554 +2008-10-24 Nathan Sidwell <nathan@codesourcery.com>
1557 + * config/tc-m68k.c (m68k_elf_cons): Force used.
1559 +2008-10-23 Nathan Sidwell <nathan@codesourcery.com>
1562 + * config/tc-m68k.c (md_pseudo_table): Disable .word override for
1565 +2008-10-13 Sandra Loosemore <sandra@codesourcery.com>
1567 + * release-notes-csl.xsl (Bug fix for assembly listing):
1568 + Conditionalize for windows host.
1569 + (Bug fix for objdump on Windows): Likewise.
1571 +2008-10-13 Andrew Stubbs <ams@codesourcery.com>
1575 + Backport from mainline:
1577 + 2008-10-08 Alan Modra <amodra@bigpond.net.au>
1579 + * elf.c (assign_file_positions_for_load_sections): When checking
1580 + a segment for contents, don't assume that a non-TLS nobits section
1581 + must only be followed by nobits sections.
1583 +2008-10-13 Nathan Sidwell <nathan@codesourcery.com>
1586 + * config/tc-mips.c (mips_cpu_info_table): Add ice9.
1588 +2008-10-11 Maxim Kuvyrkov <maxim@codesourcery.com>
1590 + M68K NPTL support.
1592 + * config/tc-m68k.c (m68k_elf_cons): New static function.
1593 + (md_pseudo_table): Use it.
1594 + (md_apply_fix): Fix to set thread local flag.
1595 + (m68k_elf_suffix): New static function; helper for m68k_elf_cons.
1598 + * gas/m68k/tls-1.s: Remove.
1601 + * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
1602 + fields from n_entries to n_slots where appropriate, update comments.
1603 + (struct elf_m68k_got_entry.type): Move field to ...
1604 + (struct elf_m68k_got_entry_key): ... here. Update all uses.
1605 + (struct elf_m68k_got): Update comments.
1606 + (elf_m68k_reloc_got_tls_p): Rename to elf_m68k_reloc_tls_p, handle
1607 + all relocations. Update all uses.
1608 + (elf_m68k_init_got, elf_m68k_init_got_entry_key): Update.
1609 + (elf_m68k_got_entry_hash, elf_m68k_got_entry_eq): Update,
1611 + (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Update name, update all uses.
1612 + (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Same.
1613 + (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type): Update.
1614 + (elf_m68k_remove_got_entry_type, elf_m68k_add_entry_to_got): Update.
1615 + (elf_m68k_can_merge_gots_1, elf_m68k_can_merge_gots): Update.
1616 + (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
1617 + (struct elf_m68k_finalize_got_offsets_arg: n_ldm_entries): New field.
1618 + (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets):
1619 + Update, handle TLS_LDM entries.
1620 + (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
1621 + field, remove obsoleted local_n_entries field.
1622 + (elf_m68k_partition_multi_got_2): New static function.
1623 + (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it,
1625 + (elf_m68k_remove_got_entry): Update.
1626 + (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1627 + (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol):
1628 + Handle TLS relocations.
1631 + * ld-m68k/tls-gd-1.d, ld-m68k/tls-gd-2.d, ld-m68k/tls-gd-3.d:
1633 + * ld-m68k/tls-gd-ie-1.d, ld-m68k/tls-ie-1.d: New tests.
1634 + * ld-m68k/tls-ld-1.d, ld-m68k/tls-ld-2.d: New tests.
1635 + * ld-m68k/tls-ld-1.s, ld-m68k/tls-ld-2.s, ld-m68k/tls-le-1.s:
1637 + * ld-m68k/tls-no-1.s, ld-m68k/tls-gd-ie-1.s, ld-m68k/tls-gd-1.s:
1639 + * ld-m68k/tls-gd-2.s, ld-m68k/tls-gd-3.s, ld-m68k/tls-ie-1.s:
1641 + * ld-m68k/m68k.exp: Run new tests.
1643 +2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1646 + * readelf.c (display_mips_gnu_attribute): Move Power-specific
1648 + (display_power_gnu_attribute): ...here. Oops.
1650 +2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1657 + 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1658 + * ppc.h: Add Tag_GNU_Power_ABI_Struct_Return.
1661 + 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1662 + * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
1663 + Tag_GNU_Power_ABI_Struct_Return.
1666 + 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1667 + * readelf.c (display_power_gnu_attribute): Decode
1668 + Tag_GNU_Power_ABI_Struct_Return.
1671 + 2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
1672 + * ld-powerpc/gnu-attr-12-1.s: New file.
1673 + * ld-powerpc/gnu-attr-12-2.s: New file.
1674 + * ld-powerpc/gnu-attr-12-11.d: New file.
1675 + * ld-powerpc/gnu-attr-12-21.d: New file.
1676 + * ld-powerpc/powerpc.exp: Run new dump tests.
1679 +2008-10-09 Joseph Myers <joseph@codesourcery.com>
1682 + * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Add
1683 + copy_link_hash_symbol_type initializers.
1685 +2008-10-09 Joseph Myers <joseph@codesourcery.com>
1690 + 2008-02-17 Mark Kettenis <kettenis@gnu.org>
1691 + * elf.c (swap_out_syms): Avoid preprocessing directive within
1694 +2008-10-03 Kazu Hirata <kazu@codesourcery.com>
1698 + * listing.c (buffer_line): Open the source file with FOPEN_RB.
1699 + Manually process line ends.
1701 + * release-notes-csl.xml: Add a release note about the
1704 +2008-09-26 Julian Brown <julian@codesourcery.com>
1706 + * release-notes-csl.xml (Mixed-case NEON register aliases): Add note.
1708 +2008-09-25 Maciej W. Rozycki <macro@codesourcery.com>
1712 + * gas/mips/mips.exp: Move the "ice9a" test to the target
1715 +2008-09-25 Joseph Myers <joseph@codesourcery.com>
1718 + * libbfd-in.h (_bfd_nolink_bfd_copy_link_hash_symbol_type):
1720 + * libbfd.h: Regenerate.
1722 +2008-09-25 Julian Brown <julian@codesourcery.com>
1727 + * config/tc-arm.c (create_neon_reg_alias): Fix case-sensitivity for
1728 + Neon register aliases.
1730 +2008-09-17 Catherine Moore <clm@codesourcery.com>
1733 + * config/tc-arm.c (aeabi_set_public_attributes): Fix setting
1734 + of attribute 12 for neon fpus. Set attributes 36 and 38 for
1738 + * readelf.c (arm_attr_tag_ABI_FP_16bit_format): New.
1739 + (arm_attr_tag_VFP_HP_extension): New.
1740 + (arm_attr_public_tag arm_attr_public_tags): Support new
1744 + * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
1745 + half-precision attributes.
1746 + (elf32_arm_copy_one_eabi_other_attribute): New.
1747 + (elf32_arm_copy_other_attribute_list): New.
1749 +2008-09-24 Andrew Stubbs <ams@codesourcery.com>
1753 + * release-notes-csl.xml: Document.
1756 + * elf.c (elf_fake_sections): Find the signature symbol for
1757 + SHT_GROUP sections when doing objcopy/strip.
1759 +2008-09-24 Joseph Myers <joseph@codesourcery.com>
1762 + * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd
1763 + and .rela.branch_lt.
1765 +2008-09-13 Maciej W. Rozycki <macro@codesourcery.com>
1766 + Daniel Gutson <daniel@codesourcery.com>
1770 + * config/tc-mips.c (ICE9A_MOVNDS): New macro.
1771 + (MAX_NOPS): Rename to...
1772 + (MAX_HIST_INSNS): ... this. Adjust references and comments
1774 + (mips_fix_ice9a): New variable.
1775 + (ice9a_fp_stall_hazard_p): New function.
1776 + (ice9a_fp_round_hazard_p): New function.
1777 + (ice9a_movnd_workaround_p): Likewise.
1778 + (ice9a_insn_accesses_f30_p): Likewise.
1779 + (check_for_ice9a): Likewise.
1780 + (mips_cleanup): Likewise.
1781 + (nops_for_insn): Call check_for_ice9a().
1782 + (OPTION_FIX_ICE9A): New macro.
1783 + (OPTION_NO_FIX_ICE9A): Likewise.
1784 + (OPTION_MISC_BASE): Adjust accordingly.
1785 + (md_longopts): Add "mfix-ice9a" and "mno-fix-ice9a".
1786 + (md_parse_option): Handle OPTION_FIX_ICE9A and
1787 + OPTION_NO_FIX_ICE9A.
1788 + (md_show_usage): Document "-mfix-ice9a".
1789 + * config/tc-mips.h (mips_cleanup): New declaration.
1790 + (md_cleanup): New macro.
1791 + * doc/c-mips.texi (MIPS Opts): Document "-mfix-ice9a" and
1793 + * doc/as.texinfo (Target MIPS options): Likewise.
1796 + * gas/mips/ice9a.l: New test for the "-mfix-ice9a" option.
1797 + * gas/mips/ice9a.s: Source for the new test.
1798 + * gas/mips/mips.exp: Run the new test.
1800 +2008-09-22 Catherine Moore <clm@codesourcery.com>
1803 + * release-notes-csl.xml: Document.
1805 +2008-09-22 Catherine Moore <clm@codesourcery.com>
1809 + * elfxx-mips.c (allocate_dynrelocs): Avoid a copy_reloc if
1810 + dynamic sections have not been created.
1812 +2008-09-13 Catherine Moore <clm@codesourcery.com>
1815 + * gas/arm/half-prec-neon.d: New.
1816 + * gas/arm/half-prec-neon.s: New.
1817 + * gas/arm/half-prec-vfp3.d: New.
1818 + * gas/arm/half-prec-vfp3.s: New.
1819 + * gas/arm/half-prec-psyntax.d: New.
1820 + * gas/arm/half-prec-psyntax.s: New.
1823 + * config/tc-arm.c (neon_type_mask): Renumber.
1824 + (type_chk_of_el_type): Handle F_F16.
1825 + (neon_cvt_flavour): Recognize half-precision conversions.
1826 + (do_neon_cvt): New shapes NS_QD and NS_DQ. Encode half-precision
1828 + (do_neon_cvtt): Encode the T bit.
1829 + (asm_opcode_insns): vcvt, vcvtt support.
1830 + (arm_option_cpu_value): Add neon-fp16 support.
1833 + * opcode/arm.h (FPU_NEON_FP16): New.
1834 + (FPU_ARCH_NEON_FP16): New.
1835 + * elf/arm.h (Tag_ABI_FP_16bit_format): Define.
1838 + * arm-dis.c (coprocessor_opcodes): Add half-precision vcvt
1840 + (neon_opcodes): Likewise.
1841 + (print_insn_coprocessor): Print 't' or 'b' for
1842 + vcvt instructions.
1844 +2008-09-10 Mark Mitchell <mark@codesourcery.com>
1846 + * release-notes-csl.xml: Mention recent improvements.
1848 +2008-09-09 Mark Mitchell <mark@codesourcery.com>
1852 + * config/tc-arm.c (BAD_SP): Define.
1853 + (s_arm_unwind_fnstart): Use REG_SP.
1854 + (s_arm_unwind_setfp): Likewise.
1855 + (reject_bad_reg): New macro.
1856 + (do_co_reg): Check for bad registers.
1857 + (do_co_reg2c): Likewise.
1858 + (do_srs): Use REG_SP.
1859 + (do_t_add_sub): Check for bad registers.
1860 + (do_t_adr): Likewise.
1861 + (do_t_arit3): Likewise.
1862 + (do_t_arit3c): Likewise.
1863 + (do_t_bfc): Likewise.
1864 + (do_t_bfi): Likewise.
1865 + (do_t_bfx): Likewise.
1866 + (do_t_blx): Likewise.
1867 + (do_t_bx): Likewise.
1868 + (do_t_bxj): Likewise.
1869 + (do_t_clz): Likewise.
1870 + (do_t_div): Likewise.
1871 + (do_t_mla): Likewise.
1872 + (do_t_mlal): Likewise.
1873 + (do_t_mov_cmp): Likewise.
1874 + (do_t_mov16): Likewise.
1875 + (do_t_mvn_tst): Likewise.
1876 + (do_t_mrs): Likewise.
1877 + (do_t_msr): Likewise.
1878 + (do_t_mul): Likewise.
1879 + (do_t_mull): Likewise.
1880 + (do_t_orn): Likewise.
1881 + (do_t_pkhbt): Likewise.
1882 + (do_t_pld): Likewise.
1883 + (do_t_rbit): Likewise.
1884 + (do_t_rev): Likewise.
1885 + (do_t_rrx): Likewise.
1886 + (do_t_rsb): Likewise.
1887 + (do_t_shift): Likewise.
1888 + (do_t_simd): Likewise.
1889 + (do_t_ssat): Likewise.
1890 + (do_t_ssat16): Likewise.
1891 + (do_t_sxtah): Likewise.
1892 + (do_t_sxth): Likewise.
1893 + (do_t_tb): Likewise.
1894 + (do_t_usat): Likewise.
1895 + (do_t_usat16): Likewise.
1896 + (nysn_insert_sp): Use REG_SP.
1898 + * gas/arm/copro.s: Avoid using r15 where not permitted.
1899 + * gas/arm/copro.d: Adjust accordingly.
1900 + * gas/arm/thumb2_bad_reg.s: New.
1901 + * gas/arm/thumb2_bad_reg.l: Likewise.
1902 + * gas/arm/thumb2_bad_reg.d: Likewise.
1904 +2008-09-10 Maxim Kuvyrkov <maxim@codesourcery.com>
1907 + * gas/m68k/br-isac.d: Fix whitespace.
1909 +2008-09-09 Mark Mitchell <mark@codesourcery.com>
1912 + * config/tc-arm.c (do_t_orn): New function.
1913 + (do_t_rrx): Likewise.
1914 + (insns): Add orn and rrx.
1916 + * gas/arm/thumb32.s: Add tests for orn and rrx.
1917 + * gas/arm/thumb32.d: Adjust accordingly.
1918 + * gas/arm/thumb32.l: Likewise.
1919 + * gas/arm/thumb2_invert.s: Add tests for orn and orr.
1920 + * gas/arm/thumb2_invert.d: Adjust accordingly.
1921 + * gas/arm/tcompat.s: Add tests for rrx.
1922 + * gas/arm/tcompat.d: Adjust accordingly.
1924 +2008-09-09 Mark Mitchell <mark@codesourcery.com>
1927 + * config/tc-arm.c (insns): Add qasx, qsax, shasx, shsax, ssax,
1928 + uasx, uhasx, uhsx, uqasx, uqsax, usax.
1930 + * gas/arm/thumb32.s (qadd): Add tests for them.
1931 + * gas/arm/thumb32.d: Adjust accordingly.
1933 +2008-09-09 Mark Mitchell <mark@codesourcery.com>
1936 + * config/tc-arm.c (insns): Correct encoding of qadd, qdadd, qsub,
1937 + qdsub in Thumb-2 mode.
1939 + * arm-dis.c (thumb32_opcodes): Correct decoding for qadd, qdadd,
1942 + * gas/arm/thumb32.s (qadd): Add qadd, qdadd, qsub, and qdsub.
1943 + * gas/arm/thumb32.d: Likewise.
1945 +2008-09-09 Nathan Sidwell <nathan@codesourcery.com>
1949 + * ld-arm/mixed-lib.d, ld-arm/armthumb-lib.d: Loosen regexp.
1951 +2008-09-08 Daniel Jacobowitz <dan@codesourcery.com>
1953 + Issue #2348, #3206
1955 + * release-notes-csl.xml: Add release note for DWARF 3 support.
1957 + Backport from mainline:
1960 + 2008-09-08 H.J. Lu <hongjiu.lu@intel.com>
1961 + Daniel Jacobowitz <dan@codesourcery.com>
1964 + * dwarf2.c (struct adjusted_section): Renamed from struct
1966 + (struct dwarf2_debug): Adjust for renaming. Add version field.
1967 + (read_attribute_value): Correctly handle DW_FORM_ref_addr for
1969 + (find_abstract_instance_name): Pass a pointer to
1970 + attribute instead of offset. For DW_FORM_ref_addr, get the
1971 + entry at the offset from the .debug_info section.
1972 + (scan_unit_for_symbols): Update.
1973 + (parse_comp_unit): Allow DWARF3. Save the version.
1974 + (unset_sections): Update for renaming.
1975 + (place_sections): Likewise. Set new VMAs for DWARF sections
1978 +2008-09-08 Nathan Sidwell <nathan@codesourcery.com>
1981 + * doc/c-arm.texi (ARM Directives): Document .2byte, .4byte,
1982 + .8byte, .bss, .even, .extend, .ldouble, .packed, .secrel32
1985 +2008-09-06 Nathan Sidwell <nathan@codesourcery.com>
1988 + * config/m68k-parse.h (CPUCR): New register name.
1989 + * config/tc-m68k.c (mcf51qe_ctrl): Rename to ...
1990 + (mcf51_ctrl): ... here. Add CPUCR.
1991 + (mcf52259_ctrl, mcf53017_ctrl): New.
1992 + (mcf5307_ctrl): Reorder canonically.
1993 + (m68k_cpus): Add 51, 51ac, 51cn, 51em, 5225x, 5301x.
1994 + (m68k_ip): Add CPUCR case.
1995 + (init_table): Add CPUCR.
1998 + * m68k-opc.c (m68k_opcodes): Add stldsr insn.
2001 + * gas/m68k/br-isac.s: Add stldsr test case
2002 + * gas/m68k/br-isac.d: Add stldsr test case
2004 +2008-09-05 Nathan Sidwell <nathan@codesourcery.com>
2007 + * release-notes-csl.xml: Copy note for issue #2963.
2011 + 2004-09-07 David Ung <davidu@mips.com>
2012 + * hist.c (hist_read_rec): Load profiling rate into hz_int.
2013 + (hist_write_hist): Write hz_int into file.
2014 + (print_header): Adjust header for total_time >= 100000.
2015 + (print_line): Use wider fields it total_time >= 100000.
2016 + (hist_print): Skip excluded symbols when finding the highest
2017 + execution time in order to calculate the scaling factor.
2018 + * gprof.h (hz): Now optionally a floating-point variable.
2019 + (hz_int): New variable, always integral.
2020 + * gprof.c (hz): Now optionally a floating-point variable.
2021 + (hz_int): New variable, always integral.
2022 + * gmon_io.c (gmon_out_read): Load profiling rate initially into
2023 + hz_int, not hz. Finally convert hz_int into floating-point hz
2024 + variable, where a negative hz_int is converted to a reciprocal to
2025 + handle cycles/count instead of counts/sec.
2026 + (gmon_out_write): Write hz_int to file, not hz.
2027 + * cg_print.c: (child_max): New variable to store maximum time
2029 + (self_wid): New var to hold width of self time field in report.
2030 + (child_wid): New var to hold width of child time field.
2031 + (prec): New var to hold precision of time fields.
2032 + (print_header): Adjust headers for wider fields.
2033 + (print_cycle): Use child_wid, self_wid and prec to format output.
2034 + (print_members): Similarly.
2035 + (print_parents): Similarly.
2036 + (print_children): Similarly.
2037 + (print_line): Similarly.
2038 + (cg_print): Find maximum child time, then determine child/self
2039 + field widths and precision to cope with times >= 100000.
2041 +2008-09-05 Nathan Sidwell <nathan@codesourcery.com>
2044 + * doc/c-arm.texi (ARM Directives): Alphabetize.
2046 +2008-09-05 Nathan Sidwell <nathan@codesourcery.com>
2050 + * doc/c-arm.texi (): Document -mwarn-deprecated.
2051 + * config/tc-arm.c (WARN_DEPRECATED): Remove. Replace with ...
2052 + (warn_on_deprecated): ... this.
2053 + (opcode_lookup, md_assemble): Check it before warning.
2054 + (arm_opts): Add m[no-]warn-deprecated.
2055 + (md_parse_option): Replace WARN_DEPRECATED with
2056 + warn_on_deprecated.
2058 +2008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
2060 + Backport from mainline:
2063 + 2008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
2065 + * readelf.c (load_specific_debug_section): New function, from
2066 + load_debug_section.
2067 + (load_debug_section): Use load_specific_debug_section.
2068 + (display_debug_section): Use load_specific_debug_section. Check for
2069 + multiple sections with the same name.
2071 +2008-09-04 Nathan Sidwell <nathan@codesourcery.com>
2075 + Format changes extracted from David Ung's histogram patch.
2076 + * cg_print.c (print_header, print_line): Fix formatting.
2077 + * hist.c (read_histogram_header, hist_read_rec, hist_print,
2078 + find_histogram_for_pc): Likewise.
2080 +2008-09-03 Nathan Froyd <froydnj@codesourcery.com>
2085 + * elf32-ppc.c (ppc_elf_relocate_section): Continue processing
2086 + relocations if the output section is NULL; this guards against
2087 + relocations against global undefined symbols bombing out.
2089 +2008-09-02 Nathan Sidwell <nathan@codesourcery.com>
2093 + 2005-10-12 Nigel Stephens <nigel@mips.com>
2094 + * mips.c (mips_find_call): Traverse MIPS16 functions, identifiable
2095 + by an odd address. Indicate in debug message when we're
2096 + traversing a mips16 function.
2097 + (mips_find_call): Use "restore" as end of function marker, not
2099 + * corefile.c (core_init): Set min_insn_size to 2 for MIPS.
2100 + (core_create_function_syms): Make the address of MIPS16 symbols
2101 + odd in the gprof symbol table, since after this point we can't
2102 + access the original bfd symbol information.
2104 +2008-08-29 Julian Brown <julian@codesourcery.com>
2107 + * ld.texinfo (--fix-janus-2cc): Document new option.
2110 + * elf32-arm.c (bfd_elf32_arm_janus_2cc_erratum_scan): Use correct
2111 + insn when checking for PC operand.
2113 +2008-08-28 Julian Brown <julian@codesourcery.com>
2116 + * emultempl/armelf.em (fix_janus_2cc): New variable.
2117 + (arm_elf_before_allocation): Call
2118 + bfd_elf32_arm_validate_janus_2cc_fix and
2119 + bfd_elf32_arm_janus_2cc_erratum_scan.
2120 + (arm_elf_after_allocation): Call bfd_elf32_arm_fix_veneer_locations
2121 + not bfd_elf32_arm_vfp11_fix_veneer_locations.
2122 + (arm_elf_create_output_section_statements): Add fix_janus_2cc
2124 + (PARSE_AND_LIST_PROLOGUE): Add OPTION_FIX_JANUS_2CC.
2125 + (PARSE_AND_LIST_LONGOPTS): Add fix-janus-2cc option.
2126 + (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_CASES): Add
2127 + OPTION_FIX_JANUS_2CC case.
2128 + * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Add .janus_2cc_veneer
2132 + * bfd-in.h (bfd_elf32_arm_validate_janus_2cc_fix): Add prototype.
2133 + (bfd_elf32_arm_janus_2cc_erratum_scan): Add prototype.
2134 + (bfd_elf32_arm_vfp11_fix_veneer_locations): Rename to...
2135 + (bfd_elf32_arm_fix_veneer_locations): This.
2136 + (bfd_elf32_arm_set_target_relocs): Update prototype.
2137 + * bfd-in2.h: Regenerate.
2138 + * elf32-arm.c (VFP11_ERRATUM_VENEER_ENTRY_NAME): Adjust format.
2139 + (JANUS_2CC_ERRATUM_VENEER_SECTION_NAME)
2140 + (JANUS_2CC_ERRATUM_VENEER_ENTRY_NAME, MAX_ERRATUM_SYMBOL_LENGTH):
2142 + (elf32_vfp11_erratum_type): Rename to...
2143 + (elf32_cpu_erratum_type): This. Add Janus 2CC entries.
2144 + (elf32_vfp11_erratum_list): Rename to...
2145 + (elf32_cpu_erratum_list): This. Rename vfp_insn field to orig_insn.
2146 + (_arm_elf_section_data): Update type of erratumlist field.
2147 + (elf32_arm_link_hash_table): Add janus_2cc_erratum_glue_size,
2148 + fix_janus_2cc fields. Rename num_vfp11_fixes to num_errata_fixes.
2149 + (elf32_arm_link_hash_table_create): Initialise above fields.
2150 + (JANUS_2CC_ERRATUM_VENEER_SIZE): New macro.
2151 + (bfd_elf32_arm_allocate_interworking_sections): Initialise Janus
2152 + 2CC erratum veneer section.
2153 + (record_vfp11_erratum_veneer): Rename to...
2154 + (record_cpu_erratum_veneer): This. Add argument for type of erratum
2155 + to record. Expand to handle Janus 2CC erratum.
2156 + (bfd_elf32_arm_add_glue_sections_to_bfd): Make Janus 2CC erratum
2158 + (bfd_elf32_arm_validate_janus_2cc_fix): New.
2159 + (bfd_elf32_arm_vfp11_erratum_scan): Update for new type and field
2160 + names. Call record_cpu_erratum_veneer instead of
2161 + record_vfp11_erratum_veneer.
2162 + (bfd_elf32_arm_vfp11_fix_veneer_locations): Rename to...
2163 + (bfd_elf32_arm_fix_veneer_locations): This. Add Janus 2CC erratum
2165 + (bfd_elf32_arm_janus_2cc_erratum_scan): New.
2166 + (bfd_elf32_arm_set_target_relocs): Add fix_janus_2cc option. Handle.
2167 + (elf32_arm_size_dynamic_sections): Call
2168 + bfd_elf32_arm_janus_2cc_erratum_scan.
2169 + (elf32_arm_write_section): Add Janus 2CC erratum support.
2171 +2008-08-21 Nathan Sidwell <nathan@codesourcery.com>
2174 + * config/tc-m68k.c (mcf52277_ctrl): New.
2175 + (m68k_cpus): Add 52274, 52277.
2177 +2008-08-17 Catherine Moore <clm@codesourcery.com>
2180 + * elfxx-mips.c (_bfd_mips_elf_final_link): Write out the
2181 + non-pic to pic stubs.
2183 +2008-08-08 Catherine Moore <clm@codesourcery.com>
2186 + * mips-opc.c (jalx): Allow for ISA1 and above.
2189 + * testsuite/gas/mips/mips-no-jalx.l: Remove.
2190 + * testsuite/gas/mips/mips-no-jalx.s: Remove.
2191 + * testsuite/gas/mips/mips.exp: Remove invocation of mips-no-jalx.
2194 +2008-08-03 Catherine Moore <clm@codesourcery.com>
2196 + * release-notes-csl.xml: Add missing "/" to <formalpara>.
2197 + Change csl-target to csl_target. Change mips*- to mips*-*.
2199 +2008-07-31 Kazu Hirata <kazu@codesourcery.com>
2201 + Backport from mainline:
2203 + 2008-04-28 M Thomas <mthomas@rhrk.uni-kl.de>
2204 + Nick Clifton <nickc@redhat.com>
2207 + * objdump.c (slurp_file): Open the file in binary mode.
2208 + * ar.c: Remove conditional definition of O_BINARY.
2209 + * bin2.c: Likewise.
2210 + * rename.c: Likewise.
2211 + * strings.c: Likewise.
2212 + * sysdep.h: Add conditional definition of O_BINARY.
2214 +2008-07-29 Paul Brook <paul@codesourcery.com>
2215 + Mark Mitchell <mark@codesourcery.com>
2218 + * config/tc-arm.c (do_t_mul): In Thumb-2 mode, use 16-bit encoding
2219 + of MUL when possible.
2221 + * gas/arm/thumb2_mul.s: New file.
2222 + * gas/arm/thumb2_mul.d: Likewise.
2223 + * gas/arm/thumb2_mul-bad.s: Likewise.
2224 + * gas/arm/thumb2_mul-bad.d: Likewise.
2225 + * gas/arm/thumb2_mul-bad.l: Likewise.
2226 + * gas/arm/t16-bad.s: Add tests for"mul" with high registers.
2227 + * gas/arm/t16-bad.l: Update accordingly.
2229 + * release-notes-csl.xml: Document.
2231 +2008-07-28 Catherine Moore <clm@codesourcery.com>
2234 + * release-notes-csl.xml: Document.
2237 + * release-notes-csl.xml: Document.
2239 +2008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
2243 + * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
2244 + relocations for undefined weak symbols with non-default visibility.
2245 + (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
2246 + global symbols in shared libraries.
2247 + (allocate_dynrelocs): New function.
2248 + (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
2249 + possibly_dynamic_relocs here.
2250 + (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
2252 +2008-07-27 Maxim Kuvyrkov <maxim@codesourcery.com>
2255 + * ld-m68k/got-multigot-12-13-14-34-35-ok.d: Update.
2256 + * ld-m68k/got-multigot-14-ok.d: Update.
2257 + * ld-m68k/m68k.exp: Update.
2258 + * ld-m68k/got-negative-12-13-14-34-ok.d: Update.
2259 + * ld-m68k/got-negative-14-ok.d: Update.
2262 + * gas/m68k/tls-1.s: New.
2265 + * config/m68k-parse.h (enum pic_relocation): Add values for TLS
2267 + * config/m68k-parse.y (yylex): Parse TLS relocations.
2268 + * config/tc-m68k.c (get_reloc_code, tc_m68k_fix_adjustable)
2269 + (tc_gen_reloc): Handle TLS relocations.
2272 + * m68k.h: Map TLS relocations to numbers.
2275 + * bfd-in2.h: Regenerate.
2276 + * elf32-m68k.c (HOWTO): Add TLS relocations.
2277 + (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
2278 + (enum elf_m68k_got_offset_size): New enum.
2279 + (struct elf_m68k_got_entry: type) Move from nested union up.
2280 + (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size)
2281 + (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_got_tls_p): New static
2283 + (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
2284 + fields into n_entries array.
2285 + (elf_m68k_init_got): Simplify, update all uses.
2286 + (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc.
2287 + (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT)
2288 + (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
2290 + (elf_m68k_get_got_entry): Update.
2291 + (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
2293 + (elf_m68k_remove_got_entry_type): Simplify.
2294 + (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1)
2295 + (elf_m68k_can_merge_gots): Update.
2296 + (struct elf_m68k_finalize_got_offsets_arg)
2297 + (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets):
2298 + Rewrite to handle 2-slot GOT entries, simplify.
2299 + (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Update.
2300 + (elf_m68k_remove_got_entry_type): Update.
2301 + (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
2302 + update of sgot->size and srelgot->size.
2303 + (elf_m68k_gc_sweep_hook): Update.
2304 + (elf_m68k_relocate_section): Add dummy handling of TLS relocations.
2305 + * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2306 + * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2308 +2008-07-27 Maxim Kuvyrkov <maxim@codesourcery.com>
2311 + * elf32-m68k.c: Apply cosmetic differences from FSF mainline.
2313 +2008-07-26 Maxim Kuvyrkov <maxim@codesourcery.com>
2318 + 2008-07-11 H.J. Lu <hongjiu.lu@intel.com>
2320 + * ld-m68k/got-12.s: Removed.
2321 + * ld-m68k/got-13.s: Likewise.
2322 + * ld-m68k/got-14.s: Likewise.
2323 + * ld-m68k/got-15.s: Likewise.
2324 + * ld-m68k/got-34.s: Likewise.
2325 + * ld-m68k/got-35.s: Likewise.
2326 + * ld-m68k/xgot-15.s: Likewise.
2328 + * ld-m68k/got-multigot-12-13-14-34-35-ok.d: Remove #source
2329 + and expected relocations.
2330 + * ld-m68k/got-multigot-14-ok.d: Likewise.
2331 + * ld-m68k/got-negative-12-13-14-34-ok.d: Likewise.
2332 + * ld-m68k/got-negative-14-ok.d: Likewise.
2333 + * ld-m68k/got-single-12-ok.d: Likewise.
2334 + * ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: Likewise.
2335 + * ld-m68k/got-xgot-15-ok.d: Likewise.
2337 + * ld-m68k/got-multigot-15-er.d: Remove #source.
2338 + * ld-m68k/got-negative-12-13-14-35-er.d: Likewise.
2339 + * ld-m68k/got-negative-15-er.d: Likewise.
2340 + * ld-m68k/got-single-13-er.d: Likewise.
2342 + * ld-m68k/m68k.exp: Move GOT tests to ...
2343 + * ld-m68k/m68k-got.exp: This. New.
2345 +2008-07-26 Maxim Kuvyrkov <maxim@codesourcery.com>
2350 + 2008-06-29 Andreas Schwab <schwab@suse.de>
2351 + * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
2352 + addend on _GLOBAL_OFFSET_TABLE_.
2355 + 2008-06-29 Andreas Schwab <schwab@suse.de>
2356 + * ld-m68k/got-1.s: New file.
2357 + * ld-m68k/got-1.d: New dump test.
2358 + * ld-m68k/m68k.exp: Run it.
2360 +2008-07-24 Joseph Myers <joseph@codesourcery.com>
2362 + * config.sub: Allow mips64octeon* targets.
2364 + NOT ASSIGNED TO FSF
2367 + * config.bfd: Handle mips64octeon*-*-elf*.
2370 + * configure.tgt: Handle mips-wrs-elf*.
2373 + * configure.tgt: Handle mips64octeon*-*-elf*.
2374 + * Makefile.am (ALL_EMULATIONS): Add Octeon emulations.
2375 + (eelf32ebocteon.c, eelf32elocteon.c, eelf32ebocteonn32.c,
2376 + eelf32elocteonn32.c, eelf64ebocteon.c, eelf64elocteon.c): New.
2377 + * Makefile.in: Regenerate.
2378 + * scripttempl/elf.sc: Add ${OCTEON_SPECIAL_SECTIONS}.
2379 + * emulparams/elf32ebocteon.sh, emulparams/elf32ebocteonn32.sh,
2380 + emulparams/elf32elocteon.sh, emulparams/elf32elocteonn32.sh,
2381 + emulparams/elf64ebocteon.sh, emulparams/elf64elocteon.sh,
2382 + emultempl/octeonelf.em: New.
2384 +2008-07-18 Joseph Myers <joseph@codesourcery.com>
2389 + 2008-07-18 Joseph Myers <joseph@codesourcery.com>
2390 + * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
2391 + * bfd-in2.h: Regenerate.
2392 + * elf32-arm.c (struct elf_arm_obj_tdata): Add field
2393 + no_wchar_size_warning.
2394 + (bfd_elf32_arm_set_target_relocs): Add new parameter
2396 + (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
2397 + for conflicting wchar_t attributes. Do not warn if
2398 + --no-wchar-size-warning. Make diagnostic text more specific.
2401 + 2008-07-18 Joseph Myers <joseph@codesourcery.com>
2402 + * ld.texinfo (--no-wchar-size-warning): Document new ARM option.
2403 + * emultempl/armelf.em (no_wchar_size_warning): New.
2404 + (arm_elf_create_output_section_statements): Pass
2405 + no_wchar_size_warning to arm_elf_create_output_section_statements.
2406 + (OPTION_NO_WCHAR_SIZE_WARNING): New.
2407 + (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning.
2408 + (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning.
2409 + (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning.
2412 + 2008-07-18 Joseph Myers <joseph@codesourcery.com>
2413 + * ld-arm/attr-merge-wchar-0.s,ld-arm/attr-merge-wchar-2.s,
2414 + ld-arm/attr-merge-wchar-4.s, ld-arm/attr-merge-wchar-00-nowarn.d,
2415 + ld-arm/attr-merge-wchar-00.d, ld-arm/attr-merge-wchar-02-nowarn.d,
2416 + ld-arm/attr-merge-wchar-02.d, ld-arm/attr-merge-wchar-04-nowarn.d,
2417 + ld-arm/attr-merge-wchar-04.d, ld-arm/attr-merge-wchar-20-nowarn.d,
2418 + ld-arm/attr-merge-wchar-20.d, ld-arm/attr-merge-wchar-22-nowarn.d,
2419 + ld-arm/attr-merge-wchar-22.d, ld-arm/attr-merge-wchar-24-nowarn.d,
2420 + ld-arm/attr-merge-wchar-24.d, ld-arm/attr-merge-wchar-40-nowarn.d,
2421 + ld-arm/attr-merge-wchar-40.d, ld-arm/attr-merge-wchar-42-nowarn.d,
2422 + ld-arm/attr-merge-wchar-42.d, ld-arm/attr-merge-wchar-44-nowarn.d,
2423 + ld-arm/attr-merge-wchar-44.d: New.
2424 + * ld-arm/arm-elf.exp: Run new tests.
2426 +2008-07-10 Joseph Myers <joseph@codesourcery.com>
2429 + * mh-mingw (LDFLAGS): Append to rather than replacing previous
2432 +2008-07-08 Stan Shebs <stan@codesourcery.com>
2436 + * dis-asm.h (struct disassemble_info): Add endian_code field.
2438 + * dis-init.c (init_disassemble_info): Init endian_code field.
2439 + * arm-dis.c (print_insn): Disassemble code according to
2440 + setting of endian_code.
2441 + (print_insn_big_arm): Detect when BE8 extension flag has been set.
2443 + * ld-arm/arm-elf.exp: Use objdump -d for arm-be8 test.
2444 + * ld-arm/arm-be8.d: Change to test disassembly.
2446 +2008-07-02 Joseph Myers <joseph@codesourcery.com>
2449 + * ld.h (args_type): Add error_poison_system_directories.
2450 + * ld.texinfo (--error-poison-system-directories): Document.
2451 + * ldfile.c (ldfile_add_library_path): Check
2452 + command_line.error_poison_system_directories.
2453 + * ldmain.c (main): Initialize
2454 + command_line.error_poison_system_directories.
2455 + * lexsup.c (enum option_values): Add
2456 + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
2457 + (ld_options): Add --error-poison-system-directories.
2458 + (parse_args): Handle new option.
2460 +2008-06-30 Joseph Myers <joseph@codesourcery.com>
2463 + * mh-mingw (BOOT_CFLAGS): Do not use -D__USE_MINGW_ACCESS.
2465 +2008-06-14 Catherine Moore <clm@codesourcery.com>
2469 + * elfxx-mips.c (bfd_mips_elf_maybe_create_non_pic_to_pic_stubs_section):
2470 + Set SEC_LINKER_CREATED for the stub section.
2472 +2008-06-09 Paul Brook <paul@codesourcery.com>
2474 + Backport from FSF.
2476 + * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
2479 +2008-06-06 Paul Brook <paul@codesourcery.com>
2481 + Backport from FSF.
2483 + * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
2485 +2008-06-03 Paul Brook <paul@codesourcery.com>
2487 + Backport from FSF.
2489 + * config/tc-arm.c (do_t_rbit): Populate both rm fields.
2491 + * gas/arm/thumb32.d: Update expected output.
2493 +2008-06-02 Nathan Froyd <froydnj@codesourcery.com>
2496 + * ld-scripts/rgn-over8.s: Use .section .bss instead of .bss.
2498 +2008-05-23 Paul Brook <paul@codesourcery.com>
2501 + * config/tc-arm.c (arm_fix_adjustable): Don't adjust MOVW/MOVT
2505 + * gas/arm/movw-local.d: New test.
2506 + * gas/arm/movw-local.s: New test.
2508 +2008-05-23 Paul Brook <paul@codesourcery.com>
2510 + Backport from FSF.
2512 + * config/tc-arm.c (parse_cond): Covert to lowercase before matching.
2514 +2008-05-20 Nathan Froyd <froydnj@codesourcery.com>
2516 + Backport from mainline:
2518 + 2008-03-31 Edmar Wienskoski <edmar@freescale.com>
2520 + * archures.c: Add bfd_mach_ppc_e500mc.
2521 + * bfd-in2.h: Regenerate.
2524 + * config/tc-ppc.c (parse_cpu): Handle "e500mc". Extend "e500" to
2525 + accept e500mc instructions.
2526 + (md_show_usage): Document -me500mc.
2529 + * gas/ppc/e500mc.s, gas/ppc/e500mc.d: New test.
2530 + * gas/ppc/ppc.exp: Run the new test
2533 + * ppc.h: (PPC_OPCODE_E500MC): New.
2536 + * ppc-dis.c (powerpc_dialect): Handle "e500mc". Extend "e500" to
2537 + accept Power E500MC instructions.
2538 + (print_ppc_disassembler_options): Document -Me500mc.
2539 + * ppc-opc.c: (DUIS, DUI, T): New.
2540 + (XRT, XRTRA): Likewise.
2541 + (E500MC): Likewise.
2542 + (powerpc_opcodes): Add new Power E500MC instructions.
2544 +2008-05-15 Nathan Sidwell <nathan@codesourcery.com>
2547 + Backport 2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
2549 + * ld-scripts/rgn-over8-ok.d: Accept any alignment.
2551 +2008-05-09 Catherine Moore <clm@codesourcery.com>
2553 + From binutils-mips:
2556 + * config/tc-mips.c (mips_frob_file): Don't match MIPS16 relocs
2557 + with non-MIPS16 relocs.
2560 + * gas/mips/mips16-hilo-match.s: New test.
2561 + * gas/mips/mip16-hilo-match.d: New test output.
2562 + * gas/mips/mips.exp: Run mips16-hilo-match.
2564 +2008-05-05 Catherine Moore <clm@codesourcery.com>
2566 + From binutils-mips:
2567 + 2008-04-04 Catherine Moore <clm@codesourcery.com>
2569 + * gas/mips/mips.exp (ulw2-eb-ilocks, elw2-el-ilocks, uld2-el,
2570 + uld2-eb, mips64): Disable for octeon.
2572 +2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2575 + * release-notes-csl.xml: Document Symbian relocation fix.
2577 + Backport from FSF:
2578 + 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2580 + * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
2581 + (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
2582 + even if they are not loaded.
2583 + * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
2586 + 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2588 + * ld-arm/symbian-seg1.s, ld-arm/symbian-seg1.d: New files.
2589 + * ld-arm/arm-elf.exp: Run symbian-seg1.
2591 +2008-04-28 Nathan Sidwell <nathan@codesourcery.com>
2594 + * release-notes-csl.xml: Document.
2597 + * ldlang.c (lang_size_sections_1): Don't check LMA overflow on
2598 + non-load sections.
2601 + * ld-scripts/rgn-over.exp: Allow -ok file names to pass.
2602 + * ld-scripts/rgn-over8.s: New.
2603 + * ld-scripts/rgn-over8.t: New.
2604 + * ld-scripts/rgn-over8-ok.d: New.
2606 +2008-04-24 Maxim Kuvyrkov <maxim@codesourcery.com>
2608 + * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't reject R_MIPS_HI16
2609 + relocations when they are a part of compound relocation.
2611 +2008-04-07 Andrew Jenner <andrew@codesourcery.com>
2614 + * emultempl/armelf.em: Correct formatting of help text for
2615 + --no-enum-size-warning option.
2617 +2008-03-28 Catherine Moore <clm@codesourcery.com>
2620 + 2008-03-26 Daniel Jacobowitz <dan@codesourcery.com>
2622 + * ld-elf/flags1.d: Adjust for MIPS text alignment.
2624 +2008-03-28 Daniel Jacobowitz <dan@codesourcery.com>
2627 + * elfxx-mips.c (_bfd_mips_elf_create_nonpic_dynamic_sections): New.
2628 + (_bfd_mips_elf_create_dynamic_sections): Use it.
2629 + (_bfd_mips_elf_check_relocs): Likewise. Reject shared libraries with
2630 + non-PIC relocations.
2631 + (_bfd_mips_elf_merge_private_bfd_data): Skip dynamic objects.
2633 +2008-03-28 Paul Brook <paul@codesourcery.com>
2635 + Backport from FSF.
2637 + * config/tc-arm.c (parse_neon_mov): Parse register before immediate
2638 + to avoid spurious symbols.
2640 +2008-03-27 Joseph Myers <joseph@codesourcery.com>
2643 + * ld-elfcomm/elfcomm.exp: Run $READELF not readelf.
2645 +2008-03-27 Daniel Jacobowitz <dan@codesourcery.com>
2648 + * config/tc-mips.c (md_begin): Disable -G for abicalls even without
2651 +2008-03-27 Nathan Sidwell <nathan@codesourcery.com>
2655 + * config/tc-m68k.c (md_convert_frag_1): Replace as_fatal with
2658 +2008-03-26 Daniel Jacobowitz <dan@codesourcery.com>
2662 + * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
2663 + (_bfd_mips_elf_check_relocs): Update comments. Always call
2664 + mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
2666 +2008-03-26 Nathan Sidwell <nathan@codesourcery.com>
2670 + * mt-sde (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Replace
2671 + -minterlink-mips16 with -fno-optimize-sibling-calls.
2674 + * Makefile.am (convert.o): Add convert.c.
2675 + * Makefile.in: Rebuilt.
2677 +2008-03-25 Maxim Kuvyrkov <maxim@codesourcery.com>
2681 + * elf.c (_bfd_elf_map_sections_to_segments): Check user's
2682 + mapping of section to segments.
2684 +2008-03-24 Kazu Hirata <kazu@codesourcery.com>
2687 + * cygpath.c (cygpath): Special-case the empty path.
2689 +2008-03-20 Nathan Sidwell <nathan@codesourcery.com>
2692 + * Makefile.am (convert.o): Fix dependency typo.
2693 + * Makefile.in: Rebuilt.
2695 +2008-03-18 Daniel Jacobowitz <dan@codesourcery.com>
2698 + * cygpath.c (chdir): New function.
2700 +2008-03-14 Mark Shinwell <shinwell@codesourcery.com>
2701 + Daniel Jacobowitz <dan@codesourcery.com>
2702 + Catherine Moore <clm@codesourcery.com>
2705 + * bfd-in.h (bfd_mips_elf_set_non_pic): New prototype.
2706 + (bfd_mips_elf_check_non_pic): New prototype.
2707 + * bfd-in2.h: Regenerate.
2708 + * elf32-mips.c (elf_mips_copy_howto): New.
2709 + (elf_mips_jump_slot_howto): New.
2710 + (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
2711 + and BFD_RELOC_MIPS_JUMP_SLOT.
2712 + (bfd_elf32_bfd_reloc_name_lookup): Handle new copy and jump slot
2714 + (mips_elf32_rtype_to_howto): Likewise.
2715 + (elf_backend_want_plt_sym): Define. Remove definition in VxWorks
2717 + (elf_backend_plt_readonly): Likewise.
2718 + (elf_backend_write_section): Define.
2719 + (elf_backend_plt_sym_val): Define, except for VxWorks.
2720 + (mips_vxworks_copy_howto_rela): Delete.
2721 + (mips_vxworks_jump_slot_howto_rela): Delete.
2722 + (mips_vxworks_bfd_reloc_type_lookup): Delete.
2723 + (mips_vxworks_bfd_reloc_name_lookup): Delete.
2724 + (mips_vxworks_rtype_to_howto): Delete.
2725 + (elf_backend_got_symbol_offset): Remove legacy definition.
2726 + (elf_backend_want_dynbss): Remove unnecessary definition.
2727 + (bfd_elf32_bfd_reloc_type_lookup): Delete macro definition for
2729 + (bfd_elf32_bfd_reloc_name_lookup): Likewise.
2730 + (elf_backend_mips_rtype_to_howto): Likewise.
2731 + (elf_backend_adjust_dynamic_symbol): Define to new function.
2732 + * elfxx-mips.c (mips_elf_link_hash_entry): Add plt_entry_offset and
2733 + has_non_pic_to_pic_stub members. Delete is_relocation_target
2735 + (mips_elf_link_hash_table): Add is_non_pic, non_pic_bfd,
2736 + snonpictopic and large_plt_entry_size members. Update comments.
2738 + (NON_PIC_TO_PIC_STUB_SECTION_NAME): New.
2739 + (MIPS_NONPIC_LARGE_PLT_THRESHOLD): New.
2740 + (mips_non_pic_exec_plt0_entry): New.
2741 + (mips_non_pic_exec_plt_entry): New.
2742 + (mips_non_pic_large_exec_plt_entry): New.
2743 + (mips_non_pic_to_pic_stub): New.
2744 + (mips_elf_link_hash_newfunc): Initialize new members.
2745 + (mips_elf_create_got_section): Don't create .got.plt for VxWorks.
2746 + (mips_elf_calculate_relocation): Handle cases for filling in
2747 + references to non-PIC to PIC call stubs and non-PIC PLT entries.
2748 + (_bfd_mips_elf_create_dynamic_sections): Create .plt, .rel.plt,
2749 + .dynbss and .rel.bss sections for non-PIC. Create .got.plt for
2750 + non-PIC and VxWorks.
2751 + (_bfd_mips_elf_check_relocs): Update comments. Check if we have
2752 + the first non-PIC file encountered during an executable link.
2753 + Don't add dynamic relocations for non-PIC. Remove
2754 + is_relocation_target assignment. Set non_got_ref as appropriate.
2755 + (mips_elf_next_plt_entry_size): New.
2756 + (mips_elf_create_old_style_stub): New.
2757 + (_bfd_mips_elf_adjust_dynamic_symbol): Call worker function to
2758 + handle VxWorks and non-PIC cases. Move code for creating old-style
2759 + .MIPS.stubs entries to mips_elf_create_old_style_stub.
2760 + (_bfd_mips_vxworks_adjust_dynamic_symbol): Rename to...
2761 + (_bfd_mips_plt_adjust_dynamic_symbol): ...this. New. Extend code
2762 + to handle the non-PIC ABI.
2763 + (mips_elf_maybe_create_non_pic_to_pic_stub): New.
2764 + (_bfd_mips_elf_always_size_sections): Identify symbols requiring
2765 + non-PIC to PIC call stubs. Allocate space for any such stubs.
2766 + (_bfd_mips_elf_size_dynamic_sections): Allocate space for delay slot
2767 + in a PLT section. Update comments. Add dynamic tags for non-PIC
2769 + (_bfd_mips_elf_finish_dynamic_symbol): Fill in .plt, .got.plt and
2770 + .rel.plt entries for symbols with PLT entries under non-PIC.
2771 + Tighten bound on h->plt.offset for old-style stubs. Emit copy
2772 + relocations if required.
2773 + (mips_non_pic_finish_plt): New.
2774 + (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_PLTGOT
2775 + and DT_MIPS_RWPLT dynamic tags. Rework code handling DT_PLTGOT
2776 + dynamic tag. Adjust assertions for DT_PLTREL, DT_PLTRELSZ and
2777 + DT_JMPREL. Call mips_non_pic_finish_plt.
2778 + (_bfd_mips_elf_copy_indirect_symbol): Copy new members.
2779 + (_bfd_mips_elf_link_hash_table_create): Initialize new members.
2780 + (_bfd_mips_elf_merge_private_bfd_data): Remove extraneous
2782 + (_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
2783 + DT_MIPS_RWPLT cases.
2784 + (_bfd_mips_elf_plt_sym_val): New.
2785 + (mips_elf_nonpic_stub): New.
2786 + (_bfd_mips_elf_begin_write_processing): New.
2787 + (bfd_mips_elf_maybe_create_non_pic_to_pic_stubs_section): New.
2788 + (_bfd_mips_post_process_headers): Set correct ABI version for
2790 + * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Rename to...
2791 + (_bfd_mips_plt_adjust_dynamic_symbol): ...this. New prototype.
2792 + (_bfd_mips_nonpic_finish_dynamic_symbol): New.
2793 + (_bfd_mips_elf_plt_sym_val): New prototype.
2794 + (_bfd_mips_elf_begin_write_processing): New prototype.
2795 + (bfd_mips_elf_maybe_create_non_pic_to_pic_stubs_section): New
2797 + (_bfd_mips_post_process_headers): New prototype.
2798 + (elf_backend_post_process_headers): Define.
2799 + (elf_backend_begin_write_processing): Define.
2800 + * elflink.c (_bfd_elf_merge_symbol): Correct typo.
2801 + * reloc.c (MIPS ELF relocation): Add reference to non-PIC.
2804 + * readelf.c (get_mips_dynamic_type): Handle DT_MIPS_PLTGOT
2805 + and DT_MIPS_RWPLT.
2806 + (get_mips_symbol_other): Handle STO_MIPS_PLT.
2809 + * config/tc-mips.c (mips_nonpic_option): New.
2810 + (md_longopts): Add mnon-pic-abicalls entry.
2811 + (md_parse_option): Add OPTION_NON_PIC_ABICALLS case.
2812 + (mips_elf_final_processing): Check mips_nonpic_option.
2815 + * elf/mips.h (DT_MIPS_PLTGOT): New.
2816 + (DT_MIPS_RWPLT): New.
2817 + (STO_MIPS_PLT): New.
2820 + * emulparams/elf32btsmip.sh: Update comment.
2823 + (DATA_GOTPLT): Define.
2824 + * emulparams/elf32ebmipvxworks.sh (GOT): Unset.
2825 + (GOTPLT): Likewise.
2826 + (DATA_GOTPLT): Likewise.
2827 + * emulparams/elf32elmipvxworks.sh (GOT): Unset.
2828 + (GOTPLT): Likewise.
2829 + (DATA_GOTPLT): Likewise.
2830 + * emultempl/mipself.em: Include elfxx-mips.h.
2831 + (mips_after_open): New.
2832 + (LDEMUL_AFTER_OPEN): Define.
2833 + * scripttempl/elf.sc: Update comments. Handle DATA_GOT and
2836 +2008-03-12 Nathan Sidwell <nathan@codesourcery.com>
2839 + * config/tc-m68k.c (no_mac): New.
2840 + (m68k_extensions): Point to it for mac entry.
2841 + (m68k_set_extension): Allow for disabling different set of flags.
2843 +2008-03-11 Catherine Moore <clm@codesourcery.com>
2846 + * elf.c ( _bfd_elf_print_private_bfd_data): Call
2847 + elf_backend_get_target_dtag if defined.
2848 + * elf32-mips.c (elf_backend_get_target_dtag): Define.
2849 + * elf64-mips.c: Likewise.
2850 + * elfn32-mips.c: Likewise.
2851 + * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
2852 + * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
2853 + * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
2854 + * elfxx-target.h (elf_backend_get_target_dtag): Add default.
2855 + (elf_backend_data): Add elf_backend_get_target_dtag.
2857 +2008-03-11 Julian Brown <julian@codesourcery.com>
2861 + 2008-03-11 Thiemo Seufer <ths@mips.com>
2864 + * bin.c, conv.texi, convert.c, elf.h, elfio.c, elfmips.h,
2865 + elfout.c, idtbin.c, lsifast.c, mipsflash.c, srec.c, stagbin.c:
2866 + Update license to GPL v3.
2868 +2008-03-07 Julian Brown <julian@codesourcery.com>
2871 + * convert.c (conv-version.h): Include.
2872 + (getopt.h): Include.
2873 + (usage): Add error argument. Print to stdout/stderr depending on
2874 + setting. Exit according to setting. Print bug URL.
2875 + (parselist): Add argument to usage() calls.
2876 + (long_opts): New array.
2877 + (main): Use getopt_long. Add argument to usage() invocations.
2878 + Handle --help, --version options.
2879 + * configure.ac (ACX_PKGVERSION, ACX_BUGURL): Add.
2880 + * Makefile.am (ACLOCAL_AMFLAGS): Add.
2881 + (conv_SOURCES): Add conv-version.h.
2882 + (conv-version.h): Add build rule.
2883 + (convert.c): Add dependency on conv-version.h.
2885 + * Makefile.in: Regenerate.
2886 + * configure.ac: Regenerate.
2887 + * aclocal.m4: Regenerate.
2889 +2008-03-07 Julian Brown <julian@codesourcery.com>
2892 + * Makefile.am (install-exec-local): Don't install "conv" binary with
2893 + no target triplet.
2894 + * Makefile.in: Regenerate.
2896 +2008-03-06 Joseph Myers <joseph@codesourcery.com>
2899 + * lib/ld-lib.exp (check_gc_sections_available): Return 0 for
2902 +2008-03-06 Maxim Kuvyrkov <maxim@codesourcery.com>
2906 + * elf32-m68k.c (elf_m68k_get_bfd2got_entry): Handle search mode.
2907 + (elf_m68k_relocate_section): Fix to handle _GLOBAL_OFFSET_TABLE_
2908 + relocations in case of empty local/global GOT.
2910 +2008-03-04 Mark Shinwell <shinwell@codesourcery.com>
2911 + Sandra Loosemore <sandra@codesourcery.com>
2914 + * elf32-arm.c (elf32_arm_final_link_relocate): Use correct formula
2915 + for sign-extending 16-bit offsets in MOVW/MOVT relocations.
2917 +2008-03-02 Joseph Myers <joseph@codesourcery.com>
2920 + * emulparams/m68kelf.sh (GENERATE_PIE_SCRIPT): Define.
2922 +2008-02-29 Paul Brook <paul@codesourery.com>
2925 + * elf32-arm.c (insert_thumb_branch): Rewrite. Handle b.w.
2926 + (elf32_thumb_to_arm_stub): Adjust for new insert_thumb_branch.
2929 + * ld-arm/arm-app.r: Updated expected outpu for new test.
2930 + * ld-arm/arm-elf.exp (armeabitests): Add thumb2-b-interwork.
2931 + * ld-arm/thumb2-b-interwork.d: New test.
2932 + * ld-arm/thumb2-b-interwork.s: New test.
2934 +2008-02-29 Julian Brown <julian@codesourcery.com>
2937 + * config.h.in: Regenerate.
2939 +2008-02-29 Julian Brown <julian@codesourcery.com>
2942 + * convert.c (xmalloc): Remove (duplicate definition in libiberty).
2944 +2008-02-28 Julian Brown <julian@codesourcery.com>
2946 + * configure.ac (mips*-sde-elf*): Merge duplicated cases into one.
2947 + Test --with-newlib for !yes rather than no.
2948 + * Makefile.def (all-convert): Add dependency on libiberty to fix
2950 + * configure: Regenerate.
2951 + * Makefile.in: Regenerate.
2954 + * Makefile.in: Disable HTML documentation, and HTML and PDF
2955 + documentation installation.
2956 + * Makefile.am: Regenerate.
2957 + * configure: Regenerate.
2958 + * aclocal.m4: Regenerate.
2960 +2008-02-28 Julian Brown <julian@codesourcery.com>
2962 + Revert: (moved to separate module)
2964 + 2008-02-11 Julian Brown <julian@codesourcery.com>
2968 + * sdemdi: New directory. SDE/MDI glue.
2969 + * Makefile.def: Add sdemdi target module.
2973 + * configure.ac: New.
2974 + * Makefile.am: New.
2975 + * config-ml.in: New.
2978 + * m32cache.S: New.
2981 + * mdisyscall.S: New.
2983 + * rtpxlite.c: New.
2984 + * rtpxliteasm.S: New.
2985 + * rtpxstub.c: New.
2986 + * sdemdi32.ld: New.
2987 + * sdemdi32hi.ld: New.
2988 + * sdemdi64.ld: New.
2989 + * sdemdi64hi.ld: New.
2992 +2008-02-28 Maxim Kuvyrkov <maxim@codesourcery.com>
2994 + Fix testcase to handle hack for SDElib below.
2995 + Don't push upstream.
2999 + * gas/mips/set-arch.d: Expect ehb.
3001 +2008-02-27 Paul Brook <paul@codesourcery.com>
3004 + * elf32-arm.c (elf32_arm_check_relocs): Only set h->needs_plt for
3005 + branch/call relocations.
3008 + * ld-arm/arm-elf.exp (armelftests): Add arm-app-movw.
3010 +2008-02-27 Paul Brook <paul@codesourcery.com>
3013 + * ld-arm/arm-elf.exp (armelftests): Use arm.ld in movw-merge.
3015 +2008-02-26 Joseph Myers <joseph@codesourcery.com>
3019 + binutils/testsuite/
3020 + 2008-02-26 Joseph Myers <joseph@codesourcery.com>
3021 + * config/default.exp (gcc_gas_flag, dlltool_gas_flag): Define to
3022 + empty for testing an installed toolchain.
3024 +2008-02-25 Sandra Loosemore <sandra@codesourcery.com>
3028 + 2006-05-17 Carlos O'Donell <carlos@codesourcery.com>
3030 + * doc/binutils.texi: Use "Binutils Index" for index name.
3032 +2008-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
3034 + * release-notes-csl.xml (ColdFire multi-GOT support): Fix release
3035 + note to not include uClinux.
3037 +2008-02-20 Mark Mitchell <mark@codesourcery.com>
3040 + * ld-elf/seg.d: Expect .reginfo section on MIPS.
3042 +2008-02-16 Paul Brook <paul@codesourcery.com>
3044 + Merged from //mirrors/binutils/trunk revision 193546.
3046 +2008-02-11 Julian Brown <julian@codesourcery.com>
3050 + 2005-03-21 Maciej W. Rozycki <macro@mips.com>
3052 + * config/tc-mips.c (append_insn): Disable swapping of MIPS16
3053 + branches as it breaks DWARF-2 line information.
3055 +2008-02-11 Julian Brown <julian@codesourcery.com>
3060 + * elfxx-mips.c (mips_elf_merge_obj_attributes): Add support for
3062 + * readelf.c (display_mips_gnu_attribute): Add 64-bit float tag support.
3065 + * elf/mips.h (Tag_GNU_MIPS_ABI_FP): Update comment.
3068 + * ld-mips-elf/mips-elf.exp: Add run-dump-tests for attr-gnu-4-04,
3069 + attr-gnu-4-05, attr-gnu-4-15, attr-gnu-4-24, attr-gnu-4-25,
3070 + attr-gnu-4-34, attr-gnu-4-35, attr-gnu-4-40, attr-gnu-4-42,
3071 + attr-gnu-4-43, attr-gnu-4-44, attr-gnu-4-45, attr-gnu-4-51.
3072 + * ld-mips-elf/attr-gnu-4-14.d: Fix warning.
3073 + * ld-mips-elf/attr-gnu-4-41.d: Likewise.
3074 + * ld-mips-elf/attr-gnu-4-5.s: New.
3075 + * ld-mips-elf/attr-gnu-4-04.d: New.
3076 + * ld-mips-elf/attr-gnu-4-05.d: New.
3077 + * ld-mips-elf/attr-gnu-4-15.d: New.
3078 + * ld-mips-elf/attr-gnu-4-24.d: New.
3079 + * ld-mips-elf/attr-gnu-4-25.d: New.
3080 + * ld-mips-elf/attr-gnu-4-34.d: New.
3081 + * ld-mips-elf/attr-gnu-4-35.d: New.
3082 + * ld-mips-elf/attr-gnu-4-40.d: New.
3083 + * ld-mips-elf/attr-gnu-4-42.d: New.
3084 + * ld-mips-elf/attr-gnu-4-43.d: New.
3085 + * ld-mips-elf/attr-gnu-4-44.d: New.
3086 + * ld-mips-elf/attr-gnu-4-45.d: New.
3087 + * ld-mips-elf/attr-gnu-4-51.d: New.
3089 +2008-02-11 Julian Brown <julian@codesourcery.com>
3093 + 2004-09-09 Nigel Stephens <nigel@mips.com>
3096 + * ihex.c (ihex_write_object_contents): Truncate address to 32 bits
3097 + if the top 32 bits are a simple sign extension of the bottom.
3099 +2008-02-11 Julian Brown <julian@codesourcery.com>
3104 + * config/tc-mips.c (OPTION_MIPS16E, OPTION_NOMIPS16E): Add
3105 + backward-compatibility options for SDE.
3106 + (OPTION_COMPAT_ARCH_BASE): Bump to +16.
3108 +2008-02-11 Julian Brown <julian@codesourcery.com>
3112 + * sdemdi: New directory. SDE/MDI glue.
3113 + * Makefile.def: Add sdemdi target module.
3117 + * configure.ac: New.
3118 + * Makefile.am: New.
3119 + * config-ml.in: New.
3122 + * m32cache.S: New.
3125 + * mdisyscall.S: New.
3127 + * rtpxlite.c: New.
3128 + * rtpxliteasm.S: New.
3129 + * rtpxstub.c: New.
3130 + * sdemdi32.ld: New.
3131 + * sdemdi32hi.ld: New.
3132 + * sdemdi64.ld: New.
3133 + * sdemdi64hi.ld: New.
3136 +2008-02-11 Julian Brown <julian@codesourcery.com>
3140 + * convert: New directory. Elf to binary converter.
3144 + * Makefile.am: New.
3145 + * Makefile.def: New.
3146 + * acinclude.m4: New.
3147 + * configure.ac: New.
3156 + * mipsflash.c: New.
3164 +2008-02-11 Julian Brown <julian@codesourcery.com>
3166 + Merge from MIPS (This patch is a hack to make SDElib happy);
3167 + don't push upstream:
3169 + 2004-10-06 David Ung <davidu@mips.com>
3171 + * mips-opc.c: Change membership to I1 for instructions ssnop and
3174 +2008-02-11 Julian Brown <julian@codesourcery.com>
3178 + * config/mt-sde (CFLAGS_FOR_TARGET): Add -mno-gpopt.
3179 + (CXXFLAGS_FOR_TARGET): Likewise.
3180 + * configure.ac (mips*-sde-elf*): Remove libgloss and libiberty when not
3181 + building Newlib. Add sde-conv host tool and MDI glue library.
3182 + * configure: Regenerate.
3184 +2008-02-11 Julian Brown <julian@codesourcery.com>
3186 + Merge from MIPS/backport from FSF:
3188 + 2007-09-14 Alan Modra <amodra@bigpond.net.au>
3191 + * opncls.c (find_separate_debug_file): Ensure bfd_set_error has
3192 + been called on all error return paths.
3193 + (bfd_fill_in_gnu_debuglink_section): Use bfd_malloc, not malloc.
3194 + Clear padding after filename
3196 + 2007-09-14 Alan Modra <amodra@bigpond.net.au>
3199 + * format.c (bfd_check_format_matches): Record matching targets even
3200 + when "matching" is NULL to allow bfd_associated_vector matches.
3201 + Consolidate error return code. Consolidate ok return code. Always
3202 + restore original target and format on error.
3204 +2008-02-02 Sandra Loosemore <sandra@codesourcery.com>
3206 + * release-notes-csl.xml: Fix mistaken uses of &csl_prod; to use
3207 + &csl_sgxx; instead.
3209 +2008-02-01 Maxim Kuvyrkov <maxim@codesourcery.com>
3213 + * ld-m68k/got-12.s: Remove .ident.
3214 + * ld-m68k/got-13.s: Ditto.
3215 + * ld-m68k/got-14.s: Ditto.
3216 + * ld-m68k/got-15.s: Ditto.
3217 + * ld-m68k/got-34.s: Ditto.
3218 + * ld-m68k/got-35.s: Ditto.
3219 + * ld-m68k/xgot-15.s: Ditto.
3221 +2008-02-01 Maxim Kuvyrkov <maxim@codesourcery.com>
3223 + Add -mxgot tests to ld.
3227 + * ld-m68k/xgot-15.s: New source.
3228 + * ld-m68k/got-xgot-15-ok.d: New test.
3229 + * ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: New test.
3230 + * ld-m68k/m68k.exp: Run new tests.
3232 +2008-01-29 Julian Brown <julian@codesourcery.com>
3235 + * read.c (cons_worker): Report error if user tries to specify string
3236 + after .byte, etc. directive.
3238 +2008-01-28 Paul Brook <paul@codesourcery.com>
3241 + * emultempl/armelf.em (OPTION_FIX_V4BX_INTERWORKING): Define.
3242 + (PARSE_AND_LIST_LONGOPTS): Add fix-v4bx-interworking.
3243 + (PARSE_AND_LIST_OPTIONS): Ditto.
3244 + (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_FIX_V4BX_INTERWORKING.
3245 + * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Add .v4_bx.
3246 + * emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Ditto.
3247 + * emulparams/armnto.sh (OTHER_TEXT_SECTIONS): Ditto.
3248 + * ld.texinfo: Document --fix-v4bx-interworking.
3251 + * ld-arm/armv4-bx.d: New test.
3252 + * ld-arm/armv4-bx.s: New test.
3253 + * ld-arm/arm.ld: Add .v4bx.
3254 + * ld-arm/arm-elf.exp: Add armv4-bx.
3257 + * gas/arm/thumb.d: Exclude EABI targets.
3258 + * gas/arm/arch4t.d: Exclude EABI targts.
3259 + * gas/arm/v4bx.d: New test.
3260 + * gas/arm/v4bx.s: New test.
3261 + * gas/arm/thumb-eabi.d: New test.
3262 + * gas/arm/arch4t-eabi.d: New test.
3265 + * config/tc-arm.c (fix_v4bx): New variable.
3266 + (do_bx): Generate V4BX relocations.
3267 + (md_assemble): Allow bx on v4 codes when fix_v4bx.
3268 + (md_apply_fix): Handle BFD_RELOC_ARM_V4BX.
3269 + (tc_gen_reloc): Ditto.
3270 + (OPTION_FIX_V4BX): Define.
3271 + (md_longopts): Add fix-v4bx.
3272 + (md_parse_option): Handle OPTION_FIX_V4BX.
3273 + (md_show_usage): Document --fix-v4bx.
3274 + * doc/c-arm.texi: Document --fix-v4bx.
3277 + * reloc.c: Add BFD_RELOC_ARM_V4BX.
3278 + * elf32-arm.c (elf32_arm_reloc_map): Add BFD_RELOC_ARM_V4BX.
3279 + (ARM_BX_GLUE_SECTION_NAME, ARM_BX_GLUE_SECTION_NAME): Define.
3280 + (elf32_arm_link_hash_table): Add bx_glue_size and bx_glue_offset.
3281 + Update comment for fix_v4bx.
3282 + (elf32_arm_link_hash_table_create): Zero bx_glue_size and
3284 + (ARM_BX_VENEER_SIZE, armbx1_tst_insn, armbx2_moveq_insn,
3285 + armbx3_bx_insn): New.
3286 + (bfd_elf32_arm_allocate_interworking_sections): Allocate BX veneer
3288 + (bfd_elf32_arm_add_glue_sections_to_bfd): Ditto.
3289 + (bfd_elf32_arm_process_before_allocation): Record BX veneers.
3290 + (record_arm_bx_glue, elf32_arm_bx_glue): New functions.
3291 + (elf32_arm_final_link_relocate): Handle BX veneers.
3292 + (elf32_arm_output_arch_local_syms): Output mapping symbol for .v4_bx.
3293 + * bfd-in2.h: Regenerate.
3294 + * libbfd.h: Regenerate.
3296 +2008-01-28 Maxim Kuvyrkov <maxim@codesourcery.com>
3298 + Handle weakdefs in copy_indirect hook.
3302 + elf32-m68k.c (elf_m68k_copy_indirect_symbol): Handle weakdefs.
3304 +2008-01-26 Maxim Kuvyrkov <maxim@codesourcery.com>
3306 + Multi-GOT support for m68k.
3308 + * release-notes-csl.xml: Document feature.
3312 + * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
3313 + glist): New fields.
3314 + (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
3315 + struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
3316 + struct elf_m68k_multi_got): New data structures.
3317 + (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
3318 + allow_multigot_p, multi_got_): New fields.
3319 + (elf_m68k_multi_got): New macro.
3320 + (elf_m68k_link_hash_newfunc): Initialize new fields of
3321 + struct elf_m68k_link_hash_entry.
3322 + (elf_m68k_link_hash_table_create): Initialize new fields of
3323 + struct elf_m68k_link_hash_table.
3324 + (elf_m68k_link_hash_table_free): New static function implementing hook.
3325 + (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
3326 + static functions for struct elf_m68k_got.
3327 + (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
3328 + elf_m68k_got_entry_eq): New static functions for
3329 + struct elf_m68k_got_entry.
3330 + (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
3331 + ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
3332 + (enum elf_m68k_get_entry_howto): New enum.
3333 + (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
3334 + elf_m68k_remove_got_entry_type): New static functions for
3335 + struct elf_m68k_got_entry.
3336 + (elf_m68k_add_entry_to_got): New static function.
3337 + (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
3338 + elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
3339 + functions for struct elf_m68k_bfd2got_entry.
3340 + (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
3341 + elf_m68k_can_merge_gots): New traversal.
3342 + (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
3343 + elf_m68k_merge_gots): Ditto.
3344 + (struct elf_m68k_finalize_got_offsets_arg,
3345 + elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
3346 + (struct elf_m68k_partition_multi_got_arg,
3347 + elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
3348 + elf_m68k_partition_multi_got): Ditto.
3349 + (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
3351 + (elf_m68k_copy_indirect_symbol): New static function implementing
3353 + (elf_m68k_check_relocs): Update to add entries to multi-GOT.
3354 + (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
3355 + (elf_m68k_always_size_sections): Assign BFDs to GOTs.
3356 + (elf_m68k_relocate_section): Update to properly handle GOT relocations.
3357 + (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
3358 + of a global symbol.
3359 + (bfd_elf_m68k_set_target_options): New function.
3360 + (bfd_elf32_bfd_link_hash_table_free): Define hook.
3361 + (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
3362 + to skip generic calculation of GOT offsets.
3363 + (elf_backend_copy_indirect_symbol): Define hook.
3365 + * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
3366 + * bfd-in2.h: Regenerate.
3370 + * configure.in (--enable-got): New option. Handle it.
3371 + * configure: Regenerate.
3372 + * config.in: Regenerate.
3374 + * emultempl/m68kelf.em: (got_handling_target_default): New shell
3376 + (GOT_HANDLING_TARGET_DEFAULT): New macro.
3377 + (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure
3378 + option if one was given.
3379 + (got_handling): New static variable.
3380 + (elf_m68k_create_output_section_statements): New static function
3381 + implementing hook.
3382 + (PARSE_AND_LIST_PROLOGUE): Define shell variable.
3383 + (OPTION_GOT): New macro.
3384 + (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify
3386 + (got): New linker option.
3387 + (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string
3389 + (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got
3392 + * ld.texinfo: Document --got=<type> option.
3393 + * gen-doc.texi: Add M68K.
3397 + * ld-m68k/got-12.s: New file.
3398 + * ld-m68k/got-13.s: New file.
3399 + * ld-m68k/got-14.s: New file.
3400 + * ld-m68k/got-15.s: New file.
3401 + * ld-m68k/got-34.s: New file.
3402 + * ld-m68k/got-35.s: New file.
3403 + * ld-m68k/got-single-12-ok.d: New dump test.
3404 + * ld-m68k/got-single-13-er.d: New dump test.
3405 + * ld-m68k/got-negative-14-ok.d: New dump test.
3406 + * ld-m68k/got-negative-15-er.d: New dump test.
3407 + * ld-m68k/got-negative-12-13-14-34-ok.d: New dump test.
3408 + * ld-m68k/got-negative-12-13-14-35-er.d: New dump test.
3409 + * ld-m68k/got-multigot-14-ok.d: New dump test.
3410 + * ld-m68k/got-multigot-15-er.d: New dump test.
3411 + * ld-m68k/got-multigot-12-13-14-34-35-ok.d: New dump test.
3412 + * ld-m68k/m68k.exp: Run new tests.
3414 +2008-01-25 Joseph Myers <joseph@codesourcery.com>
3417 + * libiberty.h (cygpath): Declare.
3420 + * cygpath.c (cygpath): Remove static. Return int.
3421 + * pex-win32.c (pex_win32_open_read, pex_win32_open_write): Use
3424 +2008-01-22 Paul Brook <paul@codesourcery.com>
3427 + * config/tc-arm.c (arm_cpu_option_table): Add cortex-a9.
3430 + * c-arm.texi: Add cortex-a9.
3432 +2008-01-22 Paul Brook <paul@codesourcery.com>
3435 + * elf32-arm.c (elf32_arm_relocate_section): Handle MOVW and MOVT
3436 + relocations. Improve safety check for other weird relocations.
3437 + * elf32-arm.c (elf32_arm_howto_table): Fix masks for MOVW/MOVT.
3440 + * ld-arm/arm-elf.exp: Add movw-merge.
3441 + * ld-arm/movw-merge.d: New test.
3442 + * ld-arm/movw-merge.s: New test.
3444 +2008-01-09 Joseph Myers <joseph@codesourcery.com>
3446 + * configure.ac (host_makefile_frag): Use config/mh-mingw on
3448 + * configure: Regenerate.
3451 + * config/mh-mingw: New.
3453 +2008-01-07 Joseph Myers <joseph@codesourcery.com>
3455 + NOT ASSIGNED TO FSF
3457 + Merge from Cavium binutils-2.16.1.diff.gz:
3460 + * config/tc-mips.c (macro): Support M_SAA_AB and M_SAAD_AB.
3463 + * gas/mips/mips.exp: Add octeon_saa_saad test.
3464 + * gas/mips/octeon_saa_saad.d: New.
3465 + * gas/mips/octeon_saa_saad.s: New.
3468 + * mips.h (M_SAA_AB, M_SAAD_AB): New.
3471 + * mips-opc.c (mips_builtin_opcodes): Add saa and saad
3474 +2008-01-03 Catherine Moore <clm@codesourcery.com>
3477 + * config/tc-mips.c (mips_ip): Check operands on jalr instruction.
3480 + * gas/mips/jalr.s: New test.
3481 + * gas/mips/jalr.l: New test output.
3482 + * gas/mips/mips.exp: Run new test.
3484 +2007-12-19 Nathan Sidwell <nathan@codesourcery.com>
3488 + * ld-elf/seg.t: New.
3489 + * ld-elf/seg.d: New.
3490 + * ld-elf/seg.s: New.
3492 +2007-12-12 Paul Brook <paul@codesourcery.com>
3494 + Backport from FSF.
3495 + 2007-09-15 Alan Modra <amodra@bigpond.net.au>
3496 + * configure.ac: Correct makeinfo version check.
3497 + * configure: Regenerate.
3499 +2007-12-12 Paul Brook <paul@codesourcery.com>
3502 + * doc/c-arm.texi: Document new VFP -mfpu= options.
3503 + * config/tc-arm.c (arm_option_cpu_value): Rename vfp3-d16 to
3504 + vfpv3-d16. Add vfpv2 and vfpv3.
3507 + * gas/arm/vfpv3-d16-bad.d: Rename vfp3-d16 to vfpv3-d16.
3509 +2007-12-11 Paul Brook <paul@codesourcery.com>
3512 + * config/tc-arm.c (fpu_vfp_ext_d32): New vairable.
3513 + (parse_vfp_reg_list, encode_arm_vfp_reg): Use it.
3514 + (arm_option_cpu_value): Add vfpv3-d16.
3515 + (aeabi_set_public_attributes): Handle Tag_VFP_arch=VFPV3-D16.
3518 + * gas/arm/vfpv3-d16-bad.d: New test.
3519 + * gas/arm/vfpv3-d16-bad.l: New test.
3522 + * arm.h (FPU_VFP_EXT_D32, FPU_VFP_V3D16, FPU_ARCH_VFP_V3D16): Define.
3525 + * readelf.c (arm_attr_tag_VFP_arch): Add "VFPv3-D16".
3528 + * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
3529 + Tag_VFP_arch values.
3531 +2007-12-10 Catherine Moore <clm@codesourcery.com>
3535 + * elf.c (bfd_copy_private_symbol_data): Do not copy if
3536 + the shndx is zero.
3539 + * elf/elf.exp: Exceute symtab test.
3540 + * elf/symtab.s: New test.
3541 + * elf/symtab.d: New test output file.
3543 + * release-notes-csl.xml: Document fix.
3545 +2007-11-29 Mark Shinwell <shinwell@codesourcery.com>
3548 + * mips.h (INSN_LOONGSON_2E, INSN_LOONGSON_2F,
3549 + INSN_OCTEON): Rearrange masks so Loongson flags match
3552 +2007-11-28 Nathan Sidwell <nathan@codesourcery.com>
3556 + * internal.h (ELF_IS_SECTION_IN_SEGMENT): Adjust to cope with
3557 + segments at the end of memory.
3559 +2007-11-13 Joseph Myers <joseph@codesourcery.com>
3563 + 2007-11-05 Alan Modra <amodra@bigpond.net.au>
3564 + * merge.c (sec_merge_hash_lookup): Revert last change.
3565 + (record_section): Likewise.
3566 + (_bfd_merge_sections): Likewise.
3567 + (_bfd_merged_section_offset): Properly handle NULL secinfo.
3568 + (_bfd_add_merge_section): Allocate extra space for a zero
3569 + terminator on SEC_STRINGS sections.
3572 + 2007-11-05 Alan Modra <amodra@bigpond.net.au>
3573 + * ld-elf/merge3.d, ld-elf/merge3.s: Delete.
3575 +2007-11-06 Paul Brook <paul@codesourcery.com>
3577 + Backport from FSF.
3579 + * config/tc-arm.c (do_mull): Allow overlapping Rm for armv6.
3582 + * gas/arm/mul-overlap.s: Add umull and smlal.
3583 + * gas/arm/mul-overlap.l: Update expected results.
3585 +2007-10-30 Joseph Myers <joseph@codesourcery.com>
3588 + * merge.c (sec_merge_hash_lookup): Add parameter sec_end. Check
3589 + for unterminated strings. All callers changed.
3590 + (_bfd_write_merged_section, _bfd_merged_section_offset): Handle
3591 + NULL secinfo from merge failures.
3594 + * ld-elf/merge3.d, ld-elf/merge3.s: New.
3596 +2007-10-24 Joseph Myers <joseph@codesourcery.com>
3599 + * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Do not add
3600 + PT_NULL header when not linking.
3602 +2007-10-18 Joseph Myers <joseph@codesourcery.com>
3604 + NOT ASSIGNED TO FSF
3606 + * config.sub (mipsisa64xlr, ipsisa64xlrel): Add new machine names.
3609 + * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3610 + * archures.c (bfd_mach_mips_xlr): New.
3611 + * cpu-mips.c (I_xlr): New enum value.
3612 + (arch_info_struct): Add XLR entry.
3613 + * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3614 + (mips_set_isa_flags): Handle bfd_mach_mips_xlr.
3615 + (mips_mach_extensions): Add XLR entry.
3616 + * bfd-in2.h: Regenerate.
3619 + * readelf.c (get_machine_flags): Handle E_MIPS_MACH_XLR.
3622 + * config/tc-mips.c (macro): Handle XLR instructions.
3623 + (mips_cpu_info_table): Add xlr.
3624 + * doc/c-mips.texi (MIPS architecture options): Add xlr to list of
3628 + * gas/mips/xlr-ext.d, /gas/mips/xlr-ext.s: New.
3629 + * gas/mips/mips.exp (xlr): New arch.
3630 + (xlr-ext): Run test.
3633 + * mips.h (E_MIPS_MACH_XLR): Define.
3636 + * mips.h (INSN_XLR, CPU_XLR): Define.
3637 + (OPCODE_IS_MEMBER): Handle XLR.
3638 + (M_MSGSND, M_MSGLD, M_MSGLD_T, M_MSGWAIT, M_MSGWAIT_T): Define
3642 + * mips-dis.c (mips_cp0_names_xlr, mips_cp0sel_names_xlr): New.
3643 + (mips_arch_choices): Add XLR entry.
3644 + * mips-opc.c (XLR): Define.
3645 + (mips_builtin_opcodes): Add XLR opcodes.
3647 +2007-10-17 Nathan Sidwell <nathan@codesourcery.com>
3650 + * m68k-opc.c (m68k_opcodes): Correct move sr and ccr masks for
3654 + * gas/m68k/mcf-movsr.s: New.
3655 + * gas/m68k/mcf-movsr.d: New.
3656 + * gas/m68k/all.exp: Add mcf-movsr test.
3658 +2007-10-09 Daniel Jacobowitz <dan@codesourcery.com>
3661 + * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
3662 + local symbols specially.
3663 + (mips_elf_set_global_got_offset): Skip forced local symbols.
3666 + 2007-10-04 Joseph Myers <joseph@codesourcery.com>
3668 + * elfxx-mips.c (struct mips_got_info): Add forced_local_count.
3669 + (struct mips_elf_hash_sort_data): Add forced_local and
3670 + prev_forced_local.
3671 + (mips_elf_sort_hash_table): Subtract g->forced_local_count in
3672 + computing hsd.min_got_dynindx. Initialize hsd.forced_local and
3673 + hsd.prev_forced_local. Set g->forced_local_count after sorting.
3674 + (mips_elf_sort_hash_table_f): Count forced-local symbols. Handle
3675 + them as unreferenced where allowed for in calculation of
3677 + (mips_elf_make_got_per_bfd, mips_elf_multi_got,
3678 + mips_elf_create_got_section): Initialize forced_local_count.
3679 + (_bfd_mips_elf_always_size_sections): Subtract forced_local_count
3680 + in calculating global_gotno.
3681 + (_bfd_mips_elf_final_link): Subtract forced_local_count in
3683 + (mips_elf_set_global_got_offset): Check for forced-local symbols
3684 + before assigning global GOT offsets.
3686 +2007-10-05 Daniel Jacobowitz <dan@codesourcery.com>
3688 + * release-notes-csl.xml: Add lost </para>.
3690 +2007-10-05 Carlos O'Donell <carlos@codesourcery.com>
3693 + * resrc.c (read_rc_file): Rename e to edit, and c to dir.
3694 + Pass dir to windres_add_include_dir. Add comments.
3695 + (close_input_stream): Check pclose error, and call fatal if
3696 + the preprocessor failed.
3697 + * windres.c (windres_add_include_dir): Assert that p is non-NULL,
3698 + and not an empty string.
3700 +2007-10-04 Joseph Myers <joseph@codesourcery.com>
3703 + * elfxx-mips.c (struct mips_got_info): Add forced_local_count.
3704 + (struct mips_elf_hash_sort_data): Add forced_local and
3705 + prev_forced_local.
3706 + (mips_elf_sort_hash_table): Subtract g->forced_local_count in
3707 + computing hsd.min_got_dynindx. Initialize hsd.forced_local and
3708 + hsd.prev_forced_local. Set g->forced_local_count after sorting.
3709 + (mips_elf_sort_hash_table_f): Count forced-local symbols. Handle
3710 + them as unreferenced where allowed for in calculation of
3712 + (mips_elf_make_got_per_bfd, mips_elf_multi_got,
3713 + mips_elf_create_got_section): Initialize forced_local_count.
3714 + (_bfd_mips_elf_always_size_sections): Subtract forced_local_count
3715 + in calculating global_gotno.
3716 + (_bfd_mips_elf_final_link): Subtract forced_local_count in
3718 + (mips_elf_set_global_got_offset): Check for forced-local symbols
3719 + before assigning global GOT offsets.
3722 + * ld-mips-elf/multi-got-hidden-1.d,
3723 + ld-mips-elf/multi-got-hidden-1.s,
3724 + ld-mips-elf/multi-got-hidden-2.d,
3725 + ld-mips-elf/multi-got-hidden-2.s: New.
3726 + * ld-mips-elf/mips-elf.exp: Run multi-got-hidden tests.
3728 +2007-10-01 Carlos O'Donell <carlos@codesourcery.com>
3732 + 2007-09-17 Alon Bar-Lev <alon.barlev@gmail.com>
3735 + * resrc.c: (read_rc_file): Move 'filename' default initialization
3736 + to start of function.
3738 +2007-09-28 Carlos O'Donell <carlos@codesourcery.com>
3742 + 2007-09-24 Carlos O'Donell <carlos@codesourcery.com>
3743 + * config/tc-mips.c (s_align): Set max_alignment to 28.
3745 + 2007-09-24 Carlos O'Donell <carlos@codesourcery.com>
3746 + * gas/mips/align.s, gas/mips/align.d: New test.
3747 + * gas/mips/mips.exp: Run it.
3749 +2007-09-25 Paul Brook <paul@codesourcery.com>
3752 + * config/tc-arm.c: Enforce register constraints on Thumb-1 add.
3755 + * gas/arm/t16-bad.s: Add low reg non flags setting add.
3756 + * gas/arm/t16-bad.l: Update expected output.
3757 + * gas/arm/archv6m.s: Add low reg non flags setting add.
3758 + * gas/arm/archv6m.d: Update expected output.
3760 +2007-09-24 Daniel Jacobowitz <dan@codesourcery.com>
3764 + 2007-09-24 Daniel Jacobowitz <dan@codesourcery.com>
3765 + * elf.c (assign_file_positions_for_load_sections): Trust
3767 + (copy_elf_program_header): Copy PT_NULL segments.
3769 +2007-09-24 Daniel Jacobowitz <dan@codesourcery.com>
3772 + * gas/mips/loongson-2f.d: Specify a 64-bit ABI.
3773 + * gas/mips/loongson-2e.d: Likewise.
3775 +2007-09-21 Joseph Myers <joseph@codesourcery.com>
3777 + * release-notes-csl.xml: Add release notes for GOT patch.
3780 + * ld-mips-elf/got-page-3.d: Assemble with -mips3.
3782 +2007-09-21 Joseph Myers <joseph@codesourcery.com>
3785 + <http://sourceware.org/ml/binutils/2007-09/msg00308.html>:
3788 + 2007-09-21 Richard Sandiford <rsandifo@nildram.co.uk>
3789 + * elfxx-mips.c (mips_got_page_range): New structure.
3790 + (mips_got_page_entry): Likewise.
3791 + (mips_got_info): Add page_gotno and got_page_entries fields.
3792 + (mips_elf_got_per_bfd_arg): Add max_pages field. Delete
3793 + primary_count and current_count fields.
3794 + (mips_got_page_entry_hash, mips_got_page_entry_eq): New functions.
3795 + (mips_elf_pages_for_range, mips_elf_record_got_page_entry): Likewise.
3796 + (mips_elf_get_got_for_bfd): New function, split out from
3797 + mips_elf_make_got_per_bfd. Initialize the page_gotno and
3798 + got_page_entries fields when creating a new GOT structure.
3799 + (mips_elf_make_got_pages_per_bfd): New function.
3800 + (mips_elf_merge_got_with): New function, split out from
3801 + mips_elf_make_got_per_bfd. Merge page entries as well as
3802 + non-page entries. Use the minimum of max_pages and the sum
3803 + of the page_gotnos to estimate the number of page entries.
3804 + (mips_elf_merge_gots): Use the minimum of max_pages and the
3805 + bfd's page_gotno to estimate the number of page entries.
3806 + Use the above functions.
3807 + (mips_elf_multi_got): Add page entries as well as non-page entries
3808 + to the individual per-bfd GOTs. Initialize got_per_bfd_arg.max_pages.
3809 + Initialize the page_gotno and got_page_entries fields when creating
3810 + a new primary GOT. Use the minimum of pages and page_gotno when
3811 + adding the number of pages entries to local_gotno.
3812 + (mips_elf_create_got_section): Initialize the page_gotno and
3813 + got_page_entries fields of the GOT structure.
3814 + (mips_elf_rel_relocation_p, mips_elf_read_rel_addend)
3815 + (mips_elf_add_lo16_rel_addend, mips_elf_get_section_contents): New
3816 + functions, split out from...
3817 + (_bfd_mips_elf_relocate_section): ...here.
3818 + (_bfd_mips_elf_check_relocs): Record GOT page entries too.
3819 + (_bfd_mips_relax_section): Use mips_elf_get_section_contents.
3820 + (_bfd_mips_elf_always_size_sections): Use the smaller of the
3821 + loadable_size- and page_gotno-derived estimates.
3824 + 2007-09-21 Richard Sandiford <rsandifo@nildram.co.uk>
3825 + Joseph Myers <joseph@codesourcery.com>
3826 + * ld-mips-elf/got-page-1.d, ld-mips-elf/got-page-1.s,
3827 + * ld-mips-elf/got-page-2.d, ld-mips-elf/got-page-2.s,
3828 + * ld-mips-elf/got-page-3.d, ld-mips-elf/got-page-3a.s,
3829 + * ld-mips-elf/got-page-3b.s, ld-mips-elf/got-page-3c.s,
3830 + * ld-mips-elf/got-page-1.ld: New tests.
3831 + * ld-mips-elf/mips-elf.exp: Run them.
3832 + * ld-mips-elf/multi-got-1.d, ld-mips-elf/multi-got-no-shared.d,
3833 + * ld-mips-elf/tls-hidden2-got.d, ld-mips-elf/tls-hidden2.d,
3834 + * ld-mips-elf/tls-hidden3.d, ld-mips-elf/tls-hidden3.got,
3835 + * ld-mips-elf/tls-hidden3.r, ld-mips-elf/tls-hidden4.got,
3836 + * ld-mips-elf/tls-hidden4.r, ld-mips-elf/tls-multi-got-1.d,
3837 + * ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1.r,
3838 + * ld-mips-elf/tlsbin-o32.d, ld-mips-elf/tlsbin-o32.got,
3839 + * ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got,
3840 + * ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got,
3841 + * ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got,
3842 + * ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got,
3843 + * ld-mips-elf/tlslib-o32-hidden.got, ld-mips-elf/tlslib-o32-ver.got,
3844 + * ld-mips-elf/tlslib-o32.d, ld-mips-elf/tlslib-o32.got: Update for
3845 + GOT allocation changes.
3847 +2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3850 + * ld-scripts/rgn-over.s: Use sections .txt and .dat.
3851 + * ld-scripts/rgn-over1.t, ld-scripts/rgn-over2.t,
3852 + ld-scripts/rgn-over3.t, ld-scripts/rgn-over4.t, ld-scripts/rgn-over5.t,
3853 + ld-scripts/rgn-over6.t, ld-scripts/rgn-over7.t: Discard other
3854 + sections. Handle changed names.
3855 + * ld-scripts/rgn-over1.d, ld-scripts/rgn-over2.d,
3856 + ld-scripts/rgn-over3.d, ld-scripts/rgn-over4.d, ld-scripts/rgn-over5.d,
3857 + ld-scripts/rgn-over6.d, ld-scripts/rgn-over7.d: Expect discarded
3858 + sections and changed names.
3860 +2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
3863 + * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make sure .got
3866 +2007-09-18 Maxim Kuvyrkov <maxim@codesourcery.com>
3868 + * release-notes-csl.xml (ColdFire 51QE support): New.
3870 +2007-09-07 Nathan Froyd <froydnj@codesourcery.com>
3873 + * config/tc-ppc.c (parse_cpu): Handle -mpmr option.
3875 +2007-08-31 Joseph Myers <joseph@codesourcery.com>
3878 + 2007-06-04 Joseph Myers <joseph@codesourcery.com>
3880 + * elflink.c (bfd_elf_link_record_dynamic_symbol): Do not set
3881 + dynindx for indirect symbols.
3883 +2007-08-30 Brooks Moses <brooks@codesourcery.com>
3885 + Add files missing from 2007-08-20 merge from FSF trunk:
3886 + * ld/emultempl/cr16elf.em: New.
3887 + * ld/testsuite/ld-elf/dl2a.list: New.
3888 + * ld/testsuite/ld-ia64/merge1.d: New.
3889 + * ld/testsuite/ld-ia64/merge1.s: New.
3890 + * ld/testsuite/ld-ia64/merge2.d: New.
3891 + * ld/testsuite/ld-ia64/merge2.s: New.
3892 + * ld/testsuite/ld-ia64/merge3.d: New.
3893 + * ld/testsuite/ld-ia64/merge3.s: New.
3894 + * ld/testsuite/ld-ia64/merge4.d: New.
3895 + * ld/testsuite/ld-ia64/merge4.s: New.
3896 + * ld/testsuite/ld-ia64/merge5.d: New.
3897 + * ld/testsuite/ld-ia64/merge5.s: New.
3898 + * ld/testsuite/ld-pe/secrel_64.d: New.
3900 + * lt~obsolete.m4: New.
3902 +2007-08-30 Daniel Jacobowitz <dan@codesourcery.com>
3905 + * ld-elf/weak-dyn-1.rd: Resolve merge conflict.
3907 +2007-08-29 Daniel Jacobowitz <dan@codesourcery.com>
3911 + 2007-08-29 Daniel Jacobowitz <dan@codesourcery.com>
3913 + * dwarf2dbg.c (dwarf2_directive_loc): Emit duplicate .loc directives.
3916 + * gas/lns/lns-duplicate.d, gas/lns/lns-duplicate.s: New.
3917 + * gas/lns/lns.exp: Run lns-duplicate.
3919 +2007-08-28 Mark Shinwell <shinwell@codesourcery.com>
3920 + Joseph Myers <joseph@codesourcery.com>
3923 + * ld-scripts/rgn-over1.d: Disallow space before "ld" at start of
3925 + * ld-scripts/rgn-over2.d: Likewise.
3926 + * ld-scripts/rgn-over3.d: Likewise.
3927 + * ld-scripts/rgn-over4.d: Likewise.
3928 + * ld-scripts/rgn-over5.d: Likewise.
3929 + * ld-scripts/rgn-over6.d: Likewise.
3930 + * ld-scripts/rgn-over7.d: Likewise.
3932 + Backport from FSF:
3935 + * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma,
3938 + binutils/testsuite/
3939 + * binutils-all/ar.exp (long_filenames): Delete temporary files on
3941 + * binutils-all/arm/objdump.exp: Only check "which $OBJDUMP" if
3943 + * binutils-all/objcopy.exp: Use ${srecfile} to get the name of the
3944 + srec file to be passed to binutils_run.
3945 + (objcopy_test_readelf): Use remote_exec.
3946 + * binutils-all/readelf.exp (readelf_find_size): Use remote_exec.
3947 + (readelf_test): Likewise.
3948 + (readelf_wi_test): Likewise.
3949 + * lib/utils-lib.exp (run_dump_test): Only check "which $binary" if
3950 + host is local. Use remote_exec. Use $tempfile not
3954 + * as.c (main): Flush stderr before printing listings to ensure
3955 + consistent output order across platforms.
3958 + * lib/gas-defs.exp (gas_version): Use remote_* functions instead
3960 + (gas_host_run): New.
3961 + (gas_run): Use gas_host_run.
3962 + (gas_start): Likewise.
3963 + (run_dump_test): Likewise.
3964 + (objdump): Use gas_host_run.
3965 + (objdump_start_no_subdir): Likewise.
3966 + * lib/gas-dg.exp (gas-dg-test): Use "remote_file host delete".
3967 + * lib/run: Remove.
3968 + * gas/macros/macros.exp: Download app4b.s to host.
3969 + * gas/i386/i386.exp (gas_64_check): Use gas_host_run.
3970 + (gas_32_check): Likewise.
3971 + * gas/maxq10/maxq10.exp (gas_64_check): Likewise
3972 + (gas_32_check): Likewise.
3973 + * gas/maxq20/maxq20.exp (gas_64_check): Likewise
3974 + (gas_32_check): Likewise.
3975 + * gas/sparc/sparc.exp (gas_64_check): Likewise.
3976 + * gas/cfi/cfi.exp: Likewise.
3977 + * gas/elf/elf.exp (run_list_test): Likewise. Use temporary file
3978 + for readelf output in place of pipe.
3979 + * gas/all/gas.exp: Download incbin.dat to host.
3980 + (do_comment): Allow \r\r\n.
3983 + * ldlang.c (sort_sections_by_lma): Sort by internal id after lma
3987 + * ld-elfcomm/elfcomm.exp: Use run_host_cmd. Only check "which
3988 + $CC" if host is local.
3989 + * ld-checks/checks.exp: Use run_host_cmd.
3990 + * ld-elf/exclude.exp: Likewise.
3991 + * ld-elf/elf.exp: Download merge.ld if host is remote.
3992 + * ld-elf/binutils.exp (binutils_test): Use remote_exec.
3993 + * ld-elf/tls_common.exp: Use run_host_cmd.
3994 + * lib/ld-lib.exp (ld_version): Only check "which $ld" if host is
3995 + local. Use remote_exec.
3996 + (run_host_cmd): New.
3997 + (run_host_cmd_yesno): New.
3998 + (default_ld_relocate): Use run_host_cmd_yesno.
3999 + (default_ld_link): Likewise.
4000 + (default_ld_simple_link): Use run_host_cmd.
4001 + (default_ld_compile): Only check "which $ccprog" if host is local.
4002 + Use remote_file and remote_exec.
4003 + (default_ld_assemble): Only check "which $as" if host is local.
4005 + (default_ld_nm): Use remote_exec, remote_upload and remote_file.
4006 + (run_dump_test): Use remote_exec, remote_upload and remote_file.
4007 + Only check "which $binary" if host is local.
4008 + (run_ld_link_tests): Use remote_exec, remote_upload and
4010 + * ld-selective/selective.exp: Only check "which $CXX" if host is
4011 + local. Use remote_exec.
4012 + * ld-scripts/phdrs.exp: Only check "which $objdump" if host is
4013 + local. Use run_host_cmd.
4014 + * ld-scripts/phdrs2.exp: Likewise.
4015 + * ld-scripts/weak.exp: Likewise.
4016 + * ld-undefined/weak-undef.exp: Likewise.
4017 + * ld-scripts/crossref.exp: Only check "which $CC" if host is local.
4019 + * ld-scripts/map-address.exp: Upload map_address.map if host is
4021 + * ld-srec/srec.exp (run_srec_tests): Use run_host_cmd. Only check
4022 + "which $CC" and "which $CXX" if host is local.
4023 + * ld-undefined/undefined.exp: Only check "which $CC" if host is
4024 + local. Use remote_file and run_host_cmd.
4025 + * config/default.exp: Use remote_exec to create tmpdir.
4027 +2007-08-28 Nathan Sidwell <nathan@codesourcery.com>
4030 + * config/tc-m68k.c (m68k_ip): Add mcfisa_c case.
4031 + (m68k_elf_final_processing): Add EF_M68K_CF_ISA_C_NODIV.
4034 + * m68k.h (EF_M68K_CF_ISA_C_NODIV): New.
4037 + * elf32-m68k.c (elf32_m68k_object_p): Add EF_M68K_CF_ISA_C_NODIV.
4038 + (elf32_m68k_print_private_bfd_data): Likewise.
4040 +2007-08-25 Mark Shinwell <shinwell@codesourcery.com>
4042 + Add files missing from previous commit:
4044 + * gas/mips/loongson-2e.d: New.
4045 + * gas/mips/loongson-2e.s: New.
4046 + * gas/mips/loongson-2f.d: New.
4047 + * gas/mips/loongson-2f.s: New.
4049 +2007-08-25 Mark Shinwell <shinwell@codesourcery.com>
4051 + * release-notes-csl.xml
4052 + (Loongson-2E and Loongson-2F processor support): New.
4054 +2007-08-25 Mark Shinwell <shinwell@codesourcery.com>
4057 + * archures.c (bfd_mach_mips_loongson_2e): New.
4058 + (bfd_mach_mips_loongson_2f): New.
4059 + * bfd-in2.h (bfd_mach_mips_loongson_2e): New.
4060 + (bfd_mach_mips_loongson_2f): New.
4061 + * cpu-mips.c: Add I_loongson_2e and I_loongson_2f to
4063 + (arch_info_struct): Add Loongson-2E and Loongson-2F entries.
4064 + * elfxx-mips.c (_bfd_elf_mips_mach): Handle Loongson-2E
4065 + and Loongson-2F flags.
4066 + (mips_set_isa_flags): Likewise.
4067 + (mips_mach_extensions): Add Loongson-2E and Loongson-2F
4071 + * readelf.c (get_machine_flags): Handle Loongson-2E and -2F
4075 + * config/tc-mips.c (mips_cpu_info_table): Add loongson2e
4076 + and loongson2f entries.
4077 + * doc/c-mips.texi: Document -march=loongson{2e,2f} options.
4080 + * gas/mips/mips.exp: Add loongson-2e and -2f tests.
4081 + * gas/mips/loongson-2e.d: New.
4082 + * gas/mips/loongson-2e.s: New.
4083 + * gas/mips/loongson-2f.d: New.
4084 + * gas/mips/loongson-2f.s: New.
4087 + * mips.h (E_MIPS_MACH_LS2E): New.
4088 + (E_MIPS_MACH_LS2F): New.
4091 + * mips.h (INSN_LOONGSON_2E): New.
4092 + (INSN_LOONGSON_2F): New.
4093 + (CPU_LOONGSON_2E): New.
4094 + (CPU_LOONGSON_2F): New.
4095 + (OPCODE_IS_MEMBER): Update for Loongson-2E and -2F flags.
4098 + * mips-dis.c (mips_arch_choices): Add Loongson-2E and -2F
4100 + * mips-opc.c (IL2E): New.
4102 + (mips_builtin_opcodes): Add Loongson-2E and -2F instructions.
4103 + Allow movz and movn for Loongson-2E and -2F. Add movnz entry.
4104 + Move coprocessor encodings to the end of the table. Allow
4105 + certain MIPS V .ps instructions on the Loongson-2E and -2F.
4107 +2007-08-24 Maxim Kuvyrkov <maxim@codesourcery.com>
4109 + Rename 51QE to 51qe.
4113 + * gas/config/tc-m68k.c (mcf51QE_ctrl): Rename to mcf51qe_ctrl.
4114 + (m68k_cpus): Update.
4116 +2007-08-24 Mark Shinwell <shinwell@codesourcery.com>
4119 + * mips.h (INSN_ISA*): Redefine certain values as an
4120 + enumeration. Update comments.
4121 + (mips_isa_table): New.
4122 + (ISA_MIPS*): Redefine to match enumeration.
4123 + (OPCODE_IS_MEMBER): Modify to correctly test new INSN_ISA*
4127 + * mips-opc.c (I3_32, I3_33, I4_32, I4_33, I5_33): New.
4128 + (mips_builtin_opcodes): Use these new I* values.
4130 +2007-08-23 Nathan Sidwell <nathan@codesourcery.com>
4133 + * archures.c: Add bfd_mach_mcf_isa_c_nodiv,
4134 + bfd_mach_mcf_isa_c_nodiv_mac & bfd_mach_mcf_isa_c_nodiv_emac.
4135 + * bfd/ieee.c (ieee_write_processor): Update coldfire architecture
4137 + * bfd-in2.h: Rebuilt.
4138 + * cpu-m68k.c (arch_info_struct): Add isa_c nodiv architectures.
4139 + (m68k_arch_features): Likewise.
4141 +2007-08-22 Daniel Jacobowitz <dan@codesourcery.com>
4143 + * release-notes-csl.xml: Mention GDB support for MIPS -msoft-float
4146 +2007-08-21 Maxim Kuvyrkov <maxim@codesourcery.com>
4148 + Add ColdFire V1 devices.
4152 + * config/tc-m68k.c (mcf51QE_ctrl): Define 51QE control registers.
4153 + (m68k_cpus): Define 51QE cpu.
4155 +2007-08-20 Brooks Moses <brooks@codesourcery.com>
4157 + Merged from //mirrors/binutils/trunk revision 179541.
4159 +2007-08-16 Daniel Jacobowitz <dan@codesourcery.com>
4161 + * release-notes-csl.xml: Mention MIPS linker warnings.
4163 +2007-08-16 Daniel Jacobowitz <dan@codesourcery.com>
4166 + * ld-powerpc/attr-gnu-8-31.d, ld-powerpc/attr-gnu-8-1.s,
4167 + ld-powerpc/attr-gnu-8-11.d, ld-powerpc/attr-gnu-8-3.s: New.
4170 + * ppc.h (Tag_GNU_Power_ABI_Vector): New.
4173 + * readelf.c (display_power_gnu_attribute): Handle
4174 + Tag_GNU_Power_ABI_Vector.
4177 + * elf32-ppc.c (ppc_elf_merge_obj_attributes): Handle
4178 + Tag_GNU_Power_ABI_Vector.
4180 +2007-08-11 Richard Sandiford <richard@codesourcery.com>
4182 + Backport from mainline:
4185 + 2007-08-11 Richard Sandiford <richard@codesourcery.com>
4187 + * config.bfd (sh-*-vxworks): Define targ_underscore to "yes".
4189 +2007-08-09 Paul Brook <paul@codesourcery.com>
4191 + Backport from FSF.
4193 + * config/tc-arm.c (relaxed_symbol_addr): Compensate for alignment.
4196 + * gas/arm/relax_load_align.d: new test.
4197 + * gas/arm/relax_load_align.s: new test.
4199 +2007-08-07 Kazu Hirata <kazu@codesourcery.com>
4201 + Backport from mainline:
4203 + 2007-05-17 Paul Brook <paul@codesourcery.com>
4204 + * ld-elf/multibss1.s: Use %nobits instead of @nobits.
4206 +2007-08-03 Daniel Jacobowitz <dan@codesourcery.com>
4208 + Backport from mainline:
4210 + 2007-08-03 Daniel Jacobowitz <dan@codesourcery.com>
4211 + * ld-srec/srec.exp: XFAIL for powerpc*-*-*.
4213 +2007-07-23 Richard Sandiford <richard@codesourcery.com>
4215 + Backport from mainline:
4218 + 2007-07-23 Richard Sandiford <richard@codesourcery.com>
4220 + * elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
4221 + of weakdef->root.type if weakdef has no regular definition.
4224 + 2007-07-23 Richard Sandiford <richard@codesourcery.com>
4226 + * ld-elf/weak-dyn-1a.s, ld-elf/weak-dyn-1b.s, ld-elf/weak-dyn-1.ld,
4227 + * ld-elf/weak-dyn-1.rd: New test.
4228 + * ld-elf/elf.exp: Run it.
4230 +2007-07-18 Zack Weinberg <zack@codesourcery.com>
4234 + * ldlang.c (lang_check_section_addresses): Also report size of
4235 + overflow for any overflowed memory regions.
4236 + (os_region_check): Diagnose an overflowed region only once per
4237 + region. Do not reset region->current on overflow.
4240 + * ld-scripts/rgn-over.exp: New driver.
4241 + * ld-scripts/rgn-over.s: New file.
4242 + * ld-scripts/rgn-over1.d, ld-scripts/rgn-over1.t
4243 + * ld-scripts/rgn-over2.d, ld-scripts/rgn-over2.t
4244 + * ld-scripts/rgn-over3.d, ld-scripts/rgn-over3.t
4245 + * ld-scripts/rgn-over4.d, ld-scripts/rgn-over4.t
4246 + * ld-scripts/rgn-over5.d, ld-scripts/rgn-over5.t
4247 + * ld-scripts/rgn-over6.d, ld-scripts/rgn-over6.t
4248 + * ld-scripts/rgn-over7.d, ld-scripts/rgn-over7.t:
4251 +2007-07-13 Nathan Sidwell <nathan@codesourcery.com>
4254 + * ld-scripts/assert.t: Tweak to avoid relying on empty's VMA being
4257 +2007-07-12 Nathan Sidwell <nathan@codesourcery.com>
4261 + * scripttempl/pe.sc: Don't include .gcc_except_table and
4262 + .eh_frame on partial links.
4264 +2007-07-09 Nathan Sidwell <nathan@codesourcery.com>
4268 + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
4269 + copy relocs on vxworks.
4271 +2007-07-05 Kazu Hirata <kazu@codesourcery.com>
4275 + * config/m68k-parse.h (m68k_register): Use MBO instead of MBB.
4276 + (last_movec_reg): Change to MBO.
4277 + * config/tc-m68k.c (fido_ctrl): Use MBO instead of MBB.
4278 + (m68k_ip): Use MBO instead of MBO.
4279 + (init_table): Use MBO instead of MBO. Add an entry for mbo.
4282 + * gas/m68k/fido.s: Add tests for %mbo.
4283 + * gas/m68k/fido.d: Update accordingly.
4286 + * m68k-dis.c (print_insn_arg): Use %mbo instead of %mbb.
4288 + * release-notes-csl.xml: Add a note for the addition of %mbo.
4290 +2007-07-05 Nathan Sidwell <nathan@codesourcery.com>
4292 + * opcodes/ppc-opc (PPC7450): New.
4293 + (powerpc_opcodes): Use it in dcba.
4295 +2007-07-04 Richard Sandiford <richard@codesourcery.com>
4298 + * config/tc-mips.c (mips_cpu_info_table): Add 74kf3_2.
4299 + * doc/c-mips.texi: Document it.
4301 +2007-07-04 Richard Sandiford <richard@codesourcery.com>
4304 + * config/tc-mips.c (mips_cpu_info_table): Add new entries for
4305 + {24k,24ke,34k,74k}f{2_1,1_1,x}.
4306 + * doc/c-mips.texi: Document them.
4308 +2007-07-03 Joseph Myers <joseph@codesourcery.com>
4310 + Backport from FSF:
4313 + * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
4314 + input attributes if value has been copied.
4317 + * ld-arm/attr-merge-2a.s, ld-arm/attr-merge-2b.s,
4318 + ld-arm/attr-merge-2.attr: New.
4319 + * ld-arm/arm-elf.exp (armelftests): Add new test.
4321 +2007-07-02 Nathan Froyd <froydnj@codesourcery.com>
4323 + Backport from FSF:
4326 + * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
4329 +2007-07-02 Paul Brook <paul@codesourcery.com>
4331 + Backport from FSF.
4333 + * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
4334 + call veneers for call relocations against undefined symbols.
4335 + (elf32_arm_final_link_relocate): Turn call to undefined symbol
4336 + into a jump to the next instruction.
4339 + * ld-arm/arm-elf.exp (armelftests): Add callweak.
4340 + * ld-arm/callweak.d: New test.
4341 + * ld-arm/callweak.s: New test.
4343 +2007-07-02 Joseph Myers <joseph@codesourcery.com>
4345 + Backport from FSF:
4348 + * elfxx-mips.c (mips_elf_calculate_relocation): Handle
4349 + R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
4350 + * elf64-mips.c (mips_elf64_howto_table_rela): Support
4351 + R_MIPS_TLS_DTPREL64.
4354 + * config/tc-mips.c (s_dtprelword, s_dtpreldword,
4355 + s_dtprel_internal): New.
4356 + (mips_pseudo_table): Add .dtprelword and .dtpreldword.
4357 + (md_apply_fix): Handle BFD_RELOC_MIPS_TLS_DTPREL32 and
4358 + BFD_RELOC_MIPS_TLS_DTPREL64.
4360 +2007-06-29 Joseph Myers <joseph@codesourcery.com>
4362 + Backport from FSF:
4365 + * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
4366 + (ppc_elf_merge_private_bfd_data): Call it.
4369 + * readelf.c (display_power_gnu_attribute, process_power_specific):
4371 + (process_arch_specific): Call process_power_specific.
4374 + * ppc.h (Tag_GNU_Power_ABI_FP): Define.
4377 + * ld-powerpc/attr-gnu-4-0.s, ld-powerpc/attr-gnu-4-00.d,
4378 + ld-powerpc/attr-gnu-4-01.d, ld-powerpc/attr-gnu-4-02.d,
4379 + ld-powerpc/attr-gnu-4-1.s, ld-powerpc/attr-gnu-4-10.d,
4380 + ld-powerpc/attr-gnu-4-11.d, ld-powerpc/attr-gnu-4-12.d,
4381 + ld-powerpc/attr-gnu-4-13.d, ld-powerpc/attr-gnu-4-2.s,
4382 + ld-powerpc/attr-gnu-4-20.d, ld-powerpc/attr-gnu-4-21.d,
4383 + ld-powerpc/attr-gnu-4-22.d, ld-powerpc/attr-gnu-4-3.s,
4384 + ld-powerpc/attr-gnu-4-31.d: New.
4385 + * ld-powerpc/powerpc.exp: Run these new tests.
4387 +2007-06-29 Joseph Myers <joseph@codesourcery.com>
4389 + Backport from FSF:
4392 + * as.c (main): Only call create_obj_attrs_section if IS_ELF.
4394 +2007-06-29 Joseph Myers <joseph@codesourcery.com>
4396 + Backport from FSF:
4399 + * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
4400 + (_bfd_mips_elf_merge_private_bfd_data): Call it.
4403 + * readelf.c (display_mips_gnu_attribute): New.
4404 + (process_mips_specific): Call process_attributes.
4407 + * mips.h (Tag_GNU_MIPS_ABI_FP): Define.
4410 + * ld-mips-elf/attr-gnu-4-0.s, ld-mips-elf/attr-gnu-4-00.d,
4411 + ld-mips-elf/attr-gnu-4-01.d, ld-mips-elf/attr-gnu-4-02.d,
4412 + ld-mips-elf/attr-gnu-4-03.d, ld-mips-elf/attr-gnu-4-1.s,
4413 + ld-mips-elf/attr-gnu-4-10.d, ld-mips-elf/attr-gnu-4-11.d,
4414 + ld-mips-elf/attr-gnu-4-12.d, ld-mips-elf/attr-gnu-4-13.d,
4415 + ld-mips-elf/attr-gnu-4-14.d, ld-mips-elf/attr-gnu-4-2.s,
4416 + ld-mips-elf/attr-gnu-4-20.d, ld-mips-elf/attr-gnu-4-21.d,
4417 + ld-mips-elf/attr-gnu-4-22.d, ld-mips-elf/attr-gnu-4-23.d,
4418 + ld-mips-elf/attr-gnu-4-3.s, ld-mips-elf/attr-gnu-4-30.d,
4419 + ld-mips-elf/attr-gnu-4-31.d, ld-mips-elf/attr-gnu-4-32.d,
4420 + ld-mips-elf/attr-gnu-4-33.d, ld-mips-elf/attr-gnu-4-4.s,
4421 + ld-mips-elf/attr-gnu-4-41.d: New.
4422 + * ld-mips-elf/mips-elf.exp: Run these new tests.
4424 +2007-06-29 Joseph Myers <joseph@codesourcery.com>
4426 + Backport from FSF:
4429 + * elf-attrs.c: New.
4430 + * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
4431 + (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
4432 + (elf-attrs.lo): Generate dependencies.
4433 + * Makefile.in: Regenerate.
4434 + * configure.in (elf): Add elf-attrs.lo.
4435 + * configure: Regenerate.
4436 + * elf-bfd.h (struct elf_backend_data): Add entries for object
4438 + (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
4439 + OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
4440 + Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
4442 + (struct elf_obj_tdata): Add entries for object attributes.
4443 + (elf_known_obj_attributes, elf_other_obj_attributes,
4444 + elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
4446 + (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
4447 + bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
4448 + bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
4449 + bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
4450 + bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
4451 + _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
4452 + _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
4453 + * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
4454 + (bfd_section_from_shdr): Handle attributes sections.
4455 + * elflink.c (bfd_elf_final_link): Handle attributes sections.
4456 + * elfxx-target.h (elf_backend_obj_attrs_vendor,
4457 + elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
4458 + elf_backend_obj_attrs_section_type): New.
4459 + (elfNN_bed): Update.
4460 + * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
4461 + aeabi_attribute_list): Remove.
4462 + (struct elf32_arm_obj_tdata): Remove object attributes fields.
4463 + (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
4464 + elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
4465 + Update for new object attributes interfaces.
4466 + (uleb128_size, is_default_attr, eabi_attr_size,
4467 + elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
4468 + elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
4469 + elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
4470 + elf32_arm_add_eabi_attr_int, attr_strdup,
4471 + elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
4472 + copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved
4473 + to generic code in elf-attrs.c.
4474 + (elf32_arm_obj_attrs_arg_type): New.
4475 + (elf32_arm_fake_sections): Do not handle .ARM.attributes.
4476 + (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
4477 + (bfd_elf32_bfd_final_link): Remove.
4478 + (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
4479 + elf_backend_obj_attrs_arg_type,
4480 + elf_backend_obj_attrs_section_type): New.
4481 + * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
4483 + * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
4484 + * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
4485 + * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
4486 + * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
4487 + * elf32-sh.c (sh_elf_copy_private_data): Likewise.
4488 + * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
4491 + * readelf.c (display_gnu_attribute): New.
4492 + (process_arm_specific): Rearrange as process_attributes.
4493 + (process_arm_specific): Replace by wrapper of process_attributes.
4496 + * as.c (create_obj_attrs_section): New.
4497 + (main): Call create_obj_attrs_section for ELF.
4498 + * read.c (s_gnu_attribute, skip_whitespace, skip_past_char,
4499 + skip_past_comma, s_vendor_attribute): New.
4500 + (potable): Add gnu_attribute for ELF.
4501 + * read.h (s_vendor_attribute): Declare.
4502 + * config/tc-arm.c (s_arm_eabi_attribute): Replace by wrapper
4503 + round s_vendor_attribute.
4504 + (aeabi_set_public_attributes): Update for new attributes
4506 + (arm_md_end): Remove attributes contents setting now done
4510 + * arm.h (elf32_arm_add_eabi_attr_int,
4511 + elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
4512 + elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
4513 + elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
4514 + Tag_Symbol, Tag_compatibility): Remove.
4515 + * common.h (SHT_GNU_ATTRIBUTES): Define.
4518 + * emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
4519 + (ATTRS_SECTIONS): Define.
4520 + * scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
4521 + scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
4522 + scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
4524 +2007-06-26 Paul Brook <paul@codesourcery.com>
4527 + * config/tc-arm.c (parse_operands): Accept generic coprocessor regs
4529 + (reg_names): Add fpinst, pfinst2, mvfr0 and mvfr1.
4532 + * gas/arm/vfp1xD.d: Add new fmrx/fmxr tests.
4533 + * gas/arm/vfp1xD.s: Ditto.
4534 + * gas/arm/vfp1xD_t2.d: Ditto.
4535 + * gas/arm/vfp1xD_t2.s: Ditto.
4538 + * arm-dis.c (coprocessor_opcodes): Add fmxr/fmrx mvfr0/mvfr1.
4540 +2007-06-26 Joseph Myers <joseph@codesourcery.com>
4542 + * release-notes-csl.xml: Add release notes for attribute merging
4545 +2007-06-26 Joseph Myers <joseph@codesourcery.com>
4548 + * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
4551 + * ld-arm/attr-merge.s, ld-arm/attr-merge.attr: New.
4552 + * ld-arm/arm-elf.exp (armelftests): Add new test.
4554 +2007-06-25 Paul Brook <paul@codesourcery.com>
4557 + * config/tc-arm.c (do_t_mov_cmp): Handle shift by register and
4558 + narrow shift by immediate.
4561 + * gas/arm/thumb32.s: Add tests for shift instructions.
4562 + * gas/arm/thumb32.d: Ditto.
4564 +2007-06-25 Richard Sandiford <richard@codesourcery.com>
4566 + Backport from mainline:
4569 + 2007-06-25 Richard Sandiford <richard@codesourcery.com>
4571 + * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
4572 + to be used for calls from MIPS16 code.
4575 + 2007-06-25 Richard Sandiford <richard@codesourcery.com>
4577 + * config/tc-mips.h (TC_SYMFIELD_TYPE): New.
4578 + * config/tc-mips.c (append_insn): Record which symbols have
4579 + R_MIPS16_26 relocations against them.
4580 + (mips_fix_adjustable): Don't reduce relocations against such symbols.
4583 + 2007-06-25 Richard Sandiford <richard@codesourcery.com>
4585 + * ld-mips-elf/mips16-local-stubs-1.s,
4586 + * ld-mips-elf/mips16-local-stubs-1.d: New tests.
4587 + * ld-mips-elf/mips-elf.exp: Run them.
4589 +2007-06-18 Nathan Sidwell <nathan@codesourcery.com>
4593 + * gas/m68k/mcf-coproc.d: New.
4594 + * gas/m68k/mcf-coproc.s: New.
4595 + * gas/m68k/all.exp: Add it.
4598 + * config/tc-m68k.c (m68k_ip): Add j & K operand types.
4599 + (install_operand): Add E encoding.
4600 + (md_begin): Check and skip initial '.' arg character.
4601 + (get_num): Add 0..511 case.
4604 + * opcode/m68k.h: Document j K & E.
4607 + * m68k-dis.c (fetch_arg): Add E. Replace length switch with
4609 + (print_ins_arg): Add j & K operand types.
4610 + (match_insn_m68k): Check and skip initial '.' arg character.
4611 + (m68k_scan_mask): Likewise.
4612 + * m68k-opc.c (m68k_opcodes): Add coprocessor instructions.
4614 +2007-06-14 Nathan Sidwell <nathan@codesourcery.com>
4617 + * config/tc-m68k.c (mcf52235_ctrl): Add cache registers.
4618 + (mcf5253_ctrl): Add RAMBAR, MBAR, MBAR2.
4619 + (mcf5407_ctrl): New.
4620 + (m68k_cpus): Adjust 5407 entry.
4622 +2007-06-13 Joseph Myers <joseph@codesourcery.com>
4625 + * config.in: Regenerate.
4626 + * ld.h (args_type): Add poison_system_directories.
4627 + * ld.texinfo (--no-poison-system-directories): Document.
4628 + * ldfile.c (ldfile_add_library_path): Check
4629 + command_line.poison_system_directories.
4630 + * ldmain.c (main): Initialize
4631 + command_line.poison_system_directories.
4632 + * lexsup.c (enum option_values): Add
4633 + OPTION_NO_POISON_SYSTEM_DIRECTORIES.
4634 + (ld_options): Add --no-poison-system-directories.
4635 + (parse_args): Handle new option.
4637 +2007-06-13 Nathan Sidwell <nathan@codesourcery.com>
4640 + * ldexp.c (foldname): ALIGNOF should not be divided by opb.
4642 +2007-06-11 Julian Brown <julian@codesourcery.com>
4645 + * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4646 + EXEC_P or DYNAMIC flags, and skip sections which are being linked
4647 + with --just-symbols (-R).
4649 +2007-06-11 Nathan Sidwell <nathan@codesourcery.com>
4652 + * dwarf.c (decode_location_expression): Add DW_OP_form_tls_address.
4655 + * ldlex.l, ldgram.y: Add ALIGNOF.
4656 + * ldexp.c (exp_print_token, foldname): Likewise.
4657 + * ld.texinfo: Likewise.
4660 + * ld-scripts/alignof.s: New.
4661 + * ld-scripts/alignof.t: New
4662 + * ld-scripts/alignof.exp: New.
4664 +2007-06-06 Paul Brook <paul@codesourcery.com>
4666 + Backport from FSF.
4668 + * config/tc-arm.c (s_align): Pad code sections appropriately.
4671 + * gas/arm/thumb.d: Update expected output.
4672 + * gas/arm/thumb2_relax.d: Ditto.
4674 +2007-06-06 Joseph Myers <joseph@codesourcery.com>
4675 + Paul Brook <paul@codesourcery.com>
4679 + * as.h (remap_debug_filename, add_debug_prefix_map): Declare.
4680 + * as.c (show_usage): Document --debug-prefix-map option.
4681 + (parse_args): Handle --debug-prefix-map.
4682 + * dwarf2dbg.c (out_file_list, out_debug_info): Remap debug paths.
4683 + * stabs.c (stabs_generate_asm_file): Remap debug paths.
4684 + * Makefile.am (GAS_CFILES): Add remap.c
4685 + (GENERIC_OBJS): Add remap.o.
4686 + * Makefile.in: Regenerate.
4687 + * doc/as.texinfo (--debug-prefix-map): Document.
4689 +2007-06-05 Paul Brook <paul@codesourcery.com>
4691 + Backport from FSF.
4693 + * config/tc-arm.c (insns): Correct Thumb-2 ldrd/strd opcodes.
4696 + * gas/arm/thumb32.d: Add writeback addressing mode tests.
4697 + * gas/arm/thumb32.s: Update expected output.
4700 + * arm-dis.c (thumb32_opcodes): Display writeback ldrd/strd addresses.
4702 +2007-06-04 Joseph Myers <joseph@codesourcery.com>
4705 + * elflink.c (bfd_elf_link_record_dynamic_symbol): Do not set
4706 + dynindx for indirect symbols.
4708 +2007-05-31 Paul Brook <paul@codesourcery.com>
4710 + Backport from FSF.
4712 + * config/tc-arm.c (insns): Allow strex on M profile cores.
4714 +2007-05-27 Nathan Sidwell <nathan@codesourcery.com>
4718 + * app.c (do_scrub_chars): Cope with \ at end of buffer.
4720 + * release-notes-csl.xml: Document fix.
4722 +2007-03-25 Paul Brook <paul@codesourcery.com>
4724 + Backport from FSF.
4726 + * config/tc-arm.c (T2_SUBS_PC_LR): Define.
4727 + (do_t_add_sub): Correctly encode subs pc, lr, #const.
4728 + (do_t_mov_cmp): Correctly encode movs pc, lr.
4731 + * gas/arm/thumb32.s: Add tests for subs pc, lr.
4732 + * gas/arm/thumb32.d: Change error-output: to stderr:.
4733 + Update expected output.
4735 +2007-05-24 Nathan Sidwell <nathan@codesourcery.com>
4738 + * ldlex.l: ASSERT is recognized in SCRIPT env. NAMES cannot
4739 + contain commas in EXP env.
4740 + * ldgram.y (extern_name_list): Push to EXP env, move body to ...
4741 + (extern_name_list_body): ... here.
4742 + (script_file, ifile_list): Reformat.
4743 + (statement): Add ASSERT.
4746 + * ld/ld-scripts/assert.t: Add additional cases.
4747 + * ld-scripts/extern.t, ld-scripts/extern.s,
4748 + ld-scripts/extern.exp: New.
4750 +2007-05-22 Paul Brook <paul@codesourcery.com>
4752 + Backport from FSF.
4754 + * ld-arm/arm-pic-veneer.d: Update expected output.
4755 + * ld-arm/arm-call.d: Ditto.
4758 + * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
4759 + with sec and sec_shndx.
4760 + (elf32_arm_ouput_plt_map_sym): Use them.
4761 + (elf32_arm_output_arch_local_syms): Output mapping symbols for
4762 + interworking glue.
4764 +2007-05-22 Paul Brook <paul@codesourcery.com>
4766 + Backport from FSF.
4768 + * objdump.c (find_symbol_for_address): Merge section and target
4769 + specific filtering code.
4772 + * ld-arm-mixed-lib.d: Update expected output.
4773 + * ld-arm/arm-app.d: Ditto.
4774 + * ld-arm/mixed-app.d: Ditto.
4775 + * ld-arm/arm-lib-plt32.d: Ditto.
4776 + * ld-arm/arm-app-abs32.d: Ditto.
4777 + * ld-arm/mixed-app-v5.d: Ditto.
4778 + * ld-arm/armthumb-lib.d: Ditto.
4779 + * ld-arm/arm-lib.d: Ditto.
4782 + * gas/arm/backslash-at.d: Update expected output.
4784 +2007-05-21 Richard Sandiford <richard@codesourcery.com>
4786 + Backport from mainline:
4789 + 2007-05-21 Richard Sandiford <richard@codesourcery.com>
4791 + * objdump.c (disassemble_bytes): Ignore disassembler_needs_relocs
4792 + for executables and shared libraries.
4795 + 2007-05-21 Richard Sandiford <richard@codesourcery.com>
4797 + * ld-arm/emit-relocs1.d, ld-arm/emit-relocs1.s,
4798 + * ld-arm/emit-relocs1-vxworks.d: New tests.
4799 + * ld-arm/arm-elf.exp: Run them.
4800 + * ld-arm/vxworks1.dd: Expect proper branch targets.
4802 +2007-05-18 Nathan Sidwell <nathan@codesourcery.com>
4805 + * config/tc-m68k.c (LONG_BRANCH_VIA_COND): New.
4806 + (BRANCHBWPL, FRAG_VAR_SIZE): New.
4807 + (md_relax_table): Add BRANCHBWPL entries.
4808 + (m68k_ip): Choose BRANCHBWPL relaxation if necessary.
4809 + (md_assemble): Use FRAG_VAR_SIZE.
4810 + (md_convert_frag_1): Add BRANCHBWPL cases.
4811 + (md_estimate_size_before_relaz): Likewise.
4814 + * gas/m68k/br-isaa.d: Dump relocs too.
4815 + * gas/m68k/br-isab.d: Likewise.
4816 + * gas/m68k/br-isac.d: Likewise. Adjust for long branch relaxation.
4818 +2007-05-18 Joseph Myers <joseph@codesourcery.com>
4820 + * release-notes-csl.xml: Add release notes for .set change.
4822 +2007-05-18 Joseph Myers <joseph@codesourcery.com>
4825 + * ld-elf/group.ld: Discard .reginfo.
4827 +2007-05-18 Joseph Myers <joseph@codesourcery.com>
4830 + * config/tc-mips.c (s_mipsset): Use generic s_set for directives
4831 + containing a comma.
4833 +2007-05-18 Richard Sandiford <richard@codesourcery.com>
4835 + Backport from mainline:
4838 + 2007-05-18 Richard Sandiford <richard@codesourcery.com>
4840 + * emulparams/elf32ebmipvxworks.sh (OTHER_READONLY_SECTIONS)
4841 + (OTHER_READWRITE_SECTIONS): Define. Add .rdata sections.
4843 +2007-05-18 Paul Brook <paul@codesourcery.com>
4845 + Backport from FSF:
4847 + * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
4848 + (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
4849 + (record_arm_to_thumb_glue): Add v5t non-pic glue.
4850 + (elf32_arm_create_thumb_stub): Ditto.
4853 + * ld-arm/arm-call.d: Update expected output.
4855 +2007-05-16 Paul Brook <paul@codesourcery.com>
4858 + * elf32-arm.c (elf32_arm_link_hash_entry): Add
4859 + plt_maybe_thumb_refcount.
4860 + (elf32_arm_link_hash_newfunc): Set plt_maybe_thumb_refcount.
4861 + (elf32_arm_copy_indirect_symbol): Ditto.
4862 + (elf32_arm_adjust_dynamic_symbol): Ditto.
4863 + (bfd_elf32_arm_process_before_allocation): Handle R_ARM_THM_JUMP24.
4864 + (arm_add_to_rel): Ditto.
4865 + (elf32_arm_final_link_relocate): Merge R_ARM_THM_JUMP24 with
4866 + R_ARM_THM_CALL. Handle R_ARM_THM_JUMP19 against a PLT stub.
4867 + (elf32_arm_gc_sweep_hook): Call check_use_blx. Update plt counts
4868 + for R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19.
4869 + (elf32_arm_check_relocs): Update plt counts for R_ARM_THM_JUMP24
4870 + and R_ARM_THM_JUMP19.
4871 + (allocate_dynrelocs): Use plt_maybe_thumb_refcount.
4872 + (elf32_arm_finish_dynamic_symbol): Ditto.
4873 + (elf32_arm_output_plt_map): Ditto.
4875 +2007-05-16 Paul Brook <paul@codesourcery.com>
4877 + * config/tc-arm.c (v7m_psrs): Add uppercase PSR names and xpsr.
4879 +2007-05-16 Joseph Myers <joseph@codesourcery.com>
4881 + binutils/testsuite/
4882 + * binutils-all/strip-3.d: Strip .pdr section.
4884 +2007-05-16 Nathan Sidwell <nathan@codesourcery.com>
4887 + * ld-m68k-merge-error-1a.d: Mismatch is an error.
4888 + * ld-m68k-merge-error-1b.d: Likewise.
4889 + * ld-m68k-merge-error-1c.d: Likewise.
4890 + * ld-m68k-merge-error-1d.d: Likewise.
4891 + * ld-m68k-merge-error-1e.d: Likewise.
4894 + * config/tc-m68k.c (md_apply_fix): Show value of out of range
4895 + fixups in error message.
4896 + (md_conver_frag_1): Propagate the fix source location and use
4897 + as_bad_where rather than fatal, for better error messages.
4899 +2007-05-15 Richard Sandiford <richard@codesourcery.com>
4901 + Backport from mainline:
4904 + 2007-05-15 Richard Sandiford <richard@codesourcery.com>
4906 + * ld-arm/vxworks1.ld: Swap .bss and .data.
4907 + * ld-arm/vxworks1-lib.rd: Update accordingly.
4908 + * ld-arm/vxworks1-lib.td: New test.
4909 + * ld-arm/arm-elf.exp: Run it.
4911 + * ld-i386/vxworks1.ld: Swap .bss and .data.
4912 + * ld-i386/vxworks1-lib.rd: Update accordingly.
4913 + * ld-i386/vxworks1-lib.td: New test.
4914 + * ld-i386/i386.exp: Run it.
4916 + * ld-mips-elf/vxworks1.ld: Swap .bss and .data.
4917 + * ld-mips-elf/vxworks1-lib.rd: Update accordingly.
4918 + * ld-mips-elf/vxworks1.rd: Likewise.
4920 + * ld-powerpc/vxworks1.ld: Swap .bss and .data.
4921 + * ld-powerpc/vxworks1-lib.rd: Update accordingly.
4922 + * ld-powerpc/vxworks1-lib.td: New test.
4923 + * ld-powerpc/powerpc.exp: Run it.
4925 + * ld-sh/vxworks1.ld: Swap .bss and .data.
4926 + * ld-sh/vxworks1-lib.rd: Update accordingly.
4927 + * ld-sh/vxworks1-lib.td: New test.
4928 + * ld-sh/sh-vxworks.exp: Run it.
4930 + * ld-sparc/vxworks1.ld: Swap .bss and .data.
4931 + * ld-sparc/vxworks1-lib.rd: Update accordingly.
4932 + * ld-sparc/vxworks1-lib.td: New test.
4933 + * ld-sparc/sparc.exp: Run it.
4935 +2007-05-15 Richard Sandiford <richard@codesourcery.com>
4937 + Backport from mainline:
4940 + 2007-05-15 Richard Sandiford <richard@codesourcery.com>
4942 + * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
4943 + input_section argument. Create .rela.dyn relocations against
4944 + symbol 0 rather than the section symbol.
4945 + (mips_elf_local_got_index): Remove input_section argument.
4946 + Update call to mips_elf_create_local_got_entry.
4947 + (mips_elf_got_page, mips_elf_got16_entry): Likewise.
4948 + (mips_elf_calculate_relocation): Update calls to
4949 + mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
4952 + 2007-05-15 Richard Sandiford <richard@codesourcery.com>
4954 + * ld-mips-elf/vxworks1-lib.rd: Expect the GOT relocation to be
4957 +2007-05-14 Richard Sandiford <richard@codesourcery.com>
4960 + * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Initialize
4961 + _bfd_copy_link_hash_symbol_type.
4963 +2007-05-14 Joseph Myers <joseph@codesourcery.com>
4965 + Backport from mainline:
4967 + 2007-05-12 Alan Modra <amodra@bigpond.net.au>
4969 + * elf-eh-frame.c (struct cie): Add "local_personality". Make
4970 + "personality" a union.
4971 + (cie_eq): Compare local_personality too. Adjust personality
4973 + (_bfd_elf_discard_section_eh_frame): Check binding on personality
4974 + reloc sym to allow for bad symtab. Use stashed local syms rather
4975 + than reading personality local sym. Handle discarded sections.
4977 +2007-05-14 Richard Sandiford <richard@codesourcery.com>
4979 + Backport from mainline:
4982 + 2007-05-14 Richard Sandiford <richard@codesourcery.com>
4984 + * ld-sh/vxworks1.dd: Remove hexadecimal prefixes from constant pool
4985 + contents. Consistently use "!" as the comment character.
4986 + Consistently use _PROCEDURE_LINKAGE_TABLE_ in the first PLT entry.
4987 + * ld-sh/vxworks1-le.dd: Likewise.
4988 + * ld-sh/vxworks1-lib.dd: Likewise.
4989 + * ld-sh/vxworks1-lib-le.dd: Likewise.
4990 + * ld-sh/vxworks3.dd: Likewise.
4991 + * ld-sh/vxworks3-le.dd: Likewise.
4993 +2007-05-11 Paul Brook <paul@codesourcery.com>
4996 + * ldexp.c (exp_fold_tree_1): Copy symbol type for simple
5000 + * ld-arm/script-type.s: New test.
5001 + * ld-arm/arm-elf.exp: New test.
5002 + * ld-arm/script-type.ld: New test.
5005 + * elf-bfd.h (_bfd_elf_copy_link_hash_symbol_type): Add prototype.
5006 + * libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add
5008 + * elflink.c (_bfd_elf_copy_link_hash_symbol_type): New function.
5009 + * linker.c (_bfd_generic_copy_link_hash_symbol_type): New
5011 + * targets.c (BFD_JUMP_TABLE_LINK, struct bfd_target): Add
5012 + _copy_link_hash_symbol_type.
5013 + * aout-adobe.c (aout_32_bfd_copy_link_hash_symbol_type): Define.
5014 + * aout-target.h (MY_bfd_copy_link_hash_symbol_type): Define.
5015 + * aout-tic30.c (MY_bfd_copy_link_hash_symbol_type): Define.
5016 + * binary.c (binary_bfd_copy_link_hash_symbol_type): Define.
5017 + * bout.c (b_out_bfd_copy_link_hash_symbol_type): Define.
5018 + * coffcode.h (coff_bfd_copy_link_hash_symbol_type): Define.
5019 + * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define.
5020 + * i386msdos.c (msdos_bfd_copy_link_hash_symbol_type): Define.
5021 + * i386os9k.c (os9k_bfd_copy_link_hash_symbol_type): Define.
5022 + * ieee.c (ieee_bfd_copy_link_hash_symbol_type): Define.
5023 + * ihex.c (ihex_bfd_copy_link_hash_symbol_type): Define.
5024 + * libecoff.h (_bfd_ecoff_bfd_copy_link_hash_symbol_type): Define.
5025 + * mach-o.c (bfd_mach_o_bfd_copy_link_hash_symbol_type): Define.
5026 + * mmo.c (mmo_bfd_copy_link_hash_symbol_type): Define.
5027 + * nlm-target.h (nlm_bfd_copy_link_hash_symbol_type): Define.
5028 + * oasys.c (oasys_bfd_copy_link_hash_symbol_type): Define.
5029 + * pef.c (bfd_pef_bfd_copy_link_hash_symbol_type): Define.
5030 + * ppcboot.c (ppcboot_bfd_copy_link_hash_symbol_type): Define.
5031 + * som.c (som_bfd_copy_link_hash_symbol_type): Define.
5032 + * srec.c (srec_bfd_copy_link_hash_symbol_type): Define.
5033 + * tekhex.c (tekhex_bfd_copy_link_hash_symbol_type): Define.
5034 + * versados.c (versados_bfd_copy_link_hash_symbol_type): Define.
5035 + * vms.c (vms_bfd_copy_link_hash_symbol_type): Define.
5036 + * xsym.c (bfd_sym_bfd_copy_link_hash_symbol_type): Define.
5037 + * bfd-in2.h: Regenerate.
5038 + * libbfd.h: Regenerate.
5040 +2007-05-11 Joseph Myers <joseph@codesourcery.com>
5042 + Backport from mainline:
5044 + 2007-04-30 Alan Modra <amodra@bigpond.net.au>
5046 + * config/tc-ppc.c (ppc_insert_operand): Disable range check if
5050 + 2007-04-30 Alan Modra <amodra@bigpond.net.au>
5052 + * ppc-opc.c (powerpc_operands): Correct bitm for second entry of MBE.
5055 + 2007-05-02 Alan Modra <amodra@bigpond.net.au>
5057 + * config/tc-ppc.c (ppc_insert_operand): Don't increase min for
5058 + PPC_OPERAND_PLUS1.
5061 + 2007-05-02 Alan Modra <amodra@bigpond.net.au>
5062 + * ppc.h (PPC_OPERAND_PLUS1): Update comment.
5064 +2007-05-10 Carlos O'Donell <carlos@codesourcery.com>
5066 + * Makefile.tpl: Add install-pdf to install target deps.
5067 + * Makefile.in: Regenerate.
5069 +2007-05-10 Carlos O'Donell <carlos@codesourcery.com>
5072 + * configure.in: ACSUBST pdfdir.
5073 + * Makefile.am: Add install-pdf, install-pdf-am
5074 + and install-pdf-recursive targets. Define pdfdir.
5075 + * doc/Makefile.am: Define pdf__strip_dir. Add
5076 + install-pdf and install-pdf-am targets.
5077 + * po/Make-in: Add install-pdf target.
5078 + * configure: Regenerate.
5079 + * Makefile.in: Regenerate
5080 + * doc/Makefile.in: Regenerate.
5083 + * configure.in: ACSUBST pdfdir.
5084 + * Makefile.am: Add install-pdf, install-pdf-am,
5085 + and install-pdf-recursive targets.
5086 + * doc/Makefile.am: Define pdf__strip_dir. Add
5087 + install-pdf and install-pdf-am targets.
5088 + * po/Make-in: Add install-pdf target.
5089 + * configure: Regenerate.
5090 + * Makefile.in: Regenerate.
5091 + * doc/Makefile.in: Regenerate.
5094 + * configure.in: ACSUBST pdfdir.
5095 + * configure: Regenerate.
5098 + * Makefile.am: Add install-pdf target.
5099 + * po/Make-in: Add install-pdf target.
5100 + * Makefile.in: Regenerate.
5103 + * configure.in: ACSUBST pdfdir.
5104 + * Makefile.am: Add install-pdf, install-pdf-am,
5105 + and install-pdf-recursive targets.
5106 + * doc/Makefile.am: Define pdf__strip_dir. Add
5107 + install-pdf and install-pdf-am targets.
5108 + * po/Make-in: Add install-pdf target.
5109 + * configure: Regenerate.
5110 + * Makefile.in: Regenerate.
5111 + * doc/Makefile.in: Regenerate.
5114 + * configure.in: ACSUBST pdfdir.
5115 + * Makefile.am: Add install-pdf, install-pdf-am,
5116 + and install-pdf-recursive targets. Define pdf__strip_dir.
5117 + * po/Make-in: Add install-pdf target.
5118 + * configure: Regenerate.
5119 + * Makefile.in: Regenerate.
5122 + * configure.in: ACSUBST pdfdir.
5123 + * Makefile.am: Add install-pdf, install-pdf-am,
5124 + and install-pdf-recursive targets. Define pdf__strip_dir.
5125 + * po/Make-in: Add install-pdf target.
5126 + * configure: Regenerate.
5127 + * Makefile.in: Regenerate.
5129 +2007-05-10 Kazu Hirata <kazu@codesourcery.com>
5132 + Backport from mainline:
5134 + 2007-05-11 Alan Modra <amodra@bigpond.net.au>
5136 + * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
5137 + (_bfd_elf_discard_section_eh_frame): Handle local syms on
5138 + personality relocation.
5140 +2007-05-10 Nathan Sidwell <nathan@codesourcery.com>
5142 + * Makefile.tpl: Add install-pdf to install target deps.
5143 + * Makefile.in: Regenerate.
5145 +2007-05-10 Carlos O'Donell <carlos@codesourcery.com>
5148 + * configure.in: ACSUBST pdfdir.
5149 + * Makefile.am: Add install-pdf, install-pdf-am
5150 + and install-pdf-recursive targets. Define pdfdir.
5151 + * doc/Makefile.am: Define pdf__strip_dir. Add
5152 + install-pdf and install-pdf-am targets.
5153 + * po/Make-in: Add install-pdf target.
5154 + * configure: Regenerate.
5155 + * Makefile.in: Regenerate
5156 + * doc/Makefile.in: Regenerate.
5159 + * configure.in: ACSUBST pdfdir.
5160 + * Makefile.am: Add install-pdf, install-pdf-am,
5161 + and install-pdf-recursive targets.
5162 + * doc/Makefile.am: Define pdf__strip_dir. Add
5163 + install-pdf and install-pdf-am targets.
5164 + * po/Make-in: Add install-pdf target.
5165 + * configure: Regenerate.
5166 + * Makefile.in: Regenerate.
5167 + * doc/Makefile.in: Regenerate.
5170 + * configure.in: ACSUBST pdfdir.
5171 + * configure: Regenerate.
5174 + * Makefile.am: Add install-pdf target.
5175 + * po/Make-in: Add install-pdf target.
5176 + * Makefile.in: Regenerate.
5179 + * configure.in: ACSUBST pdfdir.
5180 + * Makefile.am: Add install-pdf, install-pdf-am,
5181 + and install-pdf-recursive targets.
5182 + * doc/Makefile.am: Define pdf__strip_dir. Add
5183 + install-pdf and install-pdf-am targets.
5184 + * po/Make-in: Add install-pdf target.
5185 + * configure: Regenerate.
5186 + * Makefile.in: Regenerate.
5187 + * doc/Makefile.in: Regenerate.
5190 + * configure.in: ACSUBST pdfdir.
5191 + * Makefile.am: Add install-pdf, install-pdf-am,
5192 + and install-pdf-recursive targets. Define pdf__strip_dir.
5193 + * po/Make-in: Add install-pdf target.
5194 + * configure: Regenerate.
5195 + * Makefile.in: Regenerate.
5198 + * configure.in: ACSUBST pdfdir.
5199 + * Makefile.am: Add install-pdf, install-pdf-am,
5200 + and install-pdf-recursive targets. Define pdf__strip_dir.
5201 + * po/Make-in: Add install-pdf target.
5202 + * configure: Regenerate.
5203 + * Makefile.in: Regenerate.
5205 +2007-05-10 Richard Sandiford <richard@codesourcery.com>
5207 + Backport from mainline:
5210 + 2007-05-10 Richard Sandiford <richard@codesourcery.com>
5212 + * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
5213 + for R_ARM_ABS12 relocs.
5214 + (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
5215 + non-shared VxWorks PLT entries.
5218 + 2007-05-10 Richard Sandiford <richard@codesourcery.com>
5220 + * ld-arm/vxworks1-lib.dd: Expect "push" instead of stmdb and
5221 + "pop" instead of ldmia. Don't require specific symbolic addresses
5222 + for in-text addresses. Expect data to be rendered as .words rather
5223 + than disassembled.
5224 + * ld-arm/vxworks1.dd: Likewise.
5226 +2007-05-10 Richard Sandiford <richard@codesourcery.com>
5228 + Backport from mainline:
5231 + 2007-05-10 Richard Sandiford <richard@codesourcery.com>
5233 + * elf.c (assign_file_positions_for_load_sections): Use p_memsz
5234 + rather than p_filesz to calculate the LMA of the end of a segment.
5237 + 2007-05-10 Richard Sandiford <richard@codesourcery.com>
5239 + * ld-elf/multibss1.d, ld-elf/multibss1.s: New test.
5241 +2007-05-10 Kazu Hirata <kazu@codesourcery.com>
5244 + Backport from mainline:
5246 + 2007-05-11 Alan Modra <amodra@bigpond.net.au>
5248 + * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
5249 + (_bfd_elf_discard_section_eh_frame): Handle local syms on
5250 + personality relocation.
5252 +2007-05-09 Nathan Sidwell <nathan@codesourcery.com>
5254 + * release-notes-csl.xml: Document fix.
5257 + * m68k-opc.c (m68k_opcodes): Add wdebugl variants.
5259 +2007-05-09 Kazu Hirata <kazu@codesourcery.com>
5261 + * release-notes-csl.xml: Insert a blank line before the first
5262 + release note fragment.
5264 +2007-05-04 Mark Shinwell <shinwell@codesourcery.com>
5266 + * release-notes-csl.xml (ARM EABI compliance): New.
5269 + * config/te-armeabi.h (EABI_DEFAULT): Use EF_ARM_EABI_VER5.
5270 + * config/te-armlinuxeabi.h (EABI_DEFAULT): Likewise.
5272 +2007-05-04 Kazu Hirata <kazu@codesourcery.com>
5274 + Backport from mainline:
5276 + * gas/m68k/all.exp: Skip fmoveml on fido.
5278 +2007-05-04 Mark Shinwell <shinwell@codesourcery.com>
5280 + binutils/testsuite/
5281 + * binutils-all/strip-3.d: Strip .ARM.attributes section.
5283 +2007-05-04 Mark Shinwell <shinwell@codesourcery.com>
5285 + Merge from Sourcery G++ binutils 2.17:
5287 + 2007-04-20 Mark Shinwell <shinwell@codesourcery.com>
5289 + * release-notes-csl.xml (Conditional Thumb-2 branch
5290 + instructions): New.
5293 + * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
5294 + handle the Thumb-2 JUMP19 relocation.
5297 + * ld-arm/arm-elf.exp: Add jump19 testcase.
5298 + * ld-arm/jump19.d: New.
5299 + * ld-arm/jump19.s: New.
5301 +2007-05-04 Mark Shinwell <shinwell@codesourcery.com>
5303 + Merge from Sourcery G++ binutils 2.17:
5305 + 2007-04-20 Mark Shinwell <shinwell@codesourcery.com>
5307 + * release-notes-csl.xml (Linking of non-ELF images): New.
5310 + * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
5311 + attempt to scan if the bfd doesn't correspond to an ELF image.
5312 + (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
5314 +2007-05-03 Mark Shinwell <shinwell@codesourcery.com>
5316 + Merge from Sourcery G++ binutils 2.17:
5318 + 2007-04-27 Mark Shinwell <shinwell@codesourcery.com>
5321 + * config/tc-arm.c (md_apply_fix): Generate more accurate
5322 + diagnostic when 8-bit immediate range is exceeded for
5323 + BFD_RELOC_ARM_OFFSET_IMM8.
5325 +2007-05-03 Sandra Loosemore <sandra@codesourcery.com>
5328 + * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
5330 +2007-05-03 Paul Brook <paul@codesourcery.com>
5332 + Merge from CSL-2.17 branch.
5333 + 2007-04-17 Paul Brook <paul@codesourcery.com>
5335 + * config/tc-arm.c (arm_ext_msr): New variable.
5336 + (md_assemble): Allow v6-M 32-bit instructions without requiring
5338 + (insns): Use arm_ext_msr for Thumb MSR and MRS.
5339 + (cpu_arch): Add V6M. Fix numbering of V6K and V6T2.
5341 + * gas/arm/archv6m.d: New test.
5342 + * gas/arm/archv6m.s: New test.
5344 + * arm.h (ARM_EXT_THUMB_MSR): Define.
5345 + (ARM_AEXT_V6T2, ARM_AEXT_V6M): Use it.
5347 + 2006-12-15 Paul Brook <paul@codesourcery.com>
5349 + * config/tc-arm.c (arm_ext_barrier, arm_ext_m): New.
5350 + (do_t_mrs): Use arm_ext_m.
5351 + (insns): Allow dmb, dsb and isb on ARMv6-M.
5352 + (arm_cpu_option_table): Add cortex-m1.
5353 + (arm_arch_option_table): Add armv6-m.
5354 + (aeabi_set_public_attributes): Use arm_ext_m.
5356 + * opcode/arm.h (ARM_EXT_V6M, ARM_EXT_BARRIER, ARM_AEXT_V6M,
5357 + ARM_ARCH_V6M): Define.
5358 + (ARM_AEXT_V7_ARM, ARM_AEXT_V7M): Include ARM_EXT_BARRIER.
5360 +2007-04-27 Mark Shinwell <shinwell@codesourcery.com>
5362 + * release-notes-csl.xml (The \@ assembler pseudo-variable):
5366 + * app.c (do_scrub_chars): Don't damage \@ pseudo-variables.
5369 + * gas/arm/backslash-at.d: New.
5370 + * gas/arm/backslash-at.s: New.
5372 +2007-04-25 Mark Mitchell <mark@codesourcery.com>
5375 + * cygpath.c (<process.h>): Include it.
5376 + (cygpath_log): New variable.
5377 + (cygpath_log_msg_arg): New function.
5378 + (cygpath_log_msg): Likewise.
5379 + (cygpath_perror): Likewise.
5380 + (cygpath_close): Declare as prototyped function. Close the log
5382 + (cygpath): Log interaction with cygpath. If cygpath dies
5383 + unexpectedly, restart it.
5384 + (set_errno_from_windows_code): Avoid signed/unsigned comparison.
5386 +2007-04-23 Joseph Myers <joseph@codesourcery.com>
5388 + Merge from Sourcery G++ binutils 2.17:
5390 + 2007-01-24 Joseph Myers <joseph@codesourcery.com>
5392 + * config.bfd (mips*el-*-linux*, mips*-*-linux*): Remove
5393 + ecoff_little_vec and ecoff_big_vec.
5395 +2007-04-23 Sandra Loosemore <sandra@codesourcery.com>
5397 + * release-notes-csl.xml (Binutils update): New.
5399 +2007-04-23 Richard Sandiford <richard@codesourcery.com>
5402 + * gas/mips/ulh3.s, gas/mips/ulh3-el.d, gas/mips/ulh3-eb.d,
5403 + * gas/mips/octeon1.s, gas/mips/octeon1.l, gas/mips/octeon2.s,
5404 + * gas/mips/octeon2-un.d, gas/mips/octeon2-noun.d,
5405 + * gas/mips/octeon2-mix.d, gas/mips/octeon3.s,
5406 + * gas/mips/octeon3.d: New tests.
5407 + * gas/mips/mips.exp: Run them. Don't run ulh2 on mips32r2 targets.
5409 +2007-04-23 Richard Sandiford <richard@codesourcery.com>
5411 + Adapted from a patch by Cavium Networks.
5414 + * mips.h (E_MIPS_MACH_OCTEON): New macro.
5417 + * mips.h: Document '^', ';' and 'y'.
5418 + (OP_MASK_BITIND, OP_SH_BITIND): New macros.
5419 + (INSN_OCTEON, CPU_OCTEON): Likewise.
5420 + (OPCODE_IS_MEMBER): Handle CPU_OCTEON.
5423 + * archures.c (bfd_mach_mips_octeon): Define.
5424 + * bfd-in2.h: Regenerate.
5425 + * cpu-mips.c (I_mipsocteon): Define.
5426 + (arch_info_struct): Add a "mips:octeon" entry.
5427 + * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_OCTEON.
5428 + (mips_set_isa_flags): Handle bfd_mach_mips_octeon.
5429 + (mips_mach_extensions): List bfd_mach_mips_octeon as an extension
5430 + of bfd_mach_mipsisa64.
5433 + * readelf.c (get_machine_flags): Handle E_MIPS_MACH_OCTEON.
5436 + * mips-dis.c (octeon_use_unalign): New variable.
5437 + (mips_cp0_names_octeon, mips_cp0sel_names_octeon): New tables.
5438 + (mips_arch_choices): Add an octeon entry.
5439 + (parse_mips_dis_option): Handle octeon-useun and no-octeon-useun.
5440 + (print_insn_args): Handle '^' and 'y'.
5441 + (print_insn_mips): Skip aliases of uld, ulw, usd and usw when
5442 + unaligned octeon instructions are allowed. Print ldr, lwr,
5443 + sdr and swr as nops in that case.
5444 + (print_mips_disassembler_options): Print help for octeon-useun and
5446 + * mips-opc.c (IOCTEON): Define.
5447 + (mips_builtin_opcodes): Add Octeon baddu, bbit032, bbit0, bbit132,
5448 + bbit1, cins32, cins, dmul, dpop, exts32, exts, exts, mtm0, mtm1,
5449 + mtm2, mtp0, mtp1, mtp2, pop, seq, seqi, sne, snei, syncio,
5450 + synciobdma, syncioall, syncs, syncw, syncws, uld, ulw, usd, usw,
5451 + v3mulu, vmm0, vmulu, dmfc2 and dmtc2 instructions.
5454 + * config/tc-mips.c (octeon_use_unalign): New variable.
5455 + (ISA_HAS_INS): New macro.
5456 + (CPU_HAS_DROR): Return true for CPU_OCTEON.
5457 + (CPU_HAS_INS): New macro.
5458 + (macro_build): Handle '^' and 'y'.
5459 + (macro2): Try to use "ins" instead of "sll" and "or" in the
5460 + implementation of ulh and ulhu. Treat uld, ulw, usd and usw
5461 + as normal stores if the Octeon unaligned instructions are allowed.
5462 + (validate_mips_insn): Handle '^', ';' and 'y'.
5463 + (mips_ip): Ignore the uld, ulw, usd and usw hardware instructions
5464 + unless they have been enabled. Refuse to assemble left/right stores
5465 + when uld, ulw, usd and usw are enabled. Handle '^', ';' and 'y'.
5466 + (OPTION_OCTEON_UNALIGNED, OPTION_NO_OCTEON_UNALIGNED): New macros.
5467 + (OPTION_ELF_BASE): Bump by two.
5468 + (md_longopts): Add -mocteon-useun and -mno-octeon-useun.
5469 + (md_parse_option): Handle them.
5470 + (mips_cpu_info_table): Add an "octeon" entry.
5471 + (md_show_usage): Mention -mocteon-useun and -mno-octeon-useun.
5473 +2007-04-22 Mark Shinwell <shinwell@codesourcery.com>
5475 + Merge from Sourcery G++ binutils 2.17:
5477 + 2007-02-02 Mark Shinwell <shinwell@codesourcery.com>
5480 + * config/tc-arm.c (arm_ext_marvell_f): New.
5481 + (do_marvell_div): New.
5482 + (insns): Add entries for Marvell-specific sdiv and udiv encodings.
5483 + (arm_cpu_option_table): Add marvell-f entry.
5484 + (arm_arch_option_table): Add marvell-f entry.
5485 + * include/opcode/arm.h (ARM_CEXT_MARVELL_F): New.
5486 + (ARM_ARCH_MARVELL_F): New.
5489 + * gas/arm/marvell-f-div.d: New.
5490 + * gas/arm/marvell-f-div.s: New.
5492 + 2007-01-03 Mark Shinwell <shinwell@codesourcery.com>
5494 + NOT ASSIGNED TO FSF
5495 + Port from Marvell compiler:
5497 + * config/tc-arm.c (arm_cpus): Add marvell-f entry.
5499 +2007-04-20 Nathan Sidwell <nathan@codesourcery.com>
5502 + * gas/m68k/br-isaa.s: New.
5503 + * gas/m68k/br-isaa.d: New.
5504 + * gas/m68k/br-isab.s: New.
5505 + * gas/m68k/br-isab.d: New.
5506 + * gas/m68k/br-isac.s: New.
5507 + * gas/m68k/br-isac.d: New.
5508 + * gas/m68k/all.exp: Adjust.
5511 + * config/tc-m68k.c (mcf54455_ctrl): New.
5512 + (HAVE_LONG_DISP, HAVE_LONG_CALL, HAVE_LONG_COND): New.
5513 + (m68k_archs): Add isac.
5514 + (m68k_cpus): Add 54455 family.
5515 + (m68k_ip): Split Bg into Bb, Bs, Bg.
5516 + (m68k_elf_final_processing): Add ISA_C.
5517 + * doc/c-m68k.texi (M680x0 Options): Add isac.
5520 + * m68k.h (mcfisa_c): New.
5521 + (mcfusp, mcf_mask): Adjust.
5524 + * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
5525 + bfd_mach_mcf_isa_c_emac): New.
5526 + * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
5527 + elf_isac_plt_entry, elf_isac_plt_info): New.
5528 + (elf32_m68k_object_p): Add ISA_C.
5529 + (elf32_m68k_print_private_bfd_data): Print ISA_C.
5530 + (elf32_m68k_get_plt_info): Detect ISA_C.
5531 + * cpu-m68k.c (arch_info): Add ISAC.
5532 + (m68k_arch_features): Likewise,
5533 + (bfd_m68k_compatible): ISAs B & C are not compatible.
5536 + * m68k-opc.c: Mark mcfisa_c instructions.
5538 +2007-04-20 Joseph Myers <joseph@codesourcery.com>
5540 + Merge from Sourcery G++ binutils 2.17:
5542 + 2007-03-20 Joseph Myers <joseph@codesourcery.com>
5543 + Based on patch by Mark Hatle <mark.hatle@windriver.com>.
5545 + * configure.in (--enable-poison-system-directories): New option.
5546 + * configure, config.in: Regenerate.
5547 + * ldfile.c (ldfile_add_library_path): If
5548 + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
5549 + /usr/lib, /usr/local/lib or /usr/X11R6/lib.
5551 + Merge from Sourcery G++ binutils 2.17:
5553 + 2007-03-22 Julian Brown <julian@codesourcery.com>
5555 + * elf32-arm.c (bfd_elf32_arm_set_vfp11_fix): Default to fixing for
5556 + scalar code on pre-ARMv7.
5558 + * ld.texinfo: Document this default.
5560 + Merge from Sourcery G++ binutils 2.17:
5562 + 2007-03-23 Richard Sandiford <richard@codesourcery.com>
5564 + From Phil Edwards <phil@codesourcery.com>:
5565 + * cache.c (bfd_cache_delete): Work around ClearCase bug.
5567 + Merge from Sourcery G++ binutils 2.17:
5569 + 2006-04-12 Carlos O'Donell <carlos@codesourcery.com>
5570 + * Makefile.tpl: Add install-html to install target deps.
5571 + * Makefile.in: Regenerate.
5573 +2007-04-20 Mark Mitchell <mark@codesourcery.com>
5574 + Vladimir Prus <vladimir@codesourcery.com>
5575 + Carlos O'Donell <carlos@codesourcery.com>
5576 + Joseph Myers <joseph@codesourcery.com>
5579 + * configure.ac: Add cygpath for mingw hosts.
5580 + * configure: Rebuilt.
5581 + * Makefile.in: Add cygpath.
5584 +2007-04-20 Joseph Myers <joseph@codesourcery.com>
5586 + Merge from Sourcery G++ binutils 2.17:
5588 + 2007-03-01 Joseph Myers <joseph@codesourcery.com>
5590 + * configure.in (mips64el-sicortex-linux-gnu): Set
5591 + mips_default_abi=N64_ABI.
5592 + * configure: Regenerate.
5594 + 2007-02-20 Carlos O'Donell <carlos@codesourcery.com>
5597 + * configure.tgt (mips64el-sicortex-linux-gnu): Set targ_emul to
5598 + elf64ltsmip, and set targ_extra_emuls appropriately.
5600 +2007-04-20 Nathan Sidwell <nathan@codesourcery.com>
5603 + * config/tc-m68k.c (mcf5253_ctrl): New.
5604 + (mcf52223_ctrl): New.
5605 + (m68k_cpus): Add 5253, 52221, 52223.
5608 + * config/m68k-parse.h (RAMBAR_ALT): New.
5609 + * config/tc-m68k.c (mcf5206_ctrl, mcf5307_ctrl): New.
5610 + (mcf_ctrl, mcf5208_ctrl, mcf5210a_ctrl, mcf5213_ctrl, mcf52235_ctrl,
5611 + mcf5225_ctrl, mcf5235_ctrl, mcf5271_ctrl, mcf5275_ctrl,
5612 + mcf5282_ctrl, mcf5329_ctrl, mcf5373_ctrl, mcfv4e_ctrl,
5613 + mcf5475_ctrl, mcf5485_ctrl): Add RAMBAR synonym for
5615 + (mcf5272_ctrl): Add RAMBAR0, replace add RAMBAR with RAMBAR_ALT.
5616 + (m68k_cpus): Adjust 5206, 5206e & 5307 entries.
5617 + (m68k_ip) <Case J>: Detect when RAMBAR_ALT should be used. Add it
5618 + to control register mapping.
5621 + * gas/m68k/ctrl-1.d, gas/m68k/ctrl-1.s: New.
5622 + * gas/m68k/ctrl-2.d, gas/m68k/ctrl-2.s: New.
5623 + * gas/m68k/all.exp: Add them.
5626 + * m68k-dis.c (print_insn_arg): Show c04 as rambar0 and c05 as
5632 +change-log-default-name: "ChangeLog.csl"
5636 @@ -128,6 +128,7 @@ host_modules= { module= libtermcap; no_c
5638 missing=maintainer-clean; };
5639 host_modules= { module= utils; no_check=true; };
5640 +host_modules= { module= convert; no_check=true; };
5641 host_modules= { module= gnattools; };
5643 target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
5644 @@ -485,6 +486,9 @@ dependencies = { module=all-send-pr; on=
5645 dependencies = { module=all-tar; on=all-build-texinfo; };
5646 dependencies = { module=all-uudecode; on=all-build-texinfo; };
5649 +dependencies = { module=all-convert; on=all-libiberty; };
5651 // Target modules. These can also have dependencies on the language
5652 // environment (e.g. on libstdc++). By default target modules depend
5653 // on libgcc and newlib/libgloss.
5656 @@ -744,6 +744,7 @@ configure-host: \
5657 maybe-configure-tk \
5658 maybe-configure-libtermcap \
5659 maybe-configure-utils \
5660 + maybe-configure-convert \
5661 maybe-configure-gnattools
5662 .PHONY: configure-target
5664 @@ -903,6 +904,7 @@ all-host: maybe-all-guile
5665 all-host: maybe-all-tk
5666 all-host: maybe-all-libtermcap
5667 all-host: maybe-all-utils
5668 +all-host: maybe-all-convert
5669 all-host: maybe-all-gnattools
5672 @@ -1019,6 +1021,7 @@ info-host: maybe-info-guile
5673 info-host: maybe-info-tk
5674 info-host: maybe-info-libtermcap
5675 info-host: maybe-info-utils
5676 +info-host: maybe-info-convert
5677 info-host: maybe-info-gnattools
5680 @@ -1128,6 +1131,7 @@ dvi-host: maybe-dvi-guile
5681 dvi-host: maybe-dvi-tk
5682 dvi-host: maybe-dvi-libtermcap
5683 dvi-host: maybe-dvi-utils
5684 +dvi-host: maybe-dvi-convert
5685 dvi-host: maybe-dvi-gnattools
5688 @@ -1237,6 +1241,7 @@ pdf-host: maybe-pdf-guile
5689 pdf-host: maybe-pdf-tk
5690 pdf-host: maybe-pdf-libtermcap
5691 pdf-host: maybe-pdf-utils
5692 +pdf-host: maybe-pdf-convert
5693 pdf-host: maybe-pdf-gnattools
5696 @@ -1346,6 +1351,7 @@ html-host: maybe-html-guile
5697 html-host: maybe-html-tk
5698 html-host: maybe-html-libtermcap
5699 html-host: maybe-html-utils
5700 +html-host: maybe-html-convert
5701 html-host: maybe-html-gnattools
5704 @@ -1455,6 +1461,7 @@ TAGS-host: maybe-TAGS-guile
5705 TAGS-host: maybe-TAGS-tk
5706 TAGS-host: maybe-TAGS-libtermcap
5707 TAGS-host: maybe-TAGS-utils
5708 +TAGS-host: maybe-TAGS-convert
5709 TAGS-host: maybe-TAGS-gnattools
5712 @@ -1564,6 +1571,7 @@ install-info-host: maybe-install-info-gu
5713 install-info-host: maybe-install-info-tk
5714 install-info-host: maybe-install-info-libtermcap
5715 install-info-host: maybe-install-info-utils
5716 +install-info-host: maybe-install-info-convert
5717 install-info-host: maybe-install-info-gnattools
5719 .PHONY: install-info-target
5720 @@ -1673,6 +1681,7 @@ install-pdf-host: maybe-install-pdf-guil
5721 install-pdf-host: maybe-install-pdf-tk
5722 install-pdf-host: maybe-install-pdf-libtermcap
5723 install-pdf-host: maybe-install-pdf-utils
5724 +install-pdf-host: maybe-install-pdf-convert
5725 install-pdf-host: maybe-install-pdf-gnattools
5727 .PHONY: install-pdf-target
5728 @@ -1782,6 +1791,7 @@ install-html-host: maybe-install-html-gu
5729 install-html-host: maybe-install-html-tk
5730 install-html-host: maybe-install-html-libtermcap
5731 install-html-host: maybe-install-html-utils
5732 +install-html-host: maybe-install-html-convert
5733 install-html-host: maybe-install-html-gnattools
5735 .PHONY: install-html-target
5736 @@ -1891,6 +1901,7 @@ installcheck-host: maybe-installcheck-gu
5737 installcheck-host: maybe-installcheck-tk
5738 installcheck-host: maybe-installcheck-libtermcap
5739 installcheck-host: maybe-installcheck-utils
5740 +installcheck-host: maybe-installcheck-convert
5741 installcheck-host: maybe-installcheck-gnattools
5743 .PHONY: installcheck-target
5744 @@ -2000,6 +2011,7 @@ mostlyclean-host: maybe-mostlyclean-guil
5745 mostlyclean-host: maybe-mostlyclean-tk
5746 mostlyclean-host: maybe-mostlyclean-libtermcap
5747 mostlyclean-host: maybe-mostlyclean-utils
5748 +mostlyclean-host: maybe-mostlyclean-convert
5749 mostlyclean-host: maybe-mostlyclean-gnattools
5751 .PHONY: mostlyclean-target
5752 @@ -2109,6 +2121,7 @@ clean-host: maybe-clean-guile
5753 clean-host: maybe-clean-tk
5754 clean-host: maybe-clean-libtermcap
5755 clean-host: maybe-clean-utils
5756 +clean-host: maybe-clean-convert
5757 clean-host: maybe-clean-gnattools
5759 .PHONY: clean-target
5760 @@ -2218,6 +2231,7 @@ distclean-host: maybe-distclean-guile
5761 distclean-host: maybe-distclean-tk
5762 distclean-host: maybe-distclean-libtermcap
5763 distclean-host: maybe-distclean-utils
5764 +distclean-host: maybe-distclean-convert
5765 distclean-host: maybe-distclean-gnattools
5767 .PHONY: distclean-target
5768 @@ -2327,6 +2341,7 @@ maintainer-clean-host: maybe-maintainer-
5769 maintainer-clean-host: maybe-maintainer-clean-tk
5770 maintainer-clean-host: maybe-maintainer-clean-libtermcap
5771 maintainer-clean-host: maybe-maintainer-clean-utils
5772 +maintainer-clean-host: maybe-maintainer-clean-convert
5773 maintainer-clean-host: maybe-maintainer-clean-gnattools
5775 .PHONY: maintainer-clean-target
5776 @@ -2490,6 +2505,7 @@ check-host: \
5778 maybe-check-libtermcap \
5780 + maybe-check-convert \
5781 maybe-check-gnattools
5783 .PHONY: check-target
5784 @@ -2625,6 +2641,7 @@ install-host-nogcc: \
5786 maybe-install-libtermcap \
5787 maybe-install-utils \
5788 + maybe-install-convert \
5789 maybe-install-gnattools
5791 .PHONY: install-host
5792 @@ -2701,6 +2718,7 @@ install-host: \
5794 maybe-install-libtermcap \
5795 maybe-install-utils \
5796 + maybe-install-convert \
5797 maybe-install-gnattools
5799 .PHONY: install-target
5800 @@ -42242,6 +42260,424 @@ maintainer-clean-utils:
5804 +.PHONY: configure-convert maybe-configure-convert
5805 +maybe-configure-convert:
5807 +configure-convert: stage_current
5808 +@endif gcc-bootstrap
5810 +maybe-configure-convert: configure-convert
5812 + @: $(MAKE); $(unstage)
5813 + @r=`${PWD_COMMAND}`; export r; \
5814 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5815 + test ! -f $(HOST_SUBDIR)/convert/Makefile || exit 0; \
5816 + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/convert ; \
5818 + echo Configuring in $(HOST_SUBDIR)/convert; \
5819 + cd "$(HOST_SUBDIR)/convert" || exit 1; \
5820 + case $(srcdir) in \
5821 + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
5822 + *) topdir=`echo $(HOST_SUBDIR)/convert/ | \
5823 + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
5825 + srcdiroption="--srcdir=$${topdir}/convert"; \
5826 + libsrcdir="$$s/convert"; \
5827 + $(SHELL) $${libsrcdir}/configure \
5828 + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
5829 + --target=${target_alias} $${srcdiroption} \
5837 +.PHONY: all-convert maybe-all-convert
5840 +all-convert: stage_current
5841 +@endif gcc-bootstrap
5844 +maybe-all-convert: all-convert
5845 +all-convert: configure-convert
5846 + @: $(MAKE); $(unstage)
5847 + @r=`${PWD_COMMAND}`; export r; \
5848 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5850 + (cd $(HOST_SUBDIR)/convert && \
5851 + $(MAKE) $(FLAGS_TO_PASS) $(TARGET-convert))
5857 +.PHONY: check-convert maybe-check-convert
5858 +maybe-check-convert:
5860 +maybe-check-convert: check-convert
5866 +.PHONY: install-convert maybe-install-convert
5867 +maybe-install-convert:
5869 +maybe-install-convert: install-convert
5871 +install-convert: installdirs
5872 + @: $(MAKE); $(unstage)
5873 + @r=`${PWD_COMMAND}`; export r; \
5874 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5876 + (cd $(HOST_SUBDIR)/convert && \
5877 + $(MAKE) $(FLAGS_TO_PASS) install)
5881 +# Other targets (info, dvi, pdf, etc.)
5883 +.PHONY: maybe-info-convert info-convert
5884 +maybe-info-convert:
5886 +maybe-info-convert: info-convert
5890 + @: $(MAKE); $(unstage)
5891 + @[ -f ./convert/Makefile ] || exit 0; \
5892 + r=`${PWD_COMMAND}`; export r; \
5893 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5895 + for flag in $(EXTRA_HOST_FLAGS) ; do \
5896 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
5898 + echo "Doing info in convert" ; \
5899 + (cd $(HOST_SUBDIR)/convert && \
5900 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
5901 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
5902 + "RANLIB=$${RANLIB}" \
5903 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
5909 +.PHONY: maybe-dvi-convert dvi-convert
5912 +maybe-dvi-convert: dvi-convert
5916 + @: $(MAKE); $(unstage)
5917 + @[ -f ./convert/Makefile ] || exit 0; \
5918 + r=`${PWD_COMMAND}`; export r; \
5919 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5921 + for flag in $(EXTRA_HOST_FLAGS) ; do \
5922 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
5924 + echo "Doing dvi in convert" ; \
5925 + (cd $(HOST_SUBDIR)/convert && \
5926 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
5927 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
5928 + "RANLIB=$${RANLIB}" \
5929 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
5935 +.PHONY: maybe-pdf-convert pdf-convert
5938 +maybe-pdf-convert: pdf-convert
5942 + @: $(MAKE); $(unstage)
5943 + @[ -f ./convert/Makefile ] || exit 0; \
5944 + r=`${PWD_COMMAND}`; export r; \
5945 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5947 + for flag in $(EXTRA_HOST_FLAGS) ; do \
5948 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
5950 + echo "Doing pdf in convert" ; \
5951 + (cd $(HOST_SUBDIR)/convert && \
5952 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
5953 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
5954 + "RANLIB=$${RANLIB}" \
5955 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
5961 +.PHONY: maybe-html-convert html-convert
5962 +maybe-html-convert:
5964 +maybe-html-convert: html-convert
5968 + @: $(MAKE); $(unstage)
5969 + @[ -f ./convert/Makefile ] || exit 0; \
5970 + r=`${PWD_COMMAND}`; export r; \
5971 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5973 + for flag in $(EXTRA_HOST_FLAGS) ; do \
5974 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
5976 + echo "Doing html in convert" ; \
5977 + (cd $(HOST_SUBDIR)/convert && \
5978 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
5979 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
5980 + "RANLIB=$${RANLIB}" \
5981 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
5987 +.PHONY: maybe-TAGS-convert TAGS-convert
5988 +maybe-TAGS-convert:
5990 +maybe-TAGS-convert: TAGS-convert
5994 + @: $(MAKE); $(unstage)
5995 + @[ -f ./convert/Makefile ] || exit 0; \
5996 + r=`${PWD_COMMAND}`; export r; \
5997 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
5999 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6000 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6002 + echo "Doing TAGS in convert" ; \
6003 + (cd $(HOST_SUBDIR)/convert && \
6004 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6005 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6006 + "RANLIB=$${RANLIB}" \
6007 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6013 +.PHONY: maybe-install-info-convert install-info-convert
6014 +maybe-install-info-convert:
6016 +maybe-install-info-convert: install-info-convert
6018 +install-info-convert: \
6019 + configure-convert \
6021 + @: $(MAKE); $(unstage)
6022 + @[ -f ./convert/Makefile ] || exit 0; \
6023 + r=`${PWD_COMMAND}`; export r; \
6024 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6026 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6027 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6029 + echo "Doing install-info in convert" ; \
6030 + (cd $(HOST_SUBDIR)/convert && \
6031 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6032 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6033 + "RANLIB=$${RANLIB}" \
6034 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6040 +.PHONY: maybe-install-pdf-convert install-pdf-convert
6041 +maybe-install-pdf-convert:
6043 +maybe-install-pdf-convert: install-pdf-convert
6045 +install-pdf-convert: \
6046 + configure-convert \
6048 + @: $(MAKE); $(unstage)
6049 + @[ -f ./convert/Makefile ] || exit 0; \
6050 + r=`${PWD_COMMAND}`; export r; \
6051 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6053 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6054 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6056 + echo "Doing install-pdf in convert" ; \
6057 + (cd $(HOST_SUBDIR)/convert && \
6058 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6059 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6060 + "RANLIB=$${RANLIB}" \
6061 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6067 +.PHONY: maybe-install-html-convert install-html-convert
6068 +maybe-install-html-convert:
6070 +maybe-install-html-convert: install-html-convert
6072 +install-html-convert: \
6073 + configure-convert \
6075 + @: $(MAKE); $(unstage)
6076 + @[ -f ./convert/Makefile ] || exit 0; \
6077 + r=`${PWD_COMMAND}`; export r; \
6078 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6080 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6081 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6083 + echo "Doing install-html in convert" ; \
6084 + (cd $(HOST_SUBDIR)/convert && \
6085 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6086 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6087 + "RANLIB=$${RANLIB}" \
6088 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6094 +.PHONY: maybe-installcheck-convert installcheck-convert
6095 +maybe-installcheck-convert:
6097 +maybe-installcheck-convert: installcheck-convert
6099 +installcheck-convert: \
6101 + @: $(MAKE); $(unstage)
6102 + @[ -f ./convert/Makefile ] || exit 0; \
6103 + r=`${PWD_COMMAND}`; export r; \
6104 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6106 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6107 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6109 + echo "Doing installcheck in convert" ; \
6110 + (cd $(HOST_SUBDIR)/convert && \
6111 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6112 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6113 + "RANLIB=$${RANLIB}" \
6114 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6120 +.PHONY: maybe-mostlyclean-convert mostlyclean-convert
6121 +maybe-mostlyclean-convert:
6123 +maybe-mostlyclean-convert: mostlyclean-convert
6125 +mostlyclean-convert:
6126 + @: $(MAKE); $(unstage)
6127 + @[ -f ./convert/Makefile ] || exit 0; \
6128 + r=`${PWD_COMMAND}`; export r; \
6129 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6131 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6132 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6134 + echo "Doing mostlyclean in convert" ; \
6135 + (cd $(HOST_SUBDIR)/convert && \
6136 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6137 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6138 + "RANLIB=$${RANLIB}" \
6139 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6145 +.PHONY: maybe-clean-convert clean-convert
6146 +maybe-clean-convert:
6148 +maybe-clean-convert: clean-convert
6151 + @: $(MAKE); $(unstage)
6152 + @[ -f ./convert/Makefile ] || exit 0; \
6153 + r=`${PWD_COMMAND}`; export r; \
6154 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6156 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6157 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6159 + echo "Doing clean in convert" ; \
6160 + (cd $(HOST_SUBDIR)/convert && \
6161 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6162 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6163 + "RANLIB=$${RANLIB}" \
6164 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6170 +.PHONY: maybe-distclean-convert distclean-convert
6171 +maybe-distclean-convert:
6173 +maybe-distclean-convert: distclean-convert
6176 + @: $(MAKE); $(unstage)
6177 + @[ -f ./convert/Makefile ] || exit 0; \
6178 + r=`${PWD_COMMAND}`; export r; \
6179 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6181 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6182 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6184 + echo "Doing distclean in convert" ; \
6185 + (cd $(HOST_SUBDIR)/convert && \
6186 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6187 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6188 + "RANLIB=$${RANLIB}" \
6189 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6195 +.PHONY: maybe-maintainer-clean-convert maintainer-clean-convert
6196 +maybe-maintainer-clean-convert:
6198 +maybe-maintainer-clean-convert: maintainer-clean-convert
6200 +maintainer-clean-convert:
6201 + @: $(MAKE); $(unstage)
6202 + @[ -f ./convert/Makefile ] || exit 0; \
6203 + r=`${PWD_COMMAND}`; export r; \
6204 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
6206 + for flag in $(EXTRA_HOST_FLAGS) ; do \
6207 + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
6209 + echo "Doing maintainer-clean in convert" ; \
6210 + (cd $(HOST_SUBDIR)/convert && \
6211 + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
6212 + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
6213 + "RANLIB=$${RANLIB}" \
6214 + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
6215 + maintainer-clean) \
6222 .PHONY: configure-gnattools maybe-configure-gnattools
6223 maybe-configure-gnattools:
6225 @@ -55724,6 +56160,7 @@ all-sed: maybe-all-build-texinfo
6226 all-send-pr: maybe-all-prms
6227 all-tar: maybe-all-build-texinfo
6228 all-uudecode: maybe-all-build-texinfo
6229 +all-convert: maybe-all-libiberty
6230 configure-target-boehm-gc: maybe-configure-target-qthreads
6231 configure-target-boehm-gc: maybe-all-target-libstdc++-v3
6232 configure-target-fastjar: maybe-configure-target-zlib
6233 --- a/bfd/aout-adobe.c
6234 +++ b/bfd/aout-adobe.c
6235 @@ -467,6 +467,8 @@ aout_adobe_sizeof_headers (bfd *ignore_a
6236 #define aout_32_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
6237 #define aout_32_bfd_link_add_symbols _bfd_generic_link_add_symbols
6238 #define aout_32_bfd_link_just_syms _bfd_generic_link_just_syms
6239 +#define aout_32_bfd_copy_link_hash_symbol_type \
6240 + _bfd_generic_copy_link_hash_symbol_type
6241 #define aout_32_bfd_final_link _bfd_generic_final_link
6242 #define aout_32_bfd_link_split_section _bfd_generic_link_split_section
6244 --- a/bfd/aout-target.h
6245 +++ b/bfd/aout-target.h
6246 @@ -520,6 +520,10 @@ MY_bfd_final_link (bfd *abfd, struct bfd
6247 #ifndef MY_bfd_link_just_syms
6248 #define MY_bfd_link_just_syms _bfd_generic_link_just_syms
6250 +#ifndef MY_bfd_copy_link_hash_symbol_type
6251 +#define MY_bfd_copy_link_hash_symbol_type \
6252 + _bfd_generic_copy_link_hash_symbol_type
6254 #ifndef MY_bfd_link_split_section
6255 #define MY_bfd_link_split_section _bfd_generic_link_split_section
6257 --- a/bfd/aout-tic30.c
6258 +++ b/bfd/aout-tic30.c
6259 @@ -977,6 +977,10 @@ tic30_aout_set_arch_mach (bfd *abfd,
6260 #ifndef MY_bfd_link_just_syms
6261 #define MY_bfd_link_just_syms _bfd_generic_link_just_syms
6263 +#ifndef MY_bfd_copy_link_hash_symbol_type
6264 +#define MY_bfd_copy_link_hash_symbol_type \
6265 + _bfd_generic_copy_link_hash_symbol_type
6267 #ifndef MY_bfd_link_split_section
6268 #define MY_bfd_link_split_section _bfd_generic_link_split_section
6272 @@ -821,10 +821,19 @@ extern void bfd_elf32_arm_init_maps
6273 extern void bfd_elf32_arm_set_vfp11_fix
6274 (bfd *, struct bfd_link_info *);
6276 +extern void bfd_elf32_arm_validate_janus_2cc_fix
6277 + (bfd *, struct bfd_link_info *);
6279 +extern void bfd_elf32_arm_set_cortex_a8_fix
6280 + (bfd *, struct bfd_link_info *);
6282 extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
6283 (bfd *, struct bfd_link_info *);
6285 -extern void bfd_elf32_arm_vfp11_fix_veneer_locations
6286 +extern bfd_boolean bfd_elf32_arm_janus_2cc_erratum_scan
6287 + (bfd *, struct bfd_link_info *);
6289 +extern void bfd_elf32_arm_fix_veneer_locations
6290 (bfd *, struct bfd_link_info *);
6292 /* ARM Interworking support. Called from linker. */
6293 @@ -856,7 +865,7 @@ extern bfd_boolean bfd_elf32_arm_process
6295 void bfd_elf32_arm_set_target_relocs
6296 (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
6298 + int, int, int, int, int);
6300 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
6301 (bfd *, struct bfd_link_info *);
6302 @@ -894,7 +903,11 @@ extern bfd_boolean elf32_arm_size_stubs
6303 struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void));
6304 extern bfd_boolean elf32_arm_build_stubs
6305 (struct bfd_link_info *);
6308 +/* ARM unwind section editing support. */
6309 +extern bfd_boolean elf32_arm_fix_exidx_coverage
6310 + (struct bfd_section **, unsigned int, struct bfd_link_info *);
6312 /* TI COFF load page support. */
6313 extern void bfd_ticoff_set_section_load_page
6314 (struct bfd_section *, int);
6317 @@ -828,10 +828,19 @@ extern void bfd_elf32_arm_init_maps
6318 extern void bfd_elf32_arm_set_vfp11_fix
6319 (bfd *, struct bfd_link_info *);
6321 +extern void bfd_elf32_arm_validate_janus_2cc_fix
6322 + (bfd *, struct bfd_link_info *);
6324 +extern void bfd_elf32_arm_set_cortex_a8_fix
6325 + (bfd *, struct bfd_link_info *);
6327 extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
6328 (bfd *, struct bfd_link_info *);
6330 -extern void bfd_elf32_arm_vfp11_fix_veneer_locations
6331 +extern bfd_boolean bfd_elf32_arm_janus_2cc_erratum_scan
6332 + (bfd *, struct bfd_link_info *);
6334 +extern void bfd_elf32_arm_fix_veneer_locations
6335 (bfd *, struct bfd_link_info *);
6337 /* ARM Interworking support. Called from linker. */
6338 @@ -863,7 +872,7 @@ extern bfd_boolean bfd_elf32_arm_process
6340 void bfd_elf32_arm_set_target_relocs
6341 (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
6343 + int, int, int, int, int);
6345 extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
6346 (bfd *, struct bfd_link_info *);
6347 @@ -901,7 +910,11 @@ extern bfd_boolean elf32_arm_size_stubs
6348 struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void));
6349 extern bfd_boolean elf32_arm_build_stubs
6350 (struct bfd_link_info *);
6353 +/* ARM unwind section editing support. */
6354 +extern bfd_boolean elf32_arm_fix_exidx_coverage
6355 + (struct bfd_section **, unsigned int, struct bfd_link_info *);
6357 /* TI COFF load page support. */
6358 extern void bfd_ticoff_set_section_load_page
6359 (struct bfd_section *, int);
6360 @@ -5406,6 +5419,7 @@ typedef struct bfd_target
6361 NAME##_bfd_link_hash_table_free, \
6362 NAME##_bfd_link_add_symbols, \
6363 NAME##_bfd_link_just_syms, \
6364 + NAME##_bfd_copy_link_hash_symbol_type, \
6365 NAME##_bfd_final_link, \
6366 NAME##_bfd_link_split_section, \
6367 NAME##_bfd_gc_sections, \
6368 @@ -5436,6 +5450,12 @@ typedef struct bfd_target
6369 /* Indicate that we are only retrieving symbol values from this section. */
6370 void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
6372 + /* Copy the symbol type of a linker hash table entry. */
6373 +#define bfd_copy_link_hash_symbol_type(b, t, f) \
6374 + BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
6375 + void (*_bfd_copy_link_hash_symbol_type)
6376 + (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
6378 /* Do a link based on the link_order structures attached to each
6379 section of the BFD. */
6380 bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
6383 @@ -319,6 +319,8 @@ binary_sizeof_headers (bfd *abfd ATTRIBU
6384 #define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
6385 #define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
6386 #define binary_bfd_link_just_syms _bfd_generic_link_just_syms
6387 +#define binary_bfd_copy_link_hash_symbol_type \
6388 + _bfd_generic_copy_link_hash_symbol_type
6389 #define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols
6390 #define binary_bfd_final_link _bfd_generic_final_link
6391 #define binary_bfd_link_split_section _bfd_generic_link_split_section
6394 @@ -1382,6 +1382,8 @@ b_out_bfd_get_relocated_section_contents
6395 #define b_out_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
6396 #define b_out_bfd_link_add_symbols _bfd_generic_link_add_symbols
6397 #define b_out_bfd_link_just_syms _bfd_generic_link_just_syms
6398 +#define b_out_bfd_copy_link_hash_symbol_type \
6399 + _bfd_generic_copy_link_hash_symbol_type
6400 #define b_out_bfd_final_link _bfd_generic_final_link
6401 #define b_out_bfd_link_split_section _bfd_generic_link_split_section
6402 #define b_out_bfd_gc_sections bfd_generic_gc_sections
6405 @@ -120,6 +120,13 @@ bfd_cache_delete (bfd *abfd)
6407 if (fclose ((FILE *) abfd->iostream) == 0)
6409 + /* ClearCase has an entertaining bug where close will fail and set
6410 + errno to EROFS when applied to any file in a read-only view, even
6411 + if the file was opened for reading. Detect this situation and
6412 + ignore the error. */
6413 + else if (errno == EROFS && (abfd->direction == no_direction
6414 + || abfd->direction == read_direction))
6419 --- a/bfd/coff-arm.c
6420 +++ b/bfd/coff-arm.c
6421 @@ -2208,7 +2208,7 @@ coff_arm_merge_private_bfd_data (bfd * i
6424 /* xgettext: c-format */
6425 - (_("ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"),
6426 + (_("error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"),
6428 APCS_26_FLAG (ibfd) ? 26 : 32,
6429 APCS_26_FLAG (obfd) ? 26 : 32
6430 @@ -2224,10 +2224,10 @@ coff_arm_merge_private_bfd_data (bfd * i
6432 if (APCS_FLOAT_FLAG (ibfd))
6433 /* xgettext: c-format */
6434 - msg = _("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers");
6435 + msg = _("error: %B passes floats in float registers, whereas %B passes them in integer registers");
6437 /* xgettext: c-format */
6438 - msg = _("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers");
6439 + msg = _("error: %B passes floats in integer registers, whereas %B passes them in float registers");
6441 _bfd_error_handler (msg, ibfd, obfd);
6443 @@ -2241,10 +2241,10 @@ coff_arm_merge_private_bfd_data (bfd * i
6445 if (PIC_FLAG (ibfd))
6446 /* xgettext: c-format */
6447 - msg = _("ERROR: %B is compiled as position independent code, whereas target %B is absolute position");
6448 + msg = _("error: %B is compiled as position independent code, whereas target %B is absolute position");
6450 /* xgettext: c-format */
6451 - msg = _("ERROR: %B is compiled as absolute position code, whereas target %B is position independent");
6452 + msg = _("error: %B is compiled as absolute position code, whereas target %B is position independent");
6453 _bfd_error_handler (msg, ibfd, obfd);
6455 bfd_set_error (bfd_error_wrong_format);
6456 --- a/bfd/coff-rs6000.c
6457 +++ b/bfd/coff-rs6000.c
6458 @@ -4212,6 +4212,7 @@ const bfd_target rs6000coff_vec =
6459 _bfd_generic_link_hash_table_free,
6460 _bfd_xcoff_bfd_link_add_symbols,
6461 _bfd_generic_link_just_syms,
6462 + _bfd_generic_copy_link_hash_symbol_type,
6463 _bfd_xcoff_bfd_final_link,
6464 _bfd_generic_link_split_section,
6465 bfd_generic_gc_sections,
6466 @@ -4464,6 +4465,7 @@ const bfd_target pmac_xcoff_vec =
6467 _bfd_generic_link_hash_table_free,
6468 _bfd_xcoff_bfd_link_add_symbols,
6469 _bfd_generic_link_just_syms,
6470 + _bfd_generic_copy_link_hash_symbol_type,
6471 _bfd_xcoff_bfd_final_link,
6472 _bfd_generic_link_split_section,
6473 bfd_generic_gc_sections,
6474 --- a/bfd/coff64-rs6000.c
6475 +++ b/bfd/coff64-rs6000.c
6476 @@ -2762,6 +2762,7 @@ const bfd_target rs6000coff64_vec =
6477 _bfd_generic_link_hash_table_free,
6478 _bfd_xcoff_bfd_link_add_symbols,
6479 _bfd_generic_link_just_syms,
6480 + _bfd_generic_copy_link_hash_symbol_type,
6481 _bfd_xcoff_bfd_final_link,
6482 _bfd_generic_link_split_section,
6483 bfd_generic_gc_sections,
6484 @@ -3015,6 +3016,7 @@ const bfd_target aix5coff64_vec =
6485 _bfd_generic_link_hash_table_free,
6486 _bfd_xcoff_bfd_link_add_symbols,
6487 _bfd_generic_link_just_syms,
6488 + _bfd_generic_copy_link_hash_symbol_type,
6489 _bfd_xcoff_bfd_final_link,
6490 _bfd_generic_link_split_section,
6491 bfd_generic_gc_sections,
6492 --- a/bfd/coffcode.h
6493 +++ b/bfd/coffcode.h
6494 @@ -5169,6 +5169,8 @@ dummy_reloc16_extra_cases (bfd *abfd ATT
6495 #endif /* ! defined (coff_relocate_section) */
6497 #define coff_bfd_link_just_syms _bfd_generic_link_just_syms
6498 +#define coff_bfd_copy_link_hash_symbol_type \
6499 + _bfd_generic_copy_link_hash_symbol_type
6500 #define coff_bfd_link_split_section _bfd_generic_link_split_section
6502 #ifndef coff_start_final_link
6503 --- a/bfd/config.bfd
6504 +++ b/bfd/config.bfd
6505 @@ -959,6 +959,10 @@ case "${targ}" in
6506 targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
6509 + mips64octeon*-*-elf*)
6510 + targ_defvec=bfd_elf32_tradbigmips_vec
6511 + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
6513 mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
6514 targ_defvec=bfd_elf32_littlemips_vec
6515 targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
6516 @@ -1000,12 +1004,12 @@ case "${targ}" in
6519 targ_defvec=bfd_elf32_tradlittlemips_vec
6520 - targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
6521 + targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
6525 targ_defvec=bfd_elf32_tradbigmips_vec
6526 - targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
6527 + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
6533 @@ -187,7 +187,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *
6534 || out == bfd_mach_arm_iWMMXt2))
6536 _bfd_error_handler (_("\
6537 -ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
6538 +error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
6540 bfd_set_error (bfd_error_wrong_format);
6542 @@ -198,7 +198,7 @@ ERROR: %B is compiled for the EP9312, wh
6543 || in == bfd_mach_arm_iWMMXt2))
6545 _bfd_error_handler (_("\
6546 -ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
6547 +error: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
6549 bfd_set_error (bfd_error_wrong_format);
6553 @@ -417,48 +417,47 @@ read_section (bfd * abfd,
6554 bfd_boolean section_is_compressed = FALSE;
6556 /* read_section is a noop if the section has already been read. */
6557 - if (*section_buffer)
6560 - msec = bfd_get_section_by_name (abfd, section_name);
6561 - if (! msec && compressed_section_name)
6563 - msec = bfd_get_section_by_name (abfd, compressed_section_name);
6564 - section_is_compressed = TRUE;
6567 + if (!*section_buffer)
6569 - (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."), section_name);
6570 - bfd_set_error (bfd_error_bad_value);
6573 + msec = bfd_get_section_by_name (abfd, section_name);
6574 + if (! msec && compressed_section_name)
6576 + msec = bfd_get_section_by_name (abfd, compressed_section_name);
6577 + section_is_compressed = TRUE;
6581 + (*_bfd_error_handler) (_("Dwarf Error: Can't find %s section."), section_name);
6582 + bfd_set_error (bfd_error_bad_value);
6588 - *section_size = msec->size;
6590 - = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms);
6591 - if (! *section_buffer)
6596 *section_size = msec->rawsize ? msec->rawsize : msec->size;
6597 - *section_buffer = bfd_malloc (*section_size);
6598 - if (! *section_buffer)
6600 - if (! bfd_get_section_contents (abfd, msec, *section_buffer,
6601 - 0, *section_size))
6607 + = bfd_simple_get_relocated_section_contents (abfd, msec, NULL, syms);
6608 + if (! *section_buffer)
6613 + *section_buffer = bfd_malloc (*section_size);
6614 + if (! *section_buffer)
6616 + if (! bfd_get_section_contents (abfd, msec, *section_buffer,
6617 + 0, *section_size))
6621 - if (section_is_compressed)
6623 - if (! bfd_uncompress_section_contents (section_buffer, section_size))
6624 + if (section_is_compressed)
6626 - (*_bfd_error_handler) (_("Dwarf Error: unable to decompress %s section."), compressed_section_name);
6627 - bfd_set_error (bfd_error_bad_value);
6629 + if (! bfd_uncompress_section_contents (section_buffer, section_size))
6631 + (*_bfd_error_handler) (_("Dwarf Error: unable to decompress %s section."), compressed_section_name);
6632 + bfd_set_error (bfd_error_bad_value);
6638 --- a/bfd/elf-attrs.c
6639 +++ b/bfd/elf-attrs.c
6640 @@ -564,7 +564,7 @@ _bfd_elf_merge_object_attributes (bfd *i
6641 if (in_attr->i > 0 && strcmp (in_attr->s, "gnu") != 0)
6644 - (_("ERROR: %B: Must be processed by '%s' toolchain"),
6645 + (_("error: %B: Must be processed by '%s' toolchain"),
6649 @@ -572,7 +572,7 @@ _bfd_elf_merge_object_attributes (bfd *i
6650 if (in_attr->i != out_attr->i
6651 || (in_attr->i != 0 && strcmp (in_attr->s, out_attr->s) != 0))
6653 - _bfd_error_handler (_("ERROR: %B: Object tag '%d, %s' is "
6654 + _bfd_error_handler (_("error: %B: Object tag '%d, %s' is "
6655 "incompatible with tag '%d, %s'"),
6657 in_attr->i, in_attr->s ? in_attr->s : "",
6660 @@ -1705,6 +1705,8 @@ extern asection *_bfd_elf_check_kept_sec
6661 (asection *, struct bfd_link_info *);
6662 extern void _bfd_elf_link_just_syms
6663 (asection *, struct bfd_link_info *);
6664 +extern void _bfd_elf_copy_link_hash_symbol_type
6665 + (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
6666 extern bfd_boolean _bfd_elf_copy_private_header_data
6668 extern bfd_boolean _bfd_elf_copy_private_symbol_data
6669 --- a/bfd/elf32-arm.c
6670 +++ b/bfd/elf32-arm.c
6672 MA 02110-1301, USA. */
6675 +#include <limits.h>
6678 #include "libiberty.h"
6682 static struct elf_backend_data elf32_arm_vxworks_bed;
6684 +static bfd_boolean elf32_arm_write_section (bfd *output_bfd,
6685 + struct bfd_link_info *link_info,
6687 + bfd_byte *contents);
6689 /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g.
6690 R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
6692 @@ -1881,7 +1888,8 @@ typedef unsigned short int insn16;
6694 #define INTERWORK_FLAG(abfd) \
6695 (EF_ARM_EABI_VERSION (elf_elfheader (abfd)->e_flags) >= EF_ARM_EABI_VER4 \
6696 - || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK))
6697 + || (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK) \
6698 + || ((abfd)->flags & BFD_LINKER_CREATED))
6700 /* The linker script knows the section names for placement.
6701 The entry_names are used to do simple name mangling on the stubs.
6702 @@ -1894,7 +1902,12 @@ typedef unsigned short int insn16;
6703 #define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm"
6705 #define VFP11_ERRATUM_VENEER_SECTION_NAME ".vfp11_veneer"
6706 -#define VFP11_ERRATUM_VENEER_ENTRY_NAME "__vfp11_veneer_%x"
6707 +#define VFP11_ERRATUM_VENEER_ENTRY_NAME "__vfp11_veneer_%x%s"
6709 +#define JANUS_2CC_ERRATUM_VENEER_SECTION_NAME ".janus_2cc_veneer"
6710 +#define JANUS_2CC_ERRATUM_VENEER_ENTRY_NAME "__janus_2cc_veneer_%x%s"
6712 +#define MAX_ERRATUM_SYMBOL_LENGTH 64
6714 #define ARM_BX_GLUE_SECTION_NAME ".v4_bx"
6715 #define ARM_BX_GLUE_ENTRY_NAME "__bx_r%d"
6716 @@ -2010,53 +2023,129 @@ static const bfd_vma elf32_arm_symbian_p
6717 #define THM2_MAX_FWD_BRANCH_OFFSET (((1 << 24) - 2) + 4)
6718 #define THM2_MAX_BWD_BRANCH_OFFSET (-(1 << 24) + 4)
6720 -static const bfd_vma arm_long_branch_stub[] =
6721 +enum stub_insn_type
6723 - 0xe51ff004, /* ldr pc, [pc, #-4] */
6724 - 0x00000000, /* dcd R_ARM_ABS32(X) */
6731 +#define THUMB16_INSN(X) {(X), THUMB16_TYPE, R_ARM_NONE, 0}
6732 +/* A bit of a hack. A Thumb conditional branch, in which the proper condition
6733 + is inserted in arm_build_one_stub(). */
6734 +#define THUMB16_BCOND_INSN(X) {(X), THUMB16_TYPE, R_ARM_NONE, 1}
6735 +#define THUMB32_INSN(X) {(X), THUMB32_TYPE, R_ARM_NONE, 0}
6736 +#define THUMB32_B_INSN(X, Z) {(X), THUMB32_TYPE, R_ARM_THM_JUMP24, (Z)}
6737 +#define ARM_INSN(X) {(X), ARM_TYPE, R_ARM_NONE, 0}
6738 +#define ARM_REL_INSN(X, Z) {(X), ARM_TYPE, R_ARM_JUMP24, (Z)}
6739 +#define DATA_WORD(X,Y,Z) {(X), DATA_TYPE, (Y), (Z)}
6744 + enum stub_insn_type type;
6745 + unsigned int reloc_type;
6749 +/* Arm/Thumb -> Arm/Thumb long branch stub. On V5T and above, use blx
6750 + to reach the stub if necessary. */
6751 +static const insn_sequence elf32_arm_stub_long_branch_any_any[] =
6753 + ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */
6754 + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
6757 +/* V4T Arm -> Thumb long branch stub. Used on V4T where blx is not
6759 +static const insn_sequence elf32_arm_stub_long_branch_v4t_arm_thumb[] =
6761 + ARM_INSN(0xe59fc000), /* ldr ip, [pc, #0] */
6762 + ARM_INSN(0xe12fff1c), /* bx ip */
6763 + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
6766 +/* Thumb -> Thumb long branch stub. Used on architectures which
6767 + support only this mode, or on V4T where it is expensive to switch
6769 +static const insn_sequence elf32_arm_stub_long_branch_thumb_only[] =
6771 + THUMB16_INSN(0xb401), /* push {r0} */
6772 + THUMB16_INSN(0x4802), /* ldr r0, [pc, #8] */
6773 + THUMB16_INSN(0x4684), /* mov ip, r0 */
6774 + THUMB16_INSN(0xbc01), /* pop {r0} */
6775 + THUMB16_INSN(0x4760), /* bx ip */
6776 + THUMB16_INSN(0xbf00), /* nop */
6777 + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
6780 +/* V4T Thumb -> ARM long branch stub. Used on V4T where blx is not
6782 +static const insn_sequence elf32_arm_stub_long_branch_v4t_thumb_arm[] =
6784 + THUMB16_INSN(0x4778), /* bx pc */
6785 + THUMB16_INSN(0x46c0), /* nop */
6786 + ARM_INSN(0xe51ff004), /* ldr pc, [pc, #-4] */
6787 + DATA_WORD(0, R_ARM_ABS32, 0), /* dcd R_ARM_ABS32(X) */
6790 -static const bfd_vma arm_thumb_v4t_long_branch_stub[] =
6791 +/* V4T Thumb -> ARM short branch stub. Shorter variant of the above
6792 + one, when the destination is close enough. */
6793 +static const insn_sequence elf32_arm_stub_short_branch_v4t_thumb_arm[] =
6795 - 0xe59fc000, /* ldr ip, [pc, #0] */
6796 - 0xe12fff1c, /* bx ip */
6797 - 0x00000000, /* dcd R_ARM_ABS32(X) */
6798 + THUMB16_INSN(0x4778), /* bx pc */
6799 + THUMB16_INSN(0x46c0), /* nop */
6800 + ARM_REL_INSN(0xea000000, -8), /* b (X-8) */
6803 -static const bfd_vma arm_thumb_thumb_long_branch_stub[] =
6804 +/* ARM/Thumb -> ARM long branch stub, PIC. On V5T and above, use
6805 + blx to reach the stub if necessary. */
6806 +static const insn_sequence elf32_arm_stub_long_branch_any_arm_pic[] =
6808 - 0x4e02b540, /* push {r6, lr} */
6809 - /* ldr r6, [pc, #8] */
6810 - 0x473046fe, /* mov lr, pc */
6812 - 0xbf00bd40, /* pop {r6, pc} */
6814 - 0x00000000, /* dcd R_ARM_ABS32(X) */
6815 + ARM_INSN(0xe59fc000), /* ldr r12, [pc] */
6816 + ARM_INSN(0xe08ff00c), /* add pc, pc, ip */
6817 + DATA_WORD(0, R_ARM_REL32, -4), /* dcd R_ARM_REL32(X-4) */
6820 -static const bfd_vma arm_thumb_arm_v4t_long_branch_stub[] =
6821 +/* ARM/Thumb -> Thumb long branch stub, PIC. On V5T and above, use
6822 + blx to reach the stub if necessary. We can not add into pc;
6823 + it is not guaranteed to mode switch (different in ARMv6 and
6825 +static const insn_sequence elf32_arm_stub_long_branch_any_thumb_pic[] =
6827 + ARM_INSN(0xe59fc004), /* ldr r12, [pc, #4] */
6828 + ARM_INSN(0xe08fc00c), /* add ip, pc, ip */
6829 + ARM_INSN(0xe12fff1c), /* bx ip */
6830 + DATA_WORD(0, R_ARM_REL32, 0), /* dcd R_ARM_REL32(X) */
6833 +/* Cortex-A8 erratum-workaround stubs. */
6835 +/* Stub used for conditional branches (which may be beyond +/-1MB away, so we
6836 + can't use a conditional branch to reach this stub). */
6838 +static const insn_sequence elf32_arm_stub_a8_veneer_b_cond[] =
6840 - 0x4e03b540, /* push {r6, lr} */
6841 - /* ldr r6, [pc, #12] */
6842 - 0x473046fe, /* mov lr, pc */
6844 - 0xe8bd4040, /* pop {r6, pc} */
6845 - 0xe12fff1e, /* bx lr */
6846 - 0x00000000, /* dcd R_ARM_ABS32(X) */
6847 + THUMB16_BCOND_INSN(0xd001), /* b<cond>.n true. */
6848 + THUMB32_B_INSN(0xf000b800, -4), /* b.w insn_after_original_branch. */
6849 + THUMB32_B_INSN(0xf000b800, -4) /* b.w original_branch_dest. */
6852 -static const bfd_vma arm_thumb_arm_v4t_short_branch_stub[] =
6853 +/* Stub used for b.w and bl.w instructions. */
6855 +static const insn_sequence elf32_arm_stub_a8_veneer_b[] =
6857 - 0x46c04778, /* bx pc */
6859 - 0xea000000, /* b (X) */
6860 + THUMB32_B_INSN(0xf000b800, -4)
6863 -static const bfd_vma arm_pic_long_branch_stub[] =
6864 +/* Stub used for Thumb-2 blx.w instructions. We modified the original blx.w
6865 + instruction to point to this stub, which switches to ARM mode. Jump to the
6866 + real destination using an ARM-mode branch. */
6868 +static const insn_sequence elf32_arm_stub_a8_veneer_blx[] =
6870 - 0xe59fc000, /* ldr r12, [pc] */
6871 - 0xe08ff00c, /* add pc, pc, ip */
6872 - 0x00000000, /* dcd R_ARM_REL32(X) */
6873 + ARM_REL_INSN(0xea000000, -8)
6876 /* Section name for stubs is the associated section name plus this
6877 @@ -2066,12 +2155,17 @@ static const bfd_vma arm_pic_long_branch
6878 enum elf32_arm_stub_type
6881 - arm_stub_long_branch,
6882 - arm_thumb_v4t_stub_long_branch,
6883 - arm_thumb_thumb_stub_long_branch,
6884 - arm_thumb_arm_v4t_stub_long_branch,
6885 - arm_thumb_arm_v4t_stub_short_branch,
6886 - arm_stub_pic_long_branch,
6887 + arm_stub_long_branch_any_any,
6888 + arm_stub_long_branch_v4t_arm_thumb,
6889 + arm_stub_long_branch_thumb_only,
6890 + arm_stub_long_branch_v4t_thumb_arm,
6891 + arm_stub_short_branch_v4t_thumb_arm,
6892 + arm_stub_long_branch_any_arm_pic,
6893 + arm_stub_long_branch_any_thumb_pic,
6894 + arm_stub_a8_veneer_b_cond,
6895 + arm_stub_a8_veneer_b,
6896 + arm_stub_a8_veneer_bl,
6897 + arm_stub_a8_veneer_blx
6900 struct elf32_arm_stub_hash_entry
6901 @@ -2090,7 +2184,21 @@ struct elf32_arm_stub_hash_entry
6902 bfd_vma target_value;
6903 asection *target_section;
6905 + /* Offset to apply to relocation referencing target_value. */
6906 + bfd_vma target_addend;
6908 + /* The instruction which caused this stub to be generated (only valid for
6909 + Cortex-A8 erratum workaround stubs at present). */
6910 + unsigned long orig_insn;
6912 + /* The stub type. */
6913 enum elf32_arm_stub_type stub_type;
6914 + /* Its encoding size in bytes. */
6916 + /* Its template. */
6917 + const insn_sequence *stub_template;
6918 + /* The size of the template (number of entries). */
6919 + int stub_template_size;
6921 /* The symbol table entry, if any, that this was derived from. */
6922 struct elf32_arm_link_hash_entry *h;
6923 @@ -2124,43 +2232,111 @@ typedef enum
6925 VFP11_ERRATUM_BRANCH_TO_ARM_VENEER,
6926 VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER,
6927 + JANUS_2CC_ERRATUM_BRANCH_TO_ARM_VENEER,
6928 VFP11_ERRATUM_ARM_VENEER,
6929 - VFP11_ERRATUM_THUMB_VENEER
6930 + VFP11_ERRATUM_THUMB_VENEER,
6931 + JANUS_2CC_ERRATUM_ARM_VENEER
6933 -elf32_vfp11_erratum_type;
6934 +elf32_cpu_erratum_type;
6936 -typedef struct elf32_vfp11_erratum_list
6937 +typedef struct elf32_cpu_erratum_list
6939 - struct elf32_vfp11_erratum_list *next;
6940 + struct elf32_cpu_erratum_list *next;
6946 - struct elf32_vfp11_erratum_list *veneer;
6947 - unsigned int vfp_insn;
6948 + struct elf32_cpu_erratum_list *veneer;
6949 + unsigned int orig_insn;
6953 - struct elf32_vfp11_erratum_list *branch;
6954 + struct elf32_cpu_erratum_list *branch;
6958 - elf32_vfp11_erratum_type type;
6959 + elf32_cpu_erratum_type type;
6961 +elf32_cpu_erratum_list;
6965 + DELETE_EXIDX_ENTRY,
6966 + INSERT_EXIDX_CANTUNWIND_AT_END
6968 -elf32_vfp11_erratum_list;
6969 +arm_unwind_edit_type;
6971 +/* A (sorted) list of edits to apply to an unwind table. */
6972 +typedef struct arm_unwind_table_edit
6974 + arm_unwind_edit_type type;
6975 + /* Note: we sometimes want to insert an unwind entry corresponding to a
6976 + section different from the one we're currently writing out, so record the
6977 + (text) section this edit relates to here. */
6978 + asection *linked_section;
6979 + unsigned int index;
6980 + struct arm_unwind_table_edit *next;
6982 +arm_unwind_table_edit;
6984 typedef struct _arm_elf_section_data
6986 + /* Information about mapping symbols. */
6987 struct bfd_elf_section_data elf;
6988 unsigned int mapcount;
6989 unsigned int mapsize;
6990 elf32_arm_section_map *map;
6991 + /* Information about CPU errata. */
6992 unsigned int erratumcount;
6993 - elf32_vfp11_erratum_list *erratumlist;
6994 + elf32_cpu_erratum_list *erratumlist;
6995 + /* Information about unwind tables. */
6998 + /* Unwind info attached to a text section. */
7001 + asection *arm_exidx_sec;
7004 + /* Unwind info attached to an .ARM.exidx section. */
7007 + arm_unwind_table_edit *unwind_edit_list;
7008 + arm_unwind_table_edit *unwind_edit_tail;
7012 _arm_elf_section_data;
7014 +/* A fix which might be required for Cortex-A8 Thumb-2 branch/TLB erratum.
7015 + These fixes are subject to a relaxation procedure (in elf32_arm_size_stubs),
7016 + so may be created multiple times: we use an array of these entries whilst
7017 + relaxing which we can refresh easily, then create stubs for each potentially
7018 + erratum-triggering instruction once we've settled on a solution. */
7020 +struct a8_erratum_fix {
7022 + asection *section;
7025 + unsigned long orig_insn;
7027 + enum elf32_arm_stub_type stub_type;
7030 +/* A table of relocs applied to branches which might trigger Cortex-A8
7033 +struct a8_erratum_reloc {
7035 + bfd_vma destination;
7036 + unsigned int r_type;
7037 + unsigned char st_type;
7038 + const char *sym_name;
7039 + bfd_boolean non_a8_stub;
7042 #define elf32_arm_section_data(sec) \
7043 ((_arm_elf_section_data *) elf_section_data (sec))
7045 @@ -2295,6 +2471,16 @@ struct elf32_arm_link_hash_table
7047 bfd_size_type vfp11_erratum_glue_size;
7049 + /* The size in bytes of the section containing glue for Janus 2CC erratum
7051 + bfd_size_type janus_2cc_erratum_glue_size;
7053 + /* A table of fix locations for Cortex-A8 Thumb-2 branch/TLB erratum. This
7054 + holds Cortex-A8 erratum fix locations between elf32_arm_size_stubs() and
7055 + elf32_arm_write_section(). */
7056 + struct a8_erratum_fix *a8_erratum_fixes;
7057 + unsigned int num_a8_erratum_fixes;
7059 /* An arbitrary input BFD chosen to hold the glue sections. */
7060 bfd * bfd_of_glue_owner;
7062 @@ -2313,6 +2499,15 @@ struct elf32_arm_link_hash_table
7063 2 = Generate v4 interworing stubs. */
7066 + /* Whether we should fix/report Janus 2CC errata for ARM/Thumb. */
7067 + int fix_janus_2cc;
7069 + /* Whether we should fix the Cortex-A8 Thumb-2 branch/TLB erratum. */
7070 + int fix_cortex_a8;
7072 + /* Global counter for the number of fixes we have emitted. */
7073 + int num_errata_fixes;
7075 /* Nonzero if the ARM/Thumb BLX instructions are available for use. */
7078 @@ -2459,6 +2654,9 @@ stub_hash_newfunc (struct bfd_hash_entry
7079 eh->target_value = 0;
7080 eh->target_section = NULL;
7081 eh->stub_type = arm_stub_none;
7082 + eh->stub_size = 0;
7083 + eh->stub_template = NULL;
7084 + eh->stub_template_size = 0;
7088 @@ -2648,7 +2846,10 @@ elf32_arm_link_hash_table_create (bfd *a
7089 memset (ret->bx_glue_offset, 0, sizeof (ret->bx_glue_offset));
7090 ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
7091 ret->vfp11_erratum_glue_size = 0;
7092 - ret->num_vfp11_fixes = 0;
7093 + ret->fix_janus_2cc = 0;
7094 + ret->fix_cortex_a8 = 0;
7095 + ret->janus_2cc_erratum_glue_size = 0;
7096 + ret->num_errata_fixes = 0;
7097 ret->bfd_of_glue_owner = NULL;
7098 ret->byteswap_code = 0;
7099 ret->target1_is_rel = 0;
7100 @@ -2731,9 +2932,9 @@ arm_stub_is_thumb (enum elf32_arm_stub_t
7104 - case arm_thumb_thumb_stub_long_branch:
7105 - case arm_thumb_arm_v4t_stub_long_branch:
7106 - case arm_thumb_arm_v4t_stub_short_branch:
7107 + case arm_stub_long_branch_thumb_only:
7108 + case arm_stub_long_branch_v4t_thumb_arm:
7109 + case arm_stub_short_branch_v4t_thumb_arm:
7113 @@ -2806,20 +3007,27 @@ arm_type_of_stub (struct bfd_link_info *
7116 stub_type = (info->shared | globals->pic_veneer)
7118 ? ((globals->use_blx)
7119 - ? arm_stub_pic_long_branch
7120 + /* V5T and above. */
7121 + ? arm_stub_long_branch_any_thumb_pic
7122 + /* not yet supported on V4T. */
7124 - : (globals->use_blx)
7125 - ? arm_stub_long_branch
7128 + /* non-PIC stubs. */
7129 + : ((globals->use_blx)
7130 + /* V5T and above. */
7131 + ? arm_stub_long_branch_any_any
7133 + : arm_stub_long_branch_thumb_only);
7137 stub_type = (info->shared | globals->pic_veneer)
7138 + /* PIC stub not yet supported on V4T. */
7140 - : (globals->use_blx)
7141 - ? arm_thumb_thumb_stub_long_branch
7143 + /* non-PIC stub. */
7144 + : arm_stub_long_branch_thumb_only;
7148 @@ -2836,18 +3044,25 @@ arm_type_of_stub (struct bfd_link_info *
7151 stub_type = (info->shared | globals->pic_veneer)
7153 ? ((globals->use_blx)
7154 - ? arm_stub_pic_long_branch
7155 + /* V5T and above. */
7156 + ? arm_stub_long_branch_any_arm_pic
7157 + /* not yet supported on V4T. */
7159 - : (globals->use_blx)
7160 - ? arm_stub_long_branch
7161 - : arm_thumb_arm_v4t_stub_long_branch;
7163 + /* non-PIC stubs. */
7164 + : ((globals->use_blx)
7165 + /* V5T and above. */
7166 + ? arm_stub_long_branch_any_any
7168 + : arm_stub_long_branch_v4t_thumb_arm);
7170 /* Handle v4t short branches. */
7171 - if ((stub_type == arm_thumb_arm_v4t_stub_long_branch)
7172 + if ((stub_type == arm_stub_long_branch_v4t_thumb_arm)
7173 && (branch_offset <= THM_MAX_FWD_BRANCH_OFFSET)
7174 && (branch_offset >= THM_MAX_BWD_BRANCH_OFFSET))
7175 - stub_type = arm_thumb_arm_v4t_stub_short_branch;
7176 + stub_type = arm_stub_short_branch_v4t_thumb_arm;
7180 @@ -2863,7 +3078,7 @@ arm_type_of_stub (struct bfd_link_info *
7182 (*_bfd_error_handler)
7183 (_("%B(%s): warning: interworking not enabled.\n"
7184 - " first occurrence: %B: Thumb call to ARM"),
7185 + " first occurrence: %B: ARM call to Thumb"),
7186 sym_sec->owner, input_bfd, name);
7189 @@ -2874,10 +3089,14 @@ arm_type_of_stub (struct bfd_link_info *
7190 || !globals->use_blx)
7192 stub_type = (info->shared | globals->pic_veneer)
7193 - ? arm_stub_pic_long_branch
7194 - : (globals->use_blx)
7195 - ? arm_stub_long_branch
7196 - : arm_thumb_v4t_stub_long_branch;
7198 + ? arm_stub_long_branch_any_thumb_pic
7199 + /* non-PIC stubs. */
7200 + : ((globals->use_blx)
7201 + /* V5T and above. */
7202 + ? arm_stub_long_branch_any_any
7204 + : arm_stub_long_branch_v4t_arm_thumb);
7208 @@ -2887,8 +3106,10 @@ arm_type_of_stub (struct bfd_link_info *
7209 || (branch_offset < ARM_MAX_BWD_BRANCH_OFFSET))
7211 stub_type = (info->shared | globals->pic_veneer)
7212 - ? arm_stub_pic_long_branch
7213 - : arm_stub_long_branch;
7215 + ? arm_stub_long_branch_any_arm_pic
7216 + /* non-PIC stubs. */
7217 + : arm_stub_long_branch_any_any;
7221 @@ -3064,10 +3285,16 @@ put_thumb_insn (struct elf32_arm_link_ha
7222 bfd_putb16 (val, ptr);
7225 +static bfd_reloc_status_type elf32_arm_final_link_relocate
7226 + (reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *,
7227 + Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *,
7228 + const char *, int, struct elf_link_hash_entry *, bfd_boolean *, char **);
7231 arm_build_one_stub (struct bfd_hash_entry *gen_entry,
7234 +#define MAXRELOCS 2
7235 struct elf32_arm_stub_hash_entry *stub_entry;
7236 struct bfd_link_info *info;
7237 struct elf32_arm_link_hash_table *htab;
7238 @@ -3078,9 +3305,12 @@ arm_build_one_stub (struct bfd_hash_entr
7242 - const bfd_vma *template;
7243 + const insn_sequence *template;
7245 struct elf32_arm_link_hash_table * globals;
7246 + int stub_reloc_idx[MAXRELOCS] = {-1, -1};
7247 + int stub_reloc_offset[MAXRELOCS] = {0, 0};
7250 /* Massage our args to the form they really have. */
7251 stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
7252 @@ -3106,102 +3336,229 @@ arm_build_one_stub (struct bfd_hash_entr
7253 + stub_entry->target_section->output_offset
7254 + stub_entry->target_section->output_section->vma);
7256 - switch (stub_entry->stub_type)
7258 - case arm_stub_long_branch:
7259 - template = arm_long_branch_stub;
7260 - template_size = (sizeof (arm_long_branch_stub) / sizeof (bfd_vma)) * 4;
7262 - case arm_thumb_v4t_stub_long_branch:
7263 - template = arm_thumb_v4t_long_branch_stub;
7264 - template_size = (sizeof (arm_thumb_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4;
7266 - case arm_thumb_thumb_stub_long_branch:
7267 - template = arm_thumb_thumb_long_branch_stub;
7268 - template_size = (sizeof (arm_thumb_thumb_long_branch_stub) / sizeof (bfd_vma)) * 4;
7270 - case arm_thumb_arm_v4t_stub_long_branch:
7271 - template = arm_thumb_arm_v4t_long_branch_stub;
7272 - template_size = (sizeof (arm_thumb_arm_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4;
7274 - case arm_thumb_arm_v4t_stub_short_branch:
7275 - template = arm_thumb_arm_v4t_short_branch_stub;
7276 - template_size = (sizeof(arm_thumb_arm_v4t_short_branch_stub) / sizeof (bfd_vma)) * 4;
7278 - case arm_stub_pic_long_branch:
7279 - template = arm_pic_long_branch_stub;
7280 - template_size = (sizeof (arm_pic_long_branch_stub) / sizeof (bfd_vma)) * 4;
7286 + template = stub_entry->stub_template;
7287 + template_size = stub_entry->stub_template_size;
7290 - for (i = 0; i < (template_size / 4); i++)
7291 + for (i = 0; i < template_size; i++)
7293 - /* A 0 pattern is a placeholder, every other pattern is an
7295 - if (template[i] != 0)
7296 - put_arm_insn (globals, stub_bfd, template[i], loc + size);
7298 - bfd_put_32 (stub_bfd, template[i], loc + size);
7299 + switch (template[i].type)
7301 + case THUMB16_TYPE:
7303 + bfd_vma data = template[i].data;
7304 + if (template[i].reloc_addend != 0)
7306 + /* We've borrowed the reloc_addend field to mean we should
7307 + insert a condition code into this (Thumb-1 branch)
7308 + instruction. See THUMB16_BCOND_INSN. */
7309 + BFD_ASSERT ((data & 0xff00) == 0xd000);
7310 + data |= ((stub_entry->orig_insn >> 22) & 0xf) << 8;
7312 + put_thumb_insn (globals, stub_bfd, data, loc + size);
7317 + case THUMB32_TYPE:
7318 + put_thumb_insn (globals, stub_bfd, (template[i].data >> 16) & 0xffff,
7320 + put_thumb_insn (globals, stub_bfd, template[i].data & 0xffff,
7322 + if (template[i].reloc_type != R_ARM_NONE)
7324 + stub_reloc_idx[nrelocs] = i;
7325 + stub_reloc_offset[nrelocs++] = size;
7331 + put_arm_insn (globals, stub_bfd, template[i].data, loc + size);
7332 + /* Handle cases where the target is encoded within the
7334 + if (template[i].reloc_type == R_ARM_JUMP24)
7336 + stub_reloc_idx[nrelocs] = i;
7337 + stub_reloc_offset[nrelocs++] = size;
7343 + bfd_put_32 (stub_bfd, template[i].data, loc + size);
7344 + stub_reloc_idx[nrelocs] = i;
7345 + stub_reloc_offset[nrelocs++] = size;
7356 stub_sec->size += size;
7358 + /* Stub size has already been computed in arm_size_one_stub. Check
7360 + BFD_ASSERT (size == stub_entry->stub_size);
7362 /* Destination is Thumb. Force bit 0 to 1 to reflect this. */
7363 if (stub_entry->st_type == STT_ARM_TFUNC)
7366 - switch (stub_entry->stub_type)
7367 + /* Assume there is at least one and at most MAXRELOCS entries to relocate
7369 + BFD_ASSERT (nrelocs != 0 && nrelocs <= MAXRELOCS);
7371 + for (i = 0; i < nrelocs; i++)
7372 + if (template[stub_reloc_idx[i]].reloc_type == R_ARM_THM_JUMP24
7373 + || template[stub_reloc_idx[i]].reloc_type == R_ARM_THM_JUMP19
7374 + || template[stub_reloc_idx[i]].reloc_type == R_ARM_THM_CALL
7375 + || template[stub_reloc_idx[i]].reloc_type == R_ARM_THM_XPC22)
7377 + Elf_Internal_Rela rel;
7378 + bfd_boolean unresolved_reloc;
7379 + char *error_message;
7381 + = (template[stub_reloc_idx[i]].reloc_type != R_ARM_THM_XPC22)
7382 + ? STT_ARM_TFUNC : 0;
7383 + bfd_vma points_to = sym_value + stub_entry->target_addend;
7385 + rel.r_offset = stub_entry->stub_offset + stub_reloc_offset[i];
7386 + rel.r_info = ELF32_R_INFO (0, template[stub_reloc_idx[i]].reloc_type);
7387 + rel.r_addend = template[stub_reloc_idx[i]].reloc_addend;
7389 + if (stub_entry->stub_type == arm_stub_a8_veneer_b_cond && i == 0)
7390 + /* The first relocation in the elf32_arm_stub_a8_veneer_b_cond[]
7391 + template should refer back to the instruction after the original
7393 + points_to = sym_value;
7395 + /* Note: _bfd_final_link_relocate doesn't handle these relocations
7396 + properly. We should probably use this function unconditionally,
7397 + rather than only for certain relocations listed in the enclosing
7398 + conditional. Attempt to avoid perturbing existing code too much
7399 + pending more testing. */
7400 + elf32_arm_final_link_relocate (elf32_arm_howto_from_type
7401 + (template[stub_reloc_idx[i]].reloc_type),
7402 + stub_bfd, info->output_bfd, stub_sec, stub_sec->contents, &rel,
7403 + points_to, info, stub_entry->target_section, "", sym_flags,
7404 + (struct elf_link_hash_entry *) stub_entry, &unresolved_reloc,
7409 + _bfd_final_link_relocate (elf32_arm_howto_from_type
7410 + (template[stub_reloc_idx[i]].reloc_type), stub_bfd, stub_sec,
7411 + stub_sec->contents, stub_entry->stub_offset + stub_reloc_offset[i],
7412 + sym_value + stub_entry->target_addend,
7413 + template[stub_reloc_idx[i]].reloc_addend);
7420 +/* Calculate the template, template size and instruction size for a stub.
7421 + Return value is the instruction size. */
7423 +static unsigned int
7424 +find_stub_size_and_template (enum elf32_arm_stub_type stub_type,
7425 + const insn_sequence **stub_template,
7426 + int *stub_template_size)
7428 + const insn_sequence *template = NULL;
7429 + int template_size = 0, i;
7430 + unsigned int size;
7432 + switch (stub_type)
7434 - case arm_stub_long_branch:
7435 - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32),
7436 - stub_bfd, stub_sec, stub_sec->contents,
7437 - stub_entry->stub_offset + 4, sym_value, 0);
7438 + case arm_stub_long_branch_any_any:
7439 + template = elf32_arm_stub_long_branch_any_any;
7440 + template_size = sizeof (elf32_arm_stub_long_branch_any_any)
7441 + / sizeof (insn_sequence);
7443 - case arm_thumb_v4t_stub_long_branch:
7444 - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32),
7445 - stub_bfd, stub_sec, stub_sec->contents,
7446 - stub_entry->stub_offset + 8, sym_value, 0);
7447 + case arm_stub_long_branch_v4t_arm_thumb:
7448 + template = elf32_arm_stub_long_branch_v4t_arm_thumb;
7449 + template_size = sizeof (elf32_arm_stub_long_branch_v4t_arm_thumb)
7450 + / sizeof (insn_sequence);
7452 - case arm_thumb_thumb_stub_long_branch:
7453 - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32),
7454 - stub_bfd, stub_sec, stub_sec->contents,
7455 - stub_entry->stub_offset + 12, sym_value, 0);
7456 + case arm_stub_long_branch_thumb_only:
7457 + template = elf32_arm_stub_long_branch_thumb_only;
7458 + template_size = sizeof (elf32_arm_stub_long_branch_thumb_only)
7459 + / sizeof (insn_sequence);
7461 - case arm_thumb_arm_v4t_stub_long_branch:
7462 - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_ABS32),
7463 - stub_bfd, stub_sec, stub_sec->contents,
7464 - stub_entry->stub_offset + 16, sym_value, 0);
7465 + case arm_stub_long_branch_v4t_thumb_arm:
7466 + template = elf32_arm_stub_long_branch_v4t_thumb_arm;
7467 + template_size = sizeof (elf32_arm_stub_long_branch_v4t_thumb_arm)
7468 + / sizeof (insn_sequence);
7470 - case arm_thumb_arm_v4t_stub_short_branch:
7472 - long int rel_offset;
7473 - static const insn32 t2a3_b_insn = 0xea000000;
7475 - rel_offset = sym_value - (stub_addr + 8 + 4);
7477 - put_arm_insn (globals, stub_bfd,
7478 - (bfd_vma) t2a3_b_insn | ((rel_offset >> 2) & 0x00FFFFFF),
7481 + case arm_stub_short_branch_v4t_thumb_arm:
7482 + template = elf32_arm_stub_short_branch_v4t_thumb_arm;
7483 + template_size = sizeof (elf32_arm_stub_short_branch_v4t_thumb_arm)
7484 + / sizeof (insn_sequence);
7487 - case arm_stub_pic_long_branch:
7488 - /* We want the value relative to the address 8 bytes from the
7489 - start of the stub. */
7490 - _bfd_final_link_relocate (elf32_arm_howto_from_type (R_ARM_REL32),
7491 - stub_bfd, stub_sec, stub_sec->contents,
7492 - stub_entry->stub_offset + 8, sym_value, 0);
7493 + case arm_stub_long_branch_any_arm_pic:
7494 + template = elf32_arm_stub_long_branch_any_arm_pic;
7495 + template_size = sizeof (elf32_arm_stub_long_branch_any_arm_pic)
7496 + / sizeof (insn_sequence);
7499 + case arm_stub_long_branch_any_thumb_pic:
7500 + template = elf32_arm_stub_long_branch_any_thumb_pic;
7501 + template_size = sizeof (elf32_arm_stub_long_branch_any_thumb_pic)
7502 + / sizeof (insn_sequence);
7504 + case arm_stub_a8_veneer_b_cond:
7505 + template = elf32_arm_stub_a8_veneer_b_cond;
7506 + template_size = sizeof (elf32_arm_stub_a8_veneer_b_cond)
7507 + / sizeof (insn_sequence);
7509 + case arm_stub_a8_veneer_b:
7510 + case arm_stub_a8_veneer_bl:
7511 + template = elf32_arm_stub_a8_veneer_b;
7512 + template_size = sizeof (elf32_arm_stub_a8_veneer_b)
7513 + / sizeof (insn_sequence);
7515 + case arm_stub_a8_veneer_blx:
7516 + template = elf32_arm_stub_a8_veneer_blx;
7517 + template_size = sizeof (elf32_arm_stub_a8_veneer_blx)
7518 + / sizeof (insn_sequence);
7527 + for (i = 0; i < template_size; i++)
7529 + switch (template[i].type)
7531 + case THUMB16_TYPE:
7536 + case THUMB32_TYPE:
7547 + if (stub_template)
7548 + *stub_template = template;
7550 + if (stub_template_size)
7551 + *stub_template_size = template_size;
7556 /* As above, but don't actually build the stub. Just bump offset so
7557 @@ -3213,52 +3570,24 @@ arm_size_one_stub (struct bfd_hash_entry
7559 struct elf32_arm_stub_hash_entry *stub_entry;
7560 struct elf32_arm_link_hash_table *htab;
7561 - const bfd_vma *template;
7562 + const insn_sequence *template;
7567 /* Massage our args to the form they really have. */
7568 stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
7569 htab = (struct elf32_arm_link_hash_table *) in_arg;
7571 - switch (stub_entry->stub_type)
7573 - case arm_stub_long_branch:
7574 - template = arm_long_branch_stub;
7575 - template_size = (sizeof (arm_long_branch_stub) / sizeof (bfd_vma)) * 4;
7577 - case arm_thumb_v4t_stub_long_branch:
7578 - template = arm_thumb_v4t_long_branch_stub;
7579 - template_size = (sizeof (arm_thumb_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4;
7581 - case arm_thumb_thumb_stub_long_branch:
7582 - template = arm_thumb_thumb_long_branch_stub;
7583 - template_size = (sizeof (arm_thumb_thumb_long_branch_stub) / sizeof (bfd_vma)) * 4;
7585 - case arm_thumb_arm_v4t_stub_long_branch:
7586 - template = arm_thumb_arm_v4t_long_branch_stub;
7587 - template_size = (sizeof (arm_thumb_arm_v4t_long_branch_stub) / sizeof (bfd_vma)) * 4;
7589 - case arm_thumb_arm_v4t_stub_short_branch:
7590 - template = arm_thumb_arm_v4t_short_branch_stub;
7591 - template_size = (sizeof(arm_thumb_arm_v4t_short_branch_stub) / sizeof (bfd_vma)) * 4;
7593 - case arm_stub_pic_long_branch:
7594 - template = arm_pic_long_branch_stub;
7595 - template_size = (sizeof (arm_pic_long_branch_stub) / sizeof (bfd_vma)) * 4;
7602 + size = find_stub_size_and_template (stub_entry->stub_type, &template,
7605 + stub_entry->stub_size = size;
7606 + stub_entry->stub_template = template;
7607 + stub_entry->stub_template_size = template_size;
7610 - for (i = 0; i < (template_size / 4); i++)
7612 size = (size + 7) & ~7;
7613 stub_entry->stub_sec->size += size;
7618 @@ -3355,12 +3684,12 @@ elf32_arm_next_input_section (struct bfd
7620 asection **list = htab->input_list + isec->output_section->index;
7622 - if (*list != bfd_abs_section_ptr)
7623 + if (*list != bfd_abs_section_ptr && (isec->flags & SEC_CODE) != 0)
7625 /* Steal the link_sec pointer for our list. */
7626 #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
7627 /* This happens to make the list in reverse order,
7628 - which is what we want. */
7629 + which we reverse later. */
7630 PREV_SEC (isec) = *list;
7633 @@ -3369,7 +3698,7 @@ elf32_arm_next_input_section (struct bfd
7635 /* See whether we can group stub sections together. Grouping stub
7636 sections may result in fewer stubs. More importantly, we need to
7637 - put all .init* and .fini* stubs at the beginning of the .init or
7638 + put all .init* and .fini* stubs at the end of the .init or
7639 .fini output sections respectively, because glibc splits the
7640 _init and _fini functions into multiple parts. Putting a stub in
7641 the middle of a function is not a good idea. */
7642 @@ -3377,68 +3706,104 @@ elf32_arm_next_input_section (struct bfd
7644 group_sections (struct elf32_arm_link_hash_table *htab,
7645 bfd_size_type stub_group_size,
7646 - bfd_boolean stubs_always_before_branch)
7647 + bfd_boolean stubs_always_after_branch)
7649 - asection **list = htab->input_list + htab->top_index;
7650 + asection **list = htab->input_list;
7654 asection *tail = *list;
7658 if (tail == bfd_abs_section_ptr)
7661 - while (tail != NULL)
7662 + /* Reverse the list: we must avoid placing stubs at the
7663 + beginning of the section because the beginning of the text
7664 + section may be required for an interrupt vector in bare metal
7666 +#define NEXT_SEC PREV_SEC
7669 + while (head != NULL)
7671 + asection *h = PREV_SEC (head);
7672 + NEXT_SEC (head) = tp;
7679 + while (head != NULL)
7684 bfd_size_type total;
7687 - total = tail->size;
7688 - while ((prev = PREV_SEC (curr)) != NULL
7689 - && ((total += curr->output_offset - prev->output_offset)
7691 + total = head->size;
7692 + while ((next = NEXT_SEC (curr)) != NULL
7693 + && ((total += next->output_offset - curr->output_offset)
7698 - /* OK, the size from the start of CURR to the end is less
7699 + /* OK, the size from the start to the start of CURR is less
7700 than stub_group_size and thus can be handled by one stub
7701 - section. (Or the tail section is itself larger than
7702 + section. (Or the head section is itself larger than
7703 stub_group_size, in which case we may be toast.)
7704 We should really be keeping track of the total size of
7705 stubs added here, as stubs contribute to the final output
7709 - prev = PREV_SEC (tail);
7710 + next = NEXT_SEC (head);
7711 /* Set up this stub group. */
7712 - htab->stub_group[tail->id].link_sec = curr;
7713 + htab->stub_group[head->id].link_sec = curr;
7715 - while (tail != curr && (tail = prev) != NULL);
7716 + while (head != curr && (head = next) != NULL);
7718 /* But wait, there's more! Input sections up to stub_group_size
7719 - bytes before the stub section can be handled by it too. */
7720 - if (!stubs_always_before_branch)
7721 + bytes after the stub section can be handled by it too. */
7722 + if (!stubs_always_after_branch)
7725 - while (prev != NULL
7726 - && ((total += tail->output_offset - prev->output_offset)
7727 + while (next != NULL
7728 + && ((total += next->output_offset - head->output_offset)
7732 - prev = PREV_SEC (tail);
7733 - htab->stub_group[tail->id].link_sec = curr;
7735 + next = NEXT_SEC (head);
7736 + htab->stub_group[head->id].link_sec = curr;
7743 - while (list-- != htab->input_list);
7744 + while (list++ != htab->input_list + htab->top_index);
7746 free (htab->input_list);
7752 +a8_reloc_compare (const void *a, const void *b)
7754 + const struct a8_erratum_reloc *ra = a, *rb = b;
7756 + if (ra->from < rb->from)
7758 + else if (ra->from > rb->from)
7764 +static struct elf_link_hash_entry *find_thumb_glue (struct bfd_link_info *,
7765 + const char *, char **);
7767 /* Determine and set the size of the stub section for a final link.
7769 The basic idea here is to examine all the relocations looking for
7770 @@ -3454,9 +3819,22 @@ elf32_arm_size_stubs (bfd *output_bfd,
7771 void (*layout_sections_again) (void))
7773 bfd_size_type stub_group_size;
7774 - bfd_boolean stubs_always_before_branch;
7775 + bfd_boolean stubs_always_after_branch;
7776 bfd_boolean stub_changed = 0;
7777 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
7778 + struct a8_erratum_fix *a8_fixes = NULL;
7779 + unsigned int num_a8_fixes = 0, prev_num_a8_fixes = 0, a8_fix_table_size = 10;
7780 + struct a8_erratum_reloc *a8_relocs = NULL;
7781 + unsigned int num_a8_relocs = 0, a8_reloc_table_size = 10;
7784 + if (htab->fix_cortex_a8)
7786 + a8_fixes = bfd_zmalloc (sizeof (struct a8_erratum_fix)
7787 + * a8_fix_table_size);
7788 + a8_relocs = bfd_zmalloc (sizeof (struct a8_erratum_reloc)
7789 + * a8_reloc_table_size);
7792 /* Propagate mach to stub bfd, because it may not have been
7793 finalized when we created stub_bfd. */
7794 @@ -3467,7 +3845,14 @@ elf32_arm_size_stubs (bfd *output_bfd,
7795 htab->stub_bfd = stub_bfd;
7796 htab->add_stub_section = add_stub_section;
7797 htab->layout_sections_again = layout_sections_again;
7798 - stubs_always_before_branch = group_size < 0;
7799 + stubs_always_after_branch = group_size < 0;
7801 + /* The Cortex-A8 erratum fix depends on stubs not being in the same 4K page
7802 + as the first half of a 32-bit branch straddling two 4K pages. This is a
7803 + crude way of enforcing that. */
7804 + if (htab->fix_cortex_a8)
7805 + stubs_always_after_branch = 1;
7808 stub_group_size = -group_size;
7810 @@ -3487,13 +3872,16 @@ elf32_arm_size_stubs (bfd *output_bfd,
7811 stub_group_size = 4170000;
7814 - group_sections (htab, stub_group_size, stubs_always_before_branch);
7815 + group_sections (htab, stub_group_size, stubs_always_after_branch);
7820 unsigned int bfd_indx;
7826 for (input_bfd = info->input_bfds, bfd_indx = 0;
7828 @@ -3503,6 +3891,8 @@ elf32_arm_size_stubs (bfd *output_bfd,
7830 Elf_Internal_Sym *local_syms = NULL;
7832 + num_a8_relocs = 0;
7834 /* We'll need the symbol table in a second. */
7835 symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
7836 if (symtab_hdr->sh_info == 0)
7837 @@ -3551,6 +3941,7 @@ elf32_arm_size_stubs (bfd *output_bfd,
7839 const asection *id_sec;
7840 unsigned char st_type;
7841 + bfd_boolean created_stub = FALSE;
7843 r_type = ELF32_R_TYPE (irela->r_info);
7844 r_indx = ELF32_R_SYM (irela->r_info);
7845 @@ -3564,9 +3955,14 @@ elf32_arm_size_stubs (bfd *output_bfd,
7846 goto error_ret_free_local;
7849 - /* Only look for stubs on call instructions. */
7850 - if ((r_type != (unsigned int) R_ARM_CALL)
7851 - && (r_type != (unsigned int) R_ARM_THM_CALL))
7852 + /* Only look for stubs on call or Thumb-2 call/branch
7854 + if (r_type != (unsigned int) R_ARM_CALL
7855 + && r_type != (unsigned int) R_ARM_THM_CALL
7856 + && r_type != (unsigned int) R_ARM_THM_JUMP24
7857 + && r_type != (unsigned int) R_ARM_THM_JUMP19
7858 + && r_type != (unsigned int) R_ARM_THM_CALL
7859 + && r_type != (unsigned int) R_ARM_THM_XPC22)
7862 /* Now determine the call target, its name, value,
7863 @@ -3648,79 +4044,393 @@ elf32_arm_size_stubs (bfd *output_bfd,
7864 sym_name = hash->root.root.root.string;
7867 - /* Determine what (if any) linker stub is needed. */
7868 - stub_type = arm_type_of_stub (info, section, irela, st_type,
7869 - hash, destination, sym_sec,
7870 - input_bfd, sym_name);
7871 - if (stub_type == arm_stub_none)
7873 + /* Only look for stubs on call instructions. */
7874 + if (r_type == (unsigned int) R_ARM_CALL
7875 + || r_type == (unsigned int) R_ARM_THM_CALL)
7878 + /* Determine what (if any) linker stub is needed. */
7879 + stub_type = arm_type_of_stub (info, section, irela,
7881 + destination, sym_sec,
7882 + input_bfd, sym_name);
7883 + if (stub_type == arm_stub_none)
7886 + /* Support for grouping stub sections. */
7887 + id_sec = htab->stub_group[section->id].link_sec;
7889 + /* Get the name of this stub. */
7890 + stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash,
7893 + goto error_ret_free_internal;
7895 - /* Support for grouping stub sections. */
7896 - id_sec = htab->stub_group[section->id].link_sec;
7897 + /* We've either created a stub for this reloc already,
7898 + or we are about to. */
7899 + created_stub = TRUE;
7901 + stub_entry = arm_stub_hash_lookup
7902 + (&htab->stub_hash_table, stub_name,
7904 + if (stub_entry != NULL)
7906 + /* The proper stub has already been created. */
7911 + stub_entry = elf32_arm_add_stub (stub_name, section,
7913 + if (stub_entry == NULL)
7916 + goto error_ret_free_internal;
7919 - /* Get the name of this stub. */
7920 - stub_name = elf32_arm_stub_name (id_sec, sym_sec, hash, irela);
7922 - goto error_ret_free_internal;
7924 - stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table,
7927 - if (stub_entry != NULL)
7929 - /* The proper stub has already been created. */
7933 + stub_entry->target_value = sym_value;
7934 + stub_entry->target_section = sym_sec;
7935 + stub_entry->stub_type = stub_type;
7936 + stub_entry->h = hash;
7937 + stub_entry->st_type = st_type;
7939 + if (sym_name == NULL)
7940 + sym_name = "unnamed";
7941 + stub_entry->output_name
7942 + = bfd_alloc (htab->stub_bfd,
7943 + sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
7944 + + strlen (sym_name));
7945 + if (stub_entry->output_name == NULL)
7948 + goto error_ret_free_internal;
7951 - stub_entry = elf32_arm_add_stub (stub_name, section, htab);
7952 - if (stub_entry == NULL)
7955 - goto error_ret_free_internal;
7957 + /* For historical reasons, use the existing names for
7958 + ARM-to-Thumb and Thumb-to-ARM stubs. */
7959 + if (r_type == (unsigned int) R_ARM_THM_CALL
7960 + && st_type != STT_ARM_TFUNC)
7961 + sprintf (stub_entry->output_name,
7962 + THUMB2ARM_GLUE_ENTRY_NAME, sym_name);
7963 + else if (r_type == (unsigned int) R_ARM_CALL
7964 + && st_type == STT_ARM_TFUNC)
7965 + sprintf (stub_entry->output_name,
7966 + ARM2THUMB_GLUE_ENTRY_NAME, sym_name);
7968 + sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
7971 - stub_entry->target_value = sym_value;
7972 - stub_entry->target_section = sym_sec;
7973 - stub_entry->stub_type = stub_type;
7974 - stub_entry->h = hash;
7975 - stub_entry->st_type = st_type;
7977 - if (sym_name == NULL)
7978 - sym_name = "unnamed";
7979 - stub_entry->output_name
7980 - = bfd_alloc (htab->stub_bfd,
7981 - sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
7982 - + strlen (sym_name));
7983 - if (stub_entry->output_name == NULL)
7984 + stub_changed = TRUE;
7988 + /* Look for relocations which might trigger Cortex-A8
7990 + if (htab->fix_cortex_a8
7991 + && (r_type == (unsigned int) R_ARM_THM_JUMP24
7992 + || r_type == (unsigned int) R_ARM_THM_JUMP19
7993 + || r_type == (unsigned int) R_ARM_THM_CALL
7994 + || r_type == (unsigned int) R_ARM_THM_XPC22))
7997 - goto error_ret_free_internal;
7998 + bfd_vma from = section->output_section->vma
7999 + + section->output_offset
8000 + + irela->r_offset;
8002 + if ((from & 0xfff) == 0xffe)
8004 + /* Found a candidate. Note we haven't checked the
8005 + destination is within 4K here: if we do so (and
8006 + don't create an entry in a8_relocs) we can't tell
8007 + that a branch should have been relocated when
8008 + scanning later. */
8009 + if (num_a8_relocs == a8_reloc_table_size)
8011 + a8_reloc_table_size *= 2;
8012 + a8_relocs = bfd_realloc (a8_relocs,
8013 + sizeof (struct a8_erratum_reloc)
8014 + * a8_reloc_table_size);
8017 + a8_relocs[num_a8_relocs].from = from;
8018 + a8_relocs[num_a8_relocs].destination = destination;
8019 + a8_relocs[num_a8_relocs].r_type = r_type;
8020 + a8_relocs[num_a8_relocs].st_type = st_type;
8021 + a8_relocs[num_a8_relocs].sym_name = sym_name;
8022 + a8_relocs[num_a8_relocs].non_a8_stub = created_stub;
8028 - /* For historical reasons, use the existing names for
8029 - ARM-to-Thumb and Thumb-to-ARM stubs. */
8030 - if (r_type == (unsigned int) R_ARM_THM_CALL
8031 - && st_type != STT_ARM_TFUNC)
8032 - sprintf (stub_entry->output_name, THUMB2ARM_GLUE_ENTRY_NAME,
8034 - else if (r_type == (unsigned int) R_ARM_CALL
8035 - && st_type == STT_ARM_TFUNC)
8036 - sprintf (stub_entry->output_name, ARM2THUMB_GLUE_ENTRY_NAME,
8039 - sprintf (stub_entry->output_name, STUB_ENTRY_NAME,
8042 - stub_changed = TRUE;
8045 /* We're done with the internal relocs, free them. */
8046 if (elf_section_data (section)->relocs == NULL)
8047 free (internal_relocs);
8050 + if (!htab->fix_cortex_a8)
8053 + /* Sort relocs which might apply to Cortex-A8 erratum. */
8054 + qsort (a8_relocs, num_a8_relocs, sizeof (struct a8_erratum_reloc),
8055 + &a8_reloc_compare);
8057 + /* Scan for branches which might trigger Cortex-A8 erratum. */
8058 + for (section = input_bfd->sections;
8060 + section = section->next)
8062 + bfd_byte *contents = NULL;
8063 + struct _arm_elf_section_data *sec_data;
8064 + unsigned int span;
8067 + if (elf_section_type (section) != SHT_PROGBITS
8068 + || (elf_section_flags (section) & SHF_EXECINSTR) == 0
8069 + || (section->flags & SEC_EXCLUDE) != 0
8070 + || (section->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
8071 + || (section->output_section == bfd_abs_section_ptr))
8074 + base_vma = section->output_section->vma
8075 + + section->output_offset;
8077 + if (elf_section_data (section)->this_hdr.contents != NULL)
8078 + contents = elf_section_data (section)->this_hdr.contents;
8079 + else if (! bfd_malloc_and_get_section (input_bfd, section,
8081 + goto error_ret_free_local;
8083 + sec_data = elf32_arm_section_data (section);
8085 + for (span = 0; span < sec_data->mapcount; span++)
8087 + unsigned int span_start = sec_data->map[span].vma;
8088 + unsigned int span_end = (span == sec_data->mapcount - 1)
8089 + ? section->size : sec_data->map[span + 1].vma;
8091 + char span_type = sec_data->map[span].type;
8092 + bfd_boolean last_was_32bit = FALSE;
8094 + if (span_type != 't')
8097 + /* Span is entirely within a single 4KB region: skip
8099 + if (((base_vma + span_start) & ~0xfff)
8100 + == ((base_vma + span_end) & ~0xfff))
8103 + /* Scan for 32-bit Thumb-2 branches which span two 4K
8106 + * The opcode is BLX.W, BL.W, B.W, Bcc.W
8107 + * The branch target is in the same 4KB region as the
8108 + first half of the branch.
8109 + * The instruction before the branch is a 32-bit
8110 + length non-branch instruction.
8113 + for (i = span_start; i < span_end;)
8115 + unsigned int insn = bfd_getl16 (&contents[i]);
8116 + bfd_boolean insn_32bit = FALSE;
8118 + if ((insn & 0xe000) == 0xe000
8119 + && (insn & 0x1800) != 0x0000)
8120 + insn_32bit = TRUE;
8122 + if (((base_vma + i) & 0xfff) == 0xffe
8123 + && insn_32bit && last_was_32bit)
8126 + bfd_boolean is_blx = FALSE, is_b = FALSE;
8127 + bfd_boolean is_bl = FALSE, force_target_arm = FALSE;
8128 + bfd_boolean force_target_thumb = FALSE;
8130 + enum elf32_arm_stub_type stub_type = arm_stub_none;
8131 + struct a8_erratum_reloc key, *found;
8133 + key.from = base_vma + i;
8134 + found = bsearch (&key, a8_relocs, num_a8_relocs,
8135 + sizeof (struct a8_erratum_reloc),
8136 + &a8_reloc_compare);
8140 + char *error_message = NULL;
8141 + struct elf_link_hash_entry *entry;
8143 + /* We don't care about the error returned from
8144 + this function, only if there is glue or
8146 + entry = find_thumb_glue (info, found->sym_name,
8150 + found->non_a8_stub = TRUE;
8152 + if (found->r_type == R_ARM_THM_CALL
8153 + && found->st_type != STT_ARM_TFUNC)
8154 + force_target_arm = TRUE;
8155 + else if (found->r_type == R_ARM_THM_CALL
8156 + && found->st_type == STT_ARM_TFUNC)
8157 + force_target_thumb = TRUE;
8160 + /* Load the rest of the insn (in manual-friendly
8162 + insn = (insn << 16)
8163 + | bfd_getl16 (&contents[i + 2]);
8165 + /* Check if we have an offending branch
8168 + /* Encoding T4: B<c>.W. */
8169 + is_b = (insn & 0xf800d000) == 0xf0009000;
8170 + /* Encoding T1: BL<c>.W. */
8171 + is_bl = (insn & 0xf800d000) == 0xf000d000;
8172 + /* Encoding T2: BLX<c>.W. */
8173 + is_blx = (insn & 0xf800d000) == 0xf000c000;
8175 + if (found && found->non_a8_stub)
8176 + /* We've already made a stub for this instruction,
8177 + e.g. it's a long branch or a Thumb->ARM stub.
8178 + Assume that stub will suffice to work around the
8179 + A8 erratum (see setting of always_after_branch
8182 + else if ((insn & 0xf800d000) == 0xf0008000
8183 + && (insn & 0x07f00000) != 0x03800000)
8185 + /* Encoding T3: B<c>.W (not permitted in IT
8187 + offset = (insn & 0x7ff) << 1;
8188 + offset |= (insn & 0x3f0000) >> 4;
8189 + offset |= (insn & 0x2000) ? 0x40000 : 0;
8190 + offset |= (insn & 0x800) ? 0x80000 : 0;
8191 + offset |= (insn & 0x4000000) ? 0x100000 : 0;
8192 + if (offset & 0x100000)
8193 + offset |= ~0xfffff;
8194 + stub_type = arm_stub_a8_veneer_b_cond;
8196 + else if (is_b || is_bl || is_blx)
8198 + int s = (insn & 0x4000000) != 0;
8199 + int j1 = (insn & 0x2000) != 0;
8200 + int j2 = (insn & 0x800) != 0;
8201 + int i1 = !(j1 ^ s);
8202 + int i2 = !(j2 ^ s);
8204 + offset = (insn & 0x7ff) << 1;
8205 + offset |= (insn & 0x3ff0000) >> 4;
8206 + offset |= i2 << 22;
8207 + offset |= i1 << 23;
8208 + offset |= s << 24;
8209 + if (offset & 0x1000000)
8210 + offset |= ~0xffffff;
8215 + stub_type = is_blx ? arm_stub_a8_veneer_blx :
8216 + is_bl ? arm_stub_a8_veneer_bl :
8217 + arm_stub_a8_veneer_b;
8220 + if (stub_type != arm_stub_none)
8222 + bfd_vma pc_for_insn = base_vma + i + 4;
8224 + /* The original instruction is a BL, but the
8225 + target is an ARM instruction. If we were not
8226 + making a stub, the BL would have been
8227 + converted to a BLX. Use the BLX stub instead
8229 + if (htab->use_blx && force_target_arm
8230 + && stub_type == arm_stub_a8_veneer_bl)
8232 + stub_type = arm_stub_a8_veneer_blx;
8236 + /* Conversely, if the original instruction was
8237 + BLX but the target is Thumb mode, use the BL
8239 + else if (force_target_thumb
8240 + && stub_type == arm_stub_a8_veneer_blx)
8242 + stub_type = arm_stub_a8_veneer_bl;
8248 + pc_for_insn &= ~3u;
8250 + /* If we found a relocation, use the proper
8251 + destination, not the offset in the
8252 + (unrelocated) instruction. Note this is
8253 + always done if we switched the stub type
8256 + offset = found->destination - pc_for_insn;
8258 + target = pc_for_insn + offset;
8260 + /* The BLX stub is ARM-mode code. Adjust the
8261 + offset to take the different PC value (+8
8262 + instead of +4) into account. */
8263 + if (stub_type == arm_stub_a8_veneer_blx)
8266 + if (((base_vma + i) & ~0xfff)
8267 + == (target & ~0xfff))
8271 + if (num_a8_fixes == a8_fix_table_size)
8273 + a8_fix_table_size *= 2;
8274 + a8_fixes = bfd_realloc (a8_fixes,
8275 + sizeof (struct a8_erratum_fix)
8276 + * a8_fix_table_size);
8279 + stub_name = bfd_malloc (8 + 1 + 8 + 1);
8280 + if (stub_name != NULL)
8281 + sprintf (stub_name, "%x:%x",
8284 + a8_fixes[num_a8_fixes].input_bfd
8286 + a8_fixes[num_a8_fixes].section = section;
8287 + a8_fixes[num_a8_fixes].offset = i;
8288 + a8_fixes[num_a8_fixes].addend = offset;
8289 + a8_fixes[num_a8_fixes].orig_insn = insn;
8290 + a8_fixes[num_a8_fixes].stub_name
8292 + a8_fixes[num_a8_fixes].stub_type
8300 + i += insn_32bit ? 4 : 2;
8301 + last_was_32bit = insn_32bit;
8305 + if (elf_section_data (section)->this_hdr.contents == NULL)
8310 + if (htab->fix_cortex_a8 && num_a8_fixes != prev_num_a8_fixes)
8311 + stub_changed = TRUE;
8316 @@ -3729,13 +4439,113 @@ elf32_arm_size_stubs (bfd *output_bfd,
8317 for (stub_sec = htab->stub_bfd->sections;
8319 stub_sec = stub_sec->next)
8320 - stub_sec->size = 0;
8322 + /* Ignore non-stub sections. */
8323 + if (!strstr (stub_sec->name, STUB_SUFFIX))
8326 + stub_sec->size = 0;
8329 bfd_hash_traverse (&htab->stub_hash_table, arm_size_one_stub, htab);
8331 + /* Add Cortex-A8 erratum veneers to stub section sizes too. */
8332 + if (htab->fix_cortex_a8)
8333 + for (i = 0; i < num_a8_fixes; i++)
8335 + unsigned int section_id = a8_fixes[i].section->id;
8336 + asection *link_sec = htab->stub_group[section_id].link_sec;
8337 + asection *stub_sec = htab->stub_group[section_id].stub_sec;
8339 + /* Copied from elf32_arm_add_stub! Refactor. */
8340 + if (stub_sec == NULL)
8342 + stub_sec = htab->stub_group[link_sec->id].stub_sec;
8343 + if (stub_sec == NULL)
8346 + bfd_size_type len;
8349 + namelen = strlen (link_sec->name);
8350 + len = namelen + sizeof (STUB_SUFFIX);
8351 + s_name = bfd_alloc (htab->stub_bfd, len);
8352 + if (s_name == NULL)
8353 + goto error_ret_free_local;
8355 + memcpy (s_name, link_sec->name, namelen);
8356 + memcpy (s_name + namelen, STUB_SUFFIX,
8357 + sizeof (STUB_SUFFIX));
8358 + stub_sec = (*htab->add_stub_section) (s_name, link_sec);
8359 + if (stub_sec == NULL)
8360 + goto error_ret_free_local;
8361 + htab->stub_group[link_sec->id].stub_sec = stub_sec;
8363 + htab->stub_group[section_id].stub_sec = stub_sec;
8367 + += find_stub_size_and_template (a8_fixes[i].stub_type, NULL,
8371 /* Ask the linker to do its stuff. */
8372 (*htab->layout_sections_again) ();
8373 stub_changed = FALSE;
8374 + prev_num_a8_fixes = num_a8_fixes;
8377 + /* Add stubs for Cortex-A8 erratum fixes now. */
8378 + if (htab->fix_cortex_a8)
8380 + for (i = 0; i < num_a8_fixes; i++)
8382 + struct elf32_arm_stub_hash_entry *stub_entry;
8383 + char *stub_name = a8_fixes[i].stub_name;
8384 + asection *section = a8_fixes[i].section;
8385 + unsigned int section_id = a8_fixes[i].section->id;
8386 + asection *link_sec = htab->stub_group[section_id].link_sec;
8387 + asection *stub_sec = htab->stub_group[section_id].stub_sec;
8388 + const insn_sequence *template;
8389 + int template_size, size = 0;
8391 + stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
8393 + if (stub_entry == NULL)
8395 + (*_bfd_error_handler) (_("%s: cannot create stub entry %s"),
8401 + stub_entry->stub_sec = stub_sec;
8402 + stub_entry->stub_offset = 0;
8403 + stub_entry->id_sec = link_sec;
8404 + stub_entry->stub_type = a8_fixes[i].stub_type;
8405 + stub_entry->target_section = a8_fixes[i].section;
8406 + stub_entry->target_value = a8_fixes[i].offset;
8407 + stub_entry->target_addend = a8_fixes[i].addend;
8408 + stub_entry->orig_insn = a8_fixes[i].orig_insn;
8409 + stub_entry->st_type = STT_ARM_TFUNC;
8411 + size = find_stub_size_and_template (a8_fixes[i].stub_type, &template,
8414 + stub_entry->stub_size = size;
8415 + stub_entry->stub_template = template;
8416 + stub_entry->stub_template_size = template_size;
8419 + /* Stash the Cortex-A8 erratum fix array for use later in
8420 + elf32_arm_write_section(). */
8421 + htab->a8_erratum_fixes = a8_fixes;
8422 + htab->num_a8_erratum_fixes = num_a8_fixes;
8426 + htab->a8_erratum_fixes = NULL;
8427 + htab->num_a8_erratum_fixes = 0;
8431 @@ -3913,6 +4723,7 @@ static const insn16 t2a2_noop_insn = 0x4
8432 static const insn32 t2a3_b_insn = 0xea000000;
8434 #define VFP11_ERRATUM_VENEER_SIZE 8
8435 +#define JANUS_2CC_ERRATUM_VENEER_SIZE 12
8437 #define ARM_BX_VENEER_SIZE 12
8438 static const insn32 armbx1_tst_insn = 0xe3100001;
8439 @@ -3927,7 +4738,16 @@ arm_allocate_glue_section_space (bfd * a
8440 bfd_byte * contents;
8445 + /* Do not include empty glue sections in the output. */
8448 + s = bfd_get_section_by_name (abfd, name);
8450 + s->flags |= SEC_EXCLUDE;
8455 BFD_ASSERT (abfd != NULL);
8457 @@ -3964,6 +4784,10 @@ bfd_elf32_arm_allocate_interworking_sect
8458 globals->bx_glue_size,
8459 ARM_BX_GLUE_SECTION_NAME);
8461 + arm_allocate_glue_section_space (globals->bfd_of_glue_owner,
8462 + globals->janus_2cc_erratum_glue_size,
8463 + JANUS_2CC_ERRATUM_VENEER_SECTION_NAME);
8468 @@ -4208,16 +5032,16 @@ elf32_arm_section_map_add (asection *sec
8473 -/* Record information about a VFP11 denorm-erratum veneer. Only ARM-mode
8474 - veneers are handled for now. */
8475 +/* Record information about a CPU erratum veneer. Only ARM-mode veneers are
8476 + handled for now. */
8479 -record_vfp11_erratum_veneer (struct bfd_link_info *link_info,
8480 - elf32_vfp11_erratum_list *branch,
8482 - asection *branch_sec,
8483 - unsigned int offset)
8484 +record_cpu_erratum_veneer (struct bfd_link_info *link_info,
8485 + elf32_cpu_erratum_list *branch,
8487 + asection *branch_sec,
8488 + unsigned int offset,
8489 + elf32_cpu_erratum_type erratum_type)
8492 struct elf32_arm_link_hash_table *hash_table;
8493 @@ -4227,27 +5051,43 @@ record_vfp11_erratum_veneer (struct bfd_
8495 struct _arm_elf_section_data *sec_data;
8497 - elf32_vfp11_erratum_list *newerr;
8499 + elf32_cpu_erratum_list *newerr;
8500 + const char *veneer_section_name;
8501 + const char *veneer_entry_name;
8503 + switch (erratum_type)
8505 + case VFP11_ERRATUM_ARM_VENEER:
8506 + veneer_section_name = VFP11_ERRATUM_VENEER_SECTION_NAME;
8507 + veneer_entry_name = VFP11_ERRATUM_VENEER_ENTRY_NAME;
8510 + case JANUS_2CC_ERRATUM_ARM_VENEER:
8511 + veneer_section_name = JANUS_2CC_ERRATUM_VENEER_SECTION_NAME;
8512 + veneer_entry_name = JANUS_2CC_ERRATUM_VENEER_ENTRY_NAME;
8519 hash_table = elf32_arm_hash_table (link_info);
8521 BFD_ASSERT (hash_table != NULL);
8522 BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
8524 s = bfd_get_section_by_name
8525 - (hash_table->bfd_of_glue_owner, VFP11_ERRATUM_VENEER_SECTION_NAME);
8526 + (hash_table->bfd_of_glue_owner, veneer_section_name);
8528 sec_data = elf32_arm_section_data (s);
8530 BFD_ASSERT (s != NULL);
8532 - tmp_name = bfd_malloc ((bfd_size_type) strlen
8533 - (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
8534 + tmp_name = bfd_malloc (MAX_ERRATUM_SYMBOL_LENGTH);
8536 BFD_ASSERT (tmp_name);
8538 - sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
8539 - hash_table->num_vfp11_fixes);
8540 + sprintf (tmp_name, veneer_entry_name, hash_table->num_errata_fixes, "");
8542 myh = elf_link_hash_lookup
8543 (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
8544 @@ -4255,7 +5095,21 @@ record_vfp11_erratum_veneer (struct bfd_
8545 BFD_ASSERT (myh == NULL);
8548 - val = hash_table->vfp11_erratum_glue_size;
8550 + switch (erratum_type)
8552 + case VFP11_ERRATUM_ARM_VENEER:
8553 + val = hash_table->vfp11_erratum_glue_size;
8556 + case JANUS_2CC_ERRATUM_ARM_VENEER:
8557 + val = hash_table->janus_2cc_erratum_glue_size;
8564 _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
8565 tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
8566 NULL, TRUE, FALSE, &bh);
8567 @@ -4266,20 +5120,19 @@ record_vfp11_erratum_veneer (struct bfd_
8569 /* Link veneer back to calling location. */
8570 errcount = ++(sec_data->erratumcount);
8571 - newerr = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
8572 + newerr = bfd_zmalloc (sizeof (elf32_cpu_erratum_list));
8574 - newerr->type = VFP11_ERRATUM_ARM_VENEER;
8575 + newerr->type = erratum_type;
8577 newerr->u.v.branch = branch;
8578 - newerr->u.v.id = hash_table->num_vfp11_fixes;
8579 + newerr->u.v.id = hash_table->num_errata_fixes;
8580 branch->u.b.veneer = newerr;
8582 newerr->next = sec_data->erratumlist;
8583 sec_data->erratumlist = newerr;
8585 /* A symbol for the return from the veneer. */
8586 - sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
8587 - hash_table->num_vfp11_fixes);
8588 + sprintf (tmp_name, veneer_entry_name, hash_table->num_errata_fixes, "_r");
8590 myh = elf_link_hash_lookup
8591 (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
8592 @@ -4300,7 +5153,10 @@ record_vfp11_erratum_veneer (struct bfd_
8594 /* Generate a mapping symbol for the veneer section, and explicitly add an
8595 entry for that symbol to the code/data map for the section. */
8596 - if (hash_table->vfp11_erratum_glue_size == 0)
8597 + if ((erratum_type == VFP11_ERRATUM_ARM_VENEER
8598 + && hash_table->vfp11_erratum_glue_size == 0)
8599 + || (erratum_type == JANUS_2CC_ERRATUM_ARM_VENEER
8600 + && hash_table->janus_2cc_erratum_glue_size == 0))
8603 /* FIXME: Creates an ARM symbol. Thumb mode will need attention if it
8604 @@ -4321,19 +5177,31 @@ record_vfp11_erratum_veneer (struct bfd_
8605 elf32_arm_section_map_add (s, 'a', 0);
8608 - s->size += VFP11_ERRATUM_VENEER_SIZE;
8609 - hash_table->vfp11_erratum_glue_size += VFP11_ERRATUM_VENEER_SIZE;
8610 - hash_table->num_vfp11_fixes++;
8611 + switch (erratum_type)
8613 + case VFP11_ERRATUM_ARM_VENEER:
8614 + s->size += VFP11_ERRATUM_VENEER_SIZE;
8615 + hash_table->vfp11_erratum_glue_size += VFP11_ERRATUM_VENEER_SIZE;
8618 + case JANUS_2CC_ERRATUM_ARM_VENEER:
8619 + s->size += JANUS_2CC_ERRATUM_VENEER_SIZE;
8620 + hash_table->janus_2cc_erratum_glue_size += JANUS_2CC_ERRATUM_VENEER_SIZE;
8627 + hash_table->num_errata_fixes++;
8629 /* The offset of the veneer. */
8633 -/* Note: we do not include the flag SEC_LINKER_CREATED, as that
8634 - would prevent elf_link_input_bfd() from processing the contents
8635 - of the section. */
8636 #define ARM_GLUE_SECTION_FLAGS \
8637 - (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY)
8638 + (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE \
8639 + | SEC_READONLY | SEC_LINKER_CREATED)
8641 /* Create a fake section for use by the ARM backend of the linker. */
8643 @@ -4372,10 +5240,6 @@ bfd_elf32_arm_add_glue_sections_to_bfd (
8644 if (info->relocatable)
8647 - /* Linker stubs don't need glue. */
8648 - if (!strcmp (abfd->filename, "linker stubs"))
8651 return arm_make_glue_section (abfd, ARM2THUMB_GLUE_SECTION_NAME)
8652 && arm_make_glue_section (abfd, THUMB2ARM_GLUE_SECTION_NAME)
8653 && arm_make_glue_section (abfd, VFP11_ERRATUM_VENEER_SECTION_NAME)
8654 @@ -4648,6 +5512,47 @@ bfd_elf32_arm_init_maps (bfd *abfd)
8658 +/* Check we're not doing applying the (invasive) Janus 2CC erratum fix
8662 +bfd_elf32_arm_validate_janus_2cc_fix (bfd *obfd,
8663 + struct bfd_link_info *link_info)
8665 + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
8666 + obj_attribute *out_attr = elf_known_obj_attributes_proc (obfd);
8668 + /* Janus 2CC is archv4t. We should never need the fix on higher architecture
8669 + versions, so emit an error in that case. */
8670 + if (globals->fix_janus_2cc
8671 + && out_attr[Tag_CPU_arch].i >= TAG_CPU_ARCH_V5T)
8672 + (*_bfd_error_handler) (_("%B: error: Janus 2CC erratum workaround cannot "
8673 + "be used with selected target architecture"), obfd);
8677 +/* Auto-select enabling of Cortex-A8 erratum fix if the user didn't explicitly
8678 + say what they wanted. */
8681 +bfd_elf32_arm_set_cortex_a8_fix (bfd *obfd ATTRIBUTE_UNUSED,
8682 + struct bfd_link_info *link_info)
8684 + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
8685 + obj_attribute *out_attr = elf_known_obj_attributes_proc (obfd);
8687 + if (globals->fix_cortex_a8 == -1)
8689 + /* Turn on Cortex-A8 erratum workaround for ARMv7-A. */
8690 + if (out_attr[Tag_CPU_arch].i == TAG_CPU_ARCH_V7
8691 + && (out_attr[Tag_CPU_arch_profile].i == 'A'
8692 + || out_attr[Tag_CPU_arch_profile].i == 0))
8693 + globals->fix_cortex_a8 = 1;
8695 + globals->fix_cortex_a8 = 0;
8700 bfd_elf32_arm_set_vfp11_fix (bfd *obfd, struct bfd_link_info *link_info)
8702 @@ -4671,10 +5576,10 @@ bfd_elf32_arm_set_vfp11_fix (bfd *obfd,
8705 else if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_DEFAULT)
8706 - /* For earlier architectures, we might need the workaround, but do not
8707 - enable it by default. If users is running with broken hardware, they
8708 - must enable the erratum fix explicitly. */
8709 - globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
8710 + /* For earlier architectures, we might need the workaround. The compiler
8711 + only generates scalar code at present, so this should be sufficient in
8713 + globals->vfp11_fix = BFD_ARM_VFP11_FIX_SCALAR;
8717 @@ -5112,13 +6017,13 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
8721 - elf32_vfp11_erratum_list *newerr
8722 - = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
8723 + elf32_cpu_erratum_list *newerr
8724 + = bfd_zmalloc (sizeof (elf32_cpu_erratum_list));
8727 errcount = ++(elf32_arm_section_data (sec)->erratumcount);
8729 - newerr->u.b.vfp_insn = veneer_of_insn;
8730 + newerr->u.b.orig_insn = veneer_of_insn;
8734 @@ -5130,8 +6035,9 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
8738 - record_vfp11_erratum_veneer (link_info, newerr, abfd, sec,
8740 + record_cpu_erratum_veneer (link_info, newerr, abfd, sec,
8742 + VFP11_ERRATUM_ARM_VENEER);
8746 @@ -5165,8 +6071,8 @@ error_return:
8747 after sections have been laid out, using specially-named symbols. */
8750 -bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd,
8751 - struct bfd_link_info *link_info)
8752 +bfd_elf32_arm_fix_veneer_locations (bfd *abfd,
8753 + struct bfd_link_info *link_info)
8756 struct elf32_arm_link_hash_table *globals;
8757 @@ -5181,13 +6087,12 @@ bfd_elf32_arm_vfp11_fix_veneer_locations
8759 globals = elf32_arm_hash_table (link_info);
8761 - tmp_name = bfd_malloc ((bfd_size_type) strlen
8762 - (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
8763 + tmp_name = bfd_malloc (MAX_ERRATUM_SYMBOL_LENGTH);
8765 for (sec = abfd->sections; sec != NULL; sec = sec->next)
8767 struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
8768 - elf32_vfp11_erratum_list *errnode = sec_data->erratumlist;
8769 + elf32_cpu_erratum_list *errnode = sec_data->erratumlist;
8771 for (; errnode != NULL; errnode = errnode->next)
8773 @@ -5200,7 +6105,7 @@ bfd_elf32_arm_vfp11_fix_veneer_locations
8774 case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
8775 /* Find veneer symbol. */
8776 sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
8777 - errnode->u.b.veneer->u.v.id);
8778 + errnode->u.b.veneer->u.v.id, "");
8780 myh = elf_link_hash_lookup
8781 (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
8782 @@ -5216,11 +6121,30 @@ bfd_elf32_arm_vfp11_fix_veneer_locations
8783 errnode->u.b.veneer->vma = vma;
8786 + case JANUS_2CC_ERRATUM_BRANCH_TO_ARM_VENEER:
8787 + /* Find veneer symbol. */
8788 + sprintf (tmp_name, JANUS_2CC_ERRATUM_VENEER_ENTRY_NAME,
8789 + errnode->u.b.veneer->u.v.id, "");
8791 + myh = elf_link_hash_lookup
8792 + (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
8795 + (*_bfd_error_handler) (_("%B: unable to find Janus 2CC veneer "
8796 + "`%s'"), abfd, tmp_name);
8798 + vma = myh->root.u.def.section->output_section->vma
8799 + + myh->root.u.def.section->output_offset
8800 + + myh->root.u.def.value;
8802 + errnode->u.b.veneer->vma = vma;
8805 case VFP11_ERRATUM_ARM_VENEER:
8806 case VFP11_ERRATUM_THUMB_VENEER:
8807 /* Find return location. */
8808 - sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
8810 + sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
8811 + errnode->u.v.id, "_r");
8813 myh = elf_link_hash_lookup
8814 (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
8815 @@ -5236,6 +6160,25 @@ bfd_elf32_arm_vfp11_fix_veneer_locations
8816 errnode->u.v.branch->vma = vma;
8819 + case JANUS_2CC_ERRATUM_ARM_VENEER:
8820 + /* Find return location. */
8821 + sprintf (tmp_name, JANUS_2CC_ERRATUM_VENEER_ENTRY_NAME,
8822 + errnode->u.v.id, "_r");
8824 + myh = elf_link_hash_lookup
8825 + (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
8828 + (*_bfd_error_handler) (_("%B: unable to find Janus 2CC veneer "
8829 + "`%s'"), abfd, tmp_name);
8831 + vma = myh->root.u.def.section->output_section->vma
8832 + + myh->root.u.def.section->output_offset
8833 + + myh->root.u.def.value;
8835 + errnode->u.v.branch->vma = vma;
8841 @@ -5246,6 +6189,183 @@ bfd_elf32_arm_vfp11_fix_veneer_locations
8845 +/* Look for instruction sequences which can trigger the Janus 2CC shifter
8846 + erratum. Any instruction which uses a register-specified shift, which is
8847 + not followed by a NOP instruction, is susceptible.
8849 + NOTE: This function is only meant to work for architecture v4t, as
8850 + implemented by Janus 2CC (see bfd_elf32_arm_validate_janus_2cc_fix).
8851 + Instruction encodings for later architectures (e.g. ARM blx, Thumb-2) will
8852 + not be handled correctly. */
8855 +bfd_elf32_arm_janus_2cc_erratum_scan (bfd *abfd,
8856 + struct bfd_link_info *link_info)
8859 + bfd_byte *contents = NULL;
8860 + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
8862 + /* Don't do anything if Janus 2CC fix is not enabled. */
8863 + if (!globals->fix_janus_2cc)
8866 + /* If we are only performing a partial link do not bother
8867 + to construct any glue. */
8868 + if (link_info->relocatable)
8871 + /* Skip if this bfd does not correspond to an ELF image. */
8872 + if (! is_arm_elf (abfd))
8875 + /* Skip this BFD if it corresponds to an executable or dynamic object. */
8876 + if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
8879 + for (sec = abfd->sections; sec != NULL; sec = sec->next)
8881 + unsigned int i, next_i, span, veneer_of_insn = 0;
8882 + struct _arm_elf_section_data *sec_data;
8884 + /* If we don't have executable progbits, we're not interested in this
8885 + section. Also skip if section is to be excluded. */
8886 + if (elf_section_type (sec) != SHT_PROGBITS
8887 + || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
8888 + || (sec->flags & SEC_EXCLUDE) != 0
8889 + || sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS
8890 + || sec->output_section == bfd_abs_section_ptr
8891 + || strcmp (sec->name, JANUS_2CC_ERRATUM_VENEER_SECTION_NAME) == 0)
8894 + sec_data = elf32_arm_section_data (sec);
8896 + if (sec_data->mapcount == 0)
8899 + if (elf_section_data (sec)->this_hdr.contents != NULL)
8900 + contents = elf_section_data (sec)->this_hdr.contents;
8901 + else if (! bfd_malloc_and_get_section (abfd, sec, &contents))
8902 + goto error_return;
8904 + qsort (sec_data->map, sec_data->mapcount, sizeof (elf32_arm_section_map),
8905 + elf32_arm_compare_mapping);
8907 + for (span = 0; span < sec_data->mapcount; span++)
8909 + unsigned int span_start = sec_data->map[span].vma;
8910 + unsigned int span_end = (span == sec_data->mapcount - 1)
8911 + ? sec->size : sec_data->map[span + 1].vma;
8912 + char span_type = sec_data->map[span].type;
8915 + switch (span_type)
8918 + for (i = span_start; i < span_end;)
8920 + unsigned int insn = bfd_get_32 (abfd, contents + i);
8927 + /* Data processing insn with register shift. */
8928 + if (((insn & 0x0e000090) == 0x00000010)
8929 + && ((insn & 0x0ff000f0) != 0x01200010)) /* bx. */
8931 + veneer_of_insn = insn;
8937 + /* Not a NOP (only accept mov r0, r0). */
8938 + if ((insn & 0x0fffffff) != 0x01a00000)
8940 + elf32_cpu_erratum_list *newerr;
8943 + /* Lose if Rd, Rn or Rm is PC. Don't bother
8945 + if ((veneer_of_insn & 0x000f0000) == 0x000f0000
8946 + || (veneer_of_insn & 0x0000f000) == 0x0000f000
8947 + || (veneer_of_insn & 0x0000000f) == 0x0000000f)
8948 + (*_bfd_error_handler) (_("%B(%A+0x%lx): error: ARM "
8949 + "instruction sequence using PC triggers "
8950 + "Janus 2CC erratum (must be fixed manually)"),
8954 + = bfd_zmalloc (sizeof (elf32_cpu_erratum_list));
8957 + = ++(elf32_arm_section_data (sec)->erratumcount);
8959 + newerr->u.b.orig_insn = veneer_of_insn;
8960 + newerr->type = JANUS_2CC_ERRATUM_BRANCH_TO_ARM_VENEER;
8962 + record_cpu_erratum_veneer (link_info, newerr, abfd,
8963 + sec, i - 4, JANUS_2CC_ERRATUM_ARM_VENEER);
8967 + newerr->next = sec_data->erratumlist;
8968 + sec_data->erratumlist = newerr;
8969 + /* Re-scan current instruction in case of adjacent
8982 + for (i = span_start; i < span_end; i += 2)
8984 + unsigned short insn = bfd_get_16 (abfd, contents + i);
8989 + if (((insn & 0xffc0) == 0x4100) /* ASR. */
8990 + || ((insn & 0xffc0) == 0x4080) /* LSL. */
8991 + || ((insn & 0xffc0) == 0x40c0) /* LSR. */
8992 + || ((insn & 0xffc0) == 0x41c0)) /* ROR. */
8997 + /* Not a NOP (only accept cpy r8, r8). */
8998 + if (insn != 0x46c0)
8999 + (*_bfd_error_handler) (_("%B(%A+0x%lx): error: Thumb "
9000 + "instruction sequence triggers Janus 2CC erratum "
9001 + "(must be fixed manually)"),
9022 /* Set target relocation values needed during linking. */
9025 @@ -5257,7 +6377,8 @@ bfd_elf32_arm_set_target_relocs (struct
9027 bfd_arm_vfp11_fix vfp11_fix,
9028 int no_enum_warn, int no_wchar_warn,
9030 + int pic_veneer, int fix_janus_2cc,
9031 + int fix_cortex_a8)
9033 struct elf32_arm_link_hash_table *globals;
9035 @@ -5279,6 +6400,8 @@ bfd_elf32_arm_set_target_relocs (struct
9036 globals->use_blx |= use_blx;
9037 globals->vfp11_fix = vfp11_fix;
9038 globals->pic_veneer = pic_veneer;
9039 + globals->fix_janus_2cc = fix_janus_2cc;
9040 + globals->fix_cortex_a8 = fix_cortex_a8;
9042 BFD_ASSERT (is_arm_elf (output_bfd));
9043 elf_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
9044 @@ -7933,72 +9056,378 @@ elf32_arm_relocate_section (bfd *
9045 ELF_ST_TYPE (sym->st_info)), h,
9046 &unresolved_reloc, &error_message);
9048 - /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
9049 - because such sections are not SEC_ALLOC and thus ld.so will
9050 - not process them. */
9051 - if (unresolved_reloc
9052 - && !((input_section->flags & SEC_DEBUGGING) != 0
9053 - && h->def_dynamic))
9054 + /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
9055 + because such sections are not SEC_ALLOC and thus ld.so will
9056 + not process them. */
9057 + if (unresolved_reloc
9058 + && !((input_section->flags & SEC_DEBUGGING) != 0
9059 + && h->def_dynamic))
9061 + (*_bfd_error_handler)
9062 + (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
9065 + (long) rel->r_offset,
9067 + h->root.root.string);
9071 + if (r != bfd_reloc_ok)
9075 + case bfd_reloc_overflow:
9076 + /* If the overflowing reloc was to an undefined symbol,
9077 + we have already printed one error message and there
9078 + is no point complaining again. */
9080 + h->root.type != bfd_link_hash_undefined)
9081 + && (!((*info->callbacks->reloc_overflow)
9082 + (info, (h ? &h->root : NULL), name, howto->name,
9083 + (bfd_vma) 0, input_bfd, input_section,
9088 + case bfd_reloc_undefined:
9089 + if (!((*info->callbacks->undefined_symbol)
9090 + (info, name, input_bfd, input_section,
9091 + rel->r_offset, TRUE)))
9095 + case bfd_reloc_outofrange:
9096 + error_message = _("out of range");
9097 + goto common_error;
9099 + case bfd_reloc_notsupported:
9100 + error_message = _("unsupported relocation");
9101 + goto common_error;
9103 + case bfd_reloc_dangerous:
9104 + /* error_message should already be set. */
9105 + goto common_error;
9108 + error_message = _("unknown error");
9109 + /* Fall through. */
9112 + BFD_ASSERT (error_message != NULL);
9113 + if (!((*info->callbacks->reloc_dangerous)
9114 + (info, error_message, input_bfd, input_section,
9125 +/* Add a new unwind edit to the list described by HEAD, TAIL. If INDEX is zero,
9126 + adds the edit to the start of the list. (The list must be built in order of
9127 + ascending INDEX: the function's callers are primarily responsible for
9128 + maintaining that condition). */
9131 +add_unwind_table_edit (arm_unwind_table_edit **head,
9132 + arm_unwind_table_edit **tail,
9133 + arm_unwind_edit_type type,
9134 + asection *linked_section,
9135 + unsigned int index)
9137 + arm_unwind_table_edit *new_edit = xmalloc (sizeof (arm_unwind_table_edit));
9139 + new_edit->type = type;
9140 + new_edit->linked_section = linked_section;
9141 + new_edit->index = index;
9145 + new_edit->next = NULL;
9148 + (*tail)->next = new_edit;
9150 + (*tail) = new_edit;
9153 + (*head) = new_edit;
9157 + new_edit->next = *head;
9166 +static _arm_elf_section_data *get_arm_elf_section_data (asection *);
9168 +/* Increase the size of EXIDX_SEC by ADJUST bytes. ADJUST mau be negative. */
9170 +adjust_exidx_size(asection *exidx_sec, int adjust)
9172 + asection *out_sec;
9174 + if (!exidx_sec->rawsize)
9175 + exidx_sec->rawsize = exidx_sec->size;
9177 + bfd_set_section_size (exidx_sec->owner, exidx_sec, exidx_sec->size + adjust);
9178 + out_sec = exidx_sec->output_section;
9179 + /* Adjust size of output section. */
9180 + bfd_set_section_size (out_sec->owner, out_sec, out_sec->size +adjust);
9183 +/* Insert an EXIDX_CANTUNWIND marker at the end of a section. */
9185 +insert_cantunwind_after(asection *text_sec, asection *exidx_sec)
9187 + struct _arm_elf_section_data *exidx_arm_data;
9189 + exidx_arm_data = get_arm_elf_section_data (exidx_sec);
9190 + add_unwind_table_edit (
9191 + &exidx_arm_data->u.exidx.unwind_edit_list,
9192 + &exidx_arm_data->u.exidx.unwind_edit_tail,
9193 + INSERT_EXIDX_CANTUNWIND_AT_END, text_sec, UINT_MAX);
9195 + adjust_exidx_size(exidx_sec, 8);
9198 +/* Scan .ARM.exidx tables, and create a list describing edits which should be
9199 + made to those tables, such that:
9201 + 1. Regions without unwind data are marked with EXIDX_CANTUNWIND entries.
9202 + 2. Duplicate entries are merged together (EXIDX_CANTUNWIND, or unwind
9203 + codes which have been inlined into the index).
9205 + The edits are applied when the tables are written
9206 + (in elf32_arm_write_section).
9210 +elf32_arm_fix_exidx_coverage (asection **text_section_order,
9211 + unsigned int num_text_sections,
9212 + struct bfd_link_info *info)
9215 + unsigned int last_second_word = 0, i;
9216 + asection *last_exidx_sec = NULL;
9217 + asection *last_text_sec = NULL;
9218 + int last_unwind_type = -1;
9220 + /* Walk over all EXIDX sections, and create backlinks from the corrsponding
9222 + for (inp = info->input_bfds; inp != NULL; inp = inp->link_next)
9226 + for (sec = inp->sections; sec != NULL; sec = sec->next)
9228 + struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
9229 + Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
9231 + if (hdr->sh_type != SHT_ARM_EXIDX)
9234 + if (elf_sec->linked_to)
9236 + Elf_Internal_Shdr *linked_hdr
9237 + = &elf_section_data (elf_sec->linked_to)->this_hdr;
9238 + struct _arm_elf_section_data *linked_sec_arm_data
9239 + = get_arm_elf_section_data (linked_hdr->bfd_section);
9241 + if (linked_sec_arm_data == NULL)
9244 + /* Link this .ARM.exidx section back from the text section it
9246 + linked_sec_arm_data->u.text.arm_exidx_sec = sec;
9251 + /* Walk all text sections in order of increasing VMA. Eilminate duplicate
9252 + index table entries (EXIDX_CANTUNWIND and inlined unwind opcodes),
9253 + and add EXIDX_CANTUNWIND entries for sections with no unwind table data.
9256 + for (i = 0; i < num_text_sections; i++)
9258 + asection *sec = text_section_order[i];
9259 + asection *exidx_sec;
9260 + struct _arm_elf_section_data *arm_data = get_arm_elf_section_data (sec);
9261 + struct _arm_elf_section_data *exidx_arm_data;
9262 + bfd_byte *contents = NULL;
9263 + int deleted_exidx_bytes = 0;
9265 + arm_unwind_table_edit *unwind_edit_head = NULL;
9266 + arm_unwind_table_edit *unwind_edit_tail = NULL;
9267 + Elf_Internal_Shdr *hdr;
9270 + if (arm_data == NULL)
9273 + exidx_sec = arm_data->u.text.arm_exidx_sec;
9274 + if (exidx_sec == NULL)
9276 - (*_bfd_error_handler)
9277 - (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
9280 - (long) rel->r_offset,
9282 - h->root.root.string);
9284 + /* Section has no unwind data. */
9285 + if (last_unwind_type == 0 || !last_exidx_sec)
9288 + /* Ignore zero sized sections. */
9289 + if (sec->size == 0)
9292 + insert_cantunwind_after(last_text_sec, last_exidx_sec);
9293 + last_unwind_type = 0;
9297 - if (r != bfd_reloc_ok)
9298 + if (bfd_is_abs_section (exidx_sec->output_section))
9299 + /* The linker script probably has /DISCARD/ for this section. */
9302 + hdr = &elf_section_data (exidx_sec)->this_hdr;
9303 + if (hdr->sh_type != SHT_ARM_EXIDX)
9306 + exidx_arm_data = get_arm_elf_section_data (exidx_sec);
9307 + if (exidx_arm_data == NULL)
9310 + ibfd = exidx_sec->owner;
9312 + if (hdr->contents != NULL)
9313 + contents = hdr->contents;
9314 + else if (! bfd_malloc_and_get_section (ibfd, exidx_sec, &contents))
9318 + for (j = 0; j < hdr->sh_size; j += 8)
9321 + unsigned int second_word = bfd_get_32 (ibfd, contents + j + 4);
9325 + /* An EXIDX_CANTUNWIND entry. */
9326 + if (second_word == 1)
9328 - case bfd_reloc_overflow:
9329 - /* If the overflowing reloc was to an undefined symbol,
9330 - we have already printed one error message and there
9331 - is no point complaining again. */
9333 - h->root.type != bfd_link_hash_undefined)
9334 - && (!((*info->callbacks->reloc_overflow)
9335 - (info, (h ? &h->root : NULL), name, howto->name,
9336 - (bfd_vma) 0, input_bfd, input_section,
9340 + if (last_unwind_type == 0)
9344 + /* Inlined unwinding data. Merge if equal to previous. */
9345 + else if ((second_word & 0x80000000) != 0)
9347 + if (last_second_word == second_word && last_unwind_type == 1)
9350 + last_second_word = second_word;
9352 + /* Normal table entry. In theory we could merge these too,
9353 + but duplicate entries are likely to be much less common. */
9357 - case bfd_reloc_undefined:
9358 - if (!((*info->callbacks->undefined_symbol)
9359 - (info, name, input_bfd, input_section,
9360 - rel->r_offset, TRUE)))
9365 + add_unwind_table_edit (&unwind_edit_head, &unwind_edit_tail,
9366 + DELETE_EXIDX_ENTRY, NULL, j / 8);
9368 - case bfd_reloc_outofrange:
9369 - error_message = _("out of range");
9370 - goto common_error;
9371 + deleted_exidx_bytes += 8;
9374 - case bfd_reloc_notsupported:
9375 - error_message = _("unsupported relocation");
9376 - goto common_error;
9377 + last_unwind_type = unwind_type;
9380 - case bfd_reloc_dangerous:
9381 - /* error_message should already be set. */
9382 - goto common_error;
9383 + /* Free contents if we allocated it ourselves. */
9384 + if (contents != hdr->contents)
9388 - error_message = _("unknown error");
9389 - /* Fall through. */
9390 + /* Record edits to be applied later (in elf32_arm_write_section). */
9391 + exidx_arm_data->u.exidx.unwind_edit_list = unwind_edit_head;
9392 + exidx_arm_data->u.exidx.unwind_edit_tail = unwind_edit_tail;
9394 + if (deleted_exidx_bytes > 0)
9395 + adjust_exidx_size(exidx_sec, -deleted_exidx_bytes);
9397 + last_exidx_sec = exidx_sec;
9398 + last_text_sec = sec;
9402 - BFD_ASSERT (error_message != NULL);
9403 - if (!((*info->callbacks->reloc_dangerous)
9404 - (info, error_message, input_bfd, input_section,
9410 + /* Add terminating CANTUNWIND entry. */
9411 + if (last_exidx_sec && last_unwind_type != 0)
9412 + insert_cantunwind_after(last_text_sec, last_exidx_sec);
9418 +elf32_arm_output_glue_section (struct bfd_link_info *info, bfd *obfd,
9419 + bfd *ibfd, const char *name)
9421 + asection *sec, *osec;
9423 + sec = bfd_get_section_by_name (ibfd, name);
9424 + if (sec == NULL || (sec->flags & SEC_EXCLUDE) != 0)
9427 + osec = sec->output_section;
9428 + if (elf32_arm_write_section (obfd, info, sec, sec->contents))
9431 + if (! bfd_set_section_contents (obfd, osec, sec->contents,
9432 + sec->output_offset, sec->size))
9439 +elf32_arm_final_link (bfd *abfd, struct bfd_link_info *info)
9441 + struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info);
9443 + /* Invoke the regular ELF backend linker to do all the work. */
9444 + if (!bfd_elf_final_link (abfd, info))
9447 + /* Write out any glue sections now that we have created all the
9449 + if (globals->bfd_of_glue_owner != NULL)
9451 + if (! elf32_arm_output_glue_section (info, abfd,
9452 + globals->bfd_of_glue_owner,
9453 + ARM2THUMB_GLUE_SECTION_NAME))
9456 + if (! elf32_arm_output_glue_section (info, abfd,
9457 + globals->bfd_of_glue_owner,
9458 + THUMB2ARM_GLUE_SECTION_NAME))
9461 + if (! elf32_arm_output_glue_section (info, abfd,
9462 + globals->bfd_of_glue_owner,
9463 + VFP11_ERRATUM_VENEER_SECTION_NAME))
9466 + if (! elf32_arm_output_glue_section (info, abfd,
9467 + globals->bfd_of_glue_owner,
9468 + JANUS_2CC_ERRATUM_VENEER_SECTION_NAME))
9471 + if (! elf32_arm_output_glue_section (info, abfd,
9472 + globals->bfd_of_glue_owner,
9473 + ARM_BX_GLUE_SECTION_NAME))
9478 @@ -8329,7 +9758,7 @@ tag_cpu_arch_combine (bfd *ibfd, int old
9480 if (oldtag >= MAX_TAG_CPU_ARCH || newtag >= MAX_TAG_CPU_ARCH)
9482 - _bfd_error_handler (_("ERROR: %B: Unknown CPU architecture"), ibfd);
9483 + _bfd_error_handler (_("error: %B: Unknown CPU architecture"), ibfd);
9487 @@ -8367,7 +9796,7 @@ tag_cpu_arch_combine (bfd *ibfd, int old
9491 - _bfd_error_handler (_("ERROR: %B: Conflicting CPU architectures %d/%d"),
9492 + _bfd_error_handler (_("error: %B: Conflicting CPU architectures %d/%d"),
9493 ibfd, oldtag, newtag);
9496 @@ -8395,6 +9824,12 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9498 bfd_boolean result = TRUE;
9500 + /* Skip the linker stubs file. This preserves previous behavior
9501 + of accepting unknown attributes in the first input file - but
9503 + if (ibfd->flags & BFD_LINKER_CREATED)
9506 if (!elf_known_obj_attributes_proc (obfd)[0].i)
9508 /* This is the first object. Copy the attributes. */
9509 @@ -8418,7 +9853,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9510 else if (in_attr[Tag_ABI_FP_number_model].i != 0)
9513 - (_("ERROR: %B uses VFP register arguments, %B does not"),
9514 + (_("error: %B uses VFP register arguments, %B does not"),
9518 @@ -8534,7 +9969,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9519 binaries in the toolchain have had the attributes set
9522 - (_("ERROR: %B: 8-byte data alignment conflicts with %B"),
9523 + (_("error: %B: 8-byte data alignment conflicts with %B"),
9527 @@ -8568,7 +10003,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9531 - (_("ERROR: %B: Conflicting architecture profiles %c/%c"),
9532 + (_("error: %B: Conflicting architecture profiles %c/%c"),
9534 in_attr[i].i ? in_attr[i].i : '0',
9535 out_attr[i].i ? out_attr[i].i : '0');
9536 @@ -8601,7 +10036,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9537 && in_attr[i].i != AEABI_R9_unused)
9540 - (_("ERROR: %B: Conflicting use of R9"), ibfd);
9541 + (_("error: %B: Conflicting use of R9"), ibfd);
9544 if (out_attr[i].i == AEABI_R9_unused)
9545 @@ -8613,7 +10048,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9546 && out_attr[Tag_ABI_PCS_R9_use].i != AEABI_R9_unused)
9549 - (_("ERROR: %B: SB relative addressing conflicts with use of R9"),
9550 + (_("error: %B: SB relative addressing conflicts with use of R9"),
9554 @@ -8669,7 +10104,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9555 if (in_attr[i].i != out_attr[i].i)
9558 - (_("ERROR: %B uses iWMMXt register arguments, %B does not"),
9559 + (_("error: %B uses iWMMXt register arguments, %B does not"),
9563 @@ -8691,7 +10126,7 @@ elf32_arm_merge_eabi_attributes (bfd *ib
9564 if (in_attr[i].i != out_attr[i].i)
9567 - (_("ERROR: fp16 format mismatch between %B and %B"),
9568 + (_("error: fp16 format mismatch between %B and %B"),
9572 @@ -8895,7 +10330,7 @@ elf32_arm_merge_private_bfd_data (bfd *
9573 && !(ibfd->flags & DYNAMIC)
9574 && (in_flags & EF_ARM_BE8))
9576 - _bfd_error_handler (_("ERROR: %B is already in final BE8 format"),
9577 + _bfd_error_handler (_("error: %B is already in final BE8 format"),
9581 @@ -8971,7 +10406,7 @@ elf32_arm_merge_private_bfd_data (bfd *
9582 EF_ARM_EABI_VERSION (out_flags)))
9585 - (_("ERROR: Source object %B has EABI version %d, but target %B has EABI version %d"),
9586 + (_("error: Source object %B has EABI version %d, but target %B has EABI version %d"),
9588 (in_flags & EF_ARM_EABIMASK) >> 24,
9589 (out_flags & EF_ARM_EABIMASK) >> 24);
9590 @@ -8987,7 +10422,7 @@ elf32_arm_merge_private_bfd_data (bfd *
9591 if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
9594 - (_("ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"),
9595 + (_("error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"),
9597 in_flags & EF_ARM_APCS_26 ? 26 : 32,
9598 out_flags & EF_ARM_APCS_26 ? 26 : 32);
9599 @@ -8998,11 +10433,11 @@ elf32_arm_merge_private_bfd_data (bfd *
9601 if (in_flags & EF_ARM_APCS_FLOAT)
9603 - (_("ERROR: %B passes floats in float registers, whereas %B passes them in integer registers"),
9604 + (_("error: %B passes floats in float registers, whereas %B passes them in integer registers"),
9608 - (_("ERROR: %B passes floats in integer registers, whereas %B passes them in float registers"),
9609 + (_("error: %B passes floats in integer registers, whereas %B passes them in float registers"),
9612 flags_compatible = FALSE;
9613 @@ -9012,11 +10447,11 @@ elf32_arm_merge_private_bfd_data (bfd *
9615 if (in_flags & EF_ARM_VFP_FLOAT)
9617 - (_("ERROR: %B uses VFP instructions, whereas %B does not"),
9618 + (_("error: %B uses VFP instructions, whereas %B does not"),
9622 - (_("ERROR: %B uses FPA instructions, whereas %B does not"),
9623 + (_("error: %B uses FPA instructions, whereas %B does not"),
9626 flags_compatible = FALSE;
9627 @@ -9026,11 +10461,11 @@ elf32_arm_merge_private_bfd_data (bfd *
9629 if (in_flags & EF_ARM_MAVERICK_FLOAT)
9631 - (_("ERROR: %B uses Maverick instructions, whereas %B does not"),
9632 + (_("error: %B uses Maverick instructions, whereas %B does not"),
9636 - (_("ERROR: %B does not use Maverick instructions, whereas %B does"),
9637 + (_("error: %B does not use Maverick instructions, whereas %B does"),
9640 flags_compatible = FALSE;
9641 @@ -9049,11 +10484,11 @@ elf32_arm_merge_private_bfd_data (bfd *
9643 if (in_flags & EF_ARM_SOFT_FLOAT)
9645 - (_("ERROR: %B uses software FP, whereas %B uses hardware FP"),
9646 + (_("error: %B uses software FP, whereas %B uses hardware FP"),
9650 - (_("ERROR: %B uses hardware FP, whereas %B uses software FP"),
9651 + (_("error: %B uses hardware FP, whereas %B uses software FP"),
9654 flags_compatible = FALSE;
9655 @@ -9644,12 +11079,12 @@ elf32_arm_check_relocs (bfd *abfd, struc
9658 /* BPABI objects never have dynamic relocations mapped. */
9659 - if (! htab->symbian_p)
9660 + if (htab->symbian_p)
9664 flags = bfd_get_section_flags (dynobj, sreloc);
9665 - flags |= (SEC_LOAD | SEC_ALLOC);
9666 + flags &= ~(SEC_LOAD | SEC_ALLOC);
9667 bfd_set_section_flags (dynobj, sreloc, flags);
9670 @@ -10541,12 +11976,16 @@ elf32_arm_size_dynamic_sections (bfd * o
9671 bfd_elf32_arm_init_maps (ibfd);
9673 if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
9674 - || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info))
9675 + || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info)
9676 + || !bfd_elf32_arm_janus_2cc_erratum_scan (ibfd, info))
9677 /* xgettext:c-format */
9678 _bfd_error_handler (_("Errors encountered processing file %s"),
9682 + /* Allocate space for the glue sections now that we've sized them. */
9683 + bfd_elf32_arm_allocate_interworking_sections (info);
9685 /* The check_relocs and adjust_dynamic_symbol entry points have
9686 determined the sizes of the various dynamic sections. Allocate
9688 @@ -11634,6 +13073,11 @@ arm_map_one_stub (struct bfd_hash_entry
9691 output_arch_syminfo *osi;
9692 + const insn_sequence *template;
9693 + enum stub_insn_type prev_type;
9696 + enum map_symbol_type sym_type;
9698 /* Massage our args to the form they really have. */
9699 stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
9700 @@ -11652,58 +13096,74 @@ arm_map_one_stub (struct bfd_hash_entry
9701 addr = (bfd_vma) stub_entry->stub_offset;
9702 stub_name = stub_entry->output_name;
9704 - switch (stub_entry->stub_type)
9705 + template = stub_entry->stub_template;
9706 + switch (template[0].type)
9708 - case arm_stub_long_branch:
9709 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 8))
9711 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
9713 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 4))
9716 - case arm_thumb_v4t_stub_long_branch:
9717 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 12))
9719 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
9721 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 8))
9724 - case arm_thumb_thumb_stub_long_branch:
9725 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 16))
9727 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr))
9729 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 12))
9732 - case arm_thumb_arm_v4t_stub_long_branch:
9733 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 20))
9735 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr))
9737 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 8))
9739 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 16))
9741 + if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size))
9744 - case arm_thumb_arm_v4t_stub_short_branch:
9745 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, 8))
9747 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 4))
9750 - case arm_stub_pic_long_branch:
9751 - if (!elf32_arm_output_stub_sym (osi, stub_name, addr, 12))
9753 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr))
9755 - if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 8))
9756 + case THUMB16_TYPE:
9757 + case THUMB32_TYPE:
9758 + if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1,
9759 + stub_entry->stub_size))
9767 + prev_type = DATA_TYPE;
9769 + for (i = 0; i < stub_entry->stub_template_size; i++)
9771 + switch (template[i].type)
9774 + sym_type = ARM_MAP_ARM;
9777 + case THUMB16_TYPE:
9778 + case THUMB32_TYPE:
9779 + sym_type = ARM_MAP_THUMB;
9783 + sym_type = ARM_MAP_DATA;
9791 + if (template[i].type != prev_type)
9793 + prev_type = template[i].type;
9794 + if (!elf32_arm_output_map_sym (osi, sym_type, addr + size))
9798 + switch (template[i].type)
9801 + case THUMB32_TYPE:
9805 + case THUMB16_TYPE:
9820 @@ -11885,6 +13345,150 @@ elf32_arm_compare_mapping (const void *
9824 +/* Add OFFSET to lower 31 bits of ADDR, leaving other bits unmodified. */
9826 +static unsigned long
9827 +offset_prel31 (unsigned long addr, bfd_vma offset)
9829 + return (addr & ~0x7ffffffful) | ((addr + offset) & 0x7ffffffful);
9832 +/* Copy an .ARM.exidx table entry, adding OFFSET to (applied) PREL31
9836 +copy_exidx_entry (bfd *output_bfd, bfd_byte *to, bfd_byte *from, bfd_vma offset)
9838 + unsigned long first_word = bfd_get_32 (output_bfd, from);
9839 + unsigned long second_word = bfd_get_32 (output_bfd, from + 4);
9841 + /* High bit of first word is supposed to be zero. */
9842 + if ((first_word & 0x80000000ul) == 0)
9843 + first_word = offset_prel31 (first_word, offset);
9845 + /* If the high bit of the first word is clear, and the bit pattern is not 0x1
9846 + (EXIDX_CANTUNWIND), this is an offset to an .ARM.extab entry. */
9847 + if ((second_word != 0x1) && ((second_word & 0x80000000ul) == 0))
9848 + second_word = offset_prel31 (second_word, offset);
9850 + bfd_put_32 (output_bfd, first_word, to);
9851 + bfd_put_32 (output_bfd, second_word, to + 4);
9854 +/* Data for make_branch_to_a8_stub(). */
9856 +struct a8_branch_to_stub_data {
9857 + asection *writing_section;
9858 + bfd_byte *contents;
9862 +/* Helper to insert branches to Cortex-A8 erratum stubs in the right
9863 + places for a particular section. */
9866 +make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry,
9869 + struct elf32_arm_stub_hash_entry *stub_entry;
9870 + struct a8_branch_to_stub_data *data;
9871 + bfd_byte *contents;
9872 + unsigned long branch_insn;
9873 + bfd_vma veneered_insn_loc, veneer_entry_loc;
9874 + bfd_signed_vma branch_offset;
9876 + unsigned int index;
9878 + stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
9879 + data = (struct a8_branch_to_stub_data *) in_arg;
9881 + if (stub_entry->target_section != data->writing_section
9882 + || stub_entry->stub_type < arm_stub_a8_veneer_b_cond)
9885 + contents = data->contents;
9887 + veneered_insn_loc = stub_entry->target_section->output_section->vma
9888 + + stub_entry->target_section->output_offset
9889 + + stub_entry->target_value;
9891 + veneer_entry_loc = stub_entry->stub_sec->output_section->vma
9892 + + stub_entry->stub_sec->output_offset
9893 + + stub_entry->stub_offset;
9895 + if (stub_entry->stub_type == arm_stub_a8_veneer_blx)
9896 + veneered_insn_loc &= ~3u;
9898 + branch_offset = veneer_entry_loc - veneered_insn_loc - 4;
9900 + abfd = stub_entry->target_section->owner;
9901 + index = stub_entry->target_value;
9903 + /* We attempt to avoid this condition by setting stubs_always_after_branch
9904 + in elf32_arm_size_stubs if we've enabled the Cortex-A8 erratum workaround.
9905 + This check is just to be on the safe side... */
9906 + if ((veneered_insn_loc & ~0xfff) == (veneer_entry_loc & ~0xfff))
9908 + (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub is "
9909 + "allocated in unsafe location"), abfd);
9913 + switch (stub_entry->stub_type)
9915 + case arm_stub_a8_veneer_b:
9916 + case arm_stub_a8_veneer_b_cond:
9917 + branch_insn = 0xf0009000;
9920 + case arm_stub_a8_veneer_blx:
9921 + branch_insn = 0xf000e800;
9924 + case arm_stub_a8_veneer_bl:
9926 + unsigned int i1, j1, i2, j2, s;
9928 + branch_insn = 0xf000d000;
9931 + if (branch_offset < -16777216 || branch_offset > 16777214)
9933 + /* There's not much we can do apart from complain if this
9935 + (*_bfd_error_handler) (_("%B: error: Cortex-A8 erratum stub out "
9936 + "of range (input file too large)"), abfd);
9940 + /* i1 = not(j1 eor s), so:
9942 + j1 = (not i1) eor s. */
9944 + branch_insn |= (branch_offset >> 1) & 0x7ff;
9945 + branch_insn |= ((branch_offset >> 12) & 0x3ff) << 16;
9946 + i2 = (branch_offset >> 22) & 1;
9947 + i1 = (branch_offset >> 23) & 1;
9948 + s = (branch_offset >> 24) & 1;
9951 + branch_insn |= j2 << 11;
9952 + branch_insn |= j1 << 13;
9953 + branch_insn |= s << 26;
9962 + bfd_put_16 (abfd, (branch_insn >> 16) & 0xffff, &contents[index]);
9963 + bfd_put_16 (abfd, branch_insn & 0xffff, &contents[index + 2]);
9969 /* Do code byteswapping. Return FALSE afterwards so that the section is
9970 written out as normal. */
9971 @@ -11895,16 +13499,16 @@ elf32_arm_write_section (bfd *output_bfd
9975 - int mapcount, errcount;
9976 + unsigned int mapcount, errcount;
9977 _arm_elf_section_data *arm_data;
9978 struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
9979 elf32_arm_section_map *map;
9980 - elf32_vfp11_erratum_list *errnode;
9981 + elf32_cpu_erratum_list *errnode;
9984 bfd_vma offset = sec->output_section->vma + sec->output_offset;
9989 /* If this section has not been allocated an _arm_elf_section_data
9990 structure then we cannot record anything. */
9991 @@ -11928,11 +13532,12 @@ elf32_arm_write_section (bfd *output_bfd
9992 switch (errnode->type)
9994 case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
9995 + case JANUS_2CC_ERRATUM_BRANCH_TO_ARM_VENEER:
9997 bfd_vma branch_to_veneer;
9998 /* Original condition code of instruction, plus bit mask for
9999 ARM B instruction. */
10000 - unsigned int insn = (errnode->u.b.vfp_insn & 0xf0000000)
10001 + unsigned int insn = (errnode->u.b.orig_insn & 0xf0000000)
10004 /* The instruction is before the label. */
10005 @@ -11970,7 +13575,7 @@ elf32_arm_write_section (bfd *output_bfd
10006 "range"), output_bfd);
10008 /* Original instruction. */
10009 - insn = errnode->u.v.branch->u.b.vfp_insn;
10010 + insn = errnode->u.v.branch->u.b.orig_insn;
10011 contents[endianflip ^ index] = insn & 0xff;
10012 contents[endianflip ^ (index + 1)] = (insn >> 8) & 0xff;
10013 contents[endianflip ^ (index + 2)] = (insn >> 16) & 0xff;
10014 @@ -11985,12 +13590,136 @@ elf32_arm_write_section (bfd *output_bfd
10018 + case JANUS_2CC_ERRATUM_ARM_VENEER:
10020 + bfd_vma branch_from_veneer;
10021 + unsigned int insn;
10023 + branch_from_veneer = errnode->u.v.branch->vma - errnode->vma
10026 + if ((signed) branch_from_veneer < -(1 << 25)
10027 + || (signed) branch_from_veneer >= (1 << 25))
10028 + (*_bfd_error_handler) (_("%B: error: Janus 2CC veneer out of "
10029 + "range"), output_bfd);
10031 + bfd_put_32 (output_bfd, errnode->u.v.branch->u.b.orig_insn,
10032 + contents + index);
10034 + /* nop, mov r0, r0. */
10035 + bfd_put_32 (output_bfd, 0xe1a00000, contents + index + 4);
10037 + insn = 0xea000000 | ((branch_from_veneer >> 2) & 0xffffff);
10038 + bfd_put_32 (output_bfd, insn, contents + index + 8);
10048 + if (arm_data->elf.this_hdr.sh_type == SHT_ARM_EXIDX)
10050 + arm_unwind_table_edit *edit_node
10051 + = arm_data->u.exidx.unwind_edit_list;
10052 + /* Now, sec->size is the size of the section we will write. The original
10053 + size (before we merged duplicate entries and inserted EXIDX_CANTUNWIND
10054 + markers) was sec->rawsize. (This isn't the case if we perform no
10055 + edits, then rawsize will be zero and we should use size). */
10056 + bfd_byte *edited_contents = bfd_malloc (sec->size);
10057 + unsigned int input_size = sec->rawsize ? sec->rawsize : sec->size;
10058 + unsigned int in_index, out_index;
10059 + bfd_vma add_to_offsets = 0;
10061 + for (in_index = 0, out_index = 0; in_index * 8 < input_size || edit_node;)
10065 + unsigned int edit_index = edit_node->index;
10067 + if (in_index < edit_index && in_index * 8 < input_size)
10069 + copy_exidx_entry (output_bfd, edited_contents + out_index * 8,
10070 + contents + in_index * 8, add_to_offsets);
10074 + else if (in_index == edit_index
10075 + || (in_index * 8 >= input_size
10076 + && edit_index == UINT_MAX))
10078 + switch (edit_node->type)
10080 + case DELETE_EXIDX_ENTRY:
10082 + add_to_offsets += 8;
10085 + case INSERT_EXIDX_CANTUNWIND_AT_END:
10087 + asection *text_sec = edit_node->linked_section;
10088 + bfd_vma text_offset = text_sec->output_section->vma
10089 + + text_sec->output_offset
10090 + + text_sec->size;
10091 + bfd_vma exidx_offset = offset + out_index * 8;
10092 + unsigned long prel31_offset;
10094 + /* Note: this is meant to be equivalent to an
10095 + R_ARM_PREL31 relocation. These synthetic
10096 + EXIDX_CANTUNWIND markers are not relocated by the
10097 + usual BFD method. */
10098 + prel31_offset = (text_offset - exidx_offset)
10101 + /* First address we can't unwind. */
10102 + bfd_put_32 (output_bfd, prel31_offset,
10103 + &edited_contents[out_index * 8]);
10105 + /* Code for EXIDX_CANTUNWIND. */
10106 + bfd_put_32 (output_bfd, 0x1,
10107 + &edited_contents[out_index * 8 + 4]);
10110 + add_to_offsets -= 8;
10115 + edit_node = edit_node->next;
10120 + /* No more edits, copy remaining entries verbatim. */
10121 + copy_exidx_entry (output_bfd, edited_contents + out_index * 8,
10122 + contents + in_index * 8, add_to_offsets);
10128 + if (!(sec->flags & SEC_EXCLUDE) && !(sec->flags & SEC_NEVER_LOAD))
10129 + bfd_set_section_contents (output_bfd, sec->output_section,
10131 + (file_ptr) sec->output_offset, sec->size);
10136 + /* Fix code to point to Cortex-A8 erratum stubs. */
10137 + if (globals->fix_cortex_a8)
10139 + struct a8_branch_to_stub_data data;
10141 + data.writing_section = sec;
10142 + data.contents = contents;
10144 + bfd_hash_traverse (&globals->stub_hash_table, make_branch_to_a8_stub,
10151 @@ -12267,6 +13996,7 @@ const struct elf_size_info elf32_arm_siz
10152 #define bfd_elf32_bfd_is_target_special_symbol elf32_arm_is_target_special_symbol
10153 #define bfd_elf32_close_and_cleanup elf32_arm_close_and_cleanup
10154 #define bfd_elf32_bfd_free_cached_info elf32_arm_bfd_free_cached_info
10155 +#define bfd_elf32_bfd_final_link elf32_arm_final_link
10157 #define elf_backend_get_symbol_type elf32_arm_get_symbol_type
10158 #define elf_backend_gc_mark_hook elf32_arm_gc_mark_hook
10159 --- a/bfd/elf32-mips.c
10160 +++ b/bfd/elf32-mips.c
10161 @@ -1662,6 +1662,15 @@ static const struct ecoff_debug_swap mip
10162 #define elf_backend_plt_readonly 1
10163 #define elf_backend_plt_sym_val _bfd_mips_elf_plt_sym_val
10165 +/* Most MIPS ELF files do not contain a traditional PLT; only VxWorks
10166 + and non-PIC dynamic executables do. These settings only affect
10167 + _bfd_elf_create_dynamic_sections, which is only called when we
10168 + do want a traditional PLT. */
10169 +#undef elf_backend_want_plt_sym
10170 +#define elf_backend_want_plt_sym 1
10171 +#undef elf_backend_plt_readonly
10172 +#define elf_backend_plt_readonly 1
10174 #define elf_backend_discard_info _bfd_mips_elf_discard_info
10175 #define elf_backend_ignore_discarded_relocs \
10176 _bfd_mips_elf_ignore_discarded_relocs
10177 @@ -1686,6 +1695,8 @@ static const struct ecoff_debug_swap mip
10178 #define bfd_elf32_bfd_print_private_bfd_data \
10179 _bfd_mips_elf_print_private_bfd_data
10181 +#define elf_backend_plt_sym_val _bfd_mips_elf_plt_sym_val
10183 /* Support for SGI-ish mips targets. */
10184 #define TARGET_LITTLE_SYM bfd_elf32_littlemips_vec
10185 #define TARGET_LITTLE_NAME "elf32-littlemips"
10186 @@ -1789,6 +1800,7 @@ mips_vxworks_final_write_processing (bfd
10187 #undef elf_backend_additional_program_headers
10188 #undef elf_backend_modify_segment_map
10189 #undef elf_backend_symbol_processing
10190 +#undef elf_backend_plt_sym_val
10191 /* NOTE: elf_backend_rela_normal is not defined for MIPS. */
10193 #include "elf32-target.h"
10194 --- a/bfd/elflink.c
10195 +++ b/bfd/elflink.c
10196 @@ -12502,3 +12502,15 @@ _bfd_elf_make_dynamic_reloc_section (ase
10201 +/* Copy the ELF symbol type associated with a linker hash entry. */
10203 +_bfd_elf_copy_link_hash_symbol_type (bfd *abfd ATTRIBUTE_UNUSED,
10204 + struct bfd_link_hash_entry * hdest,
10205 + struct bfd_link_hash_entry * hsrc)
10207 + struct elf_link_hash_entry *ehdest = (struct elf_link_hash_entry *)hdest;
10208 + struct elf_link_hash_entry *ehsrc = (struct elf_link_hash_entry *)hsrc;
10210 + ehdest->type = ehsrc->type;
10212 --- a/bfd/elfxx-mips.c
10213 +++ b/bfd/elfxx-mips.c
10214 @@ -677,6 +677,11 @@ static bfd *reldyn_sorting_bfd;
10215 /* Nonzero if ABFD is using NewABI conventions. */
10216 #define NEWABI_P(abfd) (ABI_N32_P (abfd) || ABI_64_P (abfd))
10218 +/* Nonzero if ABFD is a non-PIC object. */
10219 +#define NON_PIC_P(abfd) \
10220 + (((elf_elfheader (abfd)->e_flags & EF_MIPS_PIC) == 0) \
10221 + && ((elf_elfheader (abfd)->e_flags & EF_MIPS_CPIC) == EF_MIPS_CPIC))
10223 /* The IRIX compatibility level we are striving for. */
10224 #define IRIX_COMPAT(abfd) \
10225 (get_elf_backend_data (abfd)->elf_backend_mips_irix_compat (abfd))
10226 @@ -689,6 +694,9 @@ static bfd *reldyn_sorting_bfd;
10227 #define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
10228 (NEWABI_P (abfd) ? ".MIPS.options" : ".options")
10230 +/* The name of the section holding non-PIC to PIC call stubs. */
10231 +#define NON_PIC_TO_PIC_STUB_SECTION_NAME ".MIPS.pic_stubs"
10233 /* True if NAME is the recognized name of any SHT_MIPS_OPTIONS section.
10234 Some IRIX system files do not use MIPS_ELF_OPTIONS_SECTION_NAME. */
10235 #define MIPS_ELF_OPTIONS_SECTION_NAME_P(NAME) \
10236 @@ -6256,11 +6264,6 @@ _bfd_mips_elf_section_processing (bfd *a
10237 hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
10238 hdr->sh_type = SHT_PROGBITS;
10240 - else if (strcmp (name, ".sbss") == 0)
10242 - hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_MIPS_GPREL;
10243 - hdr->sh_type = SHT_NOBITS;
10245 else if (strcmp (name, ".srdata") == 0)
10247 hdr->sh_flags |= SHF_ALLOC | SHF_MIPS_GPREL;
10248 @@ -7587,7 +7590,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
10250 /* We need a stub, not a plt entry for the undefined
10251 function. But we record it as if it needs plt. See
10252 - _bfd_elf_adjust_dynamic_symbol. */
10253 + _bfd_elf_adjust_dynamic_symbol. Note that these relocations
10254 + are always used for PIC calls, even when using the new
10257 h->type = STT_FUNC;
10259 @@ -7693,6 +7698,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
10264 + h->non_got_ref = TRUE;
10265 /* In VxWorks executables, references to external symbols
10266 are handled using copy relocs or PLT stubs, so there's
10267 no need to add a .rela.dyn entry for this relocation. */
10268 @@ -7748,11 +7755,21 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
10269 case R_MIPS_GPREL16:
10270 case R_MIPS_LITERAL:
10271 case R_MIPS_GPREL32:
10273 + && (r_type == R_MIPS_GPREL16 || r_type == R_MIPS_GPREL32))
10274 + h->non_got_ref = TRUE;
10276 if (SGI_COMPAT (abfd))
10277 mips_elf_hash_table (info)->compact_rel_size +=
10278 sizeof (Elf32_External_crinfo);
10281 + case R_MIPS_HI16:
10282 + case R_MIPS_LO16:
10283 + if (h != NULL && strcmp (h->root.root.string, "_gp_disp") != 0)
10284 + h->non_got_ref = TRUE;
10287 /* This relocation describes the C++ object vtable hierarchy.
10288 Reconstruct it for later use during GC. */
10289 case R_MIPS_GNU_VTINHERIT:
10290 @@ -7775,20 +7792,20 @@ _bfd_mips_elf_check_relocs (bfd *abfd, s
10292 /* We must not create a stub for a symbol that has relocations
10293 related to taking the function's address. This doesn't apply to
10294 - VxWorks, where CALL relocs refer to a .got.plt entry instead of
10295 - a normal .got entry. */
10296 + VxWorks or the non-PIC ABI, where CALL relocs refer to a
10297 + .got.plt entry instead of a normal .got entry. */
10298 if (!htab->is_vxworks && h != NULL)
10302 - ((struct mips_elf_link_hash_entry *) h)->no_fn_stub = TRUE;
10304 case R_MIPS16_CALL16:
10305 case R_MIPS_CALL16:
10306 case R_MIPS_CALL_HI16:
10307 case R_MIPS_CALL_LO16:
10311 + ((struct mips_elf_link_hash_entry *) h)->no_fn_stub = TRUE;
10315 /* See if this reloc would need to refer to a MIPS16 hard-float stub,
10316 @@ -12471,7 +12488,9 @@ _bfd_mips_elf_merge_private_bfd_data (bf
10320 - if (null_input_bfd)
10321 + /* Dynamic objects normally have no sections, and do not reach
10322 + here - but they might if used as DYNOBJ. */
10323 + if (null_input_bfd || (ibfd->flags & DYNAMIC) != 0)
10327 --- a/bfd/elfxx-mips.h
10328 +++ b/bfd/elfxx-mips.h
10329 @@ -63,6 +63,9 @@ extern bfd_boolean _bfd_mips_elf_finish_
10330 extern bfd_boolean _bfd_mips_vxworks_finish_dynamic_symbol
10331 (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
10332 Elf_Internal_Sym *);
10333 +extern bfd_boolean _bfd_mips_nonpic_finish_dynamic_symbol
10334 + (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
10335 + Elf_Internal_Sym *);
10336 extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections
10337 (bfd *, struct bfd_link_info *);
10338 extern void _bfd_mips_elf_final_write_processing
10339 @@ -153,6 +156,15 @@ extern const struct bfd_elf_special_sect
10341 extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *);
10343 +extern bfd_vma _bfd_mips_elf_plt_sym_val
10344 + (bfd_vma, const asection *, const arelent *);
10345 +extern void _bfd_mips_elf_begin_write_processing
10346 + (bfd *abfd, struct bfd_link_info *link_info);
10347 +extern bfd_boolean bfd_mips_elf_maybe_create_non_pic_to_pic_stubs_section
10348 + (struct bfd_link_info *);
10349 +extern void _bfd_mips_post_process_headers
10350 + (bfd *abfd, struct bfd_link_info *link_info);
10352 #define elf_backend_common_definition _bfd_mips_elf_common_definition
10353 #define elf_backend_name_local_section_symbols \
10354 _bfd_mips_elf_name_local_section_symbols
10355 --- a/bfd/elfxx-target.h
10356 +++ b/bfd/elfxx-target.h
10357 @@ -256,6 +256,11 @@
10358 #define bfd_elfNN_bfd_link_just_syms _bfd_elf_link_just_syms
10361 +#ifndef bfd_elfNN_bfd_copy_link_hash_symbol_type
10362 +#define bfd_elfNN_bfd_copy_link_hash_symbol_type \
10363 + _bfd_elf_copy_link_hash_symbol_type
10366 #ifndef bfd_elfNN_bfd_link_split_section
10367 #define bfd_elfNN_bfd_link_split_section _bfd_generic_link_split_section
10369 --- a/bfd/i386msdos.c
10370 +++ b/bfd/i386msdos.c
10371 @@ -152,6 +152,8 @@ msdos_set_section_contents (bfd *abfd,
10372 #define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10373 #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
10374 #define msdos_bfd_link_just_syms _bfd_generic_link_just_syms
10375 +#define msdos_bfd_copy_link_hash_symbol_type \
10376 + _bfd_generic_copy_link_hash_symbol_type
10377 #define msdos_bfd_final_link _bfd_generic_final_link
10378 #define msdos_bfd_link_split_section _bfd_generic_link_split_section
10379 #define msdos_set_arch_mach _bfd_generic_set_arch_mach
10380 --- a/bfd/i386os9k.c
10381 +++ b/bfd/i386os9k.c
10382 @@ -176,6 +176,8 @@ os9k_sizeof_headers (bfd *abfd ATTRIBUTE
10383 #define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10384 #define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
10385 #define os9k_bfd_link_just_syms _bfd_generic_link_just_syms
10386 +#define os9k_bfd_copy_link_hash_symbol_type \
10387 + _bfd_generic_copy_link_hash_symbol_type
10388 #define os9k_bfd_final_link _bfd_generic_final_link
10389 #define os9k_bfd_link_split_section _bfd_generic_link_split_section
10393 @@ -3774,6 +3774,8 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE
10394 #define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10395 #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
10396 #define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
10397 +#define ieee_bfd_copy_link_hash_symbol_type \
10398 + _bfd_generic_copy_link_hash_symbol_type
10399 #define ieee_bfd_final_link _bfd_generic_final_link
10400 #define ieee_bfd_link_split_section _bfd_generic_link_split_section
10404 @@ -770,6 +770,14 @@ ihex_write_object_contents (bfd *abfd)
10405 bfd_size_type count;
10409 + /* If the top 32 bits of a 64-bit address are simply a sign-extension
10410 + of the bottom 32 bits, then simply truncate the address to 32 bits. */
10411 + if (sizeof (bfd_vma) * 8 > 32
10412 + && ((where & ~(bfd_vma)0x7fffffff) == 0
10413 + || (where & ~(bfd_vma)0x7fffffff) == ~(bfd_vma)0x7fffffff))
10414 + where &= (bfd_vma)0xffffffffUL;
10419 @@ -937,6 +945,8 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE
10420 #define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10421 #define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
10422 #define ihex_bfd_link_just_syms _bfd_generic_link_just_syms
10423 +#define ihex_bfd_copy_link_hash_symbol_type \
10424 + _bfd_generic_copy_link_hash_symbol_type
10425 #define ihex_bfd_final_link _bfd_generic_final_link
10426 #define ihex_bfd_link_split_section _bfd_generic_link_split_section
10428 --- a/bfd/libbfd-in.h
10429 +++ b/bfd/libbfd-in.h
10430 @@ -410,6 +410,9 @@ extern bfd_boolean _bfd_generic_set_sect
10431 ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
10432 #define _bfd_nolink_bfd_link_just_syms \
10433 ((void (*) (asection *, struct bfd_link_info *)) bfd_void)
10434 +#define _bfd_nolink_bfd_copy_link_hash_symbol_type \
10435 + ((void (*) (bfd *, struct bfd_link_hash_entry *, \
10436 + struct bfd_link_hash_entry *)) bfd_void)
10437 #define _bfd_nolink_bfd_final_link \
10438 ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
10439 #define _bfd_nolink_bfd_link_split_section \
10440 @@ -521,6 +524,10 @@ extern bfd_boolean _bfd_generic_link_add
10441 extern void _bfd_generic_link_just_syms
10442 (asection *, struct bfd_link_info *);
10444 +/* Generic routine that does nothing. */
10445 +extern void _bfd_generic_copy_link_hash_symbol_type
10446 + (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
10448 /* Generic link routine. */
10449 extern bfd_boolean _bfd_generic_final_link
10450 (bfd *, struct bfd_link_info *);
10453 @@ -415,6 +415,9 @@ extern bfd_boolean _bfd_generic_set_sect
10454 ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
10455 #define _bfd_nolink_bfd_link_just_syms \
10456 ((void (*) (asection *, struct bfd_link_info *)) bfd_void)
10457 +#define _bfd_nolink_bfd_copy_link_hash_symbol_type \
10458 + ((void (*) (bfd *, struct bfd_link_hash_entry *, \
10459 + struct bfd_link_hash_entry *)) bfd_void)
10460 #define _bfd_nolink_bfd_final_link \
10461 ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
10462 #define _bfd_nolink_bfd_link_split_section \
10463 @@ -526,6 +529,10 @@ extern bfd_boolean _bfd_generic_link_add
10464 extern void _bfd_generic_link_just_syms
10465 (asection *, struct bfd_link_info *);
10467 +/* Generic routine that does nothing. */
10468 +extern void _bfd_generic_copy_link_hash_symbol_type
10469 + (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
10471 /* Generic link routine. */
10472 extern bfd_boolean _bfd_generic_final_link
10473 (bfd *, struct bfd_link_info *);
10474 --- a/bfd/libecoff.h
10475 +++ b/bfd/libecoff.h
10476 @@ -310,6 +310,8 @@ extern struct bfd_link_hash_table *_bfd_
10477 extern bfd_boolean _bfd_ecoff_bfd_link_add_symbols
10478 (bfd *, struct bfd_link_info *);
10479 #define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms
10480 +#define _bfd_ecoff_bfd_copy_link_hash_symbol_type \
10481 + _bfd_generic_copy_link_hash_symbol_type
10482 extern bfd_boolean _bfd_ecoff_bfd_final_link
10483 (bfd *, struct bfd_link_info *);
10487 @@ -795,6 +795,17 @@ _bfd_generic_link_just_syms (asection *s
10488 sec->output_offset = sec->vma;
10491 +/* Copy the type of a symbol assiciated with a linker hast table entry.
10492 + Override this so that symbols created in linker scripts get their
10493 + type from the RHS of the assignment.
10494 + The default implementation does nothing. */
10496 +_bfd_generic_copy_link_hash_symbol_type (bfd *abfd ATTRIBUTE_UNUSED,
10497 + struct bfd_link_hash_entry * hdest ATTRIBUTE_UNUSED,
10498 + struct bfd_link_hash_entry * hsrc ATTRIBUTE_UNUSED)
10502 /* Add symbols from an object file to the global hash table. */
10508 #define bfd_mach_o_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10509 #define bfd_mach_o_bfd_link_add_symbols _bfd_generic_link_add_symbols
10510 #define bfd_mach_o_bfd_link_just_syms _bfd_generic_link_just_syms
10511 +#define bfd_mach_o_bfd_copy_link_hash_symbol_type \
10512 + _bfd_generic_copy_link_hash_symbol_type
10513 #define bfd_mach_o_bfd_final_link _bfd_generic_final_link
10514 #define bfd_mach_o_bfd_link_split_section _bfd_generic_link_split_section
10515 #define bfd_mach_o_set_arch_mach bfd_default_set_arch_mach
10518 @@ -3199,6 +3199,8 @@ mmo_write_object_contents (bfd *abfd)
10519 #define mmo_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10520 #define mmo_bfd_link_add_symbols _bfd_generic_link_add_symbols
10521 #define mmo_bfd_link_just_syms _bfd_generic_link_just_syms
10522 +#define mmo_bfd_copy_link_hash_symbol_type \
10523 + _bfd_generic_copy_link_hash_symbol_type
10524 #define mmo_bfd_final_link _bfd_generic_final_link
10525 #define mmo_bfd_link_split_section _bfd_generic_link_split_section
10527 --- a/bfd/nlm-target.h
10528 +++ b/bfd/nlm-target.h
10530 #define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10531 #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
10532 #define nlm_bfd_link_just_syms _bfd_generic_link_just_syms
10533 +#define nlm_bfd_copy_link_hash_symbol_type \
10534 + _bfd_generic_copy_link_hash_symbol_type
10535 #define nlm_bfd_final_link _bfd_generic_final_link
10536 #define nlm_bfd_link_split_section _bfd_generic_link_split_section
10540 @@ -1202,6 +1202,8 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUT
10541 #define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10542 #define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
10543 #define oasys_bfd_link_just_syms _bfd_generic_link_just_syms
10544 +#define oasys_bfd_copy_link_hash_symbol_type \
10545 + _bfd_generic_copy_link_hash_symbol_type
10546 #define oasys_bfd_final_link _bfd_generic_final_link
10547 #define oasys_bfd_link_split_section _bfd_generic_link_split_section
10552 #define bfd_pef_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10553 #define bfd_pef_bfd_link_add_symbols _bfd_generic_link_add_symbols
10554 #define bfd_pef_bfd_link_just_syms _bfd_generic_link_just_syms
10555 +#define bfd_pef_bfd_copy_link_hash_symbol_type \
10556 + _bfd_generic_copy_link_hash_symbol_type
10557 #define bfd_pef_bfd_final_link _bfd_generic_final_link
10558 #define bfd_pef_bfd_link_split_section _bfd_generic_link_split_section
10559 #define bfd_pef_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
10560 --- a/bfd/ppcboot.c
10561 +++ b/bfd/ppcboot.c
10562 @@ -479,6 +479,8 @@ ppcboot_bfd_print_private_bfd_data (abfd
10563 #define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10564 #define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
10565 #define ppcboot_bfd_link_just_syms _bfd_generic_link_just_syms
10566 +#define ppcboot_bfd_copy_link_hash_symbol_type \
10567 + _bfd_generic_copy_link_hash_symbol_type
10568 #define ppcboot_bfd_final_link _bfd_generic_final_link
10569 #define ppcboot_bfd_link_split_section _bfd_generic_link_split_section
10570 #define ppcboot_get_section_contents_in_window \
10573 @@ -210,7 +210,8 @@ bfd_simple_get_relocated_section_content
10575 if (outbuf == NULL)
10577 - data = bfd_malloc (sec->size);
10578 + bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
10579 + data = bfd_malloc (amt);
10585 @@ -6366,6 +6366,8 @@ som_bfd_link_split_section (bfd *abfd AT
10586 #define som_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10587 #define som_bfd_link_add_symbols _bfd_generic_link_add_symbols
10588 #define som_bfd_link_just_syms _bfd_generic_link_just_syms
10589 +#define som_bfd_copy_link_hash_symbol_type \
10590 + _bfd_generic_copy_link_hash_symbol_type
10591 #define som_bfd_final_link _bfd_generic_final_link
10592 #define som_bfd_gc_sections bfd_generic_gc_sections
10593 #define som_bfd_merge_sections bfd_generic_merge_sections
10596 @@ -1259,6 +1259,8 @@ srec_print_symbol (bfd *abfd,
10597 #define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10598 #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
10599 #define srec_bfd_link_just_syms _bfd_generic_link_just_syms
10600 +#define srec_bfd_copy_link_hash_symbol_type \
10601 + _bfd_generic_copy_link_hash_symbol_type
10602 #define srec_bfd_final_link _bfd_generic_final_link
10603 #define srec_bfd_link_split_section _bfd_generic_link_split_section
10605 --- a/bfd/targets.c
10606 +++ b/bfd/targets.c
10607 @@ -435,6 +435,7 @@ BFD_JUMP_TABLE macros.
10608 . NAME##_bfd_link_hash_table_free, \
10609 . NAME##_bfd_link_add_symbols, \
10610 . NAME##_bfd_link_just_syms, \
10611 +. NAME##_bfd_copy_link_hash_symbol_type, \
10612 . NAME##_bfd_final_link, \
10613 . NAME##_bfd_link_split_section, \
10614 . NAME##_bfd_gc_sections, \
10615 @@ -465,6 +466,12 @@ BFD_JUMP_TABLE macros.
10616 . {* Indicate that we are only retrieving symbol values from this section. *}
10617 . void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
10619 +. {* Copy the symbol type of a linker hash table entry. *}
10620 +.#define bfd_copy_link_hash_symbol_type(b, t, f) \
10621 +. BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
10622 +. void (*_bfd_copy_link_hash_symbol_type)
10623 +. (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
10625 . {* Do a link based on the link_order structures attached to each
10626 . section of the BFD. *}
10627 . bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
10630 @@ -947,6 +947,8 @@ tekhex_print_symbol (bfd *abfd,
10631 #define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10632 #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
10633 #define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
10634 +#define tekhex_bfd_copy_link_hash_symbol_type \
10635 + _bfd_generic_copy_link_hash_symbol_type
10636 #define tekhex_bfd_final_link _bfd_generic_final_link
10637 #define tekhex_bfd_link_split_section _bfd_generic_link_split_section
10638 #define tekhex_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
10639 --- a/bfd/versados.c
10640 +++ b/bfd/versados.c
10641 @@ -812,6 +812,8 @@ versados_canonicalize_reloc (bfd *abfd,
10642 #define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10643 #define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
10644 #define versados_bfd_link_just_syms _bfd_generic_link_just_syms
10645 +#define versados_bfd_copy_link_hash_symbol_type \
10646 + _bfd_generic_copy_link_hash_symbol_type
10647 #define versados_bfd_final_link _bfd_generic_final_link
10648 #define versados_bfd_link_split_section _bfd_generic_link_split_section
10653 #define vms_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
10654 #define vms_make_empty_symbol _bfd_generic_make_empty_symbol
10655 #define vms_bfd_link_just_syms _bfd_generic_link_just_syms
10656 +#define vms_bfd_copy_link_hash_symbol_type \
10657 + _bfd_generic_copy_link_hash_symbol_type
10658 #define vms_bfd_is_group_section bfd_generic_is_group_section
10659 #define vms_bfd_discard_group bfd_generic_discard_group
10660 #define vms_section_already_linked _bfd_generic_section_already_linked
10664 #define bfd_sym_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
10665 #define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols
10666 #define bfd_sym_bfd_link_just_syms _bfd_generic_link_just_syms
10667 +#define bfd_sym_bfd_copy_link_hash_symbol_type \
10668 + _bfd_generic_copy_link_hash_symbol_type
10669 #define bfd_sym_bfd_final_link _bfd_generic_final_link
10670 #define bfd_sym_bfd_link_split_section _bfd_generic_link_split_section
10671 #define bfd_sym_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
10672 --- a/binutils/objcopy.c
10673 +++ b/binutils/objcopy.c
10674 @@ -2218,6 +2218,26 @@ setup_bfd_headers (bfd *ibfd, bfd *obfd)
10678 +/* Sign extend VMA if ABFD tells us that addresses are sign
10682 +maybe_sign_extend_vma (bfd *abfd, bfd_vma vma)
10684 + if (bfd_get_sign_extend_vma (abfd) == 1
10685 + && bfd_arch_bits_per_address (abfd) < 8 * sizeof (bfd_vma))
10687 + unsigned int bits = bfd_arch_bits_per_address (abfd);
10688 + bfd_vma sign_bit = ((bfd_vma) 1) << (bits - 1);
10689 + bfd_vma upper_bits = (~(bfd_vma) 0) << bits;
10690 + if ((vma & sign_bit) != 0)
10691 + vma |= upper_bits;
10693 + vma &= ~upper_bits;
10698 /* Create a section in OBFD with the same
10699 name and attributes as ISECTION in IBFD. */
10701 @@ -2314,6 +2334,7 @@ setup_section (bfd *ibfd, sec_ptr isecti
10703 vma += change_section_address;
10705 + vma = maybe_sign_extend_vma (ibfd, vma);
10706 if (! bfd_set_section_vma (obfd, osection, vma))
10708 err = _("failed to set vma");
10709 @@ -2333,6 +2354,7 @@ setup_section (bfd *ibfd, sec_ptr isecti
10711 lma += change_section_address;
10713 + lma = maybe_sign_extend_vma (ibfd, lma);
10714 osection->lma = lma;
10716 /* FIXME: This is probably not enough. If we change the LMA we
10717 --- a/binutils/objdump.c
10718 +++ b/binutils/objdump.c
10719 @@ -1895,7 +1895,7 @@ disassemble_section (bfd *abfd, asection
10722 addr = section->vma + addr_offset;
10723 - addr = (addr ^ sign_adjust) - sign_adjust;
10724 + addr = ((addr & ((sign_adjust << 1) - 1)) ^ sign_adjust) - sign_adjust;
10726 if (sym != NULL && bfd_asymbol_value (sym) <= addr)
10728 @@ -1958,7 +1958,8 @@ disassemble_section (bfd *abfd, asection
10730 nextstop_offset = bfd_asymbol_value (nextsym) - section->vma;
10732 - if (nextstop_offset > stop_offset)
10733 + if (nextstop_offset > stop_offset
10734 + || nextstop_offset <= addr_offset)
10735 nextstop_offset = stop_offset;
10737 /* If a symbol is explicitly marked as being an object
10738 --- a/binutils/readelf.c
10739 +++ b/binutils/readelf.c
10740 @@ -2688,6 +2688,10 @@ get_arm_section_type_name (unsigned int
10741 return "ARM_PREEMPTMAP";
10742 case SHT_ARM_ATTRIBUTES:
10743 return "ARM_ATTRIBUTES";
10744 + case SHT_ARM_DEBUGOVERLAY:
10745 + return "ARM_DEBUGOVERLAY";
10746 + case SHT_ARM_OVERLAYSECTION:
10747 + return "ARM_OVERLAYSECTION";
10751 --- a/binutils/testsuite/binutils-all/arm/thumb2-cond.s
10752 +++ b/binutils/testsuite/binutils-all/arm/thumb2-cond.s
10759 -.short 0xf000, 0xf800
10761 -.short 0xf000, 0xbf04
10767 --- a/binutils/testsuite/binutils-all/objdump.W
10768 +++ b/binutils/testsuite/binutils-all/objdump.W
10771 -tmpdir/dw2-compressed.o: file format .*
10772 +.*dw2-compressed.o: file format .*
10774 Contents of the .debug_info section:
10776 --- a/binutils/testsuite/binutils-all/objdump.s
10777 +++ b/binutils/testsuite/binutils-all/objdump.s
10780 -tmpdir/dw2-compressed.o: file format .*
10781 +.*dw2-compressed.o: file format .*
10783 Contents of section .zdebug_abbrev:
10784 0000 5a4c4942 00000000 00000033 785e6314 ZLIB.......3x\^c.
10785 --- a/config/mh-mingw
10786 +++ b/config/mh-mingw
10788 # Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows
10789 # Vista (see PR33281 for details).
10790 -BOOT_CFLAGS += -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format
10791 -CFLAGS += -D__USE_MINGW_ACCESS
10792 +# Because we wrap access in libiberty/cygpath.c, we do not want to use
10793 +# the MinGW wrappers for access.
10794 +BOOT_CFLAGS += -Wno-pedantic-ms-format
10795 +# CFLAGS += -D__USE_MINGW_ACCESS
10796 # Increase stack limit to same as Linux default.
10797 LDFLAGS += -Wl,--stack,8388608
10800 @@ -2597,11 +2597,16 @@ case "${target}" in
10801 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
10804 - skipdirs="$skipdirs target-libiberty"
10805 - noconfigdirs="$noconfigdirs ${libgcj}"
10806 - if test x$with_newlib = xyes; then
10807 - noconfigdirs="$noconfigdirs gprof"
10809 + noconfigdirs="${noconfigdirs} sid ${libgcj} target-rda"
10810 + if ! test x"${with_newlib}" = xyes ; then
10811 + # remove libgloss and libiberty too, when we're not building newlib
10812 + skipdirs="${skipdirs} target-libgloss target-libiberty"
10813 + # add sde-conv host tool
10814 + configdirs="${configdirs} convert"
10816 + # add gprof back in - we do support it!
10817 + skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
10818 + noconfigdirs=`echo " ${noconfigdirs} " | sed -e 's/ gprof / /'`
10824 @@ -833,11 +833,16 @@ case "${target}" in
10825 noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
10828 - skipdirs="$skipdirs target-libiberty"
10829 - noconfigdirs="$noconfigdirs ${libgcj}"
10830 - if test x$with_newlib = xyes; then
10831 - noconfigdirs="$noconfigdirs gprof"
10832 + noconfigdirs="${noconfigdirs} sid ${libgcj} target-rda"
10833 + if ! test x"${with_newlib}" = xyes ; then
10834 + # remove libgloss and libiberty too, when we're not building newlib
10835 + skipdirs="${skipdirs} target-libgloss target-libiberty"
10836 + # add sde-conv host tool
10837 + configdirs="${configdirs} convert"
10839 + # add gprof back in - we do support it!
10840 + skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'`
10841 + noconfigdirs=`echo " ${noconfigdirs} " | sed -e 's/ gprof / /'`
10846 +++ b/convert/ChangeLog
10848 +2008-03-11 Thiemo Seufer <ths@mips.com>
10850 + * bin.c, conv.texi, convert.c, elf.h, elfio.c, elfmips.h,
10851 + elfout.c, idtbin.c, lsifast.c, mipsflash.c, srec.c, stagbin.c:
10852 + Update license to GPL v3.
10854 +2007-07-02 Maciej W. Rozycki <macro@mips.com>
10856 + * Makefile.am (AUTOMAKE_OPTIONS): Use "cygnus" rather than
10858 + * Makefile.in: Regenerate.
10860 +2004-10-08 Nigel Stephens <nigel@mips.com>
10862 + * elfout.c (ElfEnd): Use ehdr.e_phnum to calculate offset of
10863 + section header, otherwise we are out by one.
10865 +2004-10-04 Nigel Stephens <nigel@mips.com>
10867 + * Makefile.am: Use "cygnus" automake options, so that info file
10868 + gets created in build directory, not source directory.
10870 + * Makefile.in: Rebuilt.
10872 +2004-09-09 Nigel Stephens <nigel@mips.com>
10874 + * elfout.c (ElfEnd): Set paddr field in program header as well as vaddr.
10875 + Set number of program header entries to the actual number of
10876 + entries created (1 less than the number of sections. Use
10877 + ehdr.e_phnum and ehdr.e_shnum to select the number of program and
10878 + section headers to be written out.
10880 +Tue Oct 21 12:13:43 2003 Nigel Stephens <nigel@mips.com>
10882 + * conv.info: Gets built in source dir.
10884 +Sat Oct 4 00:34:44 2003 Nigel Stephens <nigel@mips.com>
10886 + * Makefile.am: Added conv.texi and html build rule.
10888 + * conv.texi: New Texinfo doc file for conv only.
10890 +Tue Aug 19 13:07:43 2003 Nigel Stephens <nigel@mips.com>
10892 + Changed to GPL copyright headers.
10894 +Tue Aug 5 22:18:41 2003 Nigel Stephens <nigel@mips.com>
10896 + Added BSD-style copyright headers.
10898 +Wed Jul 9 03:31:06 2003 Nigel Stephens <nigel@mips.com>
10900 + * mipsflash.c: New MIPS flash download format. Needs some more
10901 + work before prime-time.
10903 + * convert.c: Use const char * where necessary.
10904 + (formats): Add description of each format to table.
10905 + Add mips flash download format.
10906 + (usage): Output format descriptions.
10907 + (main): Output format descriptions if we get a bas format name.
10909 + * Makefile.am (conv_SOURCES): Added mipsflash.c
10911 +Thu Apr 24 15:09:32 2003 Nigel Stephens <nigel@mips.com>
10913 + * elfout.c (ElfStart): Set ehdr.e_version to EV_CURRENT, not EV_NONE.
10915 +Wed Dec 18 16:47:42 2002 Nigel Stephens <nigel@mips.com>
10917 + * acinclude.m4 (CONV_BINARY_FOPEN): Match cygwin* not cygwin32*.
10919 + * configure: Rebuilt.
10920 + * config.h.in: Rebuilt.
10921 + * aclocal.m4: Rebuilt.
10923 +Mon Nov 18 11:04:04 2002 Nigel Stephens <nigel@mips.com>
10925 + * configure.in (AC_REPLACE_FUNCS): Removed, used libiberty
10926 + versions of getopt and strtoul.
10928 + * Makefile.am (EXTRA_conv_SOURCES): Line removed, we don't have
10929 + our own getopt.h now.
10930 + (LIBIBERTY): New variable.
10931 + (conv_LDADD): Set to LIBIBERTY, not LDADD.
10933 + * Makefile.in, configure, config.h.in: Rebuilt.
10935 + * getopt.h: Removed.
10936 + * getopt.c: Removed.
10937 + * strtoul.c: Removed.
10939 +Tue Oct 15 12:57:11 2002 Nigel Stephens <nigel@mips.com>
10941 + * elfout.c: New "relocated" ELF output format, mainly so that we
10942 + can give a PROM image to MIPSsim.
10944 + * convert.c: Add endianness argument to start function entries in
10946 + (formats): Add "relf" format.
10947 + (progname): Make it global.
10948 + (promflag): Similarly.
10949 + (prombase): Similarly.
10950 + (usage): Add -EB/-EL.
10951 + (xmalloc): New error checking interface to malloc.
10952 + (convertSymbols): Use xmalloc(), and free malloced data when
10954 + (main): Handle -EB/-EL argument, only relevant for raw binary
10955 + input files. In other cases set bigendian flag from the ELF input
10956 + file. Pass bigendian flag to format "start" function. Use
10959 + * configure.in (AC_CHECK_HEADERS): Add stdlib.h
10961 + * config.h.in: Add HAVE_STDLIB_H
10963 + * lsifast.c (LsiStart): Use xmalloc().
10964 + (LsiEnd): Use free().
10965 + * bin.c: Similarly.
10966 + * stagbin.c: Similarly.
10968 + * sysdep.h: Fix up definitions of alloca(). Add definition of
10971 + * Makefile.am (conv_SOURCES): Add elfout.c
10972 + (install-exec-local): Don't add .exe extension on twice.
10974 +Fri Jun 7 13:58:49 2002 Nigel Stephens <nigel@algor.co.uk>
10976 + * Makefile.am (html): Do nothing target.
10978 + * Makefile.in: Rebuilt.
10980 +Mon Mar 18 19:13:08 2002 Nigel Stephens <nigel@algor.co.uk>
10982 + * Makefile.am: Add manual install step to install program with
10983 + additional target alias name.
10985 + * Makefile.in: Rebuilt.
10987 +Tue Nov 7 00:35:37 2000 Chris Dearman <chris@algor.co.uk>
10989 + * convert.c (main): Convert promlimit to physical address when
10990 + parsing -a base:limit option. Exit with error if promlimit!=0
10991 + && promlimit<=prombase.
10993 +Tue Jul 18 15:19:09 2000 Nigel Stephens <nigel@algor.co.uk>
10995 + * convert.c (main): Sort the program header into physical/load
10996 + address order - the linker sorts it into virtual address order.
10997 + (phcompar): New comparison function for qsort().
10999 +Fri Nov 19 16:42:57 1999 Nigel Stephens <nigel@algor.co.uk>
11001 + * All: Added copyright messages.
11003 +Thu Nov 11 15:25:54 1999 Nigel Stephens <nigel@algor.co.uk>
11005 + * convert.c (main): Allow byte selection when not in PROM mode.
11007 +Mon Oct 25 14:21:47 1999 Nigel Stephens <nigel@algor.co.uk>
11009 + * Makefile.am: Add no-dependencies to AUTOMAKE_OPTIONS
11011 +Thu Sep 9 18:12:11 1999 Nigel Stephens <nigel@algor.co.uk>
11013 + * convert.c (convertSegment): Change in read/write flag of segment
11014 + will cause it to be moved to next 16 byte boundary.
11016 +Wed Jun 3 16:35:32 1998 Nigel Stephens <nigel@algor.co.uk>
11018 + * configure.in (AC_CANONICAL_SYSTEM): No longer needed by
11019 + AM_CYGWIN32. Use AM_EXEEXT instead of AM_CYGWIN32.
11021 +Tue May 12 15:42:10 1998 Nigel Stephens <nigel@algor.co.uk>
11023 + * configure.in: Bump version number to 3.0.3
11025 + * Makefile.am: Change automake options to --foreign.
11027 +Fri Apr 17 14:26:29 1998 Nigel Stephens <nigel@algor.co.uk>
11029 + * Makefile.am: Moved over to automake/autoconf.
11031 +Mon Jan 26 15:40:18 1998 Nigel Stephens <nigel@algor.co.uk>
11033 + * convert.c (convertSymbols): Flag MIPS16 symbols by making symbol
11035 + (main): Do all PROM resident segments first, irrespective of what
11038 +Mon Jul 7 18:04:50 1997 Nigel Stephens <nigel@algor.co.uk>
11040 + SDE-MIPS version 2.2.1 released.
11042 +Tue May 20 18:07:32 1997 Nigel Stephens <nigel@algor.co.uk>
11044 + SDE-MIPS version 2.2 released.
11046 +Tue May 20 14:39:41 1997 Nigel Stephens <nigel@algor.co.uk>
11048 + * convert.c: Realign segment when the PF_X flag changes.
11050 +Wed Apr 30 17:59:56 1997 Nigel Stephens <nigel@algor.co.uk>
11052 + SDE-MIPS version 2.2-beta released.
11054 +Thu Apr 24 13:52:08 1997 Nigel Stephens <nigel@algor.co.uk>
11056 + * elfio.c: Added functions to read and write .reginfo and .gptab
11059 + * elfmips.h: Added prototypes for above, and defined new
11060 + architecture flags and SDE-MIPS special flags.
11062 +++ b/convert/Makefile.am
11064 +## Process this file with automake to generate Makefile.in
11066 +AUTOMAKE_OPTIONS = cygnus
11067 +ACLOCAL_AMFLAGS = -I . -I .. -I ../config
11069 +noinst_PROGRAMS = conv
11071 +conv_SOURCES = convert.c elfio.c elfout.c mipsflash.c \
11072 + srec.c lsifast.c idtbin.c stagbin.c bin.c \
11073 + elf.h elfmips.h sysdep.h conv-version.h \
11076 +#EXTRA_conv_SOURCES = getopt.h # alloca.c getopt.c strtoul.c
11078 +conv-version.h: $(srcdir)/version.h $(srcdir)/Makefile.in
11079 + @echo "creating $@"
11080 + conv_version_package="\"$(PKGVERSION)\"" ;\
11081 + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
11082 + sed -e "s,@conv_version_package@,$$conv_version_package," \
11083 + -e "s,@report_bugs_to@,$$report_bugs_to," \
11084 + < $(srcdir)/version.h > $@
11086 +convert.o: convert.c conv-version.h
11088 +LIBIBERTY = ../libiberty/libiberty.a
11090 +conv_LDADD = $(LIBIBERTY)
11094 +info_TEXINFOS = conv.texi
11096 +conv_TEXI = $(srcdir)/conv.texi
11099 +conv.html: $(conv_TEXI)
11100 +# @rm -f conv.html
11101 +# texi2html -monolithic -glossary -menu -I . -I $(srcdir) $(conv_TEXI)
11104 +conv.dvi: $(conv_TEXI)
11106 +conv.info: $(conv_TEXI)
11108 +.PHONY: install-exec-local install-html
11110 +install-exec-local: $(noinst_PROGRAMS)
11111 + @$(NORMAL_INSTALL)
11112 + $(mkinstalldirs) $(DESTDIR)$(bindir)
11113 + @list='$(noinst_PROGRAMS)'; for p in $$list; do \
11114 + if test -f $$p; then \
11115 + t="$(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
11116 + echo " $(INSTALL_PROGRAM) $$p $$t"; \
11117 + $(INSTALL_PROGRAM) $$p $$t; \
11122 + echo FIXME > /dev/null
11125 + echo FIXME > /dev/null
11127 +++ b/convert/Makefile.in
11129 +# Makefile.in generated by automake 1.9.5 from Makefile.am.
11130 +# @configure_input@
11132 +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
11133 +# 2003, 2004, 2005 Free Software Foundation, Inc.
11134 +# This Makefile.in is free software; the Free Software Foundation
11135 +# gives unlimited permission to copy and/or distribute it,
11136 +# with or without modifications, as long as this notice is preserved.
11138 +# This program is distributed in the hope that it will be useful,
11139 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11140 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11141 +# PARTICULAR PURPOSE.
11145 +SOURCES = $(conv_SOURCES)
11148 +top_srcdir = @top_srcdir@
11150 +pkgdatadir = $(datadir)/@PACKAGE@
11151 +pkglibdir = $(libdir)/@PACKAGE@
11152 +pkgincludedir = $(includedir)/@PACKAGE@
11154 +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
11155 +INSTALL = @INSTALL@
11156 +install_sh_DATA = $(install_sh) -c -m 644
11157 +install_sh_PROGRAM = $(install_sh) -c
11158 +install_sh_SCRIPT = $(install_sh) -c
11159 +INSTALL_HEADER = $(INSTALL_DATA)
11160 +transform = $(program_transform_name)
11161 +NORMAL_INSTALL = :
11164 +NORMAL_UNINSTALL = :
11166 +POST_UNINSTALL = :
11167 +build_triplet = @build@
11168 +host_triplet = @host@
11169 +target_triplet = @target@
11170 +noinst_PROGRAMS = conv$(EXEEXT)
11171 +DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
11172 + ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
11173 + $(top_srcdir)/configure $(am__configure_deps) \
11174 + $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs
11176 +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
11177 +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
11178 + $(top_srcdir)/../config/depstand.m4 \
11179 + $(top_srcdir)/../config/lead-dot.m4 $(top_srcdir)/acinclude.m4 \
11180 + $(top_srcdir)/configure.ac
11181 +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
11183 +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
11184 + configure.lineno configure.status.lineno
11185 +mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
11186 +CONFIG_HEADER = config.h
11187 +CONFIG_CLEAN_FILES =
11188 +PROGRAMS = $(noinst_PROGRAMS)
11189 +am_conv_OBJECTS = convert.$(OBJEXT) elfio.$(OBJEXT) elfout.$(OBJEXT) \
11190 + mipsflash.$(OBJEXT) srec.$(OBJEXT) lsifast.$(OBJEXT) \
11191 + idtbin.$(OBJEXT) stagbin.$(OBJEXT) bin.$(OBJEXT)
11192 +conv_OBJECTS = $(am_conv_OBJECTS)
11193 +am__DEPENDENCIES_1 = ../libiberty/libiberty.a
11194 +conv_DEPENDENCIES = $(am__DEPENDENCIES_1)
11195 +DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
11197 +am__depfiles_maybe =
11198 +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
11199 + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
11201 +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
11202 +SOURCES = $(conv_SOURCES)
11203 +INFO_DEPS = $(srcdir)/conv.info
11204 +TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
11205 +am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
11210 +TEXINFOS = conv.texi
11211 +TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
11212 + echo $(top_srcdir)/../texinfo/util/texi2dvi; \
11216 +TEXI2PDF = $(TEXI2DVI) --pdf --batch
11217 +MAKEINFOHTML = $(MAKEINFO) --html
11218 +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
11220 +man1dir = $(mandir)/man1
11221 +am__installdirs = "$(DESTDIR)$(man1dir)"
11223 +MANS = $(man_MANS)
11226 +ACLOCAL = @ACLOCAL@
11228 +AMDEP_FALSE = @AMDEP_FALSE@
11229 +AMDEP_TRUE = @AMDEP_TRUE@
11231 +AUTOCONF = @AUTOCONF@
11232 +AUTOHEADER = @AUTOHEADER@
11233 +AUTOMAKE = @AUTOMAKE@
11236 +CCDEPMODE = @CCDEPMODE@
11239 +CPPFLAGS = @CPPFLAGS@
11240 +CYGPATH_W = @CYGPATH_W@
11248 +INSTALL_DATA = @INSTALL_DATA@
11249 +INSTALL_PROGRAM = @INSTALL_PROGRAM@
11250 +INSTALL_SCRIPT = @INSTALL_SCRIPT@
11251 +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
11252 +LDFLAGS = @LDFLAGS@
11253 +LIBOBJS = @LIBOBJS@
11255 +LTLIBOBJS = @LTLIBOBJS@
11257 +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
11258 +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
11259 +MAKEINFO = @MAKEINFO@
11261 +PACKAGE = @PACKAGE@
11262 +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
11263 +PACKAGE_NAME = @PACKAGE_NAME@
11264 +PACKAGE_STRING = @PACKAGE_STRING@
11265 +PACKAGE_TARNAME = @PACKAGE_TARNAME@
11266 +PACKAGE_VERSION = @PACKAGE_VERSION@
11267 +PATH_SEPARATOR = @PATH_SEPARATOR@
11268 +PKGVERSION = @PKGVERSION@
11269 +REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
11270 +REPORT_BUGS_TO = @REPORT_BUGS_TO@
11271 +SET_MAKE = @SET_MAKE@
11274 +VERSION = @VERSION@
11275 +ac_ct_CC = @ac_ct_CC@
11276 +ac_ct_STRIP = @ac_ct_STRIP@
11277 +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
11278 +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
11279 +am__include = @am__include@
11280 +am__leading_dot = @am__leading_dot@
11281 +am__quote = @am__quote@
11282 +am__tar = @am__tar@
11283 +am__untar = @am__untar@
11286 +build_alias = @build_alias@
11287 +build_cpu = @build_cpu@
11288 +build_os = @build_os@
11289 +build_vendor = @build_vendor@
11290 +datadir = @datadir@
11291 +exec_prefix = @exec_prefix@
11293 +host_alias = @host_alias@
11294 +host_cpu = @host_cpu@
11295 +host_os = @host_os@
11296 +host_vendor = @host_vendor@
11297 +includedir = @includedir@
11298 +infodir = @infodir@
11299 +install_sh = @install_sh@
11301 +libexecdir = @libexecdir@
11302 +localstatedir = @localstatedir@
11304 +mkdir_p = @mkdir_p@
11305 +oldincludedir = @oldincludedir@
11307 +program_transform_name = @program_transform_name@
11308 +sbindir = @sbindir@
11309 +sharedstatedir = @sharedstatedir@
11310 +sysconfdir = @sysconfdir@
11312 +target_alias = @target_alias@
11313 +target_cpu = @target_cpu@
11314 +target_os = @target_os@
11315 +target_vendor = @target_vendor@
11316 +AUTOMAKE_OPTIONS = cygnus
11317 +ACLOCAL_AMFLAGS = -I . -I .. -I ../config
11318 +conv_SOURCES = convert.c elfio.c elfout.c mipsflash.c \
11319 + srec.c lsifast.c idtbin.c stagbin.c bin.c \
11320 + elf.h elfmips.h sysdep.h conv-version.h \
11323 +LIBIBERTY = ../libiberty/libiberty.a
11324 +conv_LDADD = $(LIBIBERTY)
11326 +info_TEXINFOS = conv.texi
11327 +conv_TEXI = $(srcdir)/conv.texi
11329 + $(MAKE) $(AM_MAKEFLAGS) all-am
11332 +.SUFFIXES: .c .dvi .html .info .o .obj .pdf .ps .texi
11335 +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
11336 + @for dep in $?; do \
11337 + case '$(am__configure_deps)' in \
11339 + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
11340 + cd $(srcdir) && $(AUTOMAKE) --foreign \
11345 + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
11346 + cd $(top_srcdir) && \
11347 + $(AUTOMAKE) --foreign Makefile
11348 +.PRECIOUS: Makefile
11349 +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
11351 + *config.status*) \
11352 + echo ' $(SHELL) ./config.status'; \
11353 + $(SHELL) ./config.status;; \
11355 + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
11356 + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
11359 +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
11360 + $(SHELL) ./config.status --recheck
11362 +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
11363 + cd $(srcdir) && $(AUTOCONF)
11364 +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
11365 + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
11367 +config.h: stamp-h1
11368 + @if test ! -f $@; then \
11369 + rm -f stamp-h1; \
11370 + $(MAKE) stamp-h1; \
11373 +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
11375 + cd $(top_builddir) && $(SHELL) ./config.status config.h
11376 +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
11377 + cd $(top_srcdir) && $(AUTOHEADER)
11382 + -rm -f config.h stamp-h1
11384 +clean-noinstPROGRAMS:
11385 + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
11386 +conv$(EXEEXT): $(conv_OBJECTS) $(conv_DEPENDENCIES)
11387 + @rm -f conv$(EXEEXT)
11388 + $(LINK) $(conv_LDFLAGS) $(conv_OBJECTS) $(conv_LDADD) $(LIBS)
11390 +mostlyclean-compile:
11391 + -rm -f *.$(OBJEXT)
11393 +distclean-compile:
11400 + $(COMPILE) -c `$(CYGPATH_W) '$<'`
11403 + restore=: && backupdir="$(am__leading_dot)am$$$$" && \
11404 + am__cwd=`pwd` && cd $(srcdir) && \
11405 + rm -rf $$backupdir && mkdir $$backupdir && \
11406 + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
11407 + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
11409 + cd "$$am__cwd"; \
11410 + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
11417 + cd $(srcdir) && \
11418 + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
11420 + rm -rf $$backupdir; exit $$rc
11423 + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
11424 + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
11428 + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
11429 + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
11433 + rm -rf $(@:.html=.htp)
11434 + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
11435 + -o $(@:.html=.htp) $<; \
11438 + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
11439 + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
11441 + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
11442 + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
11445 +$(srcdir)/conv.info: conv.texi
11446 +conv.pdf: conv.texi
11448 + $(DVIPS) -o $@ $<
11450 +uninstall-info-am:
11451 + @$(PRE_UNINSTALL)
11452 + @if (install-info --version && \
11453 + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
11454 + list='$(INFO_DEPS)'; \
11455 + for file in $$list; do \
11456 + relfile=`echo "$$file" | sed 's|^.*/||'`; \
11457 + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
11458 + install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
11461 + @$(NORMAL_UNINSTALL)
11462 + @list='$(INFO_DEPS)'; \
11463 + for file in $$list; do \
11464 + relfile=`echo "$$file" | sed 's|^.*/||'`; \
11465 + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
11466 + (if cd "$(DESTDIR)$(infodir)"; then \
11467 + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
11468 + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
11472 +dist-info: $(INFO_DEPS)
11473 + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
11474 + list='$(INFO_DEPS)'; \
11475 + for base in $$list; do \
11477 + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
11479 + if test -f $$base; then d=.; else d=$(srcdir); fi; \
11480 + for file in $$d/$$base*; do \
11481 + relfile=`expr "$$file" : "$$d/\(.*\)"`; \
11482 + test -f $(distdir)/$$relfile || \
11483 + cp -p $$file $(distdir)/$$relfile; \
11487 +mostlyclean-aminfo:
11488 + -rm -rf conv.aux conv.cp conv.cps conv.fn conv.fns conv.ky conv.log conv.pg \
11489 + conv.pgs conv.tmp conv.toc conv.tp conv.tps conv.vr conv.vrs \
11490 + conv.dvi conv.pdf conv.ps conv.html
11492 +maintainer-clean-aminfo:
11493 + @list='$(INFO_DEPS)'; for i in $$list; do \
11494 + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
11495 + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
11496 + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
11499 +clean-info: mostlyclean-aminfo
11500 +install-man1: $(man1_MANS) $(man_MANS)
11501 + @$(NORMAL_INSTALL)
11502 + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
11503 + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
11504 + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
11505 + for i in $$l2; do \
11507 + *.1*) list="$$list $$i" ;; \
11510 + for i in $$list; do \
11511 + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
11512 + else file=$$i; fi; \
11513 + ext=`echo $$i | sed -e 's/^.*\\.//'`; \
11514 + case "$$ext" in \
11518 + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
11519 + inst=`echo $$inst | sed -e 's/^.*\///'`; \
11520 + inst=`echo $$inst | sed '$(transform)'`.$$ext; \
11521 + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
11522 + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
11525 + @$(NORMAL_UNINSTALL)
11526 + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
11527 + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
11528 + for i in $$l2; do \
11530 + *.1*) list="$$list $$i" ;; \
11533 + for i in $$list; do \
11534 + ext=`echo $$i | sed -e 's/^.*\\.//'`; \
11535 + case "$$ext" in \
11539 + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
11540 + inst=`echo $$inst | sed -e 's/^.*\///'`; \
11541 + inst=`echo $$inst | sed '$(transform)'`.$$ext; \
11542 + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
11543 + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
11546 +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
11547 + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
11548 + unique=`for i in $$list; do \
11549 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
11551 + $(AWK) ' { files[$$0] = 1; } \
11552 + END { for (i in files) print i; }'`; \
11553 + mkid -fID $$unique
11556 +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
11557 + $(TAGS_FILES) $(LISP)
11560 + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
11561 + unique=`for i in $$list; do \
11562 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
11564 + $(AWK) ' { files[$$0] = 1; } \
11565 + END { for (i in files) print i; }'`; \
11566 + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
11567 + test -n "$$unique" || unique=$$empty_fix; \
11568 + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
11569 + $$tags $$unique; \
11572 +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
11573 + $(TAGS_FILES) $(LISP)
11576 + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
11577 + unique=`for i in $$list; do \
11578 + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
11580 + $(AWK) ' { files[$$0] = 1; } \
11581 + END { for (i in files) print i; }'`; \
11582 + test -z "$(CTAGS_ARGS)$$tags$$unique" \
11583 + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
11587 + here=`$(am__cd) $(top_builddir) && pwd` \
11588 + && cd $(top_srcdir) \
11589 + && gtags -i $(GTAGS_ARGS) $$here
11592 + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
11595 +all-am: Makefile $(PROGRAMS) $(MANS) config.h
11597 + for dir in "$(DESTDIR)$(man1dir)"; do \
11598 + test -z "$$dir" || $(mkdir_p) "$$dir"; \
11600 +install: install-am
11601 +install-exec: install-exec-am
11602 +install-data: install-data-am
11603 +uninstall: uninstall-am
11605 +install-am: all-am
11606 + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
11608 +installcheck: installcheck-am
11610 + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
11611 + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
11612 + `test -z '$(STRIP)' || \
11613 + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
11614 +mostlyclean-generic:
11618 +distclean-generic:
11619 + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
11621 +maintainer-clean-generic:
11622 + @echo "This command is intended for maintainers to use"
11623 + @echo "it deletes files that may require special tools to rebuild."
11626 +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
11628 +distclean: distclean-am
11629 + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
11631 +distclean-am: clean-am distclean-compile distclean-generic \
11632 + distclean-hdr distclean-tags
11644 +info-am: $(INFO_DEPS)
11646 +install-data-am: install-man
11648 +install-exec-am: install-exec-local
11650 +install-info: install-info-am
11652 +install-info-am: $(INFO_DEPS)
11653 + @$(NORMAL_INSTALL)
11654 + test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
11655 + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
11656 + list='$(INFO_DEPS)'; \
11657 + for file in $$list; do \
11659 + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
11661 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
11662 + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
11663 + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
11664 + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
11665 + if test -f $$ifile; then \
11666 + relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
11667 + echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
11668 + $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
11673 + @if (install-info --version && \
11674 + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
11675 + list='$(INFO_DEPS)'; \
11676 + for file in $$list; do \
11677 + relfile=`echo "$$file" | sed 's|^.*/||'`; \
11678 + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
11679 + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
11682 +install-man: install-man1
11686 +maintainer-clean: maintainer-clean-am
11687 + -rm -f $(am__CONFIG_DISTCLEAN_FILES)
11688 + -rm -rf $(top_srcdir)/autom4te.cache
11690 +maintainer-clean-am: distclean-am maintainer-clean-aminfo \
11691 + maintainer-clean-generic
11693 +mostlyclean: mostlyclean-am
11695 +mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
11696 + mostlyclean-generic
11706 +uninstall-am: uninstall-man
11708 +uninstall-man: uninstall-man1
11710 +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
11711 + clean-generic clean-info clean-noinstPROGRAMS ctags dist-info \
11712 + distclean distclean-compile distclean-generic distclean-hdr \
11713 + distclean-tags dvi dvi-am html html-am info info-am install \
11714 + install-am install-data install-data-am install-exec \
11715 + install-exec-am install-exec-local install-info \
11716 + install-info-am install-man install-man1 install-strip \
11717 + installcheck installcheck-am installdirs maintainer-clean \
11718 + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
11719 + mostlyclean-aminfo mostlyclean-compile mostlyclean-generic pdf \
11720 + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \
11721 + uninstall-man uninstall-man1
11724 +#EXTRA_conv_SOURCES = getopt.h # alloca.c getopt.c strtoul.c
11726 +conv-version.h: $(srcdir)/version.h $(srcdir)/Makefile.in
11727 + @echo "creating $@"
11728 + conv_version_package="\"$(PKGVERSION)\"" ;\
11729 + report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
11730 + sed -e "s,@conv_version_package@,$$conv_version_package," \
11731 + -e "s,@report_bugs_to@,$$report_bugs_to," \
11732 + < $(srcdir)/version.h > $@
11734 +convert.o: convert.c conv-version.h
11737 +conv.html: $(conv_TEXI)
11738 +# @rm -f conv.html
11739 +# texi2html -monolithic -glossary -menu -I . -I $(srcdir) $(conv_TEXI)
11742 +conv.dvi: $(conv_TEXI)
11744 +conv.info: $(conv_TEXI)
11746 +.PHONY: install-exec-local install-html
11748 +install-exec-local: $(noinst_PROGRAMS)
11749 + @$(NORMAL_INSTALL)
11750 + $(mkinstalldirs) $(DESTDIR)$(bindir)
11751 + @list='$(noinst_PROGRAMS)'; for p in $$list; do \
11752 + if test -f $$p; then \
11753 + t="$(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
11754 + echo " $(INSTALL_PROGRAM) $$p $$t"; \
11755 + $(INSTALL_PROGRAM) $$p $$t; \
11760 + echo FIXME > /dev/null
11763 + echo FIXME > /dev/null
11764 +# Tell versions [3.59,3.63) of GNU make to not export all variables.
11765 +# Otherwise a system limit (for SysV at least) may be exceeded.
11768 +++ b/convert/acinclude.m4
11770 +dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
11771 +AC_DEFUN([CONV_BINARY_FOPEN],
11772 +[AC_REQUIRE([AC_CANONICAL_HOST])
11775 +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
11776 +changequote([,])dnl
11777 + AC_DEFINE([USE_BINARY_FOPEN], 1, [Use b modifier when opening binary files?]) ;;
11780 +dnl See whether we need a declaration for a function.
11781 +AC_DEFUN([CONV_NEED_DECLARATION],
11782 +[AC_MSG_CHECKING([whether $1 must be declared])
11783 +AC_CACHE_VAL(bfd_cv_decl_needed_$1,
11785 +#include <stdio.h>
11786 +#ifdef HAVE_STRING_H
11787 +#include <string.h>
11789 +#ifdef HAVE_STRINGS_H
11790 +#include <strings.h>
11793 +#ifdef HAVE_STDLIB_H
11794 +#include <stdlib.h>
11796 +#ifdef HAVE_UNISTD_H
11797 +#include <unistd.h>
11799 +[char *(*pfn) = (char *(*)) $1],
11800 +bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
11801 +AC_MSG_RESULT($bfd_cv_decl_needed_$1)
11802 +if test $bfd_cv_decl_needed_$1 = yes; then
11803 + bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11804 + AC_DEFINE_UNQUOTED($bfd_tr_decl, 1, [Define if a declaration is needed.])
11808 +++ b/convert/aclocal.m4
11810 +# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
11812 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
11813 +# 2005 Free Software Foundation, Inc.
11814 +# This file is free software; the Free Software Foundation
11815 +# gives unlimited permission to copy and/or distribute it,
11816 +# with or without modifications, as long as this notice is preserved.
11818 +# This program is distributed in the hope that it will be useful,
11819 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11820 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11821 +# PARTICULAR PURPOSE.
11823 +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
11825 +# This file is free software; the Free Software Foundation
11826 +# gives unlimited permission to copy and/or distribute it,
11827 +# with or without modifications, as long as this notice is preserved.
11829 +# AM_AUTOMAKE_VERSION(VERSION)
11830 +# ----------------------------
11831 +# Automake X.Y traces this macro to ensure aclocal.m4 has been
11832 +# generated from the m4 files accompanying Automake X.Y.
11833 +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
11835 +# AM_SET_CURRENT_AUTOMAKE_VERSION
11836 +# -------------------------------
11837 +# Call AM_AUTOMAKE_VERSION so it can be traced.
11838 +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
11839 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
11840 + [AM_AUTOMAKE_VERSION([1.9.5])])
11842 +# AM_AUX_DIR_EXPAND -*- Autoconf -*-
11844 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11846 +# This file is free software; the Free Software Foundation
11847 +# gives unlimited permission to copy and/or distribute it,
11848 +# with or without modifications, as long as this notice is preserved.
11850 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
11851 +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
11852 +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
11854 +# Of course, Automake must honor this variable whenever it calls a
11855 +# tool from the auxiliary directory. The problem is that $srcdir (and
11856 +# therefore $ac_aux_dir as well) can be either absolute or relative,
11857 +# depending on how configure is run. This is pretty annoying, since
11858 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
11859 +# source directory, any form will work fine, but in subdirectories a
11860 +# relative path needs to be adjusted first.
11862 +# $ac_aux_dir/missing
11863 +# fails when called from a subdirectory if $ac_aux_dir is relative
11864 +# $top_srcdir/$ac_aux_dir/missing
11865 +# fails if $ac_aux_dir is absolute,
11866 +# fails when called from a subdirectory in a VPATH build with
11867 +# a relative $ac_aux_dir
11869 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
11870 +# are both prefixed by $srcdir. In an in-source build this is usually
11871 +# harmless because $srcdir is `.', but things will broke when you
11872 +# start a VPATH build or use an absolute $srcdir.
11874 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
11875 +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
11876 +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
11877 +# and then we would define $MISSING as
11878 +# MISSING="\${SHELL} $am_aux_dir/missing"
11879 +# This will work as long as MISSING is not called from configure, because
11880 +# unfortunately $(top_srcdir) has no meaning in configure.
11881 +# However there are other variables, like CC, which are often used in
11882 +# configure, and could therefore not use this "fixed" $ac_aux_dir.
11884 +# Another solution, used here, is to always expand $ac_aux_dir to an
11885 +# absolute PATH. The drawback is that using absolute paths prevent a
11886 +# configured tree to be moved without reconfiguration.
11888 +AC_DEFUN([AM_AUX_DIR_EXPAND],
11889 +[dnl Rely on autoconf to set up CDPATH properly.
11890 +AC_PREREQ([2.50])dnl
11891 +# expand $ac_aux_dir to an absolute path
11892 +am_aux_dir=`cd $ac_aux_dir && pwd`
11895 +# AM_CONDITIONAL -*- Autoconf -*-
11897 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
11898 +# Free Software Foundation, Inc.
11900 +# This file is free software; the Free Software Foundation
11901 +# gives unlimited permission to copy and/or distribute it,
11902 +# with or without modifications, as long as this notice is preserved.
11906 +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
11907 +# -------------------------------------
11908 +# Define a conditional.
11909 +AC_DEFUN([AM_CONDITIONAL],
11910 +[AC_PREREQ(2.52)dnl
11911 + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
11912 + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
11913 +AC_SUBST([$1_TRUE])
11914 +AC_SUBST([$1_FALSE])
11922 +AC_CONFIG_COMMANDS_PRE(
11923 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
11924 + AC_MSG_ERROR([[conditional "$1" was never defined.
11925 +Usually this means the macro was only invoked conditionally.]])
11929 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
11930 +# Free Software Foundation, Inc.
11932 +# This file is free software; the Free Software Foundation
11933 +# gives unlimited permission to copy and/or distribute it,
11934 +# with or without modifications, as long as this notice is preserved.
11938 +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
11939 +# written in clear, in which case automake, when reading aclocal.m4,
11940 +# will think it sees a *use*, and therefore will trigger all it's
11941 +# C support machinery. Also note that it means that autoscan, seeing
11942 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
11945 +# _AM_DEPENDENCIES(NAME)
11946 +# ----------------------
11947 +# See how the compiler implements dependency checking.
11948 +# NAME is "CC", "CXX", "GCJ", or "OBJC".
11949 +# We try a few techniques and use that to set a single cache variable.
11951 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
11952 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
11953 +# dependency, and given that the user is not expected to run this macro,
11954 +# just rely on AC_PROG_CC.
11955 +AC_DEFUN([_AM_DEPENDENCIES],
11956 +[AC_REQUIRE([AM_SET_DEPDIR])dnl
11957 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
11958 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
11959 +AC_REQUIRE([AM_DEP_TRACK])dnl
11961 +ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
11962 + [$1], CXX, [depcc="$CXX" am_compiler_list=],
11963 + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
11964 + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
11965 + [depcc="$$1" am_compiler_list=])
11967 +AC_CACHE_CHECK([dependency style of $depcc],
11968 + [am_cv_$1_dependencies_compiler_type],
11969 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11970 + # We make a subdir and do the tests there. Otherwise we can end up
11971 + # making bogus files that we don't know about and never remove. For
11972 + # instance it was reported that on HP-UX the gcc test will end up
11973 + # making a dummy file named `D' -- because `-MD' means `put the output
11975 + mkdir conftest.dir
11976 + # Copy depcomp to subdir because otherwise we won't find it if we're
11977 + # using a relative directory.
11978 + cp "$am_depcomp" conftest.dir
11980 + # We will build objects and dependencies in a subdirectory because
11981 + # it helps to detect inapplicable dependency modes. For instance
11982 + # both Tru64's cc and ICC support -MD to output dependencies as a
11983 + # side effect of compilation, but ICC will put the dependencies in
11984 + # the current directory while Tru64 will put them in the object
11988 + am_cv_$1_dependencies_compiler_type=none
11989 + if test "$am_compiler_list" = ""; then
11990 + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
11992 + for depmode in $am_compiler_list; do
11993 + # Setup a source with many dependencies, because some compilers
11994 + # like to wrap large dependency lists on column 80 (with \), and
11995 + # we should not choose a depcomp mode which is confused by this.
11997 + # We need to recreate these files for each test, as the compiler may
11998 + # overwrite some of them when testing with obscure command lines.
11999 + # This happens at least with the AIX C compiler.
12000 + : > sub/conftest.c
12001 + for i in 1 2 3 4 5 6; do
12002 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
12003 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12004 + # Solaris 8's {/usr,}/bin/sh.
12005 + touch sub/conftst$i.h
12007 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12011 + # after this tag, mechanisms are not by side-effect, so they'll
12012 + # only be used when explicitly requested
12013 + if test "x$enable_dependency_tracking" = xyes; then
12021 + # We check with `-c' and `-o' for the sake of the "dashmstdout"
12022 + # mode. It turns out that the SunPro C++ compiler does not properly
12023 + # handle `-M -o', and we need to detect this.
12024 + if depmode=$depmode \
12025 + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12026 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12027 + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12028 + >/dev/null 2>conftest.err &&
12029 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12030 + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12031 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12032 + # icc doesn't choke on unknown options, it will just issue warnings
12033 + # or remarks (even with -Werror). So we grep stderr for any message
12034 + # that says an option was ignored or not supported.
12035 + # When given -MP, icc 7.0 and 7.1 complain thusly:
12036 + # icc: Command line warning: ignoring option '-M'; no argument required
12037 + # The diagnosis changed in icc 8.0:
12038 + # icc: Command line remark: option '-MP' not supported
12039 + if (grep 'ignoring option' conftest.err ||
12040 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12041 + am_cv_$1_dependencies_compiler_type=$depmode
12048 + rm -rf conftest.dir
12050 + am_cv_$1_dependencies_compiler_type=none
12053 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
12054 +AM_CONDITIONAL([am__fastdep$1], [
12055 + test "x$enable_dependency_tracking" != xno \
12056 + && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
12062 +# Choose a directory name for dependency files.
12063 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
12064 +AC_DEFUN([AM_SET_DEPDIR],
12065 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
12066 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
12072 +AC_DEFUN([AM_DEP_TRACK],
12073 +[AC_ARG_ENABLE(dependency-tracking,
12074 +[ --disable-dependency-tracking speeds up one-time build
12075 + --enable-dependency-tracking do not reject slow dependency extractors])
12076 +if test "x$enable_dependency_tracking" != xno; then
12077 + am_depcomp="$ac_aux_dir/depcomp"
12078 + AMDEPBACKSLASH='\'
12080 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
12081 +AC_SUBST([AMDEPBACKSLASH])
12084 +# Generate code to set up dependency tracking. -*- Autoconf -*-
12086 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
12087 +# Free Software Foundation, Inc.
12089 +# This file is free software; the Free Software Foundation
12090 +# gives unlimited permission to copy and/or distribute it,
12091 +# with or without modifications, as long as this notice is preserved.
12095 +# _AM_OUTPUT_DEPENDENCY_COMMANDS
12096 +# ------------------------------
12097 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
12098 +[for mf in $CONFIG_FILES; do
12099 + # Strip MF so we end up with the name of the file.
12100 + mf=`echo "$mf" | sed -e 's/:.*$//'`
12101 + # Check whether this is an Automake generated Makefile or not.
12102 + # We used to match only the files named `Makefile.in', but
12103 + # some people rename them; so instead we look at the file content.
12104 + # Grep'ing the first line is not enough: some people post-process
12105 + # each Makefile.in and add a new line on top of each file to say so.
12106 + # So let's grep whole file.
12107 + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
12108 + dirpart=`AS_DIRNAME("$mf")`
12112 + # Extract the definition of DEPDIR, am__include, and am__quote
12113 + # from the Makefile without running `make'.
12114 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
12115 + test -z "$DEPDIR" && continue
12116 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
12117 + test -z "am__include" && continue
12118 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
12119 + # When using ansi2knr, U may be empty or an underscore; expand it
12120 + U=`sed -n 's/^U = //p' < "$mf"`
12121 + # Find all dependency output files, they are included files with
12122 + # $(DEPDIR) in their names. We invoke sed twice because it is the
12123 + # simplest approach to changing $(DEPDIR) to its actual value in the
12125 + for file in `sed -n "
12126 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
12127 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
12128 + # Make sure the directory exists.
12129 + test -f "$dirpart/$file" && continue
12130 + fdir=`AS_DIRNAME(["$file"])`
12131 + AS_MKDIR_P([$dirpart/$fdir])
12132 + # echo "creating $dirpart/$file"
12133 + echo '# dummy' > "$dirpart/$file"
12136 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
12139 +# AM_OUTPUT_DEPENDENCY_COMMANDS
12140 +# -----------------------------
12141 +# This macro should only be invoked once -- use via AC_REQUIRE.
12143 +# This code is only required when automatic dependency tracking
12144 +# is enabled. FIXME. This creates each `.P' file that we will
12145 +# need in order to bootstrap the dependency handling code.
12146 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
12147 +[AC_CONFIG_COMMANDS([depfiles],
12148 + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
12149 + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
12152 +# Do all the work for Automake. -*- Autoconf -*-
12154 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
12155 +# Free Software Foundation, Inc.
12157 +# This file is free software; the Free Software Foundation
12158 +# gives unlimited permission to copy and/or distribute it,
12159 +# with or without modifications, as long as this notice is preserved.
12163 +# This macro actually does too much. Some checks are only needed if
12164 +# your package does certain things. But this isn't really a big deal.
12166 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
12167 +# AM_INIT_AUTOMAKE([OPTIONS])
12168 +# -----------------------------------------------
12169 +# The call with PACKAGE and VERSION arguments is the old style
12170 +# call (pre autoconf-2.50), which is being phased out. PACKAGE
12171 +# and VERSION should now be passed to AC_INIT and removed from
12172 +# the call to AM_INIT_AUTOMAKE.
12173 +# We support both call styles for the transition. After
12174 +# the next Automake release, Autoconf can make the AC_INIT
12175 +# arguments mandatory, and then we can depend on a new Autoconf
12176 +# release and drop the old call support.
12177 +AC_DEFUN([AM_INIT_AUTOMAKE],
12178 +[AC_PREREQ([2.58])dnl
12179 +dnl Autoconf wants to disallow AM_ names. We explicitly allow
12180 +dnl the ones we care about.
12181 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
12182 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
12183 +AC_REQUIRE([AC_PROG_INSTALL])dnl
12184 +# test to see if srcdir already configured
12185 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
12186 + test -f $srcdir/config.status; then
12187 + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
12190 +# test whether we have cygpath
12191 +if test -z "$CYGPATH_W"; then
12192 + if (cygpath --version) >/dev/null 2>/dev/null; then
12193 + CYGPATH_W='cygpath -w'
12198 +AC_SUBST([CYGPATH_W])
12200 +# Define the identity of the package.
12201 +dnl Distinguish between old-style and new-style calls.
12203 +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
12204 + AC_SUBST([PACKAGE], [$1])dnl
12205 + AC_SUBST([VERSION], [$2])],
12206 +[_AM_SET_OPTIONS([$1])dnl
12207 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
12208 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
12210 +_AM_IF_OPTION([no-define],,
12211 +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
12212 + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
12214 +# Some tools Automake needs.
12215 +AC_REQUIRE([AM_SANITY_CHECK])dnl
12216 +AC_REQUIRE([AC_ARG_PROGRAM])dnl
12217 +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
12218 +AM_MISSING_PROG(AUTOCONF, autoconf)
12219 +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
12220 +AM_MISSING_PROG(AUTOHEADER, autoheader)
12221 +AM_MISSING_PROG(MAKEINFO, makeinfo)
12222 +AM_PROG_INSTALL_SH
12223 +AM_PROG_INSTALL_STRIP
12224 +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
12225 +# We need awk for the "check" target. The system "awk" is bad on
12227 +AC_REQUIRE([AC_PROG_AWK])dnl
12228 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
12229 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
12230 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
12231 + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
12232 + [_AM_PROG_TAR([v7])])])
12233 +_AM_IF_OPTION([no-dependencies],,
12234 +[AC_PROVIDE_IFELSE([AC_PROG_CC],
12235 + [_AM_DEPENDENCIES(CC)],
12236 + [define([AC_PROG_CC],
12237 + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
12238 +AC_PROVIDE_IFELSE([AC_PROG_CXX],
12239 + [_AM_DEPENDENCIES(CXX)],
12240 + [define([AC_PROG_CXX],
12241 + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
12246 +# When config.status generates a header, we must update the stamp-h file.
12247 +# This file resides in the same directory as the config header
12248 +# that is generated. The stamp files are numbered to have different names.
12250 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
12251 +# loop where config.status creates the headers, so we can generate
12252 +# our stamp files there.
12253 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
12254 +[# Compute $1's index in $config_headers.
12256 +for _am_header in $config_headers :; do
12257 + case $_am_header in
12261 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
12264 +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
12266 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
12268 +# This file is free software; the Free Software Foundation
12269 +# gives unlimited permission to copy and/or distribute it,
12270 +# with or without modifications, as long as this notice is preserved.
12272 +# AM_PROG_INSTALL_SH
12273 +# ------------------
12274 +# Define $install_sh.
12275 +AC_DEFUN([AM_PROG_INSTALL_SH],
12276 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12277 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
12278 +AC_SUBST(install_sh)])
12280 +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
12281 +# From Jim Meyering
12283 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
12284 +# Free Software Foundation, Inc.
12286 +# This file is free software; the Free Software Foundation
12287 +# gives unlimited permission to copy and/or distribute it,
12288 +# with or without modifications, as long as this notice is preserved.
12292 +AC_DEFUN([AM_MAINTAINER_MODE],
12293 +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
12294 + dnl maintainer-mode is disabled by default
12295 + AC_ARG_ENABLE(maintainer-mode,
12296 +[ --enable-maintainer-mode enable make rules and dependencies not useful
12297 + (and sometimes confusing) to the casual installer],
12298 + USE_MAINTAINER_MODE=$enableval,
12299 + USE_MAINTAINER_MODE=no)
12300 + AC_MSG_RESULT([$USE_MAINTAINER_MODE])
12301 + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
12302 + MAINT=$MAINTAINER_MODE_TRUE
12303 + AC_SUBST(MAINT)dnl
12307 +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
12309 +# Check to see how 'make' treats includes. -*- Autoconf -*-
12311 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
12313 +# This file is free software; the Free Software Foundation
12314 +# gives unlimited permission to copy and/or distribute it,
12315 +# with or without modifications, as long as this notice is preserved.
12319 +# AM_MAKE_INCLUDE()
12320 +# -----------------
12321 +# Check to see how make treats includes.
12322 +AC_DEFUN([AM_MAKE_INCLUDE],
12323 +[am_make=${MAKE-make}
12324 +cat > confinc << 'END'
12329 +# If we don't find an include directive, just comment out the code.
12330 +AC_MSG_CHECKING([for style of include used by $am_make])
12334 +# First try GNU make style include.
12335 +echo "include confinc" > confmf
12336 +# We grep out `Entering directory' and `Leaving directory'
12337 +# messages which can occur if `w' ends up in MAKEFLAGS.
12338 +# In particular we don't look at `^make:' because GNU make might
12339 +# be invoked under some other name (usually "gmake"), in which
12340 +# case it prints its new name instead of `make'.
12341 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
12342 + am__include=include
12346 +# Now try BSD make style include.
12347 +if test "$am__include" = "#"; then
12348 + echo '.include "confinc"' > confmf
12349 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
12350 + am__include=.include
12355 +AC_SUBST([am__include])
12356 +AC_SUBST([am__quote])
12357 +AC_MSG_RESULT([$_am_result])
12358 +rm -f confinc confmf
12361 +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
12363 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
12364 +# Free Software Foundation, Inc.
12366 +# This file is free software; the Free Software Foundation
12367 +# gives unlimited permission to copy and/or distribute it,
12368 +# with or without modifications, as long as this notice is preserved.
12372 +# AM_MISSING_PROG(NAME, PROGRAM)
12373 +# ------------------------------
12374 +AC_DEFUN([AM_MISSING_PROG],
12375 +[AC_REQUIRE([AM_MISSING_HAS_RUN])
12376 +$1=${$1-"${am_missing_run}$2"}
12380 +# AM_MISSING_HAS_RUN
12381 +# ------------------
12382 +# Define MISSING if not defined so far and test if it supports --run.
12383 +# If it does, set am_missing_run to use it, otherwise, to nothing.
12384 +AC_DEFUN([AM_MISSING_HAS_RUN],
12385 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
12386 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
12387 +# Use eval to expand $SHELL
12388 +if eval "$MISSING --run true"; then
12389 + am_missing_run="$MISSING --run "
12392 + AC_MSG_WARN([`missing' script is too old or missing])
12396 +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
12398 +# This file is free software; the Free Software Foundation
12399 +# gives unlimited permission to copy and/or distribute it,
12400 +# with or without modifications, as long as this notice is preserved.
12404 +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
12406 +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
12407 +# created by `make install' are always world readable, even if the
12408 +# installer happens to have an overly restrictive umask (e.g. 077).
12409 +# This was a mistake. There are at least two reasons why we must not
12411 +# - it causes special bits like SGID to be ignored,
12412 +# - it may be too restrictive (some setups expect 775 directories).
12414 +# Do not use -m 0755 and let people choose whatever they expect by
12417 +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
12418 +# Some implementations (such as Solaris 8's) are not thread-safe: if a
12419 +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
12420 +# concurrently, both version can detect that a/ is missing, but only
12421 +# one can create it and the other will error out. Consequently we
12422 +# restrict ourselves to GNU make (using the --version option ensures
12424 +AC_DEFUN([AM_PROG_MKDIR_P],
12425 +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
12426 + # We used to keeping the `.' as first argument, in order to
12427 + # allow $(mkdir_p) to be used without argument. As in
12428 + # $(mkdir_p) $(somedir)
12429 + # where $(somedir) is conditionally defined. However this is wrong
12430 + # for two reasons:
12431 + # 1. if the package is installed by a user who cannot write `.'
12432 + # make install will fail,
12433 + # 2. the above comment should most certainly read
12434 + # $(mkdir_p) $(DESTDIR)$(somedir)
12435 + # so it does not work when $(somedir) is undefined and
12436 + # $(DESTDIR) is not.
12437 + # To support the latter case, we have to write
12438 + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
12439 + # so the `.' trick is pointless.
12440 + mkdir_p='mkdir -p --'
12442 + # On NextStep and OpenStep, the `mkdir' command does not
12443 + # recognize any option. It will interpret all options as
12444 + # directories to create, and then abort because `.' already
12446 + for d in ./-p ./--version;
12448 + test -d $d && rmdir $d
12450 + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
12451 + if test -f "$ac_aux_dir/mkinstalldirs"; then
12452 + mkdir_p='$(mkinstalldirs)'
12454 + mkdir_p='$(install_sh) -d'
12457 +AC_SUBST([mkdir_p])])
12459 +# Helper functions for option handling. -*- Autoconf -*-
12461 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
12463 +# This file is free software; the Free Software Foundation
12464 +# gives unlimited permission to copy and/or distribute it,
12465 +# with or without modifications, as long as this notice is preserved.
12469 +# _AM_MANGLE_OPTION(NAME)
12470 +# -----------------------
12471 +AC_DEFUN([_AM_MANGLE_OPTION],
12472 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
12474 +# _AM_SET_OPTION(NAME)
12475 +# ------------------------------
12476 +# Set option NAME. Presently that only means defining a flag for this option.
12477 +AC_DEFUN([_AM_SET_OPTION],
12478 +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
12480 +# _AM_SET_OPTIONS(OPTIONS)
12481 +# ----------------------------------
12482 +# OPTIONS is a space-separated list of Automake options.
12483 +AC_DEFUN([_AM_SET_OPTIONS],
12484 +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
12486 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
12487 +# -------------------------------------------
12488 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12489 +AC_DEFUN([_AM_IF_OPTION],
12490 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
12492 +# Check to make sure that the build environment is sane. -*- Autoconf -*-
12494 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
12495 +# Free Software Foundation, Inc.
12497 +# This file is free software; the Free Software Foundation
12498 +# gives unlimited permission to copy and/or distribute it,
12499 +# with or without modifications, as long as this notice is preserved.
12505 +AC_DEFUN([AM_SANITY_CHECK],
12506 +[AC_MSG_CHECKING([whether build environment is sane])
12509 +echo timestamp > conftest.file
12510 +# Do `set' in a subshell so we don't clobber the current shell's
12511 +# arguments. Must try -L first in case configure is actually a
12512 +# symlink; some systems play weird games with the mod time of symlinks
12513 +# (eg FreeBSD returns the mod time of the symlink's containing
12516 + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
12517 + if test "$[*]" = "X"; then
12518 + # -L didn't work.
12519 + set X `ls -t $srcdir/configure conftest.file`
12521 + rm -f conftest.file
12522 + if test "$[*]" != "X $srcdir/configure conftest.file" \
12523 + && test "$[*]" != "X conftest.file $srcdir/configure"; then
12525 + # If neither matched, then we have a broken ls. This can happen
12526 + # if, for instance, CONFIG_SHELL is bash and it inherits a
12527 + # broken ls alias from the environment. This has actually
12528 + # happened. Such a system could not be considered "sane".
12529 + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
12530 +alias in your environment])
12533 + test "$[2]" = conftest.file
12539 + AC_MSG_ERROR([newly created file is older than distributed files!
12540 +Check your system clock])
12542 +AC_MSG_RESULT(yes)])
12544 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
12546 +# This file is free software; the Free Software Foundation
12547 +# gives unlimited permission to copy and/or distribute it,
12548 +# with or without modifications, as long as this notice is preserved.
12550 +# AM_PROG_INSTALL_STRIP
12551 +# ---------------------
12552 +# One issue with vendor `install' (even GNU) is that you can't
12553 +# specify the program used to strip binaries. This is especially
12554 +# annoying in cross-compiling environments, where the build's strip
12555 +# is unlikely to handle the host's binaries.
12556 +# Fortunately install-sh will honor a STRIPPROG variable, so we
12557 +# always use install-sh in `make install-strip', and initialize
12558 +# STRIPPROG with the value of the STRIP variable (set by the user).
12559 +AC_DEFUN([AM_PROG_INSTALL_STRIP],
12560 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
12561 +# Installed binaries are usually stripped using `strip' when the user
12562 +# run `make install-strip'. However `strip' might not be the right
12563 +# tool to use in cross-compilation environments, therefore Automake
12564 +# will honor the `STRIP' environment variable to overrule this program.
12565 +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
12566 +if test "$cross_compiling" != no; then
12567 + AC_CHECK_TOOL([STRIP], [strip], :)
12569 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
12570 +AC_SUBST([INSTALL_STRIP_PROGRAM])])
12572 +# Check how to create a tarball. -*- Autoconf -*-
12574 +# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
12576 +# This file is free software; the Free Software Foundation
12577 +# gives unlimited permission to copy and/or distribute it,
12578 +# with or without modifications, as long as this notice is preserved.
12582 +# _AM_PROG_TAR(FORMAT)
12583 +# --------------------
12584 +# Check how to create a tarball in format FORMAT.
12585 +# FORMAT should be one of `v7', `ustar', or `pax'.
12587 +# Substitute a variable $(am__tar) that is a command
12588 +# writing to stdout a FORMAT-tarball containing the directory
12590 +# tardir=directory && $(am__tar) > result.tar
12592 +# Substitute a variable $(am__untar) that extract such
12593 +# a tarball read from stdin.
12594 +# $(am__untar) < result.tar
12595 +AC_DEFUN([_AM_PROG_TAR],
12596 +[# Always define AMTAR for backward compatibility.
12597 +AM_MISSING_PROG([AMTAR], [tar])
12599 + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
12600 + [m4_case([$1], [ustar],, [pax],,
12601 + [m4_fatal([Unknown tar format])])
12602 +AC_MSG_CHECKING([how to create a $1 tar archive])
12603 +# Loop over all known methods to create a tar archive until one works.
12604 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
12605 +_am_tools=${am_cv_prog_tar_$1-$_am_tools}
12606 +# Do not fold the above two line into one, because Tru64 sh and
12607 +# Solaris sh will not grok spaces in the rhs of `-'.
12608 +for _am_tool in $_am_tools
12610 + case $_am_tool in
12612 + for _am_tar in tar gnutar gtar;
12614 + AM_RUN_LOG([$_am_tar --version]) && break
12616 + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
12617 + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
12618 + am__untar="$_am_tar -xf -"
12621 + # Must skip GNU tar: if it does not support --format= it doesn't create
12622 + # ustar tarball either.
12623 + (tar --version) >/dev/null 2>&1 && continue
12624 + am__tar='tar chf - "$$tardir"'
12625 + am__tar_='tar chf - "$tardir"'
12626 + am__untar='tar xf -'
12629 + am__tar='pax -L -x $1 -w "$$tardir"'
12630 + am__tar_='pax -L -x $1 -w "$tardir"'
12631 + am__untar='pax -r'
12634 + am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
12635 + am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
12636 + am__untar='cpio -i -H $1 -d'
12645 + # If the value was cached, stop now. We just wanted to have am__tar
12646 + # and am__untar set.
12647 + test -n "${am_cv_prog_tar_$1}" && break
12649 + # tar/untar a dummy directory, and stop if the command works
12650 + rm -rf conftest.dir
12651 + mkdir conftest.dir
12652 + echo GrepMe > conftest.dir/file
12653 + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
12654 + rm -rf conftest.dir
12655 + if test -s conftest.tar; then
12656 + AM_RUN_LOG([$am__untar <conftest.tar])
12657 + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
12660 +rm -rf conftest.dir
12662 +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
12663 +AC_MSG_RESULT([$am_cv_prog_tar_$1])])
12664 +AC_SUBST([am__tar])
12665 +AC_SUBST([am__untar])
12668 +m4_include([../config/acx.m4])
12669 +m4_include([../config/depstand.m4])
12670 +m4_include([../config/lead-dot.m4])
12671 +m4_include([acinclude.m4])
12673 +++ b/convert/alloca.c
12675 +/* alloca.c -- allocate automatically reclaimed memory
12676 + (Mostly) portable public-domain implementation -- D A Gwyn
12678 + This implementation of the PWB library alloca function,
12679 + which is used to allocate space off the run-time stack so
12680 + that it is automatically reclaimed upon procedure exit,
12681 + was inspired by discussions with J. Q. Johnson of Cornell.
12682 + J.Otto Tennant <jot@cray.com> contributed the Cray support.
12684 + There are some preprocessor constants that can
12685 + be defined when compiling for your specific system, for
12686 + improved efficiency; however, the defaults should be okay.
12688 + The general concept of this implementation is to keep
12689 + track of all alloca-allocated blocks, and reclaim any
12690 + that are found to be deeper in the stack than the current
12691 + invocation. This heuristic does not reclaim storage as
12692 + soon as it becomes invalid, but it will do so eventually.
12694 + As a special case, alloca(0) reclaims storage without
12695 + allocating any. It is a good idea to use alloca(0) in
12696 + your main control loop, etc. to force garbage collection. */
12698 +#ifdef HAVE_CONFIG_H
12699 +#include "config.h"
12702 +/* If compiling with GCC, this file's not needed. */
12707 +/* actually, only want this if static is defined as ""
12708 + -- this is for usg, in which emacs must undefine static
12709 + in order to make unexec workable
12711 +#ifndef STACK_DIRECTION
12714 +-- must know STACK_DIRECTION at compile-time
12715 +#endif /* STACK_DIRECTION undefined */
12716 +#endif /* static */
12717 +#endif /* emacs */
12719 +/* If your stack is a linked list of frames, you have to
12720 + provide an "address metric" ADDRESS_FUNCTION macro. */
12722 +#if defined (CRAY) && defined (CRAY_STACKSEG_END)
12724 +#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
12726 +#define ADDRESS_FUNCTION(arg) &(arg)
12730 +#include <stddef.h>
12731 +typedef void *pointer;
12733 +typedef char *pointer;
12734 +typedef unsigned size_t;
12741 +/* Different portions of Emacs need to call different versions of
12742 + malloc. The Emacs executable needs alloca to call xmalloc, because
12743 + ordinary malloc isn't protected from input signals. On the other
12744 + hand, the utilities in lib-src need alloca to call malloc; some of
12745 + them are very simple, and don't have an xmalloc routine.
12747 + Non-Emacs programs expect this to call use xmalloc.
12749 + Callers below should use malloc. */
12752 +#define malloc xmalloc
12753 +extern pointer xmalloc ();
12756 +/* Define STACK_DIRECTION if you know the direction of stack
12757 + growth for your system; otherwise it will be automatically
12758 + deduced at run-time.
12760 + STACK_DIRECTION > 0 => grows toward higher addresses
12761 + STACK_DIRECTION < 0 => grows toward lower addresses
12762 + STACK_DIRECTION = 0 => direction of growth unknown */
12764 +#ifndef STACK_DIRECTION
12765 +#define STACK_DIRECTION 0 /* Direction unknown. */
12768 +#if STACK_DIRECTION != 0
12770 +#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
12772 +#else /* STACK_DIRECTION == 0; need run-time code. */
12774 +static int stack_dir; /* 1 or -1 once known. */
12775 +#define STACK_DIR stack_dir
12778 +find_stack_direction ()
12780 + static char *addr = NULL; /* Address of first `dummy', once known. */
12781 + auto char dummy; /* To get stack address. */
12783 + if (addr == NULL)
12784 + { /* Initial entry. */
12785 + addr = ADDRESS_FUNCTION (dummy);
12787 + find_stack_direction (); /* Recurse once. */
12791 + /* Second entry. */
12792 + if (ADDRESS_FUNCTION (dummy) > addr)
12793 + stack_dir = 1; /* Stack grew upward. */
12795 + stack_dir = -1; /* Stack grew downward. */
12799 +#endif /* STACK_DIRECTION == 0 */
12801 +/* An "alloca header" is used to:
12802 + (a) chain together all alloca'ed blocks;
12803 + (b) keep track of stack depth.
12805 + It is very important that sizeof(header) agree with malloc
12806 + alignment chunk size. The following default should work okay. */
12808 +#ifndef ALIGN_SIZE
12809 +#define ALIGN_SIZE sizeof(double)
12814 + char align[ALIGN_SIZE]; /* To force sizeof(header). */
12817 + union hdr *next; /* For chaining headers. */
12818 + char *deep; /* For stack depth measure. */
12822 +static header *last_alloca_header = NULL; /* -> last alloca header. */
12824 +/* Return a pointer to at least SIZE bytes of storage,
12825 + which will be automatically reclaimed upon exit from
12826 + the procedure that called alloca. Originally, this space
12827 + was supposed to be taken from the current stack frame of the
12828 + caller, but that method cannot be made to work for some
12829 + implementations of C, for example under Gould's UTX/32. */
12835 + auto char probe; /* Probes stack depth: */
12836 + register char *depth = ADDRESS_FUNCTION (probe);
12838 +#if STACK_DIRECTION == 0
12839 + if (STACK_DIR == 0) /* Unknown growth direction. */
12840 + find_stack_direction ();
12843 + /* Reclaim garbage, defined as all alloca'd storage that
12844 + was allocated from deeper in the stack than currently. */
12847 + register header *hp; /* Traverses linked list. */
12849 + for (hp = last_alloca_header; hp != NULL;)
12850 + if ((STACK_DIR > 0 && hp->h.deep > depth)
12851 + || (STACK_DIR < 0 && hp->h.deep < depth))
12853 + register header *np = hp->h.next;
12855 + free ((pointer) hp); /* Collect garbage. */
12857 + hp = np; /* -> next header. */
12860 + break; /* Rest are not deeper. */
12862 + last_alloca_header = hp; /* -> last valid storage. */
12866 + return NULL; /* No allocation required. */
12868 + /* Allocate combined header + user data storage. */
12871 + register pointer new = malloc (sizeof (header) + size);
12872 + /* Address of header. */
12874 + ((header *) new)->h.next = last_alloca_header;
12875 + ((header *) new)->h.deep = depth;
12877 + last_alloca_header = (header *) new;
12879 + /* User storage begins just after header. */
12881 + return (pointer) ((char *) new + sizeof (header));
12885 +#if defined (CRAY) && defined (CRAY_STACKSEG_END)
12887 +#ifdef DEBUG_I00AFUNC
12888 +#include <stdio.h>
12891 +#ifndef CRAY_STACK
12892 +#define CRAY_STACK
12894 +/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
12895 +struct stack_control_header
12897 + long shgrow:32; /* Number of times stack has grown. */
12898 + long shaseg:32; /* Size of increments to stack. */
12899 + long shhwm:32; /* High water mark of stack. */
12900 + long shsize:32; /* Current size of stack (all segments). */
12903 +/* The stack segment linkage control information occurs at
12904 + the high-address end of a stack segment. (The stack
12905 + grows from low addresses to high addresses.) The initial
12906 + part of the stack segment linkage control information is
12907 + 0200 (octal) words. This provides for register storage
12908 + for the routine which overflows the stack. */
12910 +struct stack_segment_linkage
12912 + long ss[0200]; /* 0200 overflow words. */
12913 + long sssize:32; /* Number of words in this segment. */
12914 + long ssbase:32; /* Offset to stack base. */
12916 + long sspseg:32; /* Offset to linkage control of previous
12917 + segment of stack. */
12919 + long sstcpt:32; /* Pointer to task common address block. */
12920 + long sscsnm; /* Private control structure number for
12922 + long ssusr1; /* Reserved for user. */
12923 + long ssusr2; /* Reserved for user. */
12924 + long sstpid; /* Process ID for pid based multi-tasking. */
12925 + long ssgvup; /* Pointer to multitasking thread giveup. */
12926 + long sscray[7]; /* Reserved for Cray Research. */
12946 +/* The following structure defines the vector of words
12947 + returned by the STKSTAT library routine. */
12950 + long now; /* Current total stack size. */
12951 + long maxc; /* Amount of contiguous space which would
12952 + be required to satisfy the maximum
12953 + stack demand to date. */
12954 + long high_water; /* Stack high-water mark. */
12955 + long overflows; /* Number of stack overflow ($STKOFEN) calls. */
12956 + long hits; /* Number of internal buffer hits. */
12957 + long extends; /* Number of block extensions. */
12958 + long stko_mallocs; /* Block allocations by $STKOFEN. */
12959 + long underflows; /* Number of stack underflow calls ($STKRETN). */
12960 + long stko_free; /* Number of deallocations by $STKRETN. */
12961 + long stkm_free; /* Number of deallocations by $STKMRET. */
12962 + long segments; /* Current number of stack segments. */
12963 + long maxs; /* Maximum number of stack segments so far. */
12964 + long pad_size; /* Stack pad size. */
12965 + long current_address; /* Current stack segment address. */
12966 + long current_size; /* Current stack segment size. This
12967 + number is actually corrupted by STKSTAT to
12968 + include the fifteen word trailer area. */
12969 + long initial_address; /* Address of initial segment. */
12970 + long initial_size; /* Size of initial segment. */
12973 +/* The following structure describes the data structure which trails
12974 + any stack segment. I think that the description in 'asdef' is
12975 + out of date. I only describe the parts that I am sure about. */
12977 +struct stk_trailer
12979 + long this_address; /* Address of this block. */
12980 + long this_size; /* Size of this block (does not include
12981 + this trailer). */
12984 + long link; /* Address of trailer block of previous
12998 +#endif /* CRAY2 */
12999 +#endif /* not CRAY_STACK */
13002 +/* Determine a "stack measure" for an arbitrary ADDRESS.
13003 + I doubt that "lint" will like this much. */
13006 +i00afunc (long *address)
13008 + struct stk_stat status;
13009 + struct stk_trailer *trailer;
13010 + long *block, size;
13013 + /* We want to iterate through all of the segments. The first
13014 + step is to get the stack status structure. We could do this
13015 + more quickly and more directly, perhaps, by referencing the
13016 + $LM00 common block, but I know that this works. */
13018 + STKSTAT (&status);
13020 + /* Set up the iteration. */
13022 + trailer = (struct stk_trailer *) (status.current_address
13023 + + status.current_size
13026 + /* There must be at least one stack segment. Therefore it is
13027 + a fatal error if "trailer" is null. */
13029 + if (trailer == 0)
13032 + /* Discard segments that do not contain our argument address. */
13034 + while (trailer != 0)
13036 + block = (long *) trailer->this_address;
13037 + size = trailer->this_size;
13038 + if (block == 0 || size == 0)
13040 + trailer = (struct stk_trailer *) trailer->link;
13041 + if ((block <= address) && (address < (block + size)))
13045 + /* Set the result to the offset in this segment and add the sizes
13046 + of all predecessor segments. */
13048 + result = address - block;
13050 + if (trailer == 0)
13057 + if (trailer->this_size <= 0)
13059 + result += trailer->this_size;
13060 + trailer = (struct stk_trailer *) trailer->link;
13062 + while (trailer != 0);
13064 + /* We are done. Note that if you present a bogus address (one
13065 + not in any segment), you will get a different number back, formed
13066 + from subtracting the address of the first block. This is probably
13067 + not what you want. */
13072 +#else /* not CRAY2 */
13073 +/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
13074 + Determine the number of the cell within the stack,
13075 + given the address of the cell. The purpose of this
13076 + routine is to linearize, in some sense, stack addresses
13080 +i00afunc (long address)
13084 + long size, pseg, this_segment, stack;
13087 + struct stack_segment_linkage *ssptr;
13089 + /* Register B67 contains the address of the end of the
13090 + current stack segment. If you (as a subprogram) store
13091 + your registers on the stack and find that you are past
13092 + the contents of B67, you have overflowed the segment.
13094 + B67 also points to the stack segment linkage control
13095 + area, which is what we are really interested in. */
13097 + stkl = CRAY_STACKSEG_END ();
13098 + ssptr = (struct stack_segment_linkage *) stkl;
13100 + /* If one subtracts 'size' from the end of the segment,
13101 + one has the address of the first word of the segment.
13103 + If this is not the first segment, 'pseg' will be
13106 + pseg = ssptr->sspseg;
13107 + size = ssptr->sssize;
13109 + this_segment = stkl - size;
13111 + /* It is possible that calling this routine itself caused
13112 + a stack overflow. Discard stack segments which do not
13113 + contain the target address. */
13115 + while (!(this_segment <= address && address <= stkl))
13117 +#ifdef DEBUG_I00AFUNC
13118 + fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
13122 + stkl = stkl - pseg;
13123 + ssptr = (struct stack_segment_linkage *) stkl;
13124 + size = ssptr->sssize;
13125 + pseg = ssptr->sspseg;
13126 + this_segment = stkl - size;
13129 + result = address - this_segment;
13131 + /* If you subtract pseg from the current end of the stack,
13132 + you get the address of the previous stack segment's end.
13133 + This seems a little convoluted to me, but I'll bet you save
13134 + a cycle somewhere. */
13136 + while (pseg != 0)
13138 +#ifdef DEBUG_I00AFUNC
13139 + fprintf (stderr, "%011o %011o\n", pseg, size);
13141 + stkl = stkl - pseg;
13142 + ssptr = (struct stack_segment_linkage *) stkl;
13143 + size = ssptr->sssize;
13144 + pseg = ssptr->sspseg;
13150 +#endif /* not CRAY2 */
13153 +#endif /* no alloca */
13155 +++ b/convert/bin.c
13157 +/* bin.c -- Raw Binary Output
13159 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
13160 + Contributed by MIPS Technologies, Inc.
13162 + This program is free software; you can redistribute it and/or modify
13163 + it under the terms of the GNU General Public License as published by
13164 + the Free Software Foundation; either version 3, or (at your option)
13165 + any later version.
13167 + This program is distributed in the hope that it will be useful,
13168 + but WITHOUT ANY WARRANTY; without even the implied warranty of
13169 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13170 + GNU General Public License for more details.
13172 + You should have received a copy of the GNU General Public License
13173 + along with this program; If not, write to the Free Software
13174 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
13175 + 02110-1301, USA. */
13177 +#include "sysdep.h"
13179 +#define BUFSIZE 8192 /* max bytes per block */
13181 +static FILE *binfp;
13182 +static unsigned long binfirst = ~0;
13183 +static unsigned long binaddr = ~0;
13184 +static int binlen;
13185 +static unsigned char *binbuf;
13190 + if (binlen > 0) {
13191 + fseek (binfp, binaddr - binfirst, 0);
13192 + fwrite (binbuf, 1, binlen, binfp);
13198 +BinStart (FILE *fp, unsigned long ep)
13200 + binbuf = xmalloc (BUFSIZE);
13206 +BinOutput (unsigned long addr, unsigned char byte)
13208 + if (addr != binaddr + binlen || binlen == BUFSIZE) {
13211 + if (binfirst == ~0)
13214 + binbuf[binlen++] = byte;
13219 +BinEnd (unsigned long ep)
13226 +++ b/convert/config.h.in
13228 +/* config.h.in. Generated from configure.ac by autoheader. */
13230 +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
13231 + systems. This function is required for `alloca.c' support on those systems.
13233 +#undef CRAY_STACKSEG_END
13235 +/* Define to 1 if using `alloca.c'. */
13238 +/* Define to 1 if you have `alloca', as a function or macro. */
13239 +#undef HAVE_ALLOCA
13241 +/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
13243 +#undef HAVE_ALLOCA_H
13245 +/* Define to 1 if you have the <fcntl.h> header file. */
13246 +#undef HAVE_FCNTL_H
13248 +/* Define to 1 if you have the <inttypes.h> header file. */
13249 +#undef HAVE_INTTYPES_H
13251 +/* Define to 1 if you have the <limits.h> header file. */
13252 +#undef HAVE_LIMITS_H
13254 +/* Define to 1 if you have the `memcpy' function. */
13255 +#undef HAVE_MEMCPY
13257 +/* Define to 1 if you have the <memory.h> header file. */
13258 +#undef HAVE_MEMORY_H
13260 +/* Define to 1 if you have the <stddef.h> header file. */
13261 +#undef HAVE_STDDEF_H
13263 +/* Define to 1 if you have the <stdint.h> header file. */
13264 +#undef HAVE_STDINT_H
13266 +/* Define to 1 if you have the <stdlib.h> header file. */
13267 +#undef HAVE_STDLIB_H
13269 +/* Define to 1 if you have the `strchr' function. */
13270 +#undef HAVE_STRCHR
13272 +/* Define to 1 if you have the <strings.h> header file. */
13273 +#undef HAVE_STRINGS_H
13275 +/* Define to 1 if you have the <string.h> header file. */
13276 +#undef HAVE_STRING_H
13278 +/* Define to 1 if you have the `strtok' function. */
13279 +#undef HAVE_STRTOK
13281 +/* Define to 1 if you have the <sys/file.h> header file. */
13282 +#undef HAVE_SYS_FILE_H
13284 +/* Define to 1 if you have the <sys/stat.h> header file. */
13285 +#undef HAVE_SYS_STAT_H
13287 +/* Define to 1 if you have the <sys/types.h> header file. */
13288 +#undef HAVE_SYS_TYPES_H
13290 +/* Define to 1 if you have the <unistd.h> header file. */
13291 +#undef HAVE_UNISTD_H
13293 +/* Name of package */
13296 +/* Define to the address where bug reports for this package should be sent. */
13297 +#undef PACKAGE_BUGREPORT
13299 +/* Define to the full name of this package. */
13300 +#undef PACKAGE_NAME
13302 +/* Define to the full name and version of this package. */
13303 +#undef PACKAGE_STRING
13305 +/* Define to the one symbol short name of this package. */
13306 +#undef PACKAGE_TARNAME
13308 +/* Define to the version of this package. */
13309 +#undef PACKAGE_VERSION
13311 +/* If using the C implementation of alloca, define if you know the
13312 + direction of stack growth for your system; otherwise it will be
13313 + automatically deduced at runtime.
13314 + STACK_DIRECTION > 0 => grows toward higher addresses
13315 + STACK_DIRECTION < 0 => grows toward lower addresses
13316 + STACK_DIRECTION = 0 => direction of growth unknown */
13317 +#undef STACK_DIRECTION
13319 +/* Define to 1 if you have the ANSI C header files. */
13320 +#undef STDC_HEADERS
13322 +/* Use b modifier when opening binary files? */
13323 +#undef USE_BINARY_FOPEN
13325 +/* Version number of package */
13328 +/* Define to empty if `const' does not conform to ANSI C. */
13331 +/* Define to `unsigned int' if <sys/types.h> does not define. */
13334 +++ b/convert/configure
13337 +# Guess values for system-dependent variables and create Makefiles.
13338 +# Generated by GNU Autoconf 2.61 for convert 3.0.4.
13340 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
13341 +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
13342 +# This configure script is free software; the Free Software Foundation
13343 +# gives unlimited permission to copy, distribute and modify it.
13344 +## --------------------- ##
13345 +## M4sh Initialization. ##
13346 +## --------------------- ##
13348 +# Be more Bourne compatible
13349 +DUALCASE=1; export DUALCASE # for MKS sh
13350 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13353 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
13354 + # is contrary to our usage. Disable this feature.
13355 + alias -g '${1+"$@"}'='"$@"'
13356 + setopt NO_GLOB_SUBST
13358 + case `(set -o) 2>/dev/null` in
13359 + *posix*) set -o posix ;;
13368 +# Avoid depending upon Character Ranges.
13369 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13370 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13371 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13372 +as_cr_digits='0123456789'
13373 +as_cr_alnum=$as_cr_Letters$as_cr_digits
13375 +# The user is always right.
13376 +if test "${PATH_SEPARATOR+set}" != set; then
13377 + echo "#! /bin/sh" >conf$$.sh
13378 + echo "exit 0" >>conf$$.sh
13379 + chmod +x conf$$.sh
13380 + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
13381 + PATH_SEPARATOR=';'
13388 +# Support unset when possible.
13389 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
13397 +# We need space, tab and new line, in precisely that order. Quoting is
13398 +# there to prevent editors from complaining about space-tab.
13399 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13400 +# splitting by setting IFS to empty value.)
13405 +# Find who we are. Look in the path if we contain no directory separator.
13407 + *[\\/]* ) as_myself=$0 ;;
13408 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13409 +for as_dir in $PATH
13412 + test -z "$as_dir" && as_dir=.
13413 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13419 +# We did not find ourselves, most probably we were run as `sh COMMAND'
13420 +# in which case we are not to be found in the path.
13421 +if test "x$as_myself" = x; then
13424 +if test ! -f "$as_myself"; then
13425 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13426 + { (exit 1); exit 1; }
13429 +# Work around bugs in pre-3.0 UWIN ksh.
13430 +for as_var in ENV MAIL MAILPATH
13431 +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13439 + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
13440 + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
13441 + LC_TELEPHONE LC_TIME
13443 + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
13444 + eval $as_var=C; export $as_var
13446 + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13450 +# Required to use basename.
13451 +if expr a : '\(a\)' >/dev/null 2>&1 &&
13452 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
13458 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13459 + as_basename=basename
13461 + as_basename=false
13465 +# Name of the executable.
13466 +as_me=`$as_basename -- "$0" ||
13467 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13468 + X"$0" : 'X\(//\)$' \| \
13469 + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
13471 + sed '/^.*\/\([^/][^/]*\)\/*$/{
13489 +if test "x$CONFIG_SHELL" = x; then
13490 + if (eval ":") 2>/dev/null; then
13491 + as_have_required=yes
13493 + as_have_required=no
13496 + if test $as_have_required = yes && (eval ":
13497 +(as_func_return () {
13500 +as_func_success () {
13503 +as_func_failure () {
13506 +as_func_ret_success () {
13509 +as_func_ret_failure () {
13514 +if as_func_success; then
13518 + echo as_func_success failed.
13521 +if as_func_failure; then
13523 + echo as_func_failure succeeded.
13526 +if as_func_ret_success; then
13530 + echo as_func_ret_success failed.
13533 +if as_func_ret_failure; then
13535 + echo as_func_ret_failure succeeded.
13538 +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
13542 + echo positional parameters were not saved.
13545 +test \$exitcode = 0) || { (exit 1); exit 1; }
13548 + as_lineno_1=\$LINENO
13549 + as_lineno_2=\$LINENO
13550 + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
13551 + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
13552 +") 2> /dev/null; then
13555 + as_candidate_shells=
13556 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13557 +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
13560 + test -z "$as_dir" && as_dir=.
13563 + for as_base in sh bash ksh sh5; do
13564 + as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
13571 + for as_shell in $as_candidate_shells $SHELL; do
13572 + # Try only shells that exist, to save several forks.
13573 + if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
13574 + { ("$as_shell") 2> /dev/null <<\_ASEOF
13575 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13578 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
13579 + # is contrary to our usage. Disable this feature.
13580 + alias -g '${1+"$@"}'='"$@"'
13581 + setopt NO_GLOB_SUBST
13583 + case `(set -o) 2>/dev/null` in
13584 + *posix*) set -o posix ;;
13593 + CONFIG_SHELL=$as_shell
13594 + as_have_required=yes
13595 + if { "$as_shell" 2> /dev/null <<\_ASEOF
13596 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13599 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
13600 + # is contrary to our usage. Disable this feature.
13601 + alias -g '${1+"$@"}'='"$@"'
13602 + setopt NO_GLOB_SUBST
13604 + case `(set -o) 2>/dev/null` in
13605 + *posix*) set -o posix ;;
13612 +(as_func_return () {
13615 +as_func_success () {
13618 +as_func_failure () {
13621 +as_func_ret_success () {
13624 +as_func_ret_failure () {
13629 +if as_func_success; then
13633 + echo as_func_success failed.
13636 +if as_func_failure; then
13638 + echo as_func_failure succeeded.
13641 +if as_func_ret_success; then
13645 + echo as_func_ret_success failed.
13648 +if as_func_ret_failure; then
13650 + echo as_func_ret_failure succeeded.
13653 +if ( set x; as_func_ret_success y && test x = "$1" ); then
13657 + echo positional parameters were not saved.
13660 +test $exitcode = 0) || { (exit 1); exit 1; }
13663 + as_lineno_1=$LINENO
13664 + as_lineno_2=$LINENO
13665 + test "x$as_lineno_1" != "x$as_lineno_2" &&
13666 + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
13677 + if test "x$CONFIG_SHELL" != x; then
13678 + for as_var in BASH_ENV ENV
13679 + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
13681 + export CONFIG_SHELL
13682 + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
13686 + if test $as_have_required = no; then
13687 + echo This script requires a shell more modern than all the
13688 + echo shells that I found on your system. Please install a
13689 + echo modern shell, or manually run the script under such a
13690 + echo shell if you do have one.
13691 + { (exit 1); exit 1; }
13701 +(eval "as_func_return () {
13704 +as_func_success () {
13707 +as_func_failure () {
13710 +as_func_ret_success () {
13713 +as_func_ret_failure () {
13718 +if as_func_success; then
13722 + echo as_func_success failed.
13725 +if as_func_failure; then
13727 + echo as_func_failure succeeded.
13730 +if as_func_ret_success; then
13734 + echo as_func_ret_success failed.
13737 +if as_func_ret_failure; then
13739 + echo as_func_ret_failure succeeded.
13742 +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
13746 + echo positional parameters were not saved.
13749 +test \$exitcode = 0") || {
13750 + echo No shell found that supports shell functions.
13751 + echo Please tell autoconf@gnu.org about your system,
13752 + echo including any error possibly output before this
13758 + as_lineno_1=$LINENO
13759 + as_lineno_2=$LINENO
13760 + test "x$as_lineno_1" != "x$as_lineno_2" &&
13761 + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
13763 + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
13764 + # uniformly replaced by the line number. The first 'sed' inserts a
13765 + # line-number line after each line using $LINENO; the second 'sed'
13766 + # does the real work. The second script uses 'N' to pair each
13767 + # line-number line with the line containing $LINENO, and appends
13768 + # trailing '-' during substitution so that $LINENO is not a special
13769 + # case at line end.
13770 + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
13771 + # scripts with optimization help from Paolo Bonzini. Blame Lee
13772 + # E. McMahon (1931-1989) for sed's syntax. :-)
13778 + s/[$]LINENO.*/&-/
13784 + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
13787 + ' >$as_me.lineno &&
13788 + chmod +x "$as_me.lineno" ||
13789 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
13790 + { (exit 1); exit 1; }; }
13792 + # Don't try to exec as it changes $[0], causing all sort of problems
13793 + # (the dirname of $[0] is not the place where we might find the
13794 + # original and so on. Autoconf is especially sensitive to this).
13795 + . "./$as_me.lineno"
13796 + # Exit status is that of the last command.
13801 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13802 + as_dirname=dirname
13807 +ECHO_C= ECHO_N= ECHO_T=
13808 +case `echo -n x` in
13810 + case `echo 'x\c'` in
13811 + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
13818 +if expr a : '\(a\)' >/dev/null 2>&1 &&
13819 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
13825 +rm -f conf$$ conf$$.exe conf$$.file
13826 +if test -d conf$$.dir; then
13827 + rm -f conf$$.dir/conf$$.file
13833 +if ln -s conf$$.file conf$$ 2>/dev/null; then
13835 + # ... but there are two gotchas:
13836 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13837 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13838 + # In both cases, we have to default to `cp -p'.
13839 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13841 +elif ln conf$$.file conf$$ 2>/dev/null; then
13846 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13847 +rmdir conf$$.dir 2>/dev/null
13849 +if mkdir -p . 2>/dev/null; then
13852 + test -d ./-p && rmdir ./-p
13856 +if test -x / >/dev/null 2>&1; then
13857 + as_test_x='test -x'
13859 + if ls -dL / >/dev/null 2>&1; then
13866 + if test -d "$1"; then
13872 + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
13873 + ???[sx]*):;;*)false;;esac;fi
13877 +as_executable_p=$as_test_x
13879 +# Sed expression to map a string onto a valid CPP name.
13880 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
13882 +# Sed expression to map a string onto a valid variable name.
13883 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
13887 +exec 7<&0 </dev/null 6>&1
13889 +# Name of the host.
13890 +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
13891 +# so uname gets run too.
13892 +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
13895 +# Initializations.
13897 +ac_default_prefix=/usr/local
13899 +ac_config_libobj_dir=.
13901 +cross_compiling=no
13905 +SHELL=${CONFIG_SHELL-/bin/sh}
13907 +# Identity of this package.
13908 +PACKAGE_NAME='convert'
13909 +PACKAGE_TARNAME='convert'
13910 +PACKAGE_VERSION='3.0.4'
13911 +PACKAGE_STRING='convert 3.0.4'
13912 +PACKAGE_BUGREPORT=''
13914 +ac_unique_file="convert.c"
13915 +# Factoring default headers for most tests.
13916 +ac_includes_default="\
13917 +#include <stdio.h>
13918 +#ifdef HAVE_SYS_TYPES_H
13919 +# include <sys/types.h>
13921 +#ifdef HAVE_SYS_STAT_H
13922 +# include <sys/stat.h>
13924 +#ifdef STDC_HEADERS
13925 +# include <stdlib.h>
13926 +# include <stddef.h>
13928 +# ifdef HAVE_STDLIB_H
13929 +# include <stdlib.h>
13932 +#ifdef HAVE_STRING_H
13933 +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
13934 +# include <memory.h>
13936 +# include <string.h>
13938 +#ifdef HAVE_STRINGS_H
13939 +# include <strings.h>
13941 +#ifdef HAVE_INTTYPES_H
13942 +# include <inttypes.h>
13944 +#ifdef HAVE_STDINT_H
13945 +# include <stdint.h>
13947 +#ifdef HAVE_UNISTD_H
13948 +# include <unistd.h>
13951 +ac_subst_vars='SHELL
13960 +program_transform_name
14013 +INSTALL_STRIP_PROGRAM
14035 +am__fastdepCC_TRUE
14036 +am__fastdepCC_FALSE
14044 +MAINTAINER_MODE_TRUE
14045 +MAINTAINER_MODE_FALSE
14050 + ac_precious_vars='build_alias
14061 +# Initialize some variables set by options.
14063 +ac_init_version=false
14064 +# The variables have the same names as the options, with
14065 +# dashes changed to underlines.
14066 +cache_file=/dev/null
14071 +program_prefix=NONE
14072 +program_suffix=NONE
14073 +program_transform_name=s,x,x,
14081 +# Installation directory options.
14082 +# These are left unexpanded so users can "make install exec_prefix=/foo"
14083 +# and all the variables that are supposed to be based on exec_prefix
14084 +# by default will actually change.
14085 +# Use braces instead of parens because sh, perl, etc. also accept them.
14086 +# (The list follows the same order as the GNU Coding Standards.)
14087 +bindir='${exec_prefix}/bin'
14088 +sbindir='${exec_prefix}/sbin'
14089 +libexecdir='${exec_prefix}/libexec'
14090 +datarootdir='${prefix}/share'
14091 +datadir='${datarootdir}'
14092 +sysconfdir='${prefix}/etc'
14093 +sharedstatedir='${prefix}/com'
14094 +localstatedir='${prefix}/var'
14095 +includedir='${prefix}/include'
14096 +oldincludedir='/usr/include'
14097 +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
14098 +infodir='${datarootdir}/info'
14099 +htmldir='${docdir}'
14100 +dvidir='${docdir}'
14101 +pdfdir='${docdir}'
14103 +libdir='${exec_prefix}/lib'
14104 +localedir='${datarootdir}/locale'
14105 +mandir='${datarootdir}/man'
14111 + # If the previous option needs an argument, assign it.
14112 + if test -n "$ac_prev"; then
14113 + eval $ac_prev=\$ac_option
14118 + case $ac_option in
14119 + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
14120 + *) ac_optarg=yes ;;
14123 + # Accept the important Cygnus configure options, so we can diagnose typos.
14125 + case $ac_dashdash$ac_option in
14127 + ac_dashdash=yes ;;
14129 + -bindir | --bindir | --bindi | --bind | --bin | --bi)
14130 + ac_prev=bindir ;;
14131 + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
14132 + bindir=$ac_optarg ;;
14134 + -build | --build | --buil | --bui | --bu)
14135 + ac_prev=build_alias ;;
14136 + -build=* | --build=* | --buil=* | --bui=* | --bu=*)
14137 + build_alias=$ac_optarg ;;
14139 + -cache-file | --cache-file | --cache-fil | --cache-fi \
14140 + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
14141 + ac_prev=cache_file ;;
14142 + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
14143 + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
14144 + cache_file=$ac_optarg ;;
14146 + --config-cache | -C)
14147 + cache_file=config.cache ;;
14149 + -datadir | --datadir | --datadi | --datad)
14150 + ac_prev=datadir ;;
14151 + -datadir=* | --datadir=* | --datadi=* | --datad=*)
14152 + datadir=$ac_optarg ;;
14154 + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
14155 + | --dataroo | --dataro | --datar)
14156 + ac_prev=datarootdir ;;
14157 + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
14158 + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
14159 + datarootdir=$ac_optarg ;;
14161 + -disable-* | --disable-*)
14162 + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
14163 + # Reject names that are not valid shell variable names.
14164 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
14165 + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
14166 + { (exit 1); exit 1; }; }
14167 + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
14168 + eval enable_$ac_feature=no ;;
14170 + -docdir | --docdir | --docdi | --doc | --do)
14171 + ac_prev=docdir ;;
14172 + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
14173 + docdir=$ac_optarg ;;
14175 + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
14176 + ac_prev=dvidir ;;
14177 + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
14178 + dvidir=$ac_optarg ;;
14180 + -enable-* | --enable-*)
14181 + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
14182 + # Reject names that are not valid shell variable names.
14183 + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
14184 + { echo "$as_me: error: invalid feature name: $ac_feature" >&2
14185 + { (exit 1); exit 1; }; }
14186 + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
14187 + eval enable_$ac_feature=\$ac_optarg ;;
14189 + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
14190 + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
14191 + | --exec | --exe | --ex)
14192 + ac_prev=exec_prefix ;;
14193 + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
14194 + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
14195 + | --exec=* | --exe=* | --ex=*)
14196 + exec_prefix=$ac_optarg ;;
14198 + -gas | --gas | --ga | --g)
14199 + # Obsolete; use --with-gas.
14202 + -help | --help | --hel | --he | -h)
14203 + ac_init_help=long ;;
14204 + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
14205 + ac_init_help=recursive ;;
14206 + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
14207 + ac_init_help=short ;;
14209 + -host | --host | --hos | --ho)
14210 + ac_prev=host_alias ;;
14211 + -host=* | --host=* | --hos=* | --ho=*)
14212 + host_alias=$ac_optarg ;;
14214 + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
14215 + ac_prev=htmldir ;;
14216 + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
14218 + htmldir=$ac_optarg ;;
14220 + -includedir | --includedir | --includedi | --included | --include \
14221 + | --includ | --inclu | --incl | --inc)
14222 + ac_prev=includedir ;;
14223 + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
14224 + | --includ=* | --inclu=* | --incl=* | --inc=*)
14225 + includedir=$ac_optarg ;;
14227 + -infodir | --infodir | --infodi | --infod | --info | --inf)
14228 + ac_prev=infodir ;;
14229 + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
14230 + infodir=$ac_optarg ;;
14232 + -libdir | --libdir | --libdi | --libd)
14233 + ac_prev=libdir ;;
14234 + -libdir=* | --libdir=* | --libdi=* | --libd=*)
14235 + libdir=$ac_optarg ;;
14237 + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
14238 + | --libexe | --libex | --libe)
14239 + ac_prev=libexecdir ;;
14240 + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
14241 + | --libexe=* | --libex=* | --libe=*)
14242 + libexecdir=$ac_optarg ;;
14244 + -localedir | --localedir | --localedi | --localed | --locale)
14245 + ac_prev=localedir ;;
14246 + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
14247 + localedir=$ac_optarg ;;
14249 + -localstatedir | --localstatedir | --localstatedi | --localstated \
14250 + | --localstate | --localstat | --localsta | --localst | --locals)
14251 + ac_prev=localstatedir ;;
14252 + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
14253 + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
14254 + localstatedir=$ac_optarg ;;
14256 + -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
14257 + ac_prev=mandir ;;
14258 + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
14259 + mandir=$ac_optarg ;;
14261 + -nfp | --nfp | --nf)
14262 + # Obsolete; use --without-fp.
14265 + -no-create | --no-create | --no-creat | --no-crea | --no-cre \
14266 + | --no-cr | --no-c | -n)
14269 + -no-recursion | --no-recursion | --no-recursio | --no-recursi \
14270 + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
14271 + no_recursion=yes ;;
14273 + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
14274 + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
14275 + | --oldin | --oldi | --old | --ol | --o)
14276 + ac_prev=oldincludedir ;;
14277 + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
14278 + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
14279 + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
14280 + oldincludedir=$ac_optarg ;;
14282 + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
14283 + ac_prev=prefix ;;
14284 + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
14285 + prefix=$ac_optarg ;;
14287 + -program-prefix | --program-prefix | --program-prefi | --program-pref \
14288 + | --program-pre | --program-pr | --program-p)
14289 + ac_prev=program_prefix ;;
14290 + -program-prefix=* | --program-prefix=* | --program-prefi=* \
14291 + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
14292 + program_prefix=$ac_optarg ;;
14294 + -program-suffix | --program-suffix | --program-suffi | --program-suff \
14295 + | --program-suf | --program-su | --program-s)
14296 + ac_prev=program_suffix ;;
14297 + -program-suffix=* | --program-suffix=* | --program-suffi=* \
14298 + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
14299 + program_suffix=$ac_optarg ;;
14301 + -program-transform-name | --program-transform-name \
14302 + | --program-transform-nam | --program-transform-na \
14303 + | --program-transform-n | --program-transform- \
14304 + | --program-transform | --program-transfor \
14305 + | --program-transfo | --program-transf \
14306 + | --program-trans | --program-tran \
14307 + | --progr-tra | --program-tr | --program-t)
14308 + ac_prev=program_transform_name ;;
14309 + -program-transform-name=* | --program-transform-name=* \
14310 + | --program-transform-nam=* | --program-transform-na=* \
14311 + | --program-transform-n=* | --program-transform-=* \
14312 + | --program-transform=* | --program-transfor=* \
14313 + | --program-transfo=* | --program-transf=* \
14314 + | --program-trans=* | --program-tran=* \
14315 + | --progr-tra=* | --program-tr=* | --program-t=*)
14316 + program_transform_name=$ac_optarg ;;
14318 + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
14319 + ac_prev=pdfdir ;;
14320 + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
14321 + pdfdir=$ac_optarg ;;
14323 + -psdir | --psdir | --psdi | --psd | --ps)
14325 + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
14326 + psdir=$ac_optarg ;;
14328 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14329 + | -silent | --silent | --silen | --sile | --sil)
14332 + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
14333 + ac_prev=sbindir ;;
14334 + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
14335 + | --sbi=* | --sb=*)
14336 + sbindir=$ac_optarg ;;
14338 + -sharedstatedir | --sharedstatedir | --sharedstatedi \
14339 + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
14340 + | --sharedst | --shareds | --shared | --share | --shar \
14342 + ac_prev=sharedstatedir ;;
14343 + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
14344 + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
14345 + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
14346 + | --sha=* | --sh=*)
14347 + sharedstatedir=$ac_optarg ;;
14349 + -site | --site | --sit)
14351 + -site=* | --site=* | --sit=*)
14352 + site=$ac_optarg ;;
14354 + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
14355 + ac_prev=srcdir ;;
14356 + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
14357 + srcdir=$ac_optarg ;;
14359 + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
14360 + | --syscon | --sysco | --sysc | --sys | --sy)
14361 + ac_prev=sysconfdir ;;
14362 + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
14363 + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
14364 + sysconfdir=$ac_optarg ;;
14366 + -target | --target | --targe | --targ | --tar | --ta | --t)
14367 + ac_prev=target_alias ;;
14368 + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
14369 + target_alias=$ac_optarg ;;
14371 + -v | -verbose | --verbose | --verbos | --verbo | --verb)
14374 + -version | --version | --versio | --versi | --vers | -V)
14375 + ac_init_version=: ;;
14377 + -with-* | --with-*)
14378 + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
14379 + # Reject names that are not valid shell variable names.
14380 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
14381 + { echo "$as_me: error: invalid package name: $ac_package" >&2
14382 + { (exit 1); exit 1; }; }
14383 + ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
14384 + eval with_$ac_package=\$ac_optarg ;;
14386 + -without-* | --without-*)
14387 + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
14388 + # Reject names that are not valid shell variable names.
14389 + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
14390 + { echo "$as_me: error: invalid package name: $ac_package" >&2
14391 + { (exit 1); exit 1; }; }
14392 + ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
14393 + eval with_$ac_package=no ;;
14396 + # Obsolete; use --with-x.
14399 + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
14400 + | --x-incl | --x-inc | --x-in | --x-i)
14401 + ac_prev=x_includes ;;
14402 + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
14403 + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
14404 + x_includes=$ac_optarg ;;
14406 + -x-libraries | --x-libraries | --x-librarie | --x-librari \
14407 + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
14408 + ac_prev=x_libraries ;;
14409 + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
14410 + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
14411 + x_libraries=$ac_optarg ;;
14413 + -*) { echo "$as_me: error: unrecognized option: $ac_option
14414 +Try \`$0 --help' for more information." >&2
14415 + { (exit 1); exit 1; }; }
14419 + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
14420 + # Reject names that are not valid shell variable names.
14421 + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
14422 + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
14423 + { (exit 1); exit 1; }; }
14424 + eval $ac_envvar=\$ac_optarg
14425 + export $ac_envvar ;;
14428 + # FIXME: should be removed in autoconf 3.0.
14429 + echo "$as_me: WARNING: you should use --build, --host, --target" >&2
14430 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
14431 + echo "$as_me: WARNING: invalid host type: $ac_option" >&2
14432 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
14438 +if test -n "$ac_prev"; then
14439 + ac_option=--`echo $ac_prev | sed 's/_/-/g'`
14440 + { echo "$as_me: error: missing argument to $ac_option" >&2
14441 + { (exit 1); exit 1; }; }
14444 +# Be sure to have absolute directory names.
14445 +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
14446 + datadir sysconfdir sharedstatedir localstatedir includedir \
14447 + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
14448 + libdir localedir mandir
14450 + eval ac_val=\$$ac_var
14452 + [\\/$]* | ?:[\\/]* ) continue;;
14453 + NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
14455 + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
14456 + { (exit 1); exit 1; }; }
14459 +# There might be people who depend on the old broken behavior: `$host'
14460 +# used to hold the argument of --host etc.
14461 +# FIXME: To remove some day.
14462 +build=$build_alias
14464 +target=$target_alias
14466 +# FIXME: To remove some day.
14467 +if test "x$host_alias" != x; then
14468 + if test "x$build_alias" = x; then
14469 + cross_compiling=maybe
14470 + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
14471 + If a cross compiler is detected then cross compile mode will be used." >&2
14472 + elif test "x$build_alias" != "x$host_alias"; then
14473 + cross_compiling=yes
14478 +test -n "$host_alias" && ac_tool_prefix=$host_alias-
14480 +test "$silent" = yes && exec 6>/dev/null
14483 +ac_pwd=`pwd` && test -n "$ac_pwd" &&
14484 +ac_ls_di=`ls -di .` &&
14485 +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
14486 + { echo "$as_me: error: Working directory cannot be determined" >&2
14487 + { (exit 1); exit 1; }; }
14488 +test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
14489 + { echo "$as_me: error: pwd does not report name of working directory" >&2
14490 + { (exit 1); exit 1; }; }
14493 +# Find the source files, if location was not specified.
14494 +if test -z "$srcdir"; then
14495 + ac_srcdir_defaulted=yes
14496 + # Try the directory containing this script, then the parent directory.
14497 + ac_confdir=`$as_dirname -- "$0" ||
14498 +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14499 + X"$0" : 'X\(//\)[^/]' \| \
14500 + X"$0" : 'X\(//\)$' \| \
14501 + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14503 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14507 + /^X\(\/\/\)[^/].*/{
14520 + srcdir=$ac_confdir
14521 + if test ! -r "$srcdir/$ac_unique_file"; then
14525 + ac_srcdir_defaulted=no
14527 +if test ! -r "$srcdir/$ac_unique_file"; then
14528 + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
14529 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
14530 + { (exit 1); exit 1; }; }
14532 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
14534 + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
14535 + { (exit 1); exit 1; }; }
14537 +# When building in place, set srcdir=.
14538 +if test "$ac_abs_confdir" = "$ac_pwd"; then
14541 +# Remove unnecessary trailing slashes from srcdir.
14542 +# Double slashes in file names in object file debugging info
14543 +# mess up M-x gdb in Emacs.
14545 +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
14547 +for ac_var in $ac_precious_vars; do
14548 + eval ac_env_${ac_var}_set=\${${ac_var}+set}
14549 + eval ac_env_${ac_var}_value=\$${ac_var}
14550 + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
14551 + eval ac_cv_env_${ac_var}_value=\$${ac_var}
14555 +# Report the --help message.
14557 +if test "$ac_init_help" = "long"; then
14558 + # Omit some internal or obsolete options to make the list less imposing.
14559 + # This message is too long to be a string in the A/UX 3.1 sh.
14561 +\`configure' configures convert 3.0.4 to adapt to many kinds of systems.
14563 +Usage: $0 [OPTION]... [VAR=VALUE]...
14565 +To assign environment variables (e.g., CC, CFLAGS...), specify them as
14566 +VAR=VALUE. See below for descriptions of some of the useful variables.
14568 +Defaults for the options are specified in brackets.
14571 + -h, --help display this help and exit
14572 + --help=short display options specific to this package
14573 + --help=recursive display the short help of all the included packages
14574 + -V, --version display version information and exit
14575 + -q, --quiet, --silent do not print \`checking...' messages
14576 + --cache-file=FILE cache test results in FILE [disabled]
14577 + -C, --config-cache alias for \`--cache-file=config.cache'
14578 + -n, --no-create do not create output files
14579 + --srcdir=DIR find the sources in DIR [configure dir or \`..']
14581 +Installation directories:
14582 + --prefix=PREFIX install architecture-independent files in PREFIX
14583 + [$ac_default_prefix]
14584 + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
14587 +By default, \`make install' will install all the files in
14588 +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
14589 +an installation prefix other than \`$ac_default_prefix' using \`--prefix',
14590 +for instance \`--prefix=\$HOME'.
14592 +For better control, use the options below.
14594 +Fine tuning of the installation directories:
14595 + --bindir=DIR user executables [EPREFIX/bin]
14596 + --sbindir=DIR system admin executables [EPREFIX/sbin]
14597 + --libexecdir=DIR program executables [EPREFIX/libexec]
14598 + --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
14599 + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
14600 + --localstatedir=DIR modifiable single-machine data [PREFIX/var]
14601 + --libdir=DIR object code libraries [EPREFIX/lib]
14602 + --includedir=DIR C header files [PREFIX/include]
14603 + --oldincludedir=DIR C header files for non-gcc [/usr/include]
14604 + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
14605 + --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
14606 + --infodir=DIR info documentation [DATAROOTDIR/info]
14607 + --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
14608 + --mandir=DIR man documentation [DATAROOTDIR/man]
14609 + --docdir=DIR documentation root [DATAROOTDIR/doc/convert]
14610 + --htmldir=DIR html documentation [DOCDIR]
14611 + --dvidir=DIR dvi documentation [DOCDIR]
14612 + --pdfdir=DIR pdf documentation [DOCDIR]
14613 + --psdir=DIR ps documentation [DOCDIR]
14619 + --program-prefix=PREFIX prepend PREFIX to installed program names
14620 + --program-suffix=SUFFIX append SUFFIX to installed program names
14621 + --program-transform-name=PROGRAM run sed PROGRAM on installed program names
14624 + --build=BUILD configure for building on BUILD [guessed]
14625 + --host=HOST cross-compile to build programs to run on HOST [BUILD]
14626 + --target=TARGET configure for building compilers for TARGET [HOST]
14630 +if test -n "$ac_init_help"; then
14631 + case $ac_init_help in
14632 + short | recursive ) echo "Configuration of convert 3.0.4:";;
14636 +Optional Features:
14637 + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
14638 + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
14639 + --disable-dependency-tracking speeds up one-time build
14640 + --enable-dependency-tracking do not reject slow dependency extractors
14641 + --enable-maintainer-mode enable make rules and dependencies not useful
14642 + (and sometimes confusing) to the casual installer
14644 +Optional Packages:
14645 + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
14646 + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
14647 + --with-pkgversion=PKG Use PKG in the version string in place of "MIPS
14649 + --with-bugurl=URL Direct users to URL to report a bug
14651 +Some influential environment variables:
14652 + CC C compiler command
14653 + CFLAGS C compiler flags
14654 + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
14655 + nonstandard directory <lib dir>
14656 + LIBS libraries to pass to the linker, e.g. -l<library>
14657 + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
14658 + you have headers in a nonstandard directory <include dir>
14659 + CPP C preprocessor
14661 +Use these variables to override the choices made by `configure' or to help
14662 +it to find libraries and programs with nonstandard names/locations.
14668 +if test "$ac_init_help" = "recursive"; then
14669 + # If there are subdirs, report their specific --help.
14670 + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
14671 + test -d "$ac_dir" || continue
14675 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14677 + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
14678 + # A ".." for each directory in $ac_dir_suffix.
14679 + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
14680 + case $ac_top_builddir_sub in
14681 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14682 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14685 +ac_abs_top_builddir=$ac_pwd
14686 +ac_abs_builddir=$ac_pwd$ac_dir_suffix
14687 +# for backward compatibility:
14688 +ac_top_builddir=$ac_top_build_prefix
14691 + .) # We are building in place.
14693 + ac_top_srcdir=$ac_top_builddir_sub
14694 + ac_abs_top_srcdir=$ac_pwd ;;
14695 + [\\/]* | ?:[\\/]* ) # Absolute name.
14696 + ac_srcdir=$srcdir$ac_dir_suffix;
14697 + ac_top_srcdir=$srcdir
14698 + ac_abs_top_srcdir=$srcdir ;;
14699 + *) # Relative name.
14700 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14701 + ac_top_srcdir=$ac_top_build_prefix$srcdir
14702 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
14704 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
14706 + cd "$ac_dir" || { ac_status=$?; continue; }
14707 + # Check for guested configure.
14708 + if test -f "$ac_srcdir/configure.gnu"; then
14710 + $SHELL "$ac_srcdir/configure.gnu" --help=recursive
14711 + elif test -f "$ac_srcdir/configure"; then
14713 + $SHELL "$ac_srcdir/configure" --help=recursive
14715 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
14716 + fi || ac_status=$?
14717 + cd "$ac_pwd" || { ac_status=$?; break; }
14721 +test -n "$ac_init_help" && exit $ac_status
14722 +if $ac_init_version; then
14724 +convert configure 3.0.4
14725 +generated by GNU Autoconf 2.61
14727 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14728 +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
14729 +This configure script is free software; the Free Software Foundation
14730 +gives unlimited permission to copy, distribute and modify it.
14734 +cat >config.log <<_ACEOF
14735 +This file contains any messages produced by compilers while
14736 +running configure, to aid debugging if configure makes a mistake.
14738 +It was created by convert $as_me 3.0.4, which was
14739 +generated by GNU Autoconf 2.61. Invocation command line was
14744 +exec 5>>config.log
14751 +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
14752 +uname -m = `(uname -m) 2>/dev/null || echo unknown`
14753 +uname -r = `(uname -r) 2>/dev/null || echo unknown`
14754 +uname -s = `(uname -s) 2>/dev/null || echo unknown`
14755 +uname -v = `(uname -v) 2>/dev/null || echo unknown`
14757 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
14758 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
14760 +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
14761 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
14762 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
14763 +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
14764 +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
14765 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
14766 +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
14770 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771 +for as_dir in $PATH
14774 + test -z "$as_dir" && as_dir=.
14775 + echo "PATH: $as_dir"
14791 +# Keep a trace of the command line.
14792 +# Strip out --no-create and --no-recursion so they do not pile up.
14793 +# Strip out --silent because we don't want to record it for future runs.
14794 +# Also quote any args containing shell meta-characters.
14795 +# Make two passes to allow for proper duplicate-argument suppression.
14796 +ac_configure_args=
14797 +ac_configure_args0=
14798 +ac_configure_args1=
14799 +ac_must_keep_next=false
14800 +for ac_pass in 1 2
14805 + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
14806 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14807 + | -silent | --silent | --silen | --sile | --sil)
14810 + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
14813 + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
14815 + ac_configure_args1="$ac_configure_args1 '$ac_arg'"
14816 + if test $ac_must_keep_next = true; then
14817 + ac_must_keep_next=false # Got value, back to normal.
14820 + *=* | --config-cache | -C | -disable-* | --disable-* \
14821 + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
14822 + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
14823 + | -with-* | --with-* | -without-* | --without-* | --x)
14824 + case "$ac_configure_args0 " in
14825 + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
14828 + -* ) ac_must_keep_next=true ;;
14831 + ac_configure_args="$ac_configure_args '$ac_arg'"
14836 +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
14837 +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
14839 +# When interrupted or exit'd, cleanup temporary files, and complete
14840 +# config.log. We remove comments because anyway the quotes in there
14841 +# would cause problems or look ugly.
14842 +# WARNING: Use '\'' to represent an apostrophe within the trap.
14843 +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
14844 +trap 'exit_status=$?
14845 + # Save into config.log some information that might help in debugging.
14850 +## ---------------- ##
14851 +## Cache variables. ##
14852 +## ---------------- ##
14855 + # The following way of writing the cache mishandles newlines in values,
14857 + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
14858 + eval ac_val=\$$ac_var
14859 + case $ac_val in #(
14861 + case $ac_var in #(
14862 + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
14863 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
14865 + case $ac_var in #(
14866 + _ | IFS | as_nl) ;; #(
14867 + *) $as_unset $ac_var ;;
14872 + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
14873 + *${as_nl}ac_space=\ *)
14875 + "s/'\''/'\''\\\\'\'''\''/g;
14876 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
14879 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14887 +## ----------------- ##
14888 +## Output variables. ##
14889 +## ----------------- ##
14892 + for ac_var in $ac_subst_vars
14894 + eval ac_val=\$$ac_var
14896 + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
14898 + echo "$ac_var='\''$ac_val'\''"
14902 + if test -n "$ac_subst_files"; then
14904 +## ------------------- ##
14905 +## File substitutions. ##
14906 +## ------------------- ##
14909 + for ac_var in $ac_subst_files
14911 + eval ac_val=\$$ac_var
14913 + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
14915 + echo "$ac_var='\''$ac_val'\''"
14920 + if test -s confdefs.h; then
14930 + test "$ac_signal" != 0 &&
14931 + echo "$as_me: caught signal $ac_signal"
14932 + echo "$as_me: exit $exit_status"
14934 + rm -f core *.core core.conftest.* &&
14935 + rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
14936 + exit $exit_status
14938 +for ac_signal in 1 2 13 15; do
14939 + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
14943 +# confdefs.h avoids OS command line length limits that DEFS can exceed.
14944 +rm -f -r conftest* confdefs.h
14946 +# Predefined preprocessor variables.
14948 +cat >>confdefs.h <<_ACEOF
14949 +#define PACKAGE_NAME "$PACKAGE_NAME"
14953 +cat >>confdefs.h <<_ACEOF
14954 +#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
14958 +cat >>confdefs.h <<_ACEOF
14959 +#define PACKAGE_VERSION "$PACKAGE_VERSION"
14963 +cat >>confdefs.h <<_ACEOF
14964 +#define PACKAGE_STRING "$PACKAGE_STRING"
14968 +cat >>confdefs.h <<_ACEOF
14969 +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
14973 +# Let the site file select an alternate cache file if it wants to.
14974 +# Prefer explicitly selected file to automatically selected ones.
14975 +if test -n "$CONFIG_SITE"; then
14976 + set x "$CONFIG_SITE"
14977 +elif test "x$prefix" != xNONE; then
14978 + set x "$prefix/share/config.site" "$prefix/etc/config.site"
14980 + set x "$ac_default_prefix/share/config.site" \
14981 + "$ac_default_prefix/etc/config.site"
14986 + if test -r "$ac_site_file"; then
14987 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
14988 +echo "$as_me: loading site script $ac_site_file" >&6;}
14989 + sed 's/^/| /' "$ac_site_file" >&5
14990 + . "$ac_site_file"
14994 +if test -r "$cache_file"; then
14995 + # Some versions of bash will fail to source /dev/null (special
14996 + # files actually), so we avoid doing that.
14997 + if test -f "$cache_file"; then
14998 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5
14999 +echo "$as_me: loading cache $cache_file" >&6;}
15000 + case $cache_file in
15001 + [\\/]* | ?:[\\/]* ) . "$cache_file";;
15002 + *) . "./$cache_file";;
15006 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5
15007 +echo "$as_me: creating cache $cache_file" >&6;}
15011 +# Check that the precious variables saved in the cache have kept the same
15013 +ac_cache_corrupted=false
15014 +for ac_var in $ac_precious_vars; do
15015 + eval ac_old_set=\$ac_cv_env_${ac_var}_set
15016 + eval ac_new_set=\$ac_env_${ac_var}_set
15017 + eval ac_old_val=\$ac_cv_env_${ac_var}_value
15018 + eval ac_new_val=\$ac_env_${ac_var}_value
15019 + case $ac_old_set,$ac_new_set in
15021 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
15022 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
15023 + ac_cache_corrupted=: ;;
15025 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
15026 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
15027 + ac_cache_corrupted=: ;;
15030 + if test "x$ac_old_val" != "x$ac_new_val"; then
15031 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
15032 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
15033 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
15034 +echo "$as_me: former value: $ac_old_val" >&2;}
15035 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
15036 +echo "$as_me: current value: $ac_new_val" >&2;}
15037 + ac_cache_corrupted=:
15040 + # Pass precious variables to config.status.
15041 + if test "$ac_new_set" = set; then
15042 + case $ac_new_val in
15043 + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
15044 + *) ac_arg=$ac_var=$ac_new_val ;;
15046 + case " $ac_configure_args " in
15047 + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
15048 + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
15052 +if $ac_cache_corrupted; then
15053 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
15054 +echo "$as_me: error: changes in the environment can compromise the build" >&2;}
15055 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
15056 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
15057 + { (exit 1); exit 1; }; }
15085 +ac_cpp='$CPP $CPPFLAGS'
15086 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15087 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15088 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
15092 +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
15093 + if test -f "$ac_dir/install-sh"; then
15094 + ac_aux_dir=$ac_dir
15095 + ac_install_sh="$ac_aux_dir/install-sh -c"
15097 + elif test -f "$ac_dir/install.sh"; then
15098 + ac_aux_dir=$ac_dir
15099 + ac_install_sh="$ac_aux_dir/install.sh -c"
15101 + elif test -f "$ac_dir/shtool"; then
15102 + ac_aux_dir=$ac_dir
15103 + ac_install_sh="$ac_aux_dir/shtool install -c"
15107 +if test -z "$ac_aux_dir"; then
15108 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
15109 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
15110 + { (exit 1); exit 1; }; }
15113 +# These three variables are undocumented and unsupported,
15114 +# and are intended to be withdrawn in a future Autoconf release.
15115 +# They can cause serious problems if a builder's source tree is in a directory
15116 +# whose full name contains unusual characters.
15117 +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
15118 +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
15119 +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
15122 +# Make sure we can run config.sub.
15123 +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15124 + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
15125 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
15126 + { (exit 1); exit 1; }; }
15128 +{ echo "$as_me:$LINENO: checking build system type" >&5
15129 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
15130 +if test "${ac_cv_build+set}" = set; then
15131 + echo $ECHO_N "(cached) $ECHO_C" >&6
15133 + ac_build_alias=$build_alias
15134 +test "x$ac_build_alias" = x &&
15135 + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15136 +test "x$ac_build_alias" = x &&
15137 + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
15138 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
15139 + { (exit 1); exit 1; }; }
15140 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15141 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
15142 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
15143 + { (exit 1); exit 1; }; }
15146 +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
15147 +echo "${ECHO_T}$ac_cv_build" >&6; }
15148 +case $ac_cv_build in
15150 +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
15151 +echo "$as_me: error: invalid value of canonical build" >&2;}
15152 + { (exit 1); exit 1; }; };;
15154 +build=$ac_cv_build
15155 +ac_save_IFS=$IFS; IFS='-'
15156 +set x $ac_cv_build
15161 +# Remember, the first character of IFS is used to create $*,
15162 +# except with old shells:
15165 +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15168 +{ echo "$as_me:$LINENO: checking host system type" >&5
15169 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
15170 +if test "${ac_cv_host+set}" = set; then
15171 + echo $ECHO_N "(cached) $ECHO_C" >&6
15173 + if test "x$host_alias" = x; then
15174 + ac_cv_host=$ac_cv_build
15176 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15177 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
15178 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
15179 + { (exit 1); exit 1; }; }
15183 +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
15184 +echo "${ECHO_T}$ac_cv_host" >&6; }
15185 +case $ac_cv_host in
15187 +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
15188 +echo "$as_me: error: invalid value of canonical host" >&2;}
15189 + { (exit 1); exit 1; }; };;
15192 +ac_save_IFS=$IFS; IFS='-'
15198 +# Remember, the first character of IFS is used to create $*,
15199 +# except with old shells:
15202 +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15205 +{ echo "$as_me:$LINENO: checking target system type" >&5
15206 +echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
15207 +if test "${ac_cv_target+set}" = set; then
15208 + echo $ECHO_N "(cached) $ECHO_C" >&6
15210 + if test "x$target_alias" = x; then
15211 + ac_cv_target=$ac_cv_host
15213 + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15214 + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
15215 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
15216 + { (exit 1); exit 1; }; }
15220 +{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
15221 +echo "${ECHO_T}$ac_cv_target" >&6; }
15222 +case $ac_cv_target in
15224 +*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
15225 +echo "$as_me: error: invalid value of canonical target" >&2;}
15226 + { (exit 1); exit 1; }; };;
15228 +target=$ac_cv_target
15229 +ac_save_IFS=$IFS; IFS='-'
15230 +set x $ac_cv_target
15235 +# Remember, the first character of IFS is used to create $*,
15236 +# except with old shells:
15239 +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15242 +# The aliases save the names the user supplied, while $host etc.
15243 +# will get canonicalized.
15244 +test -n "$target_alias" &&
15245 + test "$program_prefix$program_suffix$program_transform_name" = \
15246 + NONENONEs,x,x, &&
15247 + program_prefix=${target_alias}-
15248 +am__api_version="1.9"
15249 +# Find a good install program. We prefer a C program (faster),
15250 +# so one script is as good as another. But avoid the broken or
15251 +# incompatible versions:
15252 +# SysV /etc/install, /usr/sbin/install
15253 +# SunOS /usr/etc/install
15254 +# IRIX /sbin/install
15255 +# AIX /bin/install
15256 +# AmigaOS /C/install, which installs bootblocks on floppy discs
15257 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
15258 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
15259 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
15260 +# OS/2's system install, which has a completely different semantic
15261 +# ./install, which can be erroneously created by make from ./install.sh.
15262 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
15263 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
15264 +if test -z "$INSTALL"; then
15265 +if test "${ac_cv_path_install+set}" = set; then
15266 + echo $ECHO_N "(cached) $ECHO_C" >&6
15268 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15269 +for as_dir in $PATH
15272 + test -z "$as_dir" && as_dir=.
15273 + # Account for people who put trailing slashes in PATH elements.
15275 + ./ | .// | /cC/* | \
15276 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
15277 + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
15280 + # OSF1 and SCO ODT 3.0 have their own names for install.
15281 + # Don't use installbsd from OSF since it installs stuff as root
15283 + for ac_prog in ginstall scoinst install; do
15284 + for ac_exec_ext in '' $ac_executable_extensions; do
15285 + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
15286 + if test $ac_prog = install &&
15287 + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
15288 + # AIX install. It has an incompatible calling convention.
15290 + elif test $ac_prog = install &&
15291 + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
15292 + # program-specific install script used by HP pwplus--don't use.
15295 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
15308 + if test "${ac_cv_path_install+set}" = set; then
15309 + INSTALL=$ac_cv_path_install
15311 + # As a last resort, use the slow shell script. Don't cache a
15312 + # value for INSTALL within a source directory, because that will
15313 + # break other packages using the cache if that directory is
15314 + # removed, or if the value is a relative name.
15315 + INSTALL=$ac_install_sh
15318 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5
15319 +echo "${ECHO_T}$INSTALL" >&6; }
15321 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
15322 +# It thinks the first close brace ends the variable substitution.
15323 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
15325 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
15327 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
15329 +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
15330 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
15333 +echo timestamp > conftest.file
15334 +# Do `set' in a subshell so we don't clobber the current shell's
15335 +# arguments. Must try -L first in case configure is actually a
15336 +# symlink; some systems play weird games with the mod time of symlinks
15337 +# (eg FreeBSD returns the mod time of the symlink's containing
15340 + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
15341 + if test "$*" = "X"; then
15342 + # -L didn't work.
15343 + set X `ls -t $srcdir/configure conftest.file`
15345 + rm -f conftest.file
15346 + if test "$*" != "X $srcdir/configure conftest.file" \
15347 + && test "$*" != "X conftest.file $srcdir/configure"; then
15349 + # If neither matched, then we have a broken ls. This can happen
15350 + # if, for instance, CONFIG_SHELL is bash and it inherits a
15351 + # broken ls alias from the environment. This has actually
15352 + # happened. Such a system could not be considered "sane".
15353 + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
15354 +alias in your environment" >&5
15355 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
15356 +alias in your environment" >&2;}
15357 + { (exit 1); exit 1; }; }
15360 + test "$2" = conftest.file
15366 + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
15367 +Check your system clock" >&5
15368 +echo "$as_me: error: newly created file is older than distributed files!
15369 +Check your system clock" >&2;}
15370 + { (exit 1); exit 1; }; }
15372 +{ echo "$as_me:$LINENO: result: yes" >&5
15373 +echo "${ECHO_T}yes" >&6; }
15374 +test "$program_prefix" != NONE &&
15375 + program_transform_name="s&^&$program_prefix&;$program_transform_name"
15376 +# Use a double $ so make ignores it.
15377 +test "$program_suffix" != NONE &&
15378 + program_transform_name="s&\$&$program_suffix&;$program_transform_name"
15379 +# Double any \ or $. echo might interpret backslashes.
15380 +# By default was `s,x,x', remove it if useless.
15381 +cat <<\_ACEOF >conftest.sed
15382 +s/[\\$]/&&/g;s/;s,x,x,$//
15384 +program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
15385 +rm -f conftest.sed
15387 +# expand $ac_aux_dir to an absolute path
15388 +am_aux_dir=`cd $ac_aux_dir && pwd`
15390 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
15391 +# Use eval to expand $SHELL
15392 +if eval "$MISSING --run true"; then
15393 + am_missing_run="$MISSING --run "
15396 + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
15397 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
15400 +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
15401 + # We used to keeping the `.' as first argument, in order to
15402 + # allow $(mkdir_p) to be used without argument. As in
15403 + # $(mkdir_p) $(somedir)
15404 + # where $(somedir) is conditionally defined. However this is wrong
15405 + # for two reasons:
15406 + # 1. if the package is installed by a user who cannot write `.'
15407 + # make install will fail,
15408 + # 2. the above comment should most certainly read
15409 + # $(mkdir_p) $(DESTDIR)$(somedir)
15410 + # so it does not work when $(somedir) is undefined and
15411 + # $(DESTDIR) is not.
15412 + # To support the latter case, we have to write
15413 + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
15414 + # so the `.' trick is pointless.
15415 + mkdir_p='mkdir -p --'
15417 + # On NextStep and OpenStep, the `mkdir' command does not
15418 + # recognize any option. It will interpret all options as
15419 + # directories to create, and then abort because `.' already
15421 + for d in ./-p ./--version;
15423 + test -d $d && rmdir $d
15425 + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
15426 + if test -f "$ac_aux_dir/mkinstalldirs"; then
15427 + mkdir_p='$(mkinstalldirs)'
15429 + mkdir_p='$(install_sh) -d'
15433 +for ac_prog in gawk mawk nawk awk
15435 + # Extract the first word of "$ac_prog", so it can be a program name with args.
15436 +set dummy $ac_prog; ac_word=$2
15437 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15438 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15439 +if test "${ac_cv_prog_AWK+set}" = set; then
15440 + echo $ECHO_N "(cached) $ECHO_C" >&6
15442 + if test -n "$AWK"; then
15443 + ac_cv_prog_AWK="$AWK" # Let the user override the test.
15445 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15446 +for as_dir in $PATH
15449 + test -z "$as_dir" && as_dir=.
15450 + for ac_exec_ext in '' $ac_executable_extensions; do
15451 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15452 + ac_cv_prog_AWK="$ac_prog"
15453 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15462 +AWK=$ac_cv_prog_AWK
15463 +if test -n "$AWK"; then
15464 + { echo "$as_me:$LINENO: result: $AWK" >&5
15465 +echo "${ECHO_T}$AWK" >&6; }
15467 + { echo "$as_me:$LINENO: result: no" >&5
15468 +echo "${ECHO_T}no" >&6; }
15472 + test -n "$AWK" && break
15475 +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
15476 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
15477 +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
15478 +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
15479 + echo $ECHO_N "(cached) $ECHO_C" >&6
15481 + cat >conftest.make <<\_ACEOF
15484 + @echo '@@@%%%=$(MAKE)=@@@%%%'
15486 +# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
15487 +case `${MAKE-make} -f conftest.make 2>/dev/null` in
15488 + *@@@%%%=?*=@@@%%%*)
15489 + eval ac_cv_prog_make_${ac_make}_set=yes;;
15491 + eval ac_cv_prog_make_${ac_make}_set=no;;
15493 +rm -f conftest.make
15495 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
15496 + { echo "$as_me:$LINENO: result: yes" >&5
15497 +echo "${ECHO_T}yes" >&6; }
15500 + { echo "$as_me:$LINENO: result: no" >&5
15501 +echo "${ECHO_T}no" >&6; }
15502 + SET_MAKE="MAKE=${MAKE-make}"
15505 +rm -rf .tst 2>/dev/null
15506 +mkdir .tst 2>/dev/null
15507 +if test -d .tst; then
15508 + am__leading_dot=.
15510 + am__leading_dot=_
15512 +rmdir .tst 2>/dev/null
15514 +# test to see if srcdir already configured
15515 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
15516 + test -f $srcdir/config.status; then
15517 + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
15518 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
15519 + { (exit 1); exit 1; }; }
15522 +# test whether we have cygpath
15523 +if test -z "$CYGPATH_W"; then
15524 + if (cygpath --version) >/dev/null 2>/dev/null; then
15525 + CYGPATH_W='cygpath -w'
15532 +# Define the identity of the package.
15533 + PACKAGE='convert'
15537 +cat >>confdefs.h <<_ACEOF
15538 +#define PACKAGE "$PACKAGE"
15542 +cat >>confdefs.h <<_ACEOF
15543 +#define VERSION "$VERSION"
15546 +# Some tools Automake needs.
15548 +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
15551 +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
15554 +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
15557 +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
15560 +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
15562 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
15564 +# Installed binaries are usually stripped using `strip' when the user
15565 +# run `make install-strip'. However `strip' might not be the right
15566 +# tool to use in cross-compilation environments, therefore Automake
15567 +# will honor the `STRIP' environment variable to overrule this program.
15568 +if test "$cross_compiling" != no; then
15569 + if test -n "$ac_tool_prefix"; then
15570 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
15571 +set dummy ${ac_tool_prefix}strip; ac_word=$2
15572 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15573 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15574 +if test "${ac_cv_prog_STRIP+set}" = set; then
15575 + echo $ECHO_N "(cached) $ECHO_C" >&6
15577 + if test -n "$STRIP"; then
15578 + ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
15580 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15581 +for as_dir in $PATH
15584 + test -z "$as_dir" && as_dir=.
15585 + for ac_exec_ext in '' $ac_executable_extensions; do
15586 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15587 + ac_cv_prog_STRIP="${ac_tool_prefix}strip"
15588 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15597 +STRIP=$ac_cv_prog_STRIP
15598 +if test -n "$STRIP"; then
15599 + { echo "$as_me:$LINENO: result: $STRIP" >&5
15600 +echo "${ECHO_T}$STRIP" >&6; }
15602 + { echo "$as_me:$LINENO: result: no" >&5
15603 +echo "${ECHO_T}no" >&6; }
15608 +if test -z "$ac_cv_prog_STRIP"; then
15609 + ac_ct_STRIP=$STRIP
15610 + # Extract the first word of "strip", so it can be a program name with args.
15611 +set dummy strip; ac_word=$2
15612 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15613 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15614 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
15615 + echo $ECHO_N "(cached) $ECHO_C" >&6
15617 + if test -n "$ac_ct_STRIP"; then
15618 + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
15620 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15621 +for as_dir in $PATH
15624 + test -z "$as_dir" && as_dir=.
15625 + for ac_exec_ext in '' $ac_executable_extensions; do
15626 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15627 + ac_cv_prog_ac_ct_STRIP="strip"
15628 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15637 +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
15638 +if test -n "$ac_ct_STRIP"; then
15639 + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
15640 +echo "${ECHO_T}$ac_ct_STRIP" >&6; }
15642 + { echo "$as_me:$LINENO: result: no" >&5
15643 +echo "${ECHO_T}no" >&6; }
15646 + if test "x$ac_ct_STRIP" = x; then
15649 + case $cross_compiling:$ac_tool_warned in
15651 +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15652 +whose name does not start with the host triplet. If you think this
15653 +configuration is useful to you, please write to autoconf@gnu.org." >&5
15654 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15655 +whose name does not start with the host triplet. If you think this
15656 +configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15657 +ac_tool_warned=yes ;;
15659 + STRIP=$ac_ct_STRIP
15662 + STRIP="$ac_cv_prog_STRIP"
15666 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
15668 +# We need awk for the "check" target. The system "awk" is bad on
15670 +# Always define AMTAR for backward compatibility.
15672 +AMTAR=${AMTAR-"${am_missing_run}tar"}
15674 +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
15684 +ac_cpp='$CPP $CPPFLAGS'
15685 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15686 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15687 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
15688 +if test -n "$ac_tool_prefix"; then
15689 + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
15690 +set dummy ${ac_tool_prefix}gcc; ac_word=$2
15691 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15692 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15693 +if test "${ac_cv_prog_CC+set}" = set; then
15694 + echo $ECHO_N "(cached) $ECHO_C" >&6
15696 + if test -n "$CC"; then
15697 + ac_cv_prog_CC="$CC" # Let the user override the test.
15699 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15700 +for as_dir in $PATH
15703 + test -z "$as_dir" && as_dir=.
15704 + for ac_exec_ext in '' $ac_executable_extensions; do
15705 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15706 + ac_cv_prog_CC="${ac_tool_prefix}gcc"
15707 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15717 +if test -n "$CC"; then
15718 + { echo "$as_me:$LINENO: result: $CC" >&5
15719 +echo "${ECHO_T}$CC" >&6; }
15721 + { echo "$as_me:$LINENO: result: no" >&5
15722 +echo "${ECHO_T}no" >&6; }
15727 +if test -z "$ac_cv_prog_CC"; then
15729 + # Extract the first word of "gcc", so it can be a program name with args.
15730 +set dummy gcc; ac_word=$2
15731 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15732 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15733 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
15734 + echo $ECHO_N "(cached) $ECHO_C" >&6
15736 + if test -n "$ac_ct_CC"; then
15737 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
15739 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15740 +for as_dir in $PATH
15743 + test -z "$as_dir" && as_dir=.
15744 + for ac_exec_ext in '' $ac_executable_extensions; do
15745 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15746 + ac_cv_prog_ac_ct_CC="gcc"
15747 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15756 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
15757 +if test -n "$ac_ct_CC"; then
15758 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
15759 +echo "${ECHO_T}$ac_ct_CC" >&6; }
15761 + { echo "$as_me:$LINENO: result: no" >&5
15762 +echo "${ECHO_T}no" >&6; }
15765 + if test "x$ac_ct_CC" = x; then
15768 + case $cross_compiling:$ac_tool_warned in
15770 +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15771 +whose name does not start with the host triplet. If you think this
15772 +configuration is useful to you, please write to autoconf@gnu.org." >&5
15773 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15774 +whose name does not start with the host triplet. If you think this
15775 +configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15776 +ac_tool_warned=yes ;;
15781 + CC="$ac_cv_prog_CC"
15784 +if test -z "$CC"; then
15785 + if test -n "$ac_tool_prefix"; then
15786 + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
15787 +set dummy ${ac_tool_prefix}cc; ac_word=$2
15788 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15789 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15790 +if test "${ac_cv_prog_CC+set}" = set; then
15791 + echo $ECHO_N "(cached) $ECHO_C" >&6
15793 + if test -n "$CC"; then
15794 + ac_cv_prog_CC="$CC" # Let the user override the test.
15796 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15797 +for as_dir in $PATH
15800 + test -z "$as_dir" && as_dir=.
15801 + for ac_exec_ext in '' $ac_executable_extensions; do
15802 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15803 + ac_cv_prog_CC="${ac_tool_prefix}cc"
15804 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15814 +if test -n "$CC"; then
15815 + { echo "$as_me:$LINENO: result: $CC" >&5
15816 +echo "${ECHO_T}$CC" >&6; }
15818 + { echo "$as_me:$LINENO: result: no" >&5
15819 +echo "${ECHO_T}no" >&6; }
15825 +if test -z "$CC"; then
15826 + # Extract the first word of "cc", so it can be a program name with args.
15827 +set dummy cc; ac_word=$2
15828 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15829 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15830 +if test "${ac_cv_prog_CC+set}" = set; then
15831 + echo $ECHO_N "(cached) $ECHO_C" >&6
15833 + if test -n "$CC"; then
15834 + ac_cv_prog_CC="$CC" # Let the user override the test.
15836 + ac_prog_rejected=no
15837 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15838 +for as_dir in $PATH
15841 + test -z "$as_dir" && as_dir=.
15842 + for ac_exec_ext in '' $ac_executable_extensions; do
15843 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15844 + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
15845 + ac_prog_rejected=yes
15848 + ac_cv_prog_CC="cc"
15849 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15856 +if test $ac_prog_rejected = yes; then
15857 + # We found a bogon in the path, so make sure we never use it.
15858 + set dummy $ac_cv_prog_CC
15860 + if test $# != 0; then
15861 + # We chose a different compiler from the bogus one.
15862 + # However, it has the same basename, so the bogon will be chosen
15863 + # first if we set CC to just the basename; use the full file name.
15865 + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
15871 +if test -n "$CC"; then
15872 + { echo "$as_me:$LINENO: result: $CC" >&5
15873 +echo "${ECHO_T}$CC" >&6; }
15875 + { echo "$as_me:$LINENO: result: no" >&5
15876 +echo "${ECHO_T}no" >&6; }
15881 +if test -z "$CC"; then
15882 + if test -n "$ac_tool_prefix"; then
15883 + for ac_prog in cl.exe
15885 + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15886 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15887 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15888 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15889 +if test "${ac_cv_prog_CC+set}" = set; then
15890 + echo $ECHO_N "(cached) $ECHO_C" >&6
15892 + if test -n "$CC"; then
15893 + ac_cv_prog_CC="$CC" # Let the user override the test.
15895 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15896 +for as_dir in $PATH
15899 + test -z "$as_dir" && as_dir=.
15900 + for ac_exec_ext in '' $ac_executable_extensions; do
15901 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15902 + ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
15903 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15913 +if test -n "$CC"; then
15914 + { echo "$as_me:$LINENO: result: $CC" >&5
15915 +echo "${ECHO_T}$CC" >&6; }
15917 + { echo "$as_me:$LINENO: result: no" >&5
15918 +echo "${ECHO_T}no" >&6; }
15922 + test -n "$CC" && break
15925 +if test -z "$CC"; then
15927 + for ac_prog in cl.exe
15929 + # Extract the first word of "$ac_prog", so it can be a program name with args.
15930 +set dummy $ac_prog; ac_word=$2
15931 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15932 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15933 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
15934 + echo $ECHO_N "(cached) $ECHO_C" >&6
15936 + if test -n "$ac_ct_CC"; then
15937 + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
15939 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15940 +for as_dir in $PATH
15943 + test -z "$as_dir" && as_dir=.
15944 + for ac_exec_ext in '' $ac_executable_extensions; do
15945 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15946 + ac_cv_prog_ac_ct_CC="$ac_prog"
15947 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15956 +ac_ct_CC=$ac_cv_prog_ac_ct_CC
15957 +if test -n "$ac_ct_CC"; then
15958 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
15959 +echo "${ECHO_T}$ac_ct_CC" >&6; }
15961 + { echo "$as_me:$LINENO: result: no" >&5
15962 +echo "${ECHO_T}no" >&6; }
15966 + test -n "$ac_ct_CC" && break
15969 + if test "x$ac_ct_CC" = x; then
15972 + case $cross_compiling:$ac_tool_warned in
15974 +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15975 +whose name does not start with the host triplet. If you think this
15976 +configuration is useful to you, please write to autoconf@gnu.org." >&5
15977 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15978 +whose name does not start with the host triplet. If you think this
15979 +configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15980 +ac_tool_warned=yes ;;
15989 +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
15990 +See \`config.log' for more details." >&5
15991 +echo "$as_me: error: no acceptable C compiler found in \$PATH
15992 +See \`config.log' for more details." >&2;}
15993 + { (exit 1); exit 1; }; }
15995 +# Provide some information about the compiler.
15996 +echo "$as_me:$LINENO: checking for C compiler version" >&5
15997 +ac_compiler=`set X $ac_compile; echo $2`
15998 +{ (ac_try="$ac_compiler --version >&5"
15999 +case "(($ac_try" in
16000 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16001 + *) ac_try_echo=$ac_try;;
16003 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16004 + (eval "$ac_compiler --version >&5") 2>&5
16006 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16007 + (exit $ac_status); }
16008 +{ (ac_try="$ac_compiler -v >&5"
16009 +case "(($ac_try" in
16010 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16011 + *) ac_try_echo=$ac_try;;
16013 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16014 + (eval "$ac_compiler -v >&5") 2>&5
16016 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16017 + (exit $ac_status); }
16018 +{ (ac_try="$ac_compiler -V >&5"
16019 +case "(($ac_try" in
16020 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16021 + *) ac_try_echo=$ac_try;;
16023 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16024 + (eval "$ac_compiler -V >&5") 2>&5
16026 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 + (exit $ac_status); }
16029 +cat >conftest.$ac_ext <<_ACEOF
16032 +cat confdefs.h >>conftest.$ac_ext
16033 +cat >>conftest.$ac_ext <<_ACEOF
16034 +/* end confdefs.h. */
16044 +ac_clean_files_save=$ac_clean_files
16045 +ac_clean_files="$ac_clean_files a.out a.exe b.out"
16046 +# Try to create an executable without -o first, disregard a.out.
16047 +# It will help us diagnose broken compilers, and finding out an intuition
16049 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
16050 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
16051 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
16053 +# List of possible output files, starting from the most likely.
16054 +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
16055 +# only as a last resort. b.out is created by i960 compilers.
16056 +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
16058 +# The IRIX 6 linker writes into existing files which may not be
16059 +# executable, retaining their permissions. Remove them first so a
16060 +# subsequent execution test works.
16062 +for ac_file in $ac_files
16065 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
16066 + * ) ac_rmfiles="$ac_rmfiles $ac_file";;
16071 +if { (ac_try="$ac_link_default"
16072 +case "(($ac_try" in
16073 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16074 + *) ac_try_echo=$ac_try;;
16076 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16077 + (eval "$ac_link_default") 2>&5
16079 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16080 + (exit $ac_status); }; then
16081 + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
16082 +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
16083 +# in a Makefile. We should not override ac_cv_exeext if it was cached,
16084 +# so that the user can short-circuit this test for compilers unknown to
16086 +for ac_file in $ac_files ''
16088 + test -f "$ac_file" || continue
16090 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
16093 + # We found the default executable, but exeext='' is most
16094 + # certainly right.
16097 + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
16099 + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
16101 + # We set ac_cv_exeext here because the later test for it is not
16102 + # safe: cross compilers may not add the suffix if given an `-o'
16103 + # argument, so we may need to know it at that point already.
16104 + # Even if this section looks crufty: it has the advantage of
16105 + # actually working.
16111 +test "$ac_cv_exeext" = no && ac_cv_exeext=
16117 +{ echo "$as_me:$LINENO: result: $ac_file" >&5
16118 +echo "${ECHO_T}$ac_file" >&6; }
16119 +if test -z "$ac_file"; then
16120 + echo "$as_me: failed program was:" >&5
16121 +sed 's/^/| /' conftest.$ac_ext >&5
16123 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
16124 +See \`config.log' for more details." >&5
16125 +echo "$as_me: error: C compiler cannot create executables
16126 +See \`config.log' for more details." >&2;}
16127 + { (exit 77); exit 77; }; }
16130 +ac_exeext=$ac_cv_exeext
16132 +# Check that the compiler produces executables we can run. If not, either
16133 +# the compiler is broken, or we cross compile.
16134 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
16135 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
16136 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
16137 +# If not cross compiling, check that we can run a simple program.
16138 +if test "$cross_compiling" != yes; then
16139 + if { ac_try='./$ac_file'
16140 + { (case "(($ac_try" in
16141 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16142 + *) ac_try_echo=$ac_try;;
16144 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16145 + (eval "$ac_try") 2>&5
16147 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16148 + (exit $ac_status); }; }; then
16149 + cross_compiling=no
16151 + if test "$cross_compiling" = maybe; then
16152 + cross_compiling=yes
16154 + { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
16155 +If you meant to cross compile, use \`--host'.
16156 +See \`config.log' for more details." >&5
16157 +echo "$as_me: error: cannot run C compiled programs.
16158 +If you meant to cross compile, use \`--host'.
16159 +See \`config.log' for more details." >&2;}
16160 + { (exit 1); exit 1; }; }
16164 +{ echo "$as_me:$LINENO: result: yes" >&5
16165 +echo "${ECHO_T}yes" >&6; }
16167 +rm -f a.out a.exe conftest$ac_cv_exeext b.out
16168 +ac_clean_files=$ac_clean_files_save
16169 +# Check that the compiler produces executables we can run. If not, either
16170 +# the compiler is broken, or we cross compile.
16171 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
16172 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
16173 +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
16174 +echo "${ECHO_T}$cross_compiling" >&6; }
16176 +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
16177 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
16178 +if { (ac_try="$ac_link"
16179 +case "(($ac_try" in
16180 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16181 + *) ac_try_echo=$ac_try;;
16183 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16184 + (eval "$ac_link") 2>&5
16186 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16187 + (exit $ac_status); }; then
16188 + # If both `conftest.exe' and `conftest' are `present' (well, observable)
16189 +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
16190 +# work properly (i.e., refer to `conftest.exe'), while it won't with
16192 +for ac_file in conftest.exe conftest conftest.*; do
16193 + test -f "$ac_file" || continue
16195 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
16196 + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
16202 + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
16203 +See \`config.log' for more details." >&5
16204 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
16205 +See \`config.log' for more details." >&2;}
16206 + { (exit 1); exit 1; }; }
16209 +rm -f conftest$ac_cv_exeext
16210 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
16211 +echo "${ECHO_T}$ac_cv_exeext" >&6; }
16213 +rm -f conftest.$ac_ext
16214 +EXEEXT=$ac_cv_exeext
16216 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
16217 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
16218 +if test "${ac_cv_objext+set}" = set; then
16219 + echo $ECHO_N "(cached) $ECHO_C" >&6
16221 + cat >conftest.$ac_ext <<_ACEOF
16224 +cat confdefs.h >>conftest.$ac_ext
16225 +cat >>conftest.$ac_ext <<_ACEOF
16226 +/* end confdefs.h. */
16236 +rm -f conftest.o conftest.obj
16237 +if { (ac_try="$ac_compile"
16238 +case "(($ac_try" in
16239 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16240 + *) ac_try_echo=$ac_try;;
16242 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16243 + (eval "$ac_compile") 2>&5
16245 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16246 + (exit $ac_status); }; then
16247 + for ac_file in conftest.o conftest.obj conftest.*; do
16248 + test -f "$ac_file" || continue;
16250 + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
16251 + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
16256 + echo "$as_me: failed program was:" >&5
16257 +sed 's/^/| /' conftest.$ac_ext >&5
16259 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
16260 +See \`config.log' for more details." >&5
16261 +echo "$as_me: error: cannot compute suffix of object files: cannot compile
16262 +See \`config.log' for more details." >&2;}
16263 + { (exit 1); exit 1; }; }
16266 +rm -f conftest.$ac_cv_objext conftest.$ac_ext
16268 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
16269 +echo "${ECHO_T}$ac_cv_objext" >&6; }
16270 +OBJEXT=$ac_cv_objext
16272 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
16273 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
16274 +if test "${ac_cv_c_compiler_gnu+set}" = set; then
16275 + echo $ECHO_N "(cached) $ECHO_C" >&6
16277 + cat >conftest.$ac_ext <<_ACEOF
16280 +cat confdefs.h >>conftest.$ac_ext
16281 +cat >>conftest.$ac_ext <<_ACEOF
16282 +/* end confdefs.h. */
16295 +rm -f conftest.$ac_objext
16296 +if { (ac_try="$ac_compile"
16297 +case "(($ac_try" in
16298 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16299 + *) ac_try_echo=$ac_try;;
16301 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16302 + (eval "$ac_compile") 2>conftest.er1
16304 + grep -v '^ *+' conftest.er1 >conftest.err
16305 + rm -f conftest.er1
16306 + cat conftest.err >&5
16307 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16308 + (exit $ac_status); } && {
16309 + test -z "$ac_c_werror_flag" ||
16310 + test ! -s conftest.err
16311 + } && test -s conftest.$ac_objext; then
16312 + ac_compiler_gnu=yes
16314 + echo "$as_me: failed program was:" >&5
16315 +sed 's/^/| /' conftest.$ac_ext >&5
16317 + ac_compiler_gnu=no
16320 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16321 +ac_cv_c_compiler_gnu=$ac_compiler_gnu
16324 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
16325 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
16326 +GCC=`test $ac_compiler_gnu = yes && echo yes`
16327 +ac_test_CFLAGS=${CFLAGS+set}
16328 +ac_save_CFLAGS=$CFLAGS
16329 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
16330 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
16331 +if test "${ac_cv_prog_cc_g+set}" = set; then
16332 + echo $ECHO_N "(cached) $ECHO_C" >&6
16334 + ac_save_c_werror_flag=$ac_c_werror_flag
16335 + ac_c_werror_flag=yes
16336 + ac_cv_prog_cc_g=no
16338 + cat >conftest.$ac_ext <<_ACEOF
16341 +cat confdefs.h >>conftest.$ac_ext
16342 +cat >>conftest.$ac_ext <<_ACEOF
16343 +/* end confdefs.h. */
16353 +rm -f conftest.$ac_objext
16354 +if { (ac_try="$ac_compile"
16355 +case "(($ac_try" in
16356 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16357 + *) ac_try_echo=$ac_try;;
16359 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16360 + (eval "$ac_compile") 2>conftest.er1
16362 + grep -v '^ *+' conftest.er1 >conftest.err
16363 + rm -f conftest.er1
16364 + cat conftest.err >&5
16365 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16366 + (exit $ac_status); } && {
16367 + test -z "$ac_c_werror_flag" ||
16368 + test ! -s conftest.err
16369 + } && test -s conftest.$ac_objext; then
16370 + ac_cv_prog_cc_g=yes
16372 + echo "$as_me: failed program was:" >&5
16373 +sed 's/^/| /' conftest.$ac_ext >&5
16376 + cat >conftest.$ac_ext <<_ACEOF
16379 +cat confdefs.h >>conftest.$ac_ext
16380 +cat >>conftest.$ac_ext <<_ACEOF
16381 +/* end confdefs.h. */
16391 +rm -f conftest.$ac_objext
16392 +if { (ac_try="$ac_compile"
16393 +case "(($ac_try" in
16394 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16395 + *) ac_try_echo=$ac_try;;
16397 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16398 + (eval "$ac_compile") 2>conftest.er1
16400 + grep -v '^ *+' conftest.er1 >conftest.err
16401 + rm -f conftest.er1
16402 + cat conftest.err >&5
16403 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16404 + (exit $ac_status); } && {
16405 + test -z "$ac_c_werror_flag" ||
16406 + test ! -s conftest.err
16407 + } && test -s conftest.$ac_objext; then
16410 + echo "$as_me: failed program was:" >&5
16411 +sed 's/^/| /' conftest.$ac_ext >&5
16413 + ac_c_werror_flag=$ac_save_c_werror_flag
16415 + cat >conftest.$ac_ext <<_ACEOF
16418 +cat confdefs.h >>conftest.$ac_ext
16419 +cat >>conftest.$ac_ext <<_ACEOF
16420 +/* end confdefs.h. */
16430 +rm -f conftest.$ac_objext
16431 +if { (ac_try="$ac_compile"
16432 +case "(($ac_try" in
16433 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16434 + *) ac_try_echo=$ac_try;;
16436 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16437 + (eval "$ac_compile") 2>conftest.er1
16439 + grep -v '^ *+' conftest.er1 >conftest.err
16440 + rm -f conftest.er1
16441 + cat conftest.err >&5
16442 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16443 + (exit $ac_status); } && {
16444 + test -z "$ac_c_werror_flag" ||
16445 + test ! -s conftest.err
16446 + } && test -s conftest.$ac_objext; then
16447 + ac_cv_prog_cc_g=yes
16449 + echo "$as_me: failed program was:" >&5
16450 +sed 's/^/| /' conftest.$ac_ext >&5
16455 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16458 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16461 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16462 + ac_c_werror_flag=$ac_save_c_werror_flag
16464 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
16465 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
16466 +if test "$ac_test_CFLAGS" = set; then
16467 + CFLAGS=$ac_save_CFLAGS
16468 +elif test $ac_cv_prog_cc_g = yes; then
16469 + if test "$GCC" = yes; then
16475 + if test "$GCC" = yes; then
16481 +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
16482 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
16483 +if test "${ac_cv_prog_cc_c89+set}" = set; then
16484 + echo $ECHO_N "(cached) $ECHO_C" >&6
16486 + ac_cv_prog_cc_c89=no
16488 +cat >conftest.$ac_ext <<_ACEOF
16491 +cat confdefs.h >>conftest.$ac_ext
16492 +cat >>conftest.$ac_ext <<_ACEOF
16493 +/* end confdefs.h. */
16494 +#include <stdarg.h>
16495 +#include <stdio.h>
16496 +#include <sys/types.h>
16497 +#include <sys/stat.h>
16498 +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
16499 +struct buf { int x; };
16500 +FILE * (*rcsopen) (struct buf *, struct stat *, int);
16501 +static char *e (p, i)
16507 +static char *f (char * (*g) (char **, int), char **p, ...)
16512 + s = g (p, va_arg (v,int));
16517 +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
16518 + function prototypes and stuff, but not '\xHH' hex character constants.
16519 + These don't provoke an error unfortunately, instead are silently treated
16520 + as 'x'. The following induces an error, until -std is added to get
16521 + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
16522 + array size at least. It's necessary to write '\x00'==0 to get something
16523 + that's true only with -std. */
16524 +int osf4_cc_array ['\x00' == 0 ? 1 : -1];
16526 +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
16527 + inside strings and character constants. */
16528 +#define FOO(x) 'x'
16529 +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
16531 +int test (int i, double x);
16532 +struct s1 {int (*f) (int a);};
16533 +struct s2 {int (*f) (double a);};
16534 +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
16540 +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
16545 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
16546 + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
16548 + CC="$ac_save_CC $ac_arg"
16549 + rm -f conftest.$ac_objext
16550 +if { (ac_try="$ac_compile"
16551 +case "(($ac_try" in
16552 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16553 + *) ac_try_echo=$ac_try;;
16555 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16556 + (eval "$ac_compile") 2>conftest.er1
16558 + grep -v '^ *+' conftest.er1 >conftest.err
16559 + rm -f conftest.er1
16560 + cat conftest.err >&5
16561 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16562 + (exit $ac_status); } && {
16563 + test -z "$ac_c_werror_flag" ||
16564 + test ! -s conftest.err
16565 + } && test -s conftest.$ac_objext; then
16566 + ac_cv_prog_cc_c89=$ac_arg
16568 + echo "$as_me: failed program was:" >&5
16569 +sed 's/^/| /' conftest.$ac_ext >&5
16574 +rm -f core conftest.err conftest.$ac_objext
16575 + test "x$ac_cv_prog_cc_c89" != "xno" && break
16577 +rm -f conftest.$ac_ext
16582 +case "x$ac_cv_prog_cc_c89" in
16584 + { echo "$as_me:$LINENO: result: none needed" >&5
16585 +echo "${ECHO_T}none needed" >&6; } ;;
16587 + { echo "$as_me:$LINENO: result: unsupported" >&5
16588 +echo "${ECHO_T}unsupported" >&6; } ;;
16590 + CC="$CC $ac_cv_prog_cc_c89"
16591 + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
16592 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
16597 +ac_cpp='$CPP $CPPFLAGS'
16598 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16599 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16600 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
16601 +DEPDIR="${am__leading_dot}deps"
16603 +ac_config_commands="$ac_config_commands depfiles"
16606 +am_make=${MAKE-make}
16607 +cat > confinc << 'END'
16612 +# If we don't find an include directive, just comment out the code.
16613 +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
16614 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
16618 +# First try GNU make style include.
16619 +echo "include confinc" > confmf
16620 +# We grep out `Entering directory' and `Leaving directory'
16621 +# messages which can occur if `w' ends up in MAKEFLAGS.
16622 +# In particular we don't look at `^make:' because GNU make might
16623 +# be invoked under some other name (usually "gmake"), in which
16624 +# case it prints its new name instead of `make'.
16625 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
16626 + am__include=include
16630 +# Now try BSD make style include.
16631 +if test "$am__include" = "#"; then
16632 + echo '.include "confinc"' > confmf
16633 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
16634 + am__include=.include
16641 +{ echo "$as_me:$LINENO: result: $_am_result" >&5
16642 +echo "${ECHO_T}$_am_result" >&6; }
16643 +rm -f confinc confmf
16645 +# Check whether --enable-dependency-tracking was given.
16646 +if test "${enable_dependency_tracking+set}" = set; then
16647 + enableval=$enable_dependency_tracking;
16650 +if test "x$enable_dependency_tracking" != xno; then
16651 + am_depcomp="$ac_aux_dir/depcomp"
16652 + AMDEPBACKSLASH='\'
16656 +if test "x$enable_dependency_tracking" != xno; then
16667 +depcc="$CC" am_compiler_list=
16669 +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
16670 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
16671 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
16672 + echo $ECHO_N "(cached) $ECHO_C" >&6
16674 + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
16675 + # We make a subdir and do the tests there. Otherwise we can end up
16676 + # making bogus files that we don't know about and never remove. For
16677 + # instance it was reported that on HP-UX the gcc test will end up
16678 + # making a dummy file named `D' -- because `-MD' means `put the output
16680 + mkdir conftest.dir
16681 + # Copy depcomp to subdir because otherwise we won't find it if we're
16682 + # using a relative directory.
16683 + cp "$am_depcomp" conftest.dir
16685 + # We will build objects and dependencies in a subdirectory because
16686 + # it helps to detect inapplicable dependency modes. For instance
16687 + # both Tru64's cc and ICC support -MD to output dependencies as a
16688 + # side effect of compilation, but ICC will put the dependencies in
16689 + # the current directory while Tru64 will put them in the object
16693 + am_cv_CC_dependencies_compiler_type=none
16694 + if test "$am_compiler_list" = ""; then
16695 + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
16697 + for depmode in $am_compiler_list; do
16698 + # Setup a source with many dependencies, because some compilers
16699 + # like to wrap large dependency lists on column 80 (with \), and
16700 + # we should not choose a depcomp mode which is confused by this.
16702 + # We need to recreate these files for each test, as the compiler may
16703 + # overwrite some of them when testing with obscure command lines.
16704 + # This happens at least with the AIX C compiler.
16705 + : > sub/conftest.c
16706 + for i in 1 2 3 4 5 6; do
16707 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
16708 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
16709 + # Solaris 8's {/usr,}/bin/sh.
16710 + touch sub/conftst$i.h
16712 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
16716 + # after this tag, mechanisms are not by side-effect, so they'll
16717 + # only be used when explicitly requested
16718 + if test "x$enable_dependency_tracking" = xyes; then
16726 + # We check with `-c' and `-o' for the sake of the "dashmstdout"
16727 + # mode. It turns out that the SunPro C++ compiler does not properly
16728 + # handle `-M -o', and we need to detect this.
16729 + if depmode=$depmode \
16730 + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
16731 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
16732 + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
16733 + >/dev/null 2>conftest.err &&
16734 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
16735 + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
16736 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
16737 + # icc doesn't choke on unknown options, it will just issue warnings
16738 + # or remarks (even with -Werror). So we grep stderr for any message
16739 + # that says an option was ignored or not supported.
16740 + # When given -MP, icc 7.0 and 7.1 complain thusly:
16741 + # icc: Command line warning: ignoring option '-M'; no argument required
16742 + # The diagnosis changed in icc 8.0:
16743 + # icc: Command line remark: option '-MP' not supported
16744 + if (grep 'ignoring option' conftest.err ||
16745 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
16746 + am_cv_CC_dependencies_compiler_type=$depmode
16753 + rm -rf conftest.dir
16755 + am_cv_CC_dependencies_compiler_type=none
16759 +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
16760 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
16761 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
16766 + test "x$enable_dependency_tracking" != xno \
16767 + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
16768 + am__fastdepCC_TRUE=
16769 + am__fastdepCC_FALSE='#'
16771 + am__fastdepCC_TRUE='#'
16772 + am__fastdepCC_FALSE=
16776 +# Find a good install program. We prefer a C program (faster),
16777 +# so one script is as good as another. But avoid the broken or
16778 +# incompatible versions:
16779 +# SysV /etc/install, /usr/sbin/install
16780 +# SunOS /usr/etc/install
16781 +# IRIX /sbin/install
16782 +# AIX /bin/install
16783 +# AmigaOS /C/install, which installs bootblocks on floppy discs
16784 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
16785 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
16786 +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
16787 +# OS/2's system install, which has a completely different semantic
16788 +# ./install, which can be erroneously created by make from ./install.sh.
16789 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
16790 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
16791 +if test -z "$INSTALL"; then
16792 +if test "${ac_cv_path_install+set}" = set; then
16793 + echo $ECHO_N "(cached) $ECHO_C" >&6
16795 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16796 +for as_dir in $PATH
16799 + test -z "$as_dir" && as_dir=.
16800 + # Account for people who put trailing slashes in PATH elements.
16802 + ./ | .// | /cC/* | \
16803 + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
16804 + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
16807 + # OSF1 and SCO ODT 3.0 have their own names for install.
16808 + # Don't use installbsd from OSF since it installs stuff as root
16810 + for ac_prog in ginstall scoinst install; do
16811 + for ac_exec_ext in '' $ac_executable_extensions; do
16812 + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
16813 + if test $ac_prog = install &&
16814 + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
16815 + # AIX install. It has an incompatible calling convention.
16817 + elif test $ac_prog = install &&
16818 + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
16819 + # program-specific install script used by HP pwplus--don't use.
16822 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
16835 + if test "${ac_cv_path_install+set}" = set; then
16836 + INSTALL=$ac_cv_path_install
16838 + # As a last resort, use the slow shell script. Don't cache a
16839 + # value for INSTALL within a source directory, because that will
16840 + # break other packages using the cache if that directory is
16841 + # removed, or if the value is a relative name.
16842 + INSTALL=$ac_install_sh
16845 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5
16846 +echo "${ECHO_T}$INSTALL" >&6; }
16848 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
16849 +# It thinks the first close brace ends the variable substitution.
16850 +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
16852 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
16854 +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
16858 +{ echo "$as_me:$LINENO: checking for library containing strerror" >&5
16859 +echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
16860 +if test "${ac_cv_search_strerror+set}" = set; then
16861 + echo $ECHO_N "(cached) $ECHO_C" >&6
16863 + ac_func_search_save_LIBS=$LIBS
16864 +cat >conftest.$ac_ext <<_ACEOF
16867 +cat confdefs.h >>conftest.$ac_ext
16868 +cat >>conftest.$ac_ext <<_ACEOF
16869 +/* end confdefs.h. */
16871 +/* Override any GCC internal prototype to avoid an error.
16872 + Use char because int might match the return type of a GCC
16873 + builtin and then its argument prototype would still apply. */
16874 +#ifdef __cplusplus
16881 +return strerror ();
16886 +for ac_lib in '' cposix; do
16887 + if test -z "$ac_lib"; then
16888 + ac_res="none required"
16891 + LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16893 + rm -f conftest.$ac_objext conftest$ac_exeext
16894 +if { (ac_try="$ac_link"
16895 +case "(($ac_try" in
16896 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16897 + *) ac_try_echo=$ac_try;;
16899 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16900 + (eval "$ac_link") 2>conftest.er1
16902 + grep -v '^ *+' conftest.er1 >conftest.err
16903 + rm -f conftest.er1
16904 + cat conftest.err >&5
16905 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16906 + (exit $ac_status); } && {
16907 + test -z "$ac_c_werror_flag" ||
16908 + test ! -s conftest.err
16909 + } && test -s conftest$ac_exeext &&
16910 + $as_test_x conftest$ac_exeext; then
16911 + ac_cv_search_strerror=$ac_res
16913 + echo "$as_me: failed program was:" >&5
16914 +sed 's/^/| /' conftest.$ac_ext >&5
16919 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16920 + conftest$ac_exeext
16921 + if test "${ac_cv_search_strerror+set}" = set; then
16925 +if test "${ac_cv_search_strerror+set}" = set; then
16928 + ac_cv_search_strerror=no
16930 +rm conftest.$ac_ext
16931 +LIBS=$ac_func_search_save_LIBS
16933 +{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
16934 +echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
16935 +ac_res=$ac_cv_search_strerror
16936 +if test "$ac_res" != no; then
16937 + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16943 +ac_cpp='$CPP $CPPFLAGS'
16944 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16945 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16946 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
16947 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
16948 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
16949 +# On Suns, sometimes $CPP names a directory.
16950 +if test -n "$CPP" && test -d "$CPP"; then
16953 +if test -z "$CPP"; then
16954 + if test "${ac_cv_prog_CPP+set}" = set; then
16955 + echo $ECHO_N "(cached) $ECHO_C" >&6
16957 + # Double quotes because CPP needs to be expanded
16958 + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
16960 + ac_preproc_ok=false
16961 +for ac_c_preproc_warn_flag in '' yes
16963 + # Use a header file that comes with gcc, so configuring glibc
16964 + # with a fresh cross-compiler works.
16965 + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16966 + # <limits.h> exists even on freestanding compilers.
16967 + # On the NeXT, cc -E runs the code through the compiler's parser,
16968 + # not just through cpp. "Syntax error" is here to catch this case.
16969 + cat >conftest.$ac_ext <<_ACEOF
16972 +cat confdefs.h >>conftest.$ac_ext
16973 +cat >>conftest.$ac_ext <<_ACEOF
16974 +/* end confdefs.h. */
16976 +# include <limits.h>
16978 +# include <assert.h>
16982 +if { (ac_try="$ac_cpp conftest.$ac_ext"
16983 +case "(($ac_try" in
16984 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16985 + *) ac_try_echo=$ac_try;;
16987 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16988 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16990 + grep -v '^ *+' conftest.er1 >conftest.err
16991 + rm -f conftest.er1
16992 + cat conftest.err >&5
16993 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
16994 + (exit $ac_status); } >/dev/null && {
16995 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16996 + test ! -s conftest.err
17000 + echo "$as_me: failed program was:" >&5
17001 +sed 's/^/| /' conftest.$ac_ext >&5
17003 + # Broken: fails on valid input.
17007 +rm -f conftest.err conftest.$ac_ext
17009 + # OK, works on sane cases. Now check whether nonexistent headers
17010 + # can be detected and how.
17011 + cat >conftest.$ac_ext <<_ACEOF
17014 +cat confdefs.h >>conftest.$ac_ext
17015 +cat >>conftest.$ac_ext <<_ACEOF
17016 +/* end confdefs.h. */
17017 +#include <ac_nonexistent.h>
17019 +if { (ac_try="$ac_cpp conftest.$ac_ext"
17020 +case "(($ac_try" in
17021 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17022 + *) ac_try_echo=$ac_try;;
17024 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17025 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17027 + grep -v '^ *+' conftest.er1 >conftest.err
17028 + rm -f conftest.er1
17029 + cat conftest.err >&5
17030 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17031 + (exit $ac_status); } >/dev/null && {
17032 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17033 + test ! -s conftest.err
17035 + # Broken: success on invalid input.
17038 + echo "$as_me: failed program was:" >&5
17039 +sed 's/^/| /' conftest.$ac_ext >&5
17041 + # Passes both tests.
17046 +rm -f conftest.err conftest.$ac_ext
17049 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17050 +rm -f conftest.err conftest.$ac_ext
17051 +if $ac_preproc_ok; then
17056 + ac_cv_prog_CPP=$CPP
17059 + CPP=$ac_cv_prog_CPP
17061 + ac_cv_prog_CPP=$CPP
17063 +{ echo "$as_me:$LINENO: result: $CPP" >&5
17064 +echo "${ECHO_T}$CPP" >&6; }
17065 +ac_preproc_ok=false
17066 +for ac_c_preproc_warn_flag in '' yes
17068 + # Use a header file that comes with gcc, so configuring glibc
17069 + # with a fresh cross-compiler works.
17070 + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17071 + # <limits.h> exists even on freestanding compilers.
17072 + # On the NeXT, cc -E runs the code through the compiler's parser,
17073 + # not just through cpp. "Syntax error" is here to catch this case.
17074 + cat >conftest.$ac_ext <<_ACEOF
17077 +cat confdefs.h >>conftest.$ac_ext
17078 +cat >>conftest.$ac_ext <<_ACEOF
17079 +/* end confdefs.h. */
17081 +# include <limits.h>
17083 +# include <assert.h>
17087 +if { (ac_try="$ac_cpp conftest.$ac_ext"
17088 +case "(($ac_try" in
17089 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17090 + *) ac_try_echo=$ac_try;;
17092 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17093 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17095 + grep -v '^ *+' conftest.er1 >conftest.err
17096 + rm -f conftest.er1
17097 + cat conftest.err >&5
17098 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17099 + (exit $ac_status); } >/dev/null && {
17100 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17101 + test ! -s conftest.err
17105 + echo "$as_me: failed program was:" >&5
17106 +sed 's/^/| /' conftest.$ac_ext >&5
17108 + # Broken: fails on valid input.
17112 +rm -f conftest.err conftest.$ac_ext
17114 + # OK, works on sane cases. Now check whether nonexistent headers
17115 + # can be detected and how.
17116 + cat >conftest.$ac_ext <<_ACEOF
17119 +cat confdefs.h >>conftest.$ac_ext
17120 +cat >>conftest.$ac_ext <<_ACEOF
17121 +/* end confdefs.h. */
17122 +#include <ac_nonexistent.h>
17124 +if { (ac_try="$ac_cpp conftest.$ac_ext"
17125 +case "(($ac_try" in
17126 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17127 + *) ac_try_echo=$ac_try;;
17129 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17130 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17132 + grep -v '^ *+' conftest.er1 >conftest.err
17133 + rm -f conftest.er1
17134 + cat conftest.err >&5
17135 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17136 + (exit $ac_status); } >/dev/null && {
17137 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17138 + test ! -s conftest.err
17140 + # Broken: success on invalid input.
17143 + echo "$as_me: failed program was:" >&5
17144 +sed 's/^/| /' conftest.$ac_ext >&5
17146 + # Passes both tests.
17151 +rm -f conftest.err conftest.$ac_ext
17154 +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17155 +rm -f conftest.err conftest.$ac_ext
17156 +if $ac_preproc_ok; then
17159 + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
17160 +See \`config.log' for more details." >&5
17161 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
17162 +See \`config.log' for more details." >&2;}
17163 + { (exit 1); exit 1; }; }
17167 +ac_cpp='$CPP $CPPFLAGS'
17168 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17169 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17170 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
17173 +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
17174 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
17175 +if test "${ac_cv_path_GREP+set}" = set; then
17176 + echo $ECHO_N "(cached) $ECHO_C" >&6
17178 + # Extract the first word of "grep ggrep" to use in msg output
17179 +if test -z "$GREP"; then
17180 +set dummy grep ggrep; ac_prog_name=$2
17181 +if test "${ac_cv_path_GREP+set}" = set; then
17182 + echo $ECHO_N "(cached) $ECHO_C" >&6
17184 + ac_path_GREP_found=false
17185 +# Loop through the user's path and test for each of PROGNAME-LIST
17186 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17187 +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
17190 + test -z "$as_dir" && as_dir=.
17191 + for ac_prog in grep ggrep; do
17192 + for ac_exec_ext in '' $ac_executable_extensions; do
17193 + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
17194 + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
17195 + # Check for GNU ac_path_GREP and select it if it is found.
17196 + # Check for GNU $ac_path_GREP
17197 +case `"$ac_path_GREP" --version 2>&1` in
17199 + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
17202 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
17205 + cat "conftest.in" "conftest.in" >"conftest.tmp"
17206 + mv "conftest.tmp" "conftest.in"
17207 + cp "conftest.in" "conftest.nl"
17208 + echo 'GREP' >> "conftest.nl"
17209 + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
17210 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
17211 + ac_count=`expr $ac_count + 1`
17212 + if test $ac_count -gt ${ac_path_GREP_max-0}; then
17213 + # Best one so far, save it but keep looking for a better one
17214 + ac_cv_path_GREP="$ac_path_GREP"
17215 + ac_path_GREP_max=$ac_count
17217 + # 10*(2^10) chars as input seems more than enough
17218 + test $ac_count -gt 10 && break
17220 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
17224 + $ac_path_GREP_found && break 3
17234 +GREP="$ac_cv_path_GREP"
17235 +if test -z "$GREP"; then
17236 + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
17237 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
17238 + { (exit 1); exit 1; }; }
17242 + ac_cv_path_GREP=$GREP
17247 +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
17248 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
17249 + GREP="$ac_cv_path_GREP"
17252 +{ echo "$as_me:$LINENO: checking for egrep" >&5
17253 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
17254 +if test "${ac_cv_path_EGREP+set}" = set; then
17255 + echo $ECHO_N "(cached) $ECHO_C" >&6
17257 + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
17258 + then ac_cv_path_EGREP="$GREP -E"
17260 + # Extract the first word of "egrep" to use in msg output
17261 +if test -z "$EGREP"; then
17262 +set dummy egrep; ac_prog_name=$2
17263 +if test "${ac_cv_path_EGREP+set}" = set; then
17264 + echo $ECHO_N "(cached) $ECHO_C" >&6
17266 + ac_path_EGREP_found=false
17267 +# Loop through the user's path and test for each of PROGNAME-LIST
17268 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17269 +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
17272 + test -z "$as_dir" && as_dir=.
17273 + for ac_prog in egrep; do
17274 + for ac_exec_ext in '' $ac_executable_extensions; do
17275 + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
17276 + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
17277 + # Check for GNU ac_path_EGREP and select it if it is found.
17278 + # Check for GNU $ac_path_EGREP
17279 +case `"$ac_path_EGREP" --version 2>&1` in
17281 + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
17284 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
17287 + cat "conftest.in" "conftest.in" >"conftest.tmp"
17288 + mv "conftest.tmp" "conftest.in"
17289 + cp "conftest.in" "conftest.nl"
17290 + echo 'EGREP' >> "conftest.nl"
17291 + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
17292 + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
17293 + ac_count=`expr $ac_count + 1`
17294 + if test $ac_count -gt ${ac_path_EGREP_max-0}; then
17295 + # Best one so far, save it but keep looking for a better one
17296 + ac_cv_path_EGREP="$ac_path_EGREP"
17297 + ac_path_EGREP_max=$ac_count
17299 + # 10*(2^10) chars as input seems more than enough
17300 + test $ac_count -gt 10 && break
17302 + rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
17306 + $ac_path_EGREP_found && break 3
17316 +EGREP="$ac_cv_path_EGREP"
17317 +if test -z "$EGREP"; then
17318 + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
17319 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
17320 + { (exit 1); exit 1; }; }
17324 + ac_cv_path_EGREP=$EGREP
17330 +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
17331 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
17332 + EGREP="$ac_cv_path_EGREP"
17335 +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
17336 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
17337 +if test "${ac_cv_header_stdc+set}" = set; then
17338 + echo $ECHO_N "(cached) $ECHO_C" >&6
17340 + cat >conftest.$ac_ext <<_ACEOF
17343 +cat confdefs.h >>conftest.$ac_ext
17344 +cat >>conftest.$ac_ext <<_ACEOF
17345 +/* end confdefs.h. */
17346 +#include <stdlib.h>
17347 +#include <stdarg.h>
17348 +#include <string.h>
17349 +#include <float.h>
17359 +rm -f conftest.$ac_objext
17360 +if { (ac_try="$ac_compile"
17361 +case "(($ac_try" in
17362 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17363 + *) ac_try_echo=$ac_try;;
17365 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17366 + (eval "$ac_compile") 2>conftest.er1
17368 + grep -v '^ *+' conftest.er1 >conftest.err
17369 + rm -f conftest.er1
17370 + cat conftest.err >&5
17371 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17372 + (exit $ac_status); } && {
17373 + test -z "$ac_c_werror_flag" ||
17374 + test ! -s conftest.err
17375 + } && test -s conftest.$ac_objext; then
17376 + ac_cv_header_stdc=yes
17378 + echo "$as_me: failed program was:" >&5
17379 +sed 's/^/| /' conftest.$ac_ext >&5
17381 + ac_cv_header_stdc=no
17384 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17386 +if test $ac_cv_header_stdc = yes; then
17387 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17388 + cat >conftest.$ac_ext <<_ACEOF
17391 +cat confdefs.h >>conftest.$ac_ext
17392 +cat >>conftest.$ac_ext <<_ACEOF
17393 +/* end confdefs.h. */
17394 +#include <string.h>
17397 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17398 + $EGREP "memchr" >/dev/null 2>&1; then
17401 + ac_cv_header_stdc=no
17407 +if test $ac_cv_header_stdc = yes; then
17408 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17409 + cat >conftest.$ac_ext <<_ACEOF
17412 +cat confdefs.h >>conftest.$ac_ext
17413 +cat >>conftest.$ac_ext <<_ACEOF
17414 +/* end confdefs.h. */
17415 +#include <stdlib.h>
17418 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17419 + $EGREP "free" >/dev/null 2>&1; then
17422 + ac_cv_header_stdc=no
17428 +if test $ac_cv_header_stdc = yes; then
17429 + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17430 + if test "$cross_compiling" = yes; then
17433 + cat >conftest.$ac_ext <<_ACEOF
17436 +cat confdefs.h >>conftest.$ac_ext
17437 +cat >>conftest.$ac_ext <<_ACEOF
17438 +/* end confdefs.h. */
17439 +#include <ctype.h>
17440 +#include <stdlib.h>
17441 +#if ((' ' & 0x0FF) == 0x020)
17442 +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17443 +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17445 +# define ISLOWER(c) \
17446 + (('a' <= (c) && (c) <= 'i') \
17447 + || ('j' <= (c) && (c) <= 'r') \
17448 + || ('s' <= (c) && (c) <= 'z'))
17449 +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17452 +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17457 + for (i = 0; i < 256; i++)
17458 + if (XOR (islower (i), ISLOWER (i))
17459 + || toupper (i) != TOUPPER (i))
17464 +rm -f conftest$ac_exeext
17465 +if { (ac_try="$ac_link"
17466 +case "(($ac_try" in
17467 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17468 + *) ac_try_echo=$ac_try;;
17470 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17471 + (eval "$ac_link") 2>&5
17473 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17474 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17475 + { (case "(($ac_try" in
17476 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17477 + *) ac_try_echo=$ac_try;;
17479 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17480 + (eval "$ac_try") 2>&5
17482 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483 + (exit $ac_status); }; }; then
17486 + echo "$as_me: program exited with status $ac_status" >&5
17487 +echo "$as_me: failed program was:" >&5
17488 +sed 's/^/| /' conftest.$ac_ext >&5
17490 +( exit $ac_status )
17491 +ac_cv_header_stdc=no
17493 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17499 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
17500 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
17501 +if test $ac_cv_header_stdc = yes; then
17503 +cat >>confdefs.h <<\_ACEOF
17504 +#define STDC_HEADERS 1
17509 +ac_config_headers="$ac_config_headers config.h"
17511 +# On IRIX 5.3, sys/types and inttypes.h are conflicting.
17521 +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
17522 + inttypes.h stdint.h unistd.h
17524 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17525 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17526 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17527 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17528 + echo $ECHO_N "(cached) $ECHO_C" >&6
17530 + cat >conftest.$ac_ext <<_ACEOF
17533 +cat confdefs.h >>conftest.$ac_ext
17534 +cat >>conftest.$ac_ext <<_ACEOF
17535 +/* end confdefs.h. */
17536 +$ac_includes_default
17538 +#include <$ac_header>
17540 +rm -f conftest.$ac_objext
17541 +if { (ac_try="$ac_compile"
17542 +case "(($ac_try" in
17543 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17544 + *) ac_try_echo=$ac_try;;
17546 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17547 + (eval "$ac_compile") 2>conftest.er1
17549 + grep -v '^ *+' conftest.er1 >conftest.err
17550 + rm -f conftest.er1
17551 + cat conftest.err >&5
17552 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17553 + (exit $ac_status); } && {
17554 + test -z "$ac_c_werror_flag" ||
17555 + test ! -s conftest.err
17556 + } && test -s conftest.$ac_objext; then
17557 + eval "$as_ac_Header=yes"
17559 + echo "$as_me: failed program was:" >&5
17560 +sed 's/^/| /' conftest.$ac_ext >&5
17562 + eval "$as_ac_Header=no"
17565 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17567 +ac_res=`eval echo '${'$as_ac_Header'}'`
17568 + { echo "$as_me:$LINENO: result: $ac_res" >&5
17569 +echo "${ECHO_T}$ac_res" >&6; }
17570 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
17571 + cat >>confdefs.h <<_ACEOF
17572 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17585 +for ac_header in stddef.h stdlib.h strings.h unistd.h limits.h
17587 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17588 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17589 + { echo "$as_me:$LINENO: checking for $ac_header" >&5
17590 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17591 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17592 + echo $ECHO_N "(cached) $ECHO_C" >&6
17594 +ac_res=`eval echo '${'$as_ac_Header'}'`
17595 + { echo "$as_me:$LINENO: result: $ac_res" >&5
17596 +echo "${ECHO_T}$ac_res" >&6; }
17598 + # Is the header compilable?
17599 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17600 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
17601 +cat >conftest.$ac_ext <<_ACEOF
17604 +cat confdefs.h >>conftest.$ac_ext
17605 +cat >>conftest.$ac_ext <<_ACEOF
17606 +/* end confdefs.h. */
17607 +$ac_includes_default
17608 +#include <$ac_header>
17610 +rm -f conftest.$ac_objext
17611 +if { (ac_try="$ac_compile"
17612 +case "(($ac_try" in
17613 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17614 + *) ac_try_echo=$ac_try;;
17616 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17617 + (eval "$ac_compile") 2>conftest.er1
17619 + grep -v '^ *+' conftest.er1 >conftest.err
17620 + rm -f conftest.er1
17621 + cat conftest.err >&5
17622 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17623 + (exit $ac_status); } && {
17624 + test -z "$ac_c_werror_flag" ||
17625 + test ! -s conftest.err
17626 + } && test -s conftest.$ac_objext; then
17627 + ac_header_compiler=yes
17629 + echo "$as_me: failed program was:" >&5
17630 +sed 's/^/| /' conftest.$ac_ext >&5
17632 + ac_header_compiler=no
17635 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17636 +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17637 +echo "${ECHO_T}$ac_header_compiler" >&6; }
17639 +# Is the header present?
17640 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17641 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
17642 +cat >conftest.$ac_ext <<_ACEOF
17645 +cat confdefs.h >>conftest.$ac_ext
17646 +cat >>conftest.$ac_ext <<_ACEOF
17647 +/* end confdefs.h. */
17648 +#include <$ac_header>
17650 +if { (ac_try="$ac_cpp conftest.$ac_ext"
17651 +case "(($ac_try" in
17652 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17653 + *) ac_try_echo=$ac_try;;
17655 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17656 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17658 + grep -v '^ *+' conftest.er1 >conftest.err
17659 + rm -f conftest.er1
17660 + cat conftest.err >&5
17661 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17662 + (exit $ac_status); } >/dev/null && {
17663 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17664 + test ! -s conftest.err
17666 + ac_header_preproc=yes
17668 + echo "$as_me: failed program was:" >&5
17669 +sed 's/^/| /' conftest.$ac_ext >&5
17671 + ac_header_preproc=no
17674 +rm -f conftest.err conftest.$ac_ext
17675 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17676 +echo "${ECHO_T}$ac_header_preproc" >&6; }
17678 +# So? What about this header?
17679 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17681 + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17682 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17683 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17684 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17685 + ac_header_preproc=yes
17688 + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17689 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17690 + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17691 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17692 + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17693 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17694 + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17695 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17696 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17697 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17698 + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17699 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17703 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17704 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17705 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17706 + echo $ECHO_N "(cached) $ECHO_C" >&6
17708 + eval "$as_ac_Header=\$ac_header_preproc"
17710 +ac_res=`eval echo '${'$as_ac_Header'}'`
17711 + { echo "$as_me:$LINENO: result: $ac_res" >&5
17712 +echo "${ECHO_T}$ac_res" >&6; }
17715 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
17716 + cat >>confdefs.h <<_ACEOF
17717 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17726 +for ac_header in fcntl.h sys/file.h
17728 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17729 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17730 + { echo "$as_me:$LINENO: checking for $ac_header" >&5
17731 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17732 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17733 + echo $ECHO_N "(cached) $ECHO_C" >&6
17735 +ac_res=`eval echo '${'$as_ac_Header'}'`
17736 + { echo "$as_me:$LINENO: result: $ac_res" >&5
17737 +echo "${ECHO_T}$ac_res" >&6; }
17739 + # Is the header compilable?
17740 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17741 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
17742 +cat >conftest.$ac_ext <<_ACEOF
17745 +cat confdefs.h >>conftest.$ac_ext
17746 +cat >>conftest.$ac_ext <<_ACEOF
17747 +/* end confdefs.h. */
17748 +$ac_includes_default
17749 +#include <$ac_header>
17751 +rm -f conftest.$ac_objext
17752 +if { (ac_try="$ac_compile"
17753 +case "(($ac_try" in
17754 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17755 + *) ac_try_echo=$ac_try;;
17757 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17758 + (eval "$ac_compile") 2>conftest.er1
17760 + grep -v '^ *+' conftest.er1 >conftest.err
17761 + rm -f conftest.er1
17762 + cat conftest.err >&5
17763 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17764 + (exit $ac_status); } && {
17765 + test -z "$ac_c_werror_flag" ||
17766 + test ! -s conftest.err
17767 + } && test -s conftest.$ac_objext; then
17768 + ac_header_compiler=yes
17770 + echo "$as_me: failed program was:" >&5
17771 +sed 's/^/| /' conftest.$ac_ext >&5
17773 + ac_header_compiler=no
17776 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17777 +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17778 +echo "${ECHO_T}$ac_header_compiler" >&6; }
17780 +# Is the header present?
17781 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17782 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
17783 +cat >conftest.$ac_ext <<_ACEOF
17786 +cat confdefs.h >>conftest.$ac_ext
17787 +cat >>conftest.$ac_ext <<_ACEOF
17788 +/* end confdefs.h. */
17789 +#include <$ac_header>
17791 +if { (ac_try="$ac_cpp conftest.$ac_ext"
17792 +case "(($ac_try" in
17793 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17794 + *) ac_try_echo=$ac_try;;
17796 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17797 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17799 + grep -v '^ *+' conftest.er1 >conftest.err
17800 + rm -f conftest.er1
17801 + cat conftest.err >&5
17802 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17803 + (exit $ac_status); } >/dev/null && {
17804 + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17805 + test ! -s conftest.err
17807 + ac_header_preproc=yes
17809 + echo "$as_me: failed program was:" >&5
17810 +sed 's/^/| /' conftest.$ac_ext >&5
17812 + ac_header_preproc=no
17815 +rm -f conftest.err conftest.$ac_ext
17816 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17817 +echo "${ECHO_T}$ac_header_preproc" >&6; }
17819 +# So? What about this header?
17820 +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17822 + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17823 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17824 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17825 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17826 + ac_header_preproc=yes
17829 + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17830 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17831 + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17832 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17833 + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17834 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17835 + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17836 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17837 + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17838 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17839 + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17840 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17844 +{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17845 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17846 +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17847 + echo $ECHO_N "(cached) $ECHO_C" >&6
17849 + eval "$as_ac_Header=\$ac_header_preproc"
17851 +ac_res=`eval echo '${'$as_ac_Header'}'`
17852 + { echo "$as_me:$LINENO: result: $ac_res" >&5
17853 +echo "${ECHO_T}$ac_res" >&6; }
17856 +if test `eval echo '${'$as_ac_Header'}'` = yes; then
17857 + cat >>confdefs.h <<_ACEOF
17858 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17866 +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17867 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
17868 +if test "${ac_cv_c_const+set}" = set; then
17869 + echo $ECHO_N "(cached) $ECHO_C" >&6
17871 + cat >conftest.$ac_ext <<_ACEOF
17874 +cat confdefs.h >>conftest.$ac_ext
17875 +cat >>conftest.$ac_ext <<_ACEOF
17876 +/* end confdefs.h. */
17881 +/* FIXME: Include the comments suggested by Paul. */
17882 +#ifndef __cplusplus
17883 + /* Ultrix mips cc rejects this. */
17884 + typedef int charset[2];
17885 + const charset cs;
17886 + /* SunOS 4.1.1 cc rejects this. */
17887 + char const *const *pcpcc;
17889 + /* NEC SVR4.0.2 mips cc rejects this. */
17890 + struct point {int x, y;};
17891 + static struct point const zero = {0,0};
17892 + /* AIX XL C 1.02.0.0 rejects this.
17893 + It does not let you subtract one const X* pointer from another in
17894 + an arm of an if-expression whose if-part is not a constant
17896 + const char *g = "string";
17897 + pcpcc = &g + (g ? g-g : 0);
17898 + /* HPUX 7.0 cc rejects these. */
17900 + ppc = (char**) pcpcc;
17901 + pcpcc = (char const *const *) ppc;
17902 + { /* SCO 3.2v4 cc rejects this. */
17904 + char const *s = 0 ? (char *) 0 : (char const *) 0;
17909 + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17910 + int x[] = {25, 17};
17911 + const int *foo = &x[0];
17914 + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17915 + typedef const int *iptr;
17919 + { /* AIX XL C 1.02.0.0 rejects this saying
17920 + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17921 + struct s { int j; const int *ap[3]; };
17922 + struct s *b; b->j = 5;
17924 + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17925 + const int foo = 10;
17926 + if (!foo) return 0;
17928 + return !cs[0] && !zero.x;
17935 +rm -f conftest.$ac_objext
17936 +if { (ac_try="$ac_compile"
17937 +case "(($ac_try" in
17938 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17939 + *) ac_try_echo=$ac_try;;
17941 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17942 + (eval "$ac_compile") 2>conftest.er1
17944 + grep -v '^ *+' conftest.er1 >conftest.err
17945 + rm -f conftest.er1
17946 + cat conftest.err >&5
17947 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948 + (exit $ac_status); } && {
17949 + test -z "$ac_c_werror_flag" ||
17950 + test ! -s conftest.err
17951 + } && test -s conftest.$ac_objext; then
17952 + ac_cv_c_const=yes
17954 + echo "$as_me: failed program was:" >&5
17955 +sed 's/^/| /' conftest.$ac_ext >&5
17960 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17962 +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17963 +echo "${ECHO_T}$ac_cv_c_const" >&6; }
17964 +if test $ac_cv_c_const = no; then
17966 +cat >>confdefs.h <<\_ACEOF
17972 +{ echo "$as_me:$LINENO: checking for size_t" >&5
17973 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
17974 +if test "${ac_cv_type_size_t+set}" = set; then
17975 + echo $ECHO_N "(cached) $ECHO_C" >&6
17977 + cat >conftest.$ac_ext <<_ACEOF
17980 +cat confdefs.h >>conftest.$ac_ext
17981 +cat >>conftest.$ac_ext <<_ACEOF
17982 +/* end confdefs.h. */
17983 +$ac_includes_default
17984 +typedef size_t ac__type_new_;
17988 +if ((ac__type_new_ *) 0)
17990 +if (sizeof (ac__type_new_))
17996 +rm -f conftest.$ac_objext
17997 +if { (ac_try="$ac_compile"
17998 +case "(($ac_try" in
17999 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18000 + *) ac_try_echo=$ac_try;;
18002 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18003 + (eval "$ac_compile") 2>conftest.er1
18005 + grep -v '^ *+' conftest.er1 >conftest.err
18006 + rm -f conftest.er1
18007 + cat conftest.err >&5
18008 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18009 + (exit $ac_status); } && {
18010 + test -z "$ac_c_werror_flag" ||
18011 + test ! -s conftest.err
18012 + } && test -s conftest.$ac_objext; then
18013 + ac_cv_type_size_t=yes
18015 + echo "$as_me: failed program was:" >&5
18016 +sed 's/^/| /' conftest.$ac_ext >&5
18018 + ac_cv_type_size_t=no
18021 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18023 +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
18024 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
18025 +if test $ac_cv_type_size_t = yes; then
18029 +cat >>confdefs.h <<_ACEOF
18030 +#define size_t unsigned int
18039 +for ac_func in strchr strtok memcpy
18041 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18042 +{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18043 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18044 +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18045 + echo $ECHO_N "(cached) $ECHO_C" >&6
18047 + cat >conftest.$ac_ext <<_ACEOF
18050 +cat confdefs.h >>conftest.$ac_ext
18051 +cat >>conftest.$ac_ext <<_ACEOF
18052 +/* end confdefs.h. */
18053 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18054 + For example, HP-UX 11i <limits.h> declares gettimeofday. */
18055 +#define $ac_func innocuous_$ac_func
18057 +/* System header to define __stub macros and hopefully few prototypes,
18058 + which can conflict with char $ac_func (); below.
18059 + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18060 + <limits.h> exists even on freestanding compilers. */
18063 +# include <limits.h>
18065 +# include <assert.h>
18070 +/* Override any GCC internal prototype to avoid an error.
18071 + Use char because int might match the return type of a GCC
18072 + builtin and then its argument prototype would still apply. */
18073 +#ifdef __cplusplus
18077 +/* The GNU C library defines this for functions which it implements
18078 + to always fail with ENOSYS. Some functions are actually named
18079 + something starting with __ and the normal name is an alias. */
18080 +#if defined __stub_$ac_func || defined __stub___$ac_func
18087 +return $ac_func ();
18092 +rm -f conftest.$ac_objext conftest$ac_exeext
18093 +if { (ac_try="$ac_link"
18094 +case "(($ac_try" in
18095 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18096 + *) ac_try_echo=$ac_try;;
18098 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18099 + (eval "$ac_link") 2>conftest.er1
18101 + grep -v '^ *+' conftest.er1 >conftest.err
18102 + rm -f conftest.er1
18103 + cat conftest.err >&5
18104 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18105 + (exit $ac_status); } && {
18106 + test -z "$ac_c_werror_flag" ||
18107 + test ! -s conftest.err
18108 + } && test -s conftest$ac_exeext &&
18109 + $as_test_x conftest$ac_exeext; then
18110 + eval "$as_ac_var=yes"
18112 + echo "$as_me: failed program was:" >&5
18113 +sed 's/^/| /' conftest.$ac_ext >&5
18115 + eval "$as_ac_var=no"
18118 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18119 + conftest$ac_exeext conftest.$ac_ext
18121 +ac_res=`eval echo '${'$as_ac_var'}'`
18122 + { echo "$as_me:$LINENO: result: $ac_res" >&5
18123 +echo "${ECHO_T}$ac_res" >&6; }
18124 +if test `eval echo '${'$as_ac_var'}'` = yes; then
18125 + cat >>confdefs.h <<_ACEOF
18126 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18132 +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
18133 +# for constant arguments. Useless!
18134 +{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
18135 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
18136 +if test "${ac_cv_working_alloca_h+set}" = set; then
18137 + echo $ECHO_N "(cached) $ECHO_C" >&6
18139 + cat >conftest.$ac_ext <<_ACEOF
18142 +cat confdefs.h >>conftest.$ac_ext
18143 +cat >>conftest.$ac_ext <<_ACEOF
18144 +/* end confdefs.h. */
18145 +#include <alloca.h>
18149 +char *p = (char *) alloca (2 * sizeof (int));
18155 +rm -f conftest.$ac_objext conftest$ac_exeext
18156 +if { (ac_try="$ac_link"
18157 +case "(($ac_try" in
18158 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18159 + *) ac_try_echo=$ac_try;;
18161 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18162 + (eval "$ac_link") 2>conftest.er1
18164 + grep -v '^ *+' conftest.er1 >conftest.err
18165 + rm -f conftest.er1
18166 + cat conftest.err >&5
18167 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18168 + (exit $ac_status); } && {
18169 + test -z "$ac_c_werror_flag" ||
18170 + test ! -s conftest.err
18171 + } && test -s conftest$ac_exeext &&
18172 + $as_test_x conftest$ac_exeext; then
18173 + ac_cv_working_alloca_h=yes
18175 + echo "$as_me: failed program was:" >&5
18176 +sed 's/^/| /' conftest.$ac_ext >&5
18178 + ac_cv_working_alloca_h=no
18181 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18182 + conftest$ac_exeext conftest.$ac_ext
18184 +{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
18185 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
18186 +if test $ac_cv_working_alloca_h = yes; then
18188 +cat >>confdefs.h <<\_ACEOF
18189 +#define HAVE_ALLOCA_H 1
18194 +{ echo "$as_me:$LINENO: checking for alloca" >&5
18195 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
18196 +if test "${ac_cv_func_alloca_works+set}" = set; then
18197 + echo $ECHO_N "(cached) $ECHO_C" >&6
18199 + cat >conftest.$ac_ext <<_ACEOF
18202 +cat confdefs.h >>conftest.$ac_ext
18203 +cat >>conftest.$ac_ext <<_ACEOF
18204 +/* end confdefs.h. */
18206 +# define alloca __builtin_alloca
18209 +# include <malloc.h>
18210 +# define alloca _alloca
18212 +# ifdef HAVE_ALLOCA_H
18213 +# include <alloca.h>
18218 +# ifndef alloca /* predefined by HP cc +Olibcalls */
18229 +char *p = (char *) alloca (1);
18235 +rm -f conftest.$ac_objext conftest$ac_exeext
18236 +if { (ac_try="$ac_link"
18237 +case "(($ac_try" in
18238 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18239 + *) ac_try_echo=$ac_try;;
18241 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18242 + (eval "$ac_link") 2>conftest.er1
18244 + grep -v '^ *+' conftest.er1 >conftest.err
18245 + rm -f conftest.er1
18246 + cat conftest.err >&5
18247 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18248 + (exit $ac_status); } && {
18249 + test -z "$ac_c_werror_flag" ||
18250 + test ! -s conftest.err
18251 + } && test -s conftest$ac_exeext &&
18252 + $as_test_x conftest$ac_exeext; then
18253 + ac_cv_func_alloca_works=yes
18255 + echo "$as_me: failed program was:" >&5
18256 +sed 's/^/| /' conftest.$ac_ext >&5
18258 + ac_cv_func_alloca_works=no
18261 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18262 + conftest$ac_exeext conftest.$ac_ext
18264 +{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
18265 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
18267 +if test $ac_cv_func_alloca_works = yes; then
18269 +cat >>confdefs.h <<\_ACEOF
18270 +#define HAVE_ALLOCA 1
18274 + # The SVR3 libPW and SVR4 libucb both contain incompatible functions
18275 +# that cause trouble. Some versions do not even contain alloca or
18276 +# contain a buggy version. If you still want to use their alloca,
18277 +# use ar to extract alloca.o from them instead of compiling alloca.c.
18279 +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
18281 +cat >>confdefs.h <<\_ACEOF
18282 +#define C_ALLOCA 1
18286 +{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
18287 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
18288 +if test "${ac_cv_os_cray+set}" = set; then
18289 + echo $ECHO_N "(cached) $ECHO_C" >&6
18291 + cat >conftest.$ac_ext <<_ACEOF
18294 +cat confdefs.h >>conftest.$ac_ext
18295 +cat >>conftest.$ac_ext <<_ACEOF
18296 +/* end confdefs.h. */
18297 +#if defined CRAY && ! defined CRAY2
18304 +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18305 + $EGREP "webecray" >/dev/null 2>&1; then
18306 + ac_cv_os_cray=yes
18313 +{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
18314 +echo "${ECHO_T}$ac_cv_os_cray" >&6; }
18315 +if test $ac_cv_os_cray = yes; then
18316 + for ac_func in _getb67 GETB67 getb67; do
18317 + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18318 +{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18319 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18320 +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18321 + echo $ECHO_N "(cached) $ECHO_C" >&6
18323 + cat >conftest.$ac_ext <<_ACEOF
18326 +cat confdefs.h >>conftest.$ac_ext
18327 +cat >>conftest.$ac_ext <<_ACEOF
18328 +/* end confdefs.h. */
18329 +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18330 + For example, HP-UX 11i <limits.h> declares gettimeofday. */
18331 +#define $ac_func innocuous_$ac_func
18333 +/* System header to define __stub macros and hopefully few prototypes,
18334 + which can conflict with char $ac_func (); below.
18335 + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18336 + <limits.h> exists even on freestanding compilers. */
18339 +# include <limits.h>
18341 +# include <assert.h>
18346 +/* Override any GCC internal prototype to avoid an error.
18347 + Use char because int might match the return type of a GCC
18348 + builtin and then its argument prototype would still apply. */
18349 +#ifdef __cplusplus
18353 +/* The GNU C library defines this for functions which it implements
18354 + to always fail with ENOSYS. Some functions are actually named
18355 + something starting with __ and the normal name is an alias. */
18356 +#if defined __stub_$ac_func || defined __stub___$ac_func
18363 +return $ac_func ();
18368 +rm -f conftest.$ac_objext conftest$ac_exeext
18369 +if { (ac_try="$ac_link"
18370 +case "(($ac_try" in
18371 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18372 + *) ac_try_echo=$ac_try;;
18374 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18375 + (eval "$ac_link") 2>conftest.er1
18377 + grep -v '^ *+' conftest.er1 >conftest.err
18378 + rm -f conftest.er1
18379 + cat conftest.err >&5
18380 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18381 + (exit $ac_status); } && {
18382 + test -z "$ac_c_werror_flag" ||
18383 + test ! -s conftest.err
18384 + } && test -s conftest$ac_exeext &&
18385 + $as_test_x conftest$ac_exeext; then
18386 + eval "$as_ac_var=yes"
18388 + echo "$as_me: failed program was:" >&5
18389 +sed 's/^/| /' conftest.$ac_ext >&5
18391 + eval "$as_ac_var=no"
18394 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18395 + conftest$ac_exeext conftest.$ac_ext
18397 +ac_res=`eval echo '${'$as_ac_var'}'`
18398 + { echo "$as_me:$LINENO: result: $ac_res" >&5
18399 +echo "${ECHO_T}$ac_res" >&6; }
18400 +if test `eval echo '${'$as_ac_var'}'` = yes; then
18402 +cat >>confdefs.h <<_ACEOF
18403 +#define CRAY_STACKSEG_END $ac_func
18412 +{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
18413 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
18414 +if test "${ac_cv_c_stack_direction+set}" = set; then
18415 + echo $ECHO_N "(cached) $ECHO_C" >&6
18417 + if test "$cross_compiling" = yes; then
18418 + ac_cv_c_stack_direction=0
18420 + cat >conftest.$ac_ext <<_ACEOF
18423 +cat confdefs.h >>conftest.$ac_ext
18424 +cat >>conftest.$ac_ext <<_ACEOF
18425 +/* end confdefs.h. */
18426 +$ac_includes_default
18428 +find_stack_direction ()
18430 + static char *addr = 0;
18435 + return find_stack_direction ();
18438 + return (&dummy > addr) ? 1 : -1;
18444 + return find_stack_direction () < 0;
18447 +rm -f conftest$ac_exeext
18448 +if { (ac_try="$ac_link"
18449 +case "(($ac_try" in
18450 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18451 + *) ac_try_echo=$ac_try;;
18453 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18454 + (eval "$ac_link") 2>&5
18456 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18457 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18458 + { (case "(($ac_try" in
18459 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18460 + *) ac_try_echo=$ac_try;;
18462 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18463 + (eval "$ac_try") 2>&5
18465 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18466 + (exit $ac_status); }; }; then
18467 + ac_cv_c_stack_direction=1
18469 + echo "$as_me: program exited with status $ac_status" >&5
18470 +echo "$as_me: failed program was:" >&5
18471 +sed 's/^/| /' conftest.$ac_ext >&5
18473 +( exit $ac_status )
18474 +ac_cv_c_stack_direction=-1
18476 +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18481 +{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
18482 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
18484 +cat >>confdefs.h <<_ACEOF
18485 +#define STACK_DIRECTION $ac_cv_c_stack_direction
18494 +*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
18496 +cat >>confdefs.h <<\_ACEOF
18497 +#define USE_BINARY_FOPEN 1
18502 +{ echo "$as_me:$LINENO: checking whether malloc must be declared" >&5
18503 +echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6; }
18504 +if test "${bfd_cv_decl_needed_malloc+set}" = set; then
18505 + echo $ECHO_N "(cached) $ECHO_C" >&6
18507 + cat >conftest.$ac_ext <<_ACEOF
18510 +cat confdefs.h >>conftest.$ac_ext
18511 +cat >>conftest.$ac_ext <<_ACEOF
18512 +/* end confdefs.h. */
18514 +#include <stdio.h>
18515 +#ifdef HAVE_STRING_H
18516 +#include <string.h>
18518 +#ifdef HAVE_STRINGS_H
18519 +#include <strings.h>
18522 +#ifdef HAVE_STDLIB_H
18523 +#include <stdlib.h>
18525 +#ifdef HAVE_UNISTD_H
18526 +#include <unistd.h>
18531 +char *(*pfn) = (char *(*)) malloc
18536 +rm -f conftest.$ac_objext
18537 +if { (ac_try="$ac_compile"
18538 +case "(($ac_try" in
18539 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18540 + *) ac_try_echo=$ac_try;;
18542 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18543 + (eval "$ac_compile") 2>conftest.er1
18545 + grep -v '^ *+' conftest.er1 >conftest.err
18546 + rm -f conftest.er1
18547 + cat conftest.err >&5
18548 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18549 + (exit $ac_status); } && {
18550 + test -z "$ac_c_werror_flag" ||
18551 + test ! -s conftest.err
18552 + } && test -s conftest.$ac_objext; then
18553 + bfd_cv_decl_needed_malloc=no
18555 + echo "$as_me: failed program was:" >&5
18556 +sed 's/^/| /' conftest.$ac_ext >&5
18558 + bfd_cv_decl_needed_malloc=yes
18561 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18564 +{ echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5
18565 +echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6; }
18566 +if test $bfd_cv_decl_needed_malloc = yes; then
18567 + bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18569 +cat >>confdefs.h <<_ACEOF
18570 +#define $bfd_tr_decl 1
18575 +{ echo "$as_me:$LINENO: checking whether realloc must be declared" >&5
18576 +echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6; }
18577 +if test "${bfd_cv_decl_needed_realloc+set}" = set; then
18578 + echo $ECHO_N "(cached) $ECHO_C" >&6
18580 + cat >conftest.$ac_ext <<_ACEOF
18583 +cat confdefs.h >>conftest.$ac_ext
18584 +cat >>conftest.$ac_ext <<_ACEOF
18585 +/* end confdefs.h. */
18587 +#include <stdio.h>
18588 +#ifdef HAVE_STRING_H
18589 +#include <string.h>
18591 +#ifdef HAVE_STRINGS_H
18592 +#include <strings.h>
18595 +#ifdef HAVE_STDLIB_H
18596 +#include <stdlib.h>
18598 +#ifdef HAVE_UNISTD_H
18599 +#include <unistd.h>
18604 +char *(*pfn) = (char *(*)) realloc
18609 +rm -f conftest.$ac_objext
18610 +if { (ac_try="$ac_compile"
18611 +case "(($ac_try" in
18612 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18613 + *) ac_try_echo=$ac_try;;
18615 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18616 + (eval "$ac_compile") 2>conftest.er1
18618 + grep -v '^ *+' conftest.er1 >conftest.err
18619 + rm -f conftest.er1
18620 + cat conftest.err >&5
18621 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18622 + (exit $ac_status); } && {
18623 + test -z "$ac_c_werror_flag" ||
18624 + test ! -s conftest.err
18625 + } && test -s conftest.$ac_objext; then
18626 + bfd_cv_decl_needed_realloc=no
18628 + echo "$as_me: failed program was:" >&5
18629 +sed 's/^/| /' conftest.$ac_ext >&5
18631 + bfd_cv_decl_needed_realloc=yes
18634 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18637 +{ echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5
18638 +echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6; }
18639 +if test $bfd_cv_decl_needed_realloc = yes; then
18640 + bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18642 +cat >>confdefs.h <<_ACEOF
18643 +#define $bfd_tr_decl 1
18648 +{ echo "$as_me:$LINENO: checking whether free must be declared" >&5
18649 +echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6; }
18650 +if test "${bfd_cv_decl_needed_free+set}" = set; then
18651 + echo $ECHO_N "(cached) $ECHO_C" >&6
18653 + cat >conftest.$ac_ext <<_ACEOF
18656 +cat confdefs.h >>conftest.$ac_ext
18657 +cat >>conftest.$ac_ext <<_ACEOF
18658 +/* end confdefs.h. */
18660 +#include <stdio.h>
18661 +#ifdef HAVE_STRING_H
18662 +#include <string.h>
18664 +#ifdef HAVE_STRINGS_H
18665 +#include <strings.h>
18668 +#ifdef HAVE_STDLIB_H
18669 +#include <stdlib.h>
18671 +#ifdef HAVE_UNISTD_H
18672 +#include <unistd.h>
18677 +char *(*pfn) = (char *(*)) free
18682 +rm -f conftest.$ac_objext
18683 +if { (ac_try="$ac_compile"
18684 +case "(($ac_try" in
18685 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18686 + *) ac_try_echo=$ac_try;;
18688 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18689 + (eval "$ac_compile") 2>conftest.er1
18691 + grep -v '^ *+' conftest.er1 >conftest.err
18692 + rm -f conftest.er1
18693 + cat conftest.err >&5
18694 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695 + (exit $ac_status); } && {
18696 + test -z "$ac_c_werror_flag" ||
18697 + test ! -s conftest.err
18698 + } && test -s conftest.$ac_objext; then
18699 + bfd_cv_decl_needed_free=no
18701 + echo "$as_me: failed program was:" >&5
18702 +sed 's/^/| /' conftest.$ac_ext >&5
18704 + bfd_cv_decl_needed_free=yes
18707 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18710 +{ echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5
18711 +echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6; }
18712 +if test $bfd_cv_decl_needed_free = yes; then
18713 + bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18715 +cat >>confdefs.h <<_ACEOF
18716 +#define $bfd_tr_decl 1
18721 +{ echo "$as_me:$LINENO: checking whether strtok must be declared" >&5
18722 +echo $ECHO_N "checking whether strtok must be declared... $ECHO_C" >&6; }
18723 +if test "${bfd_cv_decl_needed_strtok+set}" = set; then
18724 + echo $ECHO_N "(cached) $ECHO_C" >&6
18726 + cat >conftest.$ac_ext <<_ACEOF
18729 +cat confdefs.h >>conftest.$ac_ext
18730 +cat >>conftest.$ac_ext <<_ACEOF
18731 +/* end confdefs.h. */
18733 +#include <stdio.h>
18734 +#ifdef HAVE_STRING_H
18735 +#include <string.h>
18737 +#ifdef HAVE_STRINGS_H
18738 +#include <strings.h>
18741 +#ifdef HAVE_STDLIB_H
18742 +#include <stdlib.h>
18744 +#ifdef HAVE_UNISTD_H
18745 +#include <unistd.h>
18750 +char *(*pfn) = (char *(*)) strtok
18755 +rm -f conftest.$ac_objext
18756 +if { (ac_try="$ac_compile"
18757 +case "(($ac_try" in
18758 + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18759 + *) ac_try_echo=$ac_try;;
18761 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18762 + (eval "$ac_compile") 2>conftest.er1
18764 + grep -v '^ *+' conftest.er1 >conftest.err
18765 + rm -f conftest.er1
18766 + cat conftest.err >&5
18767 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
18768 + (exit $ac_status); } && {
18769 + test -z "$ac_c_werror_flag" ||
18770 + test ! -s conftest.err
18771 + } && test -s conftest.$ac_objext; then
18772 + bfd_cv_decl_needed_strtok=no
18774 + echo "$as_me: failed program was:" >&5
18775 +sed 's/^/| /' conftest.$ac_ext >&5
18777 + bfd_cv_decl_needed_strtok=yes
18780 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18783 +{ echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strtok" >&5
18784 +echo "${ECHO_T}$bfd_cv_decl_needed_strtok" >&6; }
18785 +if test $bfd_cv_decl_needed_strtok = yes; then
18786 + bfd_tr_decl=NEED_DECLARATION_`echo strtok | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18788 +cat >>confdefs.h <<_ACEOF
18789 +#define $bfd_tr_decl 1
18797 +# Check whether --with-pkgversion was given.
18798 +if test "${with_pkgversion+set}" = set; then
18799 + withval=$with_pkgversion; case "$withval" in
18800 + yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
18801 +echo "$as_me: error: package version not specified" >&2;}
18802 + { (exit 1); exit 1; }; } ;;
18803 + no) PKGVERSION= ;;
18804 + *) PKGVERSION="($withval) " ;;
18807 + PKGVERSION="(MIPS Convert) "
18815 +# Check whether --with-bugurl was given.
18816 +if test "${with_bugurl+set}" = set; then
18817 + withval=$with_bugurl; case "$withval" in
18818 + yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
18819 +echo "$as_me: error: bug URL not specified" >&2;}
18820 + { (exit 1); exit 1; }; } ;;
18823 + *) BUGURL="$withval"
18827 + BUGURL="http://support.codesourcery.com/"
18831 + case ${BUGURL} in
18834 + REPORT_BUGS_TEXI=
18837 + REPORT_BUGS_TO="<$BUGURL>"
18838 + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
18845 +{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
18846 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
18847 + # Check whether --enable-maintainer-mode was given.
18848 +if test "${enable_maintainer_mode+set}" = set; then
18849 + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
18851 + USE_MAINTAINER_MODE=no
18854 + { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
18855 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
18858 +if test $USE_MAINTAINER_MODE = yes; then
18859 + MAINTAINER_MODE_TRUE=
18860 + MAINTAINER_MODE_FALSE='#'
18862 + MAINTAINER_MODE_TRUE='#'
18863 + MAINTAINER_MODE_FALSE=
18866 + MAINT=$MAINTAINER_MODE_TRUE
18870 +ac_config_files="$ac_config_files Makefile"
18872 +cat >confcache <<\_ACEOF
18873 +# This file is a shell script that caches the results of configure
18874 +# tests run on this system so they can be shared between configure
18875 +# scripts and configure runs, see configure's option --config-cache.
18876 +# It is not useful on other systems. If it contains results you don't
18877 +# want to keep, you may remove or edit it.
18879 +# config.status only pays attention to the cache file if you give it
18880 +# the --recheck option to rerun configure.
18882 +# `ac_cv_env_foo' variables (set or unset) will be overridden when
18883 +# loading this file, other *unset* `ac_cv_foo' will be assigned the
18884 +# following values.
18888 +# The following way of writing the cache mishandles newlines in values,
18889 +# but we know of no workaround that is simple, portable, and efficient.
18890 +# So, we kill variables containing newlines.
18891 +# Ultrix sh set writes to stderr and can't be redirected directly,
18892 +# and sets the high bit in the cache file unless we assign to the vars.
18894 + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18895 + eval ac_val=\$$ac_var
18896 + case $ac_val in #(
18898 + case $ac_var in #(
18899 + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
18900 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
18902 + case $ac_var in #(
18903 + _ | IFS | as_nl) ;; #(
18904 + *) $as_unset $ac_var ;;
18910 + case $as_nl`(ac_space=' '; set) 2>&1` in #(
18911 + *${as_nl}ac_space=\ *)
18912 + # `set' does not quote correctly, so add quotes (double-quote
18913 + # substitution turns \\\\ into \\, and sed turns \\ into \).
18916 + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18919 + # `set' quotes correctly as required by POSIX, so do not add quotes.
18920 + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18926 + /^ac_cv_env_/b end
18929 + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18931 + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18932 + :end' >>confcache
18933 +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18934 + if test -w "$cache_file"; then
18935 + test "x$cache_file" != "x/dev/null" &&
18936 + { echo "$as_me:$LINENO: updating cache $cache_file" >&5
18937 +echo "$as_me: updating cache $cache_file" >&6;}
18938 + cat confcache >$cache_file
18940 + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
18941 +echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18946 +test "x$prefix" = xNONE && prefix=$ac_default_prefix
18947 +# Let make expand exec_prefix.
18948 +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18950 +DEFS=-DHAVE_CONFIG_H
18954 +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18955 + # 1. Remove the extension, and $U if already installed.
18956 + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18957 + ac_i=`echo "$ac_i" | sed "$ac_script"`
18958 + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18959 + # will be set to the directory where LIBOBJS objects are built.
18960 + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18961 + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
18963 +LIBOBJS=$ac_libobjs
18965 +LTLIBOBJS=$ac_ltlibobjs
18968 +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
18969 + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
18970 +Usually this means the macro was only invoked conditionally." >&5
18971 +echo "$as_me: error: conditional \"AMDEP\" was never defined.
18972 +Usually this means the macro was only invoked conditionally." >&2;}
18973 + { (exit 1); exit 1; }; }
18975 +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
18976 + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
18977 +Usually this means the macro was only invoked conditionally." >&5
18978 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
18979 +Usually this means the macro was only invoked conditionally." >&2;}
18980 + { (exit 1); exit 1; }; }
18982 +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
18983 + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
18984 +Usually this means the macro was only invoked conditionally." >&5
18985 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
18986 +Usually this means the macro was only invoked conditionally." >&2;}
18987 + { (exit 1); exit 1; }; }
18990 +: ${CONFIG_STATUS=./config.status}
18991 +ac_clean_files_save=$ac_clean_files
18992 +ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18993 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18994 +echo "$as_me: creating $CONFIG_STATUS" >&6;}
18995 +cat >$CONFIG_STATUS <<_ACEOF
18997 +# Generated by $as_me.
18998 +# Run this file to recreate the current configuration.
18999 +# Compiler output produced by configure, useful for debugging
19000 +# configure, is in config.log if it exists.
19003 +ac_cs_recheck=false
19004 +ac_cs_silent=false
19005 +SHELL=\${CONFIG_SHELL-$SHELL}
19008 +cat >>$CONFIG_STATUS <<\_ACEOF
19009 +## --------------------- ##
19010 +## M4sh Initialization. ##
19011 +## --------------------- ##
19013 +# Be more Bourne compatible
19014 +DUALCASE=1; export DUALCASE # for MKS sh
19015 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19018 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19019 + # is contrary to our usage. Disable this feature.
19020 + alias -g '${1+"$@"}'='"$@"'
19021 + setopt NO_GLOB_SUBST
19023 + case `(set -o) 2>/dev/null` in
19024 + *posix*) set -o posix ;;
19033 +# Avoid depending upon Character Ranges.
19034 +as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19035 +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19036 +as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19037 +as_cr_digits='0123456789'
19038 +as_cr_alnum=$as_cr_Letters$as_cr_digits
19040 +# The user is always right.
19041 +if test "${PATH_SEPARATOR+set}" != set; then
19042 + echo "#! /bin/sh" >conf$$.sh
19043 + echo "exit 0" >>conf$$.sh
19044 + chmod +x conf$$.sh
19045 + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19046 + PATH_SEPARATOR=';'
19053 +# Support unset when possible.
19054 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
19062 +# We need space, tab and new line, in precisely that order. Quoting is
19063 +# there to prevent editors from complaining about space-tab.
19064 +# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19065 +# splitting by setting IFS to empty value.)
19070 +# Find who we are. Look in the path if we contain no directory separator.
19072 + *[\\/]* ) as_myself=$0 ;;
19073 + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19074 +for as_dir in $PATH
19077 + test -z "$as_dir" && as_dir=.
19078 + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19084 +# We did not find ourselves, most probably we were run as `sh COMMAND'
19085 +# in which case we are not to be found in the path.
19086 +if test "x$as_myself" = x; then
19089 +if test ! -f "$as_myself"; then
19090 + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19091 + { (exit 1); exit 1; }
19094 +# Work around bugs in pre-3.0 UWIN ksh.
19095 +for as_var in ENV MAIL MAILPATH
19096 +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
19104 + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
19105 + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
19106 + LC_TELEPHONE LC_TIME
19108 + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
19109 + eval $as_var=C; export $as_var
19111 + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
19115 +# Required to use basename.
19116 +if expr a : '\(a\)' >/dev/null 2>&1 &&
19117 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
19123 +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19124 + as_basename=basename
19126 + as_basename=false
19130 +# Name of the executable.
19131 +as_me=`$as_basename -- "$0" ||
19132 +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19133 + X"$0" : 'X\(//\)$' \| \
19134 + X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19136 + sed '/^.*\/\([^/][^/]*\)\/*$/{
19155 + as_lineno_1=$LINENO
19156 + as_lineno_2=$LINENO
19157 + test "x$as_lineno_1" != "x$as_lineno_2" &&
19158 + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
19160 + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
19161 + # uniformly replaced by the line number. The first 'sed' inserts a
19162 + # line-number line after each line using $LINENO; the second 'sed'
19163 + # does the real work. The second script uses 'N' to pair each
19164 + # line-number line with the line containing $LINENO, and appends
19165 + # trailing '-' during substitution so that $LINENO is not a special
19166 + # case at line end.
19167 + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
19168 + # scripts with optimization help from Paolo Bonzini. Blame Lee
19169 + # E. McMahon (1931-1989) for sed's syntax. :-)
19175 + s/[$]LINENO.*/&-/
19181 + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
19184 + ' >$as_me.lineno &&
19185 + chmod +x "$as_me.lineno" ||
19186 + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
19187 + { (exit 1); exit 1; }; }
19189 + # Don't try to exec as it changes $[0], causing all sort of problems
19190 + # (the dirname of $[0] is not the place where we might find the
19191 + # original and so on. Autoconf is especially sensitive to this).
19192 + . "./$as_me.lineno"
19193 + # Exit status is that of the last command.
19198 +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19199 + as_dirname=dirname
19204 +ECHO_C= ECHO_N= ECHO_T=
19205 +case `echo -n x` in
19207 + case `echo 'x\c'` in
19208 + *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19215 +if expr a : '\(a\)' >/dev/null 2>&1 &&
19216 + test "X`expr 00001 : '.*\(...\)'`" = X001; then
19222 +rm -f conf$$ conf$$.exe conf$$.file
19223 +if test -d conf$$.dir; then
19224 + rm -f conf$$.dir/conf$$.file
19230 +if ln -s conf$$.file conf$$ 2>/dev/null; then
19232 + # ... but there are two gotchas:
19233 + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19234 + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19235 + # In both cases, we have to default to `cp -p'.
19236 + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19238 +elif ln conf$$.file conf$$ 2>/dev/null; then
19243 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19244 +rmdir conf$$.dir 2>/dev/null
19246 +if mkdir -p . 2>/dev/null; then
19249 + test -d ./-p && rmdir ./-p
19253 +if test -x / >/dev/null 2>&1; then
19254 + as_test_x='test -x'
19256 + if ls -dL / >/dev/null 2>&1; then
19263 + if test -d "$1"; then
19269 + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
19270 + ???[sx]*):;;*)false;;esac;fi
19274 +as_executable_p=$as_test_x
19276 +# Sed expression to map a string onto a valid CPP name.
19277 +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19279 +# Sed expression to map a string onto a valid variable name.
19280 +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19285 +# Save the log message, to keep $[0] and so on meaningful, and to
19286 +# report actual input values of CONFIG_FILES etc. instead of their
19287 +# values after options handling.
19289 +This file was extended by convert $as_me 3.0.4, which was
19290 +generated by GNU Autoconf 2.61. Invocation command line was
19292 + CONFIG_FILES = $CONFIG_FILES
19293 + CONFIG_HEADERS = $CONFIG_HEADERS
19294 + CONFIG_LINKS = $CONFIG_LINKS
19295 + CONFIG_COMMANDS = $CONFIG_COMMANDS
19298 +on `(hostname || uname -n) 2>/dev/null | sed 1q`
19303 +cat >>$CONFIG_STATUS <<_ACEOF
19304 +# Files that config.status was made for.
19305 +config_files="$ac_config_files"
19306 +config_headers="$ac_config_headers"
19307 +config_commands="$ac_config_commands"
19311 +cat >>$CONFIG_STATUS <<\_ACEOF
19313 +\`$as_me' instantiates files from templates according to the
19314 +current configuration.
19316 +Usage: $0 [OPTIONS] [FILE]...
19318 + -h, --help print this help, then exit
19319 + -V, --version print version number and configuration settings, then exit
19320 + -q, --quiet do not print progress messages
19321 + -d, --debug don't remove temporary files
19322 + --recheck update $as_me by reconfiguring in the same conditions
19323 + --file=FILE[:TEMPLATE]
19324 + instantiate the configuration file FILE
19325 + --header=FILE[:TEMPLATE]
19326 + instantiate the configuration header FILE
19328 +Configuration files:
19331 +Configuration headers:
19334 +Configuration commands:
19337 +Report bugs to <bug-autoconf@gnu.org>."
19340 +cat >>$CONFIG_STATUS <<_ACEOF
19342 +convert config.status 3.0.4
19343 +configured by $0, generated by GNU Autoconf 2.61,
19344 + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
19346 +Copyright (C) 2006 Free Software Foundation, Inc.
19347 +This config.status script is free software; the Free Software Foundation
19348 +gives unlimited permission to copy, distribute and modify it."
19352 +INSTALL='$INSTALL'
19355 +cat >>$CONFIG_STATUS <<\_ACEOF
19356 +# If no file are specified by the user, then we need to provide default
19357 +# value. By we need to know if files were specified by the user.
19358 +ac_need_defaults=:
19359 +while test $# != 0
19363 + ac_option=`expr "X$1" : 'X\([^=]*\)='`
19364 + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19374 + case $ac_option in
19375 + # Handling of the options.
19376 + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19377 + ac_cs_recheck=: ;;
19378 + --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19379 + echo "$ac_cs_version"; exit ;;
19380 + --debug | --debu | --deb | --de | --d | -d )
19382 + --file | --fil | --fi | --f )
19384 + CONFIG_FILES="$CONFIG_FILES $ac_optarg"
19385 + ac_need_defaults=false;;
19386 + --header | --heade | --head | --hea )
19388 + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
19389 + ac_need_defaults=false;;
19391 + # Conflict between --help and --header
19392 + { echo "$as_me: error: ambiguous option: $1
19393 +Try \`$0 --help' for more information." >&2
19394 + { (exit 1); exit 1; }; };;
19395 + --help | --hel | -h )
19396 + echo "$ac_cs_usage"; exit ;;
19397 + -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19398 + | -silent | --silent | --silen | --sile | --sil | --si | --s)
19399 + ac_cs_silent=: ;;
19401 + # This is an error.
19402 + -*) { echo "$as_me: error: unrecognized option: $1
19403 +Try \`$0 --help' for more information." >&2
19404 + { (exit 1); exit 1; }; } ;;
19406 + *) ac_config_targets="$ac_config_targets $1"
19407 + ac_need_defaults=false ;;
19413 +ac_configure_extra_args=
19415 +if $ac_cs_silent; then
19417 + ac_configure_extra_args="$ac_configure_extra_args --silent"
19421 +cat >>$CONFIG_STATUS <<_ACEOF
19422 +if \$ac_cs_recheck; then
19423 + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
19424 + CONFIG_SHELL=$SHELL
19425 + export CONFIG_SHELL
19426 + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19430 +cat >>$CONFIG_STATUS <<\_ACEOF
19431 +exec 5>>config.log
19434 + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19435 +## Running $as_me. ##
19441 +cat >>$CONFIG_STATUS <<_ACEOF
19445 +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
19449 +cat >>$CONFIG_STATUS <<\_ACEOF
19451 +# Handling of arguments.
19452 +for ac_config_target in $ac_config_targets
19454 + case $ac_config_target in
19455 + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
19456 + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19457 + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19459 + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19460 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19461 + { (exit 1); exit 1; }; };;
19466 +# If the user did not use the arguments to specify the items to instantiate,
19467 +# then the envvar interface is used. Set only those that are not.
19468 +# We use the long form for the default assignment because of an extremely
19469 +# bizarre bug on SunOS 4.1.3.
19470 +if $ac_need_defaults; then
19471 + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19472 + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19473 + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19476 +# Have a temporary directory for convenience. Make it in the build tree
19477 +# simply because there is no reason against having it here, and in addition,
19478 +# creating and moving files from /tmp can sometimes cause problems.
19479 +# Hook for its removal unless debugging.
19480 +# Note that there is a small window in which the directory will not be cleaned:
19481 +# after its creation but before its name has been assigned to `$tmp'.
19485 + trap 'exit_status=$?
19486 + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
19488 + trap '{ (exit 1); exit 1; }' 1 2 13 15
19490 +# Create a (secure) tmp directory for tmp files.
19493 + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19494 + test -n "$tmp" && test -d "$tmp"
19497 + tmp=./conf$$-$RANDOM
19498 + (umask 077 && mkdir "$tmp")
19501 + echo "$me: cannot create a temporary directory in ." >&2
19502 + { (exit 1); exit 1; }
19506 +# Set up the sed scripts for CONFIG_FILES section.
19509 +# No need to generate the scripts if there are no CONFIG_FILES.
19510 +# This happens for instance when ./config.status config.h
19511 +if test -n "$CONFIG_FILES"; then
19518 +for ac_last_try in false false false false false :; do
19519 + cat >conf$$subs.sed <<_ACEOF
19520 +SHELL!$SHELL$ac_delim
19521 +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
19522 +PACKAGE_NAME!$PACKAGE_NAME$ac_delim
19523 +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
19524 +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
19525 +PACKAGE_STRING!$PACKAGE_STRING$ac_delim
19526 +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
19527 +exec_prefix!$exec_prefix$ac_delim
19528 +prefix!$prefix$ac_delim
19529 +program_transform_name!$program_transform_name$ac_delim
19530 +bindir!$bindir$ac_delim
19531 +sbindir!$sbindir$ac_delim
19532 +libexecdir!$libexecdir$ac_delim
19533 +datarootdir!$datarootdir$ac_delim
19534 +datadir!$datadir$ac_delim
19535 +sysconfdir!$sysconfdir$ac_delim
19536 +sharedstatedir!$sharedstatedir$ac_delim
19537 +localstatedir!$localstatedir$ac_delim
19538 +includedir!$includedir$ac_delim
19539 +oldincludedir!$oldincludedir$ac_delim
19540 +docdir!$docdir$ac_delim
19541 +infodir!$infodir$ac_delim
19542 +htmldir!$htmldir$ac_delim
19543 +dvidir!$dvidir$ac_delim
19544 +pdfdir!$pdfdir$ac_delim
19545 +psdir!$psdir$ac_delim
19546 +libdir!$libdir$ac_delim
19547 +localedir!$localedir$ac_delim
19548 +mandir!$mandir$ac_delim
19549 +DEFS!$DEFS$ac_delim
19550 +ECHO_C!$ECHO_C$ac_delim
19551 +ECHO_N!$ECHO_N$ac_delim
19552 +ECHO_T!$ECHO_T$ac_delim
19553 +LIBS!$LIBS$ac_delim
19554 +build_alias!$build_alias$ac_delim
19555 +host_alias!$host_alias$ac_delim
19556 +target_alias!$target_alias$ac_delim
19557 +build!$build$ac_delim
19558 +build_cpu!$build_cpu$ac_delim
19559 +build_vendor!$build_vendor$ac_delim
19560 +build_os!$build_os$ac_delim
19561 +host!$host$ac_delim
19562 +host_cpu!$host_cpu$ac_delim
19563 +host_vendor!$host_vendor$ac_delim
19564 +host_os!$host_os$ac_delim
19565 +target!$target$ac_delim
19566 +target_cpu!$target_cpu$ac_delim
19567 +target_vendor!$target_vendor$ac_delim
19568 +target_os!$target_os$ac_delim
19569 +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
19570 +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
19571 +INSTALL_DATA!$INSTALL_DATA$ac_delim
19572 +CYGPATH_W!$CYGPATH_W$ac_delim
19573 +PACKAGE!$PACKAGE$ac_delim
19574 +VERSION!$VERSION$ac_delim
19575 +ACLOCAL!$ACLOCAL$ac_delim
19576 +AUTOCONF!$AUTOCONF$ac_delim
19577 +AUTOMAKE!$AUTOMAKE$ac_delim
19578 +AUTOHEADER!$AUTOHEADER$ac_delim
19579 +MAKEINFO!$MAKEINFO$ac_delim
19580 +install_sh!$install_sh$ac_delim
19581 +STRIP!$STRIP$ac_delim
19582 +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
19583 +mkdir_p!$mkdir_p$ac_delim
19585 +SET_MAKE!$SET_MAKE$ac_delim
19586 +am__leading_dot!$am__leading_dot$ac_delim
19587 +AMTAR!$AMTAR$ac_delim
19588 +am__tar!$am__tar$ac_delim
19589 +am__untar!$am__untar$ac_delim
19591 +CFLAGS!$CFLAGS$ac_delim
19592 +LDFLAGS!$LDFLAGS$ac_delim
19593 +CPPFLAGS!$CPPFLAGS$ac_delim
19594 +ac_ct_CC!$ac_ct_CC$ac_delim
19595 +EXEEXT!$EXEEXT$ac_delim
19596 +OBJEXT!$OBJEXT$ac_delim
19597 +DEPDIR!$DEPDIR$ac_delim
19598 +am__include!$am__include$ac_delim
19599 +am__quote!$am__quote$ac_delim
19600 +AMDEP_TRUE!$AMDEP_TRUE$ac_delim
19601 +AMDEP_FALSE!$AMDEP_FALSE$ac_delim
19602 +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
19603 +CCDEPMODE!$CCDEPMODE$ac_delim
19604 +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
19605 +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
19607 +GREP!$GREP$ac_delim
19608 +EGREP!$EGREP$ac_delim
19609 +ALLOCA!$ALLOCA$ac_delim
19610 +PKGVERSION!$PKGVERSION$ac_delim
19611 +REPORT_BUGS_TO!$REPORT_BUGS_TO$ac_delim
19612 +REPORT_BUGS_TEXI!$REPORT_BUGS_TEXI$ac_delim
19613 +MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
19614 +MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
19615 +MAINT!$MAINT$ac_delim
19616 +LIBOBJS!$LIBOBJS$ac_delim
19619 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
19621 + elif $ac_last_try; then
19622 + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19623 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
19624 + { (exit 1); exit 1; }; }
19626 + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19630 +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
19631 +if test -n "$ac_eof"; then
19632 + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
19633 + ac_eof=`expr $ac_eof + 1`
19636 +cat >>$CONFIG_STATUS <<_ACEOF
19637 +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
19638 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19641 +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
19642 +s/^/s,@/; s/!/@,|#_!!_#|/
19645 +s/'"$ac_delim"'$/,g/; t
19647 +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
19648 +' >>$CONFIG_STATUS <conf$$subs.sed
19649 +rm -f conf$$subs.sed
19650 +cat >>$CONFIG_STATUS <<_ACEOF
19656 +for ac_last_try in false false false false false :; do
19657 + cat >conf$$subs.sed <<_ACEOF
19658 +LTLIBOBJS!$LTLIBOBJS$ac_delim
19661 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 1; then
19663 + elif $ac_last_try; then
19664 + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19665 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
19666 + { (exit 1); exit 1; }; }
19668 + ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19672 +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
19673 +if test -n "$ac_eof"; then
19674 + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
19675 + ac_eof=`expr $ac_eof + 1`
19678 +cat >>$CONFIG_STATUS <<_ACEOF
19679 +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
19680 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
19683 +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
19684 +s/^/s,@/; s/!/@,|#_!!_#|/
19687 +s/'"$ac_delim"'$/,g/; t
19689 +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
19690 +' >>$CONFIG_STATUS <conf$$subs.sed
19691 +rm -f conf$$subs.sed
19692 +cat >>$CONFIG_STATUS <<_ACEOF
19699 +# VPATH may cause trouble with some makes, so we remove $(srcdir),
19700 +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19701 +# trailing colons and then remove the whole line if VPATH becomes empty
19702 +# (actually we leave an empty line to preserve line numbers).
19703 +if test "x$srcdir" = x.; then
19704 + ac_vpsub='/^[ ]*VPATH[ ]*=/{
19705 +s/:*\$(srcdir):*/:/
19706 +s/:*\${srcdir}:*/:/
19708 +s/^\([^=]*=[ ]*\):*/\1/
19714 +cat >>$CONFIG_STATUS <<\_ACEOF
19715 +fi # test -n "$CONFIG_FILES"
19718 +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
19721 + :[FHLC]) ac_mode=$ac_tag; continue;;
19723 + case $ac_mode$ac_tag in
19725 + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
19726 +echo "$as_me: error: Invalid tag $ac_tag." >&2;}
19727 + { (exit 1); exit 1; }; };;
19728 + :[FH]-) ac_tag=-:-;;
19729 + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19740 + :L) ac_source=$1;;
19746 + -) ac_f="$tmp/stdin";;
19747 + *) # Look for the file first in the build tree, then in the source tree
19748 + # (if the path is not absolute). The absolute path cannot be DOS-style,
19749 + # because $ac_f cannot contain `:'.
19750 + test -f "$ac_f" ||
19753 + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19755 + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
19756 +echo "$as_me: error: cannot find input file: $ac_f" >&2;}
19757 + { (exit 1); exit 1; }; };;
19759 + ac_file_inputs="$ac_file_inputs $ac_f"
19762 + # Let's still pretend it is `configure' which instantiates (i.e., don't
19763 + # use $as_me), people would be surprised to read:
19764 + # /* config.h. Generated by config.status. */
19765 + configure_input="Generated from "`IFS=:
19766 + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
19767 + if test x"$ac_file" != x-; then
19768 + configure_input="$ac_file. $configure_input"
19769 + { echo "$as_me:$LINENO: creating $ac_file" >&5
19770 +echo "$as_me: creating $ac_file" >&6;}
19774 + *:-:* | *:-) cat >"$tmp/stdin";;
19779 + ac_dir=`$as_dirname -- "$ac_file" ||
19780 +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19781 + X"$ac_file" : 'X\(//\)[^/]' \| \
19782 + X"$ac_file" : 'X\(//\)$' \| \
19783 + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19784 +echo X"$ac_file" |
19785 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19789 + /^X\(\/\/\)[^/].*/{
19802 + { as_dir="$ac_dir"
19803 + case $as_dir in #(
19804 + -*) as_dir=./$as_dir;;
19806 + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
19809 + case $as_dir in #(
19810 + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
19811 + *) as_qdir=$as_dir;;
19813 + as_dirs="'$as_qdir' $as_dirs"
19814 + as_dir=`$as_dirname -- "$as_dir" ||
19815 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19816 + X"$as_dir" : 'X\(//\)[^/]' \| \
19817 + X"$as_dir" : 'X\(//\)$' \| \
19818 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19820 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19824 + /^X\(\/\/\)[^/].*/{
19837 + test -d "$as_dir" && break
19839 + test -z "$as_dirs" || eval "mkdir $as_dirs"
19840 + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
19841 +echo "$as_me: error: cannot create directory $as_dir" >&2;}
19842 + { (exit 1); exit 1; }; }; }
19846 +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19848 + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19849 + # A ".." for each directory in $ac_dir_suffix.
19850 + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
19851 + case $ac_top_builddir_sub in
19852 + "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19853 + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19856 +ac_abs_top_builddir=$ac_pwd
19857 +ac_abs_builddir=$ac_pwd$ac_dir_suffix
19858 +# for backward compatibility:
19859 +ac_top_builddir=$ac_top_build_prefix
19862 + .) # We are building in place.
19864 + ac_top_srcdir=$ac_top_builddir_sub
19865 + ac_abs_top_srcdir=$ac_pwd ;;
19866 + [\\/]* | ?:[\\/]* ) # Absolute name.
19867 + ac_srcdir=$srcdir$ac_dir_suffix;
19868 + ac_top_srcdir=$srcdir
19869 + ac_abs_top_srcdir=$srcdir ;;
19870 + *) # Relative name.
19871 + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19872 + ac_top_srcdir=$ac_top_build_prefix$srcdir
19873 + ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19875 +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19885 + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19886 + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19890 +cat >>$CONFIG_STATUS <<\_ACEOF
19891 +# If the template does not know about datarootdir, expand it.
19892 +# FIXME: This hack should be removed a few years after 2.60.
19893 +ac_datarootdir_hack=; ac_datarootdir_seen=
19895 +case `sed -n '/datarootdir/ {
19904 +' $ac_file_inputs` in
19905 +*datarootdir*) ac_datarootdir_seen=yes;;
19906 +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19907 + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19908 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19910 +cat >>$CONFIG_STATUS <<_ACEOF
19911 + ac_datarootdir_hack='
19912 + s&@datadir@&$datadir&g
19913 + s&@docdir@&$docdir&g
19914 + s&@infodir@&$infodir&g
19915 + s&@localedir@&$localedir&g
19916 + s&@mandir@&$mandir&g
19917 + s&\\\${datarootdir}&$datarootdir&g' ;;
19921 +# Neutralize VPATH when `$srcdir' = `.'.
19922 +# Shell code in configure.ac might set extrasub.
19923 +# FIXME: do we really want to maintain this feature?
19924 +cat >>$CONFIG_STATUS <<_ACEOF
19928 +cat >>$CONFIG_STATUS <<\_ACEOF
19930 +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19931 +s&@configure_input@&$configure_input&;t t
19932 +s&@top_builddir@&$ac_top_builddir_sub&;t t
19933 +s&@srcdir@&$ac_srcdir&;t t
19934 +s&@abs_srcdir@&$ac_abs_srcdir&;t t
19935 +s&@top_srcdir@&$ac_top_srcdir&;t t
19936 +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19937 +s&@builddir@&$ac_builddir&;t t
19938 +s&@abs_builddir@&$ac_abs_builddir&;t t
19939 +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19940 +s&@INSTALL@&$ac_INSTALL&;t t
19941 +$ac_datarootdir_hack
19942 +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
19944 +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19945 + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
19946 + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
19947 + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19948 +which seems to be undefined. Please make sure it is defined." >&5
19949 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19950 +which seems to be undefined. Please make sure it is defined." >&2;}
19952 + rm -f "$tmp/stdin"
19954 + -) cat "$tmp/out"; rm -f "$tmp/out";;
19955 + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
19964 +# Transform confdefs.h into a sed script `conftest.defines', that
19965 +# substitutes the proper values into config.h.in to produce config.h.
19966 +rm -f conftest.defines conftest.tail
19967 +# First, append a space to every undef/define line, to ease matching.
19968 +echo 's/$/ /' >conftest.defines
19969 +# Then, protect against being on the right side of a sed subst, or in
19970 +# an unquoted here document, in config.status. If some macros were
19971 +# called several times there might be several #defines for the same
19972 +# symbol, which is useless. But do not sort them, since the last
19973 +# AC_DEFINE must be honored.
19974 +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19975 +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
19976 +# NAME is the cpp macro being defined, VALUE is the value it is being given.
19977 +# PARAMS is the parameter list in the macro definition--in most cases, it's
19978 +# just an empty string.
19979 +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
19980 +ac_dB='\\)[ (].*,\\1define\\2'
19988 + s/^[ ]*#[ ]*define[ ][ ]*//
19993 + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
19994 + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
19995 + ' >>conftest.defines
19997 +# Remove the space that was appended to ease matching.
19998 +# Then replace #undef with comments. This is necessary, for
19999 +# example, in the case of _POSIX_SOURCE, which is predefined and required
20000 +# on some systems where configure will not decide to define it.
20001 +# (The regexp can be short, since the line contains either #define or #undef.)
20003 +s,^[ #]*u.*,/* & */,' >>conftest.defines
20005 +# Break up conftest.defines:
20006 +ac_max_sed_lines=50
20008 +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
20009 +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
20010 +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
20012 +ac_in='$ac_file_inputs'
20013 +ac_out='"$tmp/out1"'
20014 +ac_nxt='"$tmp/out2"'
20018 + # Write a here document:
20019 + cat >>$CONFIG_STATUS <<_ACEOF
20020 + # First, check the format of the line:
20021 + cat >"\$tmp/defines.sed" <<\\CEOF
20022 +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
20023 +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
20027 + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
20029 + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
20030 + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
20031 + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
20032 + grep . conftest.tail >/dev/null || break
20033 + rm -f conftest.defines
20034 + mv conftest.tail conftest.defines
20036 +rm -f conftest.defines conftest.tail
20038 +echo "ac_result=$ac_in" >>$CONFIG_STATUS
20039 +cat >>$CONFIG_STATUS <<\_ACEOF
20040 + if test x"$ac_file" != x-; then
20041 + echo "/* $configure_input */" >"$tmp/config.h"
20042 + cat "$ac_result" >>"$tmp/config.h"
20043 + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
20044 + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
20045 +echo "$as_me: $ac_file is unchanged" >&6;}
20048 + mv "$tmp/config.h" $ac_file
20051 + echo "/* $configure_input */"
20054 + rm -f "$tmp/out12"
20055 +# Compute $ac_file's index in $config_headers.
20057 +for _am_header in $config_headers :; do
20058 + case $_am_header in
20059 + $ac_file | $ac_file:* )
20062 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
20065 +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
20066 +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20067 + X$ac_file : 'X\(//\)[^/]' \| \
20068 + X$ac_file : 'X\(//\)$' \| \
20069 + X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
20071 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20075 + /^X\(\/\/\)[^/].*/{
20087 + s/.*/./; q'`/stamp-h$_am_stamp_count
20090 + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
20091 +echo "$as_me: executing $ac_file commands" >&6;}
20096 + case $ac_file$ac_mode in
20097 + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
20098 + # Strip MF so we end up with the name of the file.
20099 + mf=`echo "$mf" | sed -e 's/:.*$//'`
20100 + # Check whether this is an Automake generated Makefile or not.
20101 + # We used to match only the files named `Makefile.in', but
20102 + # some people rename them; so instead we look at the file content.
20103 + # Grep'ing the first line is not enough: some people post-process
20104 + # each Makefile.in and add a new line on top of each file to say so.
20105 + # So let's grep whole file.
20106 + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
20107 + dirpart=`$as_dirname -- "$mf" ||
20108 +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20109 + X"$mf" : 'X\(//\)[^/]' \| \
20110 + X"$mf" : 'X\(//\)$' \| \
20111 + X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
20113 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20117 + /^X\(\/\/\)[^/].*/{
20133 + # Extract the definition of DEPDIR, am__include, and am__quote
20134 + # from the Makefile without running `make'.
20135 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
20136 + test -z "$DEPDIR" && continue
20137 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
20138 + test -z "am__include" && continue
20139 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
20140 + # When using ansi2knr, U may be empty or an underscore; expand it
20141 + U=`sed -n 's/^U = //p' < "$mf"`
20142 + # Find all dependency output files, they are included files with
20143 + # $(DEPDIR) in their names. We invoke sed twice because it is the
20144 + # simplest approach to changing $(DEPDIR) to its actual value in the
20146 + for file in `sed -n "
20147 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
20148 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
20149 + # Make sure the directory exists.
20150 + test -f "$dirpart/$file" && continue
20151 + fdir=`$as_dirname -- "$file" ||
20152 +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20153 + X"$file" : 'X\(//\)[^/]' \| \
20154 + X"$file" : 'X\(//\)$' \| \
20155 + X"$file" : 'X\(/\)' \| . 2>/dev/null ||
20157 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20161 + /^X\(\/\/\)[^/].*/{
20174 + { as_dir=$dirpart/$fdir
20175 + case $as_dir in #(
20176 + -*) as_dir=./$as_dir;;
20178 + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
20181 + case $as_dir in #(
20182 + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
20183 + *) as_qdir=$as_dir;;
20185 + as_dirs="'$as_qdir' $as_dirs"
20186 + as_dir=`$as_dirname -- "$as_dir" ||
20187 +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20188 + X"$as_dir" : 'X\(//\)[^/]' \| \
20189 + X"$as_dir" : 'X\(//\)$' \| \
20190 + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20192 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20196 + /^X\(\/\/\)[^/].*/{
20209 + test -d "$as_dir" && break
20211 + test -z "$as_dirs" || eval "mkdir $as_dirs"
20212 + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
20213 +echo "$as_me: error: cannot create directory $as_dir" >&2;}
20214 + { (exit 1); exit 1; }; }; }
20215 + # echo "creating $dirpart/$file"
20216 + echo '# dummy' > "$dirpart/$file"
20225 +{ (exit 0); exit 0; }
20227 +chmod +x $CONFIG_STATUS
20228 +ac_clean_files=$ac_clean_files_save
20231 +# configure is writing to config.log, and then calls config.status.
20232 +# config.status does its own redirection, appending to config.log.
20233 +# Unfortunately, on DOS this fails, as config.log is still kept open
20234 +# by configure, so config.status won't be able to write to it; its
20235 +# output is simply discarded. So we exec the FD to /dev/null,
20236 +# effectively closing config.log, so it can be properly (re)opened and
20237 +# appended to by config.status. When coming back to configure, we
20238 +# need to make the FD available again.
20239 +if test "$no_create" != yes; then
20241 + ac_config_status_args=
20242 + test "$silent" = yes &&
20243 + ac_config_status_args="$ac_config_status_args --quiet"
20245 + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20246 + exec 5>>config.log
20247 + # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20248 + # would make configure fail if this is the last instruction.
20249 + $ac_cs_success || { (exit 1); exit 1; }
20253 +++ b/convert/configure.ac
20255 +dnl Process this file with autoconf to produce a configure script.
20257 +AC_INIT(convert, 3.0.4)
20258 +AC_CANONICAL_TARGET
20261 +AC_CONFIG_SRCDIR(convert.c)
20269 +AC_CONFIG_HEADERS([config.h])
20270 +AC_CHECK_HEADERS(stddef.h stdlib.h strings.h unistd.h limits.h)
20271 +AC_CHECK_HEADERS(fcntl.h sys/file.h)
20276 +AC_CHECK_FUNCS(strchr strtok memcpy)
20281 +CONV_NEED_DECLARATION(malloc)
20282 +CONV_NEED_DECLARATION(realloc)
20283 +CONV_NEED_DECLARATION(free)
20284 +CONV_NEED_DECLARATION(strtok)
20286 +ACX_PKGVERSION([MIPS Convert])
20287 +ACX_BUGURL([http://support.codesourcery.com/])
20289 +AM_MAINTAINER_MODE
20291 +AC_CONFIG_FILES([Makefile])
20294 +++ b/convert/conv.1
20296 +.TH conv 1 "29 Jul 2003" "MIPS SDE" "Programmer's Manual"
20303 +conv \- ELF object file converter
20307 +.RB [ "\-a \fIaddr" [ /\fIsize ]]
20308 +.RB [ "\-a \fIaddr" [ :\fIlimit ]]
20309 +.RB [ "\-R \fIoffs" ]
20310 +.RB [ "\-f \fIfmt" ]
20311 +.RB [ "\-i \fIoffs" ]
20312 +.RB [ "\-w \fIwidth" ]
20313 +.RB [ "\-b \fIbyte,..." ]
20315 +.RB [ "\-s \fIsize" ]
20316 +.RB [ "\-x \fIseg,..." ]
20317 +.RB [ "\-o \fIofile" ]
20322 +command takes ELF executable
20324 +and converts it into an ASCII or encoded binary format, suitable for
20325 +downloading onto a PROM programmer or evaluation board. It can take
20326 +horizontal and/or vertical slices through the file, to cater for PROM
20327 +programmers that do not have this facility or memory capacity.
20331 +Lists the segments in the ELF file's program header, for possible use
20334 +option below; does not produce any other output.
20337 +Selects verbose mode, which makes the program report its actions as it
20338 +converts the file.
20341 +Selects PROM mode: output addresses start at zero; the read-only
20342 +segments are converted first and the other segments are concatenated
20343 +to them (aligned to 16 byte boundaries). If this option is not given,
20344 +then the segments are converted in program header order, and the
20345 +output addresses are the data's actual virtual addresses.
20348 +Requests symbol output: for formats which support this the file's
20349 +symbol table is also converted and sent to the output file.
20351 +.B \-a \fIaddr\fR[/\fIsize\fR]
20353 +.B \-a \fIaddr\fR[:\fIlimit\fR]
20354 +Specifies the physical address range of the PROM, for use with the
20356 +option. All input data located between \fIaddr\fP and \fIlimit\fP
20357 +(i.e. between \fIaddr\fP and \fIaddr\fP+\fIsize\fP) are deemed to be
20358 +intended for PROM execution, and are placed at the relevant offset
20359 +from \fIaddr\fP. Segments outside of this address range are assumed
20360 +to be intended for relocation to RAM, and are concatenated to the end
20361 +of the last read-only segment. The default value for \fIaddr\fP is
20362 +0x1fc00000, and the default \fIsize\fP is 0x400000 (i.e. 4Mb).
20365 +Selects raw binary input mode, which ignores any ELF headers and
20366 +converts the whole input file into the output format, starting at the
20367 +selected PROM base address.
20370 +Selects raw binary input mode as above, but places the input
20371 +at offset \fIoffs\fP from the PROM base address.
20374 +Selects the output format, from the list below. If not specified then
20375 +the environment variable
20377 +is used. The default if neither of these are specified is
20382 +Motorola S-records, using S3 and S7 (32-bit address) records; symbol
20383 +output can be provided via S4 records, as supported by LSI PMON.
20386 +Same as above, except using S2 and S8 (24-bit address) records, to
20387 +suit some PROM programmers.
20390 +Same as above, except using S1 and S9 (16-bit address) records.
20393 +High density (radix 64) ASCII encoding for downloading by the
20395 +monitor; symbol output is supported.
20398 +Binary S-record format for downloading by the
20403 +Proprietary binary format for
20408 +Raw binary output, suitable for further conversion by another user
20413 +Specifies the width of CPU data bus in bits (default: 32).
20415 +.BI \-b " byte,..."
20416 +The input file is read in multiples of
20418 +bits, and then these bytes are selected from it. The
20420 +.RB `` 0,1,2,3 '',
20421 +which sends all bytes in their file order. To
20422 +perform a byte swap specify
20423 +.RB `` 3,2,1,0 ''.
20424 +To program four PROMs with
20425 +consecutive bytes, run
20434 +To handle interleaved PROMs, multiply the PROM width by the interleave,
20437 +for two-way interleave on a 32-bit bus), and then run
20439 +interleave \(mu byte-width times
20450 +Specified together to split a large program into multiple PROMs. The
20452 +flag specifies the initial offset, and
20454 +the size of the PROM. For example for two 128K proms:
20457 +conv -f s3 -i 0x00000 -s 0x20000 -o prom.s31 prom
20458 +conv -f s3 -i 0x20000 -s 0x20000 -o prom.s32 prom
20462 +.BI \-x " seg,..."
20463 +Exclude the following segments from the output; the segment numbers
20464 +can be determined using the
20471 +as the output file, default is standard output.
20475 +++ b/convert/conv.texi
20477 +\input texinfo @c -*- Texinfo -*-
20478 +@c Copyright 1993-2003,2008
20479 +@c Free Software Foundation, Inc.
20480 +@c Contributed by MIPS Technologies, Inc.
20481 +@setfilename conv.info
20485 +START-INFO-DIR-ENTRY
20486 +* Convert: (conv). The MIPS SDE tool "sde-conv"
20487 +END-INFO-DIR-ENTRY
20492 +Copyright @copyright{} 1998-2003 MIPS Technologies, Inc. All Rights Reserved.
20497 +@c This file documents the MIPS ELF converter
20499 +@c Copyright (C) 1998-2003 MIPS Technologies, Inc. All Rights Reserved.
20503 +@setchapternewpage odd
20504 +@settitle MIPS SDE ELF Conversion Tool
20507 +@title MIPS SDE ELF Conversion Tool
20508 +@subtitle @code{sde-conv}
20509 +@subtitle Version 5.0
20511 +@subtitle October 2003
20512 +@author MIPS Technologies Inc
20516 +\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
20517 +\xdef\manvers{\$Revision$} % For use in headers, footers too
20518 +{\parskip=0pt \hfill MIPS Technologies Inc\par \hfill \manvers\par \hfill
20519 +\TeX{}info \texinfoversion\par }
20522 +@vskip 0pt plus 1filll
20523 +Copyright @copyright{} 1998-2003 MIPS Technologies, Inc. All Rights Reserved.
20527 +@node Top, (dir), (dir), (dir)
20532 +@cindex convert ELF files
20535 +sde-conv [ -l ] [ -v ] [ -y ] [ -p ] [ -r ]
20536 + [ -a @var{addr}[/@var{size}] ]
20537 + [ -a @var{addr}[:@var{limit}] ]
20538 + [ -f @var{fmt} ] [ -R @var{offs} ]
20539 + [ -w @var{width} ] [ -b @var{byte},... ]
20540 + [ -i @var{offs} ] [ -s @var{size} ]
20541 + [ -x @var{seg},... ] [ -o @var{ofile} ] @var{ifile}
20544 +The @code{sde-conv} utility takes ELF executable @var{ifile}
20545 +and converts it into an ASCII or encoded binary format, suitable for
20546 +downloading onto a PROM programmer or evaluation board. It can take
20547 +horizontal and/or vertical slices through the file, to cater for PROM
20548 +programmers that do not have this facility or memory capacity.
20552 +@item -o @var{ofile}
20553 +Selects @var{ofile}
20554 +as the output file, the default is the standard output. Note: you must
20555 +use this for the binary output format.
20557 +@cindex list program segments
20559 +Lists the segments in the ELF file's program header, for possible use
20560 +in the @code{-x} option below; does not produce any other output.
20563 +Selects verbose mode, which makes the program report its actions as it
20564 +converts the file.
20566 +@cindex output symbol data
20568 +Requests symbol output: for formats which support this the file's
20569 +symbol table is also converted and sent to the output file.
20571 +@cindex specify PROM address
20572 +@item -a @var{addr}
20573 +@itemx -a @var{addr}:@var{limit}
20574 +@itemx -a @var{addr}/@var{size}
20575 +Selects PROM output mode and specifies the physical address range of the
20576 +PROM. All input data located between @var{addr} and @var{limit} (or
20577 +between @var{addr} and @var{addr}+@var{size}) are deemed to be
20578 +PROM-resident, and are mapped to their relative offset from @var{addr}.
20579 +Segments outside of this address range are assumed to be intended for
20580 +relocation to RAM, and they are concatenated to the end of the last
20581 +PROM-resident segment (rounded to the next 16 byte boundary). The
20582 +default value for @var{addr} is @code{1fc00000}, and the default
20583 +@var{size} is @code{400000} (i.e. 4Mb).
20585 +Note that if the code segment has a load address that doesn't fall
20586 +inside the ROM then it will get treated like an initialised data
20587 +segment. It will get mapped to the start of the ROM (the reset
20588 +exception address) if it was linked with the lowest address, and then
20589 +your reset code can be carefully written to copy the code segment
20592 +@cindex create PROM image
20594 +Selects PROM output mode, equivalent to @samp{-a@ 1fc00000/400000}.
20596 +@cindex raw binary input
20598 +Selects raw binary input mode, which ignores any ELF headers and
20599 +converts the whole input file into the output format, starting at the
20600 +selected PROM base address.
20602 +@item -R @var{offs}
20603 +Selects raw binary input mode as above, but places the input
20604 +at offset @var{offs} from the PROM base address.
20606 +@cindex output file format
20607 +@item -f @var{fmt}
20608 +Selects the output format, from the list below. If not specified then
20609 +the environment variable @code{DLTYPE}
20610 +is used. The default if neither of these are specified is
20618 +Motorola S-records, using S3 and S7 (32-bit address) records. Symbol
20619 +output is provided via S4 records, as supported by LSI PMON, if the
20620 +@code{-y} option is also used.
20623 +Same as above, except using S2 and S8 (24-bit address) records, to
20624 +suit some PROM programmers.
20627 +Same as above, except using S1 and S9 (16-bit address) records.
20629 +@cindex LSI PMON format
20631 +High density (radix 64) ASCII encoding for downloading by the
20633 +monitor; symbol output is supported with the @code{-y} option.
20635 +@cindex IDT/sim binary format
20637 +Binary S-record format for downloading by the @samp{IDT/sim} monitor.
20639 +@cindex Stag binary format
20642 +Proprietary binary format for @samp{Stag} PROM programmers.
20644 +@cindex MIPS flash format
20647 +MIPS flash file format, suitable for downloading to a Malta
20650 +@cindex raw binary output
20652 +Raw binary output, suitable for further conversion by another user
20655 +@cindex relocated ELF
20658 +Relocated ELF executable object file output, with the code and data
20659 +relocated to their new addresses in ROM, as selected by the @samp{-p} or
20660 +@samp{-a} options. This can be used to generate a ROM image which can be
20661 +loaded by gdb's MDI interface. Note that symbols and other debug
20662 +information are not copied to the new file, and the file's entrypoint
20663 +address is set to the base ROM address.
20666 +@cindex PROM width
20667 +@item -w @var{width}
20668 +Specifies the width of CPU data bus in bits (default: 32).
20670 +@cindex byte select
20671 +@cindex interleaved PROMS
20672 +@item -b @var{byte},...
20673 +The input file is read in multiples of @var{width} bits, and then these
20674 +bytes are selected from it. The default is @samp{0,1,2,3}, which sends
20675 +all bytes in their file order. To perform a byte swap specify
20676 +@samp{3,2,1,0}. To program four PROMs with consecutive bytes, run
20677 +@code{conv} four times with @samp{-b0}, @samp{-b1}, @samp{-b2} and
20680 +To handle interleaved PROMs, multiply the PROM width by the interleave,
20681 +(e.g. @samp{-w64} for two-way interleave on a 32-bit bus), and then run
20682 +@code{conv} interleave times byte-width times
20683 +(e.g. @samp{-b0} to @samp{-b7}).
20685 +@cindex split into multiple PROMS
20686 +@item -i @var{offs}
20687 +@itemx -s @var{size}
20688 +Specified together to split a large program into multiple PROMs. The
20690 +flag specifies the initial offset, and
20692 +the size of the PROM. For example for two 128K proms:
20696 +conv -f s3 -i 0x00000 -s 0x20000 -o prom.s3.1 prom
20697 +conv -f s3 -i 0x20000 -s 0x20000 -o prom.s3.2 prom
20701 +@cindex select program segments
20702 +@item -x @var{seg},...
20703 +Exclude the following segments from the output; the segment numbers
20704 +can be determined using the @code{-l} option described above.
20710 +++ b/convert/convert.c
20712 +/* convert.c -- ELF to hex (etc) file converter
20714 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
20715 + Contributed by MIPS Technologies, Inc.
20717 + This program is free software; you can redistribute it and/or modify
20718 + it under the terms of the GNU General Public License as published by
20719 + the Free Software Foundation; either version 3, or (at your option)
20720 + any later version.
20722 + This program is distributed in the hope that it will be useful,
20723 + but WITHOUT ANY WARRANTY; without even the implied warranty of
20724 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20725 + GNU General Public License for more details.
20727 + You should have received a copy of the GNU General Public License
20728 + along with this program; If not, write to the Free Software
20729 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20730 + 02110-1301, USA. */
20732 +#include "sysdep.h"
20733 +#include "elfmips.h"
20734 +#include "conv-version.h"
20736 +#include <sys/stat.h>
20738 +#include <getopt.h>
20741 + const char *name;
20743 + void (*start) (FILE *, unsigned long, int);
20744 + void (*output) (unsigned long, unsigned char);
20745 + void (*sym) (char *, unsigned long);
20746 + void (*end) (unsigned long);
20747 + const char *desc;
20750 +extern void Srec3Start (FILE *, unsigned long, int);
20751 +extern void Srec2Start (FILE *, unsigned long, int);
20752 +extern void Srec1Start (FILE *, unsigned long, int);
20753 +extern void SrecOutput (unsigned long, unsigned char);
20754 +extern void SrecSym (char *, unsigned long);
20755 +extern void SrecEnd (unsigned long);
20757 +extern void LsiStart (FILE *, unsigned long, int);
20758 +extern void LsiOutput (unsigned long, unsigned char);
20759 +extern void LsiSym (char *, unsigned long);
20760 +extern void LsiEnd (unsigned long);
20762 +extern void StagStart (FILE *, unsigned long, int);
20763 +extern void StagOutput (unsigned long, unsigned char);
20764 +extern void StagEnd (unsigned long);
20766 +extern void BinStart (FILE *, unsigned long, int);
20767 +extern void BinOutput (unsigned long, unsigned char);
20768 +extern void BinEnd (unsigned long);
20770 +extern void IdtStart (FILE *, unsigned long, int);
20771 +extern void IdtOutput (unsigned long, unsigned char);
20772 +extern void IdtEnd (unsigned long);
20774 +extern void ElfStart (FILE *, unsigned long, int);
20775 +extern void ElfOutput (unsigned long, unsigned char);
20776 +extern void ElfEnd (unsigned long);
20778 +extern void MipsStart (FILE *, unsigned long, int);
20779 +extern void MipsOutput (unsigned long, unsigned char);
20780 +extern void MipsEnd (unsigned long);
20782 +static const struct format formats[] = {
20783 + {"srec", 0, Srec3Start, SrecOutput, SrecSym, SrecEnd,
20784 + "Motorola S-record (32-bit address)"},
20785 + {"s3", 0, Srec3Start, SrecOutput, SrecSym, SrecEnd,
20786 + "Motorola S-record (32-bit address)"},
20787 + {"s2", 0, Srec2Start, SrecOutput, SrecSym, SrecEnd,
20788 + "Motorola S-record (24-bit address)"},
20789 + {"s1", 0, Srec1Start, SrecOutput, SrecSym, SrecEnd,
20790 + "Motorola S-record (16-bit address)"},
20791 + {"lsi", 0, LsiStart, LsiOutput, LsiSym, LsiEnd,
20792 + "LSI fast download (PMON)"},
20793 + {"fl", 0, MipsStart, MipsOutput, 0, MipsEnd,
20794 + "MIPS flash download"},
20795 + {"idt", 1, IdtStart, IdtOutput, 0, IdtEnd,
20796 + "IDT/sim binary S-record"},
20797 + {"sbin", 1, StagStart, StagOutput, 0, StagEnd,
20798 + "Stag PROM programmer"},
20799 + {"bin", 1, BinStart, BinOutput, 0, BinEnd,
20801 + {"relf", 1, ElfStart, ElfOutput, 0, ElfEnd,
20802 + "Relocated ELF"},
20809 +static int symflag = 0;
20810 +static int listflag = 0;
20811 +static int verbose = 0;
20813 +#define MAXALIGN 16 /* align segments to 16 byte boundaries */
20815 +#define MAXSEGS 20
20816 +static unsigned segomit[MAXSEGS];
20817 +static unsigned omitseg[MAXSEGS];
20818 +static unsigned nomit;
20820 +#define MAXWIDTH 8
20821 +static unsigned bytelist[MAXWIDTH];
20822 +static unsigned nbytes;
20823 +static unsigned width = 4; /* in bytes */
20825 +typedef unsigned long msize_t;
20826 + msize_t prombase = 0x1fc00000;
20827 +static msize_t promlimit = 0;
20828 +static msize_t promstart;
20829 +static msize_t promend;
20834 + const struct format *fmt;
20835 + FILE* to = error ? stderr : stdout;
20838 +"usage: %s [-lvypr] [-f fmt] [-w width] [-b byte,...] [-i offs] [-s size]\n"
20839 +" [-R offs] [-x seg,...] [-a addr] [-o file] [file]\n"
20840 +" -l list segments only, no conversion\n"
20841 +" -v verbose conversion option\n"
20842 +" -y include symbols\n"
20843 +" -p prom mode (start addresses at zero)\n"
20844 +" -a addr[:lim] address of prom (default: 1fc00000:20000000)\n"
20845 +" -a addr[/size] address of prom (default: 1fc00000/400000)\n"
20846 +" -r raw binary input (not ELF)\n"
20847 +" -R offs raw binary, start addresses at offs (default: 0)\n"
20848 +" -EB | -EL set big or little endianness\n"
20849 +" -f fmt output format (default: srec)\n"
20850 +" -w width data width in bits (default: 32)\n"
20851 +" -b byte,... select bytes (default: 0,1,2,3)\n"
20852 +" -i offs initial input offset (default: 0)\n"
20853 +" -s size prom size (default: infinite)\n"
20854 +" -x seg,... exclude segments (default: none)\n"
20857 + fprintf (to, "\nOutput formats (-f):\n");
20858 + for (fmt = formats; fmt->name; fmt++)
20859 + fprintf (to, " %s\t%s\n", fmt->name, fmt->desc ? fmt->desc : "");
20861 + fprintf (to, "\nReport bugs to " CONVERT_REPORT_BUGS_TO ".\n");
20868 +parselist (char *arg, unsigned *list, int lsize)
20873 + for (s = strtok (arg, ","); s; s = strtok (0, ",")) {
20874 + if (n >= lsize) {
20875 + fprintf (stderr, "%s: too many items in list\n", progname);
20878 + list[n++] = strtol (s, &ep, 0);
20880 + fprintf (stderr, "%s: bad number in list: %s\n", progname, s);
20888 +phtype (Elf32_Phdr *ph)
20890 + static char buf[11];
20892 + switch (ph->p_type) {
20898 + return "DYNAMIC ";
20900 + return "INTERP ";
20907 + case PT_MIPS_REGINFO:
20908 + return "REGINFO ";
20910 + sprintf (buf, "%08x", ph->p_type);
20917 +phflags (Elf32_Phdr *ph)
20919 + static char buf[4];
20920 + buf[0] = (ph->p_flags & PF_R) ? 'r' : '-';
20921 + buf[1] = (ph->p_flags & PF_W) ? 'w' : '-';
20922 + buf[2] = (ph->p_flags & PF_X) ? 'x' : '-';
20929 +convertSegment (FILE *ifp, const struct format *fmt, Elf32_Phdr *ph)
20931 + unsigned char buf[MAXWIDTH];
20932 + static msize_t req_top = 0, offs_top = 0;
20933 + static unsigned int last_flags = 0;
20934 + msize_t req, offset;
20935 + unsigned long skip = 0;
20938 + /* get requested physical address */
20939 + req = (ph->p_paddr ? ph->p_paddr : ph->p_vaddr);
20941 + offset = req & 0x1fffffff;
20942 + if (offset < prombase || offset >= promlimit) {
20943 + /* not a valid prom address: force to rom */
20944 + if (offs_top == 0) {
20945 + /* force to start, whatever it says in the file */
20946 + offset = prombase;
20949 + unsigned long align = ph->p_align ? ph->p_align - 1 : 0;
20950 + if (req == ((req_top + align) & ~align)
20951 + && ((ph->p_flags ^ last_flags) & PF_W) == 0) {
20952 + /* segment is contiguous and of same read/write type,
20953 + then keep its relative offset the same */
20954 + offset = offs_top + (req - req_top);
20957 + /* segment is not contiguous, or a different type,
20958 + put at next MAXALIGN boundary. */
20959 + align = MAXALIGN - 1;
20960 + offset = (offs_top + align) & ~align;
20966 + /* not a prom: preserve load address */
20970 + req_top = req + ph->p_memsz;
20971 + offs_top = offset + ph->p_memsz;
20972 + last_flags = ph->p_flags;
20975 + /* convert to offset from start of PROM */
20976 + offset -= prombase;
20977 + /* skip as many bytes as necessary to reach requested start */
20978 + if (offset < promstart) {
20979 + skip = (promstart - offset) * (width / nbytes);
20980 + if (skip >= ph->p_filesz)
20981 + skip = ph->p_filesz;
20982 + offset += ((skip + width - 1) / width) * nbytes;
20986 + if (skip < ph->p_filesz) {
20987 + fseek (ifp, ph->p_offset + skip, SEEK_SET);
20988 + n = ph->p_filesz - skip;
20990 + /* convert to offset and size in prom */
20991 + offset /= (width / nbytes);
20992 + n = (n + (width / nbytes) - 1) / (width / nbytes);
20996 + fprintf (stderr, "%s segment %08x:%08x -> %s %05x:%05x [",
20997 + phflags (ph), req, req + n,
20998 + fmt->name, offset, offset + n);
20999 + for (i = 0; i < width; i++) {
21000 + for (j = 0; j < nbytes; j++)
21001 + if (bytelist[j] == i)
21004 + fprintf (stderr, "%x", j);
21006 + fprintf (stderr, "-");
21008 + fprintf (stderr, "]\n");
21011 + while (n > 0 && offset < promend) {
21013 + if ((nr = fread (buf, 1, width, ifp)) <= 0) {
21014 + fprintf (stderr, "%s: bad file read\n", progname);
21017 + for (i = 0; i < nbytes; i++) {
21018 + int bn = bytelist[i];
21020 + (*fmt->output) (offset++, buf[bn]);
21028 +convertSymbols (FILE *ifp, Elf32_Ehdr *eh, const struct format *fmt)
21030 + Elf32_Shdr *shtab, *sh;
21034 + shtab = (Elf32_Shdr *) xmalloc (eh->e_shnum * sizeof(Elf32_Shdr));
21036 + fseek (ifp, eh->e_shoff, SEEK_SET);
21037 + if (elfShdrRead (ifp, eh, shtab, eh->e_shnum) != eh->e_shnum) {
21038 + fprintf (stderr,"%s: failed to read section headers\n", progname);
21042 + for (i = 0; i < eh->e_shnum; i++)
21043 + if (shtab[i].sh_type == SHT_SYMTAB)
21045 + if (i >= eh->e_shnum) {
21050 + /* get string table */
21051 + sh = &shtab[shtab[i].sh_link];
21052 + strtab = (char *) xmalloc (sh->sh_size);
21053 + fseek (ifp, sh->sh_offset, SEEK_SET);
21054 + if (fread (strtab, 1, sh->sh_size, ifp) != sh->sh_size) {
21055 + fprintf (stderr, "%s: cannot read string table\n", progname);
21059 + /* scan symbol table */
21061 + fseek (ifp, sh->sh_offset, SEEK_SET);
21062 + for (i = sh->sh_size / sh->sh_entsize; i != 0; i--) {
21066 + if (elfSymRead (ifp, eh, sh, &sym, 1) != 1) {
21067 + fprintf (stderr, "%s: cannot read symbol table\n", progname);
21070 + switch (sym.st_shndx) {
21076 + type = ELF32_ST_TYPE (sym.st_info);
21078 + case STT_SECTION:
21083 + /* only emit globals and functions */
21084 + if (ELF32_ST_BIND (sym.st_info) != STB_GLOBAL && type != STT_FUNC)
21087 + if (sym.st_other == 0xf0)
21088 + sym.st_value |= 1;
21090 + (*fmt->sym) (strtab + sym.st_name, sym.st_value);
21098 +/* comparison function for qsort() */
21100 +phcompar (const void *a, const void *b)
21102 + const Elf32_Phdr *pha = a;
21103 + const Elf32_Phdr *phb = b;
21104 + unsigned long addra = pha->p_paddr ? pha->p_paddr : pha->p_vaddr;
21105 + unsigned long addrb = phb->p_paddr ? phb->p_paddr : phb->p_vaddr;
21106 + return (addra == addrb) ? 0
21107 + : (addra < addrb) ? -1
21113 +#ifndef HAVE_STRTOUL
21114 +extern unsigned long int strtoul (const char *, char **, int);
21117 +static const struct option long_opts[] =
21119 + { "version", no_argument, NULL, 'V' },
21120 + { "help", no_argument, NULL, 'h' },
21121 + { 0, 0, NULL, 0 }
21125 +main(int argc, char **argv)
21127 + extern char *getenv ();
21128 + FILE *ifp, *ofp, *cfp;
21130 + Elf32_Phdr *phtab, *ph;
21131 + const struct format *fmt = 0;
21132 + char *infile = "a.out";
21133 + char *outfile = 0;
21136 + extern char *optarg;
21137 + extern int optind;
21138 + msize_t size = 0;
21140 + msize_t rawoffs = 0;
21142 + int bigendian = 0;
21144 + progname = argv[0];
21145 + if ((s = strrchr(progname, '/')) || (s = strrchr(progname, '\\')) ||
21146 + (s = strrchr(progname, ':')))
21147 + progname = s + 1;
21149 + fmtname = getenv ("DLTYPE");
21150 + while ((c = getopt_long(argc,argv,"prR:vylf:x:b:s:i:w:o:t:a:E:",
21151 + &long_opts[0], NULL)) != EOF)
21161 + rawoffs = strtoul (optarg, &s, 16);
21175 + fmtname = optarg;
21178 + nbytes = parselist (optarg, bytelist, MAXWIDTH);
21181 + nomit = parselist (optarg, segomit, MAXSEGS);
21184 + promstart = strtoul (optarg, &s, 0);
21189 + size = strtoul (optarg, &s, 0);
21195 + prombase = strtoul (optarg, &s, 16) & 0x1fffffff;
21196 + if (*s == '/' || *s == '#') {
21197 + promlimit = strtoul (++s, &s, 16) + prombase;
21199 + else if (*s == ':' || *s == '-') {
21200 + promlimit = strtoul (++s, &s, 16) & 0x1fffffff;
21201 + if (promlimit && (promlimit <= prombase)) {
21202 + fprintf (stderr, "%s: ROM limit below ROM base\n", progname);
21210 + width = strtoul (optarg, &s, 0);
21211 + if (*s || width % 8 != 0)
21216 + outfile = optarg;
21219 + fprintf (stderr, "%s: -t flag deprecated and ignored\n", progname);
21222 + if (optarg[0] == 'B' && optarg[1] == '\0')
21224 + else if (optarg[0] == 'L' && optarg[1] == '\0')
21227 + fprintf (stderr, "%s: -E%s flag not recognised\n", progname,
21236 + printf ("MIPS convert " CONVERT_PKGVERSION "\n");
21242 + if(optind < argc) {
21243 + infile = argv[optind++];
21244 + if (optind < argc)
21248 + if ((size || promstart) && !promflag) {
21249 + fprintf (stderr, "%s: -s or -i specified without -p\n", progname);
21253 + if (width == 0 || width > MAXWIDTH) {
21254 + fprintf (stderr, "%s: bad width\n", progname);
21258 + if (nbytes == 0) {
21259 + for (i = 0; i < width; i++)
21263 + if (nbytes != (nbytes & -nbytes)) {
21264 + fprintf (stderr, "%s: number of selected bytes not power of two\n",
21268 + if (nbytes > width) {
21269 + fprintf (stderr, "%s: number of selected bytes > data width\n",
21273 + for (i = 0; i < nbytes; i++)
21274 + if (bytelist[i] >= width) {
21275 + fprintf (stderr, "%s: bad byte select %d (should be 0-%d)\n",
21276 + progname, bytelist[i], width-1);
21281 + /* invert seg omit list */
21282 + for (i = 0; i < nomit; i++) {
21283 + int o = segomit[i];
21284 + if (o >= MAXSEGS) {
21285 + fprintf (stderr, "%s: bad segment number: %d\n",
21293 + for (fmt = formats; fmt->name; fmt++)
21294 + if (strcmp (fmtname, fmt->name) == 0)
21296 + if (!fmt->name) {
21297 + fprintf (stderr, "%s: unknown output format '%s'\n", fmtname,
21306 + promend = ULONG_MAX;
21308 + promend = promstart + size;
21310 + if (promlimit == 0) {
21312 + promlimit = prombase + 0x400000;
21314 + promlimit = prombase + size / nbytes * width;
21317 + if (!(ifp = fopen (infile, FOPEN_RB))) {
21322 + if (outfile && strcmp(outfile, "-")) {
21323 + if (!(ofp = fopen (outfile, fmt->binary ? FOPEN_WB : FOPEN_WT))) {
21332 + setmode (fileno (ofp), O_BINARY);
21337 + if (elfEhdrRead (ifp, &ehdr) != 1) {
21338 + fprintf (stderr,"%s: not an ELF object file: %s\n", progname, infile);
21342 + if (ehdr.e_type != ET_EXEC) {
21343 + fprintf(stderr,"%s: warning: not an executable ELF file: %s\n",
21344 + progname, infile);
21347 + bigendian = ehdr.e_ident[5] == ELFDATA2MSB;
21349 + if (ehdr.e_phoff == 0 || ehdr.e_phnum == 0) {
21350 + fprintf(stderr, "%s: missing ELF program header: %s\n",
21351 + progname, infile);
21355 + if (ehdr.e_phnum > MAXSEGS) {
21356 + fprintf(stderr, "%s: too many segments in ELF program header: %s\n",
21357 + progname, infile);
21361 + phtab = (Elf32_Phdr *) xmalloc (ehdr.e_phnum * sizeof(Elf32_Phdr));
21363 + fseek (ifp, ehdr.e_phoff, SEEK_SET);
21364 + if (elfPhdrRead (ifp, &ehdr, phtab, ehdr.e_phnum) != ehdr.e_phnum) {
21365 + fprintf (stderr,"%s: failed to read program header\n", progname);
21370 + /* fake up the header etc */
21373 + ehdr.e_phnum = 1;
21374 + ehdr.e_entry = prombase + rawoffs;
21375 + ph = phtab = (Elf32_Phdr *) xmalloc (sizeof(Elf32_Phdr));
21376 + ph->p_type = PT_LOAD;
21377 + ph->p_flags = PF_R | PF_X;
21378 + ph->p_vaddr = ph->p_paddr = prombase + rawoffs;
21379 + fstat (fileno (ifp), &stb);
21380 + ph->p_filesz = ph->p_memsz = stb.st_size;
21384 + printf ("Segment List\n");
21385 + printf ("Num Type Vaddr Paddr MemSz FSize FOffs Align Flgs\n");
21386 + for (ph = phtab; ph < &phtab[ehdr.e_phnum]; ph++) {
21387 + printf (" %1d %8s %08x %08x %05x %05x %05x %05x %s%s\n",
21388 + ph-phtab, phtype(ph), ph->p_vaddr, ph->p_paddr,
21389 + ph->p_memsz, ph->p_filesz, ph->p_offset, ph->p_align,
21390 + phflags(ph), omitseg[ph-phtab]?" (omitted)":"");
21395 + (*fmt->start) (ofp, ehdr.e_entry, bigendian);
21397 + /* sort program header table into physical address order */
21398 + qsort (phtab, ehdr.e_phnum, sizeof (phtab[0]), phcompar);
21401 + /* do prom-resident segments first */
21402 + for (ph = phtab; ph < &phtab[ehdr.e_phnum]; ph++)
21403 + if (ph->p_type == PT_LOAD) {
21404 + unsigned int offset;
21405 + offset = (ph->p_paddr ? ph->p_paddr : ph->p_vaddr)
21407 + if (offset >= prombase && offset < promlimit
21408 + && !omitseg[ph - phtab]) {
21409 + convertSegment (ifp, fmt, ph);
21410 + ph->p_type = PT_NULL;
21415 + /* then do all other segments in order */
21416 + for (ph = phtab; ph < &phtab[ehdr.e_phnum]; ph++)
21417 + if (ph->p_type == PT_LOAD && ph->p_filesz && !omitseg[ph - phtab])
21418 + convertSegment (ifp, fmt, ph);
21420 + if (symflag && !rawflag && fmt->sym)
21421 + convertSymbols (ifp, &ehdr, fmt);
21423 + (*fmt->end) (ehdr.e_entry);
21430 +++ b/convert/elf.h
21432 +/* elf.h: ELF data structures and values
21434 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
21435 + Contributed by MIPS Technologies, Inc.
21437 + This program is free software; you can redistribute it and/or modify
21438 + it under the terms of the GNU General Public License as published by
21439 + the Free Software Foundation; either version 3, or (at your option)
21440 + any later version.
21442 + This program is distributed in the hope that it will be useful,
21443 + but WITHOUT ANY WARRANTY; without even the implied warranty of
21444 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21445 + GNU General Public License for more details.
21447 + You should have received a copy of the GNU General Public License
21448 + along with this program; If not, write to the Free Software
21449 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21450 + 02110-1301, USA. */
21452 +typedef unsigned char Elf_Char;
21453 +typedef unsigned short Elf32_Half;
21454 +typedef unsigned long Elf32_Word;
21455 +typedef long Elf32_Sword;
21456 +typedef unsigned long Elf32_Off;
21457 +typedef unsigned long Elf32_Addr;
21459 +#define EI_NIDENT 16
21462 + Elf_Char e_ident[EI_NIDENT];
21463 + Elf32_Half e_type;
21464 + Elf32_Half e_machine;
21465 + Elf32_Word e_version;
21466 + Elf32_Addr e_entry;
21467 + Elf32_Off e_phoff;
21468 + Elf32_Off e_shoff;
21469 + Elf32_Word e_flags;
21470 + Elf32_Half e_ehsize;
21471 + Elf32_Half e_phentsize;
21472 + Elf32_Half e_phnum;
21473 + Elf32_Half e_shentsize;
21474 + Elf32_Half e_shnum;
21475 + Elf32_Half e_shstrndx;
21479 + Elf32_Word p_type; /* Identifies program segment type */
21480 + Elf32_Off p_offset; /* Segment file offset */
21481 + Elf32_Addr p_vaddr; /* Segment virtual address */
21482 + Elf32_Addr p_paddr; /* Segment physical address */
21483 + Elf32_Word p_filesz; /* Segment size in file */
21484 + Elf32_Word p_memsz; /* Segment size in memory */
21485 + Elf32_Word p_flags; /* Segment flags */
21486 + Elf32_Word p_align; /* Segment alignment, file & memory */
21490 + Elf32_Word sh_name;
21491 + Elf32_Word sh_type;
21492 + Elf32_Word sh_flags;
21493 + Elf32_Addr sh_addr;
21494 + Elf32_Off sh_offset;
21495 + Elf32_Word sh_size;
21496 + Elf32_Word sh_link;
21497 + Elf32_Word sh_info;
21498 + Elf32_Word sh_addralign;
21499 + Elf32_Word sh_entsize;
21503 + Elf32_Word st_name;
21504 + Elf32_Addr st_value;
21505 + Elf32_Word st_size;
21506 + Elf_Char st_info;
21507 + Elf_Char st_other;
21508 + Elf32_Half st_shndx;
21512 + Elf32_Addr r_offset;
21513 + Elf32_Word r_info;
21514 + Elf32_Sword r_addend;
21518 + Elf32_Addr r_offset;
21519 + Elf32_Word r_info;
21522 +/* these are the external file sizes (should be absolute values) */
21523 +#define ELFEHDRSZ sizeof(Elf32_Ehdr)
21524 +#define ELFPHDRSZ sizeof(Elf32_Phdr)
21525 +#define ELFSHDRSZ sizeof(Elf32_Shdr)
21526 +#define ELFSYMSZ sizeof(Elf32_Sym)
21527 +#define ELFRELASZ sizeof(Elf32_Rela)
21528 +#define ELFRELSZ sizeof(Elf32_Rel)
21530 +size_t elfEhdrRead(FILE *,Elf32_Ehdr *);
21531 +size_t elfEhdrWrite(FILE *,const Elf32_Ehdr *);
21533 +size_t elfPhdrRead(FILE *, const Elf32_Ehdr *, Elf32_Phdr *, size_t);
21534 +size_t elfPhdrWrite(FILE *, const Elf32_Ehdr *, const Elf32_Phdr *, size_t);
21536 +size_t elfShdrRead(FILE *,const Elf32_Ehdr *, Elf32_Shdr *,size_t);
21537 +size_t elfShdrWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,size_t);
21539 +size_t elfSymRead(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
21540 + Elf32_Sym *,size_t);
21541 +size_t elfSymWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
21542 + const Elf32_Sym *,size_t);
21544 +size_t elfRelaWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
21545 + const Elf32_Rela *,size_t);
21546 +size_t elfRelWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
21547 + const Elf32_Rel *,size_t);
21552 +/* e_ident[] fields */
21553 +#define EI_MAG0 0 /* id byte 0 index */
21554 +#define ELFMAG0 0x7F /* id byte 0 value */
21556 +#define EI_MAG1 1 /* id byte 1 index */
21557 +#define ELFMAG1 'E' /* id byte 1 value */
21559 +#define EI_MAG2 2 /* id byte 2 index */
21560 +#define ELFMAG2 'L' /* id byte 3 value */
21562 +#define EI_MAG3 3 /* id byte 3 index */
21563 +#define ELFMAG3 'F' /* id byte 3 value */
21565 +#define EI_CLASS 4 /* file class */
21566 +#define ELFCLASSNONE 0 /* invalid */
21567 +#define ELFCLASS32 1 /* 32-bit */
21568 +#define ELFCLASS64 2 /* 64-bit */
21570 +#define EI_DATA 5 /* data encoding */
21571 +#define ELFDATANONE 0 /* invalid */
21572 +#define ELFDATA2LSB 1 /* little endian */
21573 +#define ELFDATA2MSB 2 /* big endian */
21575 +#define EI_VERSION 6 /* file format version */
21577 +#define EI_PAD 7 /* start of padding */
21580 +/* e_type values */
21581 +#define ET_NONE 0 /* no file type */
21582 +#define ET_REL 1 /* relocatable */
21583 +#define ET_EXEC 2 /* executable */
21584 +#define ET_DYN 3 /* shared object */
21585 +#define ET_CORE 4 /* core file */
21586 +#define ET_LOPROC 0xFF00 /* processor-specific (lo) */
21587 +#define ET_HIPROC 0xFFFF /* processor-specific (hi) */
21589 +/* e_machine values */
21590 +#define EM_NONE 0 /* undefined machine */
21591 +#define EM_M32 1 /* AT&T WE 32100 */
21592 +#define EM_SPARC 2 /* SUN SPARC */
21593 +#define EM_386 3 /* Intel 80386 */
21594 +#define EM_68K 4 /* Motorola M68K family */
21595 +#define EM_88K 5 /* Motorola M88K family */
21596 +#define EM_860 7 /* Intel 80860 */
21597 +#define EM_MIPS 8 /* MIPS Rx000 */
21599 +/* e_version values */
21600 +#define EV_NONE 0 /* invalid */
21601 +#define EV_CURRENT 1 /* current version */
21603 +/* Program header */
21605 +/* p_type field */
21606 +#define PT_NULL 0 /* unused */
21607 +#define PT_LOAD 1 /* loadable segment */
21608 +#define PT_DYNAMIC 2 /* dynamic link information */
21609 +#define PT_INTERP 3 /* interpreter */
21610 +#define PT_NOTE 4 /* auxiliary information */
21611 +#define PT_SHLIB 5 /* shared library */
21612 +#define PT_PHDR 6 /* self */
21613 +#define PT_LOPROC 0x70000000 /* processor-specific (lo) */
21614 +#define PT_HIPROC 0x7FFFFFFF /* processor-specific (ho) */
21616 +/* p_flags bit fields */
21617 +#define PF_X (1 << 0) /* executable */
21618 +#define PF_W (1 << 1) /* writable */
21619 +#define PF_R (1 << 2) /* readable */
21620 +#define PF_MASKPROC 0xF0000000 /* processor-specific bits */
21622 +/* Section header */
21624 +/* sh_type values */
21625 +#define SHT_NULL 0 /* unused */
21626 +#define SHT_PROGBITS 1 /* program code or data */
21627 +#define SHT_SYMTAB 2 /* symbol table */
21628 +#define SHT_STRTAB 3 /* string table */
21629 +#define SHT_RELA 4 /* relocation records (with addends) */
21630 +#define SHT_HASH 5 /* symbol hash table */
21631 +#define SHT_DYNAMIC 6 /* dynamic linking table */
21632 +#define SHT_NOTE 7 /* comments */
21633 +#define SHT_NOBITS 8 /* zero program data (i.e. bss)*/
21634 +#define SHT_REL 9 /* relocation records (w/o addends) */
21635 +#define SHT_SHLIB 10 /* shared library */
21636 +#define SHT_DYNSYM 11 /* dynamic linking symbol table */
21637 +#define SHT_LOPROC 0x70000000 /* processor specific (lo) */
21638 +#define SHT_HIPROC 0x7FFFFFFF /* processor specific (hi) */
21639 +#define SHT_LOUSER 0x80000000 /* user specific (lo) */
21640 +#define SHT_HIUSER 0x8FFFFFFF /* user specific (hi) */
21642 +/* sh_flags bit fields */
21643 +#define SHF_WRITE (1 << 0) /* writable section */
21644 +#define SHF_ALLOC (1 << 1) /* allocated in program space */
21645 +#define SHF_EXECINSTR (1 << 2) /* executable instructions */
21646 +#define SHF_MASKPROC 0xF0000000 /* processor-specific bits */
21648 +/* symbol binding */
21649 +#define STB_LOCAL 0 /* local to this file */
21650 +#define STB_GLOBAL 1 /* globally visible */
21651 +#define STB_WEAK 2 /* weakly global */
21652 +#define STB_LOPROC 13 /* processor-specific (lo) */
21653 +#define STB_HIPROC 15 /* processor-specific (hi) */
21656 +#define STT_NOTYPE 0 /* unspecified */
21657 +#define STT_OBJECT 1 /* data object */
21658 +#define STT_FUNC 2 /* code object */
21659 +#define STT_SECTION 3 /* section symbol */
21660 +#define STT_FILE 4 /* file name symbol */
21661 +#define STT_LOPROC 13 /* processor-specific (lo) */
21662 +#define STT_HIPROC 15 /* processor-specific (hi) */
21664 +/* special reserved values for st_shndx */
21665 +#define SHN_UNDEF 0 /* undefined (external) symbol */
21666 +#define SHN_LORESERV 0xFF00 /* reserved values (lo) */
21667 +#define SHN_LOPROC 0xFF00 /* processor-specific (lo) */
21668 +#define SHN_HIPROC 0xFF1F /* processor-specific (hi) */
21669 +#define SHN_ABS 0xFFF1 /* absolute symbol */
21670 +#define SHN_COMMON 0xFFF2 /* common symbol */
21671 +#define SHN_HIRESERVE 0xFFFF /* reserved values (hi)*/
21673 +#define ELF32_R_SYM(i) ((i) >> 8)
21674 +#define ELF32_R_TYPE(i) ((i) & 0xff)
21675 +#define ELF32_R_INFO(sym,type) (((sym) << 8) | ((type) & 0xff))
21677 +#define ELF32_ST_BIND(i) ((i) >> 4)
21678 +#define ELF32_ST_TYPE(i) ((i) & 0xf)
21679 +#define ELF32_ST_INFO(bind,type) (((bind) << 4) | ((type) & 0xf))
21681 +++ b/convert/elfio.c
21683 +/* elfio.c: ELF file i/o primitives
21685 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
21686 + Contributed by MIPS Technologies, Inc.
21688 + This program is free software; you can redistribute it and/or modify
21689 + it under the terms of the GNU General Public License as published by
21690 + the Free Software Foundation; either version 3, or (at your option)
21691 + any later version.
21693 + This program is distributed in the hope that it will be useful,
21694 + but WITHOUT ANY WARRANTY; without even the implied warranty of
21695 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21696 + GNU General Public License for more details.
21698 + You should have received a copy of the GNU General Public License
21699 + along with this program; If not, write to the Free Software
21700 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21701 + 02110-1301, USA. */
21703 +#include "sysdep.h"
21704 +#include "elfmips.h"
21706 +#define ELFINU8(b,w) \
21709 +#define ELFINMSBU16(b,w) \
21710 + (w = ((b)[0] << 8) | (b)[1])
21712 +#define ELFINLSBU16(b,w) \
21713 + (w = ((b)[1] << 8) | (b)[0])
21715 +#define ELFINMSBU32(b,w) \
21716 + (w = ((unsigned long)(b)[0] << 24) | \
21717 + ((unsigned long)(b)[1] << 16) | \
21718 + ((b)[2] << 8) | \
21721 +#define ELFINLSBU32(b,w) \
21722 + (w = ((unsigned long)(b)[3] << 24) | \
21723 + ((unsigned long)(b)[2] << 16) | \
21724 + ((b)[1] << 8) | \
21727 +#define ELFOUTU8(b,w) \
21730 +#define ELFOUTMSBU16(b,w) \
21731 + ((b)[0] = (w >> 8), \
21734 +#define ELFOUTLSBU16(b,w) \
21735 + ((b)[1] = (w >> 8), \
21738 +#define ELFOUTMSBU32(b,w) \
21739 + ((b)[0] = (w >> 24), \
21740 + (b)[1] = (w >> 16), \
21741 + (b)[2] = (w >> 8), \
21744 +#define ELFOUTLSBU32(b,w) \
21745 + ((b)[3] = (w >> 24), \
21746 + (b)[2] = (w >> 16), \
21747 + (b)[1] = (w >> 8), \
21750 +static unsigned long elfinlsbu32(unsigned char *bp)
21753 + ELFINLSBU32(bp,v);
21757 +static unsigned int elfinlsbu16(unsigned char *bp)
21760 + ELFINLSBU16(bp,v);
21764 +static unsigned long elfinmsbu32(unsigned char *bp)
21767 + ELFINMSBU32(bp,v);
21770 +static unsigned int elfinmsbu16(unsigned char *bp)
21773 + ELFINMSBU16(bp,v);
21777 +static void elfoutmsbu32(unsigned char *bp,unsigned long v)
21779 + ELFOUTMSBU32(bp,v);
21782 +static void elfoutmsbu16(unsigned char *bp,unsigned int v)
21784 + ELFOUTMSBU16(bp,v);
21787 +static void elfoutlsbu32(unsigned char *bp,unsigned long v)
21789 + ELFOUTLSBU32(bp,v);
21792 +static void elfoutlsbu16(unsigned char *bp,unsigned int v)
21794 + ELFOUTLSBU16(bp,v);
21801 +/* this is applaing because there is no optimisation of the test
21802 + * of format between succesive macro calls
21804 +#define ELFINU16(b,w) (format?ELFINLSBU16(b,w):ELFINMSBU16(b,w))
21805 +#define ELFINU32(b,w) (format?ELFINLSBU32(b,w):ELFINMSBU32(b,w))
21806 +#define ELFOUTU16(b,w) (format?ELFOUTLSBU16(b,w):ELFOUTMSBU16(b,w))
21807 +#define ELFOUTU32(b,w) (format?ELFOUTLSBU32(b,w):ELFOUTMSBU32(b,w))
21809 +/* this is also appaling because there is no optimisation of the test
21810 + * of format between succesive macro calls
21812 +#define ELFINU16(b,w) w = (format?elfinlsbu16(b):elfinmsbu16(b))
21813 +#define ELFINU32(b,w) w = (format?elfinlsbu32(b):elfinmsbu32(b))
21814 +#define ELFOUTU16(b,w) (format?elfoutlsbu16(b,w):elfoutmsbu16(b,w))
21815 +#define ELFOUTU32(b,w) (format?elfoutlsbu32(b,w):elfoutmsbu32(b,w))
21817 +/* this works better but still is poor as the function address
21818 + * is loaded from table before each call
21820 +static const struct {
21821 + void (*out16)(unsigned char *bp,unsigned int v);
21822 + void (*out32)(unsigned char *bp,unsigned long v);
21823 + unsigned int (*in16)(unsigned char *bp);
21824 + unsigned long (*in32)(unsigned char *bp);
21826 + {elfoutmsbu16,elfoutmsbu32,elfinmsbu16,elfinmsbu32},
21827 + {elfoutlsbu16,elfoutlsbu32,elfinlsbu16,elfinlsbu32}
21830 +#define ELFINU16(b,w) w = fvec[format].in16(b)
21831 +#define ELFINU32(b,w) w = fvec[format].in32(b)
21832 +#define ELFOUTU16(b,w) fvec[format].out16(b,w)
21833 +#define ELFOUTU32(b,w) fvec[format].out32(b,w)
21837 +#define ELFINCHAR(b,w) (ELFINU8(b,w),(b)+=1)
21838 +#define ELFINHALF(b,w) (ELFINU16(b,w),(b)+=2)
21839 +#define ELFINWORD(b,w) (ELFINU32(b,w),(b)+=4)
21840 +#define ELFINADDR(b,w) (ELFINU32(b,w),(b)+=4)
21841 +#define ELFINOFF(b,w) (ELFINU32(b,w),(b)+=4)
21843 +#define ELFOUTCHAR(b,w) (ELFOUTU8(b,w),(b)+=1)
21844 +#define ELFOUTHALF(b,w) (ELFOUTU16(b,w),(b)+=2)
21845 +#define ELFOUTWORD(b,w) (ELFOUTU32(b,w),(b)+=4)
21846 +#define ELFOUTADDR(b,w) (ELFOUTU32(b,w),(b)+=4)
21847 +#define ELFOUTOFF(b,w) (ELFOUTU32(b,w),(b)+=4)
21849 +/* Maximum sizes of things we will consider reading
21850 + * these are a bit more than that cos of poosible compiler struct padding
21852 +#define MAXEHDRSIZE sizeof(Elf32_Ehdr)
21853 +#define MAXPHDRSIZE sizeof(Elf32_Phdr)
21854 +#define MAXSHDRSIZE sizeof(Elf32_Shdr)
21855 +#define MAXRELASIZE sizeof(Elf32_Rela)
21856 +#define MAXSYMSIZE sizeof(Elf32_Sym)
21857 +#define MAXGPTABSIZE sizeof(Elf32_Gptab)
21858 +#define MAXREGINFOSIZE sizeof(Elf32_Reginfo)
21860 +#define FORMATSELECT(eh) ((eh->e_ident[5] == ELFDATA2MSB)?0:1)
21862 +size_t elfShdrRead(FILE *fp,
21863 + const Elf32_Ehdr *eh, Elf32_Shdr *sh,size_t nhdr)
21865 + int format = FORMATSELECT(eh);
21868 + for(n=0; n<nhdr; sh++,n++) {
21869 + unsigned char buf[MAXSHDRSIZE];
21870 + unsigned char *bp = buf;
21872 + if(fread(buf,eh->e_shentsize,1,fp) != 1)
21875 + /* convert from bytes to numbers
21877 + ELFINWORD(bp,sh->sh_name);
21878 + ELFINWORD(bp,sh->sh_type);
21879 + ELFINWORD(bp,sh->sh_flags);
21880 + ELFINADDR(bp,sh->sh_addr);
21881 + ELFINOFF(bp,sh->sh_offset);
21882 + ELFINWORD(bp,sh->sh_size);
21883 + ELFINWORD(bp,sh->sh_link);
21884 + ELFINWORD(bp,sh->sh_info);
21885 + ELFINWORD(bp,sh->sh_addralign);
21886 + ELFINWORD(bp,sh->sh_entsize);
21891 +size_t elfShdrWrite(FILE *fp,
21892 + const Elf32_Ehdr *eh,
21893 + const Elf32_Shdr *sh,size_t nhdr)
21895 + int format = FORMATSELECT(eh);
21898 + for(n=0; n<nhdr; sh++,n++) {
21899 + unsigned char buf[MAXSHDRSIZE];
21900 + unsigned char *bp = buf;
21902 + /* convert from numbers to bytes
21904 + ELFOUTWORD(bp,sh->sh_name);
21905 + ELFOUTWORD(bp,sh->sh_type);
21906 + ELFOUTWORD(bp,sh->sh_flags);
21907 + ELFOUTADDR(bp,sh->sh_addr);
21908 + ELFOUTOFF(bp,sh->sh_offset);
21909 + ELFOUTWORD(bp,sh->sh_size);
21910 + ELFOUTWORD(bp,sh->sh_link);
21911 + ELFOUTWORD(bp,sh->sh_info);
21912 + ELFOUTWORD(bp,sh->sh_addralign);
21913 + ELFOUTWORD(bp,sh->sh_entsize);
21915 + if(fwrite(buf,bp-buf,1,fp) != 1)
21921 +size_t elfPhdrRead(FILE *fp,
21922 + const Elf32_Ehdr *eh, Elf32_Phdr *ph,size_t nhdr)
21924 + int format = FORMATSELECT(eh);
21927 + for(n=0; n<nhdr; ph++,n++) {
21928 + unsigned char buf[MAXPHDRSIZE];
21929 + unsigned char *bp = buf;
21931 + if(fread(buf,eh->e_phentsize,1,fp) != 1)
21934 + /* convert from bytes to numbers */
21935 + ELFINWORD(bp,ph->p_type);
21936 + ELFINOFF(bp,ph->p_offset);
21937 + ELFINADDR(bp,ph->p_vaddr);
21938 + ELFINADDR(bp,ph->p_paddr);
21939 + ELFINWORD(bp,ph->p_filesz);
21940 + ELFINWORD(bp,ph->p_memsz);
21941 + ELFINWORD(bp,ph->p_flags);
21942 + ELFINWORD(bp,ph->p_align);
21947 +size_t elfPhdrWrite(FILE *fp,
21948 + const Elf32_Ehdr *eh,
21949 + const Elf32_Phdr *ph,size_t nhdr)
21951 + int format = FORMATSELECT(eh);
21954 + for(n=0; n<nhdr; ph++,n++) {
21955 + unsigned char buf[MAXPHDRSIZE];
21956 + unsigned char *bp = buf;
21958 + /* convert from numbers to bytes */
21959 + ELFOUTWORD(bp,ph->p_type);
21960 + ELFOUTOFF(bp,ph->p_offset);
21961 + ELFOUTADDR(bp,ph->p_vaddr);
21962 + ELFOUTADDR(bp,ph->p_paddr);
21963 + ELFOUTWORD(bp,ph->p_filesz);
21964 + ELFOUTWORD(bp,ph->p_memsz);
21965 + ELFOUTWORD(bp,ph->p_flags);
21966 + ELFOUTWORD(bp,ph->p_align);
21968 + if(fwrite(buf,bp-buf,1,fp) != 1)
21974 +size_t elfSymRead(FILE *fp,
21975 + const Elf32_Ehdr *eh,
21976 + const Elf32_Shdr *sh,
21977 + Elf32_Sym *sym,size_t nsym)
21979 + int format = FORMATSELECT(eh);
21982 + for(n=0; n<nsym; sym++,n++) {
21983 + unsigned char buf[MAXSYMSIZE];
21984 + unsigned char *bp = buf;
21986 + if(fread(buf,sh->sh_entsize,1,fp) != 1)
21989 + /* convert from bytes to numbers
21991 + ELFINWORD(bp,sym->st_name);
21992 + ELFINADDR(bp,sym->st_value);
21993 + ELFINWORD(bp,sym->st_size);
21994 + ELFINCHAR(bp,sym->st_info);
21995 + ELFINCHAR(bp,sym->st_other);
21996 + ELFINHALF(bp,sym->st_shndx);
22001 +size_t elfSymWrite(FILE *fp,
22002 + const Elf32_Ehdr *eh,
22003 + const Elf32_Shdr *sh,
22004 + const Elf32_Sym *sym,size_t nhdr)
22006 + int format = FORMATSELECT(eh);
22009 + for(n=0; n<nhdr; sym++,n++) {
22010 + unsigned char buf[MAXSYMSIZE];
22011 + unsigned char *bp = buf;
22013 + /* convert from numbers to bytes
22015 + ELFOUTWORD(bp,sym->st_name);
22016 + ELFOUTADDR(bp,sym->st_value);
22017 + ELFOUTWORD(bp,sym->st_size);
22018 + ELFOUTCHAR(bp,sym->st_info);
22019 + ELFOUTCHAR(bp,sym->st_other);
22020 + ELFOUTHALF(bp,sym->st_shndx);
22022 + if(fwrite(buf,bp-buf,1,fp) != 1)
22028 +size_t elfRelaWrite(FILE *fp,
22029 + const Elf32_Ehdr *eh,
22030 + const Elf32_Shdr *sh,
22031 + const Elf32_Rela *rela,size_t nhdr)
22033 + int format = FORMATSELECT(eh);
22036 + for(n=0; n<nhdr; rela++,n++) {
22037 + unsigned char buf[MAXRELASIZE];
22038 + unsigned char *bp = buf;
22040 + /* convert from numbers to bytes
22042 + ELFOUTWORD(bp,rela->r_offset);
22043 + ELFOUTWORD(bp,rela->r_info);
22044 + ELFOUTWORD(bp,rela->r_addend);
22046 + if(fwrite(buf,bp-buf,1,fp) != 1)
22052 +size_t elfEhdrWrite(FILE *fp,const Elf32_Ehdr *eh)
22054 + int format = FORMATSELECT(eh);
22055 + unsigned char buf[MAXEHDRSIZE];
22056 + unsigned char *bp = buf;
22058 + memcpy(bp,eh->e_ident,EI_NIDENT);
22061 + ELFOUTHALF(bp,eh->e_type);
22062 + ELFOUTHALF(bp,eh->e_machine);
22063 + ELFOUTWORD(bp,eh->e_version);
22064 + ELFOUTADDR(bp,eh->e_entry);
22065 + ELFOUTOFF(bp,eh->e_phoff);
22066 + ELFOUTOFF(bp,eh->e_shoff);
22067 + ELFOUTWORD(bp,eh->e_flags);
22068 + ELFOUTHALF(bp,eh->e_ehsize);
22069 + ELFOUTHALF(bp,eh->e_phentsize);
22070 + ELFOUTHALF(bp,eh->e_phnum);
22071 + ELFOUTHALF(bp,eh->e_shentsize);
22072 + ELFOUTHALF(bp,eh->e_shnum);
22073 + ELFOUTHALF(bp,eh->e_shstrndx);
22075 + return fwrite(&buf,bp-buf,1,fp);
22078 +size_t elfEhdrRead(FILE *fp,Elf32_Ehdr *eh)
22080 + unsigned char buf[MAXEHDRSIZE];
22081 + unsigned char *bp = buf;
22083 + if(fread(buf,ELFEHDRSZ,1,fp) != 1)
22086 + memcpy(eh->e_ident,bp,EI_NIDENT);
22089 + if(eh->e_ident[0] != ELFMAG0 ||
22090 + eh->e_ident[1] != ELFMAG1 ||
22091 + eh->e_ident[2] != ELFMAG2 ||
22092 + eh->e_ident[3] != ELFMAG3)
22095 + if(eh->e_ident[4] != ELFCLASS32)
22098 + if(eh->e_ident[5] != ELFDATA2MSB && eh->e_ident[5] != ELFDATA2LSB)
22102 + /* what should the version in the ident be ?? */
22103 + if(eh->e_ident[6] != 1)
22110 + for(i=7;i<EI_NIDENT;i++)
22111 + if(eh->e_ident[i] != 0)
22115 + int format = FORMATSELECT(eh);
22117 + ELFINHALF(bp,eh->e_type);
22118 + ELFINHALF(bp,eh->e_machine);
22119 + ELFINWORD(bp,eh->e_version);
22120 + ELFINADDR(bp,eh->e_entry);
22121 + ELFINOFF(bp,eh->e_phoff);
22122 + ELFINOFF(bp,eh->e_shoff);
22123 + ELFINWORD(bp,eh->e_flags);
22124 + ELFINHALF(bp,eh->e_ehsize);
22125 + ELFINHALF(bp,eh->e_phentsize);
22126 + ELFINHALF(bp,eh->e_phnum);
22127 + ELFINHALF(bp,eh->e_shentsize);
22128 + ELFINHALF(bp,eh->e_shnum);
22129 + ELFINHALF(bp,eh->e_shstrndx);
22135 +size_t elfReginfoWrite(FILE *fp,
22136 + const Elf32_Ehdr *eh,
22137 + const Elf32_Shdr *sh,
22138 + const Elf32_Reginfo *ri,size_t nhdr)
22140 + int format = FORMATSELECT(eh);
22143 + for(n=0; n<nhdr; ri++,n++) {
22144 + unsigned char buf[MAXREGINFOSIZE];
22145 + unsigned char *bp = buf;
22148 + /* convert from numbers to bytes
22150 + ELFOUTWORD(bp,ri->ri_gprmask);
22151 + for (i = 0; i < 4; i++) {
22152 + ELFOUTWORD(bp,ri->ri_cprmask[i]);
22154 + ELFOUTWORD(bp,ri->ri_gp_value);
22156 + if(fwrite(buf,bp-buf,1,fp) != 1)
22163 +size_t elfReginfoRead (FILE *fp,
22164 + const Elf32_Ehdr *eh,
22165 + const Elf32_Shdr *sh,
22166 + Elf32_Reginfo *ri,size_t nhdr)
22168 + int format = FORMATSELECT(eh);
22171 + for(n=0; n<nhdr; ri++,n++) {
22172 + unsigned char buf[MAXREGINFOSIZE];
22173 + unsigned char *bp = buf;
22176 + if(fread(buf,sh->sh_entsize,1,fp) != 1)
22179 + /* convert from numbers to bytes
22181 + ELFINWORD(bp,ri->ri_gprmask);
22182 + for (i = 0; i < 4; i++) {
22183 + ELFINWORD(bp,ri->ri_cprmask[i]);
22185 + ELFINWORD(bp,ri->ri_gp_value);
22190 +size_t elfGptabWrite(FILE *fp,
22191 + const Elf32_Ehdr *eh,
22192 + const Elf32_Shdr *sh,
22193 + const Elf32_Gptab *gt,size_t nhdr)
22195 + int format = FORMATSELECT(eh);
22198 + for(n=0; n<nhdr; gt++,n++) {
22199 + unsigned char buf[MAXGPTABSIZE];
22200 + unsigned char *bp = buf;
22202 + /* convert from numbers to bytes
22204 + ELFOUTWORD(bp,gt->gt_entry.gt_g_value);
22205 + ELFOUTWORD(bp,gt->gt_entry.gt_bytes);
22207 + if(fwrite(buf,bp-buf,1,fp) != 1)
22214 +size_t elfGptabRead(FILE *fp,
22215 + const Elf32_Ehdr *eh,
22216 + const Elf32_Shdr *sh,
22217 + Elf32_Gptab *gt,size_t nhdr)
22219 + int format = FORMATSELECT(eh);
22222 + for(n=0; n<nhdr; gt++,n++) {
22223 + unsigned char buf[MAXGPTABSIZE];
22224 + unsigned char *bp = buf;
22226 + if(fread(buf,sh->sh_entsize,1,fp) != 1)
22229 + /* convert from numbers to bytes
22231 + ELFINWORD(bp,gt->gt_entry.gt_g_value);
22232 + ELFINWORD(bp,gt->gt_entry.gt_bytes);
22237 +++ b/convert/elfmips.h
22239 +/* elfmips.h: MIPS ABI specific ELF definitions
22241 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
22242 + Contributed by MIPS Technologies, Inc.
22244 + This program is free software; you can redistribute it and/or modify
22245 + it under the terms of the GNU General Public License as published by
22246 + the Free Software Foundation; either version 3, or (at your option)
22247 + any later version.
22249 + This program is distributed in the hope that it will be useful,
22250 + but WITHOUT ANY WARRANTY; without even the implied warranty of
22251 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22252 + GNU General Public License for more details.
22254 + You should have received a copy of the GNU General Public License
22255 + along with this program; If not, write to the Free Software
22256 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22257 + 02110-1301, USA. */
22261 +/* MIPSABI program header special */
22262 +#define PT_MIPS_REGINFO (PT_LOPROC + 0)
22264 +/* SDEMIPS relocation (rela type) */
22266 +#define R_SDE_16 1
22267 +#define R_SDE_32 2
22268 +#define R_SDE_ILA 35
22269 +#define R_SDE_IGPREL 36
22270 +#define R_SDE_ILAHI 37
22271 +#define R_SDE_ILALO 38
22272 +#define R_SDE_IBRA 39
22273 +#define R_SDE_IJMP 40
22274 +#define R_SDE_ILITERAL 41
22276 +/* MIPSABI relocation (rel type) */
22277 +#define R_MIPS_NONE 0
22278 +#define R_MIPS_16 1
22279 +#define R_MIPS_32 2
22280 +#define R_MIPS_REL32 3
22281 +#define R_MIPS_26 4
22282 +#define R_MIPS_HI16 5
22283 +#define R_MIPS_LO16 6
22284 +#define R_MIPS_GPREL16 7
22285 +#define R_MIPS_LITERAL 8
22286 +#define R_MIPS_GOT16 9
22287 +#define R_MIPS_PC16 10
22288 +#define R_MIPS_CALL16 11
22289 +#define R_MIPS_GPREL32 12
22291 +/* MIPSABI special section numbers */
22292 +#define SHN_MIPS_ACOMMON (SHN_LOPROC + 0)
22293 +#define SHN_MIPS_SCOMMON (SHN_LOPROC + 3)
22294 +#define SHN_MIPS_SUNDEFINED (SHN_LOPROC + 4)
22296 +/* MIPSABI special section types */
22297 +#define SHT_MIPS_LIBLIST (SHT_LOPROC + 0)
22298 +#define SHT_MIPS_CONFLICT (SHT_LOPROC + 2)
22299 +#define SHT_MIPS_GPTAB (SHT_LOPROC + 3)
22300 +#define SHT_MIPS_UCODE (SHT_LOPROC + 4)
22301 +#define SHT_MIPS_DEBUG (SHT_LOPROC + 5)
22302 +#define SHT_MIPS_REGINFO (SHT_LOPROC + 6)
22304 +/* MIPSABI special section flags */
22305 +#define SHF_MIPS_GPREL 0x10000000
22307 +/* MIPSABI processor specific flags */
22308 +#define EF_MIPS_NOREORDER 0x00000001
22309 +#define EF_MIPS_PIC 0x00000002
22310 +#define EF_MIPS_CPIC 0x00000004
22311 +#define EF_MIPS_ARCH 0xf0000000
22312 +#define E_MIPS_ARCH_1 0x00000000 /* -mips1 */
22313 +#define E_MIPS_ARCH_2 0x10000000 /* -mips2 */
22314 +#define E_MIPS_ARCH_3 0x20000000 /* -mips3 */
22315 +#define E_MIPS_ARCH_4 0x30000000 /* -mips4 */
22316 +/* The following are not MIPSABI, but SDE-MIPS only */
22317 +#define EF_MIPS_CPU 0x000f0000
22318 +#define E_MIPS_CPU_STD 0x00000000
22319 +#define E_MIPS_CPU_CW4 0x00010000
22320 +#define E_MIPS_CPU_R4100 0x00020000
22321 +#define E_MIPS_CPU_R4650 0x00030000
22322 +#define E_MIPS_CPU_R3900 0x00040000
22323 +#define E_MIPS_CPU_RM52XX 0x00050000
22324 +#define EF_MIPS_NOGPCOUNT 0x00001000
22326 +/* MIPSABI special sections */
22330 + Elf32_Word ri_gprmask;
22331 + Elf32_Word ri_cprmask[4];
22332 + Elf32_Sword ri_gp_value;
22335 +#define ELFREGINFOSZ sizeof(Elf32_Reginfo)
22337 +size_t elfReginfoWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
22338 + const Elf32_Reginfo *,size_t);
22339 +size_t elfReginfoRead(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
22340 + Elf32_Reginfo *,size_t);
22345 + Elf32_Word gt_current_g_value;
22346 + Elf32_Word gt_unused;
22349 + Elf32_Word gt_g_value;
22350 + Elf32_Word gt_bytes;
22354 +#define ELFGPTABSZ sizeof(Elf32_Gptab)
22356 +size_t elfGptabRead(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
22357 + Elf32_Gptab *,size_t);
22358 +size_t elfGptabWrite(FILE *,const Elf32_Ehdr *,const Elf32_Shdr *,
22359 + const Elf32_Gptab *,size_t);
22362 +++ b/convert/elfout.c
22364 +/* elfout.c -- ELF Output
22366 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
22367 + Contributed by MIPS Technologies, Inc.
22369 + This program is free software; you can redistribute it and/or modify
22370 + it under the terms of the GNU General Public License as published by
22371 + the Free Software Foundation; either version 3, or (at your option)
22372 + any later version.
22374 + This program is distributed in the hope that it will be useful,
22375 + but WITHOUT ANY WARRANTY; without even the implied warranty of
22376 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22377 + GNU General Public License for more details.
22379 + You should have received a copy of the GNU General Public License
22380 + along with this program; If not, write to the Free Software
22381 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22382 + 02110-1301, USA. */
22384 +#include "sysdep.h"
22385 +#include "elfmips.h"
22387 +#define BUFSIZE 8192 /* max bytes per block */
22389 +static FILE *elffp;
22390 +static unsigned long elffirst = ~0;
22391 +static unsigned long elfaddr = ~0;
22392 +static long elfoffs;
22393 +static int elflen;
22394 +static unsigned char *elfbuf;
22396 +static Elf32_Ehdr ehdr;
22397 +#define NSECTIONS 9
22398 +static Elf32_Phdr phdr[NSECTIONS];
22399 +static Elf32_Shdr shdr[NSECTIONS + 1]; /* plus 1 for shsectname */
22402 +extern char * progname;
22403 +extern int promflag;
22404 +extern unsigned long prombase;
22407 +elfFlush (int endsect)
22409 + if (elflen > 0) {
22410 + fwrite (elfbuf, 1, elflen, elffp);
22411 + elfoffs += elflen;
22412 + elfaddr += elflen;
22416 + if (endsect && nsect > 1) {
22417 + Elf32_Shdr *sh = &shdr[nsect - 1];
22418 + sh->sh_size = elfoffs - sh->sh_offset;
22423 +ElfStart (FILE *fp, unsigned long ep, int bigendian)
22425 + elfbuf = xmalloc (BUFSIZE);
22428 + memset (&ehdr, 0, sizeof (ehdr));
22429 + ehdr.e_ident[EI_MAG0] = ELFMAG0;
22430 + ehdr.e_ident[EI_MAG1] = ELFMAG1;
22431 + ehdr.e_ident[EI_MAG2] = ELFMAG2;
22432 + ehdr.e_ident[EI_MAG3] = ELFMAG3;
22433 + ehdr.e_ident[EI_CLASS] = ELFCLASS32;
22434 + ehdr.e_ident[EI_DATA] = bigendian ? ELFDATA2MSB : ELFDATA2LSB;
22435 + ehdr.e_ident[EI_VERSION] = EV_CURRENT;
22436 + ehdr.e_type = ET_EXEC;
22437 + ehdr.e_machine = EM_MIPS;
22438 + ehdr.e_version = EV_CURRENT;
22439 + ehdr.e_ehsize = sizeof (Elf32_Ehdr);
22440 + ehdr.e_phentsize = sizeof (Elf32_Phdr);
22441 + ehdr.e_shentsize = sizeof (Elf32_Shdr);
22442 + elfoffs = ehdr.e_shoff + sizeof (shdr);
22445 + fseek (elffp, elfoffs, SEEK_SET);
22450 +ElfOutput (unsigned long addr, unsigned char byte)
22453 + /* convert back to PROM virtual address in KSEG1 */
22454 + addr = (addr + prombase) | 0xa0000000;
22456 + if (addr != elfaddr + elflen) {
22457 + Elf32_Shdr *sh = &shdr[nsect];
22461 + if (nsect == NSECTIONS) {
22462 + fprintf (stderr, "%s: too many ELF output sections\n",
22467 + sh->sh_type = SHT_PROGBITS;
22468 + sh->sh_flags = SHF_ALLOC | SHF_EXECINSTR;
22469 + sh->sh_addr = addr;
22470 + sh->sh_offset = elfoffs;
22472 + sh->sh_addralign = 1;
22478 + if (elflen == BUFSIZE)
22480 + elfbuf[elflen++] = byte;
22485 +ElfEnd (unsigned long ep)
22497 + strtab = xmalloc (nsect * sizeof ".psect##"
22498 + + sizeof ".shstrtab" + 1);
22500 + /* Prepare the Section Header string table */
22502 + strtab[stroffs++] = '\0'; /* initial null byte */
22503 + for (sh = &shdr[1], i = 1; i < nsect; sh++, i++) {
22504 + sh->sh_name = stroffs;
22505 + sprintf (&strtab[stroffs], ".psect%d", i);
22506 + stroffs += strlen (&strtab[stroffs]) + 1;
22509 + /* Prepare the section header for the string table */
22510 + sh = &shdr[nsect];
22511 + sh->sh_name = stroffs;
22512 + strcpy (&strtab[stroffs], ".shstrtab");
22513 + stroffs += sizeof ".shstrtab";
22514 + sh->sh_type = SHT_STRTAB;
22515 + sh->sh_offset = elfoffs;
22516 + sh->sh_size = stroffs;
22518 + /* Write the Section Header string table */
22519 + fwrite (strtab, 1, stroffs, elffp);
22522 + /* Prepare Program Header */
22523 + for (ph = phdr, sh = &shdr[1], i = 1; i < nsect; ph++, sh++, i++) {
22524 + ph->p_type = PT_LOAD;
22525 + ph->p_offset = sh->sh_offset;
22526 + ph->p_vaddr = sh->sh_addr;
22527 + ph->p_paddr = sh->sh_addr;
22528 + ph->p_filesz = ph->p_memsz = sh->sh_size;
22529 + ph->p_flags = PF_R | PF_X;
22530 + ph->p_align = sh->sh_addralign;
22533 + /* Prepare ELF header */
22534 + ehdr.e_phnum = ph - phdr;
22535 + ehdr.e_shstrndx = nsect;
22536 + ehdr.e_shnum = nsect + 1; /* + 1 for string table */
22537 + ehdr.e_phoff = sizeof (Elf32_Ehdr);
22538 + ehdr.e_shoff = ehdr.e_phoff + sizeof (Elf32_Phdr) * ehdr.e_phnum;
22540 + ehdr.e_entry = 0xbfc00000; /* should this be progreammable */
22542 + ehdr.e_entry = ep;
22544 + /* Write the headers */
22545 + fseek (elffp, 0L, SEEK_SET);
22546 + elfEhdrWrite (elffp, &ehdr);
22547 + elfPhdrWrite (elffp, &ehdr, phdr, ehdr.e_phnum);
22548 + elfShdrWrite (elffp, &ehdr, shdr, ehdr.e_shnum);
22553 +++ b/convert/idtbin.c
22555 +/* idtbin.c -- Compressed Motorola S-Record Output for IDT/sim
22557 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
22558 + Contributed by MIPS Technologies, Inc.
22560 + This program is free software; you can redistribute it and/or modify
22561 + it under the terms of the GNU General Public License as published by
22562 + the Free Software Foundation; either version 3, or (at your option)
22563 + any later version.
22565 + This program is distributed in the hope that it will be useful,
22566 + but WITHOUT ANY WARRANTY; without even the implied warranty of
22567 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22568 + GNU General Public License for more details.
22570 + You should have received a copy of the GNU General Public License
22571 + along with this program; If not, write to the Free Software
22572 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22573 + 02110-1301, USA. */
22575 +#include "sysdep.h"
22577 +#define BUFSIZE 250
22578 +#define ADDRSIZE 4
22580 +static FILE *idtfp;
22581 +static unsigned long idtaddr = ~0;
22582 +static int idtlen;
22583 +static unsigned char idtbuf[BUFSIZE];
22588 + unsigned char cksum = 0;
22594 + fprintf (idtfp, "S3%c", idtlen + ADDRSIZE + 1);
22595 + cksum += idtlen + ADDRSIZE + 1;
22597 + for (n = (ADDRSIZE - 1) * 8; n >= 0; n -= 8) {
22598 + unsigned char ab = idtaddr >> n;
22599 + fputc (ab, idtfp);
22603 + for (n = 0; n < idtlen; n++) {
22604 + putc (idtbuf[n], idtfp);
22605 + cksum += idtbuf[n];
22608 + fputc (~cksum & 0xff, idtfp);
22614 +IdtStart (FILE *fp, unsigned long ep)
22620 +IdtOutput (unsigned long addr, unsigned char byte)
22622 + if (addr != idtaddr + idtlen || idtlen == BUFSIZE) {
22626 + idtbuf[idtlen++] = byte;
22630 +IdtEnd (unsigned long ep)
22632 + unsigned char cksum = 0;
22637 + fprintf (idtfp, "S7%c", ADDRSIZE + 1);
22638 + cksum += ADDRSIZE + 1;
22640 + for (n = (ADDRSIZE - 1) * 8; n >= 0; n -= 8) {
22641 + unsigned char ab = ep >> n;
22642 + fputc (ab, idtfp);
22646 + fputc (~cksum & 0xff, idtfp);
22649 +++ b/convert/lsifast.c
22651 +/* lsifast.c -- LSI PMON Fast ASCII Output
22653 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
22654 + Contributed by MIPS Technologies, Inc.
22656 + This program is free software; you can redistribute it and/or modify
22657 + it under the terms of the GNU General Public License as published by
22658 + the Free Software Foundation; either version 3, or (at your option)
22659 + any later version.
22661 + This program is distributed in the hope that it will be useful,
22662 + but WITHOUT ANY WARRANTY; without even the implied warranty of
22663 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22664 + GNU General Public License for more details.
22666 + You should have received a copy of the GNU General Public License
22667 + along with this program; If not, write to the Free Software
22668 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22669 + 02110-1301, USA. */
22671 +#include "sysdep.h"
22673 +/*#define MAXREC 550*/
22674 +#define MAXREC 255
22675 +#define BUFSIZE ((MAXREC-12)/4*3)
22677 +#define ZEROS "/Z" /* record contains a count of zeros,
22678 + actually it's the number of 24-bit
22679 + records that are all zero */
22680 +#define BYTE "/B" /* record contains a single byte */
22681 +#define CHKSUM "/C" /* checksum to date */
22682 +#define CLRSUM "/K" /* klear (sic) the checksum */
22683 +#define ADDR "/A" /* double length record containing a 32 bit
22685 +#define END "/E" /* end of download */
22687 +static FILE *lsifp;
22688 +static unsigned long lsiaddr = ~0;
22689 +static int lsilen;
22690 +static unsigned char *lsibuf;
22691 +static int chksum;
22697 +/* translate binary to base64 (tx form)
22706 + if (c <= 25) return('A'+c);
22707 + if (c <= 51) return('a'+c-26);
22708 + if (c <= 61) return('0'+c-52);
22709 + if (c == 62) return(',');
22710 + if (c == 63) return('.');
22715 +send12 (char *type, unsigned val)
22719 + fputc (type[0], lsifp);
22720 + fputc (type[1], lsifp);
22721 + fputc (b2a(val>>6), lsifp);
22722 + fputc (b2a(val), lsifp);
22727 +send24(unsigned long val)
22731 + chksum += val>>12;
22732 + chksum += val&0xfff;
22733 + for (i = 18; i >= 0; i -= 6) {
22734 + char c = b2a(val >> i);
22741 +txaddr (unsigned long addr)
22743 + send12(ADDR, addr >> 24);
22750 + fputc ('\n', lsifp);
22751 + send12(CHKSUM, chksum);
22752 + fputc ('\n', lsifp);
22759 + unsigned char *buf = lsibuf;
22765 + while (lsilen >= 3) {
22766 + unsigned long bdat;
22768 + bdat = (buf[0]<<16)+(buf[1]<<8)+buf[2]; /* convert to single word */
22769 + buf += 3; lsilen -= 3;
22772 + if (++zcnt < 4096)
22778 + send12 (ZEROS, zcnt);
22781 + send24(bdat); /* send the data */
22785 + send12 (ZEROS, zcnt);
22787 + while (lsilen != 0) {
22788 + send12 (BYTE, *buf++);
22792 + fputc ('\n', lsifp);
22796 +LsiStart (FILE *fp, unsigned long ep)
22798 + lsibuf = (char *) xmalloc (BUFSIZE);
22800 + send12(CLRSUM, 0);
22806 +LsiOutput (unsigned long addr, unsigned char byte)
22808 + int newaddr = (addr != lsiaddr + lsilen);
22809 + if (newaddr || lsilen >= BUFSIZE) {
22815 + lsibuf[lsilen++] = byte;
22820 +LsiSym (char *name, unsigned long value)
22822 + int len = strlen(name);
22823 + char *buf = alloca (len + 10);
22824 + static int reclen = 0;
22825 + static int first = 1;
22833 + if (reclen + 8 >= MAXREC) {
22834 + fputc ('\n', lsifp);
22840 + len += 2; /* /S */
22841 + strcpy(buf, name);
22842 + strcat(buf, ","); len++;
22844 + /* pad total string length to multiple of 4 */
22845 + while (len & 3) {
22846 + strcat (buf, "X");
22850 + if (reclen + len >= MAXREC) {
22851 + fputc ('\n', lsifp);
22854 + fprintf(lsifp, "/S%s", buf);
22860 +LsiEnd (unsigned long ep)
22866 + fputc ('\n', lsifp);
22871 +++ b/convert/mipsflash.c
22873 +/* mipsflash.c -- MIPS eval board USB/parallel flash download format
22875 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
22876 + Contributed by MIPS Technologies, Inc.
22878 + This program is free software; you can redistribute it and/or modify
22879 + it under the terms of the GNU General Public License as published by
22880 + the Free Software Foundation; either version 3, or (at your option)
22881 + any later version.
22883 + This program is distributed in the hope that it will be useful,
22884 + but WITHOUT ANY WARRANTY; without even the implied warranty of
22885 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22886 + GNU General Public License for more details.
22888 + You should have received a copy of the GNU General Public License
22889 + along with this program; If not, write to the Free Software
22890 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
22891 + 02110-1301, USA. */
22893 +#include "sysdep.h"
22895 +static FILE *mipsfp;
22896 +static unsigned long mipsaddr = ~0;
22897 +static unsigned long mipsbase = ~0;
22898 +static int mipslen;
22899 +static unsigned char *mipsbuf;
22900 +static int mipsbigendian;
22902 +extern int promflag;
22903 +extern unsigned long prombase;
22905 +/* data chunk size - 16 words */
22906 +#define BUFSIZE (16*4)
22908 +/* flash sector size */
22909 +#define FLASH_BLOCK_SIZE 0x20000
22914 + unsigned char *buf;
22917 + if (mipslen == 0)
22920 + for (buf = mipsbuf, done = 0; done < BUFSIZE; buf += 4, done += 4) {
22921 + unsigned long val = 0;
22924 + /* new line every 32 bytes (8 words) */
22925 + if (done != 0 && done % 32 == 0)
22926 + fputc ('\n', mipsfp);
22928 + /* collect one word from input buffer using appropriate endianness. */
22929 + for (i = 0; i < 4; i++) {
22930 + unsigned int addr01 = (mipsaddr + done + i) & 0x3;
22931 + if (mipsbigendian)
22932 + val |= buf[i] << (8 * (3 - addr01));
22934 + val |= buf[i] << (8 * addr01);
22937 + /* output one word of data */
22938 + fprintf (mipsfp, " %08lx", val);
22941 + fputc ('\n', mipsfp);
22943 + /* reset output buffer to blank */
22944 + memset (mipsbuf, 0xff, BUFSIZE);
22950 +MipsStart (FILE *fp, unsigned long ep, int bigendian)
22952 + mipsbuf = (char *) xmalloc (BUFSIZE);
22954 + mipsbigendian = bigendian;
22956 + /* Reset the loader state machine */
22957 + fprintf (fp, "!R\n");
22962 +MipsOutput (unsigned long addr, unsigned char byte)
22964 + /* XXX Rework this whole thing to gather up aligned chunks into each
22965 + buffer, don't require strictly contiguous addresses. */
22967 + unsigned long lastaddr = mipsaddr + mipslen;
22968 + int newsector, newaddr;
22971 + /* convert back to PROM physical address */
22972 + addr += prombase;
22974 + newsector = ((addr ^ lastaddr) & ~(FLASH_BLOCK_SIZE - 1)) != 0;
22975 + newaddr = newsector || (addr != lastaddr);
22977 + if (newaddr || newsector || mipslen >= BUFSIZE) {
22982 + if (mipsbase == ~0) {
22983 + /* first byte - remember base address */
22985 + if (mipsbase == 0x1fc00000)
22986 + /* unlock the flash */
22987 + fprintf (mipsfp, ">1fc00xxx @1fc00000 !C\n");
22992 + /* started new flash sector - erase it */
22993 + unsigned long base = addr & ~(FLASH_BLOCK_SIZE - 1);
22994 + fprintf (mipsfp, ">%.5xxxx ", base / 0x1000);
22995 + fprintf (mipsfp, "@%.8x !E\n", base);
22996 + if (base != addr)
23001 + /* set new write addr */
23002 + fprintf (mipsfp, "@%.8lx\n", addr);
23004 + if (newaddr || newsector || ((addr & 0xfff == 0) && mipslen == 0))
23005 + /* update display */
23006 + fprintf (mipsfp, ">%.8lx\n", addr);
23008 + mipsbuf[mipslen++] = byte;
23012 +MipsEnd (unsigned long ep)
23016 + if (mipsbase == 0x1fc00000) {
23017 + /* Lock the flash */
23018 + fprintf (mipsfp, ">LOCKFLSH\n");
23019 + fprintf (mipsfp, "@1fc00000 !S\n");
23020 + fprintf (mipsfp, "@1fc20000 !S\n");
23021 + fprintf (mipsfp, "@1fc40000 !S\n");
23022 + fprintf (mipsfp, "@1fc60000 !S\n");
23023 + fprintf (mipsfp, "@1fc80000 !S\n");
23024 + fprintf (mipsfp, "@1fca0000 !S\n");
23025 + fprintf (mipsfp, "@1fcc0000 !S\n");
23026 + fprintf (mipsfp, "@1fce0000 !S\n");
23029 + fprintf (mipsfp, ">#DL_DONE\n");
23030 + fprintf (mipsfp, ">FINISHED\n");
23035 +++ b/convert/srec.c
23037 +/* srec.c -- Motorola S-Record Output
23039 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
23040 + Contributed by MIPS Technologies, Inc.
23042 + This program is free software; you can redistribute it and/or modify
23043 + it under the terms of the GNU General Public License as published by
23044 + the Free Software Foundation; either version 3, or (at your option)
23045 + any later version.
23047 + This program is distributed in the hope that it will be useful,
23048 + but WITHOUT ANY WARRANTY; without even the implied warranty of
23049 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23050 + GNU General Public License for more details.
23052 + You should have received a copy of the GNU General Public License
23053 + along with this program; If not, write to the Free Software
23054 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
23055 + 02110-1301, USA. */
23057 +#include "sysdep.h"
23059 +#define BUFSIZE 32
23061 +static FILE *srecfp;
23062 +static unsigned long srecaddr = ~0;
23063 +static int sreclen;
23064 +static unsigned char srecbuf[BUFSIZE];
23065 +static int addrsize;
23071 + unsigned char cksum = 0;
23074 + if (sreclen == 0)
23077 + fprintf (srecfp, "S%1d%02X", addrsize-1, sreclen + addrsize + 1);
23078 + cksum += sreclen + addrsize + 1;
23080 + for (n = (addrsize - 1) * 8; n >= 0; n -= 8) {
23081 + unsigned char ab = srecaddr >> n;
23082 + fprintf (srecfp, "%02X", ab);
23086 + for (n = 0; n < sreclen; n++) {
23087 + fprintf (srecfp, "%02X", srecbuf[n]);
23088 + cksum += srecbuf[n];
23091 + fprintf (srecfp, "%02X\n", ~cksum & 0xff);
23097 +Srec3Start (FILE *fp, unsigned long ep)
23104 +Srec2Start (FILE *fp, unsigned long ep)
23111 +Srec1Start (FILE *fp, unsigned long ep)
23119 +SrecOutput (unsigned long addr, unsigned char byte)
23121 + if (addr != srecaddr + sreclen || sreclen == BUFSIZE) {
23125 + srecbuf[sreclen++] = byte;
23130 +SrecSym (char *name, unsigned long value)
23132 + int len = strlen(name) + 8 + 2;
23133 + fprintf (srecfp, "S4%02X%08X%s,00\n", len, value, name);
23138 +SrecEnd (unsigned long ep)
23140 + unsigned char cksum = 0;
23145 + fprintf (srecfp, "S%1d%02X", 11 - addrsize, addrsize + 1);
23146 + cksum += addrsize + 1;
23148 + for (n = (addrsize - 1) * 8; n >= 0; n -= 8) {
23149 + unsigned char ab = ep >> n;
23150 + fprintf (srecfp, "%02X", ab);
23154 + fprintf (srecfp, "%02X\n", ~cksum & 0xff);
23157 +++ b/convert/stagbin.c
23159 +/* stag.c -- Stag Programmer Binary Output
23161 + Copyright (c) 1993-2003, 2008 Free Software Foundation, Inc.
23162 + Contributed by MIPS Technologies, Inc.
23164 + This program is free software; you can redistribute it and/or modify
23165 + it under the terms of the GNU General Public License as published by
23166 + the Free Software Foundation; either version 3, or (at your option)
23167 + any later version.
23169 + This program is distributed in the hope that it will be useful,
23170 + but WITHOUT ANY WARRANTY; without even the implied warranty of
23171 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23172 + GNU General Public License for more details.
23174 + You should have received a copy of the GNU General Public License
23175 + along with this program; If not, write to the Free Software
23176 + Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
23177 + 02110-1301, USA. */
23179 +#include "sysdep.h"
23182 +#define CHECKLENGTH 1024 /* # bytes between intermediate checksums */
23183 +#define BUFSIZE 8192 /* max bytes per block */
23185 +static FILE *stagfp;
23186 +static unsigned long stagaddr = ~0;
23187 +static int staglen;
23188 +static unsigned char *stagbuf;
23189 +static int chksum;
23192 +sbinputc (unsigned char c)
23195 + putc (c, stagfp);
23199 +sbinlong (unsigned i)
23201 + sbinputc (i >> 24);
23202 + sbinputc (i >> 16);
23203 + sbinputc (i >> 8);
23208 +sbinheader (unsigned len, unsigned offs)
23221 + if (staglen > 0) {
23222 + sbinheader (staglen, stagaddr);
23223 + for (i = 0; i < staglen; i++) {
23224 + if (i > 0 && i % CHECKLENGTH == 0)
23225 + fputc (-chksum, stagfp); /* intermediate checksum */
23226 + putc (stagbuf[i], stagfp);
23227 + chksum += stagbuf[i];
23229 + fputc (-chksum, stagfp); /* final checksum */
23235 +StagStart (FILE *fp, unsigned long ep)
23237 + stagbuf = (char *) xmalloc (BUFSIZE);
23243 +StagOutput (unsigned long addr, unsigned char byte)
23245 + if (addr != stagaddr + staglen || staglen == BUFSIZE) {
23249 + stagbuf[staglen++] = byte;
23254 +StagEnd (unsigned long ep)
23258 + /* terminating null block */
23259 + sbinheader (0, 0); /* header */
23260 + fputc (0, stagfp); /* checksum */
23265 +++ b/convert/sysdep.h
23267 +#ifdef HAVE_CONFIG_H
23268 +#include "config.h"
23271 +#ifdef HAVE_STDDEF_H
23272 +#include <stddef.h>
23275 +#ifdef HAVE_STDLIB_H
23276 +# include <stdlib.h>
23279 +#ifndef HAVE_STRCHR
23280 +# define strchr index
23281 +# define strrchr rindex
23285 +# include <string.h>
23287 +char *strchr(), *strrchr();
23290 +#ifdef HAVE_STRINGS_H
23291 +# include <strings.h>
23294 +#ifndef HAVE_MEMCPY
23295 +# define memcpy(d, s, n) bcopy ((s), (d), (n))
23296 +# define memmove(d, s, n) bcopy ((s), (d), (n))
23299 +#ifdef HAVE_UNISTD_H
23300 +#include <sys/types.h>
23301 +#include <unistd.h>
23304 +#ifdef HAVE_FCNTL_H
23305 +#include <fcntl.h>
23307 +#ifdef HAVE_SYS_FILE_H
23308 +#include <sys/file.h>
23313 +#define SEEK_SET 0
23316 +#define SEEK_CUR 1
23319 +#ifdef HAVE_LIMITS_H
23320 +#include <limits.h>
23323 +#include <stdio.h>
23324 +#include <errno.h>
23326 +#if defined(__GNUC__) && !defined(C_ALLOCA)
23328 +# define alloca __builtin_alloca
23330 +# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
23331 +# include <alloca.h>
23333 +# ifndef alloca /* predefined by HP cc +Olibcalls */
23334 +# if !defined (__STDC__) && !defined (__hpux)
23338 +# endif /* __STDC__, __hpux */
23339 +# endif /* alloca */
23340 +# endif /* HAVE_ALLOCA_H */
23343 +#ifdef NEED_DECLARATION_MALLOC
23344 +extern void *malloc (size_t);
23346 +#ifdef NEED_DECLARATION_REALLOC
23347 +extern void *realloc (void *, size_t);
23349 +#ifdef NEED_DECLARATION_FREE
23350 +extern void free (void *);
23352 +#ifdef NEED_DECLARATION_STRTOK
23353 +extern char *strtok (char *, const char *);
23356 +#ifdef USE_BINARY_FOPEN
23357 +#define FOPEN_RB "rb"
23358 +#define FOPEN_WB "wb"
23359 +#define FOPEN_AB "ab"
23360 +#define FOPEN_RUB "r+b"
23361 +#define FOPEN_WUB "w+b"
23362 +#define FOPEN_AUB "a+b"
23364 +#define FOPEN_RB "r"
23365 +#define FOPEN_WB "w"
23366 +#define FOPEN_AB "a"
23367 +#define FOPEN_RUB "r+"
23368 +#define FOPEN_WUB "w+"
23369 +#define FOPEN_AUB "a+"
23372 +#define FOPEN_RT "r"
23373 +#define FOPEN_WT "w"
23374 +#define FOPEN_AT "a"
23375 +#define FOPEN_RUT "r+"
23376 +#define FOPEN_WUT "w+"
23377 +#define FOPEN_AUT "a+"
23379 +/* local utility functions */
23380 +extern void * xmalloc (size_t);
23382 +++ b/convert/version.h
23384 +#ifndef CONVERT_VERSION_H
23385 +#define CONVERT_VERSION_H 1
23387 +#define CONVERT_PKGVERSION @conv_version_package@
23388 +#define CONVERT_REPORT_BUGS_TO @report_bugs_to@
23391 --- a/gas/config/m68k-parse.h
23392 +++ b/gas/config/m68k-parse.h
23393 @@ -101,6 +101,7 @@ enum m68k_register
23401 --- a/gas/config/tc-arm.c
23402 +++ b/gas/config/tc-arm.c
23403 @@ -25,10 +25,10 @@
23404 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
23405 02110-1301, USA. */
23408 #include <limits.h>
23409 #include <stdarg.h>
23412 #include "safe-ctype.h"
23413 #include "subsegs.h"
23414 #include "obstack.h"
23415 @@ -199,6 +199,8 @@ static const arm_feature_set arm_ext_div
23416 static const arm_feature_set arm_ext_v7 = ARM_FEATURE (ARM_EXT_V7, 0);
23417 static const arm_feature_set arm_ext_v7a = ARM_FEATURE (ARM_EXT_V7A, 0);
23418 static const arm_feature_set arm_ext_v7r = ARM_FEATURE (ARM_EXT_V7R, 0);
23419 +static const arm_feature_set arm_ext_marvell_f =
23420 + ARM_FEATURE (0, ARM_CEXT_MARVELL_F);
23421 static const arm_feature_set arm_ext_m =
23422 ARM_FEATURE (ARM_EXT_V6M | ARM_EXT_V7M, 0);
23424 @@ -261,6 +263,9 @@ symbolS * GOT_symbol;
23426 static int thumb_mode = 0;
23428 +/* Enables/disables automatic IT insn insertion mode. */
23429 +static int do_automatic_it = 0;
23431 /* If unified_syntax is true, we are processing the new unified
23432 ARM/Thumb syntax. Important differences from the old ARM mode:
23434 @@ -311,6 +316,18 @@ struct neon_type
23438 +enum it_instruction_type
23442 + INSIDE_IT_LAST_INSN,
23443 + IF_INSIDE_IT_LAST_INSN, /* Either outside or inside;
23444 + if inside, should be the last one. */
23445 + NEUTRAL_IT_INSN, /* This could be either inside or outside,
23446 + i.e. BKPT and NOP. */
23447 + IT_INSN /* The IT insn has been parsed. */
23452 const char * error;
23453 @@ -333,6 +350,8 @@ struct arm_it
23457 + enum it_instruction_type it_insn_type;
23462 @@ -670,6 +689,9 @@ struct asm_opcode
23463 #define BAD_BRANCH _("branch must be last instruction in IT block")
23464 #define BAD_NOT_IT _("instruction not allowed in IT block")
23465 #define BAD_FPU _("selected FPU does not support instruction")
23466 +#define BAD_OUT_IT _("thumb conditional instruction should be in IT block")
23467 +#define BAD_IT_COND _("incorrect condition in IT block")
23468 +#define BAD_IT_IT _("IT falling in the range of a previous IT block")
23470 static struct hash_control *arm_ops_hsh;
23471 static struct hash_control *arm_cond_hsh;
23472 @@ -691,7 +713,7 @@ static struct hash_control *arm_barrier_
23474 symbolS * last_label_seen;
23475 static int label_is_thumb_function_name = FALSE;
23478 /* Literal pool structure. Held on a per-section
23479 and per-sub-section basis. */
23481 @@ -711,9 +733,58 @@ typedef struct literal_pool
23482 literal_pool * list_of_pools = NULL;
23484 /* State variables for IT block handling. */
23485 -static bfd_boolean current_it_mask = 0;
23486 -static int current_cc;
23490 + OUTSIDE_IT_BLOCK, MANUAL_IT_BLOCK, AUTOMATIC_IT_BLOCK
23495 + enum it_state state;
23497 + int block_length;
23499 + int state_handled;
23502 +static struct current_it current_it;
23505 +current_it_compatible (int cond)
23507 + return (cond & ~1) == (current_it.cc & ~1);
23511 +conditional_insn(void)
23513 + return inst.cond != COND_ALWAYS;
23517 +in_it_block (void);
23520 +handle_it_state (void);
23523 +force_automatic_it_block_close (void);
23525 +#define set_it_insn_type(type) \
23527 + inst.it_insn_type = type; \
23528 + if (handle_it_state () == FAIL) \
23532 +#define set_it_insn_type_last() \
23534 + if (inst.cond == COND_ALWAYS) \
23535 + set_it_insn_type (IF_INSIDE_IT_LAST_INSN); \
23537 + set_it_insn_type (INSIDE_IT_LAST_INSN); \
23542 /* This array holds the chars that always start a comment. If the
23543 @@ -2210,7 +2281,13 @@ create_neon_reg_alias (char *newname, ch
23547 +#ifdef TC_CASE_SENSITIVE
23548 namelen = nameend - newname;
23550 + newname = original_case_string;
23551 + namelen = strlen (newname);
23554 namebuf = alloca (namelen + 1);
23555 strncpy (namebuf, newname, namelen);
23556 namebuf[namelen] = '\0';
23557 @@ -2348,20 +2425,15 @@ s_unreq (int a ATTRIBUTE_UNUSED)
23559 static enum mstate mapstate = MAP_UNDEFINED;
23562 -mapping_state (enum mstate state)
23563 +/* Create a new mapping symbol for the transition to STATE. */
23566 +make_mapping_symbol (enum mstate state, valueT value, fragS *frag)
23569 const char * symname;
23572 - if (mapstate == state)
23573 - /* The mapping symbol has already been emitted.
23574 - There is nothing else to do. */
23577 - mapstate = state;
23582 @@ -2376,16 +2448,11 @@ mapping_state (enum mstate state)
23584 type = BSF_NO_FLAGS;
23586 - case MAP_UNDEFINED:
23592 - seg_info (now_seg)->tc_segment_info_data.mapstate = state;
23594 - symbolP = symbol_new (symname, now_seg, (valueT) frag_now_fix (), frag_now);
23595 - symbol_table_insert (symbolP);
23596 + symbolP = symbol_new (symname, now_seg, value, frag);
23597 symbol_get_bfdsym (symbolP)->flags |= type | BSF_LOCAL;
23600 @@ -2404,11 +2471,84 @@ mapping_state (enum mstate state)
23608 + /* Save the mapping symbols for future reference. Also check that
23609 + we do not place two mapping symbols at the same offset within a
23610 + frag. We'll handle overlap between frags in
23611 + check_mapping_symbols. */
23614 + know (frag->tc_frag_data.first_map == NULL);
23615 + frag->tc_frag_data.first_map = symbolP;
23617 + if (frag->tc_frag_data.last_map != NULL)
23618 + know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));
23619 + frag->tc_frag_data.last_map = symbolP;
23622 +/* We must sometimes convert a region marked as code to data during
23623 + code alignment, if an odd number of bytes have to be padded. The
23624 + code mapping symbol is pushed to an aligned address. */
23627 +insert_data_mapping_symbol (enum mstate state,
23628 + valueT value, fragS *frag, offsetT bytes)
23630 + /* If there was already a mapping symbol, remove it. */
23631 + if (frag->tc_frag_data.last_map != NULL
23632 + && S_GET_VALUE (frag->tc_frag_data.last_map) == frag->fr_address + value)
23634 + symbolS *symp = frag->tc_frag_data.last_map;
23638 + know (frag->tc_frag_data.first_map == symp);
23639 + frag->tc_frag_data.first_map = NULL;
23641 + frag->tc_frag_data.last_map = NULL;
23642 + symbol_remove (symp, &symbol_rootP, &symbol_lastP);
23645 + make_mapping_symbol (MAP_DATA, value, frag);
23646 + make_mapping_symbol (state, value + bytes, frag);
23649 +/* Set the mapping state to STATE. Only call this when about to
23650 + emit some STATE bytes to the file. */
23653 +mapping_state (enum mstate state)
23655 + if (mapstate == state)
23656 + /* The mapping symbol has already been emitted.
23657 + There is nothing else to do. */
23660 + mapstate = state;
23661 + seg_info (now_seg)->tc_segment_info_data.mapstate = state;
23662 + make_mapping_symbol (state, (valueT) frag_now_fix (), frag_now);
23665 +/* Same as mapping_state, but MAX_CHARS bytes have already been
23666 + allocated. Put the mapping symbol that far back. */
23669 +mapping_state_2 (enum mstate state, int max_chars)
23671 + if (mapstate == state)
23672 + /* The mapping symbol has already been emitted.
23673 + There is nothing else to do. */
23676 + mapstate = state;
23677 + seg_info (now_seg)->tc_segment_info_data.mapstate = state;
23678 + make_mapping_symbol (state, (valueT) frag_now_fix () - max_chars, frag_now);
23681 #define mapping_state(x) /* nothing */
23682 +#define mapping_state_2(x, y) /* nothing */
23685 /* Find the real, Thumb encoded start of a Thumb function. */
23686 @@ -2462,7 +2602,6 @@ opcode_select (int width)
23687 coming from ARM mode, which is word-aligned. */
23688 record_alignment (now_seg, 1);
23690 - mapping_state (MAP_THUMB);
23694 @@ -2478,7 +2617,6 @@ opcode_select (int width)
23696 record_alignment (now_seg, 1);
23698 - mapping_state (MAP_ARM);
23702 @@ -2717,7 +2855,10 @@ s_bss (int ignore ATTRIBUTE_UNUSED)
23703 marking in_bss, then looking at s_skip for clues. */
23704 subseg_set (bss_section, 0);
23705 demand_empty_rest_of_line ();
23706 - mapping_state (MAP_DATA);
23708 +#ifdef md_elf_section_change_hook
23709 + md_elf_section_change_hook ();
23714 @@ -6114,7 +6255,7 @@ parse_operands (char *str, const unsigne
23715 #undef po_reg_or_goto
23716 #undef po_imm_or_fail
23717 #undef po_scalar_or_fail
23720 /* Shorthand macro for instruction encoding functions issuing errors. */
23721 #define constraint(expr, err) do { \
23723 @@ -6136,6 +6277,14 @@ parse_operands (char *str, const unsigne
23727 +/* If REG is R13 (the stack pointer), warn that its use is
23729 +#define warn_deprecated_sp(reg) \
23731 + if (warn_on_deprecated && reg == REG_SP) \
23732 + as_warn (_("use of r13 is deprecated")); \
23735 /* Functions for operand encoding. ARM, then Thumb. */
23737 #define rotate_left(v, n) (v << n | v >> (32 - n))
23738 @@ -7304,11 +7453,14 @@ do_mull (void)
23742 - if (inst.operands[0].present)
23743 + if (inst.operands[0].present
23744 + || ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6k))
23746 /* Architectural NOP hints are CPSR sets with no bits selected. */
23747 inst.instruction &= 0xf0000000;
23748 - inst.instruction |= 0x0320f000 + inst.operands[0].imm;
23749 + inst.instruction |= 0x0320f000;
23750 + if (inst.operands[0].present)
23751 + inst.instruction |= inst.operands[0].imm;
23755 @@ -8468,6 +8620,9 @@ do_t_add_sub (void)
23756 ? inst.operands[1].reg /* Rd, Rs, foo */
23757 : inst.operands[0].reg); /* Rd, foo -> Rd, Rd, foo */
23759 + if (Rd == REG_PC)
23760 + set_it_insn_type_last ();
23762 if (unified_syntax)
23765 @@ -8477,9 +8632,9 @@ do_t_add_sub (void)
23766 flags = (inst.instruction == T_MNEM_adds
23767 || inst.instruction == T_MNEM_subs);
23769 - narrow = (current_it_mask == 0);
23770 + narrow = !in_it_block ();
23772 - narrow = (current_it_mask != 0);
23773 + narrow = in_it_block ();
23774 if (!inst.operands[2].isreg)
23777 @@ -8731,9 +8886,9 @@ do_t_arit3 (void)
23779 /* See if we can do this with a 16-bit instruction. */
23780 if (THUMB_SETS_FLAGS (inst.instruction))
23781 - narrow = current_it_mask == 0;
23782 + narrow = !in_it_block ();
23784 - narrow = current_it_mask != 0;
23785 + narrow = in_it_block ();
23787 if (Rd > 7 || Rn > 7 || Rs > 7)
23789 @@ -8819,9 +8974,9 @@ do_t_arit3c (void)
23791 /* See if we can do this with a 16-bit instruction. */
23792 if (THUMB_SETS_FLAGS (inst.instruction))
23793 - narrow = current_it_mask == 0;
23794 + narrow = !in_it_block ();
23796 - narrow = current_it_mask != 0;
23797 + narrow = in_it_block ();
23799 if (Rd > 7 || Rn > 7 || Rs > 7)
23801 @@ -8974,7 +9129,8 @@ do_t_bfx (void)
23805 - constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
23806 + set_it_insn_type_last ();
23808 if (inst.operands[0].isreg)
23810 constraint (inst.operands[0].reg == REG_PC, BAD_PC);
23811 @@ -8985,12 +9141,7 @@ do_t_blx (void)
23813 /* No register. This must be BLX(1). */
23814 inst.instruction = 0xf000e800;
23816 - if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
23817 - inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
23820 - inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
23821 + inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX;
23822 inst.reloc.pc_rel = 1;
23825 @@ -9001,13 +9152,14 @@ do_t_branch (void)
23829 - if (current_it_mask)
23830 + cond = inst.cond;
23831 + set_it_insn_type (IF_INSIDE_IT_LAST_INSN);
23833 + if (in_it_block ())
23835 /* Conditional branches inside IT blocks are encoded as unconditional
23837 cond = COND_ALWAYS;
23838 - /* A branch must be the last instruction in an IT block. */
23839 - constraint (current_it_mask != 0x10, BAD_BRANCH);
23843 @@ -9057,13 +9209,14 @@ do_t_bkpt (void)
23844 constraint (inst.operands[0].imm > 255,
23845 _("immediate value out of range"));
23846 inst.instruction |= inst.operands[0].imm;
23847 + set_it_insn_type (NEUTRAL_IT_INSN);
23852 do_t_branch23 (void)
23854 - constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
23855 + set_it_insn_type_last ();
23856 inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23;
23857 inst.reloc.pc_rel = 1;
23859 @@ -9082,7 +9235,7 @@ do_t_branch23 (void)
23863 - constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
23864 + set_it_insn_type_last ();
23865 inst.instruction |= inst.operands[0].reg << 3;
23866 /* ??? FIXME: Should add a hacky reloc here if reg is REG_PC. The reloc
23867 should cause the alignment to be checked once it is known. This is
23868 @@ -9094,7 +9247,7 @@ do_t_bxj (void)
23872 - constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
23873 + set_it_insn_type_last ();
23874 Rm = inst.operands[0].reg;
23875 reject_bad_reg (Rm);
23876 inst.instruction |= Rm << 16;
23877 @@ -9120,14 +9273,14 @@ do_t_clz (void)
23881 - constraint (current_it_mask, BAD_NOT_IT);
23882 + set_it_insn_type (OUTSIDE_IT_INSN);
23883 inst.instruction |= inst.operands[0].imm;
23889 - constraint (current_it_mask, BAD_NOT_IT);
23890 + set_it_insn_type (OUTSIDE_IT_INSN);
23892 && (inst.operands[1].present || inst.size_req == 4)
23893 && ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v6_notm))
23894 @@ -9174,7 +9327,7 @@ do_t_cpy (void)
23898 - constraint (current_it_mask, BAD_NOT_IT);
23899 + set_it_insn_type (OUTSIDE_IT_INSN);
23900 constraint (inst.operands[0].reg > 7, BAD_HIREG);
23901 inst.instruction |= inst.operands[0].reg;
23902 inst.reloc.pc_rel = 1;
23903 @@ -9188,6 +9341,17 @@ do_t_dbg (void)
23907 +do_marvell_div (void)
23909 + /* Encode SDIV or UDIV instructions using the special Marvell
23910 + encoding utilizing MRC. */
23912 + inst.instruction |= inst.operands[0].reg << 12;
23913 + inst.instruction |= inst.operands[1].reg << 16;
23914 + inst.instruction |= inst.operands[2].reg;
23920 unsigned Rd, Rn, Rm;
23921 @@ -9220,9 +9384,9 @@ do_t_it (void)
23923 unsigned int cond = inst.operands[0].imm;
23925 - constraint (current_it_mask, BAD_NOT_IT);
23926 - current_it_mask = (inst.instruction & 0xf) | 0x10;
23927 - current_cc = cond;
23928 + set_it_insn_type (IT_INSN);
23929 + current_it.mask = (inst.instruction & 0xf) | 0x10;
23930 + current_it.cc = cond;
23932 /* If the condition is a negative condition, invert the mask. */
23933 if ((cond & 0x1) == 0x0)
23934 @@ -9257,9 +9421,13 @@ encode_thumb2_ldmstm (int base, unsigned
23935 inst.error = _("SP not allowed in register list");
23938 - if (mask & (1 << 14)
23939 - && mask & (1 << 15))
23940 - inst.error = _("LR and PC should not both be in register list");
23941 + if (mask & (1 << 15))
23943 + if (mask & (1 << 14))
23944 + inst.error = _("LR and PC should not both be in register list");
23946 + set_it_insn_type_last ();
23949 if ((mask & (1 << base)) != 0
23951 @@ -9435,6 +9603,13 @@ do_t_ldst (void)
23952 unsigned long opcode;
23955 + if (inst.operands[0].isreg
23956 + && !inst.operands[0].preind
23957 + && inst.operands[0].reg == REG_PC)
23959 + set_it_insn_type_last ();
23962 opcode = inst.instruction;
23963 if (unified_syntax)
23965 @@ -9655,6 +9830,9 @@ do_t_mov_cmp (void)
23966 Rn = inst.operands[0].reg;
23967 Rm = inst.operands[1].reg;
23969 + if (Rn == REG_PC)
23970 + set_it_insn_type_last ();
23972 if (unified_syntax)
23974 int r0off = (inst.instruction == T_MNEM_mov
23975 @@ -9665,7 +9843,7 @@ do_t_mov_cmp (void)
23977 low_regs = (Rn <= 7 && Rm <= 7);
23978 opcode = inst.instruction;
23979 - if (current_it_mask)
23980 + if (in_it_block ())
23981 narrow = opcode != T_MNEM_movs;
23983 narrow = opcode != T_MNEM_movs || low_regs;
23984 @@ -9686,7 +9864,18 @@ do_t_mov_cmp (void)
23985 if (opcode == T_MNEM_cmp)
23987 constraint (Rn == REG_PC, BAD_PC);
23988 - reject_bad_reg (Rm);
23991 + /* In the Thumb-2 ISA, use of R13 as Rm is deprecated,
23993 + warn_deprecated_sp (Rm);
23994 + /* R15 was documented as a valid choice for Rm in ARMv6,
23995 + but as UNPREDICTABLE in ARMv7. ARM's proprietary
23996 + tools reject R15, so we do too. */
23997 + constraint (Rm == REG_PC, BAD_PC);
24000 + reject_bad_reg (Rm);
24002 else if (opcode == T_MNEM_mov
24003 || opcode == T_MNEM_movs)
24004 @@ -9709,7 +9898,7 @@ do_t_mov_cmp (void)
24005 if (!inst.operands[1].isreg)
24007 /* Immediate operand. */
24008 - if (current_it_mask == 0 && opcode == T_MNEM_mov)
24009 + if (!in_it_block () && opcode == T_MNEM_mov)
24011 if (low_regs && narrow)
24013 @@ -9735,7 +9924,7 @@ do_t_mov_cmp (void)
24014 /* Register shifts are encoded as separate shift instructions. */
24015 bfd_boolean flags = (inst.instruction == T_MNEM_movs);
24017 - if (current_it_mask)
24018 + if (in_it_block ())
24022 @@ -9791,7 +9980,7 @@ do_t_mov_cmp (void)
24023 && (inst.instruction == T_MNEM_mov
24024 || inst.instruction == T_MNEM_movs))
24026 - if (current_it_mask)
24027 + if (in_it_block ())
24028 narrow = (inst.instruction == T_MNEM_mov);
24030 narrow = (inst.instruction == T_MNEM_movs);
24031 @@ -9953,9 +10142,9 @@ do_t_mvn_tst (void)
24032 else if (inst.instruction == T_MNEM_cmn)
24034 else if (THUMB_SETS_FLAGS (inst.instruction))
24035 - narrow = (current_it_mask == 0);
24036 + narrow = !in_it_block ();
24038 - narrow = (current_it_mask != 0);
24039 + narrow = in_it_block ();
24041 if (!inst.operands[1].isreg)
24043 @@ -10094,9 +10283,9 @@ do_t_mul (void)
24046 else if (inst.instruction == T_MNEM_muls)
24047 - narrow = (current_it_mask == 0);
24048 + narrow = !in_it_block ();
24050 - narrow = (current_it_mask != 0);
24051 + narrow = in_it_block ();
24055 @@ -10162,6 +10351,8 @@ do_t_mull (void)
24059 + set_it_insn_type(NEUTRAL_IT_INSN);
24061 if (unified_syntax)
24063 if (inst.size_req == 4 || inst.operands[0].imm > 15)
24064 @@ -10198,9 +10389,9 @@ do_t_neg (void)
24065 bfd_boolean narrow;
24067 if (THUMB_SETS_FLAGS (inst.instruction))
24068 - narrow = (current_it_mask == 0);
24069 + narrow = !in_it_block ();
24071 - narrow = (current_it_mask != 0);
24072 + narrow = in_it_block ();
24073 if (inst.operands[0].reg > 7 || inst.operands[1].reg > 7)
24075 if (inst.size_req == 4)
24076 @@ -10424,9 +10615,9 @@ do_t_rsb (void)
24077 bfd_boolean narrow;
24079 if ((inst.instruction & 0x00100000) != 0)
24080 - narrow = (current_it_mask == 0);
24081 + narrow = !in_it_block ();
24083 - narrow = (current_it_mask != 0);
24084 + narrow = in_it_block ();
24086 if (Rd > 7 || Rs > 7)
24088 @@ -10460,7 +10651,7 @@ do_t_rsb (void)
24092 - constraint (current_it_mask, BAD_NOT_IT);
24093 + set_it_insn_type (OUTSIDE_IT_INSN);
24094 if (inst.operands[0].imm)
24095 inst.instruction |= 0x8;
24097 @@ -10490,9 +10681,9 @@ do_t_shift (void)
24100 if (THUMB_SETS_FLAGS (inst.instruction))
24101 - narrow = (current_it_mask == 0);
24102 + narrow = !in_it_block ();
24104 - narrow = (current_it_mask != 0);
24105 + narrow = in_it_block ();
24106 if (inst.operands[0].reg > 7 || inst.operands[1].reg > 7)
24108 if (!inst.operands[2].isreg && shift_kind == SHIFT_ROR)
24109 @@ -10778,7 +10969,7 @@ do_t_tb (void)
24112 half = (inst.instruction & 0x10) != 0;
24113 - constraint (current_it_mask && current_it_mask != 0x10, BAD_BRANCH);
24114 + set_it_insn_type_last ();
24115 constraint (inst.operands[0].immisreg,
24116 _("instruction requires register index"));
24118 @@ -14410,6 +14601,28 @@ output_inst (const char * str)
24119 dwarf2_emit_insn (inst.size);
24123 +output_it_inst (int cond, int mask, char* to)
24125 + unsigned long instruction = 0xbf00;
24128 + instruction |= mask;
24129 + instruction |= cond << 4;
24133 + to = frag_more (2);
24135 + dwarf2_emit_insn (2);
24139 + md_number_to_chars (to, instruction, 2);
24144 /* Tag values used in struct asm_opcode's tag field. */
24147 @@ -14655,6 +14868,301 @@ opcode_lookup (char **str)
24151 +/* Output an automatically inserted IT instruction. Initially this only covers
24152 + a single instruction, but may be extended later. To simply cleanup at the end
24153 + of a block we update the instruction as we go along. */
24155 +new_automatic_it_block (int cond)
24157 + current_it.state = AUTOMATIC_IT_BLOCK;
24158 + current_it.mask = 0x18;
24159 + current_it.cc = cond;
24160 + current_it.block_length = 1;
24161 + current_it.insn = output_it_inst(cond, current_it.mask, NULL);
24164 +/* Close an automatic IT block.
24165 + See comments in new_automatic_it_block (). */
24167 +close_automatic_it_block (void)
24169 + current_it.mask = 0x10;
24170 + current_it.block_length = 0;
24173 +/* Update the mask of the current automatically-generated IT
24174 + instruction. See comments in new_automatic_it_block (). */
24176 +current_it_add_mask (int cond)
24178 +#define CLEAR_BIT(value, nbit) ((value) & ~(1 << (nbit)))
24179 +#define SET_BIT_VALUE(value, bitvalue, nbit) (CLEAR_BIT(value, nbit) \
24180 + | ((bitvalue) << (nbit)))
24182 + const int resulting_bit = (cond & 1);
24183 + current_it.mask &= 0xf;
24184 + current_it.mask = SET_BIT_VALUE (current_it.mask,
24186 + (5 - current_it.block_length));
24187 + current_it.mask = SET_BIT_VALUE (current_it.mask,
24189 + ((5 - current_it.block_length) - 1) );
24190 + output_it_inst (current_it.cc, current_it.mask, current_it.insn);
24193 +#undef SET_BIT_VALUE
24197 +/* The IT blocks handling machinery is accessed through the these functions:
24198 + it_fsm_pre_encode () from md_assemble ()
24199 + set_it_insn_type () optional, from the tencode functions
24200 + set_it_insn_type_last () ditto
24201 + in_it_block () ditto
24202 + it_fsm_post_encode () from md_assemble ()
24203 + force_automatic_it_block_close () from label habdling functions
24206 + 1) md_assemble () calls it_fsm_pre_encode () before calling tencode (),
24207 + initializing the IT insn type with a generic initial value depending
24208 + on the inst.condition.
24209 + 2) During the tencode function, two things may happen:
24210 + a) The tencode function overrides the IT insn type by
24211 + calling either set_it_insn_type (type) or set_it_insn_type_last ().
24212 + b) The tencode function queries the IT block state by
24213 + calling in_it_block () (i.e. to determine narrow/wide mode).
24215 + Both set_it_insn_type and in_it_block run the internal FSM state
24216 + handling function (handle_it_state), because: a) setting the IT insn
24217 + type may incur in an invalid state (exiting the function),
24218 + and b) querying the state requires the FSM to be updated.
24219 + Specifically we want to avoid creating an IT block for conditional
24220 + branches, so it_fsm_pre_encode is actually a guess and we can't
24221 + determine whether an IT block is required until the tencode () routine
24222 + has decided what type of instruction this actually it.
24223 + Because of this, if set_it_insn_type and in_it_block have to be used,
24224 + set_it_insn_type has to be called first.
24226 + set_it_insn_type_last () is a wrapper of set_it_insn_type (type), that
24227 + determines the insn IT type depending on the inst.cond code.
24228 + When a tencode () routine encodes an instruction that can be
24229 + either outside an IT block, or, in the case of being inside, has to be
24230 + the last one, set_it_insn_type_last () will determine the proper
24231 + IT instruction type based on the inst.cond code. Otherwise,
24232 + set_it_insn_type can be called for overriding that logic or
24233 + for covering other cases.
24235 + Calling handle_it_state () may not transition the IT block state to
24236 + OUTSIDE_IT_BLOCK immediatelly, since the (current) state could be
24237 + still queried. Instead, if the FSM determines that the state should
24238 + be transitioned to OUTSIDE_IT_BLOCK, a flag is marked to be closed
24239 + after the tencode () function: that's what it_fsm_post_encode () does.
24241 + Since in_it_block () calls the state handling function to get an
24242 + updated state, an error may occur (due to invalid insns combination).
24243 + In that case, inst.error is set.
24244 + Therefore, inst.error has to be checked after the execution of
24245 + the tencode () routine.
24247 + 3) Back in md_assemble(), it_fsm_post_encode () is called to commit
24248 + any pending state change (if any) that didn't take place in
24249 + handle_it_state () as explained above. */
24252 +it_fsm_pre_encode (void)
24254 + if (inst.cond != COND_ALWAYS)
24255 + inst.it_insn_type = INSIDE_IT_INSN;
24257 + inst.it_insn_type = OUTSIDE_IT_INSN;
24259 + current_it.state_handled = 0;
24262 +/* IT state FSM handling function. */
24264 +handle_it_state (void)
24266 + current_it.state_handled = 1;
24268 + switch(current_it.state)
24270 + case OUTSIDE_IT_BLOCK:
24271 + switch (inst.it_insn_type)
24273 + case OUTSIDE_IT_INSN:
24276 + case INSIDE_IT_INSN:
24277 + case INSIDE_IT_LAST_INSN:
24278 + if (do_automatic_it)
24280 + /* Automatically generate the IT instruction. */
24281 + new_automatic_it_block (inst.cond);
24282 + if (inst.it_insn_type == INSIDE_IT_LAST_INSN)
24283 + close_automatic_it_block ();
24287 + inst.error = BAD_OUT_IT;
24292 + case IF_INSIDE_IT_LAST_INSN:
24293 + case NEUTRAL_IT_INSN:
24297 + current_it.state = MANUAL_IT_BLOCK;
24298 + current_it.block_length = 0;
24303 + case AUTOMATIC_IT_BLOCK:
24304 + /* Three things may happen now:
24305 + a) We should increment current it block size;
24306 + b) We should close current it block (closing insn or 4 insns);
24307 + c) We should close current it block and start a new one (due
24308 + to incompatible conditions or
24309 + 4 insns-length block reached). */
24311 + switch (inst.it_insn_type)
24313 + case OUTSIDE_IT_INSN:
24314 + /* The closure of the block shall happen immediatelly,
24315 + so any in_it_block () call reports the block as closed. */
24316 + force_automatic_it_block_close ();
24319 + case INSIDE_IT_INSN:
24320 + case INSIDE_IT_LAST_INSN:
24321 + case IF_INSIDE_IT_LAST_INSN:
24322 + current_it.block_length++;
24324 + if (current_it.block_length > 4
24325 + || !current_it_compatible (inst.cond))
24327 + force_automatic_it_block_close ();
24328 + if (inst.it_insn_type != IF_INSIDE_IT_LAST_INSN)
24329 + new_automatic_it_block (inst.cond);
24333 + current_it_add_mask (inst.cond);
24336 + if (current_it.state == AUTOMATIC_IT_BLOCK
24337 + && (inst.it_insn_type == INSIDE_IT_LAST_INSN
24338 + || inst.it_insn_type == IF_INSIDE_IT_LAST_INSN))
24339 + close_automatic_it_block ();
24342 + case NEUTRAL_IT_INSN:
24343 + current_it.block_length++;
24345 + if (current_it.block_length > 4)
24346 + force_automatic_it_block_close ();
24348 + current_it_add_mask (current_it.cc & 1);
24352 + close_automatic_it_block ();
24353 + current_it.state = MANUAL_IT_BLOCK;
24358 + case MANUAL_IT_BLOCK:
24360 + /* Check conditional suffixes. */
24361 + const int cond = current_it.cc ^ ((current_it.mask >> 4) & 1) ^ 1;
24363 + current_it.mask <<= 1;
24364 + current_it.mask &= 0x1f;
24365 + is_last = (current_it.mask == 0x10);
24367 + switch (inst.it_insn_type)
24369 + case OUTSIDE_IT_INSN:
24370 + inst.error = BAD_NOT_IT;
24373 + case INSIDE_IT_INSN:
24374 + if (cond != inst.cond)
24376 + inst.error = BAD_IT_COND;
24381 + case INSIDE_IT_LAST_INSN:
24382 + case IF_INSIDE_IT_LAST_INSN:
24383 + if (cond != inst.cond)
24385 + inst.error = BAD_IT_COND;
24390 + inst.error = BAD_BRANCH;
24395 + case NEUTRAL_IT_INSN:
24396 + /* The BKPT instruction is unconditional even in an IT block. */
24400 + inst.error = BAD_IT_IT;
24411 +it_fsm_post_encode (void)
24415 + if (!current_it.state_handled)
24416 + handle_it_state ();
24418 + is_last = (current_it.mask == 0x10);
24421 + current_it.state = OUTSIDE_IT_BLOCK;
24422 + current_it.mask = 0;
24427 +force_automatic_it_block_close (void)
24429 + if (current_it.state == AUTOMATIC_IT_BLOCK)
24431 + close_automatic_it_block ();
24432 + current_it.state = OUTSIDE_IT_BLOCK;
24433 + current_it.mask = 0;
24438 +in_it_block (void)
24440 + if (!current_it.state_handled)
24441 + handle_it_state ();
24443 + return current_it.state != OUTSIDE_IT_BLOCK;
24447 md_assemble (char *str)
24449 @@ -14719,40 +15227,24 @@ md_assemble (char *str)
24450 /* Implicit require narrow instructions on Thumb-1. This avoids
24451 relaxation accidentally introducing Thumb-2 instructions. */
24452 if (opcode->tencode != do_t_blx && opcode->tencode != do_t_branch23
24453 - && !ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr))
24454 + && !(ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr)
24455 + || ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_barrier)))
24459 - /* Check conditional suffixes. */
24460 - if (current_it_mask)
24463 - cond = current_cc ^ ((current_it_mask >> 4) & 1) ^ 1;
24464 - current_it_mask <<= 1;
24465 - current_it_mask &= 0x1f;
24466 - /* The BKPT instruction is unconditional even in an IT block. */
24468 - && cond != inst.cond && opcode->tencode != do_t_bkpt)
24470 - as_bad (_("incorrect condition in IT block"));
24474 - else if (inst.cond != COND_ALWAYS && opcode->tencode != do_t_branch)
24476 - as_bad (_("thumb conditional instruction not in IT block"));
24480 mapping_state (MAP_THUMB);
24481 inst.instruction = opcode->tvalue;
24483 if (!parse_operands (p, opcode->operands))
24484 - opcode->tencode ();
24486 + /* Prepare the it_insn_type for those encodings that don't set
24488 + it_fsm_pre_encode ();
24490 - /* Clear current_it_mask at the end of an IT block. */
24491 - if (current_it_mask == 0x10)
24492 - current_it_mask = 0;
24493 + opcode->tencode ();
24495 + it_fsm_post_encode ();
24498 if (!(inst.error || inst.relax))
24500 @@ -14777,7 +15269,8 @@ md_assemble (char *str)
24501 This is overly pessimistic for relaxable instructions. */
24502 if (((inst.size == 4 && (inst.instruction & 0xf800e800) != 0xf000e800)
24504 - && !ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr))
24505 + && !(ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr)
24506 + || ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_barrier)))
24507 ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
24510 @@ -14847,6 +15340,8 @@ arm_frob_label (symbolS * sym)
24511 ARM_SET_INTERWORK (sym, support_interwork);
24514 + force_automatic_it_block_close ();
24516 /* Note - do not allow local symbols (.Lxxx) to be labelled
24517 as Thumb functions. This is because these labels, whilst
24518 they exist inside Thumb code, are not the entry points for
24519 @@ -15834,11 +16329,14 @@ static const struct asm_opcode insns[] =
24520 TCE(tbb, 0, e8d0f000, 1, (TB), 0, t_tb),
24521 TCE(tbh, 0, e8d0f010, 1, (TB), 0, t_tb),
24523 - /* Thumb-2 hardware division instructions (R and M profiles only). */
24524 + /* Thumb-2 hardware division instructions (R and M profiles only) and
24525 + Marvell-specific encoding of sdiv and udiv as mrc. */
24526 #undef THUMB_VARIANT
24527 #define THUMB_VARIANT &arm_ext_div
24528 - TCE(sdiv, 0, fb90f0f0, 3, (RR, oRR, RR), 0, t_div),
24529 - TCE(udiv, 0, fbb0f0f0, 3, (RR, oRR, RR), 0, t_div),
24530 +#undef ARM_VARIANT
24531 +#define ARM_VARIANT &arm_ext_marvell_f
24532 + TCE(sdiv, e300690, fb90f0f0, 3, (RR, oRR, RR), marvell_div, t_div),
24533 + TCE(udiv, e300610, fbb0f0f0, 3, (RR, oRR, RR), marvell_div, t_div),
24535 /* ARM V6M/V7 instructions. */
24537 @@ -17550,14 +18048,39 @@ md_section_align (segT segment ATTRIBUT
24539 arm_handle_align (fragS * fragP)
24541 - static char const arm_noop[4] = { 0x00, 0x00, 0xa0, 0xe1 };
24542 - static char const thumb_noop[2] = { 0xc0, 0x46 };
24543 - static char const arm_bigend_noop[4] = { 0xe1, 0xa0, 0x00, 0x00 };
24544 - static char const thumb_bigend_noop[2] = { 0x46, 0xc0 };
24546 - int bytes, fix, noop_size;
24547 + static char const arm_noop[2][2][4] =
24550 + {0x00, 0x00, 0xa0, 0xe1}, /* LE */
24551 + {0xe1, 0xa0, 0x00, 0x00}, /* BE */
24554 + {0x00, 0xf0, 0x20, 0xe3}, /* LE */
24555 + {0xe3, 0x20, 0xf0, 0x00}, /* BE */
24558 + static char const thumb_noop[2][2][2] =
24561 + {0xc0, 0x46}, /* LE */
24562 + {0x46, 0xc0}, /* BE */
24565 + {0x00, 0xbf}, /* LE */
24566 + {0xbf, 0x00} /* BE */
24569 + static char const wide_thumb_noop[2][4] =
24570 + { /* Wide Thumb-2 */
24571 + {0xaf, 0xf3, 0x00, 0x80}, /* LE */
24572 + {0xf3, 0xaf, 0x80, 0x00}, /* BE */
24575 + unsigned bytes, fix, noop_size;
24578 + const char *narrow_noop = NULL;
24579 + enum mstate state;
24581 if (fragP->fr_type != rs_align_code)
24583 @@ -17569,31 +18092,52 @@ arm_handle_align (fragS * fragP)
24584 if (bytes > MAX_MEM_FOR_RS_ALIGN_CODE)
24585 bytes &= MAX_MEM_FOR_RS_ALIGN_CODE;
24587 - if (fragP->tc_frag_data)
24588 + if (fragP->tc_frag_data.thumb_mode)
24590 - if (target_big_endian)
24591 - noop = thumb_bigend_noop;
24592 + if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6t2))
24594 + narrow_noop = thumb_noop[1][target_big_endian];
24595 + noop = wide_thumb_noop[target_big_endian];
24598 - noop = thumb_noop;
24599 - noop_size = sizeof (thumb_noop);
24600 + noop = thumb_noop[0][target_big_endian];
24602 + state = MAP_THUMB;
24606 - if (target_big_endian)
24607 - noop = arm_bigend_noop;
24610 - noop_size = sizeof (arm_noop);
24611 + noop = arm_noop[ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6k) != 0]
24612 + [target_big_endian];
24618 + fragP->fr_var = noop_size;
24620 if (bytes & (noop_size - 1))
24622 fix = bytes & (noop_size - 1);
24623 + insert_data_mapping_symbol (state, fragP->fr_fix, fragP, fix);
24624 memset (p, 0, fix);
24631 + if (bytes & noop_size)
24633 + /* Insert a narrow noop. */
24634 + memcpy (p, narrow_noop, noop_size);
24636 + bytes -= noop_size;
24637 + fix += noop_size;
24640 + /* Use wide noops for the remainder */
24644 while (bytes >= noop_size)
24646 memcpy (p, noop, noop_size);
24647 @@ -17603,7 +18147,6 @@ arm_handle_align (fragS * fragP)
24650 fragP->fr_fix += fix;
24651 - fragP->fr_var = noop_size;
24654 /* Called from md_do_align. Used to create an alignment
24655 @@ -17615,9 +18158,15 @@ arm_frag_align_code (int n, int max)
24658 /* We assume that there will never be a requirement
24659 - to support alignments greater than 32 bytes. */
24660 + to support alignments greater than [MAX_MEM_FOR_RS_ALIGN_CODE] bytes. */
24661 if (max > MAX_MEM_FOR_RS_ALIGN_CODE)
24662 - as_fatal (_("alignments greater than 32 bytes not supported in .text sections."));
24664 + char err_msg[128];
24665 + sprintf (err_msg,
24666 + _("alignments greater than %d bytes not supported in .text sections."),
24667 + MAX_MEM_FOR_RS_ALIGN_CODE + 1);
24668 + as_fatal (err_msg);
24671 p = frag_var (rs_align_code,
24672 MAX_MEM_FOR_RS_ALIGN_CODE,
24673 @@ -17632,10 +18181,26 @@ arm_frag_align_code (int n, int max)
24674 /* Perform target specific initialisation of a frag. */
24677 -arm_init_frag (fragS * fragP)
24678 +arm_init_frag (fragS * fragP, int max_chars)
24680 /* Record whether this frag is in an ARM or a THUMB area. */
24681 - fragP->tc_frag_data = thumb_mode;
24682 + fragP->tc_frag_data.thumb_mode = thumb_mode;
24684 + /* Record a mapping symbol for alignment frags. We will delete this
24685 + later if the alignment ends up empty. */
24686 + switch (fragP->fr_type)
24689 + case rs_align_test:
24691 + mapping_state_2 (MAP_DATA, max_chars);
24693 + case rs_align_code:
24694 + mapping_state_2 (thumb_mode ? MAP_THUMB : MAP_ARM, max_chars);
24702 @@ -18127,9 +18692,13 @@ md_pcrel_from_section (fixS * fixP, segT
24703 case BFD_RELOC_THUMB_PCREL_BRANCH20:
24704 case BFD_RELOC_THUMB_PCREL_BRANCH23:
24705 case BFD_RELOC_THUMB_PCREL_BRANCH25:
24706 - case BFD_RELOC_THUMB_PCREL_BLX:
24709 + /* BLX is like branches above, but forces the low two bits of PC to
24711 + case BFD_RELOC_THUMB_PCREL_BLX:
24712 + return (base + 4) & ~3;
24714 /* ARM mode branches are offset by +8. However, the Windows CE
24715 loader expects the relocation not to take this into account. */
24716 case BFD_RELOC_ARM_PCREL_BRANCH:
24717 @@ -18499,6 +19068,15 @@ md_apply_fix (fixS * fixP,
24721 + if (fixP->fx_addsy
24722 + && S_GET_SEGMENT (fixP->fx_addsy) != seg)
24724 + as_bad_where (fixP->fx_file, fixP->fx_line,
24725 + _("symbol %s is in a different section"),
24726 + S_GET_NAME (fixP->fx_addsy));
24730 newimm = encode_arm_immediate (value);
24731 temp = md_chars_to_number (buf, INSN_SIZE);
24733 @@ -18522,6 +19100,24 @@ md_apply_fix (fixS * fixP,
24734 unsigned int highpart = 0;
24735 unsigned int newinsn = 0xe1a00000; /* nop. */
24737 + if (fixP->fx_addsy
24738 + && ! S_IS_DEFINED (fixP->fx_addsy))
24740 + as_bad_where (fixP->fx_file, fixP->fx_line,
24741 + _("undefined symbol %s used as an immediate value"),
24742 + S_GET_NAME (fixP->fx_addsy));
24746 + if (fixP->fx_addsy
24747 + && S_GET_SEGMENT (fixP->fx_addsy) != seg)
24749 + as_bad_where (fixP->fx_file, fixP->fx_line,
24750 + _("symbol %s is in a different section"),
24751 + S_GET_NAME (fixP->fx_addsy));
24755 newimm = encode_arm_immediate (value);
24756 temp = md_chars_to_number (buf, INSN_SIZE);
24758 @@ -19624,7 +20220,6 @@ tc_gen_reloc (asection *section, fixS *f
24759 case BFD_RELOC_THUMB_PCREL_BRANCH20:
24760 case BFD_RELOC_THUMB_PCREL_BRANCH23:
24761 case BFD_RELOC_THUMB_PCREL_BRANCH25:
24762 - case BFD_RELOC_THUMB_PCREL_BLX:
24763 case BFD_RELOC_VTABLE_ENTRY:
24764 case BFD_RELOC_VTABLE_INHERIT:
24766 @@ -19633,6 +20228,15 @@ tc_gen_reloc (asection *section, fixS *f
24767 code = fixp->fx_r_type;
24770 + case BFD_RELOC_THUMB_PCREL_BLX:
24772 + if (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4)
24773 + code = BFD_RELOC_THUMB_PCREL_BRANCH23;
24776 + code = BFD_RELOC_THUMB_PCREL_BLX;
24779 case BFD_RELOC_ARM_LITERAL:
24780 case BFD_RELOC_ARM_HWLITERAL:
24781 /* If this is called then the a literal has
24782 @@ -19992,6 +20596,73 @@ arm_cleanup (void)
24787 +/* Remove any excess mapping symbols generated for alignment frags in
24788 + SEC. We may have created a mapping symbol before a zero byte
24789 + alignment; remove it if there's a mapping symbol after the
24792 +check_mapping_symbols (bfd *abfd ATTRIBUTE_UNUSED, asection *sec,
24793 + void *dummy ATTRIBUTE_UNUSED)
24795 + segment_info_type *seginfo = seg_info (sec);
24798 + if (seginfo == NULL || seginfo->frchainP == NULL)
24801 + for (fragp = seginfo->frchainP->frch_root;
24803 + fragp = fragp->fr_next)
24805 + symbolS *sym = fragp->tc_frag_data.last_map;
24806 + fragS *next = fragp->fr_next;
24808 + /* Variable-sized frags have been converted to fixed size by
24809 + this point. But if this was variable-sized to start with,
24810 + there will be a fixed-size frag after it. So don't handle
24812 + if (sym == NULL || next == NULL)
24815 + if (S_GET_VALUE (sym) < next->fr_address)
24816 + /* Not at the end of this frag. */
24818 + know (S_GET_VALUE (sym) == next->fr_address);
24822 + if (next->tc_frag_data.first_map != NULL)
24824 + /* Next frag starts with a mapping symbol. Discard this
24826 + symbol_remove (sym, &symbol_rootP, &symbol_lastP);
24830 + if (next->fr_next == NULL)
24832 + /* This mapping symbol is at the end of the section. Discard
24834 + know (next->fr_fix == 0 && next->fr_var == 0);
24835 + symbol_remove (sym, &symbol_rootP, &symbol_lastP);
24839 + /* As long as we have empty frags without any mapping symbols,
24841 + /* If the next frag is non-empty and does not start with a
24842 + mapping symbol, then this mapping symbol is required. */
24843 + if (next->fr_address != next->fr_next->fr_address)
24846 + next = next->fr_next;
24848 + while (next != NULL);
24853 /* Adjust the symbol table. This marks Thumb symbols as distinct from
24856 @@ -20066,6 +20737,9 @@ arm_adjust_symtab (void)
24861 + /* Remove any overlapping mapping symbols generated by alignment frags. */
24862 + bfd_map_over_sections (stdoutput, check_mapping_symbols, (char *) 0);
24866 @@ -20154,7 +20828,7 @@ md_begin (void)
24868 else if (!mfpu_opt)
24870 -#if !(defined (TE_LINUX) || defined (TE_NetBSD) || defined (TE_VXWORKS))
24871 +#if !(defined (EABI_DEFAULT) || defined (TE_NetBSD) || defined (TE_VXWORKS))
24872 /* Some environments specify a default FPU. If they don't, infer it
24873 from the processor. */
24875 @@ -20414,6 +21088,8 @@ struct arm_option_table arm_opts[] =
24876 {"mthumb", N_("assemble Thumb code"), &thumb_mode, 1, NULL},
24877 {"mthumb-interwork", N_("support ARM/Thumb interworking"),
24878 &support_interwork, 1, NULL},
24879 + {"mauto-it", N_("Enables/disables automatic IT insn insertion mode"),
24880 + &do_automatic_it, 1, NULL},
24881 {"mapcs-32", N_("code uses 32-bit program counter"), &uses_apcs_26, 0, NULL},
24882 {"mapcs-26", N_("code uses 26-bit program counter"), &uses_apcs_26, 1, NULL},
24883 {"mapcs-float", N_("floating point args are in fp regs"), &uses_apcs_float,
24884 @@ -20660,6 +21336,7 @@ static const struct arm_cpu_option_table
24886 {"cortex-r4", ARM_ARCH_V7R, FPU_NONE, NULL},
24887 {"cortex-m3", ARM_ARCH_V7M, FPU_NONE, NULL},
24888 + {"cortex-m0", ARM_ARCH_V6M, FPU_NONE, NULL},
24889 {"cortex-m1", ARM_ARCH_V6M, FPU_NONE, NULL},
24890 /* ??? XSCALE is really an architecture. */
24891 {"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
24892 @@ -20669,6 +21346,8 @@ static const struct arm_cpu_option_table
24893 {"i80200", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
24895 {"ep9312", ARM_FEATURE(ARM_AEXT_V4T, ARM_CEXT_MAVERICK), FPU_ARCH_MAVERICK, "ARM920T"},
24897 + {"marvell-f", ARM_ARCH_MARVELL_F, FPU_ARCH_VFP_V2, NULL},
24898 {NULL, ARM_ARCH_NONE, ARM_ARCH_NONE, NULL}
24901 @@ -20722,6 +21401,7 @@ static const struct arm_arch_option_tabl
24902 {"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP},
24903 {"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP},
24904 {"iwmmxt2", ARM_ARCH_IWMMXT2,FPU_ARCH_VFP},
24905 + {"marvell-f", ARM_ARCH_MARVELL_F,FPU_ARCH_VFP},
24906 {NULL, ARM_ARCH_NONE, ARM_ARCH_NONE}
24909 --- a/gas/config/tc-arm.h
24910 +++ b/gas/config/tc-arm.h
24911 @@ -179,13 +179,27 @@ void arm_copy_symbol_attributes (symbolS
24913 #define TC_CONS_FIX_NEW cons_fix_new_arm
24915 -#define MAX_MEM_FOR_RS_ALIGN_CODE 31
24916 +#define MAX_MEM_ALIGNMENT_BYTES 6
24917 +#define MAX_MEM_FOR_RS_ALIGN_CODE ((1 << MAX_MEM_ALIGNMENT_BYTES) - 1)
24919 /* For frags in code sections we need to record whether they contain
24920 ARM code or THUMB code. This is that if they have to be aligned,
24921 they can contain the correct type of no-op instruction. */
24922 -#define TC_FRAG_TYPE int
24923 -#define TC_FRAG_INIT(fragp) arm_init_frag (fragp)
24924 +struct arm_frag_type
24928 + /* If there is a mapping symbol at offset 0 in this frag,
24929 + it will be saved in FIRST_MAP. If there are any mapping
24930 + symbols in this frag, the last one will be saved in
24932 + symbolS *first_map, *last_map;
24936 +#define TC_FRAG_TYPE struct arm_frag_type
24937 +/* NOTE: max_chars is a local variable from frag_var / frag_variant. */
24938 +#define TC_FRAG_INIT(fragp) arm_init_frag (fragp, max_chars)
24939 #define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
24941 #define md_do_align(N, FILL, LEN, MAX, LABEL) \
24942 @@ -269,7 +283,7 @@ extern char * arm_canonicalize_symbol_na
24943 extern void arm_adjust_symtab (void);
24944 extern void armelf_frob_symbol (symbolS *, int *);
24945 extern void cons_fix_new_arm (fragS *, int, int, expressionS *);
24946 -extern void arm_init_frag (struct frag *);
24947 +extern void arm_init_frag (struct frag *, int);
24948 extern void arm_handle_align (struct frag *);
24949 extern bfd_boolean arm_fix_adjustable (struct fix *);
24950 extern int arm_elf_section_type (const char *, size_t);
24951 --- a/gas/config/tc-m68k.c
24952 +++ b/gas/config/tc-m68k.c
24953 @@ -181,8 +181,8 @@ static const enum m68k_register mcf_ctrl
24954 RAMBAR0, RAMBAR1, RAMBAR, MBAR,
24957 -static const enum m68k_register mcf51qe_ctrl[] = {
24959 +static const enum m68k_register mcf51_ctrl[] = {
24963 static const enum m68k_register mcf5206_ctrl[] = {
24964 @@ -210,13 +210,21 @@ static const enum m68k_register mcf52223
24967 static const enum m68k_register mcf52235_ctrl[] = {
24968 - VBR, CACR, ACR0, ACR1, FLASHBAR, RAMBAR, RAMBAR1,
24969 + VBR, FLASHBAR, RAMBAR, RAMBAR1,
24972 static const enum m68k_register mcf5225_ctrl[] = {
24973 VBR, CACR, ACR0, ACR1, FLASHBAR, RAMBAR, MBAR, RAMBAR1,
24976 +static const enum m68k_register mcf52259_ctrl[] = {
24977 + VBR, FLASHBAR, RAMBAR, RAMBAR1,
24980 +static const enum m68k_register mcf52277_ctrl[] = {
24981 + VBR, CACR, ACR0, ACR1, RAMBAR, RAMBAR1,
24984 static const enum m68k_register mcf5235_ctrl[] = {
24985 VBR, CACR, ACR0, ACR1, RAMBAR, RAMBAR1,
24987 @@ -249,8 +257,12 @@ static const enum m68k_register mcf5282_
24988 VBR, CACR, ACR0, ACR1, FLASHBAR, RAMBAR, RAMBAR1,
24991 +static const enum m68k_register mcf53017_ctrl[] = {
24992 + VBR, CACR, ACR0, ACR1, RAMBAR, RAMBAR1,
24995 static const enum m68k_register mcf5307_ctrl[] = {
24996 - CACR, ACR0, ACR1, VBR, RAMBAR0, RAMBAR_ALT, MBAR,
24997 + VBR, CACR, ACR0, ACR1, RAMBAR0, RAMBAR_ALT, MBAR,
25000 static const enum m68k_register mcf5329_ctrl[] = {
25001 @@ -525,6 +537,9 @@ static const struct m68k_cpu m68k_archs[
25005 +/* For -mno-mac we want to turn off all types of mac. */
25006 +static const unsigned no_mac = mcfmac | mcfemac;
25008 /* Architecture extensions, here 'alias' -1 for m68k, +1 for cf and 0
25010 static const struct m68k_cpu m68k_extensions[] =
25011 @@ -537,7 +552,7 @@ static const struct m68k_cpu m68k_extens
25013 {mcfhwdiv, NULL, "div", 1},
25014 {mcfusp, NULL, "usp", 1},
25015 - {mcfmac, NULL, "mac", 1},
25016 + {mcfmac, (void *)&no_mac, "mac", 1},
25017 {mcfemac, NULL, "emac", 1},
25020 @@ -579,7 +594,12 @@ static const struct m68k_cpu m68k_cpus[]
25021 {cpu32|m68881, cpu32_ctrl, "68349", 1},
25022 {cpu32|m68881, cpu32_ctrl, "68360", 1},
25024 - {mcfisa_a|mcfisa_c|mcfusp, mcf51qe_ctrl, "51qe", 0},
25025 + {mcfisa_a|mcfisa_c|mcfusp, mcf51_ctrl, "51", 0},
25026 + {mcfisa_a|mcfisa_c|mcfusp, mcf51_ctrl, "51ac", 1},
25027 + {mcfisa_a|mcfisa_c|mcfusp, mcf51_ctrl, "51cn", 1},
25028 + {mcfisa_a|mcfisa_c|mcfusp|mcfmac, mcf51_ctrl, "51em", 1},
25029 + {mcfisa_a|mcfisa_c|mcfusp, mcf51_ctrl, "51jm", 1},
25030 + {mcfisa_a|mcfisa_c|mcfusp, mcf51_ctrl, "51qe", 1},
25032 {mcfisa_a, mcf_ctrl, "5200", 0},
25033 {mcfisa_a, mcf_ctrl, "5202", 1},
25034 @@ -613,6 +633,9 @@ static const struct m68k_cpu m68k_cpus[]
25035 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfmac|mcfusp, mcf5225_ctrl, "5224", -1},
25036 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfmac|mcfusp, mcf5225_ctrl, "5225", 0},
25038 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52277_ctrl, "52274", -1},
25039 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52277_ctrl, "52277", 0},
25041 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5232", -1},
25042 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5233", -1},
25043 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5235_ctrl, "5234", -1},
25044 @@ -622,7 +645,14 @@ static const struct m68k_cpu m68k_cpus[]
25045 {mcfisa_a|mcfhwdiv|mcfemac, mcf5249_ctrl, "5249", 0},
25046 {mcfisa_a|mcfhwdiv|mcfemac, mcf5250_ctrl, "5250", 0},
25047 {mcfisa_a|mcfhwdiv|mcfemac, mcf5253_ctrl, "5253", 0},
25050 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52252", -1},
25051 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52254", -1},
25052 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52255", -1},
25053 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52256", -1},
25054 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52258", -1},
25055 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf52259_ctrl, "52259", 0},
25057 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5271_ctrl, "5270", -1},
25058 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5271_ctrl, "5271", 0},
25060 @@ -636,6 +666,14 @@ static const struct m68k_cpu m68k_cpus[]
25061 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "5282", -1},
25062 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5282_ctrl, "528x", 0},
25064 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53011", -1},
25065 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53012", -1},
25066 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53013", -1},
25067 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53014", -1},
25068 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53015", -1},
25069 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53016", -1},
25070 + {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf53017_ctrl, "53017", 0},
25072 {mcfisa_a|mcfhwdiv|mcfmac, mcf5307_ctrl, "5307", 0},
25074 {mcfisa_a|mcfisa_aa|mcfhwdiv|mcfemac|mcfusp, mcf5329_ctrl, "5327", -1},
25075 @@ -3275,6 +3313,7 @@ m68k_ip (char *instring)
25083 @@ -4036,6 +4075,7 @@ static const struct init_entry init_tabl
25085 { "cacr", CACR }, /* Cache Control Register. */
25086 { "caar", CAAR }, /* Cache Address Register. */
25087 + { "cpucr", CPUCR }, /* CPU Control Register. */
25089 { "usp", USP }, /* User Stack Pointer. */
25090 { "vbr", VBR }, /* Vector Base Register. */
25091 @@ -7407,7 +7447,8 @@ m68k_set_extension (char const *name, in
25095 - not_current_architecture |= ext->arch;
25096 + not_current_architecture |= (ext->control_regs
25097 + ? *(unsigned *)ext->control_regs: ext->arch);
25099 current_architecture |= ext->arch;
25101 --- a/gas/config/tc-mips.c
25102 +++ b/gas/config/tc-mips.c
25103 @@ -73,6 +73,8 @@ static int mips_output_flavor (void) { r
25105 int mips_flag_mdebug = -1;
25107 +static int octeon_use_unalign = 0;
25109 /* Control generation of .pdr sections. Off by default on IRIX: the native
25110 linker doesn't know about and discards them, but relocations against them
25111 remain, leading to rld crashes. */
25112 @@ -391,6 +393,12 @@ static int mips_32bitmode = 0;
25113 ((ISA) == ISA_MIPS32R2 \
25114 || (ISA) == ISA_MIPS64R2)
25116 +/* Return true if ISA supports ins instructions. */
25117 +#define ISA_HAS_INS(ISA) ( \
25118 + (ISA) == ISA_MIPS32R2 \
25119 + || (ISA) == ISA_MIPS64R2 \
25122 #define HAVE_32BIT_GPRS \
25123 (mips_opts.gp32 || !ISA_HAS_64BIT_REGS (mips_opts.isa))
25125 @@ -653,18 +661,21 @@ static int mips_debug = 0;
25126 /* The maximum number of NOPs needed to avoid the VR4130 mflo/mfhi errata. */
25127 #define MAX_VR4130_NOPS 4
25129 +/* The number of MOVN.Ds needed to avoid the ICE9A errata. */
25130 +#define ICE9A_MOVNDS 5
25132 /* The maximum number of NOPs needed to fill delay slots. */
25133 #define MAX_DELAY_NOPS 2
25135 -/* The maximum number of NOPs needed for any purpose. */
25136 -#define MAX_NOPS 4
25137 +/* The maximum number of insns needed for any purpose. */
25138 +#define MAX_HIST_INSNS 5
25140 /* A list of previous instructions, with index 0 being the most recent.
25141 - We need to look back MAX_NOPS instructions when filling delay slots
25142 - or working around processor errata. We need to look back one
25143 + We need to look back MAX_HIST_INSNS instructions when filling delay
25144 + slots or working around processor errata. We need to look back one
25145 instruction further if we're thinking about using history[0] to
25146 fill a branch delay slot. */
25147 -static struct mips_cl_insn history[1 + MAX_NOPS];
25148 +static struct mips_cl_insn history[1 + MAX_HIST_INSNS];
25150 /* Nop instructions used by emit_nop. */
25151 static struct mips_cl_insn nop_insn, mips16_nop_insn;
25152 @@ -760,6 +771,12 @@ static int mips_fix_vr4120;
25153 /* ...likewise -mfix-vr4130. */
25154 static int mips_fix_vr4130;
25156 +/* ...likewise -mfix-ice9a. */
25157 +static int mips_fix_ice9a;
25159 +/* ...likewise -mfix-24k. */
25160 +static int mips_fix_24k;
25162 /* We don't relax branches by default, since this causes us to expand
25163 `la .l2 - .l1' if there's a branch between .l1 and .l2, because we
25164 fail to compute the offset before expanding the macro to the most
25165 @@ -1789,6 +1806,84 @@ reg_lookup (char **s, unsigned int types
25169 +#define INSN_ERET 0x42000018
25170 +#define INSN_DERET 0x4200001f
25172 +/* Implement the ERET/DERET Errata for MIPS 24k.
25174 + If an ERET/DERET is encountered in a noreorder block,
25175 + warn if the ERET/DERET is followed by a branch instruction.
25176 + Also warn if the ERET/DERET is the last instruction in the
25179 + IF an ERET/DERET is in a reorder block and is followed by a
25180 + branch instruction, insert a nop. */
25183 +check_for_24k_errata (struct mips_cl_insn *insn, int eret_ndx)
25185 + bfd_boolean next_insn_is_branch = FALSE;
25187 + /* eret_ndx will be -1 for the last instruction in a section. */
25189 + && eret_ndx == -1
25190 + && (insn->insn_opcode == INSN_ERET
25191 + || insn->insn_opcode == INSN_DERET)
25192 + && insn->noreorder_p)
25194 + as_warn (_("ERET and DERET must be followed by a NOP on the 24K."));
25198 + if (history[eret_ndx].insn_opcode != INSN_ERET
25199 + && history[eret_ndx].insn_opcode != INSN_DERET)
25204 + if (history[eret_ndx].noreorder_p)
25205 + as_warn (_("ERET and DERET must be followed by a NOP on the 24K."));
25209 + next_insn_is_branch = ((insn->insn_opcode == INSN_ERET)
25210 + || (insn->insn_opcode == INSN_DERET)
25211 + || (insn->insn_mo->pinfo
25212 + & (INSN_UNCOND_BRANCH_DELAY
25213 + | INSN_COND_BRANCH_DELAY
25214 + | INSN_COND_BRANCH_LIKELY)));
25216 + if (next_insn_is_branch && history[eret_ndx].noreorder_p)
25218 + as_warn (_("ERET and DERET must be followed by a NOP on the 24K."));
25222 + /* Emit nop if the next instruction is a branch. */
25223 + if (next_insn_is_branch)
25225 + long nop_where, br_where;
25226 + struct frag *nop_frag, *br_frag;
25227 + struct mips_cl_insn br_insn, nop_insn;
25231 + nop_insn = history[eret_ndx - 1];
25232 + nop_frag = history[eret_ndx - 1].frag;
25233 + nop_where = history[eret_ndx - 1].where;
25235 + br_insn = history[eret_ndx];
25236 + br_frag = history[eret_ndx].frag;
25237 + br_where = history[eret_ndx].where;
25239 + move_insn (&nop_insn, br_frag, br_where);
25240 + move_insn (&br_insn, nop_frag, nop_where);
25242 + history[eret_ndx-1] = br_insn;
25243 + history[eret_ndx] = nop_insn;
25247 /* Return TRUE if opcode MO is valid on the currently selected ISA and
25248 architecture. If EXPANSIONP is TRUE then this check is done while
25249 expanding a macro. Use is_opcode_valid_16 for MIPS16 opcodes. */
25250 @@ -1876,6 +1971,12 @@ md_begin (void)
25251 as_bad (_("-G may not be used in position-independent code"));
25252 g_switch_value = 0;
25254 + else if (mips_abicalls)
25256 + if (g_switch_seen && g_switch_value != 0)
25257 + as_bad (_("-G may not be used with abicalls"));
25258 + g_switch_value = 0;
25261 if (! bfd_set_arch_mach (stdoutput, bfd_arch_mips, file_mips_arch))
25262 as_warn (_("Could not set architecture and machine"));
25263 @@ -2074,6 +2175,9 @@ md_begin (void)
25267 + if (mips_fix_24k)
25268 + check_for_24k_errata ((struct mips_cl_insn *) &history[0], -1);
25270 if (! ECOFF_DEBUGGING)
25273 @@ -2616,8 +2720,111 @@ nops_for_vr4130 (const struct mips_cl_in
25277 +/* Return true if the instruction called NAME is a double-precision
25278 + multiplication instruction placing an FP stall hazard needed
25279 + to be tackled with -mfix-ice9a. */
25281 +static bfd_boolean
25282 +ice9a_fp_stall_hazard_p (const char *name)
25284 + return (strcmp (name, "madd.d") == 0
25285 + || strcmp (name, "msub.d") == 0
25286 + || strcmp (name, "mul.d") == 0
25287 + || strcmp (name, "nmadd.d") == 0
25288 + || strcmp (name, "nmsub.d") == 0
25289 + || strcmp (name, "recip.d") == 0
25290 + || strcmp (name, "rsqrt.d") == 0);
25293 +/* Return true if the instruction called NAME is a double-precision
25294 + multiplication instruction placing an FP round hazard needed
25295 + to be tackled with -mfix-ice9a. This happens to be a superset
25298 +static bfd_boolean
25299 +ice9a_fp_round_hazard_p (const char *name)
25301 + return (ice9a_fp_stall_hazard_p (name) || strcmp (name, "sqrt.d") == 0);
25304 +/* Return true if the instruction INSN is the "movn.d $f30, <reg>, $zero"
25305 + designated as the workaround for the purpose of -mfix-ice9a. */
25307 +static bfd_boolean
25308 +ice9a_movnd_workaround_p (const struct mips_cl_insn *insn, unsigned int reg)
25310 + return (strcmp (insn->insn_mo->name, "movn.d") == 0
25311 + && EXTRACT_OPERAND (RT, *insn) == ZERO
25312 + && EXTRACT_OPERAND (FS, *insn) == reg
25313 + && EXTRACT_OPERAND (FD, *insn) == 30);
25316 +/* Return true if the instruction INSN accesses $f30 in any way. */
25318 +static bfd_boolean
25319 +ice9a_insn_accesses_f30_p (const struct mips_cl_insn *insn)
25321 + unsigned long pinfo;
25323 + pinfo = insn->insn_mo->pinfo;
25324 + return (((pinfo & (INSN_WRITE_FPR_S | INSN_READ_FPR_S)) != 0
25325 + && (EXTRACT_OPERAND (FS, *insn) == 30))
25326 + || ((pinfo & (INSN_WRITE_FPR_T | INSN_READ_FPR_T)) != 0
25327 + && (EXTRACT_OPERAND (FT, *insn) == 30))
25328 + || ((pinfo & INSN_WRITE_FPR_D) != 0
25329 + && (EXTRACT_OPERAND (FD, *insn) == 30))
25330 + || ((pinfo & INSN_READ_FPR_R) != 0
25331 + && (EXTRACT_OPERAND (FR, *insn) == 30)));
25334 +/* Check for the ICE9A_MOVNDS MOVN.D instructions needed before and after
25335 + some FP instructions to work around the ICE9A errata. Also check for
25336 + $f30 references other than the workaround. */
25339 +check_for_ice9a (const struct mips_cl_insn *history,
25340 + const struct mips_cl_insn *insn)
25342 + bfd_boolean f30_access_ok = FALSE;
25345 + if (ice9a_fp_round_hazard_p (history->insn_mo->name))
25348 + || (history->insn_mo->pinfo & INSN_WRITE_FPR_D) == 0
25349 + || ! ice9a_movnd_workaround_p (insn, EXTRACT_OPERAND (FD, *history)))
25350 + as_bad (_("Hazardous instruction missing the ICE9A workaround"));
25352 + f30_access_ok = TRUE;
25355 + if (insn == NULL)
25358 + if (ice9a_fp_stall_hazard_p (insn->insn_mo->name))
25359 + for (i = 0; i < ICE9A_MOVNDS; i++)
25360 + if (! ice9a_movnd_workaround_p (history + i, 28))
25362 + as_bad (_("Hazardous instruction missing the ICE9A workaround"));
25366 + if (! f30_access_ok
25367 + && ! ice9a_movnd_workaround_p (insn, 28)
25368 + && ice9a_insn_accesses_f30_p (insn))
25369 + as_bad (_("Instruction used $f30, reserved for the ICE9A workaround"));
25372 +/* Check the last instruction assembled for the ICE9A errata workaround. */
25374 +void mips_cleanup (void)
25376 + if (mips_fix_ice9a)
25377 + check_for_ice9a (history, NULL);
25380 /* Return the number of nops that would be needed if instruction INSN
25381 - immediately followed the MAX_NOPS instructions given by HISTORY,
25382 + immediately followed the MAX_HIST_INSNS instructions given by HISTORY,
25383 where HISTORY[0] is the most recent instruction. If INSN is null,
25384 return the worse-case number of nops for any instruction. */
25386 @@ -2643,6 +2850,9 @@ nops_for_insn (const struct mips_cl_insn
25390 + if (mips_fix_ice9a)
25391 + check_for_ice9a (history, insn);
25396 @@ -2654,13 +2864,13 @@ static int
25397 nops_for_sequence (int num_insns, const struct mips_cl_insn *history, ...)
25400 - struct mips_cl_insn buffer[MAX_NOPS];
25401 + struct mips_cl_insn buffer[MAX_HIST_INSNS];
25402 struct mips_cl_insn *cursor;
25405 va_start (args, history);
25406 cursor = buffer + num_insns;
25407 - memcpy (cursor, history, (MAX_NOPS - num_insns) * sizeof (*cursor));
25408 + memcpy (cursor, history, (MAX_HIST_INSNS - num_insns) * sizeof (*cursor));
25409 while (cursor > buffer)
25410 *--cursor = *va_arg (args, const struct mips_cl_insn *);
25412 @@ -2705,6 +2915,7 @@ append_insn (struct mips_cl_insn *ip, ex
25413 bfd_reloc_code_real_type *reloc_type)
25415 unsigned long prev_pinfo, pinfo;
25416 + int hndx_24k = 0;
25417 relax_stateT prev_insn_frag_type = 0;
25418 bfd_boolean relaxed_branch = FALSE;
25419 segment_info_type *si = seg_info (now_seg);
25420 @@ -3238,7 +3449,15 @@ append_insn (struct mips_cl_insn *ip, ex
25421 || (mips_opts.mips16 && history[0].fixp[0])
25422 /* If the previous instruction is a sync, sync.l, or
25423 sync.p, we can not swap. */
25424 - || (prev_pinfo & INSN_SYNC))
25425 + || (prev_pinfo & INSN_SYNC)
25426 + /* If we're assembling for the 24k errata and the previous
25427 + instruction is an ERET or DERET, avoid the swap. */
25428 + || (history[0].insn_opcode == INSN_ERET)
25429 + || (history[0].insn_opcode == INSN_DERET)
25430 + /* FIXME: Disable MIPS16 branch swapping for now as it
25431 + breaks DWARF-2 line information irrecoverably.
25433 + || mips_opts.mips16)
25435 if (mips_opts.mips16
25436 && (pinfo & INSN_UNCOND_BRANCH_DELAY)
25437 @@ -3258,6 +3477,8 @@ append_insn (struct mips_cl_insn *ip, ex
25438 slot, and bump the destination address. */
25439 insert_into_history (0, 1, ip);
25441 + if (mips_fix_24k)
25445 if (mips_relax.sequence)
25446 @@ -3297,7 +3518,14 @@ append_insn (struct mips_cl_insn *ip, ex
25447 /* If that was an unconditional branch, forget the previous
25448 insn information. */
25449 if (pinfo & INSN_UNCOND_BRANCH_DELAY)
25450 - mips_no_prev_insn ();
25452 + /* Check for eret/deret before clearing history. */
25453 + if (mips_fix_24k)
25454 + check_for_24k_errata (
25455 + (struct mips_cl_insn *) &history[hndx_24k],
25457 + mips_no_prev_insn ();
25460 else if (pinfo & INSN_COND_BRANCH_LIKELY)
25462 @@ -3307,6 +3535,8 @@ append_insn (struct mips_cl_insn *ip, ex
25463 the next instruction. */
25464 insert_into_history (0, 1, ip);
25466 + if (mips_fix_24k)
25470 insert_into_history (0, 1, ip);
25471 @@ -3314,6 +3544,10 @@ append_insn (struct mips_cl_insn *ip, ex
25473 insert_into_history (0, 1, ip);
25475 + if (mips_fix_24k)
25476 + check_for_24k_errata ((struct mips_cl_insn *) &history[hndx_24k],
25479 /* We just output an insn, so the next one doesn't have a label. */
25480 mips_clear_insn_labels ();
25482 @@ -3400,6 +3634,9 @@ start_noreorder (void)
25484 end_noreorder (void)
25486 + if (mips_fix_24k)
25487 + check_for_24k_errata (NULL, 0);
25489 mips_opts.noreorder--;
25490 if (mips_opts.noreorder == 0 && prev_nop_frag != NULL)
25492 @@ -7273,6 +7510,47 @@ macro (struct mips_cl_insn *ip)
25493 macro_build (&offset_expr, s, "t,o(b)", treg + 1, BFD_RELOC_LO16, breg);
25504 + /* The "saa/saad" instructions are new in CN58XX. These instructions
25505 + do not specify offset. When invoked with address or symbol, then
25506 + load the address or value of symbol in a register using the dla macro
25507 + into AT, and pass the register for emitting "saa/saad" instruction.
25508 + This will get expanded to
25510 + dla AT, constant/label
25511 + saa/saad $treg,(AT) */
25513 + char *name = "dla";
25514 + char *fmt = "t,A(b)";
25515 + const struct mips_opcode *mo;
25516 + struct mips_cl_insn insn;
25518 + mo = hash_find (op_hash, name);
25519 + assert (strcmp (name, mo->name) == 0);
25520 + assert (strcmp (fmt, mo->args) == 0);
25521 + create_insn (&insn, mo);
25523 + insn.insn_opcode = insn.insn_mo->match;
25526 + INSERT_OPERAND (RT, insn, AT);
25528 + INSERT_OPERAND (RS, insn, breg);
25530 + /* The address part is forwarded through the global offset_expr. */
25533 + macro_build (NULL, s, "t,(b)", treg, AT);
25537 /* New code added to support COPZ instructions.
25538 This code builds table entries out of the macros in mip_opcodes.
25539 R4000 uses interlocks to handle coproc delays.
25540 @@ -7980,8 +8258,13 @@ macro2 (struct mips_cl_insn *ip)
25542 ++offset_expr.X_add_number;
25543 macro_build (&offset_expr, "lbu", "t,o(b)", treg, BFD_RELOC_LO16, breg);
25544 - macro_build (NULL, "sll", "d,w,<", AT, AT, 8);
25545 - macro_build (NULL, "or", "d,v,t", treg, treg, AT);
25546 + if (ISA_HAS_INS (mips_opts.isa))
25547 + macro_build (NULL, "ins", "t,r,+A,+B", treg, AT, 8, 31);
25550 + macro_build (NULL, "sll", "d,w,<", AT, AT, 8);
25551 + macro_build (NULL, "or", "d,v,t", treg, treg, AT);
25556 @@ -8021,11 +8304,21 @@ macro2 (struct mips_cl_insn *ip)
25560 + if (mips_opts.arch == CPU_OCTEON && octeon_use_unalign)
25570 + if (mips_opts.arch == CPU_OCTEON && octeon_use_unalign)
25578 @@ -8052,17 +8345,25 @@ macro2 (struct mips_cl_insn *ip)
25579 load_address (AT, &offset_expr, &used_at);
25581 macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", AT, AT, breg);
25582 - if (target_big_endian)
25583 - expr1.X_add_number = 0;
25584 - macro_build (&expr1, mask == M_ULH_A ? "lb" : "lbu", "t,o(b)",
25585 - treg, BFD_RELOC_LO16, AT);
25586 - if (target_big_endian)
25587 - expr1.X_add_number = 1;
25588 + if (ISA_HAS_INS (mips_opts.isa))
25590 + expr1.X_add_number = target_big_endian ? 1 : 0;
25591 + macro_build (&expr1, "lbu", "t,o(b)", treg, BFD_RELOC_LO16, AT);
25592 + expr1.X_add_number = target_big_endian ? 0 : 1;
25593 + macro_build (&expr1, mask == M_ULH_A ? "lb" : "lbu", "t,o(b)",
25594 + AT, BFD_RELOC_LO16, AT);
25595 + macro_build (NULL, "ins", "t,r,+A,+B", treg, AT, 8, 31);
25598 - expr1.X_add_number = 0;
25599 - macro_build (&expr1, "lbu", "t,o(b)", AT, BFD_RELOC_LO16, AT);
25600 - macro_build (NULL, "sll", "d,w,<", treg, treg, 8);
25601 - macro_build (NULL, "or", "d,v,t", treg, treg, AT);
25603 + expr1.X_add_number = target_big_endian ? 0 : 1;
25604 + macro_build (&expr1, mask == M_ULH_A ? "lb" : "lbu", "t,o(b)",
25605 + treg, BFD_RELOC_LO16, AT);
25606 + expr1.X_add_number = target_big_endian ? 1 : 0;
25607 + macro_build (&expr1, "lbu", "t,o(b)", AT, BFD_RELOC_LO16, AT);
25608 + macro_build (NULL, "sll", "d,w,<", treg, treg, 8);
25609 + macro_build (NULL, "or", "d,v,t", treg, treg, AT);
25614 @@ -8103,11 +8404,21 @@ macro2 (struct mips_cl_insn *ip)
25618 + if (mips_opts.arch == CPU_OCTEON && octeon_use_unalign)
25628 + if (mips_opts.arch == CPU_OCTEON && octeon_use_unalign)
25636 @@ -8674,6 +8985,36 @@ mips_ip (char *str, struct mips_cl_insn
25637 assert (strcmp (insn->name, str) == 0);
25639 ok = is_opcode_valid (insn, FALSE);
25641 + if (insn->pinfo != INSN_MACRO)
25643 + if (mips_opts.arch == CPU_OCTEON
25644 + && !octeon_use_unalign
25645 + && (strcmp (insn->name, "ulw") == 0
25646 + || strcmp (insn->name, "uld") == 0
25647 + || strcmp (insn->name, "usw") == 0
25648 + || strcmp (insn->name, "usd") == 0))
25651 + if (mips_opts.arch == CPU_OCTEON
25652 + && octeon_use_unalign
25653 + && (strcmp (insn->name, "lwl") == 0
25654 + || strcmp (insn->name, "lwr") == 0
25655 + || strcmp (insn->name, "ldl") == 0
25656 + || strcmp (insn->name, "ldr") == 0
25657 + || strcmp (insn->name, "sdl") == 0
25658 + || strcmp (insn->name, "sdr") == 0
25659 + || strcmp (insn->name, "swr") == 0
25660 + || strcmp (insn->name, "swl") == 0))
25662 + static char buf[100];
25663 + sprintf (buf, _("Unaligned load/store instructions are not "
25664 + "allowed with -mocteon-useun"));
25665 + insn_error = buf;
25672 if (insn + 1 < &mips_opcodes[NUMOPCODES]
25673 @@ -11165,6 +11506,8 @@ enum options
25674 OPTION_NO_SMARTMIPS,
25678 + OPTION_NO_MIPS16E,
25679 OPTION_COMPAT_ARCH_BASE,
25682 @@ -11175,11 +11518,15 @@ enum options
25685 OPTION_M7000_HILO_FIX,
25686 - OPTION_MNO_7000_HILO_FIX,
25687 + OPTION_MNO_7000_HILO_FIX,
25689 + OPTION_NO_FIX_24K,
25691 OPTION_NO_FIX_VR4120,
25693 OPTION_NO_FIX_VR4130,
25694 + OPTION_FIX_ICE9A,
25695 + OPTION_NO_FIX_ICE9A,
25699 @@ -11200,6 +11547,8 @@ enum options
25701 OPTION_SINGLE_FLOAT,
25702 OPTION_DOUBLE_FLOAT,
25703 + OPTION_OCTEON_UNALIGNED,
25704 + OPTION_NO_OCTEON_UNALIGNED,
25707 OPTION_CALL_SHARED,
25708 @@ -11214,6 +11563,7 @@ enum options
25711 OPTION_MVXWORKS_PIC,
25712 + OPTION_NON_PIC_ABICALLS,
25713 #endif /* OBJ_ELF */
25716 @@ -11249,6 +11599,9 @@ struct option md_longopts[] =
25717 {"mno-smartmips", no_argument, NULL, OPTION_NO_SMARTMIPS},
25718 {"mdspr2", no_argument, NULL, OPTION_DSPR2},
25719 {"mno-dspr2", no_argument, NULL, OPTION_NO_DSPR2},
25720 + /* SDE backward compatibility alias. */
25721 + {"mips16e", no_argument, NULL, OPTION_MIPS16},
25722 + {"no-mips16e", no_argument, NULL, OPTION_NO_MIPS16},
25724 /* Old-style architecture options. Don't add more of these. */
25725 {"m4650", no_argument, NULL, OPTION_M4650},
25726 @@ -11268,6 +11621,10 @@ struct option md_longopts[] =
25727 {"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120},
25728 {"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130},
25729 {"mno-fix-vr4130", no_argument, NULL, OPTION_NO_FIX_VR4130},
25730 + {"mfix-ice9a", no_argument, NULL, OPTION_FIX_ICE9A},
25731 + {"mno-fix-ice9a", no_argument, NULL, OPTION_NO_FIX_ICE9A},
25732 + {"mfix-24k", no_argument, NULL, OPTION_FIX_24K},
25733 + {"mno-fix-24k", no_argument, NULL, OPTION_NO_FIX_24K},
25735 /* Miscellaneous options. */
25736 {"trap", no_argument, NULL, OPTION_TRAP},
25737 @@ -11292,6 +11649,8 @@ struct option md_longopts[] =
25738 {"mhard-float", no_argument, NULL, OPTION_HARD_FLOAT},
25739 {"msingle-float", no_argument, NULL, OPTION_SINGLE_FLOAT},
25740 {"mdouble-float", no_argument, NULL, OPTION_DOUBLE_FLOAT},
25741 + {"mocteon-useun", no_argument, NULL, OPTION_OCTEON_UNALIGNED},
25742 + {"mno-octeon-useun", no_argument, NULL, OPTION_NO_OCTEON_UNALIGNED},
25744 /* Strictly speaking this next option is ELF specific,
25745 but we allow it for other ports as well in order to
25746 @@ -11313,6 +11672,7 @@ struct option md_longopts[] =
25747 {"mpdr", no_argument, NULL, OPTION_PDR},
25748 {"mno-pdr", no_argument, NULL, OPTION_NO_PDR},
25749 {"mvxworks-pic", no_argument, NULL, OPTION_MVXWORKS_PIC},
25750 + {"mnon-pic-abicalls", no_argument, NULL, OPTION_NON_PIC_ABICALLS},
25751 #endif /* OBJ_ELF */
25753 {NULL, no_argument, NULL, 0}
25754 @@ -11521,6 +11881,14 @@ md_parse_option (int c, char *arg)
25755 mips_opts.ase_smartmips = 0;
25758 + case OPTION_FIX_24K:
25759 + mips_fix_24k = 1;
25762 + case OPTION_NO_FIX_24K:
25763 + mips_fix_24k = 0;
25766 case OPTION_FIX_VR4120:
25767 mips_fix_vr4120 = 1;
25769 @@ -11537,6 +11905,14 @@ md_parse_option (int c, char *arg)
25770 mips_fix_vr4130 = 0;
25773 + case OPTION_FIX_ICE9A:
25774 + mips_fix_ice9a = 1;
25777 + case OPTION_NO_FIX_ICE9A:
25778 + mips_fix_ice9a = 0;
25781 case OPTION_RELAX_BRANCH:
25782 mips_relax_branch = 1;
25784 @@ -11561,6 +11937,14 @@ md_parse_option (int c, char *arg)
25785 mips_opts.sym32 = FALSE;
25788 + case OPTION_OCTEON_UNALIGNED:
25789 + octeon_use_unalign = 1;
25792 + case OPTION_NO_OCTEON_UNALIGNED:
25793 + octeon_use_unalign = 0;
25797 /* When generating ELF code, we permit -KPIC and -call_shared to
25798 select SVR4_PIC, and -non_shared to select no PIC. This is
25799 @@ -11729,6 +12113,11 @@ md_parse_option (int c, char *arg)
25800 case OPTION_MVXWORKS_PIC:
25801 mips_pic = VXWORKS_PIC;
25804 + case OPTION_NON_PIC_ABICALLS:
25805 + mips_pic = NO_PIC;
25806 + mips_abicalls = TRUE;
25808 #endif /* OBJ_ELF */
25811 @@ -12468,6 +12857,10 @@ s_change_sec (int sec)
25814 mips_emit_delays ();
25816 + if (mips_fix_24k)
25817 + check_for_24k_errata ((struct mips_cl_insn *) &history[0], -1);
25822 @@ -12526,6 +12919,9 @@ s_change_section (int ignore ATTRIBUTE_U
25826 + if (mips_fix_24k)
25827 + check_for_24k_errata ((struct mips_cl_insn *) &history[0], -1);
25829 section_name = input_line_pointer;
25830 c = get_symbol_end ();
25832 @@ -15234,7 +15630,10 @@ static const struct mips_cpu_info mips_c
25833 { "octeon", 0, ISA_MIPS64R2, CPU_OCTEON },
25836 - { "xlr", 0, ISA_MIPS64, CPU_XLR },
25837 + { "xlr", 0, ISA_MIPS64, CPU_XLR },
25839 + /* SiCortex ice9 */
25840 + { "ice9", 0, ISA_MIPS64, CPU_MIPS64 },
25844 @@ -15457,13 +15856,17 @@ MIPS options:\n\
25845 fprintf (stream, _("\
25846 -mfix-vr4120 work around certain VR4120 errata\n\
25847 -mfix-vr4130 work around VR4130 mflo/mfhi errata\n\
25848 +-mfix-ice9a detect the lack of the ICE9A double float multiplication errata workaround\n\
25849 +-mfix-24k insert a nop after ERET and DERET instructions\n\
25850 -mgp32 use 32-bit GPRs, regardless of the chosen ISA\n\
25851 -mfp32 use 32-bit FPRs, regardless of the chosen ISA\n\
25852 -msym32 assume all symbols have 32-bit values\n\
25853 -O0 remove unneeded NOPs, do not swap branches\n\
25854 -O remove unneeded NOPs and swap branches\n\
25855 --trap, --no-break trap exception on div by 0 and mult overflow\n\
25856 ---break, --no-trap break exception on div by 0 and mult overflow\n"));
25857 +--break, --no-trap break exception on div by 0 and mult overflow\n\
25858 +-mocteon-useun use Octeon-specific unaligned loads/stores for 32/64-bit data (default)\n\
25859 +-mno-octeon-useun do not use Octeon-specific unaligned loads/stores for 32/64-bit data\n"));
25860 fprintf (stream, _("\
25861 -mhard-float allow floating-point instructions\n\
25862 -msoft-float do not allow floating-point instructions\n\
25863 --- a/gas/config/tc-mips.h
25864 +++ b/gas/config/tc-mips.h
25865 @@ -53,6 +53,9 @@ extern int mips_relax_frag (asection *,
25866 #define md_undefined_symbol(name) (0)
25867 #define md_operand(x)
25869 +extern void mips_cleanup (void);
25870 +#define md_cleanup() mips_cleanup ()
25872 extern char mips_nop_opcode (void);
25873 #define NOP_OPCODE (mips_nop_opcode ())
25875 --- a/gas/config/tc-ppc.c
25876 +++ b/gas/config/tc-ppc.c
25877 @@ -905,6 +905,10 @@ parse_cpu (const char *arg)
25879 /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
25881 + else if (strcmp (arg, "pmr") == 0)
25883 + ppc_cpu |= PPC_OPCODE_PMR;
25885 else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
25887 ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC | PPC_OPCODE_64;
25888 --- a/gas/config/te-armeabi.h
25889 +++ b/gas/config/te-armeabi.h
25891 02110-1301, USA. */
25893 /* The EABI requires the use of VFP. */
25894 -#define FPU_DEFAULT FPU_ARCH_VFP_V2
25895 +#define FPU_DEFAULT FPU_ARCH_VFP
25896 #define EABI_DEFAULT EF_ARM_EABI_VER5
25898 #define LOCAL_LABELS_DOLLAR 1
25899 --- a/gas/config/te-armlinuxeabi.h
25900 +++ b/gas/config/te-armlinuxeabi.h
25902 #include "te-linux.h"
25904 /* The EABI requires the use of VFP. */
25905 -#define FPU_DEFAULT FPU_ARCH_VFP_V2
25906 +#define FPU_DEFAULT FPU_ARCH_VFP
25907 #define EABI_DEFAULT EF_ARM_EABI_VER5
25908 --- a/gas/configure
25909 +++ b/gas/configure
25910 @@ -12167,6 +12167,9 @@ echo "$as_me: error: $target_cpu isn't a
25912 # Decide which ABI to target by default.
25914 + mips64el-sicortex-linux-gnu)
25915 + mips_default_abi=N64_ABI
25917 mips64*-linux* | mips-sgi-irix6*)
25918 mips_default_abi=N32_ABI
25920 --- a/gas/configure.in
25921 +++ b/gas/configure.in
25922 @@ -245,6 +245,9 @@ changequote([,])dnl
25924 # Decide which ABI to target by default.
25926 + mips64el-sicortex-linux-gnu)
25927 + mips_default_abi=N64_ABI
25929 mips64*-linux* | mips-sgi-irix6*)
25930 mips_default_abi=N32_ABI
25932 --- a/gas/configure.tgt
25933 +++ b/gas/configure.tgt
25934 @@ -287,6 +287,8 @@ case ${generic_target} in
25935 mips-*-riscos*) fmt=ecoff ;;
25936 mips*-*-linux*) fmt=elf em=tmips ;;
25937 mips-*-sysv4*MP* | mips-*-gnu*) fmt=elf em=tmips ;;
25938 + mips-wrs-elf*) fmt=elf em=tmips ;;
25939 + mips-montavista-elf*) fmt=elf em=tmips ;;
25940 mips*-sde-elf*) fmt=elf em=tmips ;;
25941 mips-*-sysv*) fmt=ecoff ;;
25942 mips-*-elf* | mips-*-rtems*) fmt=elf ;;
25943 --- a/gas/doc/as.texinfo
25944 +++ b/gas/doc/as.texinfo
25945 @@ -375,6 +375,7 @@ gcc(1), ld(1), and the Info entries for
25946 [@b{-construct-floats}] [@b{-no-construct-floats}]
25947 [@b{-trap}] [@b{-no-break}] [@b{-break}] [@b{-no-trap}]
25948 [@b{-mfix7000}] [@b{-mno-fix7000}]
25949 + [@b{-mfix-ice9a}] [@b{-mno-fix-ice9a}]
25950 [@b{-mips16}] [@b{-no-mips16}]
25951 [@b{-msmartmips}] [@b{-mno-smartmips}]
25952 [@b{-mips3d}] [@b{-no-mips3d}]
25953 --- a/gas/doc/c-arm.texi
25954 +++ b/gas/doc/c-arm.texi
25955 @@ -116,6 +116,8 @@ recognized:
25961 @code{ep9312} (ARM920 with Cirrus Maverick coprocessor),
25962 @code{i80200} (Intel XScale processor)
25963 @code{iwmmxt} (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor)
25964 @@ -194,6 +196,7 @@ The following format options are recogni
25972 @@ -225,6 +228,12 @@ instructions; that is, it should behave
25973 This option specifies that the output generated by the assembler should
25974 be marked as supporting interworking.
25976 +@cindex @code{-mauto-it} command line option, ARM
25978 +This option enables the automatic generation of IT instructions for Thumb-2
25979 +conditional instructions. Explicit IT instructons are still accepted and
25980 +checked. This option has no effect on ARM mode code.
25982 @cindex @code{-mapcs} command line option, ARM
25983 @item -mapcs @code{[26|32]}
25984 This option specifies that the output generated by the assembler should
25985 --- a/gas/doc/c-mips.texi
25986 +++ b/gas/doc/c-mips.texi
25987 @@ -182,6 +182,16 @@ all problems in hand-written assembler c
25988 @itemx -no-mfix-vr4130
25989 Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata.
25992 +@itemx -mno-fix-ice9a
25993 +Detect missing @code{movn.d $f30, <reg>, $zero} instructions required for
25994 +the ICE9A double floating-point multiplication errata and invalid @code{$f30}
25995 +references conflicting with same. Raise an error if so.
25998 +@itemx -no-mfix-24k
25999 +Insert nops to work around the 24K @samp{eret}/@samp{deret} errata.
26003 Generate code for the LSI @sc{r4010} chip. This tells the assembler to
26006 @@ -1920,6 +1920,10 @@ s_fill (int ignore ATTRIBUTE_UNUSED)
26007 md_flush_pending_output ();
26010 +#ifdef md_cons_align
26011 + md_cons_align (1);
26014 get_known_segmented_expression (&rep_exp);
26015 if (*input_line_pointer == ',')
26017 @@ -3119,6 +3123,10 @@ s_space (int mult)
26018 md_flush_pending_output ();
26021 +#ifdef md_cons_align
26022 + md_cons_align (1);
26026 stop = mri_comment_field (&stopc);
26028 @@ -3290,6 +3298,10 @@ s_float_space (int float_type)
26032 +#ifdef md_cons_align
26033 + md_cons_align (1);
26037 stop = mri_comment_field (&stopc);
26039 @@ -3792,7 +3804,15 @@ cons_worker (register int nbytes, /* 1=.
26040 parse_mri_cons (&exp, (unsigned int) nbytes);
26043 - TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
26045 + if (*input_line_pointer == '"')
26047 + as_bad (_("unexpected \" in expression"));
26048 + ignore_rest_of_line ();
26051 + TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
26056 @@ -4631,6 +4651,10 @@ float_cons (/* Clobbers input_line-point
26057 md_flush_pending_output ();
26060 +#ifdef md_cons_align
26061 + md_cons_align (1);
26066 /* input_line_pointer->1st char of a flonum (we hope!). */
26067 @@ -5075,6 +5099,10 @@ stringer (int bits_appendzero)
26068 md_flush_pending_output ();
26071 +#ifdef md_cons_align
26072 + md_cons_align (1);
26075 /* The following awkward logic is to parse ZERO or more strings,
26076 comma separated. Recall a string expression includes spaces
26077 before the opening '\"' and spaces after the closing '\"'.
26078 @@ -5453,6 +5481,10 @@ s_incbin (int x ATTRIBUTE_UNUSED)
26079 md_flush_pending_output ();
26082 +#ifdef md_cons_align
26083 + md_cons_align (1);
26086 SKIP_WHITESPACE ();
26087 filename = demand_copy_string (& len);
26088 if (filename == NULL)
26089 --- a/gprof/cg_print.c
26090 +++ b/gprof/cg_print.c
26091 @@ -58,6 +58,10 @@ extern void fsf_callg_blurb (FILE * fp);
26093 double print_time = 0.0;
26095 +static double child_max;
26096 +static int self_wid;
26097 +static int child_wid;
26102 @@ -79,8 +83,8 @@ print_header ()
26103 (long) hist_scale * (long) sizeof (UNIT));
26105 if (print_time > 0.0)
26106 - printf (_(" for %.2f%% of %.2f seconds\n\n"),
26107 - 100.0 / print_time, print_time / hz);
26108 + printf (_(" for %.2f%% of %.2f %s\n\n"),
26109 + 100.0 / print_time, print_time / hz, hist_dimension);
26112 printf (_(" no time propagated\n\n"));
26113 @@ -100,10 +104,10 @@ print_header ()
26114 "", "", "", "", _("called"), _("total"), _("children"));
26117 + else if (child_max / hz >= 100000.0)
26118 + printf (_("index %% time self children called name\n"));
26121 - printf (_("index %% time self children called name\n"));
26123 + printf (_("index %% time self children called name\n"));
26126 /* Print a cycle header. */
26127 @@ -114,12 +118,11 @@ print_cycle (Sym *cyc)
26130 sprintf (buf, "[%d]", cyc->cg.index);
26131 - printf (bsd_style_output
26132 - ? "%-6.6s %5.1f %7.2f %11.2f %7lu"
26133 - : "%-6.6s %5.1f %7.2f %7.2f %7lu", buf,
26134 + printf ("%-6.6s %5.1f %*.*f %*.*f %7lu", buf,
26135 100 * (cyc->cg.prop.self + cyc->cg.prop.child) / print_time,
26136 - cyc->cg.prop.self / hz, cyc->cg.prop.child / hz, cyc->ncalls);
26138 + self_wid, prec, cyc->cg.prop.self / hz,
26139 + child_wid, prec, cyc->cg.prop.child / hz,
26141 if (cyc->cg.self_calls != 0)
26142 printf ("+%-7lu", cyc->cg.self_calls);
26144 @@ -192,10 +195,10 @@ print_members (Sym *cyc)
26146 for (member = cyc->cg.cyc.next; member; member = member->cg.cyc.next)
26148 - printf (bsd_style_output
26149 - ? "%6.6s %5.5s %7.2f %11.2f %7lu"
26150 - : "%6.6s %5.5s %7.2f %7.2f %7lu",
26151 - "", "", member->cg.prop.self / hz, member->cg.prop.child / hz,
26152 + printf ("%6.6s %5.5s %*.*f %*.*f %7lu",
26154 + self_wid, prec, member->cg.prop.self / hz,
26155 + child_wid, prec, member->cg.prop.child / hz,
26158 if (member->cg.self_calls != 0)
26159 @@ -350,10 +353,11 @@ print_parents (Sym *child)
26161 if (!child->cg.parents)
26163 - printf (bsd_style_output
26164 - ? _("%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <spontaneous>\n")
26165 - : _("%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontaneous>\n"),
26166 - "", "", "", "", "", "");
26167 + printf (_("%6.6s %5.5s %*.*s %*.*s %7.7s %7.7s <spontaneous>\n"),
26169 + self_wid, self_wid, "",
26170 + child_wid, child_wid, "",
26175 @@ -365,23 +369,22 @@ print_parents (Sym *child)
26176 if (child == parent || (child->cg.cyc.num != 0
26177 && parent->cg.cyc.num == child->cg.cyc.num))
26179 - /* Selfcall or call among siblings. */
26180 - printf (bsd_style_output
26181 - ? "%6.6s %5.5s %7.7s %11.11s %7lu %7.7s "
26182 - : "%6.6s %5.5s %7.7s %7.7s %7lu %7.7s ",
26184 + /* Selfcall or call among siblings. */
26185 + printf ("%6.6s %5.5s %*.*s %*.*s %7lu %7.7s ",
26187 + self_wid, self_wid, "",
26188 + child_wid, child_wid, "",
26190 print_name (parent);
26195 - /* Regular parent of child. */
26196 - printf (bsd_style_output
26197 - ? "%6.6s %5.5s %7.2f %11.2f %7lu/%-7lu "
26198 - : "%6.6s %5.5s %7.2f %7.2f %7lu/%-7lu ",
26199 + /* Regular parent of child. */
26200 + printf ("%6.6s %5.5s %*.*f %*.*f %7lu/%-7lu ",
26202 - arc->time / hz, arc->child_time / hz,
26203 + self_wid, prec, arc->time / hz,
26204 + child_wid, prec, arc->child_time / hz,
26205 arc->count, cycle_head->ncalls);
26206 print_name (parent);
26208 @@ -438,22 +441,22 @@ print_children (Sym *parent)
26209 if (child == parent || (child->cg.cyc.num != 0
26210 && child->cg.cyc.num == parent->cg.cyc.num))
26212 - /* Self call or call to sibling. */
26213 - printf (bsd_style_output
26214 - ? "%6.6s %5.5s %7.7s %11.11s %7lu %7.7s "
26215 - : "%6.6s %5.5s %7.7s %7.7s %7lu %7.7s ",
26216 - "", "", "", "", arc->count, "");
26217 + /* Self call or call to sibling. */
26218 + printf ("%6.6s %5.5s %*.*s %*.*s %7lu %7.7s ",
26220 + self_wid, self_wid, "",
26221 + child_wid, child_wid, "",
26223 print_name (child);
26228 - /* Regular child of parent. */
26229 - printf (bsd_style_output
26230 - ? "%6.6s %5.5s %7.2f %11.2f %7lu/%-7lu "
26231 - : "%6.6s %5.5s %7.2f %7.2f %7lu/%-7lu ",
26232 + /* Regular child of parent. */
26233 + printf ("%6.6s %5.5s %*.*f %*.*f %7lu/%-7lu ",
26235 - arc->time / hz, arc->child_time / hz,
26236 + self_wid, prec, arc->time / hz,
26237 + child_wid, prec, arc->child_time / hz,
26238 arc->count, child->cg.cyc.head->ncalls);
26239 print_name (child);
26241 @@ -468,25 +471,21 @@ print_line (Sym *np)
26244 sprintf (buf, "[%d]", np->cg.index);
26245 - printf (bsd_style_output
26246 - ? "%-6.6s %5.1f %7.2f %11.2f"
26247 - : "%-6.6s %5.1f %7.2f %7.2f", buf,
26248 + printf ("%-6.6s %5.1f %*.*f %*.*f", buf,
26249 100 * (np->cg.prop.self + np->cg.prop.child) / print_time,
26250 - np->cg.prop.self / hz, np->cg.prop.child / hz);
26252 + self_wid, prec, np->cg.prop.self / hz,
26253 + child_wid, prec, np->cg.prop.child / hz);
26254 if ((np->ncalls + np->cg.self_calls) != 0)
26256 printf (" %7lu", np->ncalls);
26258 if (np->cg.self_calls != 0)
26259 - printf ("+%-7lu ", np->cg.self_calls);
26260 + printf ("+%-7lu ", np->cg.self_calls);
26262 - printf (" %7.7s ", "");
26263 + printf (" %7.7s ", "");
26267 - printf (" %7.7s %7.7s ", "", "");
26269 + printf (" %7.7s %7.7s ", "", "");
26273 @@ -504,6 +503,20 @@ cg_print (Sym ** timesortsym)
26274 if (print_descriptions && bsd_style_output)
26275 bsd_callg_blurb (stdout);
26278 + for (index = 0; index < symtab.len; index++)
26280 + Sym *sym = &symtab.base[index];
26281 + if (sym->cg.prop.child > child_max)
26282 + child_max = sym->cg.prop.child;
26284 + if (bsd_style_output)
26285 + self_wid = 7, child_wid = 11, prec = 2;
26286 + else if (child_max / hz >= 100000.0)
26287 + self_wid = 10, child_wid = 10, prec = 0;
26289 + self_wid = 7, child_wid = 7, prec = 2;
26293 for (index = 0; index < symtab.len + num_cycles; ++index)
26294 --- a/gprof/corefile.c
26295 +++ b/gprof/corefile.c
26297 #include "corefile.h"
26298 #include "safe-ctype.h"
26300 +/* FIXME: These are needed to figure out if this is a mips16 symbol or
26301 + not. It would be better to think of a cleaner way to do this. */
26302 +#include "elf-bfd.h"
26303 +#include "elf/mips.h"
26306 static int core_num_syms;
26307 static asymbol **core_syms;
26308 @@ -233,6 +238,10 @@ core_init (const char *aout_name)
26312 + case bfd_arch_mips:
26313 + min_insn_size = 2;
26319 @@ -528,6 +537,17 @@ core_create_function_syms ()
26321 symtab.limit->addr += bfd_get_section_vma (sym_sec->owner, sym_sec);
26323 + /* Flag mips16 symbols by making them odd (we don't have a
26324 + handle on the original bfd symbol after this point). */
26325 + if (bfd_get_arch (core_bfd) == bfd_arch_mips
26326 + && bfd_get_flavour (core_bfd) == bfd_target_elf_flavour)
26328 + elf_symbol_type *es = elf_symbol_from (core_bfd, core_syms[i]);
26330 + if (es && es->internal_elf_sym.st_other == STO_MIPS16)
26331 + symtab.limit->addr |= 1;
26334 if (symbol_map_count
26335 && !strcmp (core_syms[i]->name, symbol_map[found].function_name))
26337 --- a/gprof/gmon_io.c
26338 +++ b/gprof/gmon_io.c
26339 @@ -430,8 +430,8 @@ gmon_out_read (const char *filename)
26340 goto bad_gmon_file;
26344 - else if (hz != (int) profrate)
26345 + hz_int = profrate;
26346 + else if (hz_int != (int) profrate)
26349 _("%s: profiling rate incompatible with first gmon file\n"),
26350 @@ -553,15 +553,15 @@ gmon_out_read (const char *filename)
26354 - if (hz == HZ_WRONG)
26355 + if (hz_int == HZ_WRONG)
26357 - /* How many ticks per second? If we can't tell, report
26358 - time in ticks. */
26361 - if (hz == HZ_WRONG)
26363 + How many ticks per second? If we can't tell, report
26364 + time in ticks. */
26365 + hz_int = hertz ();
26366 + if (hz_int == HZ_WRONG)
26370 fprintf (stderr, _("time is in ticks, not seconds\n"));
26373 @@ -573,6 +573,15 @@ gmon_out_read (const char *filename)
26377 +#ifdef HERTZ_FLOAT
26379 + hz = 1.0 / -hz_int;
26386 if (output_style & STYLE_GMON_INFO)
26388 printf (_("File `%s' (version %d) contains:\n"),
26389 @@ -645,7 +654,7 @@ gmon_out_write (const char *filename)
26390 header if explicitly specified, or if the profiling rate is
26391 non-standard. Otherwise, use the old BSD format. */
26392 if (file_format == FF_BSD44
26393 - || hz != hertz())
26394 + || hz_int != hertz ())
26397 switch (gmon_get_ptr_size ())
26398 @@ -692,10 +701,10 @@ gmon_out_write (const char *filename)
26400 /* Write out the 4.4BSD header bits, if that's what we're using. */
26401 if (file_format == FF_BSD44
26402 - || hz != hertz())
26403 + || hz_int != hertz())
26405 if (gmon_io_write_32 (ofp, GMONVERSION)
26406 - || gmon_io_write_32 (ofp, (unsigned int) hz))
26407 + || gmon_io_write_32 (ofp, (unsigned int) hz_int))
26411 --- a/gprof/gprof.c
26412 +++ b/gprof/gprof.c
26413 @@ -50,7 +50,12 @@ static void usage (FILE *, int) ATTRIBUT
26414 const char *whoami;
26415 const char *function_mapping_file;
26416 const char *a_out_name = A_OUTNAME;
26417 -long hz = HZ_WRONG;
26418 +#ifdef HERTZ_FLOAT
26423 +long hz_int = HZ_WRONG;
26426 * Default options values:
26427 --- a/gprof/gprof.h
26428 +++ b/gprof/gprof.h
26433 +#include "gconfig.h"
26437 /* Include the BFD sysdep.h file. */
26438 #include "sysdep.h"
26440 @@ -109,7 +113,15 @@ typedef unsigned char UNIT[2]; /* unit o
26441 extern const char *whoami; /* command-name, for error messages */
26442 extern const char *function_mapping_file; /* file mapping functions to files */
26443 extern const char *a_out_name; /* core filename */
26444 +extern char hist_dimension[]; /* histogram label */
26446 +#define HERTZ_FLOAT
26447 +#ifdef HERTZ_FLOAT
26448 +extern double hz; /* ticks per second */
26450 extern long hz; /* ticks per second */
26452 +extern long hz_int;
26455 * Command-line options:
26458 @@ -49,7 +49,7 @@ static histogram *find_histogram (bfd_vm
26459 static histogram *find_histogram_for_pc (bfd_vma pc);
26462 -static char hist_dimension[16] = "seconds";
26463 +char hist_dimension[16] = "seconds";
26464 static char hist_dimension_abbrev = 's';
26466 static double accum_time; /* Accumulated time so far for print_line(). */
26467 @@ -86,7 +86,7 @@ SItab[] =
26468 that the new histogram is compatible with already-set values
26469 of those variables and emits an error if that's not so. */
26471 -read_histogram_header (histogram *record,
26472 +read_histogram_header (histogram *record,
26473 FILE *ifp, const char *filename,
26476 @@ -108,28 +108,28 @@ read_histogram_header (histogram *record
26480 - n_hist_scale = (double)((record->highpc - record->lowpc) / sizeof (UNIT))
26481 + n_hist_scale = (double)((record->highpc - record->lowpc) / sizeof (UNIT))
26482 / record->num_bins;
26486 - /* We don't try to veryfy profrate is the same for all histogram
26487 + /* We don't try to verify profrate is the same for all histogram
26488 records. If we have two histogram records for the same
26489 address range and profiling samples is done as often
26490 as possible as opposed on timer, then the actual profrate will
26491 be slightly different. Most of the time the difference does not
26492 matter and insisting that profiling rate is exactly the same
26493 will only create inconvenient. */
26495 + hz_int = profrate;
26496 memcpy (hist_dimension, n_hist_dimension, 15);
26497 hist_dimension_abbrev = n_hist_dimension_abbrev;
26498 - hist_scale = n_hist_scale;
26499 + hist_scale = n_hist_scale;
26503 if (strncmp (n_hist_dimension, hist_dimension, 15) != 0)
26507 _("%s: dimension unit changed between histogram records\n"
26510 @@ -139,12 +139,12 @@ read_histogram_header (histogram *record
26512 if (n_hist_dimension_abbrev != hist_dimension_abbrev)
26516 _("%s: dimension abbreviation changed between histogram records\n"
26519 whoami, whoami, hist_dimension_abbrev, whoami, n_hist_dimension_abbrev);
26524 /* The only reason we require the same scale for histograms is that
26525 @@ -153,10 +153,10 @@ read_histogram_header (histogram *record
26526 things for different functions. */
26527 if (fabs (hist_scale - n_hist_scale) > 0.000001)
26531 _("%s: different scales in histogram records"),
26538 @@ -190,10 +190,10 @@ hist_read_rec (FILE * ifp, const char *f
26539 hist_clip_symbol_address (&lowpc, &highpc);
26540 if (lowpc != highpc)
26544 _("%s: overlapping histogram records\n"),
26550 /* This is new record. Add it to global array and allocate space for
26551 @@ -202,10 +202,10 @@ hist_read_rec (FILE * ifp, const char *f
26552 sizeof (histogram) * (num_histograms + 1));
26553 memcpy (histograms + num_histograms,
26554 &n_record, sizeof (histogram));
26555 - record = &histograms[num_histograms];
26556 + record = &histograms[num_histograms];
26559 - record->sample = (int *) xmalloc (record->num_bins
26560 + record->sample = (int *) xmalloc (record->num_bins
26561 * sizeof (record->sample[0]));
26562 memset (record->sample, 0, record->num_bins * sizeof (record->sample[0]));
26564 @@ -216,9 +216,9 @@ hist_read_rec (FILE * ifp, const char *f
26567 printf ("[hist_read_rec] n_lowpc 0x%lx n_highpc 0x%lx ncnt %u\n",
26568 - (unsigned long) record->lowpc, (unsigned long) record->highpc,
26569 + (unsigned long) record->lowpc, (unsigned long) record->highpc,
26570 record->num_bins));
26573 for (i = 0; i < record->num_bins; ++i)
26576 @@ -232,8 +232,8 @@ hist_read_rec (FILE * ifp, const char *f
26577 record->sample[i] += bfd_get_16 (core_bfd, (bfd_byte *) & count[0]);
26579 printf ("[hist_read_rec] 0x%lx: %u\n",
26580 - (unsigned long) (record->lowpc
26581 - + i * (record->highpc - record->lowpc)
26582 + (unsigned long) (record->lowpc
26583 + + i * (record->highpc - record->lowpc)
26584 / record->num_bins),
26585 record->sample[i]));
26587 @@ -259,7 +259,7 @@ hist_write_hist (FILE * ofp, const char
26588 || gmon_io_write_vma (ofp, record->lowpc)
26589 || gmon_io_write_vma (ofp, record->highpc)
26590 || gmon_io_write_32 (ofp, record->num_bins)
26591 - || gmon_io_write_32 (ofp, hz)
26592 + || gmon_io_write_32 (ofp, hz_int)
26593 || gmon_io_write (ofp, hist_dimension, 15)
26594 || gmon_io_write (ofp, &hist_dimension_abbrev, 1))
26596 @@ -484,12 +484,24 @@ print_header (int prefix)
26600 - printf ("%5.5s %10.10s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
26601 - "% ", _("cumulative"), _("self "), "", _("self "), _("total "),
26603 - printf ("%5.5s %9.9s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
26604 - _("time"), hist_dimension, hist_dimension, _("calls"), unit, unit,
26606 + if (total_time / hz_int >= 100000.0 && ! bsd_style_output)
26608 + printf ("%5.5s %13.13s %11.11s %8.8s %8.8s %8.8s %-8.8s\n",
26609 + "% ", _("cumulative"), _("self "), "", _("self "),
26610 + _("total "), "");
26611 + printf ("%5.5s %12.12s %11.11s %8.8s %8.8s %8.8s %-8.8s\n",
26612 + _("time"), hist_dimension, hist_dimension, _("calls"), unit,
26613 + unit, _("name"));
26617 + printf ("%5.5s %10.10s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
26618 + "% ", _("cumulative"), _("self "), "", _("self "),
26619 + _("total "), "");
26620 + printf ("%5.5s %9.9s %8.8s %8.8s %8.8s %8.8s %-8.8s\n",
26621 + _("time"), hist_dimension, hist_dimension, _("calls"), unit,
26622 + unit, _("name"));
26627 @@ -505,6 +517,10 @@ print_line (Sym *sym, double scale)
26628 printf ("%5.1f %10.2f %8.2f",
26629 total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
26630 accum_time / hz, sym->hist.time / hz);
26631 + else if (total_time / hz >= 100000.0)
26632 + printf ("%6.2f %12.0f %11.0f",
26633 + 100 * sym->hist.time / total_time,
26634 + accum_time / hz, sym->hist.time / hz);
26636 printf ("%6.2f %9.2f %8.2f",
26637 total_time > 0.0 ? 100 * sym->hist.time / total_time : 0.0,
26638 @@ -610,7 +626,12 @@ hist_print ()
26639 for (index = 0; index < symtab.len; ++index)
26641 sym = time_sorted_syms[index];
26643 + /* Don't let this symbol affect the scaling if it's not going
26644 + to be included in the histogram. */
26645 + if ((syms[INCL_FLAT].len != 0
26646 + && ! sym_lookup (&syms[INCL_FLAT], sym->addr))
26647 + || sym_lookup (&syms[EXCL_FLAT], sym->addr))
26649 if (sym->ncalls != 0)
26651 time = (sym->hist.time + sym->cg.child_time) / sym->ncalls;
26652 @@ -631,7 +652,7 @@ hist_print ()
26654 double scaled_value = SItab[log_scale].scale * top_time;
26656 - if (scaled_value >= 1.0 && scaled_value < 1000.0)
26657 + if (scaled_value >= 1.0 && scaled_value < 1000.0)
26661 @@ -669,7 +690,7 @@ hist_check_address (unsigned address)
26662 if (histograms[i].lowpc <= address && address < histograms[i].highpc)
26670 @@ -744,5 +765,5 @@ find_histogram_for_pc (bfd_vma pc)
26671 if (histograms[i].lowpc <= pc && pc < histograms[i].highpc)
26672 return &histograms[i];
26679 @@ -46,6 +46,7 @@ mips_find_call (Sym *parent, bfd_vma p_l
26682 static bfd_boolean inited = FALSE;
26687 @@ -55,46 +56,123 @@ mips_find_call (Sym *parent, bfd_vma p_l
26688 indirect_child.cg.prop.fract = 1.0;
26689 indirect_child.cg.cyc.head = &indirect_child;
26691 + mips16 = (p_lowpc & 1) != 0;
26695 - DBG (CALLDEBUG, printf (_("[find_call] %s: 0x%lx to 0x%lx\n"),
26696 + DBG (CALLDEBUG, printf (_("[find_call] %s: 0x%lx to 0x%lx%s\n"),
26697 parent->name, (unsigned long) p_lowpc,
26698 - (unsigned long) p_highpc));
26699 - for (pc = p_lowpc; pc < p_highpc; pc += 4)
26700 + (unsigned long) p_highpc,
26701 + mips16 ? " (mips16)" : ""));
26702 + for (pc = p_lowpc; pc < p_highpc;)
26704 - op = bfd_get_32 (core_bfd, ((unsigned char *)core_text_space
26705 - + pc - core_text_sect->vma));
26706 - if ((op & 0xfc000000) == 0x0c000000)
26709 - /* This is a "jal" instruction. Check that the destination
26710 - is the address of a function. */
26712 - printf (_("[find_call] 0x%lx: jal"), (unsigned long) pc));
26713 - offset = (op & 0x03ffffff) << 2;
26714 - dest_pc = (pc & ~(bfd_vma) 0xfffffff) | offset;
26715 - if (hist_check_address (dest_pc))
26716 + op = bfd_get_32 (core_bfd, &((char *)core_text_space)[pc - p_lowpc]);
26718 + if ((op & 0xfc000000) == 0x0c000000) /* jal */
26721 + printf (_("[find_call] 0x%lx: jal"), (unsigned long) pc-4));
26722 + offset = (op & 0x03ffffff) << 2;
26723 + dest_pc = (pc & ~(bfd_vma) 0xfffffff) | offset;
26724 + pc += 4; /* skip delay slot */
26726 + else if ((op & 0xfc000000) == 0x74000000) /* jalx */
26728 - child = sym_lookup (&symtab, dest_pc);
26730 - printf (" 0x%lx\t; name=%s, addr=0x%lx",
26731 - (unsigned long) dest_pc, child->name,
26732 - (unsigned long) child->addr));
26733 - if (child->addr == dest_pc)
26735 - DBG (CALLDEBUG, printf ("\n"));
26737 - arc_add (parent, child, (unsigned long) 0);
26740 + printf (_("[find_call] 0x%lx: jalx"), (unsigned long) pc-4));
26741 + offset = (op & 0x03ffffff) << 2;
26742 + dest_pc = (pc & ~(bfd_vma) 0xfffffff) | offset | 1;
26743 + pc += 4; /* skip delay slot */
26745 + else if ((op & 0xfc1f07ff) == 0x00000009) /* jalr */
26747 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:jalr\n" ,
26748 + (unsigned long)pc-4));
26749 + arc_add (parent, &indirect_child, (long)0);
26750 + pc += 4; /* skip delay slot */
26753 - /* Something funny going on. */
26754 - DBG (CALLDEBUG, printf ("\tbut it's a botch\n"));
26755 + else if ((op & 0xfc1c0000) == 0x04100000) /* bxxzal */
26757 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:bal" ,
26758 + (unsigned long)pc-4));
26759 + dest_pc = pc + ((short)op << 2) + 4;
26760 + pc += 4; /* skip delay slot */
26765 - else if ((op & 0xfc00f83f) == 0x0000f809)
26768 - /* This is a "jalr" instruction (indirect call). */
26769 + /* MIPS16 function */
26770 + op = bfd_get_16 (core_bfd, &((char *)core_text_space)[pc - p_lowpc]);
26772 + if ((op & 0xfc00) == 0x1800 /* jal */
26773 + || (op & 0xfc00) == 0x1c00) /* jalx */
26775 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:jal%s",
26776 + (unsigned long)pc-2,
26777 + (op & 0xfc00) == 0x1c00 ? "x" : ""));
26778 + offset = bfd_get_16 (core_bfd,
26779 + &((char *)core_text_space)[pc - p_lowpc]);
26781 + offset |= (op & 0x1f) << 21;
26782 + offset |= (op & 0x3e0) << (16 - 5);
26783 + dest_pc = (pc & ~(bfd_vma)0x0fffffff)
26784 + + ((offset & 0x3ffffff) << 2);
26785 + if ((op & 0xfc00) == 0x1800) /* jal */
26787 + pc += 2; /* skip delay slot */
26789 + else if ((op & 0xf8ff) == 0xe840) /* jalr */
26791 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:jalr\n" ,
26792 + (unsigned long)pc-2));
26793 + arc_add (parent, &indirect_child, (long)0);
26794 + pc += 2; /* skip delay slot */
26797 + else if ((op & 0xf8ff) == 0xe8c0) /* jalrc */
26799 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:jalrc\n" ,
26800 + (unsigned long)pc-2));
26801 + arc_add (parent, &indirect_child, (long)0);
26804 + else if ((op & 0xff7f) == 0xe820 /* jr/jrc $31 */
26805 + || (op & 0xff7f) == 0xef00 /* jr/jrc $7 */
26806 + || (op & 0xff80) == 0x6400 /* restore */
26807 + || (op & 0xff1f) == 0xed09 /* exit */
26808 + || (op & 0xff1f) == 0xee09 /* exit */
26809 + || (op & 0xff1f) == 0xef09) /* exit */
26811 + /* Skip constants after the end of the function. */
26812 + DBG (CALLDEBUG, printf ("[find_call]\t0x%lx:end\n" ,
26813 + (unsigned long)pc-2));
26820 + if (dest_pc >= p_lowpc && dest_pc <= p_highpc)
26822 + child = sym_lookup (&symtab, dest_pc);
26824 - printf (_("[find_call] 0x%lx: jalr\n"), (unsigned long) pc));
26825 - arc_add (parent, &indirect_child, (unsigned long) 0);
26826 + printf (" 0x%lx\t; name=%s, addr=0x%lx",
26827 + (unsigned long) dest_pc, child->name,
26828 + (unsigned long) child->addr));
26829 + if (child->addr == dest_pc)
26831 + DBG (CALLDEBUG, printf ("\n"));
26833 + arc_add (parent, child, (unsigned long) 0);
26837 + /* Something funny going on. */
26838 + DBG (CALLDEBUG, printf ("\tbut it's a botch\n"));
26841 --- a/include/elf/arm.h
26842 +++ b/include/elf/arm.h
26844 #define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
26846 /* Additional section types. */
26847 -#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
26848 -#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
26849 -#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
26850 +#define SHT_ARM_EXIDX 0x70000001 /* Section holds ARM unwind info. */
26851 +#define SHT_ARM_PREEMPTMAP 0x70000002 /* Section pre-emption details. */
26852 +#define SHT_ARM_ATTRIBUTES 0x70000003 /* Section holds attributes. */
26853 +#define SHT_ARM_DEBUGOVERLAY 0x70000004 /* Section holds overlay debug info. */
26854 +#define SHT_ARM_OVERLAYSECTION 0x70000005 /* Section holds GDB and overlay integration info. */
26856 /* ARM-specific values for sh_flags. */
26857 #define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */
26858 --- a/include/libiberty.h
26859 +++ b/include/libiberty.h
26860 @@ -591,6 +591,10 @@ extern int pexecute (const char *, char
26862 extern int pwait (int, int *, int);
26864 +/* Convert a Cygwin path to a Windows path. */
26866 +extern int cygpath (const char *, char []);
26868 #if !HAVE_DECL_ASPRINTF
26869 /* Like sprintf but provides a pointer to malloc'd storage, which must
26870 be freed by the caller. */
26871 --- a/include/opcode/arm.h
26872 +++ b/include/opcode/arm.h
26874 #define ARM_CEXT_MAVERICK 0x00000002 /* Use Cirrus/DSP coprocessor. */
26875 #define ARM_CEXT_IWMMXT 0x00000004 /* Intel Wireless MMX technology coprocessor. */
26876 #define ARM_CEXT_IWMMXT2 0x00000008 /* Intel Wireless MMX technology coprocessor version 2. */
26877 +#define ARM_CEXT_MARVELL_F 0x00000010 /* Marvell division extension. */
26879 #define FPU_ENDIAN_PURE 0x80000000 /* Pure-endian doubles. */
26880 #define FPU_ENDIAN_BIG 0 /* Double words-big-endian. */
26881 @@ -116,6 +117,8 @@
26882 ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
26883 #define ARM_ARCH_IWMMXT2 \
26884 ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT | ARM_CEXT_IWMMXT2)
26885 +#define ARM_ARCH_MARVELL_F \
26886 + ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_MARVELL_F)
26888 #define FPU_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_ENDIAN_PURE)
26889 #define FPU_VFP_V1 (FPU_VFP_V1xD | FPU_VFP_EXT_V1)
26890 --- a/include/opcode/mips.h
26891 +++ b/include/opcode/mips.h
26892 @@ -843,6 +843,8 @@ enum
26901 --- a/ld/Makefile.am
26902 +++ b/ld/Makefile.am
26903 @@ -163,6 +163,12 @@ ALL_EMULATIONS = \
26907 + eelf32ebocteon.o \
26908 + eelf32elocteon.o \
26909 + eelf32ebocteonn32.o \
26910 + eelf32elocteonn32.o \
26911 + eelf64ebocteon.o \
26912 + eelf64elocteon.o \
26916 @@ -789,6 +795,35 @@ eelf32cr16c.c: $(srcdir)/emulparams/elf3
26918 $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
26919 ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
26920 +eelf32ebocteon.c: $(srcdir)/emulparams/elf32ebocteon.sh \
26921 + $(srcdir)/emulparams/elf32bmip.sh \
26922 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26923 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26924 + ${GENSCRIPTS} elf32ebocteon "$(tdir_elf32ebocteon)"
26925 +eelf32elocteon.c: $(srcdir)/emulparams/elf32elocteon.sh \
26926 + $(srcdir)/emulparams/elf32ebocteon.sh $(srcdir)/emulparams/elf32bmip.sh \
26927 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26928 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26929 + ${GENSCRIPTS} elf32elocteon "$(tdir_elf32elocteon)"
26930 +eelf32ebocteonn32.c: $(srcdir)/emulparams/elf32ebocteonn32.sh \
26931 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26932 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26933 + ${GENSCRIPTS} elf32ebocteonn32 "$(tdir_elf32ebocteonn32)"
26934 +eelf32elocteonn32.c: $(srcdir)/emulparams/elf32elocteonn32.sh \
26935 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26936 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26937 + ${GENSCRIPTS} elf32elocteonn32 "$(tdir_elf32elocteonn32)"
26938 +eelf64ebocteon.c: $(srcdir)/emulparams/elf64ebocteon.sh \
26939 + $(srcdir)/emulparams/elf32ebocteon.sh \
26940 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26941 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26942 + ${GENSCRIPTS} elf64ebocteon "$(tdir_elf64ebocteon)"
26943 +eelf64elocteon.c: $(srcdir)/emulparams/elf64elocteon.sh \
26944 + $(srcdir)/emulparams/elf64ebocteon.sh \
26945 + $(srcdir)/emulparams/elf32ebocteon.sh \
26946 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26947 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26948 + ${GENSCRIPTS} elf64elocteon "$(tdir_elf64elocteon)"
26949 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
26950 $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26951 ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
26952 --- a/ld/Makefile.in
26953 +++ b/ld/Makefile.in
26954 @@ -427,6 +427,12 @@ ALL_EMULATIONS = \
26958 + eelf32ebocteon.o \
26959 + eelf32elocteon.o \
26960 + eelf32ebocteonn32.o \
26961 + eelf32elocteonn32.o \
26962 + eelf64ebocteon.o \
26963 + eelf64elocteon.o \
26967 @@ -1635,6 +1641,35 @@ eelf32cr16c.c: $(srcdir)/emulparams/elf3
26969 $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
26970 ${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
26971 +eelf32ebocteon.c: $(srcdir)/emulparams/elf32ebocteon.sh \
26972 + $(srcdir)/emulparams/elf32bmip.sh \
26973 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26974 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26975 + ${GENSCRIPTS} elf32ebocteon "$(tdir_elf32ebocteon)"
26976 +eelf32elocteon.c: $(srcdir)/emulparams/elf32elocteon.sh \
26977 + $(srcdir)/emulparams/elf32ebocteon.sh $(srcdir)/emulparams/elf32bmip.sh \
26978 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26979 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26980 + ${GENSCRIPTS} elf32elocteon "$(tdir_elf32elocteon)"
26981 +eelf32ebocteonn32.c: $(srcdir)/emulparams/elf32ebocteonn32.sh \
26982 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26983 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26984 + ${GENSCRIPTS} elf32ebocteonn32 "$(tdir_elf32ebocteonn32)"
26985 +eelf32elocteonn32.c: $(srcdir)/emulparams/elf32elocteonn32.sh \
26986 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26987 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26988 + ${GENSCRIPTS} elf32elocteonn32 "$(tdir_elf32elocteonn32)"
26989 +eelf64ebocteon.c: $(srcdir)/emulparams/elf64ebocteon.sh \
26990 + $(srcdir)/emulparams/elf32ebocteon.sh \
26991 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26992 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26993 + ${GENSCRIPTS} elf64ebocteon "$(tdir_elf64ebocteon)"
26994 +eelf64elocteon.c: $(srcdir)/emulparams/elf64elocteon.sh \
26995 + $(srcdir)/emulparams/elf64ebocteon.sh \
26996 + $(srcdir)/emulparams/elf32ebocteon.sh \
26997 + $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/octeonelf.em \
26998 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
26999 + ${GENSCRIPTS} elf64elocteon "$(tdir_elf64elocteon)"
27000 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
27001 $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
27002 ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
27006 language is requested. */
27009 +/* Define to warn for use of native system library directories */
27010 +#undef ENABLE_POISON_SYSTEM_DIRECTORIES
27012 /* Additional extension a shared object might have. */
27013 #undef EXTRA_SHLIB_EXTENSION
27017 @@ -1004,6 +1004,8 @@ Optional Features:
27018 --enable-dependency-tracking do not reject slow dependency extractors
27019 --enable-targets alternative target configurations
27020 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
27021 + --enable-poison-system-directories
27022 + warn for use of native system library directories
27023 --enable-got=<type> GOT handling scheme (target, single, negative,
27025 --enable-werror treat compile warnings as errors
27026 @@ -3341,6 +3343,21 @@ fi;
27030 +# Check whether --enable-poison-system-directories or --disable-poison-system-directories was given.
27031 +if test "${enable_poison_system_directories+set}" = set; then
27032 + enableval="$enable_poison_system_directories"
27035 + enable_poison_system_directories=no
27037 +if test "x${enable_poison_system_directories}" = "xyes"; then
27039 +cat >>confdefs.h <<\_ACEOF
27040 +#define ENABLE_POISON_SYSTEM_DIRECTORIES 1
27045 # Check whether --enable-got or --disable-got was given.
27046 if test "${enable_got+set}" = set; then
27047 enableval="$enable_got"
27048 @@ -5795,13 +5812,13 @@ if test "${lt_cv_nm_interface+set}" = se
27050 lt_cv_nm_interface="BSD nm"
27051 echo "int some_variable = 0;" > conftest.$ac_ext
27052 - (eval echo "\"\$as_me:5798: $ac_compile\"" >&5)
27053 + (eval echo "\"\$as_me:5815: $ac_compile\"" >&5)
27054 (eval "$ac_compile" 2>conftest.err)
27055 cat conftest.err >&5
27056 - (eval echo "\"\$as_me:5801: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
27057 + (eval echo "\"\$as_me:5818: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
27058 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
27059 cat conftest.err >&5
27060 - (eval echo "\"\$as_me:5804: output\"" >&5)
27061 + (eval echo "\"\$as_me:5821: output\"" >&5)
27062 cat conftest.out >&5
27063 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
27064 lt_cv_nm_interface="MS dumpbin"
27065 @@ -6958,7 +6975,7 @@ ia64-*-hpux*)
27068 # Find out which ABI we are using.
27069 - echo '#line 6961 "configure"' > conftest.$ac_ext
27070 + echo '#line 6978 "configure"' > conftest.$ac_ext
27071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
27072 (eval $ac_compile) 2>&5
27074 @@ -8264,11 +8281,11 @@ else
27075 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
27076 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
27077 -e 's:$: $lt_compiler_flag:'`
27078 - (eval echo "\"\$as_me:8267: $lt_compile\"" >&5)
27079 + (eval echo "\"\$as_me:8284: $lt_compile\"" >&5)
27080 (eval "$lt_compile" 2>conftest.err)
27082 cat conftest.err >&5
27083 - echo "$as_me:8271: \$? = $ac_status" >&5
27084 + echo "$as_me:8288: \$? = $ac_status" >&5
27085 if (exit $ac_status) && test -s "$ac_outfile"; then
27086 # The compiler can only warn and ignore the option if not recognized
27087 # So say no if there are warnings other than the usual output.
27088 @@ -8603,11 +8620,11 @@ else
27089 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
27090 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
27091 -e 's:$: $lt_compiler_flag:'`
27092 - (eval echo "\"\$as_me:8606: $lt_compile\"" >&5)
27093 + (eval echo "\"\$as_me:8623: $lt_compile\"" >&5)
27094 (eval "$lt_compile" 2>conftest.err)
27096 cat conftest.err >&5
27097 - echo "$as_me:8610: \$? = $ac_status" >&5
27098 + echo "$as_me:8627: \$? = $ac_status" >&5
27099 if (exit $ac_status) && test -s "$ac_outfile"; then
27100 # The compiler can only warn and ignore the option if not recognized
27101 # So say no if there are warnings other than the usual output.
27102 @@ -8708,11 +8725,11 @@ else
27103 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
27104 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
27105 -e 's:$: $lt_compiler_flag:'`
27106 - (eval echo "\"\$as_me:8711: $lt_compile\"" >&5)
27107 + (eval echo "\"\$as_me:8728: $lt_compile\"" >&5)
27108 (eval "$lt_compile" 2>out/conftest.err)
27110 cat out/conftest.err >&5
27111 - echo "$as_me:8715: \$? = $ac_status" >&5
27112 + echo "$as_me:8732: \$? = $ac_status" >&5
27113 if (exit $ac_status) && test -s out/conftest2.$ac_objext
27115 # The compiler can only warn and ignore the option if not recognized
27116 @@ -8763,11 +8780,11 @@ else
27117 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
27118 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
27119 -e 's:$: $lt_compiler_flag:'`
27120 - (eval echo "\"\$as_me:8766: $lt_compile\"" >&5)
27121 + (eval echo "\"\$as_me:8783: $lt_compile\"" >&5)
27122 (eval "$lt_compile" 2>out/conftest.err)
27124 cat out/conftest.err >&5
27125 - echo "$as_me:8770: \$? = $ac_status" >&5
27126 + echo "$as_me:8787: \$? = $ac_status" >&5
27127 if (exit $ac_status) && test -s out/conftest2.$ac_objext
27129 # The compiler can only warn and ignore the option if not recognized
27130 @@ -11575,7 +11592,7 @@ else
27131 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
27132 lt_status=$lt_dlunknown
27133 cat > conftest.$ac_ext <<_LT_EOF
27134 -#line 11578 "configure"
27135 +#line 11595 "configure"
27136 #include "confdefs.h"
27139 @@ -11671,7 +11688,7 @@ else
27140 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
27141 lt_status=$lt_dlunknown
27142 cat > conftest.$ac_ext <<_LT_EOF
27143 -#line 11674 "configure"
27144 +#line 11691 "configure"
27145 #include "confdefs.h"
27148 --- a/ld/configure.in
27149 +++ b/ld/configure.in
27150 @@ -68,6 +68,16 @@ AC_SUBST(use_sysroot)
27151 AC_SUBST(TARGET_SYSTEM_ROOT)
27152 AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
27154 +AC_ARG_ENABLE([poison-system-directories],
27155 + AS_HELP_STRING([--enable-poison-system-directories],
27156 + [warn for use of native system library directories]),,
27157 + [enable_poison_system_directories=no])
27158 +if test "x${enable_poison_system_directories}" = "xyes"; then
27159 + AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
27161 + [Define to warn for use of native system library directories])
27164 AC_ARG_ENABLE([got],
27165 AS_HELP_STRING([--enable-got=<type>],
27166 [GOT handling scheme (target, single, negative, multigot)]),
27167 --- a/ld/configure.tgt
27168 +++ b/ld/configure.tgt
27169 @@ -380,6 +380,9 @@ mips*vr4100el-*-elf*) targ_emul=elf32l43
27170 mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
27171 mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
27172 mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
27173 +mips64octeon*-*-elf*) targ_emul=elf32ebocteon
27174 + targ_extra_emuls="elf32elocteon elf32ebocteonn32 elf32elocteonn32 elf64ebocteon elf64elocteon"
27176 mips*el-sde-elf*) targ_emul=elf32ltsmip
27177 targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
27178 mips*-sde-elf*) targ_emul=elf32btsmip
27179 @@ -392,6 +395,10 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
27180 mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
27181 targ_extra_emuls="elf32elmipvxworks" ;;
27182 mips*-*-windiss) targ_emul=elf32mipswindiss ;;
27183 +mips64el-sicortex-linux-gnu)
27184 + targ_emul=elf64ltsmip
27185 + targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
27186 + targ_extra_libpath=$targ_extra_emuls ;;
27187 mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
27188 targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
27189 targ_extra_libpath=$targ_extra_emuls ;;
27190 --- a/ld/emulparams/armelf.sh
27191 +++ b/ld/emulparams/armelf.sh
27192 @@ -6,7 +6,7 @@ LITTLE_OUTPUT_FORMAT="elf32-littlearm"
27193 TEXT_START_ADDR=0x8000
27194 TEMPLATE_NAME=elf32
27195 EXTRA_EM_FILE=armelf
27196 -OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
27197 +OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.janus_2cc_veneer) *(.v4_bx)'
27198 OTHER_BSS_SYMBOLS='__bss_start__ = .;'
27199 OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
27200 OTHER_END_SYMBOLS='__end__ = . ;'
27201 --- a/ld/emulparams/elf32ebmipvxworks.sh
27202 +++ b/ld/emulparams/elf32ebmipvxworks.sh
27203 @@ -13,6 +13,9 @@ OTHER_READWRITE_SECTIONS="
27204 .rdata ${RELOCATING-0} : ONLY_IF_RW { *(.rdata) }
27206 unset OTHER_GOT_SYMBOLS
27210 SHLIB_TEXT_START_ADDR=0
27214 +++ b/ld/emulparams/elf32ebocteon.sh
27216 +# If you change this file, please also look at files which source this one:
27220 +. ${srcdir}/emulparams/elf32btsmip.sh
27222 +# Entry point symbol.
27225 +# Start of the .text section
27226 +TEXT_START_ADDR=0x10000000
27228 +# Data and .cmvx_shared are 32M pages. Unlike what the documentation says we
27229 +# always use (ALIGN(MAXPAGESIZE) + (. & (MAXPAGESIZE - COMMONPAGESIZE))) to
27230 +# align data. On-disk image will have at most 4K (ELF_MAXPAGESIZE) padding
27233 +COMMONPAGESIZE=32M
27234 +# Needed to disable demand paging.
27235 +EXTRA_EM_FILE=octeonelf
27237 +# If defined, the genscripts.sh script sets TEXT_START_ADDR to its value
27238 +# for the -n/-N options.
27239 +# Define this as the TEXT_START_ADDR is different to overright the one
27240 +# defined in elf32bmip.sh
27241 +NONPAGED_TEXT_START_ADDR=0x10000000
27243 +# Create new macro to place .cvmx_shared at the end of _end.
27244 +OCTEON_SPECIAL_SECTIONS='
27245 + . = ALIGN(32M); /* RBF added alignment of data */
27246 + __cvmx_shared_start = .;
27247 + .cvmx_shared : { *(.cvmx_shared .cvmx_shared.linkonce.*) }
27248 + .cvmx_shared_bss : { *(.cvmx_shared_bss .cvmx_shared_bss.linkonce.*) }
27249 + __cvmx_shared_end = .;'
27251 +OTHER_END_SYMBOLS='
27252 + /* All symbols above this (32 bit compat space) the simulator will attribute
27253 + to the bootloader. */
27254 + __bootloader = 0xFFFFFFF8;'
27256 +EXECUTABLE_SYMBOLS='
27257 + PROVIDE(__cvmx_app_init = 0);
27258 + PROVIDE(__cvmx_app_exit = 0);
27259 + PROVIDE(__cvmx_pci_console_write = 0);
27260 + PROVIDE(__cvmx_pci_console_read = 0);'
27262 +++ b/ld/emulparams/elf32ebocteonn32.sh
27265 +. ${srcdir}/emulparams/elf32ebocteon.sh
27267 +OUTPUT_FORMAT="elf32-ntradbigmips"
27268 +BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
27269 +LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
27270 --- a/ld/emulparams/elf32elmipvxworks.sh
27271 +++ b/ld/emulparams/elf32elmipvxworks.sh
27272 @@ -4,6 +4,9 @@ OUTPUT_FORMAT="elf32-littlemips-vxworks"
27273 BIG_OUTPUT_FORMAT="elf32-bigmips-vxworks"
27274 LITTLE_OUTPUT_FORMAT="elf32-littlemips-vxworks"
27275 unset OTHER_GOT_SYMBOLS
27279 SHLIB_TEXT_START_ADDR=0
27283 +++ b/ld/emulparams/elf32elocteon.sh
27285 +. ${srcdir}/emulparams/elf32ebocteon.sh
27286 +OUTPUT_FORMAT=$LITTLE_OUTPUT_FORMAT
27288 +++ b/ld/emulparams/elf32elocteonn32.sh
27290 +. ${srcdir}/emulparams/elf32ebocteonn32.sh
27291 +OUTPUT_FORMAT="elf32-ntradlittlemips"
27293 +++ b/ld/emulparams/elf64ebocteon.sh
27296 +. ${srcdir}/emulparams/elf32ebocteon.sh
27298 +OUTPUT_FORMAT="elf64-tradbigmips"
27299 +BIG_OUTPUT_FORMAT="elf64-tradbigmips"
27300 +LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
27302 +++ b/ld/emulparams/elf64elocteon.sh
27304 +. ${srcdir}/emulparams/elf64ebocteon.sh
27305 +OUTPUT_FORMAT=$LITTLE_OUTPUT_FORMAT
27306 --- a/ld/emultempl/armelf.em
27307 +++ b/ld/emultempl/armelf.em
27308 @@ -31,13 +31,14 @@ fragment <<EOF
27309 #include "elf/arm.h"
27311 static char *thumb_entry_symbol = NULL;
27312 -static bfd *bfd_for_interwork;
27313 static int byteswap_code = 0;
27314 static int target1_is_rel = 0${TARGET1_IS_REL};
27315 static char *target2_type = "${TARGET2_TYPE}";
27316 static int fix_v4bx = 0;
27317 static int use_blx = 0;
27318 static bfd_arm_vfp11_fix vfp11_denorm_fix = BFD_ARM_VFP11_FIX_DEFAULT;
27319 +static int fix_janus_2cc = 0;
27320 +static int fix_cortex_a8 = -1;
27321 static int no_enum_size_warning = 0;
27322 static int no_wchar_size_warning = 0;
27323 static int pic_veneer = 0;
27324 @@ -53,67 +54,21 @@ gld${EMULATION_NAME}_before_parse (void)
27328 -arm_elf_after_open (void)
27331 - LANG_FOR_EACH_INPUT_STATEMENT (is)
27333 - bfd_elf32_arm_add_glue_sections_to_bfd (is->the_bfd, & link_info);
27337 - /* Call the standard elf routine. */
27338 - gld${EMULATION_NAME}_after_open ();
27342 -arm_elf_set_bfd_for_interworking (lang_statement_union_type *statement)
27344 - if (statement->header.type == lang_input_section_enum)
27346 - asection *i = statement->input_section.section;
27348 - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
27349 - && (i->flags & SEC_EXCLUDE) == 0)
27351 - asection *output_section = i->output_section;
27353 - ASSERT (output_section->owner == link_info.output_bfd);
27355 - /* Don't attach the interworking stubs to a dynamic object, to
27356 - an empty section, etc. */
27357 - if ((output_section->flags & SEC_HAS_CONTENTS) != 0
27358 - && (i->flags & SEC_NEVER_LOAD) == 0
27359 - && ! (i->owner->flags & DYNAMIC))
27360 - bfd_for_interwork = i->owner;
27366 arm_elf_before_allocation (void)
27368 - if (link_info.input_bfds != NULL)
27370 - /* The interworking bfd must be the last one in the link. */
27371 - bfd_for_interwork = NULL;
27373 - lang_for_each_statement (arm_elf_set_bfd_for_interworking);
27375 - /* If bfd_for_interwork is NULL, then there are no loadable sections
27376 - with real contents to be linked, so we are not going to have to
27377 - create any interworking stubs, so it is OK not to call
27378 - bfd_elf32_arm_get_bfd_for_interworking. */
27379 - if (bfd_for_interwork != NULL)
27380 - bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
27383 bfd_elf32_arm_set_byteswap_code (&link_info, byteswap_code);
27385 /* Choose type of VFP11 erratum fix, or warn if specified fix is unnecessary
27386 due to architecture version. */
27387 bfd_elf32_arm_set_vfp11_fix (link_info.output_bfd, &link_info);
27389 + /* Make sure we haven't selected the Janus 2CC fix on an architecture for
27390 + which it is unnecessary. */
27391 + bfd_elf32_arm_validate_janus_2cc_fix (link_info.output_bfd, &link_info);
27393 + /* Auto-select Cortex-A8 erratum fix if it wasn't explicitly specified. */
27394 + bfd_elf32_arm_set_cortex_a8_fix (link_info.output_bfd, &link_info);
27396 /* We should be able to set the size of the interworking stub section. We
27397 can't do it until later if we have dynamic sections, though. */
27398 if (! elf_hash_table (&link_info)->dynamic_sections_created)
27399 @@ -126,17 +81,19 @@ arm_elf_before_allocation (void)
27401 if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
27403 - || !bfd_elf32_arm_vfp11_erratum_scan (is->the_bfd, &link_info))
27404 + || !bfd_elf32_arm_vfp11_erratum_scan (is->the_bfd, &link_info)
27405 + || !bfd_elf32_arm_janus_2cc_erratum_scan (is->the_bfd,
27407 /* xgettext:c-format */
27408 einfo (_("Errors encountered processing file %s"), is->filename);
27411 + /* We have seen it all. Allocate it, and carry on. */
27412 + bfd_elf32_arm_allocate_interworking_sections (& link_info);
27415 /* Call the standard elf routine. */
27416 gld${EMULATION_NAME}_before_allocation ();
27418 - /* We have seen it all. Allocate it, and carry on. */
27419 - bfd_elf32_arm_allocate_interworking_sections (& link_info);
27423 @@ -150,7 +107,7 @@ arm_elf_after_allocation (void)
27425 /* Figure out where VFP11 erratum veneers (and the labels returning
27426 from same) have been placed. */
27427 - bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
27428 + bfd_elf32_arm_fix_veneer_locations (is->the_bfd, &link_info);
27432 @@ -213,9 +170,9 @@ hook_in_stub (struct hook_stub_info *inf
27433 if (l->input_section.section == info->input_section)
27435 /* We've found our section. Insert the stub immediately
27436 - before its associated input section. */
27437 - *lp = info->add.head;
27438 - *(info->add.tail) = l;
27439 + after its associated input section. */
27440 + *(info->add.tail) = l->header.next;
27441 + l->header.next = info->add.head;
27445 @@ -244,7 +201,7 @@ hook_in_stub (struct hook_stub_info *inf
27446 /* Call-back for elf32_arm_size_stubs. */
27448 /* Create a new stub section, and arrange for it to be linked
27449 - immediately before INPUT_SECTION. */
27450 + immediately after INPUT_SECTION. */
27453 elf32_arm_add_stub_section (const char *stub_sec_name,
27454 @@ -312,10 +269,78 @@ build_section_lists (lang_statement_unio
27459 +compare_output_sec_vma (const void *a, const void *b)
27461 + asection *asec = *(asection **) a, *bsec = *(asection **) b;
27462 + asection *aout = asec->output_section, *bout = bsec->output_section;
27463 + bfd_vma avma, bvma;
27465 + /* If there's no output section for some reason, compare equal. */
27466 + if (!aout || !bout)
27469 + avma = aout->vma + asec->output_offset;
27470 + bvma = bout->vma + bsec->output_offset;
27474 + else if (avma < bvma)
27481 gld${EMULATION_NAME}_finish (void)
27483 struct bfd_link_hash_entry * h;
27484 + unsigned int list_size = 10;
27485 + asection **sec_list = xmalloc (list_size * sizeof (asection *));
27486 + unsigned int sec_count = 0;
27488 + if (!link_info.relocatable)
27490 + /* Build a sorted list of input text sections, then use that to process
27491 + the unwind table index. */
27492 + LANG_FOR_EACH_INPUT_STATEMENT (is)
27494 + bfd *abfd = is->the_bfd;
27497 + if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
27500 + for (sec = abfd->sections; sec != NULL; sec = sec->next)
27502 + asection *out_sec = sec->output_section;
27505 + && elf_section_type (sec) == SHT_PROGBITS
27506 + && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
27507 + && (sec->flags & SEC_EXCLUDE) == 0
27508 + && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS
27509 + && out_sec != bfd_abs_section_ptr)
27511 + if (sec_count == list_size)
27514 + sec_list = xrealloc (sec_list,
27515 + list_size * sizeof (asection *));
27518 + sec_list[sec_count++] = sec;
27523 + qsort (sec_list, sec_count, sizeof (asection *), &compare_output_sec_vma);
27525 + if (elf32_arm_fix_exidx_coverage (sec_list, sec_count, &link_info))
27526 + need_laying_out = 1;
27531 /* bfd_elf32_discard_info just plays with debugging sections,
27532 ie. doesn't affect any code, so we can delay resizing the
27533 @@ -444,7 +469,7 @@ arm_elf_create_output_section_statements
27534 target2_type, fix_v4bx, use_blx,
27535 vfp11_denorm_fix, no_enum_size_warning,
27536 no_wchar_size_warning,
27538 + pic_veneer, fix_janus_2cc, fix_cortex_a8);
27540 stub_file = lang_add_input_file ("linker stubs",
27541 lang_input_file_is_fake_enum,
27542 @@ -461,6 +486,10 @@ arm_elf_create_output_section_statements
27544 stub_file->the_bfd->flags |= BFD_LINKER_CREATED;
27545 ldlang_add_file (stub_file);
27547 + /* Also use the stub file for stubs placed in a single output section. */
27548 + bfd_elf32_arm_add_glue_sections_to_bfd (stub_file->the_bfd, &link_info);
27549 + bfd_elf32_arm_get_bfd_for_interworking (stub_file->the_bfd, &link_info);
27552 /* Avoid processing the fake stub_file in vercheck, stat_needed and
27553 @@ -500,8 +529,11 @@ PARSE_AND_LIST_PROLOGUE='
27554 #define OPTION_NO_ENUM_SIZE_WARNING 309
27555 #define OPTION_PIC_VENEER 310
27556 #define OPTION_FIX_V4BX_INTERWORKING 311
27557 -#define OPTION_STUBGROUP_SIZE 312
27558 +#define OPTION_STUBGROUP_SIZE 312
27559 #define OPTION_NO_WCHAR_SIZE_WARNING 313
27560 +#define OPTION_FIX_JANUS_2CC 314
27561 +#define OPTION_FIX_CORTEX_A8 315
27562 +#define OPTION_NO_FIX_CORTEX_A8 316
27565 PARSE_AND_LIST_SHORTOPTS=p
27566 @@ -521,6 +553,9 @@ PARSE_AND_LIST_LONGOPTS='
27567 { "pic-veneer", no_argument, NULL, OPTION_PIC_VENEER},
27568 { "stub-group-size", required_argument, NULL, OPTION_STUBGROUP_SIZE },
27569 { "no-wchar-size-warning", no_argument, NULL, OPTION_NO_WCHAR_SIZE_WARNING},
27570 + { "fix-janus-2cc", no_argument, NULL, OPTION_FIX_JANUS_2CC},
27571 + { "fix-cortex-a8", no_argument, NULL, OPTION_FIX_CORTEX_A8},
27572 + { "no-fix-cortex-a8", no_argument, NULL, OPTION_NO_FIX_CORTEX_A8},
27575 PARSE_AND_LIST_OPTIONS='
27576 @@ -541,12 +576,14 @@ PARSE_AND_LIST_OPTIONS='
27577 fprintf (file, _("\
27578 --stub-group-size=N Maximum size of a group of input sections that can be\n\
27579 handled by one stub section. A negative value\n\
27580 - locates all stubs before their branches (with a\n\
27581 + locates all stubs after their branches (with a\n\
27582 group size of -N), while a positive value allows\n\
27583 two groups of input sections, one before, and one\n\
27584 after each stub section. Values of +/-1 indicate\n\
27585 the linker should choose suitable defaults.\n"
27587 + fprintf (file, _(" --fix-janus-2cc Enable Janus 2CC erratum fix\n"));
27588 + fprintf (file, _(" --[no-]fix-cortex-a8 Disable/enable Cortex-A8 Thumb-2 branch erratum fix\n"));
27591 PARSE_AND_LIST_ARGS_CASES='
27592 @@ -618,11 +655,22 @@ PARSE_AND_LIST_ARGS_CASES='
27593 einfo (_("%P%F: invalid number `%s'\''\n"), optarg);
27597 + case OPTION_FIX_JANUS_2CC:
27598 + fix_janus_2cc = 1;
27601 + case OPTION_FIX_CORTEX_A8:
27602 + fix_cortex_a8 = 1;
27605 + case OPTION_NO_FIX_CORTEX_A8:
27606 + fix_cortex_a8 = 0;
27610 -# We have our own after_open and before_allocation functions, but they call
27611 +# We have our own before_allocation etc. functions, but they call
27612 # the standard routines, so give them a different name.
27613 -LDEMUL_AFTER_OPEN=arm_elf_after_open
27614 LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
27615 LDEMUL_AFTER_ALLOCATION=arm_elf_after_allocation
27616 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
27617 --- a/ld/emultempl/m68kelf.em
27618 +++ b/ld/emultempl/m68kelf.em
27619 @@ -33,10 +33,7 @@ esac
27623 -# Don't use multi-GOT by default due to glibc linker's assumption
27624 -# that GOT pointer points to GOT[0].
27625 -# got_handling_target_default=GOT_HANDLING_MULTIGOT
27626 - got_handling_target_default=GOT_HANDLING_SINGLE
27627 + got_handling_target_default=GOT_HANDLING_MULTIGOT
27630 got_handling_target_default=GOT_HANDLING_SINGLE
27632 +++ b/ld/emultempl/octeonelf.em
27634 +# This shell script emits a C file. -*- C -*-
27635 +# Copyright (C) 2007 Cavium Networks.
27637 +# This file is part of GLD, the Gnu Linker.
27639 +# This program is free software; you can redistribute it and/or modify
27640 +# it under the terms of the GNU General Public License as published by
27641 +# the Free Software Foundation; either version 2 of the License, or
27642 +# (at your option) any later version.
27644 +# This program is distributed in the hope that it will be useful,
27645 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
27646 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27647 +# GNU General Public License for more details.
27649 +# You should have received a copy of the GNU General Public License
27650 +# along with this program; if not, write to the Free Software
27651 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
27654 +# This file is sourced from elf32.em and used to define OCTEON and ELF
27655 +# specific things.
27657 +source_em ${srcdir}/emultempl/mipself.em
27662 +elfocteon_before_parse (void)
27664 + gld${EMULATION_NAME}_before_parse ();
27666 + /* To be able to directly map file blocks to memory blocks, demand paging
27667 + requires addresses and file offsets to be equal modulo the page size
27668 + (64K). We also want segment virtual addresses to be 32M aligned which
27669 + would require extensive padding in the file up to pagesize. Instead
27670 + disable demand paging which is not used on our embedded target. */
27671 + config.magic_demand_paged = FALSE;
27675 +LDEMUL_BEFORE_PARSE=elfocteon_before_parse
27678 @@ -177,6 +177,14 @@ typedef struct {
27680 bfd_boolean accept_unknown_input_arch;
27682 + /* If TRUE (the default) warn for uses of system directories when
27683 + cross linking. */
27684 + bfd_boolean poison_system_directories;
27686 + /* If TRUE (default FALSE) give an error for uses of system
27687 + directories when cross linking instead of a warning. */
27688 + bfd_boolean error_poison_system_directories;
27690 /* Big or little endian as set on command line. */
27691 enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
27693 --- a/ld/ld.texinfo
27694 +++ b/ld/ld.texinfo
27695 @@ -335,11 +335,20 @@ prefixed by @samp{-Wl,} (or whatever is
27696 compiler driver) like this:
27699 - gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
27700 + gcc -Wl,--start-group foo.o bar.o -Wl,--end-group
27703 This is important, because otherwise the compiler driver program may
27704 -silently drop the linker options, resulting in a bad link.
27705 +silently drop the linker options, resulting in a bad link. Confusion
27706 +may also arise when passing options that require values through a
27707 +driver, as the use of a space between option and argument acts as
27708 +a separator, and causes the driver to pass only the option to the linker
27709 +and the argument to the compiler. In this case, it is simplest to use
27710 +the joined forms of both single- and multiple-letter options, such as:
27713 + gcc foo.o bar.o -Wl,-eENTRY -Wl,-Map=a.map
27716 Here is a table of the generic command line switches accepted by the GNU
27718 @@ -347,8 +356,8 @@ linker:
27720 @include at-file.texi
27722 -@kindex -a@var{keyword}
27723 -@item -a@var{keyword}
27724 +@kindex -a @var{keyword}
27725 +@item -a @var{keyword}
27726 This option is supported for HP/UX compatibility. The @var{keyword}
27727 argument must be one of the strings @samp{archive}, @samp{shared}, or
27728 @samp{default}. @samp{-aarchive} is functionally equivalent to
27729 @@ -357,8 +366,8 @@ to @samp{-Bdynamic}. This option may be
27732 @cindex architectures
27733 -@kindex -A@var{arch}
27734 -@item -A@var{architecture}
27735 +@kindex -A @var{arch}
27736 +@item -A @var{architecture}
27737 @kindex --architecture=@var{arch}
27738 @itemx --architecture=@var{architecture}
27739 In the current release of @command{ld}, this option is useful only for the
27740 @@ -514,10 +523,10 @@ Link big-endian objects. This affects t
27741 Link little-endian objects. This affects the default output format.
27745 -@kindex --auxiliary
27747 -@itemx --auxiliary @var{name}
27748 +@kindex -f @var{name}
27749 +@kindex --auxiliary=@var{name}
27750 +@item -f @var{name}
27751 +@itemx --auxiliary=@var{name}
27752 When creating an ELF shared object, set the internal DT_AUXILIARY field
27753 to the specified name. This tells the dynamic linker that the symbol
27754 table of the shared object should be used as an auxiliary filter on the
27755 @@ -536,10 +545,10 @@ machine specific performance.
27756 This option may be specified more than once. The DT_AUXILIARY entries
27757 will be created in the order in which they appear on the command line.
27761 +@kindex -F @var{name}
27762 +@kindex --filter=@var{name}
27763 @item -F @var{name}
27764 -@itemx --filter @var{name}
27765 +@itemx --filter=@var{name}
27766 When creating an ELF shared object, set the internal DT_FILTER field to
27767 the specified name. This tells the dynamic linker that the symbol table
27768 of the shared object which is being created should be used as a filter
27769 @@ -566,8 +575,8 @@ The @sc{gnu} linker will ignore the @opt
27770 creating an ELF shared object.
27772 @cindex finalization function
27774 -@item -fini @var{name}
27775 +@kindex -fini=@var{name}
27776 +@item -fini=@var{name}
27777 When creating an ELF executable or shared object, call NAME when the
27778 executable or shared object is unloaded, by setting DT_FINI to the
27779 address of the function. By default, the linker uses @code{_fini} as
27780 @@ -577,10 +586,10 @@ the function to call.
27782 Ignored. Provided for compatibility with other tools.
27786 +@kindex -G @var{value}
27787 +@kindex --gpsize=@var{value}
27788 @cindex object size
27789 -@item -G@var{value}
27790 +@item -G @var{value}
27791 @itemx --gpsize=@var{value}
27792 Set the maximum size of objects to be optimized using the GP register to
27793 @var{size}. This is only meaningful for object file formats such as
27794 @@ -588,9 +597,9 @@ MIPS ECOFF which supports putting large
27795 sections. This is ignored for other object file formats.
27797 @cindex runtime library name
27798 -@kindex -h@var{name}
27799 +@kindex -h @var{name}
27800 @kindex -soname=@var{name}
27801 -@item -h@var{name}
27802 +@item -h @var{name}
27803 @itemx -soname=@var{name}
27804 When creating an ELF shared object, set the internal DT_SONAME field to
27805 the specified name. When an executable is linked with a shared object
27806 @@ -604,17 +613,17 @@ field rather than the using the file nam
27807 Perform an incremental link (same as option @samp{-r}).
27809 @cindex initialization function
27811 -@item -init @var{name}
27812 +@kindex -init=@var{name}
27813 +@item -init=@var{name}
27814 When creating an ELF executable or shared object, call NAME when the
27815 executable or shared object is loaded, by setting DT_INIT to the address
27816 of the function. By default, the linker uses @code{_init} as the
27819 @cindex archive files, from cmd line
27820 -@kindex -l@var{namespec}
27821 +@kindex -l @var{namespec}
27822 @kindex --library=@var{namespec}
27823 -@item -l@var{namespec}
27824 +@item -l @var{namespec}
27825 @itemx --library=@var{namespec}
27826 Add the archive or object file specified by @var{namespec} to the
27827 list of files to link. This option may be used any number of times.
27828 @@ -650,9 +659,9 @@ behaviour of the AIX linker.
27831 @cindex search directory, from cmd line
27832 -@kindex -L@var{dir}
27833 +@kindex -L @var{dir}
27834 @kindex --library-path=@var{dir}
27835 -@item -L@var{searchdir}
27836 +@item -L @var{searchdir}
27837 @itemx --library-path=@var{searchdir}
27838 Add path @var{searchdir} to the list of paths that @command{ld} will search
27839 for archive libraries and @command{ld} control scripts. You may use this
27840 @@ -660,7 +669,9 @@ option any number of times. The directo
27841 in which they are specified on the command line. Directories specified
27842 on the command line are searched before the default directories. All
27843 @option{-L} options apply to all @option{-l} options, regardless of the
27844 -order in which the options appear.
27845 +order in which the options appear. @option{-L} options do not affect
27846 +how @command{ld} searches for a linker script unless @option{-T}
27847 +option is specified.
27849 If @var{searchdir} begins with @code{=}, then the @code{=} will be replaced
27850 by the @dfn{sysroot prefix}, a path specified when the linker is configured.
27851 @@ -677,7 +688,7 @@ at the point in which the linker script
27854 @kindex -m @var{emulation}
27855 -@item -m@var{emulation}
27856 +@item -m @var{emulation}
27857 Emulate the @var{emulation} linker. You can list the available
27858 emulations with the @samp{--verbose} or @samp{-V} options.
27860 @@ -1244,8 +1255,8 @@ duplicate when there are many dynamic mo
27861 paths for runtime symbol resolution.
27863 @cindex symbols, from command line
27864 -@kindex --defsym @var{symbol}=@var{exp}
27865 -@item --defsym @var{symbol}=@var{expression}
27866 +@kindex --defsym=@var{symbol}=@var{exp}
27867 +@item --defsym=@var{symbol}=@var{expression}
27868 Create a global symbol in the output file, containing the absolute
27869 address given by @var{expression}. You may use this option as many
27870 times as necessary to define multiple symbols in the command line. A
27871 @@ -1275,8 +1286,9 @@ is set. These options may be used to ov
27873 @cindex dynamic linker, from command line
27874 @kindex -I@var{file}
27875 -@kindex --dynamic-linker @var{file}
27876 -@item --dynamic-linker @var{file}
27877 +@kindex --dynamic-linker=@var{file}
27878 +@item -I@var{file}
27879 +@itemx --dynamic-linker=@var{file}
27880 Set the name of the dynamic linker. This is only meaningful when
27881 generating dynamically linked ELF executables. The default dynamic
27882 linker is normally correct; don't use this unless you know what you are
27883 @@ -1347,8 +1359,8 @@ Print a summary of the command-line opti
27884 @item --target-help
27885 Print a summary of all target specific options on the standard output and exit.
27888 -@item -Map @var{mapfile}
27889 +@kindex -Map=@var{mapfile}
27890 +@item -Map=@var{mapfile}
27891 Print a link map to the file @var{mapfile}. See the description of the
27892 @option{-M} option, above.
27894 @@ -1463,8 +1475,8 @@ command line. Library directories speci
27895 (including linker scripts specified on the command line) are ignored.
27897 @ifclear SingleFormat
27899 -@item --oformat @var{output-format}
27900 +@kindex --oformat=@var{output-format}
27901 +@item --oformat=@var{output-format}
27902 @command{ld} may be configured to support more than one kind of object
27903 file. If your @command{ld} is configured this way, you can use the
27904 @samp{--oformat} option to specify the binary format for the output
27905 @@ -1542,7 +1554,8 @@ but ignored.
27906 @cindex retaining specified symbols
27907 @cindex stripping all but some symbols
27908 @cindex symbols, retaining selectively
27909 -@item --retain-symbols-file @var{filename}
27910 +@kindex --retain-symbols-file=@var{filename}
27911 +@item --retain-symbols-file=@var{filename}
27912 Retain @emph{only} the symbols listed in the file @var{filename},
27913 discarding all others. @var{filename} is simply a flat file, with one
27914 symbol name per line. This option is especially useful in environments
27915 @@ -1559,9 +1572,9 @@ You may only specify @samp{--retain-symb
27916 line. It overrides @samp{-s} and @samp{-S}.
27919 -@item -rpath @var{dir}
27920 +@item -rpath=@var{dir}
27921 @cindex runtime library search path
27923 +@kindex -rpath=@var{dir}
27924 Add a directory to the runtime library search path. This is used when
27925 linking an ELF executable with shared objects. All @option{-rpath}
27926 arguments are concatenated and passed to the runtime linker, which uses
27927 @@ -1587,8 +1600,8 @@ the @option{-rpath} option.
27930 @cindex link-time runtime library search path
27931 -@kindex -rpath-link
27932 -@item -rpath-link @var{DIR}
27933 +@kindex -rpath-link=@var{dir}
27934 +@item -rpath-link=@var{dir}
27935 When using ELF or SunOS, one shared library may require another. This
27936 happens when an @code{ld -shared} link includes a shared library as one
27937 of the input files.
27938 @@ -1656,8 +1669,10 @@ and SunOS platforms. On SunOS, the link
27939 shared library if the @option{-e} option is not used and there are
27940 undefined symbols in the link.
27942 -@item --sort-common [= ascending | descending]
27943 @kindex --sort-common
27944 +@item --sort-common
27945 +@itemx --sort-common=ascending
27946 +@itemx --sort-common=descending
27947 This option tells @command{ld} to sort the common symbols by alignment in
27948 ascending or descending order when it places them in the appropriate output
27949 sections. The symbol alignments considered are sixteen-byte or larger,
27950 @@ -1665,24 +1680,24 @@ eight-byte, four-byte, two-byte, and one
27951 between symbols due to alignment constraints. If no sorting order is
27952 specified, then descending order is assumed.
27954 -@kindex --sort-section name
27955 -@item --sort-section name
27956 +@kindex --sort-section=name
27957 +@item --sort-section=name
27958 This option will apply @code{SORT_BY_NAME} to all wildcard section
27959 patterns in the linker script.
27961 -@kindex --sort-section alignment
27962 -@item --sort-section alignment
27963 +@kindex --sort-section=alignment
27964 +@item --sort-section=alignment
27965 This option will apply @code{SORT_BY_ALIGNMENT} to all wildcard section
27966 patterns in the linker script.
27968 @kindex --split-by-file
27969 -@item --split-by-file [@var{size}]
27970 +@item --split-by-file[=@var{size}]
27971 Similar to @option{--split-by-reloc} but creates a new output section for
27972 each input file when @var{size} is reached. @var{size} defaults to a
27973 size of 1 if not given.
27975 @kindex --split-by-reloc
27976 -@item --split-by-reloc [@var{count}]
27977 +@item --split-by-reloc[=@var{count}]
27978 Tries to creates extra sections in the output file so that no single
27979 output section in the file contains more than @var{count} relocations.
27980 This is useful when generating huge relocatable files for downloading into
27981 @@ -1699,7 +1714,7 @@ many relocations. @var{count} defaults
27982 Compute and display statistics about the operation of the linker, such
27983 as execution time and memory usage.
27986 +@kindex --sysroot=@var{directory}
27987 @item --sysroot=@var{directory}
27988 Use @var{directory} as the location of the sysroot, overriding the
27989 configure-time default. This option is only supported by linkers
27990 @@ -1720,8 +1735,8 @@ full debugging information by over 30 pe
27991 trouble). The @samp{--traditional-format} switch tells @command{ld} to not
27992 combine duplicate entries.
27994 -@kindex --section-start @var{sectionname}=@var{org}
27995 -@item --section-start @var{sectionname}=@var{org}
27996 +@kindex --section-start=@var{sectionname}=@var{org}
27997 +@item --section-start=@var{sectionname}=@var{org}
27998 Locate a section in the output file at the absolute
27999 address given by @var{org}. You may use this option as many
28000 times as necessary to locate multiple sections in the command
28001 @@ -1732,18 +1747,18 @@ for compatibility with other linkers, yo
28002 should be no white space between @var{sectionname}, the equals
28003 sign (``@key{=}''), and @var{org}.
28005 -@kindex -Tbss @var{org}
28006 -@kindex -Tdata @var{org}
28007 -@kindex -Ttext @var{org}
28008 +@kindex -Tbss=@var{org}
28009 +@kindex -Tdata=@var{org}
28010 +@kindex -Ttext=@var{org}
28011 @cindex segment origins, cmd line
28012 -@item -Tbss @var{org}
28013 -@itemx -Tdata @var{org}
28014 -@itemx -Ttext @var{org}
28015 -Same as --section-start, with @code{.bss}, @code{.data} or
28016 +@item -Tbss=@var{org}
28017 +@itemx -Tdata=@var{org}
28018 +@itemx -Ttext=@var{org}
28019 +Same as @option{--section-start}, with @code{.bss}, @code{.data} or
28020 @code{.text} as the @var{sectionname}.
28022 -@kindex -Ttext-segment @var{org}
28023 -@itemx -Ttext-segment @var{org}
28024 +@kindex -Ttext-segment=@var{org}
28025 +@item -Ttext-segment=@var{org}
28026 @cindex text segment origin, cmd line
28027 When creating an ELF executable or shared object, it will set the address
28028 of the first byte of the text segment.
28029 @@ -1789,7 +1804,7 @@ the linker script being used by the link
28031 @kindex --version-script=@var{version-scriptfile}
28032 @cindex version script, symbol versions
28033 -@itemx --version-script=@var{version-scriptfile}
28034 +@item --version-script=@var{version-scriptfile}
28035 Specify the name of a version script to the linker. This is typically
28036 used when creating shared libraries to specify additional information
28037 about the version hierarchy for the library being created. This option
28038 @@ -1949,8 +1964,8 @@ Second, don't forget to use @option{-Wl,
28039 list of archives, because gcc will add its own list of archives to
28040 your link and you may not want this flag to affect those as well.
28043 -@item --wrap @var{symbol}
28044 +@kindex --wrap=@var{symbol}
28045 +@item --wrap=@var{symbol}
28046 Use a wrapper function for @var{symbol}. Any undefined reference to
28047 @var{symbol} will be resolved to @code{__wrap_@var{symbol}}. Any
28048 undefined reference to @code{__real_@var{symbol}} will be resolved to
28049 @@ -2054,6 +2069,18 @@ string identifying the original linked f
28051 Passing @code{none} for @var{style} disables the setting from any
28052 @code{--build-id} options earlier on the command line.
28054 +@kindex --no-poison-system-directories
28055 +@item --no-poison-system-directories
28056 +Do not warn for @option{-L} options using system directories such as
28057 +@file{/usr/lib} when cross linking. This option is intended for use
28058 +in chroot environments when such directories contain the correct
28059 +libraries for the target system rather than the host.
28061 +@kindex --error-poison-system-directories
28062 +@item --error-poison-system-directories
28063 +Give an error instead of a warning for @option{-L} options using
28064 +system directories when cross linking.
28068 @@ -5743,12 +5770,12 @@ intervening instructions if vector mode
28069 full-compliance floating-point mode: you do not need this workaround if
28070 you are using "runfast" mode. Please contact ARM for further details.
28072 -If you know you are using buggy VFP11 hardware, you can
28073 -enable this workaround by specifying the linker option
28074 -@samp{--vfp-denorm-fix=scalar} if you are using the VFP11 scalar
28075 -mode only, or @samp{--vfp-denorm-fix=vector} if you are using
28076 -vector mode (the latter also works for scalar code). The default is
28077 -@samp{--vfp-denorm-fix=none}.
28078 +This workaround is enabled for scalar code by default for
28079 +pre-ARMv7 architectures, but disabled by default for later
28080 +architectures. If you know you are not using buggy VFP11 hardware,
28081 +you can disable the workaround by specifying the linker option
28082 +@samp{--vfp-denorm-fix=none}. If you are using VFP vector mode, you
28083 +should specify @samp{--vfp-denorm-fix=vector}.
28085 If the workaround is enabled, instructions are scanned for
28086 potentially-troublesome sequences, and a veneer is created for each
28087 @@ -5797,7 +5824,7 @@ where they should be placed.
28089 The value of @samp{N}, the parameter to the
28090 @option{--stub-group-size=} option controls where the stub groups are
28091 -placed. If it is negative then all stubs are placed before the first
28092 +placed. If it is negative then all stubs are placed after the first
28093 branch that needs them. If it is positive then the stubs can be
28094 placed either before or after the branches that need them. If the
28095 value of @samp{N} is 1 (either +1 or -1) then the linker will choose
28096 @@ -5813,6 +5840,30 @@ Farcalls stubs insertion is fully suppor
28097 only, because it relies on object files properties not present
28100 +@cindex FIX_JANUS_2CC
28101 +@kindex --fix-janus-2cc
28102 +The @samp{--fix-janus-2cc} switch enables a link-time workaround for
28103 +an erratum in an early Janus 2CC chip revision, concerning ALU
28104 +operations using register-specified shifter operands. If you enable
28105 +this option, the executable code of the linked program is scanned for
28106 +problematic code sequences. For most cases in code using the ARM
28107 +instruction set, the linker inserts code veneers to correct the
28108 +problem automatically. If problematic sequences are detected in Thumb
28109 +code, or if any unfixable ARM instructions are encountered, an error
28110 +message is emitted to signal that code must be rewritten manually to
28111 +avoid the erratum.
28113 +This option should only be used when targeting the ARMv4t architecture.
28114 +Do not use it unless you know your target CPU suffers from the erratum
28117 +@cindex Cortex-A8 erratum workaround
28118 +@kindex --fix-cortex-a8
28119 +@kindex --no-fix-cortex-a8
28120 +The @samp{--fix-cortex-a8} switch enables a link-time workaround for an erratum in certain Cortex-A8 processors. The workaround is enabled by default if you are targeting the ARM v7-A architecture profile. It can be enabled otherwise by specifying @samp{--fix-cortex-a8}, or disabled unconditionally by specifying @samp{--no-fix-cortex-a8}.
28122 +The erratum only affects Thumb-2 code. Please contact ARM for further details.
28129 @@ -815,6 +815,20 @@ exp_fold_tree_1 (etree_type *tree)
28130 h->u.def.section = expld.result.section;
28131 if (tree->type.node_class == etree_provide)
28132 tree->type.node_class = etree_provided;
28134 + /* Copy the symbol type if this is a simple assignment of
28135 + one symbol to annother. */
28136 + if (tree->assign.src->type.node_class == etree_name)
28138 + struct bfd_link_hash_entry *hsrc;
28140 + hsrc = bfd_link_hash_lookup (link_info.hash,
28141 + tree->assign.src->name.name,
28142 + FALSE, FALSE, TRUE);
28144 + bfd_copy_link_hash_symbol_type (link_info.output_bfd, h,
28152 @@ -120,6 +120,22 @@ ldfile_add_library_path (const char *nam
28154 new->name = xstrdup (name);
28155 new->sysrooted = is_sysrooted_pathname (name, FALSE);
28157 +#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
28158 + if (command_line.poison_system_directories
28159 + && ((!strncmp (name, "/lib", 4))
28160 + || (!strncmp (name, "/usr/lib", 8))
28161 + || (!strncmp (name, "/usr/local/lib", 14))
28162 + || (!strncmp (name, "/usr/X11R6/lib", 14))))
28164 + if (command_line.error_poison_system_directories)
28165 + einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
28166 + "cross-compilation\n"), name);
28168 + einfo (_("%P: warning: library search path \"%s\" is unsafe for "
28169 + "cross-compilation\n"), name);
28175 @@ -542,22 +558,27 @@ find_scripts_dir (void)
28179 -/* Try to open NAME; if that fails, look for it in the default script
28180 - directory, then in any directories specified with -L, without and
28181 - with EXTEND appended. */
28182 +/* If DEFAULT_ONLY is false, try to open NAME; if that fails, look for
28183 + it in directories specified with -L, then in the default script
28184 + directory, without and with EXTEND appended. If DEFAULT_ONLY is
28185 + true, the search is restricted to the default script location. */
28188 -ldfile_find_command_file (const char *name, const char *extend)
28189 +ldfile_find_command_file (const char *name, const char *extend,
28190 + bfd_boolean default_only)
28192 search_dirs_type *search;
28194 + FILE *result = NULL;
28196 static search_dirs_type *script_search;
28198 - /* First try raw name. */
28199 - result = try_open (name, "");
28200 - if (result != NULL)
28202 + if (!default_only)
28204 + /* First try raw name. */
28205 + result = try_open (name, "");
28206 + if (result != NULL)
28210 if (!script_search)
28212 @@ -569,16 +590,17 @@ ldfile_find_command_file (const char *na
28213 ldfile_add_library_path (script_dir, TRUE);
28214 search_tail_ptr = save_tail_ptr;
28216 - if (!script_search)
28217 - script_search = search_head;
28219 - script_search->next = search_head;
28222 + /* Temporarily append script_search to the path list so that the
28223 + paths specified with -L will be searched first. */
28224 + *search_tail_ptr = script_search;
28226 /* Try now prefixes. */
28227 - for (search = script_search; search != NULL; search = search->next)
28228 + for (search = default_only ? script_search : search_head;
28230 + search = search->next)
28233 buffer = concat (search->name, slash, name, (const char *) NULL);
28234 result = try_open (buffer, extend);
28236 @@ -586,14 +608,19 @@ ldfile_find_command_file (const char *na
28240 + /* Restore the original path list. */
28241 + *search_tail_ptr = NULL;
28247 -ldfile_open_command_file (const char *name)
28248 +/* Open command file NAME. */
28251 +ldfile_open_command_file_1 (const char *name, bfd_boolean default_only)
28253 FILE *ldlex_input_stack;
28254 - ldlex_input_stack = ldfile_find_command_file (name, "");
28255 + ldlex_input_stack = ldfile_find_command_file (name, "", default_only);
28257 if (ldlex_input_stack == NULL)
28259 @@ -609,6 +636,23 @@ ldfile_open_command_file (const char *na
28260 saved_script_handle = ldlex_input_stack;
28263 +/* Open command file NAME in the current directory, -L directories,
28264 + the default script location, in that order. */
28267 +ldfile_open_command_file (const char *name)
28269 + ldfile_open_command_file_1 (name, FALSE);
28272 +/* Open command file NAME at the default script location. */
28275 +ldfile_open_default_command_file (const char *name)
28277 + ldfile_open_command_file_1 (name, TRUE);
28281 ldfile_add_arch (const char *in_name)
28285 @@ -50,6 +50,8 @@ extern void ldfile_add_library_path
28286 (const char *, bfd_boolean cmdline);
28287 extern void ldfile_open_command_file
28288 (const char *name);
28289 +extern void ldfile_open_default_command_file
28290 + (const char *name);
28291 extern void ldfile_open_file
28292 (struct lang_input_statement_struct *);
28293 extern bfd_boolean ldfile_try_open_bfd
28297 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
28298 MA 02110-1301, USA. */
28300 +#include "config.h"
28302 #include <limits.h>
28304 #include "sysdep.h"
28305 @@ -6467,6 +6469,15 @@ lang_leave_output_section_statement (fil
28306 memspec, lma_memspec,
28307 current_section->load_base != NULL,
28308 current_section->addr_tree != NULL);
28310 + /* If this section has no load region or base, but has the same
28311 + region as the previous section, then propagate the previous
28312 + section's load region. */
28314 + if (!current_section->lma_region && !current_section->load_base
28315 + && current_section->region == current_section->prev->region)
28316 + current_section->lma_region = current_section->prev->lma_region;
28318 current_section->fill = fill;
28319 current_section->phdrs = phdrs;
28320 stat_ptr = &statement_list;
28323 @@ -252,6 +252,8 @@ main (int argc, char **argv)
28324 command_line.warn_mismatch = TRUE;
28325 command_line.warn_search_mismatch = TRUE;
28326 command_line.check_section_addresses = -1;
28327 + command_line.poison_system_directories = TRUE;
28328 + command_line.error_poison_system_directories = FALSE;
28330 /* We initialize DEMANGLING based on the environment variable
28331 COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
28332 @@ -376,7 +378,7 @@ main (int argc, char **argv)
28333 char *s = ldemul_get_script (&isfile);
28336 - ldfile_open_command_file (s);
28337 + ldfile_open_default_command_file (s);
28343 @@ -164,7 +164,9 @@ enum option_values
28344 OPTION_ERROR_UNRESOLVED_SYMBOLS,
28345 OPTION_WARN_SHARED_TEXTREL,
28346 OPTION_REDUCE_MEMORY_OVERHEADS,
28347 - OPTION_DEFAULT_SCRIPT
28348 + OPTION_DEFAULT_SCRIPT,
28349 + OPTION_NO_POISON_SYSTEM_DIRECTORIES,
28350 + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES
28353 /* The long options. This structure is used for both the option
28354 @@ -566,6 +568,14 @@ static const struct ld_option ld_options
28356 { {"wrap", required_argument, NULL, OPTION_WRAP},
28357 '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
28358 + { {"no-poison-system-directories", no_argument, NULL,
28359 + OPTION_NO_POISON_SYSTEM_DIRECTORIES},
28360 + '\0', NULL, N_("Do not warn for -L options using system directories"),
28362 + { {"error-poison-system-directories", no_argument, NULL,
28363 + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
28364 + '\0', NULL, N_("Give an error for -L options using system directories"),
28368 #define OPTION_COUNT ARRAY_SIZE (ld_options)
28369 @@ -1462,6 +1472,14 @@ parse_args (unsigned argc, char **argv)
28370 einfo (_("%P%X: --hash-size needs a numeric argument\n"));
28374 + case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
28375 + command_line.poison_system_directories = FALSE;
28378 + case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
28379 + command_line.error_poison_system_directories = TRUE;
28384 --- a/ld/scripttempl/elf.sc
28385 +++ b/ld/scripttempl/elf.sc
28386 @@ -174,6 +174,9 @@ if test -z "${SDATA_GOT}"; then
28390 +if test -n "${DATA_GOT+set}"; then
28393 test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
28394 test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
28395 .rel.ldata ${RELOCATING-0} : { *(.rel.ldata${RELOCATING+ .rel.ldata.* .rel.gnu.linkonce.l.*}) }
28396 @@ -451,11 +454,11 @@ cat <<EOF
28397 ${OTHER_RELRO_SECTIONS}
28398 ${TEXT_DYNAMIC-${DYNAMIC}}
28399 ${DATA_GOT+${RELRO_NOW+${GOT}}}
28400 - ${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
28401 + ${DATA_GOTPLT+${RELRO_NOW+${GOTPLT}}}
28402 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
28403 ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
28404 ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
28405 - ${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
28406 + ${DATA_GOTPLT+${RELRO_NOW-${GOTPLT}}}
28408 ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
28410 @@ -500,6 +503,7 @@ cat <<EOF
28411 ${RELOCATING+. = ALIGN(${ALIGNMENT});}
28412 ${RELOCATING+${OTHER_END_SYMBOLS}}
28413 ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
28414 + ${RELOCATING+${OCTEON_SPECIAL_SECTIONS}}
28415 ${RELOCATING+${DATA_SEGMENT_END}}
28418 --- a/ld/testsuite/ChangeLog
28419 +++ b/ld/testsuite/ChangeLog
28421 -2009-02-05 Joseph Myers <joseph@codesourcery.com>
28423 - * ld-arm/arm-elf.exp (armeabitests): Restore thumb2-b-interwork.
28425 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
28427 * ld-m68k/got-multigot-12-13-14-34-35-ok.d: Update.
28428 --- a/ld/testsuite/ld-arm/arm-elf.exp
28429 +++ b/ld/testsuite/ld-arm/arm-elf.exp
28430 @@ -161,6 +161,50 @@ set armelftests {
28431 "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
28432 {{objdump -dr vfp11-fix-none.d}}
28434 + {"Cortex-A8 erratum fix, b.w"
28435 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s}
28436 + {{objdump -dr cortex-a8-fix-b.d}}
28437 + "cortex-a8-fix-b"}
28438 + {"Cortex-A8 erratum fix, bl.w"
28439 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s}
28440 + {{objdump -dr cortex-a8-fix-bl.d}}
28441 + "cortex-a8-fix-bl"}
28442 + {"Cortex-A8 erratum fix, bcc.w"
28443 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s}
28444 + {{objdump -dr cortex-a8-fix-bcc.d}}
28445 + "cortex-a8-fix-bcc"}
28446 + {"Cortex-A8 erratum fix, blx.w"
28447 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s}
28448 + {{objdump -dr cortex-a8-fix-blx.d}}
28449 + "cortex-a8-fix-blx"}
28450 + {"Cortex-A8 erratum fix, relocate b.w to ARM"
28451 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
28452 + {{objdump -dr cortex-a8-fix-b-rel-arm.d}}
28453 + "cortex-a8-fix-b-rel-arm"}
28454 + {"Cortex-A8 erratum fix, relocate b.w to Thumb"
28455 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
28456 + {{objdump -dr cortex-a8-fix-b-rel-thumb.d}}
28457 + "cortex-a8-fix-b-rel-thumb"}
28458 + {"Cortex-A8 erratum fix, relocate bl.w to ARM"
28459 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
28460 + {{objdump -dr cortex-a8-fix-bl-rel-arm.d}}
28461 + "cortex-a8-fix-bl-rel-arm"}
28462 + {"Cortex-A8 erratum fix, relocate bl.w to Thumb"
28463 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
28464 + {{objdump -dr cortex-a8-fix-bl-rel-thumb.d}}
28465 + "cortex-a8-fix-bl-rel-thumb"}
28466 + {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
28467 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
28468 + {{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}}
28469 + "cortex-a8-fix-bcc-rel-thumb"}
28470 + {"Cortex-A8 erratum fix, relocate blx.w to ARM"
28471 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
28472 + {{objdump -dr cortex-a8-fix-blx-rel-arm.d}}
28473 + "cortex-a8-fix-blx-rel-arm"}
28474 + {"Cortex-A8 erratum fix, relocate blx.w to Thumb"
28475 + "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
28476 + {{objdump -dr cortex-a8-fix-blx-rel-thumb.d}}
28477 + "cortex-a8-fix-blx-rel-thumb"}
28478 {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
28479 {{objdump -sj.data gc-unwind.d}}
28481 @@ -174,6 +218,9 @@ set armelftests {
28482 {"jump19" "-static -T arm.ld" "" {jump19.s}
28483 {{objdump -dr jump19.d}}
28485 + {"script-type" "-static -T script-type.ld" "" {script-type.s}
28486 + {{readelf -s script-type.sym}}
28488 {"callweak" "-static -T arm.ld" "" {callweak.s}
28489 {{objdump -dr callweak.d}}
28491 @@ -190,10 +237,20 @@ run_dump_test "emit-relocs1"
28492 # Exclude non-ARM-EABI targets.
28494 if { ![istarget "arm*-*-*eabi"] } {
28495 - # Special variants of these tests, as no farcall stub is generated
28496 - # for a non-ARM-EABI target
28497 - run_dump_test "thumb2-bl-as-thumb1-bad-noeabi"
28498 - run_dump_test "thumb2-bl-bad-noeabi"
28499 + # Special variants of these tests, as a different farcall stub is
28500 + # generated for a non-ARM-EABI target: indeed in such a case,
28501 + # there are no attributes to indicate that blx can be used.
28503 + set arm_noeabi_tests {
28504 + {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
28505 + {{objdump -d thumb2-bl-as-thumb1-bad-noeabi.d}}
28506 + "thumb2-bl-as-thumb1-bad"}
28507 + {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
28508 + {{objdump -d thumb2-bl-bad-noeabi.d}}
28511 + run_ld_link_tests $arm_noeabi_tests
28516 @@ -232,6 +289,9 @@ set armeabitests {
28517 {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
28518 {{objdump -dr thumb2-b-interwork.d}}
28519 "thumb2-b-interwork"}
28520 + {"BL/BLX interworking" "-T arm.ld" "" {thumb2-bl-blx-interwork.s}
28521 + {{objdump -dr thumb2-bl-blx-interwork.d}}
28522 + "thumb2-bl-blx-interwork"}
28523 {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s}
28524 {{objdump -d armv4-bx.d}}
28526 @@ -241,7 +301,7 @@ set armeabitests {
28527 {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s}
28528 {{objdump -Rw arm-app.r}}
28530 - {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x40100c" "" {thumb2-bl-as-thumb1-bad.s}
28531 + {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
28532 {{objdump -d thumb2-bl-as-thumb1-bad.d}}
28533 "thumb2-bl-as-thumb1-bad"}
28534 {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
28535 @@ -257,6 +317,9 @@ set armeabitests {
28536 {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s}
28537 {{objdump -d farcall-arm-arm-be8.d}}
28538 "farcall-arm-arm-be8"}
28539 + {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "-EB" {farcall-arm-arm.s}
28540 + {{objdump -d farcall-arm-arm.d}}
28541 + "farcall-arm-arm-be"}
28543 {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s}
28544 {{objdump -d farcall-arm-thumb.d}}
28545 @@ -277,6 +340,9 @@ set armeabitests {
28546 {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7m" {farcall-thumb-thumb.s}
28547 {{objdump -d farcall-thumb-thumb-m.d}}
28548 "farcall-thumb-thumb-m"}
28549 + {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv4t" {farcall-thumb-thumb.s}
28550 + {{objdump -d farcall-thumb-thumb.d}}
28551 + "farcall-thumb-thumb"}
28552 {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s}
28553 {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}}
28554 "farcall-thumb-thumb-blx-pic-veneer"}
28555 @@ -284,6 +350,12 @@ set armeabitests {
28556 {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s}
28557 {{objdump -d farcall-thumb-arm.d}}
28558 "farcall-thumb-arm"}
28559 + {"Thumb-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB --be8" "-W -EB" {farcall-thumb-arm.s}
28560 + {{objdump -d farcall-thumb-arm-be8.d}}
28561 + "farcall-thumb-arm-be8"}
28562 + {"Thumb-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB" "-W -EB" {farcall-thumb-arm.s}
28563 + {{objdump -d farcall-thumb-arm.d}}
28564 + "farcall-thumb-arm-be"}
28565 {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s}
28566 {{objdump -d farcall-thumb-arm-short.d}}
28567 "farcall-thumb-arm-short"}
28568 @@ -328,7 +400,6 @@ run_dump_test "attr-merge-wchar-24-nowar
28569 run_dump_test "attr-merge-wchar-40-nowarn"
28570 run_dump_test "attr-merge-wchar-42-nowarn"
28571 run_dump_test "attr-merge-wchar-44-nowarn"
28572 -run_dump_test "farcall-thumb-thumb"
28573 run_dump_test "farcall-thumb-thumb-pic-veneer"
28574 run_dump_test "farcall-thumb-thumb-m-pic-veneer"
28575 run_dump_test "farcall-thumb-arm-pic-veneer"
28576 @@ -337,3 +408,7 @@ run_dump_test "attr-merge-unknown-1"
28577 run_dump_test "attr-merge-unknown-2"
28578 run_dump_test "attr-merge-unknown-2r"
28579 run_dump_test "attr-merge-unknown-3"
28580 +run_dump_test "unwind-1"
28581 +run_dump_test "unwind-2"
28582 +run_dump_test "unwind-3"
28583 +run_dump_test "unwind-4"
28584 --- a/ld/testsuite/ld-arm/arm.ld
28585 +++ b/ld/testsuite/ld-arm/arm.ld
28586 @@ -10,9 +10,11 @@ SECTIONS
28594 + .ARM.exidx : { *(.ARM.exidx*) }
28596 .got : { *(.got) *(.got.plt)}
28599 +++ b/ld/testsuite/ld-arm/cortex-a8-arm-target.s
28607 + .type targetfn, %function
28611 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-b-rel-arm.d
28614 +.*: file format .*
28617 +Disassembly of section \.text:
28619 +00008f00 <targetfn>:
28620 + 8f00: e12fff1e bx lr
28621 + 8f04: e320f000 nop \{0\}
28623 +00008f08 <_start>:
28625 + 8f0a: eb01 0002 add\.w r0, r1, r2
28626 + 8f0e: f000 b87f b\.w 9010 <__targetfn_from_thumb>
28627 + 8f12: eb01 0002 add\.w r0, r1, r2
28628 + 8f16: f000 b87b b\.w 9010 <__targetfn_from_thumb>
28629 + 8f1a: eb01 0002 add\.w r0, r1, r2
28630 + 8f1e: f000 b877 b\.w 9010 <__targetfn_from_thumb>
28631 + 8f22: eb01 0002 add\.w r0, r1, r2
28632 + 8f26: f000 b873 b\.w 9010 <__targetfn_from_thumb>
28633 + 8f2a: eb01 0002 add\.w r0, r1, r2
28634 + 8f2e: f000 b86f b\.w 9010 <__targetfn_from_thumb>
28635 + 8f32: eb01 0002 add\.w r0, r1, r2
28636 + 8f36: f000 b86b b\.w 9010 <__targetfn_from_thumb>
28637 + 8f3a: eb01 0002 add\.w r0, r1, r2
28638 + 8f3e: f000 b867 b\.w 9010 <__targetfn_from_thumb>
28639 + 8f42: eb01 0002 add\.w r0, r1, r2
28640 + 8f46: f000 b863 b\.w 9010 <__targetfn_from_thumb>
28641 + 8f4a: eb01 0002 add\.w r0, r1, r2
28642 + 8f4e: f000 b85f b\.w 9010 <__targetfn_from_thumb>
28643 + 8f52: eb01 0002 add\.w r0, r1, r2
28644 + 8f56: f000 b85b b\.w 9010 <__targetfn_from_thumb>
28645 + 8f5a: eb01 0002 add\.w r0, r1, r2
28646 + 8f5e: f000 b857 b\.w 9010 <__targetfn_from_thumb>
28647 + 8f62: eb01 0002 add\.w r0, r1, r2
28648 + 8f66: f000 b853 b\.w 9010 <__targetfn_from_thumb>
28649 + 8f6a: eb01 0002 add\.w r0, r1, r2
28650 + 8f6e: f000 b84f b\.w 9010 <__targetfn_from_thumb>
28651 + 8f72: eb01 0002 add\.w r0, r1, r2
28652 + 8f76: f000 b84b b\.w 9010 <__targetfn_from_thumb>
28653 + 8f7a: eb01 0002 add\.w r0, r1, r2
28654 + 8f7e: f000 b847 b\.w 9010 <__targetfn_from_thumb>
28655 + 8f82: eb01 0002 add\.w r0, r1, r2
28656 + 8f86: f000 b843 b\.w 9010 <__targetfn_from_thumb>
28657 + 8f8a: eb01 0002 add\.w r0, r1, r2
28658 + 8f8e: f000 b83f b\.w 9010 <__targetfn_from_thumb>
28659 + 8f92: eb01 0002 add\.w r0, r1, r2
28660 + 8f96: f000 b83b b\.w 9010 <__targetfn_from_thumb>
28661 + 8f9a: eb01 0002 add\.w r0, r1, r2
28662 + 8f9e: f000 b837 b\.w 9010 <__targetfn_from_thumb>
28663 + 8fa2: eb01 0002 add\.w r0, r1, r2
28664 + 8fa6: f000 b833 b\.w 9010 <__targetfn_from_thumb>
28665 + 8faa: eb01 0002 add\.w r0, r1, r2
28666 + 8fae: f000 b82f b\.w 9010 <__targetfn_from_thumb>
28667 + 8fb2: eb01 0002 add\.w r0, r1, r2
28668 + 8fb6: f000 b82b b\.w 9010 <__targetfn_from_thumb>
28669 + 8fba: eb01 0002 add\.w r0, r1, r2
28670 + 8fbe: f000 b827 b\.w 9010 <__targetfn_from_thumb>
28671 + 8fc2: eb01 0002 add\.w r0, r1, r2
28672 + 8fc6: f000 b823 b\.w 9010 <__targetfn_from_thumb>
28673 + 8fca: eb01 0002 add\.w r0, r1, r2
28674 + 8fce: f000 b81f b\.w 9010 <__targetfn_from_thumb>
28675 + 8fd2: eb01 0002 add\.w r0, r1, r2
28676 + 8fd6: f000 b81b b\.w 9010 <__targetfn_from_thumb>
28677 + 8fda: eb01 0002 add\.w r0, r1, r2
28678 + 8fde: f000 b817 b\.w 9010 <__targetfn_from_thumb>
28679 + 8fe2: eb01 0002 add\.w r0, r1, r2
28680 + 8fe6: f000 b813 b\.w 9010 <__targetfn_from_thumb>
28681 + 8fea: eb01 0002 add\.w r0, r1, r2
28682 + 8fee: f000 b80f b\.w 9010 <__targetfn_from_thumb>
28683 + 8ff2: eb01 0002 add\.w r0, r1, r2
28684 + 8ff6: f000 b80b b\.w 9010 <__targetfn_from_thumb>
28685 + 8ffa: eb01 0002 add\.w r0, r1, r2
28686 + 8ffe: f000 b807 b\.w 9010 <__targetfn_from_thumb>
28687 + 9002: eb01 0002 add\.w r0, r1, r2
28688 + 9006: f000 b803 b\.w 9010 <__targetfn_from_thumb>
28690 + 900c: f3af 8000 nop\.w
28692 +00009010 <__targetfn_from_thumb>:
28694 + 9012: 46c0 nop \(mov r8, r8\)
28696 +00009014 <__targetfn_change_to_arm>:
28697 + 9014: eaffffb9 b 8f00 <targetfn>
28699 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-b-rel-thumb.d
28702 +.*: file format .*
28705 +Disassembly of section \.text:
28707 +00008f00 <targetfn>:
28710 + 8f04: f3af 8000 nop\.w
28712 +00008f08 <_start>:
28714 + 8f0a: eb01 0002 add\.w r0, r1, r2
28715 + 8f0e: f7ff bff7 b\.w 8f00 <targetfn>
28716 + 8f12: eb01 0002 add\.w r0, r1, r2
28717 + 8f16: f7ff bff3 b\.w 8f00 <targetfn>
28718 + 8f1a: eb01 0002 add\.w r0, r1, r2
28719 + 8f1e: f7ff bfef b\.w 8f00 <targetfn>
28720 + 8f22: eb01 0002 add\.w r0, r1, r2
28721 + 8f26: f7ff bfeb b\.w 8f00 <targetfn>
28722 + 8f2a: eb01 0002 add\.w r0, r1, r2
28723 + 8f2e: f7ff bfe7 b\.w 8f00 <targetfn>
28724 + 8f32: eb01 0002 add\.w r0, r1, r2
28725 + 8f36: f7ff bfe3 b\.w 8f00 <targetfn>
28726 + 8f3a: eb01 0002 add\.w r0, r1, r2
28727 + 8f3e: f7ff bfdf b\.w 8f00 <targetfn>
28728 + 8f42: eb01 0002 add\.w r0, r1, r2
28729 + 8f46: f7ff bfdb b\.w 8f00 <targetfn>
28730 + 8f4a: eb01 0002 add\.w r0, r1, r2
28731 + 8f4e: f7ff bfd7 b\.w 8f00 <targetfn>
28732 + 8f52: eb01 0002 add\.w r0, r1, r2
28733 + 8f56: f7ff bfd3 b\.w 8f00 <targetfn>
28734 + 8f5a: eb01 0002 add\.w r0, r1, r2
28735 + 8f5e: f7ff bfcf b\.w 8f00 <targetfn>
28736 + 8f62: eb01 0002 add\.w r0, r1, r2
28737 + 8f66: f7ff bfcb b\.w 8f00 <targetfn>
28738 + 8f6a: eb01 0002 add\.w r0, r1, r2
28739 + 8f6e: f7ff bfc7 b\.w 8f00 <targetfn>
28740 + 8f72: eb01 0002 add\.w r0, r1, r2
28741 + 8f76: f7ff bfc3 b\.w 8f00 <targetfn>
28742 + 8f7a: eb01 0002 add\.w r0, r1, r2
28743 + 8f7e: f7ff bfbf b\.w 8f00 <targetfn>
28744 + 8f82: eb01 0002 add\.w r0, r1, r2
28745 + 8f86: f7ff bfbb b\.w 8f00 <targetfn>
28746 + 8f8a: eb01 0002 add\.w r0, r1, r2
28747 + 8f8e: f7ff bfb7 b\.w 8f00 <targetfn>
28748 + 8f92: eb01 0002 add\.w r0, r1, r2
28749 + 8f96: f7ff bfb3 b\.w 8f00 <targetfn>
28750 + 8f9a: eb01 0002 add\.w r0, r1, r2
28751 + 8f9e: f7ff bfaf b\.w 8f00 <targetfn>
28752 + 8fa2: eb01 0002 add\.w r0, r1, r2
28753 + 8fa6: f7ff bfab b\.w 8f00 <targetfn>
28754 + 8faa: eb01 0002 add\.w r0, r1, r2
28755 + 8fae: f7ff bfa7 b\.w 8f00 <targetfn>
28756 + 8fb2: eb01 0002 add\.w r0, r1, r2
28757 + 8fb6: f7ff bfa3 b\.w 8f00 <targetfn>
28758 + 8fba: eb01 0002 add\.w r0, r1, r2
28759 + 8fbe: f7ff bf9f b\.w 8f00 <targetfn>
28760 + 8fc2: eb01 0002 add\.w r0, r1, r2
28761 + 8fc6: f7ff bf9b b\.w 8f00 <targetfn>
28762 + 8fca: eb01 0002 add\.w r0, r1, r2
28763 + 8fce: f7ff bf97 b\.w 8f00 <targetfn>
28764 + 8fd2: eb01 0002 add\.w r0, r1, r2
28765 + 8fd6: f7ff bf93 b\.w 8f00 <targetfn>
28766 + 8fda: eb01 0002 add\.w r0, r1, r2
28767 + 8fde: f7ff bf8f b\.w 8f00 <targetfn>
28768 + 8fe2: eb01 0002 add\.w r0, r1, r2
28769 + 8fe6: f7ff bf8b b\.w 8f00 <targetfn>
28770 + 8fea: eb01 0002 add\.w r0, r1, r2
28771 + 8fee: f7ff bf87 b\.w 8f00 <targetfn>
28772 + 8ff2: eb01 0002 add\.w r0, r1, r2
28773 + 8ff6: f7ff bf83 b\.w 8f00 <targetfn>
28774 + 8ffa: eb01 0002 add\.w r0, r1, r2
28775 + 8ffe: f000 b807 b\.w 9010 <_start\+0x108>
28776 + 9002: eb01 0002 add\.w r0, r1, r2
28777 + 9006: f7ff bf7b b\.w 8f00 <targetfn>
28779 + 900c: f3af 8000 nop\.w
28780 + 9010: f7ff bf76 b\.w 8f00 <targetfn>
28782 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-b-rel.s
28789 + @ expansion 32 bytes
28802 + @ expansion 128 bytes
28814 + .type _start, %function
28818 + @ If branching to an ARM destination, we *don't* want to create a
28819 + @ Cortex-A8 stub: the Thumb-to-ARM stub will suffice (and we need it
28820 + @ to change mode).
28826 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-b.d
28829 +.*: file format .*
28832 +Disassembly of section \.text:
28834 +00008f00 <_start>:
28836 + 8f02: eb01 0002 add\.w r0, r1, r2
28837 + 8f06: f7ff bffc b\.w 8f02 <_start\+0x2>
28838 + 8f0a: eb01 0002 add\.w r0, r1, r2
28839 + 8f0e: f7ff bff8 b\.w 8f02 <_start\+0x2>
28840 + 8f12: eb01 0002 add\.w r0, r1, r2
28841 + 8f16: f7ff bff4 b\.w 8f02 <_start\+0x2>
28842 + 8f1a: eb01 0002 add\.w r0, r1, r2
28843 + 8f1e: f7ff bff0 b\.w 8f02 <_start\+0x2>
28844 + 8f22: eb01 0002 add\.w r0, r1, r2
28845 + 8f26: f7ff bffc b\.w 8f22 <_start\+0x22>
28846 + 8f2a: eb01 0002 add\.w r0, r1, r2
28847 + 8f2e: f7ff bff8 b\.w 8f22 <_start\+0x22>
28848 + 8f32: eb01 0002 add\.w r0, r1, r2
28849 + 8f36: f7ff bff4 b\.w 8f22 <_start\+0x22>
28850 + 8f3a: eb01 0002 add\.w r0, r1, r2
28851 + 8f3e: f7ff bff0 b\.w 8f22 <_start\+0x22>
28852 + 8f42: eb01 0002 add\.w r0, r1, r2
28853 + 8f46: f7ff bffc b\.w 8f42 <_start\+0x42>
28854 + 8f4a: eb01 0002 add\.w r0, r1, r2
28855 + 8f4e: f7ff bff8 b\.w 8f42 <_start\+0x42>
28856 + 8f52: eb01 0002 add\.w r0, r1, r2
28857 + 8f56: f7ff bff4 b\.w 8f42 <_start\+0x42>
28858 + 8f5a: eb01 0002 add\.w r0, r1, r2
28859 + 8f5e: f7ff bff0 b\.w 8f42 <_start\+0x42>
28860 + 8f62: eb01 0002 add\.w r0, r1, r2
28861 + 8f66: f7ff bffc b\.w 8f62 <_start\+0x62>
28862 + 8f6a: eb01 0002 add\.w r0, r1, r2
28863 + 8f6e: f7ff bff8 b\.w 8f62 <_start\+0x62>
28864 + 8f72: eb01 0002 add\.w r0, r1, r2
28865 + 8f76: f7ff bff4 b\.w 8f62 <_start\+0x62>
28866 + 8f7a: eb01 0002 add\.w r0, r1, r2
28867 + 8f7e: f7ff bff0 b\.w 8f62 <_start\+0x62>
28868 + 8f82: eb01 0002 add\.w r0, r1, r2
28869 + 8f86: f7ff bffc b\.w 8f82 <_start\+0x82>
28870 + 8f8a: eb01 0002 add\.w r0, r1, r2
28871 + 8f8e: f7ff bff8 b\.w 8f82 <_start\+0x82>
28872 + 8f92: eb01 0002 add\.w r0, r1, r2
28873 + 8f96: f7ff bff4 b\.w 8f82 <_start\+0x82>
28874 + 8f9a: eb01 0002 add\.w r0, r1, r2
28875 + 8f9e: f7ff bff0 b\.w 8f82 <_start\+0x82>
28876 + 8fa2: eb01 0002 add\.w r0, r1, r2
28877 + 8fa6: f7ff bffc b\.w 8fa2 <_start\+0xa2>
28878 + 8faa: eb01 0002 add\.w r0, r1, r2
28879 + 8fae: f7ff bff8 b\.w 8fa2 <_start\+0xa2>
28880 + 8fb2: eb01 0002 add\.w r0, r1, r2
28881 + 8fb6: f7ff bff4 b\.w 8fa2 <_start\+0xa2>
28882 + 8fba: eb01 0002 add\.w r0, r1, r2
28883 + 8fbe: f7ff bff0 b\.w 8fa2 <_start\+0xa2>
28884 + 8fc2: eb01 0002 add\.w r0, r1, r2
28885 + 8fc6: f7ff bffc b\.w 8fc2 <_start\+0xc2>
28886 + 8fca: eb01 0002 add\.w r0, r1, r2
28887 + 8fce: f7ff bff8 b\.w 8fc2 <_start\+0xc2>
28888 + 8fd2: eb01 0002 add\.w r0, r1, r2
28889 + 8fd6: f7ff bff4 b\.w 8fc2 <_start\+0xc2>
28890 + 8fda: eb01 0002 add\.w r0, r1, r2
28891 + 8fde: f7ff bff0 b\.w 8fc2 <_start\+0xc2>
28892 + 8fe2: eb01 0002 add\.w r0, r1, r2
28893 + 8fe6: f7ff bffc b\.w 8fe2 <_start\+0xe2>
28894 + 8fea: eb01 0002 add\.w r0, r1, r2
28895 + 8fee: f7ff bff8 b\.w 8fe2 <_start\+0xe2>
28896 + 8ff2: eb01 0002 add\.w r0, r1, r2
28897 + 8ff6: f7ff bff4 b\.w 8fe2 <_start\+0xe2>
28898 + 8ffa: eb01 0002 add\.w r0, r1, r2
28899 + 8ffe: f000 b803 b\.w 9008 <_start\+0x108>
28901 + 9004: f3af 8000 nop\.w
28902 + 9008: f7ff bfeb b\.w 8fe2 <_start\+0xe2>
28904 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-b.s
28911 + @ expansion 32 bytes
28924 + @ expansion 128 bytes
28936 + .type _start, %function
28940 + @ Trigger Cortex-A8 erratum workaround with b instructions.
28946 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bcc-rel-thumb.d
28949 +.*: file format .*
28952 +Disassembly of section \.text:
28954 +00008f00 <targetfn>:
28957 + 8f04: f3af 8000 nop\.w
28959 +00008f08 <_start>:
28961 + 8f0a: eb01 0002 add\.w r0, r1, r2
28962 + 8f0e: f53f aff7 bmi\.w 8f00 <targetfn>
28963 + 8f12: eb01 0002 add\.w r0, r1, r2
28964 + 8f16: f53f aff3 bmi\.w 8f00 <targetfn>
28965 + 8f1a: eb01 0002 add\.w r0, r1, r2
28966 + 8f1e: f53f afef bmi\.w 8f00 <targetfn>
28967 + 8f22: eb01 0002 add\.w r0, r1, r2
28968 + 8f26: f53f afeb bmi\.w 8f00 <targetfn>
28969 + 8f2a: eb01 0002 add\.w r0, r1, r2
28970 + 8f2e: f53f afe7 bmi\.w 8f00 <targetfn>
28971 + 8f32: eb01 0002 add\.w r0, r1, r2
28972 + 8f36: f53f afe3 bmi\.w 8f00 <targetfn>
28973 + 8f3a: eb01 0002 add\.w r0, r1, r2
28974 + 8f3e: f53f afdf bmi\.w 8f00 <targetfn>
28975 + 8f42: eb01 0002 add\.w r0, r1, r2
28976 + 8f46: f53f afdb bmi\.w 8f00 <targetfn>
28977 + 8f4a: eb01 0002 add\.w r0, r1, r2
28978 + 8f4e: f53f afd7 bmi\.w 8f00 <targetfn>
28979 + 8f52: eb01 0002 add\.w r0, r1, r2
28980 + 8f56: f53f afd3 bmi\.w 8f00 <targetfn>
28981 + 8f5a: eb01 0002 add\.w r0, r1, r2
28982 + 8f5e: f53f afcf bmi\.w 8f00 <targetfn>
28983 + 8f62: eb01 0002 add\.w r0, r1, r2
28984 + 8f66: f53f afcb bmi\.w 8f00 <targetfn>
28985 + 8f6a: eb01 0002 add\.w r0, r1, r2
28986 + 8f6e: f53f afc7 bmi\.w 8f00 <targetfn>
28987 + 8f72: eb01 0002 add\.w r0, r1, r2
28988 + 8f76: f53f afc3 bmi\.w 8f00 <targetfn>
28989 + 8f7a: eb01 0002 add\.w r0, r1, r2
28990 + 8f7e: f53f afbf bmi\.w 8f00 <targetfn>
28991 + 8f82: eb01 0002 add\.w r0, r1, r2
28992 + 8f86: f53f afbb bmi\.w 8f00 <targetfn>
28993 + 8f8a: eb01 0002 add\.w r0, r1, r2
28994 + 8f8e: f53f afb7 bmi\.w 8f00 <targetfn>
28995 + 8f92: eb01 0002 add\.w r0, r1, r2
28996 + 8f96: f53f afb3 bmi\.w 8f00 <targetfn>
28997 + 8f9a: eb01 0002 add\.w r0, r1, r2
28998 + 8f9e: f53f afaf bmi\.w 8f00 <targetfn>
28999 + 8fa2: eb01 0002 add\.w r0, r1, r2
29000 + 8fa6: f53f afab bmi\.w 8f00 <targetfn>
29001 + 8faa: eb01 0002 add\.w r0, r1, r2
29002 + 8fae: f53f afa7 bmi\.w 8f00 <targetfn>
29003 + 8fb2: eb01 0002 add\.w r0, r1, r2
29004 + 8fb6: f53f afa3 bmi\.w 8f00 <targetfn>
29005 + 8fba: eb01 0002 add\.w r0, r1, r2
29006 + 8fbe: f53f af9f bmi\.w 8f00 <targetfn>
29007 + 8fc2: eb01 0002 add\.w r0, r1, r2
29008 + 8fc6: f53f af9b bmi\.w 8f00 <targetfn>
29009 + 8fca: eb01 0002 add\.w r0, r1, r2
29010 + 8fce: f53f af97 bmi\.w 8f00 <targetfn>
29011 + 8fd2: eb01 0002 add\.w r0, r1, r2
29012 + 8fd6: f53f af93 bmi\.w 8f00 <targetfn>
29013 + 8fda: eb01 0002 add\.w r0, r1, r2
29014 + 8fde: f53f af8f bmi\.w 8f00 <targetfn>
29015 + 8fe2: eb01 0002 add\.w r0, r1, r2
29016 + 8fe6: f53f af8b bmi\.w 8f00 <targetfn>
29017 + 8fea: eb01 0002 add\.w r0, r1, r2
29018 + 8fee: f53f af87 bmi\.w 8f00 <targetfn>
29019 + 8ff2: eb01 0002 add\.w r0, r1, r2
29020 + 8ff6: f53f af83 bmi\.w 8f00 <targetfn>
29021 + 8ffa: eb01 0002 add\.w r0, r1, r2
29022 + 8ffe: f000 b807 b\.w 9010 <_start\+0x108>
29023 + 9002: eb01 0002 add\.w r0, r1, r2
29024 + 9006: f53f af7b bmi\.w 8f00 <targetfn>
29026 + 900c: f3af 8000 nop\.w
29027 + 9010: d401 bmi\.n 9016 <_start\+0x10e>
29028 + 9012: f7ff bff6 b\.w 9002 <_start\+0xfa>
29029 + 9016: f7ff bf73 b\.w 8f00 <targetfn>
29031 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bcc-rel.s
29038 + @ expansion 32 bytes
29051 + @ expansion 128 bytes
29063 + .type _start, %function
29072 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bcc.d
29075 +.*: file format .*
29078 +Disassembly of section \.text:
29080 +00008f00 <_start>:
29082 + 8f02: eb01 0002 add\.w r0, r1, r2
29083 + 8f06: f4ff affc bcc\.w 8f02 <_start\+0x2>
29084 + 8f0a: eb01 0002 add\.w r0, r1, r2
29085 + 8f0e: f4ff aff8 bcc\.w 8f02 <_start\+0x2>
29086 + 8f12: eb01 0002 add\.w r0, r1, r2
29087 + 8f16: f4ff aff4 bcc\.w 8f02 <_start\+0x2>
29088 + 8f1a: eb01 0002 add\.w r0, r1, r2
29089 + 8f1e: f4ff aff0 bcc\.w 8f02 <_start\+0x2>
29090 + 8f22: eb01 0002 add\.w r0, r1, r2
29091 + 8f26: f4ff affc bcc\.w 8f22 <_start\+0x22>
29092 + 8f2a: eb01 0002 add\.w r0, r1, r2
29093 + 8f2e: f4ff aff8 bcc\.w 8f22 <_start\+0x22>
29094 + 8f32: eb01 0002 add\.w r0, r1, r2
29095 + 8f36: f4ff aff4 bcc\.w 8f22 <_start\+0x22>
29096 + 8f3a: eb01 0002 add\.w r0, r1, r2
29097 + 8f3e: f4ff aff0 bcc\.w 8f22 <_start\+0x22>
29098 + 8f42: eb01 0002 add\.w r0, r1, r2
29099 + 8f46: f4ff affc bcc\.w 8f42 <_start\+0x42>
29100 + 8f4a: eb01 0002 add\.w r0, r1, r2
29101 + 8f4e: f4ff aff8 bcc\.w 8f42 <_start\+0x42>
29102 + 8f52: eb01 0002 add\.w r0, r1, r2
29103 + 8f56: f4ff aff4 bcc\.w 8f42 <_start\+0x42>
29104 + 8f5a: eb01 0002 add\.w r0, r1, r2
29105 + 8f5e: f4ff aff0 bcc\.w 8f42 <_start\+0x42>
29106 + 8f62: eb01 0002 add\.w r0, r1, r2
29107 + 8f66: f4ff affc bcc\.w 8f62 <_start\+0x62>
29108 + 8f6a: eb01 0002 add\.w r0, r1, r2
29109 + 8f6e: f4ff aff8 bcc\.w 8f62 <_start\+0x62>
29110 + 8f72: eb01 0002 add\.w r0, r1, r2
29111 + 8f76: f4ff aff4 bcc\.w 8f62 <_start\+0x62>
29112 + 8f7a: eb01 0002 add\.w r0, r1, r2
29113 + 8f7e: f4ff aff0 bcc\.w 8f62 <_start\+0x62>
29114 + 8f82: eb01 0002 add\.w r0, r1, r2
29115 + 8f86: f4ff affc bcc\.w 8f82 <_start\+0x82>
29116 + 8f8a: eb01 0002 add\.w r0, r1, r2
29117 + 8f8e: f4ff aff8 bcc\.w 8f82 <_start\+0x82>
29118 + 8f92: eb01 0002 add\.w r0, r1, r2
29119 + 8f96: f4ff aff4 bcc\.w 8f82 <_start\+0x82>
29120 + 8f9a: eb01 0002 add\.w r0, r1, r2
29121 + 8f9e: f4ff aff0 bcc\.w 8f82 <_start\+0x82>
29122 + 8fa2: eb01 0002 add\.w r0, r1, r2
29123 + 8fa6: f4ff affc bcc\.w 8fa2 <_start\+0xa2>
29124 + 8faa: eb01 0002 add\.w r0, r1, r2
29125 + 8fae: f4ff aff8 bcc\.w 8fa2 <_start\+0xa2>
29126 + 8fb2: eb01 0002 add\.w r0, r1, r2
29127 + 8fb6: f4ff aff4 bcc\.w 8fa2 <_start\+0xa2>
29128 + 8fba: eb01 0002 add\.w r0, r1, r2
29129 + 8fbe: f4ff aff0 bcc\.w 8fa2 <_start\+0xa2>
29130 + 8fc2: eb01 0002 add\.w r0, r1, r2
29131 + 8fc6: f4ff affc bcc\.w 8fc2 <_start\+0xc2>
29132 + 8fca: eb01 0002 add\.w r0, r1, r2
29133 + 8fce: f4ff aff8 bcc\.w 8fc2 <_start\+0xc2>
29134 + 8fd2: eb01 0002 add\.w r0, r1, r2
29135 + 8fd6: f4ff aff4 bcc\.w 8fc2 <_start\+0xc2>
29136 + 8fda: eb01 0002 add\.w r0, r1, r2
29137 + 8fde: f4ff aff0 bcc\.w 8fc2 <_start\+0xc2>
29138 + 8fe2: eb01 0002 add\.w r0, r1, r2
29139 + 8fe6: f4ff affc bcc\.w 8fe2 <_start\+0xe2>
29140 + 8fea: eb01 0002 add\.w r0, r1, r2
29141 + 8fee: f4ff aff8 bcc\.w 8fe2 <_start\+0xe2>
29142 + 8ff2: eb01 0002 add\.w r0, r1, r2
29143 + 8ff6: f4ff aff4 bcc\.w 8fe2 <_start\+0xe2>
29144 + 8ffa: eb01 0002 add\.w r0, r1, r2
29145 + 8ffe: f000 b803 b\.w 9008 <_start\+0x108>
29147 + 9004: f3af 8000 nop\.w
29148 + 9008: d301 bcc\.n 900e <_start\+0x10e>
29149 + 900a: f7ff bffa b\.w 9002 <_start\+0x102>
29150 + 900e: f7ff bfe8 b\.w 8fe2 <_start\+0xe2>
29152 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bcc.s
29159 + @ expansion 32 bytes
29172 + @ expansion 128 bytes
29184 + .type _start, %function
29188 + @ Trigger Cortex-A8 erratum workaround with conditional branches.
29194 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-arm.d
29197 +.*: file format .*
29200 +Disassembly of section \.text:
29202 +00008f00 <targetfn>:
29203 + 8f00: e12fff1e bx lr
29204 + 8f04: e320f000 nop \{0\}
29206 +00008f08 <_start>:
29208 + 8f0a: eb01 0002 add\.w r0, r1, r2
29209 + 8f0e: f7ff eff8 blx 8f00 <targetfn>
29210 + 8f12: eb01 0002 add\.w r0, r1, r2
29211 + 8f16: f7ff eff4 blx 8f00 <targetfn>
29212 + 8f1a: eb01 0002 add\.w r0, r1, r2
29213 + 8f1e: f7ff eff0 blx 8f00 <targetfn>
29214 + 8f22: eb01 0002 add\.w r0, r1, r2
29215 + 8f26: f7ff efec blx 8f00 <targetfn>
29216 + 8f2a: eb01 0002 add\.w r0, r1, r2
29217 + 8f2e: f7ff efe8 blx 8f00 <targetfn>
29218 + 8f32: eb01 0002 add\.w r0, r1, r2
29219 + 8f36: f7ff efe4 blx 8f00 <targetfn>
29220 + 8f3a: eb01 0002 add\.w r0, r1, r2
29221 + 8f3e: f7ff efe0 blx 8f00 <targetfn>
29222 + 8f42: eb01 0002 add\.w r0, r1, r2
29223 + 8f46: f7ff efdc blx 8f00 <targetfn>
29224 + 8f4a: eb01 0002 add\.w r0, r1, r2
29225 + 8f4e: f7ff efd8 blx 8f00 <targetfn>
29226 + 8f52: eb01 0002 add\.w r0, r1, r2
29227 + 8f56: f7ff efd4 blx 8f00 <targetfn>
29228 + 8f5a: eb01 0002 add\.w r0, r1, r2
29229 + 8f5e: f7ff efd0 blx 8f00 <targetfn>
29230 + 8f62: eb01 0002 add\.w r0, r1, r2
29231 + 8f66: f7ff efcc blx 8f00 <targetfn>
29232 + 8f6a: eb01 0002 add\.w r0, r1, r2
29233 + 8f6e: f7ff efc8 blx 8f00 <targetfn>
29234 + 8f72: eb01 0002 add\.w r0, r1, r2
29235 + 8f76: f7ff efc4 blx 8f00 <targetfn>
29236 + 8f7a: eb01 0002 add\.w r0, r1, r2
29237 + 8f7e: f7ff efc0 blx 8f00 <targetfn>
29238 + 8f82: eb01 0002 add\.w r0, r1, r2
29239 + 8f86: f7ff efbc blx 8f00 <targetfn>
29240 + 8f8a: eb01 0002 add\.w r0, r1, r2
29241 + 8f8e: f7ff efb8 blx 8f00 <targetfn>
29242 + 8f92: eb01 0002 add\.w r0, r1, r2
29243 + 8f96: f7ff efb4 blx 8f00 <targetfn>
29244 + 8f9a: eb01 0002 add\.w r0, r1, r2
29245 + 8f9e: f7ff efb0 blx 8f00 <targetfn>
29246 + 8fa2: eb01 0002 add\.w r0, r1, r2
29247 + 8fa6: f7ff efac blx 8f00 <targetfn>
29248 + 8faa: eb01 0002 add\.w r0, r1, r2
29249 + 8fae: f7ff efa8 blx 8f00 <targetfn>
29250 + 8fb2: eb01 0002 add\.w r0, r1, r2
29251 + 8fb6: f7ff efa4 blx 8f00 <targetfn>
29252 + 8fba: eb01 0002 add\.w r0, r1, r2
29253 + 8fbe: f7ff efa0 blx 8f00 <targetfn>
29254 + 8fc2: eb01 0002 add\.w r0, r1, r2
29255 + 8fc6: f7ff ef9c blx 8f00 <targetfn>
29256 + 8fca: eb01 0002 add\.w r0, r1, r2
29257 + 8fce: f7ff ef98 blx 8f00 <targetfn>
29258 + 8fd2: eb01 0002 add\.w r0, r1, r2
29259 + 8fd6: f7ff ef94 blx 8f00 <targetfn>
29260 + 8fda: eb01 0002 add\.w r0, r1, r2
29261 + 8fde: f7ff ef90 blx 8f00 <targetfn>
29262 + 8fe2: eb01 0002 add\.w r0, r1, r2
29263 + 8fe6: f7ff ef8c blx 8f00 <targetfn>
29264 + 8fea: eb01 0002 add\.w r0, r1, r2
29265 + 8fee: f7ff ef88 blx 8f00 <targetfn>
29266 + 8ff2: eb01 0002 add\.w r0, r1, r2
29267 + 8ff6: f7ff ef84 blx 8f00 <targetfn>
29268 + 8ffa: eb01 0002 add\.w r0, r1, r2
29269 + 8ffe: f000 e808 blx 9010 <_start\+0x108>
29270 + 9002: eb01 0002 add\.w r0, r1, r2
29271 + 9006: f7ff ef7c blx 8f00 <targetfn>
29273 + 900c: f3af 8000 nop\.w
29274 + 9010: eaffffba b 8f00 <targetfn>
29276 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel-thumb.d
29279 +.*: file format .*
29282 +Disassembly of section \.text:
29284 +00008f00 <targetfn>:
29287 + 8f04: f3af 8000 nop\.w
29289 +00008f08 <_start>:
29291 + 8f0a: eb01 0002 add\.w r0, r1, r2
29292 + 8f0e: f7ff fff7 bl 8f00 <targetfn>
29293 + 8f12: eb01 0002 add\.w r0, r1, r2
29294 + 8f16: f7ff fff3 bl 8f00 <targetfn>
29295 + 8f1a: eb01 0002 add\.w r0, r1, r2
29296 + 8f1e: f7ff ffef bl 8f00 <targetfn>
29297 + 8f22: eb01 0002 add\.w r0, r1, r2
29298 + 8f26: f7ff ffeb bl 8f00 <targetfn>
29299 + 8f2a: eb01 0002 add\.w r0, r1, r2
29300 + 8f2e: f7ff ffe7 bl 8f00 <targetfn>
29301 + 8f32: eb01 0002 add\.w r0, r1, r2
29302 + 8f36: f7ff ffe3 bl 8f00 <targetfn>
29303 + 8f3a: eb01 0002 add\.w r0, r1, r2
29304 + 8f3e: f7ff ffdf bl 8f00 <targetfn>
29305 + 8f42: eb01 0002 add\.w r0, r1, r2
29306 + 8f46: f7ff ffdb bl 8f00 <targetfn>
29307 + 8f4a: eb01 0002 add\.w r0, r1, r2
29308 + 8f4e: f7ff ffd7 bl 8f00 <targetfn>
29309 + 8f52: eb01 0002 add\.w r0, r1, r2
29310 + 8f56: f7ff ffd3 bl 8f00 <targetfn>
29311 + 8f5a: eb01 0002 add\.w r0, r1, r2
29312 + 8f5e: f7ff ffcf bl 8f00 <targetfn>
29313 + 8f62: eb01 0002 add\.w r0, r1, r2
29314 + 8f66: f7ff ffcb bl 8f00 <targetfn>
29315 + 8f6a: eb01 0002 add\.w r0, r1, r2
29316 + 8f6e: f7ff ffc7 bl 8f00 <targetfn>
29317 + 8f72: eb01 0002 add\.w r0, r1, r2
29318 + 8f76: f7ff ffc3 bl 8f00 <targetfn>
29319 + 8f7a: eb01 0002 add\.w r0, r1, r2
29320 + 8f7e: f7ff ffbf bl 8f00 <targetfn>
29321 + 8f82: eb01 0002 add\.w r0, r1, r2
29322 + 8f86: f7ff ffbb bl 8f00 <targetfn>
29323 + 8f8a: eb01 0002 add\.w r0, r1, r2
29324 + 8f8e: f7ff ffb7 bl 8f00 <targetfn>
29325 + 8f92: eb01 0002 add\.w r0, r1, r2
29326 + 8f96: f7ff ffb3 bl 8f00 <targetfn>
29327 + 8f9a: eb01 0002 add\.w r0, r1, r2
29328 + 8f9e: f7ff ffaf bl 8f00 <targetfn>
29329 + 8fa2: eb01 0002 add\.w r0, r1, r2
29330 + 8fa6: f7ff ffab bl 8f00 <targetfn>
29331 + 8faa: eb01 0002 add\.w r0, r1, r2
29332 + 8fae: f7ff ffa7 bl 8f00 <targetfn>
29333 + 8fb2: eb01 0002 add\.w r0, r1, r2
29334 + 8fb6: f7ff ffa3 bl 8f00 <targetfn>
29335 + 8fba: eb01 0002 add\.w r0, r1, r2
29336 + 8fbe: f7ff ff9f bl 8f00 <targetfn>
29337 + 8fc2: eb01 0002 add\.w r0, r1, r2
29338 + 8fc6: f7ff ff9b bl 8f00 <targetfn>
29339 + 8fca: eb01 0002 add\.w r0, r1, r2
29340 + 8fce: f7ff ff97 bl 8f00 <targetfn>
29341 + 8fd2: eb01 0002 add\.w r0, r1, r2
29342 + 8fd6: f7ff ff93 bl 8f00 <targetfn>
29343 + 8fda: eb01 0002 add\.w r0, r1, r2
29344 + 8fde: f7ff ff8f bl 8f00 <targetfn>
29345 + 8fe2: eb01 0002 add\.w r0, r1, r2
29346 + 8fe6: f7ff ff8b bl 8f00 <targetfn>
29347 + 8fea: eb01 0002 add\.w r0, r1, r2
29348 + 8fee: f7ff ff87 bl 8f00 <targetfn>
29349 + 8ff2: eb01 0002 add\.w r0, r1, r2
29350 + 8ff6: f7ff ff83 bl 8f00 <targetfn>
29351 + 8ffa: eb01 0002 add\.w r0, r1, r2
29352 + 8ffe: f000 f807 bl 9010 <_start\+0x108>
29353 + 9002: eb01 0002 add\.w r0, r1, r2
29354 + 9006: f7ff ff7b bl 8f00 <targetfn>
29356 + 900c: f3af 8000 nop\.w
29357 + 9010: f7ff bf76 b\.w 8f00 <targetfn>
29359 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bl-rel.s
29366 + @ expansion 32 bytes
29379 + @ expansion 128 bytes
29391 + .type _start, %function
29395 + @ If calling an ARM destination, we *don't* want to create a
29396 + @ Cortex-A8 stub: the Thumb-to-ARM stub will suffice.
29402 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bl.d
29405 +.*: file format .*
29408 +Disassembly of section \.text:
29410 +00008f00 <_start>:
29412 + 8f02: eb01 0002 add\.w r0, r1, r2
29413 + 8f06: f7ff fffc bl 8f02 <_start\+0x2>
29414 + 8f0a: eb01 0002 add\.w r0, r1, r2
29415 + 8f0e: f7ff fff8 bl 8f02 <_start\+0x2>
29416 + 8f12: eb01 0002 add\.w r0, r1, r2
29417 + 8f16: f7ff fff4 bl 8f02 <_start\+0x2>
29418 + 8f1a: eb01 0002 add\.w r0, r1, r2
29419 + 8f1e: f7ff fff0 bl 8f02 <_start\+0x2>
29420 + 8f22: eb01 0002 add\.w r0, r1, r2
29421 + 8f26: f7ff fffc bl 8f22 <_start\+0x22>
29422 + 8f2a: eb01 0002 add\.w r0, r1, r2
29423 + 8f2e: f7ff fff8 bl 8f22 <_start\+0x22>
29424 + 8f32: eb01 0002 add\.w r0, r1, r2
29425 + 8f36: f7ff fff4 bl 8f22 <_start\+0x22>
29426 + 8f3a: eb01 0002 add\.w r0, r1, r2
29427 + 8f3e: f7ff fff0 bl 8f22 <_start\+0x22>
29428 + 8f42: eb01 0002 add\.w r0, r1, r2
29429 + 8f46: f7ff fffc bl 8f42 <_start\+0x42>
29430 + 8f4a: eb01 0002 add\.w r0, r1, r2
29431 + 8f4e: f7ff fff8 bl 8f42 <_start\+0x42>
29432 + 8f52: eb01 0002 add\.w r0, r1, r2
29433 + 8f56: f7ff fff4 bl 8f42 <_start\+0x42>
29434 + 8f5a: eb01 0002 add\.w r0, r1, r2
29435 + 8f5e: f7ff fff0 bl 8f42 <_start\+0x42>
29436 + 8f62: eb01 0002 add\.w r0, r1, r2
29437 + 8f66: f7ff fffc bl 8f62 <_start\+0x62>
29438 + 8f6a: eb01 0002 add\.w r0, r1, r2
29439 + 8f6e: f7ff fff8 bl 8f62 <_start\+0x62>
29440 + 8f72: eb01 0002 add\.w r0, r1, r2
29441 + 8f76: f7ff fff4 bl 8f62 <_start\+0x62>
29442 + 8f7a: eb01 0002 add\.w r0, r1, r2
29443 + 8f7e: f7ff fff0 bl 8f62 <_start\+0x62>
29444 + 8f82: eb01 0002 add\.w r0, r1, r2
29445 + 8f86: f7ff fffc bl 8f82 <_start\+0x82>
29446 + 8f8a: eb01 0002 add\.w r0, r1, r2
29447 + 8f8e: f7ff fff8 bl 8f82 <_start\+0x82>
29448 + 8f92: eb01 0002 add\.w r0, r1, r2
29449 + 8f96: f7ff fff4 bl 8f82 <_start\+0x82>
29450 + 8f9a: eb01 0002 add\.w r0, r1, r2
29451 + 8f9e: f7ff fff0 bl 8f82 <_start\+0x82>
29452 + 8fa2: eb01 0002 add\.w r0, r1, r2
29453 + 8fa6: f7ff fffc bl 8fa2 <_start\+0xa2>
29454 + 8faa: eb01 0002 add\.w r0, r1, r2
29455 + 8fae: f7ff fff8 bl 8fa2 <_start\+0xa2>
29456 + 8fb2: eb01 0002 add\.w r0, r1, r2
29457 + 8fb6: f7ff fff4 bl 8fa2 <_start\+0xa2>
29458 + 8fba: eb01 0002 add\.w r0, r1, r2
29459 + 8fbe: f7ff fff0 bl 8fa2 <_start\+0xa2>
29460 + 8fc2: eb01 0002 add\.w r0, r1, r2
29461 + 8fc6: f7ff fffc bl 8fc2 <_start\+0xc2>
29462 + 8fca: eb01 0002 add\.w r0, r1, r2
29463 + 8fce: f7ff fff8 bl 8fc2 <_start\+0xc2>
29464 + 8fd2: eb01 0002 add\.w r0, r1, r2
29465 + 8fd6: f7ff fff4 bl 8fc2 <_start\+0xc2>
29466 + 8fda: eb01 0002 add\.w r0, r1, r2
29467 + 8fde: f7ff fff0 bl 8fc2 <_start\+0xc2>
29468 + 8fe2: eb01 0002 add\.w r0, r1, r2
29469 + 8fe6: f7ff fffc bl 8fe2 <_start\+0xe2>
29470 + 8fea: eb01 0002 add\.w r0, r1, r2
29471 + 8fee: f7ff fff8 bl 8fe2 <_start\+0xe2>
29472 + 8ff2: eb01 0002 add\.w r0, r1, r2
29473 + 8ff6: f7ff fff4 bl 8fe2 <_start\+0xe2>
29474 + 8ffa: eb01 0002 add\.w r0, r1, r2
29475 + 8ffe: f000 f803 bl 9008 <_start\+0x108>
29477 + 9004: f3af 8000 nop\.w
29478 + 9008: f7ff bfeb b\.w 8fe2 <_start\+0xe2>
29480 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-bl.s
29487 + @ expansion 32 bytes
29500 + @ expansion 128 bytes
29512 + .type _start, %function
29516 + @ Trigger Cortex-A8 erratum workaround with bl instructions.
29522 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-blx-rel-arm.d
29525 +.*: file format .*
29528 +Disassembly of section \.text:
29530 +00008f00 <targetfn>:
29531 + 8f00: e12fff1e bx lr
29532 + 8f04: e320f000 nop \{0\}
29534 +00008f08 <_start>:
29536 + 8f0a: eb01 0002 add\.w r0, r1, r2
29537 + 8f0e: f7ff eff8 blx 8f00 <targetfn>
29538 + 8f12: eb01 0002 add\.w r0, r1, r2
29539 + 8f16: f7ff eff4 blx 8f00 <targetfn>
29540 + 8f1a: eb01 0002 add\.w r0, r1, r2
29541 + 8f1e: f7ff eff0 blx 8f00 <targetfn>
29542 + 8f22: eb01 0002 add\.w r0, r1, r2
29543 + 8f26: f7ff efec blx 8f00 <targetfn>
29544 + 8f2a: eb01 0002 add\.w r0, r1, r2
29545 + 8f2e: f7ff efe8 blx 8f00 <targetfn>
29546 + 8f32: eb01 0002 add\.w r0, r1, r2
29547 + 8f36: f7ff efe4 blx 8f00 <targetfn>
29548 + 8f3a: eb01 0002 add\.w r0, r1, r2
29549 + 8f3e: f7ff efe0 blx 8f00 <targetfn>
29550 + 8f42: eb01 0002 add\.w r0, r1, r2
29551 + 8f46: f7ff efdc blx 8f00 <targetfn>
29552 + 8f4a: eb01 0002 add\.w r0, r1, r2
29553 + 8f4e: f7ff efd8 blx 8f00 <targetfn>
29554 + 8f52: eb01 0002 add\.w r0, r1, r2
29555 + 8f56: f7ff efd4 blx 8f00 <targetfn>
29556 + 8f5a: eb01 0002 add\.w r0, r1, r2
29557 + 8f5e: f7ff efd0 blx 8f00 <targetfn>
29558 + 8f62: eb01 0002 add\.w r0, r1, r2
29559 + 8f66: f7ff efcc blx 8f00 <targetfn>
29560 + 8f6a: eb01 0002 add\.w r0, r1, r2
29561 + 8f6e: f7ff efc8 blx 8f00 <targetfn>
29562 + 8f72: eb01 0002 add\.w r0, r1, r2
29563 + 8f76: f7ff efc4 blx 8f00 <targetfn>
29564 + 8f7a: eb01 0002 add\.w r0, r1, r2
29565 + 8f7e: f7ff efc0 blx 8f00 <targetfn>
29566 + 8f82: eb01 0002 add\.w r0, r1, r2
29567 + 8f86: f7ff efbc blx 8f00 <targetfn>
29568 + 8f8a: eb01 0002 add\.w r0, r1, r2
29569 + 8f8e: f7ff efb8 blx 8f00 <targetfn>
29570 + 8f92: eb01 0002 add\.w r0, r1, r2
29571 + 8f96: f7ff efb4 blx 8f00 <targetfn>
29572 + 8f9a: eb01 0002 add\.w r0, r1, r2
29573 + 8f9e: f7ff efb0 blx 8f00 <targetfn>
29574 + 8fa2: eb01 0002 add\.w r0, r1, r2
29575 + 8fa6: f7ff efac blx 8f00 <targetfn>
29576 + 8faa: eb01 0002 add\.w r0, r1, r2
29577 + 8fae: f7ff efa8 blx 8f00 <targetfn>
29578 + 8fb2: eb01 0002 add\.w r0, r1, r2
29579 + 8fb6: f7ff efa4 blx 8f00 <targetfn>
29580 + 8fba: eb01 0002 add\.w r0, r1, r2
29581 + 8fbe: f7ff efa0 blx 8f00 <targetfn>
29582 + 8fc2: eb01 0002 add\.w r0, r1, r2
29583 + 8fc6: f7ff ef9c blx 8f00 <targetfn>
29584 + 8fca: eb01 0002 add\.w r0, r1, r2
29585 + 8fce: f7ff ef98 blx 8f00 <targetfn>
29586 + 8fd2: eb01 0002 add\.w r0, r1, r2
29587 + 8fd6: f7ff ef94 blx 8f00 <targetfn>
29588 + 8fda: eb01 0002 add\.w r0, r1, r2
29589 + 8fde: f7ff ef90 blx 8f00 <targetfn>
29590 + 8fe2: eb01 0002 add\.w r0, r1, r2
29591 + 8fe6: f7ff ef8c blx 8f00 <targetfn>
29592 + 8fea: eb01 0002 add\.w r0, r1, r2
29593 + 8fee: f7ff ef88 blx 8f00 <targetfn>
29594 + 8ff2: eb01 0002 add\.w r0, r1, r2
29595 + 8ff6: f7ff ef84 blx 8f00 <targetfn>
29596 + 8ffa: eb01 0002 add\.w r0, r1, r2
29597 + 8ffe: f000 e808 blx 9010 <_start\+0x108>
29598 + 9002: eb01 0002 add\.w r0, r1, r2
29599 + 9006: f7ff ef7c blx 8f00 <targetfn>
29601 + 900c: f3af 8000 nop\.w
29602 + 9010: eaffffba b 8f00 <targetfn>
29604 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-blx-rel-thumb.d
29607 +.*: file format .*
29610 +Disassembly of section \.text:
29612 +00008f00 <targetfn>:
29615 + 8f04: f3af 8000 nop\.w
29617 +00008f08 <_start>:
29619 + 8f0a: eb01 0002 add\.w r0, r1, r2
29620 + 8f0e: f7ff fff7 bl 8f00 <targetfn>
29621 + 8f12: eb01 0002 add\.w r0, r1, r2
29622 + 8f16: f7ff fff3 bl 8f00 <targetfn>
29623 + 8f1a: eb01 0002 add\.w r0, r1, r2
29624 + 8f1e: f7ff ffef bl 8f00 <targetfn>
29625 + 8f22: eb01 0002 add\.w r0, r1, r2
29626 + 8f26: f7ff ffeb bl 8f00 <targetfn>
29627 + 8f2a: eb01 0002 add\.w r0, r1, r2
29628 + 8f2e: f7ff ffe7 bl 8f00 <targetfn>
29629 + 8f32: eb01 0002 add\.w r0, r1, r2
29630 + 8f36: f7ff ffe3 bl 8f00 <targetfn>
29631 + 8f3a: eb01 0002 add\.w r0, r1, r2
29632 + 8f3e: f7ff ffdf bl 8f00 <targetfn>
29633 + 8f42: eb01 0002 add\.w r0, r1, r2
29634 + 8f46: f7ff ffdb bl 8f00 <targetfn>
29635 + 8f4a: eb01 0002 add\.w r0, r1, r2
29636 + 8f4e: f7ff ffd7 bl 8f00 <targetfn>
29637 + 8f52: eb01 0002 add\.w r0, r1, r2
29638 + 8f56: f7ff ffd3 bl 8f00 <targetfn>
29639 + 8f5a: eb01 0002 add\.w r0, r1, r2
29640 + 8f5e: f7ff ffcf bl 8f00 <targetfn>
29641 + 8f62: eb01 0002 add\.w r0, r1, r2
29642 + 8f66: f7ff ffcb bl 8f00 <targetfn>
29643 + 8f6a: eb01 0002 add\.w r0, r1, r2
29644 + 8f6e: f7ff ffc7 bl 8f00 <targetfn>
29645 + 8f72: eb01 0002 add\.w r0, r1, r2
29646 + 8f76: f7ff ffc3 bl 8f00 <targetfn>
29647 + 8f7a: eb01 0002 add\.w r0, r1, r2
29648 + 8f7e: f7ff ffbf bl 8f00 <targetfn>
29649 + 8f82: eb01 0002 add\.w r0, r1, r2
29650 + 8f86: f7ff ffbb bl 8f00 <targetfn>
29651 + 8f8a: eb01 0002 add\.w r0, r1, r2
29652 + 8f8e: f7ff ffb7 bl 8f00 <targetfn>
29653 + 8f92: eb01 0002 add\.w r0, r1, r2
29654 + 8f96: f7ff ffb3 bl 8f00 <targetfn>
29655 + 8f9a: eb01 0002 add\.w r0, r1, r2
29656 + 8f9e: f7ff ffaf bl 8f00 <targetfn>
29657 + 8fa2: eb01 0002 add\.w r0, r1, r2
29658 + 8fa6: f7ff ffab bl 8f00 <targetfn>
29659 + 8faa: eb01 0002 add\.w r0, r1, r2
29660 + 8fae: f7ff ffa7 bl 8f00 <targetfn>
29661 + 8fb2: eb01 0002 add\.w r0, r1, r2
29662 + 8fb6: f7ff ffa3 bl 8f00 <targetfn>
29663 + 8fba: eb01 0002 add\.w r0, r1, r2
29664 + 8fbe: f7ff ff9f bl 8f00 <targetfn>
29665 + 8fc2: eb01 0002 add\.w r0, r1, r2
29666 + 8fc6: f7ff ff9b bl 8f00 <targetfn>
29667 + 8fca: eb01 0002 add\.w r0, r1, r2
29668 + 8fce: f7ff ff97 bl 8f00 <targetfn>
29669 + 8fd2: eb01 0002 add\.w r0, r1, r2
29670 + 8fd6: f7ff ff93 bl 8f00 <targetfn>
29671 + 8fda: eb01 0002 add\.w r0, r1, r2
29672 + 8fde: f7ff ff8f bl 8f00 <targetfn>
29673 + 8fe2: eb01 0002 add\.w r0, r1, r2
29674 + 8fe6: f7ff ff8b bl 8f00 <targetfn>
29675 + 8fea: eb01 0002 add\.w r0, r1, r2
29676 + 8fee: f7ff ff87 bl 8f00 <targetfn>
29677 + 8ff2: eb01 0002 add\.w r0, r1, r2
29678 + 8ff6: f7ff ff83 bl 8f00 <targetfn>
29679 + 8ffa: eb01 0002 add\.w r0, r1, r2
29680 + 8ffe: f000 f807 bl 9010 <_start\+0x108>
29681 + 9002: eb01 0002 add\.w r0, r1, r2
29682 + 9006: f7ff ff7b bl 8f00 <targetfn>
29684 + 900c: f3af 8000 nop\.w
29685 + 9010: f7ff bf76 b\.w 8f00 <targetfn>
29687 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-blx-rel.s
29694 + @ expansion 32 bytes
29707 + @ expansion 128 bytes
29719 + .type _start, %function
29728 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-blx.d
29731 +.*: file format .*
29734 +Disassembly of section \.text:
29737 + 8f00: e1a02413 lsl r2, r3, r4
29738 + 8f04: e12fff1e bx lr
29740 +00008f08 <_start>:
29742 + 8f0a: eb01 0002 add\.w r0, r1, r2
29743 + 8f0e: f7ff eff8 blx 8f00 <armfn>
29744 + 8f12: eb01 0002 add\.w r0, r1, r2
29745 + 8f16: f7ff eff4 blx 8f00 <armfn>
29746 + 8f1a: eb01 0002 add\.w r0, r1, r2
29747 + 8f1e: f7ff eff0 blx 8f00 <armfn>
29748 + 8f22: eb01 0002 add\.w r0, r1, r2
29749 + 8f26: f7ff efec blx 8f00 <armfn>
29750 + 8f2a: eb01 0002 add\.w r0, r1, r2
29751 + 8f2e: f7ff efe8 blx 8f00 <armfn>
29752 + 8f32: eb01 0002 add\.w r0, r1, r2
29753 + 8f36: f7ff efe4 blx 8f00 <armfn>
29754 + 8f3a: eb01 0002 add\.w r0, r1, r2
29755 + 8f3e: f7ff efe0 blx 8f00 <armfn>
29756 + 8f42: eb01 0002 add\.w r0, r1, r2
29757 + 8f46: f7ff efdc blx 8f00 <armfn>
29758 + 8f4a: eb01 0002 add\.w r0, r1, r2
29759 + 8f4e: f7ff efd8 blx 8f00 <armfn>
29760 + 8f52: eb01 0002 add\.w r0, r1, r2
29761 + 8f56: f7ff efd4 blx 8f00 <armfn>
29762 + 8f5a: eb01 0002 add\.w r0, r1, r2
29763 + 8f5e: f7ff efd0 blx 8f00 <armfn>
29764 + 8f62: eb01 0002 add\.w r0, r1, r2
29765 + 8f66: f7ff efcc blx 8f00 <armfn>
29766 + 8f6a: eb01 0002 add\.w r0, r1, r2
29767 + 8f6e: f7ff efc8 blx 8f00 <armfn>
29768 + 8f72: eb01 0002 add\.w r0, r1, r2
29769 + 8f76: f7ff efc4 blx 8f00 <armfn>
29770 + 8f7a: eb01 0002 add\.w r0, r1, r2
29771 + 8f7e: f7ff efc0 blx 8f00 <armfn>
29772 + 8f82: eb01 0002 add\.w r0, r1, r2
29773 + 8f86: f7ff efbc blx 8f00 <armfn>
29774 + 8f8a: eb01 0002 add\.w r0, r1, r2
29775 + 8f8e: f7ff efb8 blx 8f00 <armfn>
29776 + 8f92: eb01 0002 add\.w r0, r1, r2
29777 + 8f96: f7ff efb4 blx 8f00 <armfn>
29778 + 8f9a: eb01 0002 add\.w r0, r1, r2
29779 + 8f9e: f7ff efb0 blx 8f00 <armfn>
29780 + 8fa2: eb01 0002 add\.w r0, r1, r2
29781 + 8fa6: f7ff efac blx 8f00 <armfn>
29782 + 8faa: eb01 0002 add\.w r0, r1, r2
29783 + 8fae: f7ff efa8 blx 8f00 <armfn>
29784 + 8fb2: eb01 0002 add\.w r0, r1, r2
29785 + 8fb6: f7ff efa4 blx 8f00 <armfn>
29786 + 8fba: eb01 0002 add\.w r0, r1, r2
29787 + 8fbe: f7ff efa0 blx 8f00 <armfn>
29788 + 8fc2: eb01 0002 add\.w r0, r1, r2
29789 + 8fc6: f7ff ef9c blx 8f00 <armfn>
29790 + 8fca: eb01 0002 add\.w r0, r1, r2
29791 + 8fce: f7ff ef98 blx 8f00 <armfn>
29792 + 8fd2: eb01 0002 add\.w r0, r1, r2
29793 + 8fd6: f7ff ef94 blx 8f00 <armfn>
29794 + 8fda: eb01 0002 add\.w r0, r1, r2
29795 + 8fde: f7ff ef90 blx 8f00 <armfn>
29796 + 8fe2: eb01 0002 add\.w r0, r1, r2
29797 + 8fe6: f7ff ef8c blx 8f00 <armfn>
29798 + 8fea: eb01 0002 add\.w r0, r1, r2
29799 + 8fee: f7ff ef88 blx 8f00 <armfn>
29800 + 8ff2: eb01 0002 add\.w r0, r1, r2
29801 + 8ff6: f7ff ef84 blx 8f00 <armfn>
29802 + 8ffa: eb01 0002 add\.w r0, r1, r2
29803 + 8ffe: f000 e808 blx 9010 <_start\+0x108>
29804 + 9002: eb01 0002 add\.w r0, r1, r2
29805 + 9006: f7ff ef7c blx 8f00 <armfn>
29807 + 900c: f3af 8000 nop\.w
29808 + 9010: eaffffba b 8f00 <armfn>
29810 +++ b/ld/testsuite/ld-arm/cortex-a8-fix-blx.s
29816 + @ expansion 32 bytes
29828 + @ expansion 128 bytes
29839 + mov r2, r3, asl r4
29847 + .type _start, %function
29851 + @ Trigger Cortex-A8 erratum workaround with blx instructions.
29857 +++ b/ld/testsuite/ld-arm/cortex-a8-thumb-target.s
29866 + .type targetfn, %function
29869 --- a/ld/testsuite/ld-arm/farcall-arm-arm-be8.d
29870 +++ b/ld/testsuite/ld-arm/farcall-arm-arm-be8.d
29873 Disassembly of section .text:
29875 -00001000 <__bar_veneer>:
29876 - 1000: 04f01fe5 .*
29877 - 1004: 02001020 .word 0x02001020
29878 +00001000 <_start>:
29879 + 1000: 000000eb bl 1008 <__bar_veneer>
29880 + 1004: 00000000 andeq r0, r0, r0
29882 -00001008 <_start>:
29883 - 1008: fcffffeb .*
29884 +00001008 <__bar_veneer>:
29885 + 1008: 04f01fe5 ldr pc, \[pc, #-4\] ; 100c <__bar_veneer\+0x4>
29886 + 100c: 02001020 .word 0x02001020
29887 Disassembly of section .foo:
29890 - 2001020: 1eff2fe1 .*
29891 + 2001020: 1eff2fe1 bx lr
29892 --- a/ld/testsuite/ld-arm/farcall-arm-arm-pic-veneer.d
29893 +++ b/ld/testsuite/ld-arm/farcall-arm-arm-pic-veneer.d
29896 Disassembly of section .text:
29898 -00001000 <__bar_veneer>:
29899 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_veneer\+0x8>
29900 - 1004: e08ff00c add pc, pc, ip
29901 - 1008: 02000018 .word 0x02000018
29902 - 100c: 00000000 .word 0x00000000
29903 +00001000 <_start>:
29904 + 1000: eb000000 bl 1008 <__bar_veneer>
29905 + 1004: 00000000 andeq r0, r0, r0
29907 -00001010 <_start>:
29908 - 1010: ebfffffa bl 1000 <__bar_veneer>
29909 +00001008 <__bar_veneer>:
29910 + 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_veneer\+0x8>
29911 + 100c: e08ff00c add pc, pc, ip
29912 + 1010: 0200000c .word 0x0200000c
29913 + 1014: 00000000 .word 0x00000000
29914 Disassembly of section .foo:
29917 --- a/ld/testsuite/ld-arm/farcall-arm-arm.d
29918 +++ b/ld/testsuite/ld-arm/farcall-arm-arm.d
29921 Disassembly of section .text:
29923 -00001000 <__bar_veneer>:
29924 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_veneer\+0x4>
29925 - 1004: 02001020 .word 0x02001020
29926 +00001000 <_start>:
29927 + 1000: eb000000 bl 1008 <__bar_veneer>
29928 + 1004: 00000000 andeq r0, r0, r0
29930 -00001008 <_start>:
29931 - 1008: ebfffffc bl 1000 <__bar_veneer>
29932 +00001008 <__bar_veneer>:
29933 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_veneer\+0x4>
29934 + 100c: 02001020 .word 0x02001020
29935 Disassembly of section .foo:
29938 --- a/ld/testsuite/ld-arm/farcall-arm-thumb-blx-pic-veneer.d
29939 +++ b/ld/testsuite/ld-arm/farcall-arm-thumb-blx-pic-veneer.d
29942 Disassembly of section .text:
29944 -00001000 <__bar_from_arm>:
29945 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_from_arm\+0x8>
29946 - 1004: e08ff00c add pc, pc, ip
29947 - 1008: 0200000d .word 0x0200000d
29948 - 100c: 00000000 .word 0x00000000
29949 +00001000 <_start>:
29950 + 1000: eb000000 bl 1008 <__bar_from_arm>
29951 + 1004: 00000000 andeq r0, r0, r0
29953 -00001010 <_start>:
29954 - 1010: ebfffffa bl 1000 <__bar_from_arm>
29955 +00001008 <__bar_from_arm>:
29956 + 1008: e59fc004 ldr ip, \[pc, #4\] ; 1014 <__bar_from_arm\+0xc>
29957 + 100c: e08fc00c add ip, pc, ip
29958 + 1010: e12fff1c bx ip
29959 + 1014: 02000001 .word 0x02000001
29960 Disassembly of section .foo:
29963 --- a/ld/testsuite/ld-arm/farcall-arm-thumb-blx.d
29964 +++ b/ld/testsuite/ld-arm/farcall-arm-thumb-blx.d
29967 Disassembly of section .text:
29969 -00001000 <__bar_from_arm>:
29970 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_from_arm\+0x4>
29971 - 1004: 02001015 .word 0x02001015
29972 +00001000 <_start>:
29973 + 1000: eb000000 bl 1008 <__bar_from_arm>
29974 + 1004: 00000000 andeq r0, r0, r0
29976 -00001008 <_start>:
29977 - 1008: ebfffffc bl 1000 <__bar_from_arm>
29978 +00001008 <__bar_from_arm>:
29979 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_from_arm\+0x4>
29980 + 100c: 02001015 .word 0x02001015
29981 Disassembly of section .foo:
29984 --- a/ld/testsuite/ld-arm/farcall-arm-thumb-pic-veneer.d
29985 +++ b/ld/testsuite/ld-arm/farcall-arm-thumb-pic-veneer.d
29988 Disassembly of section .text:
29990 -00001000 <__bar_from_arm>:
29991 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_from_arm\+0x8>
29992 - 1004: e08ff00c add pc, pc, ip
29993 - 1008: 0200000d .word 0x0200000d
29994 - 100c: 00000000 .word 0x00000000
29995 +00001000 <_start>:
29996 + 1000: eb000000 bl 1008 <__bar_from_arm>
29997 + 1004: 00000000 andeq r0, r0, r0
29999 -00001010 <_start>:
30000 - 1010: ebfffffa bl 1000 <__bar_from_arm>
30001 +00001008 <__bar_from_arm>:
30002 + 1008: e59fc004 ldr ip, \[pc, #4\] ; 1014 <__bar_from_arm\+0xc>
30003 + 100c: e08fc00c add ip, pc, ip
30004 + 1010: e12fff1c bx ip
30005 + 1014: 02000001 .word 0x02000001
30006 Disassembly of section .foo:
30009 --- a/ld/testsuite/ld-arm/farcall-arm-thumb.d
30010 +++ b/ld/testsuite/ld-arm/farcall-arm-thumb.d
30013 Disassembly of section .text:
30015 -00001000 <__bar_from_arm>:
30016 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_from_arm\+0x8>
30017 - 1004: e12fff1c bx ip
30018 - 1008: 02001015 .word 0x02001015
30019 - 100c: 00000000 .word 0x00000000
30020 +00001000 <_start>:
30021 + 1000: eb000000 bl 1008 <__bar_from_arm>
30022 + 1004: 00000000 andeq r0, r0, r0
30024 -00001010 <_start>:
30025 - 1010: ebfffffa bl 1000 <__bar_from_arm>
30026 +00001008 <__bar_from_arm>:
30027 + 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
30028 + 100c: e12fff1c bx ip
30029 + 1010: 02001015 .word 0x02001015
30030 + 1014: 00000000 .word 0x00000000
30031 Disassembly of section .foo:
30034 --- a/ld/testsuite/ld-arm/farcall-group-size2.d
30035 +++ b/ld/testsuite/ld-arm/farcall-group-size2.d
30038 Disassembly of section .text:
30040 -00001000 <__bar2_veneer>:
30041 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar2_veneer\+0x4>
30042 - 1004: 02003024 .word 0x02003024
30043 +00001000 <_start>:
30044 + 1000: eb000000 bl 1008 <__bar_from_arm>
30045 + 1004: eb000002 bl 1014 <__bar2_veneer>
30046 00001008 <__bar_from_arm>:
30047 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
30048 100c: e12fff1c bx ip
30049 1010: 02003021 .word 0x02003021
30050 - 1014: 00000000 .word 0x00000000
30052 -00001018 <_start>:
30053 - 1018: ebfffffa bl 1008 <__bar_from_arm>
30054 - 101c: ebfffff7 bl 1000 <__bar2_veneer>
30055 -00001020 <__bar3_veneer>:
30056 - 1020: e51ff004 ldr pc, \[pc, #-4\] ; 1024 <__bar3_veneer\+0x4>
30057 - 1024: 02003028 .word 0x02003028
30058 -00001028 <__bar5_from_arm>:
30059 - 1028: e59fc000 ldr ip, \[pc, #0\] ; 1030 <__bar5_from_arm\+0x8>
30060 - 102c: e12fff1c bx ip
30061 - 1030: 0200302f .word 0x0200302f
30062 -00001034 <__bar4_from_arm>:
30063 - 1034: e59fc000 ldr ip, \[pc, #0\] ; 103c <__bar4_from_arm\+0x8>
30064 - 1038: e12fff1c bx ip
30065 - 103c: 0200302d .word 0x0200302d
30066 +00001014 <__bar2_veneer>:
30067 + 1014: e51ff004 ldr pc, \[pc, #-4\] ; 1018 <__bar2_veneer\+0x4>
30068 + 1018: 02003024 .word 0x02003024
30069 + 101c: 00000000 .word 0x00000000
30070 +00001020 <myfunc>:
30071 + 1020: eb000008 bl 1048 <__bar3_veneer>
30072 + 1024: eb000004 bl 103c <__bar4_from_arm>
30073 + 1028: eb000000 bl 1030 <__bar5_from_arm>
30074 + 102c: 00000000 andeq r0, r0, r0
30075 +00001030 <__bar5_from_arm>:
30076 + 1030: e59fc000 ldr ip, \[pc, #0\] ; 1038 <__bar5_from_arm\+0x8>
30077 + 1034: e12fff1c bx ip
30078 + 1038: 0200302f .word 0x0200302f
30079 +0000103c <__bar4_from_arm>:
30080 + 103c: e59fc000 ldr ip, \[pc, #0\] ; 1044 <__bar4_from_arm\+0x8>
30081 + 1040: e12fff1c bx ip
30082 + 1044: 0200302d .word 0x0200302d
30083 +00001048 <__bar3_veneer>:
30084 + 1048: e51ff004 ldr pc, \[pc, #-4\] ; 104c <__bar3_veneer\+0x4>
30085 + 104c: 02003028 .word 0x02003028
30088 -00001048 <myfunc>:
30089 - 1048: ebfffff4 bl 1020 <__bar3_veneer>
30090 - 104c: ebfffff8 bl 1034 <__bar4_from_arm>
30091 - 1050: ebfffff4 bl 1028 <__bar5_from_arm>
30092 Disassembly of section .foo:
30095 --- a/ld/testsuite/ld-arm/farcall-group.d
30096 +++ b/ld/testsuite/ld-arm/farcall-group.d
30099 Disassembly of section .text:
30101 -00001000 <__bar2_veneer>:
30102 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar2_veneer\+0x4>
30103 - 1004: 02003024 .word 0x02003024
30104 -00001008 <__bar_from_arm>:
30105 - 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
30106 - 100c: e12fff1c bx ip
30107 - 1010: 02003021 .word 0x02003021
30108 -00001014 <__bar3_veneer>:
30109 - 1014: e51ff004 ldr pc, \[pc, #-4\] ; 1018 <__bar3_veneer\+0x4>
30110 - 1018: 02003028 .word 0x02003028
30111 -0000101c <__bar4_from_arm>:
30112 - 101c: e59fc000 ldr ip, \[pc, #0\] ; 1024 <__bar4_from_arm\+0x8>
30113 - 1020: e12fff1c bx ip
30114 - 1024: 0200302d .word 0x0200302d
30115 -00001028 <__bar5_from_arm>:
30116 - 1028: e59fc000 ldr ip, \[pc, #0\] ; 1030 <__bar5_from_arm\+0x8>
30117 - 102c: e12fff1c bx ip
30118 - 1030: 0200302f .word 0x0200302f
30119 +00001000 <_start>:
30120 + 1000: eb00000c bl 1038 <__bar_from_arm>
30121 + 1004: eb00000e bl 1044 <__bar2_veneer>
30123 +00001008 <myfunc>:
30124 + 1008: eb000008 bl 1030 <__bar3_veneer>
30125 + 100c: eb000004 bl 1024 <__bar4_from_arm>
30126 + 1010: eb000000 bl 1018 <__bar5_from_arm>
30127 + 1014: 00000000 andeq r0, r0, r0
30129 +00001018 <__bar5_from_arm>:
30130 + 1018: e59fc000 ldr ip, \[pc, #0\] ; 1020 <__bar5_from_arm\+0x8>
30131 + 101c: e12fff1c bx ip
30132 + 1020: 0200302f .word 0x0200302f
30133 +00001024 <__bar4_from_arm>:
30134 + 1024: e59fc000 ldr ip, \[pc, #0\] ; 102c <__bar4_from_arm\+0x8>
30135 + 1028: e12fff1c bx ip
30136 + 102c: 0200302d .word 0x0200302d
30137 +00001030 <__bar3_veneer>:
30138 + 1030: e51ff004 ldr pc, \[pc, #-4\] ; 1034 <__bar3_veneer\+0x4>
30139 + 1034: 02003028 .word 0x02003028
30140 +00001038 <__bar_from_arm>:
30141 + 1038: e59fc000 ldr ip, \[pc, #0\] ; 1040 <__bar_from_arm\+0x8>
30142 + 103c: e12fff1c bx ip
30143 + 1040: 02003021 .word 0x02003021
30144 +00001044 <__bar2_veneer>:
30145 + 1044: e51ff004 ldr pc, \[pc, #-4\] ; 1048 <__bar2_veneer\+0x4>
30146 + 1048: 02003024 .word 0x02003024
30149 -00001040 <_start>:
30150 - 1040: ebfffff0 bl 1008 <__bar_from_arm>
30151 - 1044: ebffffed bl 1000 <__bar2_veneer>
30153 -00001048 <myfunc>:
30154 - 1048: ebfffff1 bl 1014 <__bar3_veneer>
30155 - 104c: ebfffff2 bl 101c <__bar4_from_arm>
30156 - 1050: ebfffff4 bl 1028 <__bar5_from_arm>
30157 Disassembly of section .foo:
30160 --- a/ld/testsuite/ld-arm/farcall-mix.d
30161 +++ b/ld/testsuite/ld-arm/farcall-mix.d
30164 Disassembly of section .text:
30166 -00001000 <__bar2_veneer>:
30167 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar2_veneer\+0x4>
30168 - 1004: 02002024 .word 0x02002024
30169 -00001008 <__bar_from_arm>:
30170 - 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
30171 - 100c: e12fff1c bx ip
30172 - 1010: 02002021 .word 0x02002021
30173 -00001014 <__bar3_veneer>:
30174 - 1014: e51ff004 ldr pc, \[pc, #-4\] ; 1018 <__bar3_veneer\+0x4>
30175 - 1018: 02002028 .word 0x02002028
30176 -0000101c <__bar4_from_arm>:
30177 - 101c: e59fc000 ldr ip, \[pc, #0\] ; 1024 <__bar4_from_arm\+0x8>
30178 - 1020: e12fff1c bx ip
30179 - 1024: 0200202d .word 0x0200202d
30180 -00001028 <__bar5_from_arm>:
30181 - 1028: e59fc000 ldr ip, \[pc, #0\] ; 1030 <__bar5_from_arm\+0x8>
30182 - 102c: e12fff1c bx ip
30183 - 1030: 0200202f .word 0x0200202f
30184 +00001000 <_start>:
30185 + 1000: eb000009 bl 102c <__bar_from_arm>
30186 + 1004: eb00000b bl 1038 <__bar2_veneer>
30187 + 1008: eb000005 bl 1024 <__bar3_veneer>
30188 + 100c: eb00000b bl 1040 <__bar4_from_arm>
30189 + 1010: eb000000 bl 1018 <__bar5_from_arm>
30190 + 1014: 00000000 andeq r0, r0, r0
30192 +00001018 <__bar5_from_arm>:
30193 + 1018: e59fc000 ldr ip, \[pc, #0\] ; 1020 <__bar5_from_arm\+0x8>
30194 + 101c: e12fff1c bx ip
30195 + 1020: 0200202f .word 0x0200202f
30196 +00001024 <__bar3_veneer>:
30197 + 1024: e51ff004 ldr pc, \[pc, #-4\] ; 1028 <__bar3_veneer\+0x4>
30198 + 1028: 02002028 .word 0x02002028
30199 +0000102c <__bar_from_arm>:
30200 + 102c: e59fc000 ldr ip, \[pc, #0\] ; 1034 <__bar_from_arm\+0x8>
30201 + 1030: e12fff1c bx ip
30202 + 1034: 02002021 .word 0x02002021
30203 +00001038 <__bar2_veneer>:
30204 + 1038: e51ff004 ldr pc, \[pc, #-4\] ; 103c <__bar2_veneer\+0x4>
30205 + 103c: 02002024 .word 0x02002024
30206 +00001040 <__bar4_from_arm>:
30207 + 1040: e59fc000 ldr ip, \[pc, #0\] ; 1048 <__bar4_from_arm\+0x8>
30208 + 1044: e12fff1c bx ip
30209 + 1048: 0200202d .word 0x0200202d
30212 -00001040 <_start>:
30213 - 1040: ebfffff0 bl 1008 <__bar_from_arm>
30214 - 1044: ebffffed bl 1000 <__bar2_veneer>
30215 - 1048: ebfffff1 bl 1014 <__bar3_veneer>
30216 - 104c: ebfffff2 bl 101c <__bar4_from_arm>
30217 - 1050: ebfffff4 bl 1028 <__bar5_from_arm>
30218 Disassembly of section .foo:
30221 --- a/ld/testsuite/ld-arm/farcall-mix2.d
30222 +++ b/ld/testsuite/ld-arm/farcall-mix2.d
30225 Disassembly of section .text:
30227 -00001000 <__bar2_veneer>:
30228 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar2_veneer\+0x4>
30229 - 1004: 02003024 .word 0x02003024
30230 +00001000 <_start>:
30231 + 1000: eb000000 bl 1008 <__bar_from_arm>
30232 + 1004: eb000002 bl 1014 <__bar2_veneer>
30234 00001008 <__bar_from_arm>:
30235 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
30236 100c: e12fff1c bx ip
30237 1010: 02003021 .word 0x02003021
30238 - 1014: 00000000 .word 0x00000000
30240 -00001018 <_start>:
30241 - 1018: ebfffffa bl 1008 <__bar_from_arm>
30242 - 101c: ebfffff7 bl 1000 <__bar2_veneer>
30243 +00001014 <__bar2_veneer>:
30244 + 1014: e51ff004 ldr pc, \[pc, #-4\] ; 1018 <__bar2_veneer\+0x4>
30245 + 1018: 02003024 .word 0x02003024
30246 + 101c: 00000000 .word 0x00000000
30247 Disassembly of section .mytext:
30249 -00002000 <__bar5_from_arm>:
30250 - 2000: e59fc000 ldr ip, \[pc, #0\] ; 2008 <__bar5_from_arm\+0x8>
30251 - 2004: e12fff1c bx ip
30252 - 2008: 0200302f .word 0x0200302f
30253 -0000200c <__bar3_veneer>:
30254 - 200c: e51ff004 ldr pc, \[pc, #-4\] ; 2010 <__bar3_veneer\+0x4>
30255 - 2010: 02003028 .word 0x02003028
30256 -00002014 <__bar4_from_arm>:
30257 - 2014: e59fc000 ldr ip, \[pc, #0\] ; 201c <__bar4_from_arm\+0x8>
30258 - 2018: e12fff1c bx ip
30259 - 201c: 0200302d .word 0x0200302d
30260 +00002000 <__bar5_from_arm-0x10>:
30261 + 2000: eb000008 bl 2028 <__bar3_veneer>
30262 + 2004: eb000004 bl 201c <__bar4_from_arm>
30263 + 2008: eb000000 bl 2010 <__bar5_from_arm>
30264 + 200c: 00000000 andeq r0, r0, r0
30265 +00002010 <__bar5_from_arm>:
30266 + 2010: e59fc000 ldr ip, \[pc, #0\] ; 2018 <__bar5_from_arm\+0x8>
30267 + 2014: e12fff1c bx ip
30268 + 2018: 0200302f .word 0x0200302f
30269 +0000201c <__bar4_from_arm>:
30270 + 201c: e59fc000 ldr ip, \[pc, #0\] ; 2024 <__bar4_from_arm\+0x8>
30271 + 2020: e12fff1c bx ip
30272 + 2024: 0200302d .word 0x0200302d
30273 +00002028 <__bar3_veneer>:
30274 + 2028: e51ff004 ldr pc, \[pc, #-4\] ; 202c <__bar3_veneer\+0x4>
30275 + 202c: 02003028 .word 0x02003028
30277 - 2028: ebfffff7 bl 200c <__bar3_veneer>
30278 - 202c: ebfffff8 bl 2014 <__bar4_from_arm>
30279 - 2030: ebfffff2 bl 2000 <__bar5_from_arm>
30280 Disassembly of section .foo:
30284 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-be8.d
30286 +.*: file format .*
30288 +Disassembly of section .text:
30290 +00001000 <_start>:
30291 + 1000: 00f0 02f8 bl 1008 <__bar_from_thumb>
30292 + 1004: 0000 lsls r0, r0, #0
30295 +00001008 <__bar_from_thumb>:
30298 + 100c: 04f01fe5 ldr pc, \[pc, #-4\] ; 1010 <__bar_from_thumb\+0x8>
30299 + 1010: 02001014 .word 0x02001014
30300 + 1014: 00000000 .word 0x00000000
30301 +Disassembly of section .foo:
30304 + 2001014: 1eff2fe1 bx lr
30305 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d
30306 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-blx-pic-veneer.d
30309 Disassembly of section .text:
30311 -00001000 <__bar_from_thumb>:
30312 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_from_thumb\+0x8>
30313 - 1004: e08ff00c add pc, pc, ip
30314 - 1008: 0200000c .word 0x0200000c
30315 - 100c: 00000000 .word 0x00000000
30316 +00001000 <_start>:
30317 + 1000: f000 e802 blx 1008 <__bar_from_thumb>
30318 + 1004: 0000 lsls r0, r0, #0
30321 -00001010 <_start>:
30322 - 1010: f7ff eff6 blx 1000 <__bar_from_thumb>
30323 +00001008 <__bar_from_thumb>:
30324 + 1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_thumb\+0x8>
30325 + 100c: e08ff00c add pc, pc, ip
30326 + 1010: 02000000 .word 0x02000000
30327 + 1014: 00000000 .word 0x00000000
30328 Disassembly of section .foo:
30331 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d
30332 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-blx.d
30335 Disassembly of section .text:
30337 -00001000 <__bar_from_thumb>:
30338 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_from_thumb\+0x4>
30339 - 1004: 02001014 .word 0x02001014
30340 +00001000 <_start>:
30341 + 1000: f000 e802 blx 1008 <__bar_from_thumb>
30342 + 1004: 0000 lsls r0, r0, #0
30345 -00001008 <_start>:
30346 - 1008: f7ff effa blx 1000 <__bar_from_thumb>
30347 +00001008 <__bar_from_thumb>:
30348 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_from_thumb\+0x4>
30349 + 100c: 02001014 .word 0x02001014
30350 Disassembly of section .foo:
30353 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d
30354 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d
30356 -#name: Thumb-Thumb farcall without BLX
30357 -#source: farcall-thumb-thumb.s
30358 -#as: -march=armv4t
30359 -#ld: -Ttext 0x1000 --section-start .foo=0x2001014
30360 +#name: Thumb-ARM farcall without BLX (PIC veneer)
30361 +#source: farcall-thumb-arm.s
30362 +#as: -march=armv4t -W
30363 +#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer
30364 #error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30365 --- a/ld/testsuite/ld-arm/farcall-thumb-arm-short.d
30366 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm-short.d
30369 Disassembly of section .text:
30371 -00001000 <__bar_from_thumb>:
30373 - 1002: 46c0 nop \(mov r8, r8\)
30374 - 1004: ea000402 b 2014 <bar>
30375 -00001008 <_start>:
30376 - 1008: f7ff fffa bl 1000 <__bar_from_thumb>
30377 +00001000 <_start>:
30378 + 1000: f000 f802 bl 1008 <__bar_from_thumb>
30379 + 1004: 0000 lsls r0, r0, #0
30382 +00001008 <__bar_from_thumb>:
30384 + 100a: 46c0 nop \(mov r8, r8\)
30385 + 100c: ea000400 b 2014 <bar>
30386 Disassembly of section .foo:
30389 --- a/ld/testsuite/ld-arm/farcall-thumb-arm.d
30390 +++ b/ld/testsuite/ld-arm/farcall-thumb-arm.d
30393 Disassembly of section .text:
30395 -00001000 <__bar_from_thumb>:
30396 - 1000: b540 push {r6, lr}
30397 - 1002: 4e03 ldr r6, \[pc, #12\] \(1010 <__bar_from_thumb\+0x10>\)
30398 - 1004: 46fe mov lr, pc
30400 - 1008: e8bd4040 pop {r6, lr}
30401 - 100c: e12fff1e bx lr
30402 +00001000 <_start>:
30403 + 1000: f000 f802 bl 1008 <__bar_from_thumb>
30404 + 1004: 0000 lsls r0, r0, #0
30407 +00001008 <__bar_from_thumb>:
30409 + 100a: 46c0 nop \(mov r8, r8\)
30410 + 100c: e51ff004 ldr pc, \[pc, #-4\] ; 1010 <__bar_from_thumb\+0x8>
30411 1010: 02001014 .word 0x02001014
30412 1014: 00000000 .word 0x00000000
30414 -00001018 <_start>:
30415 - 1018: f7ff fff2 bl 1000 <__bar_from_thumb>
30416 Disassembly of section .foo:
30419 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-blx-pic-veneer.d
30420 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-blx-pic-veneer.d
30423 Disassembly of section .text:
30425 -00001000 <__bar_veneer>:
30426 - 1000: e59fc000 ldr ip, \[pc, #0\] ; 1008 <__bar_veneer\+0x8>
30427 - 1004: e08ff00c add pc, pc, ip
30428 - 1008: 0200000d .word 0x0200000d
30429 - 100c: 00000000 .word 0x00000000
30430 +00001000 <_start>:
30431 + 1000: f000 e802 blx 1008 <__bar_veneer>
30432 + 1004: 0000 lsls r0, r0, #0
30435 -00001010 <_start>:
30436 - 1010: f7ff eff6 blx 1000 <__bar_veneer>
30437 +00001008 <__bar_veneer>:
30438 + 1008: e59fc004 ldr ip, \[pc, #4\] ; 1014 <__bar_veneer\+0xc>
30439 + 100c: e08fc00c add ip, pc, ip
30440 + 1010: e12fff1c bx ip
30441 + 1014: 02000001 .word 0x02000001
30442 Disassembly of section .foo:
30445 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-blx.d
30446 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-blx.d
30449 Disassembly of section .text:
30451 -00001000 <__bar_veneer>:
30452 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_veneer\+0x4>
30453 - 1004: 02001015 .word 0x02001015
30454 +00001000 <_start>:
30455 + 1000: f000 e802 blx 1008 <__bar_veneer>
30456 + 1004: 0000 lsls r0, r0, #0
30459 -00001008 <_start>:
30460 - 1008: f7ff effa blx 1000 <__bar_veneer>
30461 +00001008 <__bar_veneer>:
30462 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_veneer\+0x4>
30463 + 100c: 02001015 .word 0x02001015
30464 Disassembly of section .foo:
30467 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d
30468 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m-pic-veneer.d
30470 -#name: Thumb-Thumb farcall without BLX
30471 +#name: Thumb-Thumb farcall M profile (PIC veneer)
30472 #source: farcall-thumb-thumb.s
30474 -#ld: -Ttext 0x1000 --section-start .foo=0x2001014
30475 +#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer
30476 #error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30477 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-m.d
30478 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-m.d
30481 Disassembly of section .text:
30483 -00001000 <__bar_veneer>:
30484 - 1000: b540 push {r6, lr}
30485 - 1002: 4e02 ldr r6, \[pc, #8\] \(100c <__bar_veneer\+0xc>\)
30486 - 1004: 46fe mov lr, pc
30488 - 1008: bd40 pop {r6, pc}
30490 - 100c: 02001015 .word 0x02001015
30491 +00001000 <_start>:
30492 + 1000: f000 f802 bl 1008 <__bar_veneer>
30493 + 1004: 0000 lsls r0, r0, #0
30496 -00001010 <_start>:
30497 - 1010: f7ff fff6 bl 1000 <__bar_veneer>
30498 +00001008 <__bar_veneer>:
30499 + 1008: b401 push {r0}
30500 + 100a: 4802 ldr r0, \[pc, #8\] \(1014 <__bar_veneer\+0xc>\)
30501 + 100c: 4684 mov ip, r0
30502 + 100e: bc01 pop {r0}
30505 + 1014: 02001015 .word 0x02001015
30506 Disassembly of section .foo:
30509 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d
30510 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d
30512 -#name: Thumb-Thumb farcall without BLX
30513 +#name: Thumb-Thumb farcall without BLX (PIC veneer)
30514 #source: farcall-thumb-thumb.s
30516 -#ld: -Ttext 0x1000 --section-start .foo=0x2001014
30517 +#ld: -Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer
30518 #error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30519 --- a/ld/testsuite/ld-arm/farcall-thumb-thumb.d
30520 +++ b/ld/testsuite/ld-arm/farcall-thumb-thumb.d
30522 -#name: Thumb-Thumb farcall without BLX
30523 -#source: farcall-thumb-thumb.s
30524 -#as: -march=armv4t
30525 -#ld: -Ttext 0x1000 --section-start .foo=0x2001014
30526 -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30527 +.*: file format .*
30529 +Disassembly of section .text:
30531 +00001000 <_start>:
30532 + 1000: f000 f802 bl 1008 <__bar_veneer>
30533 + 1004: 0000 lsls r0, r0, #0
30536 +00001008 <__bar_veneer>:
30537 + 1008: b401 push {r0}
30538 + 100a: 4802 ldr r0, \[pc, #8\] \(1014 <__bar_veneer\+0xc>\)
30539 + 100c: 4684 mov ip, r0
30540 + 100e: bc01 pop {r0}
30543 + 1014: 02001015 .word 0x02001015
30544 +Disassembly of section .foo:
30547 + 2001014: 4770 bx lr
30549 +++ b/ld/testsuite/ld-arm/script-type.ld
30555 + .text : { *(.text) }
30556 + .ARM.attribues 0 : { *(.ARM.attributes) }
30559 +++ b/ld/testsuite/ld-arm/script-type.s
30564 +.type bar_a %function
30570 +.type bar_o %object
30577 +.type bar_t %function
30582 +++ b/ld/testsuite/ld-arm/script-type.sym
30585 +Symbol table '.symtab' contains 13 entries:
30586 + Num: Value Size Type Bind Vis Ndx Name
30587 + 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
30588 + 1: 00000000 0 SECTION LOCAL DEFAULT 1
30589 + 2: 00000000 0 SECTION LOCAL DEFAULT 2
30590 + 3: 00000000 0 NOTYPE LOCAL DEFAULT 1 \$a
30591 + 4: 00000010 0 NOTYPE LOCAL DEFAULT 1 \$d
30592 + 5: 00000014 0 NOTYPE LOCAL DEFAULT 1 \$a
30593 + 6: 00000020 0 NOTYPE LOCAL DEFAULT 1 \$t
30594 + 7: 00000010 0 OBJECT GLOBAL DEFAULT 1 bar_o
30595 + 8: 00000021 0 FUNC GLOBAL DEFAULT 1 bar_t
30596 + 9: 00000000 0 FUNC GLOBAL DEFAULT 1 foo_a
30597 + 10: 00000021 0 FUNC GLOBAL DEFAULT 1 foo_t
30598 + 11: 00000010 0 OBJECT GLOBAL DEFAULT 1 foo_o
30599 + 12: 00000000 0 FUNC GLOBAL DEFAULT 1 bar_a
30600 --- a/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d
30601 +++ b/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d
30603 -#name: Thumb-2-as-Thumb-1 BL failure test
30604 -#source: thumb2-bl-as-thumb1-bad.s
30605 -#ld: -Ttext 0x1000 --section-start .foo=0x401004
30606 -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30607 +.*: file format .*
30609 +Disassembly of section .text:
30611 +00001000 <__bar_veneer>:
30612 + 1000: b401 push {r0}
30613 + 1002: 4802 ldr r0, \[pc, #8\] \(100c <__bar_veneer\+0xc>\)
30614 + 1004: 4684 mov ip, r0
30615 + 1006: bc01 pop {r0}
30618 + 100c: 0100100d .word 0x0100100d
30620 +00001010 <_start>:
30621 + 1010: f7ff fff6 bl 1000 <__bar_veneer>
30622 +Disassembly of section .foo:
30625 + 100100c: 4770 bx lr
30626 --- a/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad.d
30627 +++ b/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad.d
30630 Disassembly of section .text:
30632 -00001000 <__bar_veneer>:
30633 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_veneer\+0x4>
30634 - 1004: 0040100d .word 0x0040100d
30635 +00001000 <_start>:
30636 + 1000: f000 e802 blx 1008 <__bar_veneer>
30637 + 1004: 0000 lsls r0, r0, #0
30640 +00001008 <__bar_veneer>:
30641 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_veneer\+0x4>
30642 + 100c: 0100100d .word 0x0100100d
30644 -00001008 <_start>:
30645 - 1008: f7ff effa blx 1000 <__bar_veneer>
30646 Disassembly of section .foo:
30649 - 40100c: 4770 bx lr
30651 + 100100c: 4770 bx lr
30652 --- a/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad.s
30653 +++ b/ld/testsuite/ld-arm/thumb2-bl-as-thumb1-bad.s
30658 -@ We will place the section .foo at 0x40100c.
30659 +@ We will place the section .foo at 0x100100c.
30661 .section .foo, "xa"
30663 --- a/ld/testsuite/ld-arm/thumb2-bl-bad-noeabi.d
30664 +++ b/ld/testsuite/ld-arm/thumb2-bl-bad-noeabi.d
30666 -#name: Thumb-2 BL failure test
30667 -#source: thumb2-bl-bad.s
30668 -#ld: -Ttext 0x1000 --section-start .foo=0x1001004
30669 -#error: .*\(.text\+0x0\): relocation truncated to fit: R_ARM_THM_CALL against `bar'
30670 +.*: file format .*
30672 +Disassembly of section .text:
30674 +00001000 <__bar_veneer>:
30675 + 1000: b401 push {r0}
30676 + 1002: 4802 ldr r0, \[pc, #8\] \(100c <__bar_veneer\+0xc>\)
30677 + 1004: 4684 mov ip, r0
30678 + 1006: bc01 pop {r0}
30681 + 100c: 0100100d .word 0x0100100d
30683 +00001010 <_start>:
30684 + 1010: f7ff fff6 bl 1000 <__bar_veneer>
30685 +Disassembly of section .foo:
30688 + 100100c: 4770 bx lr
30689 --- a/ld/testsuite/ld-arm/thumb2-bl-bad.d
30690 +++ b/ld/testsuite/ld-arm/thumb2-bl-bad.d
30693 Disassembly of section .text:
30695 -00001000 <__bar_veneer>:
30696 - 1000: e51ff004 ldr pc, \[pc, #-4\] ; 1004 <__bar_veneer\+0x4>
30697 - 1004: 0100100d .word 0x0100100d
30698 +00001000 <_start>:
30699 + 1000: f000 e802 blx 1008 <__bar_veneer>
30700 + 1004: 0000 lsls r0, r0, #0
30703 -00001008 <_start>:
30704 - 1008: f7ff effa blx 1000 <__bar_veneer>
30705 +00001008 <__bar_veneer>:
30706 + 1008: e51ff004 ldr pc, \[pc, #-4\] ; 100c <__bar_veneer\+0x4>
30707 + 100c: 0100100d .word 0x0100100d
30708 Disassembly of section .foo:
30712 +++ b/ld/testsuite/ld-arm/thumb2-bl-blx-interwork.d
30715 +.*: file format .*
30718 +Disassembly of section \.text:
30720 +00008000 <_start>:
30727 + 8014: f000 e81c blx 8050 <arm0>
30728 + 8018: f000 e820 blx 805c <arm4>
30730 + 801e: f000 e818 blx 8050 <arm0>
30731 + 8022: f000 e81c blx 805c <arm4>
30733 + 8028: f000 f81e bl 8068 <thumb0>
30734 + 802c: f000 f821 bl 8072 <thumb2>
30735 + 8030: f000 f824 bl 807c <thumb4>
30736 + 8034: f000 f827 bl 8086 <thumb6>
30738 + 803a: f000 f815 bl 8068 <thumb0>
30739 + 803e: f000 f818 bl 8072 <thumb2>
30740 + 8042: f000 f81b bl 807c <thumb4>
30741 + 8046: f000 f81e bl 8086 <thumb6>
30743 + 804c: e320f000 nop \{0\}
30746 + 8050: e12fff1e bx lr
30748 +00008054 <\.real_start_ofarm0>:
30750 + 8056: 0000 .short 0x0000
30751 + 8058: e320f000 nop \{0\}
30754 + 805c: e12fff1e bx lr
30756 +00008060 <\.real_start_ofarm4>:
30758 + 8062: 0000 .short 0x0000
30759 + 8064: f3af 8000 nop\.w
30761 +00008068 <thumb0>:
30764 + 806c: f3af 8000 nop\.w
30767 +00008072 <thumb2>:
30769 + 8074: f3af 8000 nop\.w
30773 +0000807c <thumb4>:
30780 +00008086 <thumb6>:
30783 +00008088 <backwards>:
30784 + 8088: f7ff ffe4 bl 8054 <\.real_start_ofarm0>
30785 + 808c: f7ff ffe8 bl 8060 <\.real_start_ofarm4>
30787 + 8092: f7ff ffdf bl 8054 <\.real_start_ofarm0>
30788 + 8096: f7ff ffe3 bl 8060 <\.real_start_ofarm4>
30790 + 809c: f7ff efd8 blx 8050 <arm0>
30791 + 80a0: f7ff efdc blx 805c <arm4>
30793 + 80a6: f7ff efd4 blx 8050 <arm0>
30794 + 80aa: f7ff efd8 blx 805c <arm4>
30796 + 80b0: f7ff ffda bl 8068 <thumb0>
30797 + 80b4: f7ff ffdd bl 8072 <thumb2>
30798 + 80b8: f7ff ffe0 bl 807c <thumb4>
30799 + 80bc: f7ff ffe3 bl 8086 <thumb6>
30801 + 80c2: f7ff ffd1 bl 8068 <thumb0>
30802 + 80c6: f7ff ffd4 bl 8072 <thumb2>
30803 + 80ca: f7ff ffd7 bl 807c <thumb4>
30804 + 80ce: f7ff ffda bl 8086 <thumb6>
30806 + 80d4: f3af 8000 nop\.w
30808 +++ b/ld/testsuite/ld-arm/thumb2-bl-blx-interwork.s
30817 + @ These four instructions interwork (by calling a ".real_start_of"
30818 + @ Thumb entry point for a function), but only for backward references.
30841 + @ These eight are all accepted with current gas, but generate bad code.
30865 +.real_start_ofarm0:
30876 +.real_start_ofarm4:
30910 +++ b/ld/testsuite/ld-arm/unwind-1.d
30918 +Contents of section .ARM.exidx:
30919 + 8008 (f8ffff7f b0b0a880 f4ffff7f 01000000|7ffffff8 80a8b0b0 7ffffff4 00000001) .*
30920 +Contents of section .far:
30923 +++ b/ld/testsuite/ld-arm/unwind-1.s
30928 + .type _start, %function
30935 + @ Section with no unwinding information. Linker should insert a cantunwind entry.
30936 + .section .after, "xa"
30937 + .global __aeabi_unwind_cpp_pr0
30938 + .type __aeabi_unwind_cpp_pr0, %function
30939 +__aeabi_unwind_cpp_pr0:
30945 +++ b/ld/testsuite/ld-arm/unwind-2.d
30953 +Contents of section .ARM.exidx:
30954 + 8004 (fcffff7f b0b0a880 f8ffff7f 01000000|7ffffffc 80a8b0b0 7ffffff8 00000001) .*
30955 +Contents of section .far:
30958 +++ b/ld/testsuite/ld-arm/unwind-2.s
30963 + .global __aeabi_unwind_cpp_pr0
30964 + .type __aeabi_unwind_cpp_pr0, %function
30965 +__aeabi_unwind_cpp_pr0:
30967 + .type _start, %function
30974 + @ last text section has unwind information. Linker should append a
30975 + @ terminating cantunwind entry.
30980 +++ b/ld/testsuite/ld-arm/unwind-3.d
30988 +Contents of section .ARM.exidx:
30989 + 800c (f4ffff7f b0b0a880 f0ffff7f 01000000|7ffffff4 80a8b0b0 7ffffff0 00000001) .*
30990 + 801c (ecffff7f b0b0a880 e8ffff7f 01000000|7fffffec 80a8b0b0 7fffffe8 00000001) .*
30991 +Contents of section .far:
30994 +++ b/ld/testsuite/ld-arm/unwind-3.s
30998 + @ section without unwind info
31000 + .type _start, %function
31004 + @ Section that will be placed first
31005 + .section .before, "xa"
31006 + .type _before, %function
31013 + @ section that will be placed last
31014 + .section .after, "xa"
31015 + .global __aeabi_unwind_cpp_pr0
31016 + .type __aeabi_unwind_cpp_pr0, %function
31017 +__aeabi_unwind_cpp_pr0:
31026 +++ b/ld/testsuite/ld-arm/unwind-4.d
31034 +Contents of section .ARM.exidx:
31035 + 8020 (e0ffff7f b0b0a880 dcffff7f e8ffff7f|7fffffe0 80a8b0b0 7fffffdc 7fffffe8) .*
31036 + 8030 (d8ffff7f b0b0a880 d8ffff7f 01000000|7fffffd8 80a8b0b0 7fffffd8 00000001) .*
31037 +Contents of section .far:
31040 +++ b/ld/testsuite/ld-arm/unwind-4.s
31044 + @ out of line table entry
31046 + .type _start, %function
31055 + @ entry that can be merged
31061 + @ Section that will be placed first
31062 + .section .before, "xa"
31063 + .type _before, %function
31070 + @ section that will be placed last
31071 + .section .after, "xa"
31072 + .global __aeabi_unwind_cpp_pr0
31073 + .type __aeabi_unwind_cpp_pr0, %function
31074 +__aeabi_unwind_cpp_pr0:
31079 + @ final function is cantunwind, so output table size is smaller
31080 + @ than sum of input sections
31081 + .global __aeabi_unwind_cpp_pr1
31082 + .type __aeabi_unwind_cpp_pr1, %function
31083 +__aeabi_unwind_cpp_pr1:
31091 --- a/ld/testsuite/ld-elf/eh5.d
31092 +++ b/ld/testsuite/ld-elf/eh5.d
31093 @@ -14,7 +14,7 @@ Contents of the .eh_frame section:
31094 Code alignment factor: .*
31095 Data alignment factor: .*
31096 Return address column: .*
31097 - Augmentation data: 1b
31098 + Augmentation data: (0|1)b
31102 @@ -33,7 +33,7 @@ Contents of the .eh_frame section:
31103 Code alignment factor: .*
31104 Data alignment factor: .*
31105 Return address column: .*
31106 - Augmentation data: 03 .. .. .. .. 1b
31107 + Augmentation data: 03 .. .. .. .. (0|1)b
31111 @@ -57,7 +57,7 @@ Contents of the .eh_frame section:
31112 Code alignment factor: .*
31113 Data alignment factor: .*
31114 Return address column: .*
31115 - Augmentation data: 03 .. .. .. .. 0c 1b
31116 + Augmentation data: 03 .. .. .. .. 0c (0|1)b
31120 @@ -78,7 +78,7 @@ Contents of the .eh_frame section:
31121 Code alignment factor: .*
31122 Data alignment factor: .*
31123 Return address column: .*
31124 - Augmentation data: 1b
31125 + Augmentation data: (0|1)b
31127 DW_CFA_def_cfa: r0( \([er]ax\)|) ofs 16
31129 @@ -93,7 +93,7 @@ Contents of the .eh_frame section:
31130 Code alignment factor: .*
31131 Data alignment factor: .*
31132 Return address column: .*
31133 - Augmentation data: 03 .. .. .. .. 1b
31134 + Augmentation data: 03 .. .. .. .. (0|1)b
31138 @@ -115,7 +115,7 @@ Contents of the .eh_frame section:
31139 Code alignment factor: .*
31140 Data alignment factor: .*
31141 Return address column: .*
31142 - Augmentation data: 03 .. .. .. .. 0c 1b
31143 + Augmentation data: 03 .. .. .. .. 0c (0|1)b
31147 --- a/ld/testsuite/ld-elfcomm/elfcomm.exp
31148 +++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
31149 @@ -175,9 +175,10 @@ proc assembler_generates_commons {} {
31154 -if { ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
31155 - || ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
31156 +# Explicitly use "-fcommon" so that even if $CFLAGS includes
31157 +# "-fno-common", these tests are compiled as expected.
31158 +if { ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
31159 + || ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
31164 +++ b/ld/testsuite/ld-scripts/rgn-at.exp
31166 +# Test for proper diagnosis of overflowed memory regions.
31167 +# Copyright 2009 Free Software Foundation, Inc.
31169 +# This file is part of the GNU Binutils.
31171 +# This program is free software; you can redistribute it and/or modify
31172 +# it under the terms of the GNU General Public License as published by
31173 +# the Free Software Foundation; either version 3 of the License, or
31174 +# (at your option) any later version.
31176 +# This program is distributed in the hope that it will be useful,
31177 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
31178 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31179 +# GNU General Public License for more details.
31181 +# You should have received a copy of the GNU General Public License
31182 +# along with this program; if not, write to the Free Software
31183 +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
31184 +# MA 02110-1301, USA.
31186 +if ![is_elf_format] {
31190 +load_lib ld-lib.exp
31192 +set test_list [lsort [glob -nocomplain $srcdir/$subdir/rgn-at*.d]]
31193 +foreach test_file $test_list {
31194 + set test_name [file rootname $test_file]
31195 + set map_file "tmpdir/[file tail $test_name].map"
31196 + verbose $test_name
31197 + run_dump_test $test_name
31200 +++ b/ld/testsuite/ld-scripts/rgn-at.s
31209 +++ b/ld/testsuite/ld-scripts/rgn-at1.d
31212 +# source: rgn-at.s
31213 +# ld: -T rgn-at1.t
31216 +.*: file format .*
31219 +Idx +Name +Size +VMA +LMA +File off +Algn +Flags
31220 + 0 .text +0+[0-9a-f][0-9a-f] +0+0010000 +0+0020000 +.*
31221 + 1 .data +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00200[0-9a-f]+ +.*
31222 + 2 .bss +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00200[0-9a-f]+ +.*
31224 +++ b/ld/testsuite/ld-scripts/rgn-at1.t
31226 +/* Memory region at test, >AT should propagate by default */
31229 + ram : ORIGIN = 0x10000, LENGTH = 0x100
31230 + rom : ORIGIN = 0x20000, LENGTH = 0x200
31234 + .text : { *(.text) } >ram AT>rom
31235 + .data : { *(.data) } >ram /* default AT>rom */
31236 + .bss : { *(.bss) } >ram
31237 + /DISCARD/ : { *(*) }
31240 +++ b/ld/testsuite/ld-scripts/rgn-at2.d
31243 +# source: rgn-at.s
31244 +# ld: -T rgn-at2.t
31247 +.*: file format .*
31250 +Idx +Name +Size +VMA +LMA +File off +Algn +Flags
31251 + 0 .text +0+[0-9a-f][0-9a-f] +0+0010000 +0+0020000 +.*
31252 + 1 .data +0+[0-9a-f][0-9a-f] +0+0030000 +0+0030000 +.*
31253 + 2 .bss +0+[0-9a-f][0-9a-f] +0+00300[0-9a-f]+ +0+00300[0-9a-f]+ +.*
31255 +++ b/ld/testsuite/ld-scripts/rgn-at2.t
31257 +/* Memory region at test, >AT should propagate by default */
31260 + ram : ORIGIN = 0x10000, LENGTH = 0x100
31261 + rom : ORIGIN = 0x20000, LENGTH = 0x200
31262 + other : ORIGIN = 0x30000, LENGTH = 0x200
31266 + .text : { *(.text) } >ram AT>rom
31267 + .data : { *(.data) } >other /* No default AT>rom */
31268 + .bss : { *(.bss) } >other
31269 + /DISCARD/ : { *(*) }
31272 +++ b/ld/testsuite/ld-scripts/rgn-at3.d
31275 +# source: rgn-at.s
31276 +# ld: -T rgn-at3.t
31279 +.*: file format .*
31282 +Idx +Name +Size +VMA +LMA +File off +Algn +Flags
31283 + 0 .text +0+[0-9a-f][0-9a-f] +0+0010000 +0+0020000 +.*
31284 + 1 .data +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+0030000 +.*
31285 + 2 .bss +0+[0-9a-f][0-9a-f] +0+00100[0-9a-f]+ +0+00300[0-9a-f]+ +.*
31287 +++ b/ld/testsuite/ld-scripts/rgn-at3.t
31289 +/* Memory region at test, >AT should propagate by default */
31292 + ram : ORIGIN = 0x10000, LENGTH = 0x100
31293 + rom : ORIGIN = 0x20000, LENGTH = 0x200
31297 + .text : { *(.text) } >ram AT>rom
31298 + .data : AT (0x30000) { *(.data) } >ram /* NO default AT>rom */
31299 + .bss : { *(.bss) } >ram /* NO default AT>rom */
31300 + /DISCARD/ : { *(*) }
31302 --- a/ld/testsuite/lib/ld-lib.exp
31303 +++ b/ld/testsuite/lib/ld-lib.exp
31304 @@ -1592,7 +1592,8 @@ proc check_gc_sections_available { } {
31305 # advertised by ld's options.
31306 if { [istarget alpha*-*-*]
31307 || [istarget mep-*-*]
31308 - || [istarget ia64-*-*] } {
31309 + || [istarget ia64-*-*]
31310 + || [istarget *-*-mingw*] } {
31311 set gc_sections_available_saved 0
31314 --- a/libiberty/Makefile.in
31315 +++ b/libiberty/Makefile.in
31316 @@ -124,7 +124,7 @@ COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(
31317 CFILES = alloca.c argv.c asprintf.c atexit.c \
31318 basename.c bcmp.c bcopy.c bsearch.c bzero.c \
31319 calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
31320 - cp-demint.c cplus-dem.c \
31321 + cp-demint.c cplus-dem.c cygpath.c \
31323 fdmatch.c ffs.c fibheap.c filename_cmp.c floatformat.c \
31324 fnmatch.c fopen_unlocked.c \
31325 @@ -182,7 +182,7 @@ REQUIRED_OFILES = \
31326 # maint-missing" and "make check".
31327 CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
31328 ./basename.o ./bcmp.o ./bcopy.o ./bsearch.o ./bzero.o \
31329 - ./calloc.o ./clock.o ./copysign.o \
31330 + ./calloc.o ./clock.o ./copysign.o ./cygpath.o \
31333 ./getcwd.o ./getpagesize.o ./gettimeofday.o \
31334 @@ -619,6 +619,12 @@ $(CONFIGURED_OFILES): stamp-picdir
31336 $(COMPILE.c) $(srcdir)/cplus-dem.c $(OUTPUT_OPTION)
31338 +./cygpath.o: $(srcdir)/cygpath.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
31339 + if [ x"$(PICFLAG)" != x ]; then \
31340 + $(COMPILE.c) $(PICFLAG) $(srcdir)/cygpath.c -o pic/$@; \
31342 + $(COMPILE.c) $(srcdir)/cygpath.c $(OUTPUT_OPTION)
31344 ./dyn-string.o: $(srcdir)/dyn-string.c config.h $(INCDIR)/ansidecl.h \
31345 $(INCDIR)/dyn-string.h $(INCDIR)/libiberty.h
31346 if [ x"$(PICFLAG)" != x ]; then \
31347 --- a/libiberty/configure
31348 +++ b/libiberty/configure
31349 @@ -8891,6 +8891,20 @@ case "${host}" in
31353 +# On MinGW, add support for Cygwin paths.
31357 + "cygpath.$ac_objext" | \
31358 + *" cygpath.$ac_objext" | \
31359 + "cygpath.$ac_objext "* | \
31360 + *" cygpath.$ac_objext "* ) ;;
31361 + *) LIBOBJS="$LIBOBJS cygpath.$ac_objext" ;;
31367 if test x$gcc_no_link = xyes; then
31368 if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
31369 ac_cv_func_mmap_fixed_mapped=no
31370 --- a/libiberty/configure.ac
31371 +++ b/libiberty/configure.ac
31372 @@ -663,6 +663,13 @@ case "${host}" in
31376 +# On MinGW, add support for Cygwin paths.
31379 + AC_LIBOBJ([cygpath])
31383 libiberty_AC_FUNC_STRNCMP
31385 # Install a library built with a cross compiler in $(tooldir) rather
31387 +++ b/libiberty/cygpath.c
31389 +/* Support Cygwin paths under MinGW.
31390 + Copyright (C) 2006 Free Software Foundation, Inc.
31391 + Written by CodeSourcery.
31393 +This file is part of the libiberty library.
31394 +Libiberty is free software; you can redistribute it and/or modify it
31395 +under the terms of the GNU Library General Public License as published
31396 +by the Free Software Foundation; either version 2 of the License, or
31397 +(at your option) any later version.
31399 +Libiberty is distributed in the hope that it will be useful,
31400 +but WITHOUT ANY WARRANTY; without even the implied warranty of
31401 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
31402 +Library General Public License for more details.
31404 +You should have received a copy of the GNU Library General Public
31405 +License along with libiberty; see the file COPYING.LIB. If not, write
31406 +to the Free Software Foundation, Inc., 51 Franklin Street - Fifth
31407 +Floor, Boston, MA 02110-1301, USA. */
31409 +#include <windows.h>
31410 +#include <errno.h>
31411 +#include <fcntl.h>
31412 +#include <sys/stat.h>
31413 +#include <sys/types.h>
31415 +#include <process.h>
31416 +#include <stdbool.h>
31417 +#include <stdio.h>
31418 +#include <stdlib.h>
31419 +#include "libiberty.h"
31421 +/* If non-zero, we have attempted to use cygpath. CYGPATH_PEX may
31422 + still be NULL, if cygpath is unavailable. */
31423 +static int cygpath_initialized;
31425 +/* If non-NULL, an instance of cygpath connected via a pipe. */
31426 +static struct pex_obj *cygpath_pex;
31428 +/* The input to cygpath. */
31429 +static FILE *cygpath_in;
31431 +/* The output from cygpath. */
31432 +static FILE *cygpath_out;
31434 +/* If non-NULL, a file to which path translations are logged. */
31435 +static FILE *cygpath_log;
31437 +/* Record MESSAGE in the CYGPATH_LOG. MESSAGE is a format string,
31438 + which is expected to have a single "%s" field, to be replaced by
31441 +cygpath_log_msg_arg (const char *message, const char *arg)
31443 + if (!cygpath_log)
31445 + fprintf (cygpath_log, "[%d] cygpath: ", _getpid ());
31446 + fprintf (cygpath_log, message, arg);
31447 + fprintf (cygpath_log, "\n");
31448 + fflush (cygpath_log);
31451 +/* Record MESSAGE in the CYGPATH_LOG. */
31453 +cygpath_log_msg (const char *message)
31455 + cygpath_log_msg_arg ("%s", message);
31458 +/* An error has occured. Add the MESSAGE to the CYGPATH_LOG, noting
31459 + the cause of the error based on errno. */
31461 +cygpath_perror (const char *message)
31463 + if (!cygpath_log)
31465 + fprintf (cygpath_log, "[%d] cygpath: error: %s: %s\n",
31466 + _getpid(), message, strerror (errno));
31467 + fflush (cygpath_log);
31470 +/* Closes CYGPATH_PEX and frees all associated
31473 +cygpath_close (void)
31475 + /* Free resources. */
31478 + fclose (cygpath_out);
31479 + cygpath_out = NULL;
31483 + fclose (cygpath_in);
31484 + cygpath_in = NULL;
31488 + pex_free (cygpath_pex);
31489 + cygpath_pex = NULL;
31493 + cygpath_log_msg ("end");
31494 + cygpath_log = NULL;
31498 +/* CYG_PATH is a pointer to a Cygwin path. This function converts the
31499 + Cygwin path to a Windows path, storing the result in
31500 + WIN32_PATH. Returns true if the conversion was successful; false
31503 +cygpath (const char *cyg_path, char win32_path[MAX_PATH + 1])
31508 + /* Special-case the empty path. cygpath cannot handle the empty
31509 + path correctly. It ignores the empty line, waiting for a
31510 + non-empty line, which in turn causes an application using this
31511 + function to appear stuck. */
31512 + if (cyg_path[0] == '\0')
31514 + win32_path[0] = '\0';
31518 + retrying = false;
31521 + if (!cygpath_initialized)
31523 + const char *argv[] = { "cygpath", "-w", "-f", "-", NULL };
31524 + const char *cygpath_path;
31528 + /* If we are unable to invoke cygpath, we do not want to try
31529 + again. So, we set the initialized flag at this point; if
31530 + errors occur during the invocation, it will remain set. */
31531 + cygpath_initialized = 1;
31532 + /* Check to see if the user wants cygpath support. */
31533 + cygpath_path = getenv ("CYGPATH");
31534 + if (!cygpath_path)
31535 + /* The user doesn't need to support Cygwin paths. */
31537 + /* If debugging, open the log file. */
31538 + log = getenv ("CSL_DEBUG_CYGPATH");
31539 + if (log && log[0])
31541 + /* The log file is opened for "append" so that multiple
31542 + processes (perhaps invoked from "make") can share it. */
31543 + cygpath_log = fopen (log, "a");
31545 + cygpath_log_msg ("begin");
31547 + /* If the environment variable is set to a non-empty string, use
31548 + that string as the path to cygpath. */
31549 + if (cygpath_path[0] != '\0')
31550 + argv[0] = cygpath_path;
31551 + /* Create the pex object. */
31552 + cygpath_pex = pex_init (PEX_SEARCH | PEX_USE_PIPES,
31553 + "cygpath", NULL);
31554 + if (!cygpath_pex)
31556 + /* Get the FILE we will use to write to the child. */
31557 + cygpath_in = pex_input_pipe (cygpath_pex, /*binary=*/0);
31560 + /* Start the child process. */
31561 + if (pex_run (cygpath_pex, PEX_SEARCH | PEX_USE_PIPES,
31562 + argv[0], (char**) argv,
31566 + /* Get the FILE we will use to read from the child. */
31567 + cygpath_out = pex_read_output (cygpath_pex, /*binary=*/1);
31568 + if (!cygpath_out)
31571 + else if (!cygpath_pex)
31572 + /* We previously tried to use cygpath, but something went wrong. */
31575 + /* Write CYG_PATH to the child, on a line by itself. */
31576 + cygpath_log_msg_arg ("-> %s", cyg_path);
31577 + if (fprintf (cygpath_in, "%s\n", cyg_path) < 0)
31579 + cygpath_perror ("write failed");
31582 + /* Flush the output. (We cannot set the stream into line-buffered
31583 + mode with setvbuf because Windows treats _IOLBF as a synonym for
31585 + if (fflush (cygpath_in))
31586 + cygpath_perror ("flush failed");
31587 + /* Read the output. */
31592 + if (!fgets (win32_path, MAX_PATH, cygpath_out))
31594 + if (ferror (cygpath_out))
31595 + cygpath_perror ("read failed");
31598 + cygpath_log_msg ("error: EOF");
31599 + /* Unfortunately, cygpath sometimes crashes for no
31600 + apparent reason. We give it two chances... */
31604 + cygpath_log_msg ("retrying");
31605 + cygpath_close ();
31606 + cygpath_initialized = 0;
31612 + pathlen = strlen (win32_path);
31613 + if (pathlen == 0 && ok)
31614 + /* This isn't a well-formed response from cygpath. */
31616 + if (win32_path[pathlen - 1] == '\n')
31618 + win32_path[pathlen - 1] = '\0';
31619 + cygpath_log_msg_arg ("<- %s", win32_path);
31622 + /* We didn't reach the end of the line. There's no point in
31623 + trying to use this output, since we know the length of
31624 + paths are limited to MAX_PATH characters, but we read the
31625 + entire line so that we are still in sync with
31629 + cygpath_log_msg_arg ("error: invalid response: %s",
31640 +/* Returns the handle for the MVCRT DLL, or NULL if it is not
31645 + static HMODULE dll = (HMODULE)(-1);
31647 + /* After we call LoadLibrary, DLL will be either a valid handle or
31648 + NULL, so this check ensures that we only try to load the library
31650 + if (dll == (HMODULE)(-1))
31651 + dll = LoadLibrary ("msvcrt.dll");
31656 +/* Call the underlying MSVCRT fopen with PATH and MODE, and return
31657 + what it returns. */
31659 +msvcrt_fopen (const char *path, const char *mode)
31661 + typedef FILE *(fopen_type)(const char *path,
31662 + const char *mode);
31664 + static fopen_type *f = NULL;
31666 + /* Get the address of "fopen". */
31669 + HMODULE dll = msvcrt_dll ();
31675 + f = (fopen_type *) GetProcAddress (dll, "fopen");
31683 + /* Call fopen. */
31684 + return (*f)(path, mode);
31688 +fopen (const char *path, const char *mode)
31691 + char win32_path[MAX_PATH + 1];
31693 + /* Assume PATH is a Windows path. */
31694 + f = msvcrt_fopen (path, mode);
31695 + if (f || errno != ENOENT)
31697 + /* Perhaps it is a Cygwin path? */
31698 + if (cygpath (path, win32_path))
31699 + f = msvcrt_fopen (win32_path, mode);
31704 +open (const char *path, int oflag, ...)
31707 + char win32_path[MAX_PATH + 1];
31710 + if ((oflag & _O_CREAT))
31713 + va_start (ap, oflag);
31714 + pmode = va_arg (ap, int);
31718 + /* Assume PATH is a Windows path. */
31719 + fd = _open (path, oflag, pmode);
31720 + if (fd != -1 || errno != ENOENT)
31722 + /* Perhaps it is a Cygwin path? */
31723 + if (cygpath (path, win32_path))
31724 + fd = _open (win32_path, oflag, pmode);
31729 +stat (const char *path, struct stat *buffer)
31732 + char win32_path[MAX_PATH + 1];
31734 + /* Assume PATH is a Windows path. */
31735 + r = _stat (path, (struct _stat *) buffer);
31736 + if (r != -1 || errno != ENOENT)
31738 + /* Perhaps it is a Cygwin path? */
31739 + if (cygpath (path, win32_path))
31740 + r = _stat (win32_path, (struct _stat *) buffer);
31745 +access (const char *path, int mode)
31748 + char win32_path[MAX_PATH + 1];
31751 + /* Some GNU tools mistakenly defined X_OK to 1 on Windows. */
31752 + mode = mode & ~1;
31754 + /* Assume PATH is a Windows path. */
31755 + r = _access (path, mode);
31756 + if (r != -1 || errno != ENOENT)
31758 + /* Perhaps it is a Cygwin path? */
31759 + if (cygpath (path, win32_path))
31760 + r = _access (win32_path, mode);
31764 +/* Given the WINDOWS_CODE (typically the result of GetLastError), set
31765 + ERRNO to the corresponding error code. If there is no obvious
31766 + correspondence, ERRNO will be set to EACCES. */
31768 +set_errno_from_windows_code (DWORD windows_code)
31770 + int mapping[][2] = {
31771 + {ERROR_ACCESS_DENIED, EACCES},
31772 + {ERROR_ACCOUNT_DISABLED, EACCES},
31773 + {ERROR_ACCOUNT_RESTRICTION, EACCES},
31774 + {ERROR_ALREADY_ASSIGNED, EBUSY},
31775 + {ERROR_ALREADY_EXISTS, EEXIST},
31776 + {ERROR_ARITHMETIC_OVERFLOW, ERANGE},
31777 + {ERROR_BAD_COMMAND, EIO},
31778 + {ERROR_BAD_DEVICE, ENODEV},
31779 + {ERROR_BAD_DRIVER_LEVEL, ENXIO},
31780 + {ERROR_BAD_EXE_FORMAT, ENOEXEC},
31781 + {ERROR_BAD_FORMAT, ENOEXEC},
31782 + {ERROR_BAD_LENGTH, EINVAL},
31783 + {ERROR_BAD_PATHNAME, ENOENT},
31784 + {ERROR_BAD_PIPE, EPIPE},
31785 + {ERROR_BAD_UNIT, ENODEV},
31786 + {ERROR_BAD_USERNAME, EINVAL},
31787 + {ERROR_BROKEN_PIPE, EPIPE},
31788 + {ERROR_BUFFER_OVERFLOW, ENOMEM},
31789 + {ERROR_BUSY, EBUSY},
31790 + {ERROR_BUSY_DRIVE, EBUSY},
31791 + {ERROR_CALL_NOT_IMPLEMENTED, ENOSYS},
31792 + {ERROR_CRC, EIO},
31793 + {ERROR_CURRENT_DIRECTORY, EINVAL},
31794 + {ERROR_DEVICE_IN_USE, EBUSY},
31795 + {ERROR_DIR_NOT_EMPTY, EEXIST},
31796 + {ERROR_DIRECTORY, ENOENT},
31797 + {ERROR_DISK_CHANGE, EIO},
31798 + {ERROR_DISK_FULL, ENOSPC},
31799 + {ERROR_DRIVE_LOCKED, EBUSY},
31800 + {ERROR_ENVVAR_NOT_FOUND, EINVAL},
31801 + {ERROR_EXE_MARKED_INVALID, ENOEXEC},
31802 + {ERROR_FILE_EXISTS, EEXIST},
31803 + {ERROR_FILE_INVALID, ENODEV},
31804 + {ERROR_FILE_NOT_FOUND, ENOENT},
31805 + {ERROR_FILENAME_EXCED_RANGE, ENAMETOOLONG},
31806 + {ERROR_GEN_FAILURE, EIO},
31807 + {ERROR_HANDLE_DISK_FULL, ENOSPC},
31808 + {ERROR_INSUFFICIENT_BUFFER, ENOMEM},
31809 + {ERROR_INVALID_ACCESS, EINVAL},
31810 + {ERROR_INVALID_ADDRESS, EFAULT},
31811 + {ERROR_INVALID_BLOCK, EFAULT},
31812 + {ERROR_INVALID_DATA, EINVAL},
31813 + {ERROR_INVALID_DRIVE, ENODEV},
31814 + {ERROR_INVALID_EXE_SIGNATURE, ENOEXEC},
31815 + {ERROR_INVALID_FLAGS, EINVAL},
31816 + {ERROR_INVALID_FUNCTION, ENOSYS},
31817 + {ERROR_INVALID_HANDLE, EBADF},
31818 + {ERROR_INVALID_LOGON_HOURS, EACCES},
31819 + {ERROR_INVALID_NAME, ENOENT},
31820 + {ERROR_INVALID_OWNER, EINVAL},
31821 + {ERROR_INVALID_PARAMETER, EINVAL},
31822 + {ERROR_INVALID_PASSWORD, EPERM},
31823 + {ERROR_INVALID_PRIMARY_GROUP, EINVAL},
31824 + {ERROR_INVALID_SIGNAL_NUMBER, EINVAL},
31825 + {ERROR_INVALID_TARGET_HANDLE, EIO},
31826 + {ERROR_INVALID_WORKSTATION, EACCES},
31827 + {ERROR_IO_DEVICE, EIO},
31828 + {ERROR_IO_INCOMPLETE, EINTR},
31829 + {ERROR_LOCKED, EBUSY},
31830 + {ERROR_LOGON_FAILURE, EACCES},
31831 + {ERROR_MAPPED_ALIGNMENT, EINVAL},
31832 + {ERROR_META_EXPANSION_TOO_LONG, E2BIG},
31833 + {ERROR_MORE_DATA, EPIPE},
31834 + {ERROR_NEGATIVE_SEEK, ESPIPE},
31835 + {ERROR_NO_DATA, EPIPE},
31836 + {ERROR_NO_MORE_SEARCH_HANDLES, EIO},
31837 + {ERROR_NO_PROC_SLOTS, EAGAIN},
31838 + {ERROR_NO_SUCH_PRIVILEGE, EACCES},
31839 + {ERROR_NOACCESS, EFAULT},
31840 + {ERROR_NONE_MAPPED, EINVAL},
31841 + {ERROR_NOT_ENOUGH_MEMORY, ENOMEM},
31842 + {ERROR_NOT_READY, ENODEV},
31843 + {ERROR_NOT_SAME_DEVICE, EXDEV},
31844 + {ERROR_OPEN_FAILED, EIO},
31845 + {ERROR_OPERATION_ABORTED, EINTR},
31846 + {ERROR_OUTOFMEMORY, ENOMEM},
31847 + {ERROR_PASSWORD_EXPIRED, EACCES},
31848 + {ERROR_PATH_BUSY, EBUSY},
31849 + {ERROR_PATH_NOT_FOUND, ENOTDIR},
31850 + {ERROR_PIPE_BUSY, EBUSY},
31851 + {ERROR_PIPE_CONNECTED, EPIPE},
31852 + {ERROR_PIPE_LISTENING, EPIPE},
31853 + {ERROR_PIPE_NOT_CONNECTED, EPIPE},
31854 + {ERROR_PRIVILEGE_NOT_HELD, EACCES},
31855 + {ERROR_READ_FAULT, EIO},
31856 + {ERROR_SEEK, ESPIPE},
31857 + {ERROR_SEEK_ON_DEVICE, ESPIPE},
31858 + {ERROR_SHARING_BUFFER_EXCEEDED, ENFILE},
31859 + {ERROR_STACK_OVERFLOW, ENOMEM},
31860 + {ERROR_SWAPERROR, ENOENT},
31861 + {ERROR_TOO_MANY_MODULES, EMFILE},
31862 + {ERROR_TOO_MANY_OPEN_FILES, EMFILE},
31863 + {ERROR_UNRECOGNIZED_MEDIA, ENXIO},
31864 + {ERROR_UNRECOGNIZED_VOLUME, ENODEV},
31865 + {ERROR_WAIT_NO_CHILDREN, ECHILD},
31866 + {ERROR_WRITE_FAULT, EIO},
31867 + {ERROR_WRITE_PROTECT, EROFS}
31868 +/* MinGW does not define ETXTBSY as yet.
31869 + {ERROR_LOCK_VIOLATION, ETXTBSY},
31870 + {ERROR_SHARING_VIOLATION, ETXTBSY},
31876 + for (i = 0; i < sizeof (mapping)/sizeof (mapping[0]); ++i)
31877 + if (mapping[i][0] == windows_code)
31879 + errno = mapping[i][1];
31883 + /* Unrecognized error. Use EACCESS to have some error code,
31884 + not misleading "No error" thing. */
31888 +int rename (const char *oldpath, const char *newpath)
31891 + int oldpath_converted = 0;
31892 + char win32_oldpath[MAX_PATH + 1];
31893 + char win32_newpath[MAX_PATH + 1];
31895 + /* Older versions of the cygpath program called FindFirstFile, but
31896 + not FindClose. As a result, a long-running cygpath program ends
31897 + up leaking these handles, and, as a result, the Windows kernel
31898 + will not let us remove or rename things in directories. Therefore,
31899 + we kill the child cygpath program now.
31901 + The defect in cygpath was corrected by this patch:
31903 + http://cygwin.com/ml/cygwin-patches/2007-q1/msg00033.html
31905 + but older versions of cygpath will be in use for the forseeable
31908 + cygpath_close ();
31909 + cygpath_initialized = 0;
31911 + /* Assume all paths are Windows paths. */
31912 + r = MoveFileEx (oldpath, newpath, MOVEFILE_REPLACE_EXISTING);
31915 + else if (GetLastError () != ERROR_PATH_NOT_FOUND)
31918 + /* Perhaps the old path is a cygwin path? */
31919 + if (cygpath (oldpath, win32_oldpath))
31921 + oldpath_converted = 1;
31922 + r = MoveFileEx (win32_oldpath, newpath, MOVEFILE_REPLACE_EXISTING);
31925 + else if (GetLastError () != ERROR_PATH_NOT_FOUND)
31929 + /* Perhaps the new path is a cygwin path? */
31930 + if (cygpath (newpath, win32_newpath))
31932 + r = MoveFileEx (oldpath_converted ? win32_oldpath : oldpath,
31933 + win32_newpath, MOVEFILE_REPLACE_EXISTING);
31938 + set_errno_from_windows_code (GetLastError ());
31942 +int remove (const char *pathname)
31945 + char win32_path[MAX_PATH + 1];
31947 + cygpath_close ();
31948 + cygpath_initialized = 0;
31950 + /* Assume PATH is a Windows path. */
31951 + r = _unlink (pathname);
31952 + if (r != -1 || errno != ENOENT)
31954 + /* Perhaps it is a Cygwin path? */
31955 + if (cygpath (pathname, win32_path))
31956 + r = _unlink (win32_path);
31960 +int unlink(const char *pathname)
31962 + return remove (pathname);
31966 +chdir (const char *path)
31969 + char win32_path[MAX_PATH + 1];
31971 + /* Assume PATH is a Windows path. */
31972 + ret = _chdir (path);
31973 + if (ret != -1 || errno != ENOENT)
31975 + /* Perhaps it is a Cygwin path? */
31976 + if (cygpath (path, win32_path))
31977 + ret = _chdir (win32_path);
31980 --- a/libiberty/make-temp-file.c
31981 +++ b/libiberty/make-temp-file.c
31982 @@ -36,6 +36,9 @@ Boston, MA 02110-1301, USA. */
31983 #ifdef HAVE_SYS_FILE_H
31984 #include <sys/file.h> /* May get R_OK, etc. on some systems. */
31986 +#if defined(_WIN32) && !defined(__CYGWIN__)
31987 +#include <windows.h>
31992 @@ -56,6 +59,8 @@ extern int mkstemps (char *, int);
31993 #define TEMP_FILE "ccXXXXXX"
31994 #define TEMP_FILE_LEN (sizeof(TEMP_FILE) - 1)
31996 +#if !defined(_WIN32) || defined(__CYGWIN__)
31998 /* Subroutine of choose_tmpdir.
31999 If BASE is non-NULL, return it.
32000 Otherwise it checks if DIR is a usable directory.
32001 @@ -81,6 +86,8 @@ static const char usrtmp[] =
32002 static const char vartmp[] =
32003 { DIR_SEPARATOR, 'v', 'a', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
32007 static char *memoized_tmpdir;
32010 @@ -97,40 +104,58 @@ files in.
32012 choose_tmpdir (void)
32014 - const char *base = 0;
32016 - unsigned int len;
32018 - if (memoized_tmpdir)
32019 - return memoized_tmpdir;
32021 - base = try_dir (getenv ("TMPDIR"), base);
32022 - base = try_dir (getenv ("TMP"), base);
32023 - base = try_dir (getenv ("TEMP"), base);
32025 + if (!memoized_tmpdir)
32027 +#if !defined(_WIN32) || defined(__CYGWIN__)
32028 + const char *base = 0;
32030 + unsigned int len;
32032 + base = try_dir (getenv ("TMPDIR"), base);
32033 + base = try_dir (getenv ("TMP"), base);
32034 + base = try_dir (getenv ("TEMP"), base);
32037 - base = try_dir (P_tmpdir, base);
32038 + base = try_dir (P_tmpdir, base);
32041 - /* Try /var/tmp, /usr/tmp, then /tmp. */
32042 - base = try_dir (vartmp, base);
32043 - base = try_dir (usrtmp, base);
32044 - base = try_dir (tmp, base);
32046 - /* If all else fails, use the current directory! */
32050 - /* Append DIR_SEPARATOR to the directory we've chosen
32051 - and return it. */
32052 - len = strlen (base);
32053 - tmpdir = XNEWVEC (char, len + 2);
32054 - strcpy (tmpdir, base);
32055 - tmpdir[len] = DIR_SEPARATOR;
32056 - tmpdir[len+1] = '\0';
32057 + /* Try /var/tmp, /usr/tmp, then /tmp. */
32058 + base = try_dir (vartmp, base);
32059 + base = try_dir (usrtmp, base);
32060 + base = try_dir (tmp, base);
32062 + /* If all else fails, use the current directory! */
32065 + /* Append DIR_SEPARATOR to the directory we've chosen
32066 + and return it. */
32067 + len = strlen (base);
32068 + tmpdir = XNEWVEC (char, len + 2);
32069 + strcpy (tmpdir, base);
32070 + tmpdir[len] = DIR_SEPARATOR;
32071 + tmpdir[len+1] = '\0';
32072 + memoized_tmpdir = tmpdir;
32073 +#else /* defined(_WIN32) && !defined(__CYGWIN__) */
32076 + /* Figure out how much space we need. */
32077 + len = GetTempPath(0, NULL);
32080 + memoized_tmpdir = XNEWVEC (char, len);
32081 + if (!GetTempPath(len, memoized_tmpdir))
32083 + XDELETEVEC (memoized_tmpdir);
32084 + memoized_tmpdir = NULL;
32087 + if (!memoized_tmpdir)
32088 + /* If all else fails, use the current directory. */
32089 + memoized_tmpdir = xstrdup (".\\");
32090 +#endif /* defined(_WIN32) && !defined(__CYGWIN__) */
32093 - memoized_tmpdir = tmpdir;
32095 + return memoized_tmpdir;
32099 --- a/libiberty/pex-win32.c
32100 +++ b/libiberty/pex-win32.c
32101 @@ -119,7 +119,7 @@ static int
32102 pex_win32_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
32105 - return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
32106 + return open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
32109 /* Open a file for writing. */
32110 @@ -130,10 +130,10 @@ pex_win32_open_write (struct pex_obj *ob
32112 /* Note that we can't use O_EXCL here because gcc may have already
32113 created the temporary file via make_temp_file. */
32114 - return _open (name,
32115 - (_O_WRONLY | _O_CREAT | _O_TRUNC
32116 - | (binary ? _O_BINARY : _O_TEXT)),
32117 - _S_IREAD | _S_IWRITE);
32118 + return open (name,
32119 + (_O_WRONLY | _O_CREAT | _O_TRUNC
32120 + | (binary ? _O_BINARY : _O_TEXT)),
32121 + _S_IREAD | _S_IWRITE);
32124 /* Close a file. */
32125 --- a/opcodes/arm-dis.c
32126 +++ b/opcodes/arm-dis.c
32127 @@ -4041,7 +4041,9 @@ print_insn (bfd_vma pc, struct disassemb
32128 for a preceeding one. */
32129 for (; n >= 0; n--)
32131 - if (get_sym_code_type (info, n, &type))
32132 + if ((info->section == NULL
32133 + || info->section == info->symtab[n]->section)
32134 + && get_sym_code_type (info, n, &type))
32138 --- a/opcodes/m68k-opc.c
32139 +++ b/opcodes/m68k-opc.c
32140 @@ -2025,7 +2025,9 @@ const struct m68k_opcode m68k_opcodes[]
32142 {"sbcd", 2, one(0100400), one(0170770), "DsDd", m68000up },
32143 {"sbcd", 2, one(0100410), one(0170770), "-s-d", m68000up },
32146 +{"stldsr", 6, two(0x40e7, 0x46fc), two(0xffff, 0xffff), "#w", mcfisa_c },
32148 /* Traps have to come before conditional sets, as they have a more
32149 specific opcode. */
32150 {"trapcc", 2, one(0052374), one(0177777), "", m68020up | cpu32 | fido_a },
32151 --- a/opcodes/mips-dis.c
32152 +++ b/opcodes/mips-dis.c
32154 #include "elf/mips.h"
32157 +/* Generate Octeon unaligned load and store instructions. */
32158 +int octeon_use_unalign = 1;
32160 /* Mips instructions are at maximum this many bytes long. */
32163 @@ -319,6 +322,36 @@ static const struct mips_cp0sel_name mip
32164 { 29, 3, "c0_datahi_d" },
32167 +static const char * const mips_cp0_names_octeon[32] = {
32168 + "c0_index", "c0_random", "c0_entrylo0", "c0_entrylo1",
32169 + "c0_context", "c0_pagemask", "c0_wired", "c0_hwrena",
32170 + "c0_badvaddr", "c0_count", "c0_entryhi", "c0_compare",
32171 + "c0_status", "c0_cause", "c0_epc", "c0_prid",
32172 + "c0_config", "$17", "c0_watchlo", "c0_watchhi",
32173 + "c0_xcontext", "$21", "c0_mdebug", "c0_debug",
32174 + "c0_depc", "c0_perfcnt", "$26", "c0_cacheerr",
32175 + "c0_taglo", "c0_taghi", "c0_errorepc", "c0_desave",
32178 +static const struct mips_cp0sel_name mips_cp0sel_names_octeon[] = {
32179 + { 5, 1, "c0_pagegrain" },
32180 + { 9, 6, "c0_cvmcount" },
32181 + { 9, 7, "c0_cvmctl" },
32182 + { 11, 7, "c0_cvmmemctl" },
32183 + { 12, 1, "c0_intctl" },
32184 + { 12, 2, "c0_srsctl" },
32185 + { 15, 1, "c0_ebase" },
32186 + { 16, 1, "c0_config1", },
32187 + { 16, 2, "c0_config2", },
32188 + { 16, 3, "c0_config3", },
32189 + { 18, 1, "c0_watchlo,1" },
32190 + { 19, 1, "c0_watchhi,1" },
32191 + { 25, 2, "c0_perfcnt,2" },
32192 + { 27, 1, "c0_cacheerr,1" },
32193 + { 28, 3, "c0_datalo" },
32194 + { 29, 3, "c0_datahi" },
32197 /* Xlr cop0 register names. */
32198 static const char * const mips_cp0_names_xlr[32] = {
32199 "c0_index", "c0_random", "c0_entrylo0", "c0_entrylo1",
32200 @@ -513,8 +546,9 @@ const struct mips_arch_choice mips_arch_
32201 NULL, 0, mips_hwr_names_numeric },
32203 { "octeon", 1, bfd_mach_mips_octeon, CPU_OCTEON,
32204 - ISA_MIPS64R2 | INSN_OCTEON, mips_cp0_names_numeric, NULL, 0,
32205 - mips_hwr_names_numeric },
32206 + ISA_MIPS64R2 | INSN_OCTEON, mips_cp0_names_octeon,
32207 + mips_cp0sel_names_octeon, ARRAY_SIZE (mips_cp0sel_names_octeon),
32208 + mips_hwr_names_numeric },
32210 { "xlr", 1, bfd_mach_mips_xlr, CPU_XLR,
32211 ISA_MIPS64 | INSN_XLR,
32212 @@ -676,7 +710,17 @@ parse_mips_dis_option (const char *optio
32217 + if (strcmp ("octeon-useun", option) == 0)
32219 + octeon_use_unalign = 1;
32222 + if (strcmp ("no-octeon-useun", option) == 0)
32224 + octeon_use_unalign = 0;
32228 /* Look for the = that delimits the end of the option name. */
32229 for (i = 0; i < len; i++)
32230 if (option[i] == '=')
32231 @@ -1401,6 +1445,27 @@ print_insn_mips (bfd_vma memaddr,
32232 && strcmp (op->name, "jalx"))
32235 + if (info->mach == CPU_OCTEON && octeon_use_unalign)
32237 + if (strcmp (op->name, "lwl") == 0
32238 + || strcmp (op->name, "ldl") == 0
32239 + || strcmp (op->name, "swl") == 0
32240 + || strcmp (op->name, "sdl") == 0
32241 + || strcmp (op->name, "lcache") == 0
32242 + || strcmp (op->name, "scache") == 0
32243 + || strcmp (op->name, "flush") == 0)
32246 + if (strcmp (op->name, "ldr") == 0
32247 + || strcmp (op->name, "lwr") == 0
32248 + || strcmp (op->name, "swr") == 0
32249 + || strcmp (op->name, "sdr") == 0)
32251 + (*info->fprintf_func) (info->stream, "nop");
32256 /* Figure out instruction type and branch delay information. */
32257 if ((op->pinfo & INSN_UNCOND_BRANCH_DELAY) != 0)
32259 @@ -2175,6 +2240,12 @@ The following MIPS specific disassembler
32260 with the -M switch (multiple options should be separated by commas):\n"));
32262 fprintf (stream, _("\n\
32263 + octeon-useun Disassemble Octeon unaligned load/store instructions.\n"));
32265 + fprintf (stream, _("\n\
32266 + no-octeon-useun Disassemble mips unaligned load/store instructions.\n"));
32268 + fprintf (stream, _("\n\
32269 gpr-names=ABI Print GPR names according to specified ABI.\n\
32270 Default: based on binary being disassembled.\n"));
32272 --- a/opcodes/mips-opc.c
32273 +++ b/opcodes/mips-opc.c
32274 @@ -188,8 +188,8 @@ const struct mips_opcode mips_builtin_op
32275 {"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, 0, I4_32|G3 },
32276 {"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t|FP_S, 0, I4_33 },
32277 {"nop", "", 0x00000000, 0xffffffff, 0, INSN2_ALIAS, I1 }, /* sll */
32278 -{"ssnop", "", 0x00000040, 0xffffffff, 0, INSN2_ALIAS, I32|N55 }, /* sll */
32279 -{"ehb", "", 0x000000c0, 0xffffffff, 0, INSN2_ALIAS, I33 }, /* sll */
32280 +{"ssnop", "", 0x00000040, 0xffffffff, 0, INSN2_ALIAS, I1 }, /* sll */
32281 +{"ehb", "", 0x000000c0, 0xffffffff, 0, INSN2_ALIAS, I32 }, /* sll */
32282 {"li", "t,j", 0x24000000, 0xffe00000, WR_t, INSN2_ALIAS, I1 }, /* addiu */
32283 {"li", "t,i", 0x34000000, 0xffe00000, WR_t, INSN2_ALIAS, I1 }, /* ori */
32284 {"li", "t,I", 0, (int) M_LI, INSN_MACRO, 0, I1 },
32285 @@ -739,7 +739,7 @@ const struct mips_opcode mips_builtin_op
32286 assembler, but will never match user input (because the line above
32287 will match first). */
32288 {"jal", "a", 0x0c000000, 0xfc000000, UBD|WR_31, 0, I1 },
32289 -{"jalx", "a", 0x74000000, 0xfc000000, UBD|WR_31, 0, I16 },
32290 +{"jalx", "a", 0x74000000, 0xfc000000, UBD|WR_31, 0, I1 },
32291 {"la", "t,A(b)", 0, (int) M_LA_AB, INSN_MACRO, 0, I1 },
32292 {"lb", "t,o(b)", 0x80000000, 0xfc000000, LDD|RD_b|WR_t, 0, I1 },
32293 {"lb", "t,A(b)", 0, (int) M_LB_AB, INSN_MACRO, 0, I1 },
32294 @@ -1170,6 +1170,11 @@ const struct mips_opcode mips_builtin_op
32295 {"rzu.ob", "X,Q", 0x78000020, 0xfc20f83f, WR_D|RD_T|FP_D, RD_MACC, MX|SB1 },
32296 {"rzu.ob", "D,k", 0x4bc00020, 0xffe0f83f, WR_D|RD_S|RD_T, 0, N54 },
32297 {"rzu.qh", "X,Q", 0x78200020, 0xfc20f83f, WR_D|RD_T|FP_D, RD_MACC, MX },
32298 +/* 58xx specific instructions. */
32299 +{"saa", "t,(b)", 0x70000018, 0xfc00ffff, SM|RD_t|RD_b, 0, IOCT },
32300 +{"saa", "t,A(b)", 0, (int) M_SAA_AB, INSN_MACRO, 0, IOCT },
32301 +{"saad", "t,(b)", 0x70000019, 0xfc00ffff, SM|RD_t|RD_b, 0, IOCT },
32302 +{"saad", "t,A(b)", 0, (int) M_SAAD_AB, INSN_MACRO, 0, IOCT },
32303 {"sb", "t,o(b)", 0xa0000000, 0xfc000000, SM|RD_t|RD_b, 0, I1 },
32304 {"sb", "t,A(b)", 0, (int) M_SB_AB, INSN_MACRO, 0, I1 },
32305 {"sc", "t,o(b)", 0xe0000000, 0xfc000000, SM|RD_t|WR_t|RD_b, 0, I2 },
32306 @@ -1334,7 +1339,9 @@ const struct mips_opcode mips_builtin_op
32307 {"invalidate", "t,o(b)",0xb8000000, 0xfc000000, RD_t|RD_b, 0, I2 }, /* same */
32308 {"invalidate", "t,A(b)",0, (int) M_SWR_AB, INSN_MACRO, 0, I2 }, /* as swr */
32309 {"swxc1", "S,t(b)", 0x4c000008, 0xfc0007ff, SM|RD_S|RD_t|RD_b|FP_S, 0, I4_33 },
32310 +{"syncio", "", 0x0000004f, 0xffffffff, INSN_SYNC, 0, IOCT },
32311 {"synciobdma", "", 0x0000008f, 0xffffffff, INSN_SYNC, 0, IOCT },
32312 +{"syncioall", "", 0x000000cf, 0xffffffff, INSN_SYNC, 0, IOCT },
32313 {"syncs", "", 0x0000018f, 0xffffffff, INSN_SYNC, 0, IOCT },
32314 {"syncw", "", 0x0000010f, 0xffffffff, INSN_SYNC, 0, IOCT },
32315 {"syncws", "", 0x0000014f, 0xffffffff, INSN_SYNC, 0, IOCT },
32316 @@ -1387,18 +1394,22 @@ const struct mips_opcode mips_builtin_op
32317 {"trunc.w.s", "D,S", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
32318 {"trunc.w.s", "D,S,x", 0x4600000d, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
32319 {"trunc.w.s", "D,S,t", 0, (int) M_TRUNCWS, INSN_MACRO, INSN2_M_FP_S, I1 },
32320 +{"uld", "t,o(b)", 0x68000000, 0xfc000000, LDD|WR_t|RD_b, 0, IOCT },
32321 {"uld", "t,o(b)", 0, (int) M_ULD, INSN_MACRO, 0, I3 },
32322 {"uld", "t,A(b)", 0, (int) M_ULD_A, INSN_MACRO, 0, I3 },
32323 {"ulh", "t,o(b)", 0, (int) M_ULH, INSN_MACRO, 0, I1 },
32324 {"ulh", "t,A(b)", 0, (int) M_ULH_A, INSN_MACRO, 0, I1 },
32325 {"ulhu", "t,o(b)", 0, (int) M_ULHU, INSN_MACRO, 0, I1 },
32326 {"ulhu", "t,A(b)", 0, (int) M_ULHU_A, INSN_MACRO, 0, I1 },
32327 +{"ulw", "t,o(b)", 0x88000000, 0xfc000000, LDD|RD_b|WR_t, 0, IOCT },
32328 {"ulw", "t,o(b)", 0, (int) M_ULW, INSN_MACRO, 0, I1 },
32329 {"ulw", "t,A(b)", 0, (int) M_ULW_A, INSN_MACRO, 0, I1 },
32330 +{"usd", "t,o(b)", 0xb0000000, 0xfc000000, SM|RD_t|RD_b, 0, IOCT },
32331 {"usd", "t,o(b)", 0, (int) M_USD, INSN_MACRO, 0, I3 },
32332 {"usd", "t,A(b)", 0, (int) M_USD_A, INSN_MACRO, 0, I3 },
32333 {"ush", "t,o(b)", 0, (int) M_USH, INSN_MACRO, 0, I1 },
32334 {"ush", "t,A(b)", 0, (int) M_USH_A, INSN_MACRO, 0, I1 },
32335 +{"usw", "t,o(b)", 0xa8000000, 0xfc000000, SM|RD_t|RD_b, 0, IOCT },
32336 {"usw", "t,o(b)", 0, (int) M_USW, INSN_MACRO, 0, I1 },
32337 {"usw", "t,A(b)", 0, (int) M_USW_A, INSN_MACRO, 0, I1 },
32338 {"v3mulu", "d,v,t", 0x70000011, 0xfc0007ff, WR_d|RD_s|RD_t, 0, IOCT },
32339 --- a/opcodes/ppc-opc.c
32340 +++ b/opcodes/ppc-opc.c
32341 @@ -3377,6 +3377,11 @@ const struct powerpc_opcode powerpc_opco
32343 {"isellt", X(31,15), X_MASK, PPCISEL, PPCNONE, {RT, RA, RB}},
32345 +{"tlbilxlpid", XTO(31,18,0), XTO_MASK, E500MC, PPCNONE, {0}},
32346 +{"tlbilxpid", XTO(31,18,1), XTO_MASK, E500MC, PPCNONE, {0}},
32347 +{"tlbilxva", XTO(31,18,3), XTO_MASK, E500MC, PPCNONE, {RA0, RB}},
32348 +{"tlbilx", X(31,18), X_MASK, E500MC, PPCNONE, {T, RA0, RB}},
32350 {"mfcr", XFXM(31,19,0,0), XRARB_MASK, COM, POWER4, {RT}},
32351 {"mfcr", XFXM(31,19,0,0), XFXFXM_MASK, POWER4, PPCNONE, {RT, FXM4}},
32352 {"mfocrf", XFXM(31,19,0,1), XFXFXM_MASK, COM, PPCNONE, {RT, FXM}},
32353 @@ -4416,10 +4421,6 @@ const struct powerpc_opcode powerpc_opco
32354 {"caxo.", XO(31,266,1,1), XO_MASK, PWRCOM, PPCNONE, {RT, RA, RB}},
32356 {"tlbivax", X(31,786), XRT_MASK, BOOKE, PPCNONE, {RA, RB}},
32357 -{"tlbilx", X(31,787), X_MASK, E500MC, PPCNONE, {T, RA0, RB}},
32358 -{"tlbilxlpid", XTO(31,787,0), XTO_MASK, E500MC, PPCNONE, {0}},
32359 -{"tlbilxpid", XTO(31,787,1), XTO_MASK, E500MC, PPCNONE, {0}},
32360 -{"tlbilxva", XTO(31,787,3), XTO_MASK, E500MC, PPCNONE, {RA0, RB}},
32362 {"lwzcix", X(31,789), X_MASK, POWER6, PPCNONE, {RT, RA0, RB}},