3 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5 (elf64-x86-64.lo): Add dependencies.
6 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
7 bfd_mach_x86_64_intel_syntax.
8 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
9 * config.bfd (x86_64): Add.
10 * configure.in: Add support for bfd_elf64_x86_64_vec.
11 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
12 (bfd_i386_arch, i8086_ar): Link in.
13 * elf64-x86-64.c: New file.
14 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
15 * targets.c (bfd_elf64_x86_64_vec): Add.
16 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
20 * xcofflink.c: Fix formatting.
24 * aoutx.h: Fix formatting.
26 * bfd-in2.h: Likewise.
28 * cisco-core.c: Likewise.
29 * coff64-rs6000.c: Likewise.
30 * coffcode.h: Likewise.
31 * coffswap.h: Likewise.
32 * corefile.c: Likewise.
33 * elf32-mips.c: Likewise.
37 * aout-adobe.c: Fix formatting.
38 * coff64-rs6000.c: Likewise.
39 * coffgen.c: Likewise.
40 * cofflink.c: Likewise.
44 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
45 (obj_coff_strings_written): New accessor macro for above.
46 * libcoff.h: Regenerate.
47 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
49 * coffcode.h (coff_write_object_contents): No need to write out
50 the string table if it's already been done.
54 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
55 weak undefined symbols.
59 * archures.c (bfd_mach_arm_5TE): Define.
60 (bfd_mach_arm+XScale): Define.
61 * bfd-in2.h: Regenerate.
63 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
64 BFD_RELOC_ARM_PCREL_BLX.
66 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
67 XScale machine numbers.
69 * config.bfd (xscale-elf): Add target.
70 (xscale-coff): Add target.
72 * cpu-arm.c: Add xscale machine name.
73 Add v5t, v5te and XScale machine numbers.
77 * aix386-core.c: Fix formatting.
81 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
82 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
83 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
84 (ins_imms_scaled): Initialize sign_bit at function entry.
85 (elf64_ia64_operands): Add missing initializers.
86 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
87 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
88 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
89 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
90 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
92 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
93 and free_extsyms at function entry.
94 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
95 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
96 (get_got): Delete unused local srel.
97 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
98 (elfNN_ia64_relocate_section): Delete unused local dynindx.
102 * coff-a29k.c: Fix formatting.
103 * coff-h8500.c: Likewise.
104 * coff-i960.c: Likewise.
105 * coff-ppc.c: Likewise.
106 * coff-rs6000.c: Likewise.
107 * coff-stgo32.c: Likewise.
108 * coff-tic54x.c: Likewise.
109 * coff-w65.c: Likewise.
110 * cpu-h8500.c: Likewise.
111 * cpu-hppa.c: Likewise.
112 * cpu-ns32k.c: Likewise.
114 * ecofflink.c: Likewise.
118 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
119 remove possibility of infinite loop.
123 * aix386-core.c: Fix formatting.
124 * aout-adobe.c: Likewise.
125 * aout-arm.c: Likewise.
126 * aout-encap.c: Likewise.
127 * aout-ns32k.c: Likewise.
128 * aout-target.h: Likewise.
129 * aout-tic30.c: Likewise.
130 * aoutf1.h: Likewise.
132 * archive.c: Likewise.
133 * bfd-in.h: Likewise.
134 * bfd-in2.h: Likewise.
140 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
141 pltoff entries for DT_INIT and DT_FINI.
142 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
143 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
148 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
149 (allocate_dynrel_entries): Likewise.
150 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
151 (set_pltoff_entry): Likewise.
152 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
153 (elfNN_ia64_reloc_type_lookup): Likewise.
154 (elfNN_ia64_install_value): Likewise.
155 (elfNN_ia64_relocate_section): Likewise.
156 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
157 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
161 * cpu-a29k.c: Fix formatting.
162 * cpu-alpha.c: Likewise.
163 * cpu-arm.c: Likewise.
164 * cpu-avr.c: Likewise.
165 * cpu-d10v.c: Likewise.
166 * cpu-h8500.c: Likewise.
167 * cpu-hppa.c: Likewise.
168 * cpu-i370.c: Likewise.
169 * cpu-i386.c: Likewise.
170 * cpu-i960.c: Likewise.
171 * cpu-ia64-opc.c: Likewise.
172 * cpu-ia64.c: Likewise.
173 * cpu-m32r.c: Likewise.
174 * cpu-m68hc11.c: Likewise.
175 * cpu-m68hc12.c: Likewise.
176 * cpu-m68k.c: Likewise.
177 * cpu-m88k.c: Likewise.
178 * cpu-mips.c: Likewise.
179 * cpu-ns32k.c: Likewise.
180 * cpu-pj.c: Likewise.
181 * cpu-powerpc.c: Likewise.
182 * cpu-sh.c: Likewise.
183 * cpu-sparc.c: Likewise.
184 * cpu-tic54x.c: Likewise.
185 * cpu-v850.c: Likewise.
186 * cpu-vax.c: Likewise.
187 * cpu-w65.c: Likewise.
188 * cpu-we32k.c: Likewise.
189 * cpu-z8k.c: Likewise.
190 * dwarf1.c: Likewise.
191 * dwarf2.c: Likewise.
195 * coff-arm.c: Fix formatting.
196 * coff-ppc.c: Likewise.
197 * coff-rs6000.c: Likewise.
198 * coff-sh.c: Likewise.
199 * coff-sparc.c: Likewise.
200 * coff-tic30.c: Likewise.
201 * coff-tic54x.c: Likewise.
202 * coff-tic80.c: Likewise.
203 * coff-w65.c: Likewise.
204 * coff-we32k.c: Likewise.
205 * coff-z8k.c: Likewise.
209 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
210 section with the same ALLOC|LOAD flags as the source section.
214 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
215 by STO_ALPHA constants.
219 * coff-pmac.c: Fix formatting.
220 * coff-ppc.c: Likewise.
224 * elflink.h (elf_link_add_object_symbols): Also add indirect
225 symbols for common symbols with the default version.
229 * section.c (STD_SECTION): Set gc_mark flag.
233 * coff-i960.c: Likewise.
234 * coff-m68k.c: Likewise.
235 * coff-m88k.c: Likewise.
236 * coff-mcore.c: Likewise.
237 * coff-mips.c: Likewise.
241 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
245 * coff-h8300.c: Fix formatting.
246 * coff-h8500.c: Likewise.
247 * coff-i386.c: Likewise.
248 * coff-i860.c: Likewise.
249 * coff-i960.c: Likewise.
250 * coff-ia64.c: Likewise.
254 * archive.c: Fix formatting.
255 * archures.c: Likewise.
259 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
260 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
261 * section.c (bfd_set_section_contents): Call memcpy if
262 section->contents set and location not equal to contents plus offset.
266 * bfd-in.h: Fix formatting.
267 * bfd-in2.h: Likewise.
269 * binary.c: Likewise.
271 * coff-a29k.c: Likewise.
272 * coff-alpha.c: Likewise.
273 * coff-apollo.c: Likewise.
274 * coff-aux.c: Likewise.
278 * aix386-core.c: Fix formatting.
279 * aoutf1.h: Likewise.
281 * archures.c: Likewise.
282 * armnetbsd.c: Likewise.
286 * coff-h8300.c (special): Adjust reloc address.
290 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
291 to differentiate elf32 and elf64 on ia64.
292 * bfd-in2.h: Regenerate.
293 * config.bfd: Add target for "ia64*-*-hpux*".
294 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
295 * configure: Regenerate.
296 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
297 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
299 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
300 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
301 * Makefile.in: Regnerate.
302 * elf64-ia64.c: Deleted.
303 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
307 * aout-adobe.c: Fix formatting.
308 * aout-arm.c: Likewise.
309 * aout-cris.c: Likewise.
310 * aout-encap.c: Likewise.
311 * aout-ns32k.c: Likewise.
312 * aout-target.h: Likewise.
313 * aout-tic30.c: Likewise.
317 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
318 BFDs containing no sections to be merged, regardless of their flags.
322 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
323 if a relocation for an undefined symbol also results in an
328 * config.bfd: Add support for Sun Chorus.
332 * configure.in: Recognize alpha-*-freebsd*.
333 * configure: Regenerate.
337 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
338 (Chunk): New global variable set by a parameter in objcopy.c.
339 (S3Forced): New global variable set by a parameter in
341 (srec_set_section_contents): If S3Forced is true, always generate
343 (srec_write_section): Use 'Chunk' to limit maximum length of S
348 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
349 * Makefile.in: Regenerate.
350 * bfd-in2.h: Regenerate.
351 * po/bfd.pot: Regenerate.
355 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
356 EF_SOFT_FLOAT if it is defined.
360 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
361 attempts to mix PIC code with non-PIC, just mark the output as
362 being position dependent.
363 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
364 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
365 all mismatches, not just the first one.
369 * ieee.c (ieee_archive_p): Plug one of many possible
370 memory leaks in error handling.
374 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
375 elf32_sparc_object_p, elf32_sparc_final_write_processing):
377 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
378 sparc64_elf_object_p): Support v9b.
379 * archures.c: Declare v8plusb and v9b machines.
381 * cpu-sparc.c: Ditto.
385 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
388 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
389 (SYMBOL_CALLS_LOCAL): New macro.
390 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
391 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
392 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
393 (ppc_elf_relocate_section): Use flag variable to determine
394 whether the relocation refers to a local symbol.
395 Test whether a PLTREL24 reloc will produce a reloc by looking
396 to see whether a PLT entry was made.
400 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
401 entries that could serve as a definition for a weak symbol.
407 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
408 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
409 against local symbols.
410 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
414 * section.c (struct sec): Add kept_section.
415 (struct bfd_comdat_info): Remove sec, we can use above.
416 (STD_SECTION): Add initializer.
417 (bfd_make_section_anyway): Init here too.
419 * bfd-in2.h: Regenerate.
421 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
423 (elf_link_input_bfd): Set all asection->symbol->value's here, and
424 fudge values for discarded link-once section symbols.
426 * elf64-hppa.c: Include alloca-conf.h
430 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
432 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
436 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
440 * section.c (bfd_make_section_anyway): Release newsect ptr when
441 newsect->symbol fails to alloc. Use bfd_release instead of free.
445 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
446 (elf64_ia64_unwind_entry_compare): New.
447 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
451 * elflink.h (size_dynamic_sections): Don't create various tags if
452 .dynstr is excluded from the link. Don't set first dynsym entry
453 if dynsymcount is zero.
454 (elf_bfd_final_link): Don't try to swap out dynamic syms if
455 .dynsym excluded from the link. Don't try to write any dynamic
456 sections excluded from the link.
458 * elf.c (swap_out_syms): Handle global section symbols.
462 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
463 * coffcode.h (coff_set_alignment_hook): read extended reloc count
464 (coff_write_relocs): write extended reloc count
465 (coff_write_object_contents): account for extended relocs
469 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
471 * elf.c (_bfd_elf_make_section_from_shdr): Call the
472 elf_backend_section_flags function.
473 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
475 (elf64_ia64_section_flags): New function containing flag conversion
477 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
478 * elfxx-target.h (elf_backend_section_flags): Define.
479 (elfNN_bed): Initialize elf_backend_section_flags field.
483 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
484 _bfd_elf32_gc_record_vtable. Correct a comment.
490 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
491 produces binaries with got[1] = 0x80000001 to differenciate them
492 for the dynamic linker from the broken binaries produced by old
497 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
498 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
499 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
500 * configure: Regenerate.
504 Define two bfd_targets for absence and presence of leading
505 underscore on symbols. Make sure to only link same kind.
506 * elf32-cris.c (cris_elf_object_p,
507 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
508 cris_elf_merge_private_bfd_data): New.
509 (elf_backend_object_p, elf_backend_final_write_processing,
510 bfd_elf32_bfd_print_private_bfd_data,
511 bfd_elf32_bfd_merge_private_bfd_data): Define.
512 <Target vector definition>: Include elf32-target.h twice with
513 different macro settings:
514 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
515 bfd_elf32_us_cris_vec.
516 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
517 (elf_symbol_leading_char): First as 0, then '_'.
518 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
519 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
520 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
521 * configure: Regenerate.
522 * targets.c: Declare bfd_elf32_us_cris_vec.
523 * po/bfd.pot: Regenerate.
527 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
528 R_ARM_THM_PC22 relocations.
532 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
536 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
537 is has the SEC_HAS_CONTENTS flag set.
542 * aout-cris.c (N_TXTADDR): Define.
546 * som.c: Include alloca-conf.h.
547 * Makefile.am: "make dep-am"
548 * Makefile.in: Regenerate.
552 * elf32-hppa.c (plt_stub): New.
553 (PLT_STUB_ENTRY): Define.
554 (elf32_hppa_link_hash_table): Change multi_subspace to packed
555 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
556 (elf32_hppa_link_hash_table_create): Init to suit.
557 (elf32_hppa_check_relocs): Set has_12bit_branch and
558 has_17bit_branch as appropriate.
559 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
561 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
562 Add space for plt_stub as needed.
563 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
564 functions at plt_stub.
565 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
566 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
568 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
569 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
570 of fixed size, and if negative, disable handling of input sections
571 before stub section. Set up default stub group size depending
572 on detected branch relocs.
573 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
574 ensure different offsets from sym_value aren't rounded to
575 different 2k blocks. Use lrsel and rrsel for other stubs too for
576 consistency rather than necessity.
577 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
578 (final_link_relocate): Likewise.
579 (elf32_hppa_relocate_section): Likewise.
581 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
582 (_bfd_elf_hppa_gen_reloc_type): Generate them.
583 (elf_hppa_final_link_relocate): Handle them.
584 (elf_hppa_relocate_insn): Likewise.
585 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
589 * elfcode.h (elf_object_p): Preserve and clear abfd section
590 information. Restore at error.
594 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
595 is empty, make sure that its rva also 0. NT loader dislikes
600 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
605 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
606 currently unused RELATIVE_DYNAMIC_RELOCS code.
607 (hppa_discard_copies): Likewise.
608 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
609 comments. Don't check non-code output sections for stub grouping.
613 * section.c (bfd_get_unique_section_name): Return NULL if
618 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
619 instruction sequence to actually work.
620 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
625 * elf32-sh.c (sh_elf_relocate_section): Use
626 _bfd_final_link_relocate to apply the relocation against a section
627 symbol, when doing relocatable links.
631 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
633 (stub_hash_newfunc): Here too.
634 (hppa_add_stub): And here.
635 (elf32_hppa_link_hash_table): Remove stub_section_created,
636 reloc_section_created, first_init_sec and first_fini_sec. Add
638 (elf32_hppa_link_hash_table_create): Init to suit.
639 (hppa_get_stub_entry): Add support for grouping stub sections.
640 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
641 section code. Index stub vars by section->id.
642 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
643 exit paths. Zap allocation of above removed vars. Refine
646 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
647 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
648 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
649 rather than pointer to bfd_link_info.
650 (hppa_add_stub): Likewise.
651 (final_link_relocate): Likewise.
655 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
660 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
661 ld/emulparams/shelf.sh.
665 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
666 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
667 * bfd-in2.h: Regenerate.
671 * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
672 LITUSE relocations incorrectly if -relax is specified on the ld
673 command line and the displacement field of the load or store
678 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
680 (elf32_hppa_size_stubs): Instead correctly find the first .init
681 and .fini section here.
685 * elf32-hppa.c (clobber_millicode_symbols): New function.
686 (elf32_hppa_size_dynamic_sections): Call it.
690 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
691 packed. Add plabel, plt_abs packed booleans.
692 (hppa_link_hash_newfunc): Init new fields.
693 (PLABEL_PLT_ENTRY_SIZE): Define.
694 (hppa_stub_name): Use size_t len vars.
695 (hppa_add_stub): Likewise.
696 (elf32_hppa_build_stubs): Likewise.
697 (hppa_build_one_stub): Kill some compiler warnings.
698 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
699 if dynamic linking. Munge the local plt offsets into
700 local_got_refcounts. Set h->plabel for all global PLABELs. Use
701 size_t len vars. Add assert for plabel addend.
702 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
703 (elf32_hppa_hide_symbol): New function.
704 (elf_backend_hide_symbol): Define.
705 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
706 with h->plabel set. Don't make plt entries to have dynamic syms
707 when they have been forced local. If plt entry is used by a
708 plabel, make it PLABEL_PLT_ENTRY_SIZE.
709 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
710 Set up .plt offsets for local syms.
711 (elf32_hppa_relocate_section): Initialise plt entries for local
712 syms. Leave weak undefined plabels zero. Make global plabel
713 relocs against function symbol, and leave the addend zero.
714 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
715 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
716 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
717 relocs instead of SEGREL32 for dynamic got relocs.
718 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
719 (elf_backend_got_header_size): Adjust.
720 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
722 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
723 (hppa_type_of_stub): Use it instead of #if 0
724 (hppa_discard_copies): Use it here too.
725 (elf32_hppa_size_dynamic_sections): And here.
727 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
728 (elf32_hppa_link_hash_table_create): And here.
729 (hppa_build_one_stub): And here. Instead keep track of stub
730 offset using _raw_size.
731 (elf32_hppa_size_stubs): Likewise.
732 (elf32_hppa_build_stubs): Likewise.
733 (hppa_size_one_stub): Likewise. Resize reloc section too.
735 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
736 first_fini_sec handling. Don't search for reloc section or set
737 hplink->reloc_section_created here.
738 (elf32_hppa_size_stubs): Instead search for reloc sections, and
739 set reloc_section_created here.
740 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
741 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
743 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
745 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
746 with `hplink->root.'.
747 (elf32_hppa_check_relocs): Likewise.
748 (elf32_hppa_gc_sweep_hook): Likewise.
749 (elf32_hppa_adjust_dynamic_symbol): Likewise.
750 (hppa_handle_PIC_calls): Likewise.
751 (elf32_hppa_size_dynamic_sections): Likewise.
752 (elf32_hppa_set_gp): Likewise.
753 (elf32_hppa_relocate_section): Likewise.
754 (elf32_hppa_finish_dynamic_symbol): Likewise.
755 (elf32_hppa_finish_dynamic_sections): Likewise.
758 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
759 defined weak symbols in shared links.
760 (final_link_relocate): Calls to defined weak symbols in shared
761 objects must go via import stubs, as the target might not be known
766 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
767 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
768 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
769 the original entries with EMPTY_HOWTOs, and added new ones to fill
771 (sh_elf_info_to_howto): Make sure the new gap isn't used.
772 (sh_elf_relocate_section): Likewise.
776 * cpu-mips.c (arch_info_struct): Add mips:4K
777 * bfd-in2.h (bfd_mach_mips4K): New define.
778 * archures.c: Add bfd_mach_mips4K to comment.
779 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
780 E_MIPS_ARCH_2 for bfd_mach_mips4K.
784 * som.c (som_write_symbol_strings): Do not used fixed buffers,
785 use size_t as a counter.
786 (som_write_space_strings): Similarly.
790 * elf32-i860.c (elf32_i860_relocate_pc26): New function
792 (elf32_i860_relocate_section): Invoke new function from here.
796 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
801 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
802 target section name instead of dumping core when the target symbol is
807 * riscix.c: Remove DEFUN.
811 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
812 initialise flags in output bfd if the input bfd is the default
813 architecture with the default flags.
817 * archive.c: Fix formatting.
818 * coff-arm.c: Likewise.
819 * doc/chew.c: Likewise.
823 * section.c (bfd_get_unique_section_name): Put a dot before the
828 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
829 * elf.c: Fix formatting.
833 * config.bfd (sh-*-linux*): Added.
834 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
835 * targets.c: Declare them.
836 * elf32-sh-lin.c: New file.
837 * Makefile.am: Compile it.
838 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
839 * configure, Makefile.in: Rebuilt.
843 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
844 pseduo-section when determining where the TOC ends.
846 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
847 output x_tvndx as it is only two bytes wide.
849 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
850 reloc is 26 or 32 bits wide.
852 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
853 for relocs that don't change anything. Also look at the full
858 * config.bfd (arm*-*-uclinux*): New target.
862 * configure: Rebuilt with new libtool.m4.
866 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
867 word for variable name.
868 * bfd-in2.h: Regenerate.
872 * config.in: Regenerate.
873 * libbfd.h: Regenerate.
874 * po/bfd.pot: Regenerate.
875 * doc/bfdint.texi: Remove CVS date string - it foils compares with
880 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
884 Shared library and PIC support.
885 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
886 (GOT_ENTRY_SIZE): New.
887 (ELF_DYNAMIC_INTERPRETER): New.
888 (STUB_SUFFIX): Define.
889 (LONG_BRANCH_PIC_IN_SHLIB): Define.
890 (RELATIVE_DYNAMIC_RELOCS): Define.
891 (enum elf32_hppa_stub_type): New.
892 (struct elf32_hppa_stub_hash_entry): Rename offset to
893 stub_offset. Add a number of new fields.
894 (struct elf32_hppa_link_hash_entry): New.
895 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
897 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
898 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
899 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
901 (hppa_link_hash_newfunc): New function.
902 (elf32_hppa_link_hash_table_create): Use above function. Init new
904 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
905 instead of addend, and remove sym_name from args. Don't use
906 symbol name for local syms, instead use sym index.
907 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
908 stub type rather than size. Pass in hash and handle import stub
909 case. Also pass in reloc instead of offset so we can calculate
910 PCREL22F and PCREL12F branches properly.
911 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
912 import and export stubs too.
913 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
914 import and export stub sizing.
915 (elf32_hppa_check_relocs): New function.
916 (elf32_hppa_adjust_dynamic_symbol): New function.
917 (hppa_discard_copies): New function.
918 (elf32_hppa_size_dynamic_sections): New function.
919 (elf_backend_size_dynamic_sections): Define.
920 (elf32_hppa_finish_dynamic_symbol): New function.
921 (elf_backend_finish_dynamic_symbol): Define.
922 (elf32_hppa_size_stubs): Stash params in link hash table, and move
923 some local vars into the link hash table too. For shared links,
924 trundle over function syms, generating export stubs. Handle
925 PCREL22F branches. Break out stub creation code from here..
926 (hppa_add_stub): .. to here. New function.
927 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
928 call the bfd linker. Use elf_gp to record global pointer.
929 Calculate a value from sections if $global$ is missing.
930 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
931 (elf32_hppa_gc_mark_hook): New function.
932 (elf_backend_gc_mark_hook): Define.
933 (elf32_hppa_gc_sweep_hook): New function.
934 (elf_backend_gc_sweep_hook): Define.
935 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
936 Add rel to args, and remove howto, input_bfd, offset, addend,
937 sym_name as we can recalculate these locally. Handle calls to
938 dynamic objects, extra PIC relocs, PCREL22F branches. Change
939 handling of undefined weak syms. Check that stubs are in range.
940 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
941 message on hitting a DPREL21L reloc that needs fixing. Subtract
942 off PC for PCREL14F. Break out code that does a stub lookup from
944 (hppa_get_stub_entry): ..to here. New function.
945 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
946 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
948 (elf32_hppa_finish_dynamic_sections): New function.
949 (elf_backend_finish_dynamic_sections): Define.
950 (elf_backend_final_write_processing) Define.
951 (hppa_handle_PIC_calls): New function.
952 (elf32_hppa_build_stubs): Call it. Pass link_info to
954 (elf32_hppa_create_dynamic_sections): New function
955 to create .plt and .got then set .plt flags correctly.
956 (elf_backend_create_dynamic_sections): Define.
957 (elf32_hppa_object_p): New function.
958 (elf_backend_object_p): Define.
959 (elf32_hppa_elf_get_symbol_type): New function.
960 (elf_backend_get_symbol_type): Define.
961 (elf_backend_can_gc_sections): Define.
962 (elf_backend_want_got_plt): Define.
963 (elf_backend_plt_alignment): Set to 2.
964 (elf_backend_plt_readonly): Define.
965 (elf_backend_want_plt_sym): Define.
966 (elf_backend_got_header_size): Reserve one entry.
968 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
969 (elf32_hppa_size_stubs): Pass in multi_subspace.
970 (elf32_hppa_set_gp): Declare.
972 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
973 (bfd_get_unique_section_name): New function.
974 * bfd_in2.h: Regenerate.
976 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
977 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
981 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
982 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
983 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
984 been updated in finish_dynamic_symbol before modifying function
987 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
988 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
989 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
990 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
991 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
992 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
993 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
994 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
997 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
998 style of local labels as well.
1002 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
1003 references to undefined symbols in debugging sections.
1007 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1008 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
1009 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
1014 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
1015 (elf32_i860_is_local_label_name): New function and prototype.
1019 * configure.in: Increase version number to 2.10.91.
1020 * configure: Regenerate.
1021 * aclocal.m4: Regenerate.
1022 * config.in: Regenerate.
1023 * po/bfd.pot: Regenerate.
1027 * elf.c (_bfd_elf_make_section_from_shdr): Add
1028 .gnu.linkobce.wi. to the list of debug section names.
1032 * dwarf2.c (find_debug_info): New function: Locate a section
1033 containing dwarf2 debug information.
1034 (bfd_dwarf2_find_nearest_line): Find all sections containing
1035 debug information and include them in the stash.
1039 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
1040 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
1041 (sh_reloc_map): Add new relocs.
1042 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
1043 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
1044 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
1045 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
1047 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
1048 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1049 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
1050 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1051 New array constants.
1052 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
1054 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1055 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
1056 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
1057 elf_sh_plt_reloc_offset): Define.
1058 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
1059 elf_sh_link_hash_table): New structs.
1060 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
1061 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
1063 (elf_backend_create_dynamic_sections,
1064 bfd_elf32_bfd_link_hash_table_create,
1065 elf_backend_adjust_dynamic_symbol,
1066 elf_backend_size_dynamic_sections,
1067 elf_backend_finish_dynamic_symbol,
1068 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1069 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1070 elf_backend_got_header_size, elf_backend_plt_header_size):
1072 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1073 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
1075 * bfd-in2.h, libbfd.h: Rebuilt.
1079 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
1084 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
1085 not initialized, set them to indicate the SH1 instruction set.
1089 * acinclude.m4: Include libtool and gettext macros from the
1091 * aclocal.m4, configure: Rebuilt.
1095 * elf.c: Eliminate references to __sparcv9 macro; replace with
1096 autoconf variables HAVE_PSINFO32_T etc.
1097 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
1098 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
1100 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
1101 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
1102 * aclocal.m4: Ditto.
1103 * configure: Regenerate.
1107 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
1108 for any shared link, not just shared -Bsymbolic.
1109 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
1110 any shared link, and pass link info to it.
1111 (elf_i386_size_dynamic_sections): Update comment.
1112 (elf_i386_discard_copies): Modify to discard relocs for symbols
1113 that have been forced local.
1114 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
1115 that have been forced local.
1119 * elflink.h (elf_link_add_object_symbols): Allow common
1120 symbols to have an alignment of 1 if explicitly requested, and
1121 not overridden by other definitions.
1125 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
1126 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
1130 * elf-bfd.h (elf_link_hash_table): Add runpath.
1132 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
1133 * bfd-in2.h: Rebuilt.
1135 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
1136 "runpath" field to NULL.
1137 (bfd_elf_get_runpath_list): New function.
1139 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
1144 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
1145 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
1146 explicitly. Improve validation of r_type.
1150 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
1151 dynamic allocated content space. Add a comment to remind us that
1152 one day this ought to be fixed.
1153 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1154 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1155 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1159 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
1160 field with the newly relocated value instead of adding it to the
1161 existing immediate field.
1162 (elf32_i860_relocate_splitn): Likewise.
1163 (elf32_i860_relocate_highadj): Likewise.
1167 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
1168 was previously just a stub).
1172 * elflink.c (_bfd_elf_create_got_section): Don't abort().
1174 (_bfd_elf_create_dynamic_sections): Likewise.
1178 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
1179 for undefined symbols to be the beginning of the section.
1181 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
1182 four extra entries at the beginning of the .rela.plt section.
1183 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
1184 section to account for the four reserved entries in the .plt section.
1188 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
1189 to the list of NOPs we recognize after a branch-and-link.
1190 Use the ori NOP when one is needed.
1192 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
1197 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
1198 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
1199 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
1204 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
1208 * elf32-i860.c (elf32_i860_relocate_section): New function.
1209 (i860_final_link_relocate): New function.
1210 (elf32_i860_relocate_splitn): New function.
1211 (elf32_i860_relocate_pc16): New function.
1212 (elf32_i860_relocate_highadj): New function.
1213 (elf32_i860_howto): Minor adjustments to some relocations.
1214 (elf_info_to_howto_rel): Define.
1215 (elf_backend_relocate_section): Define.
1219 * elf32-arm.h: Fix formatting.
1223 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
1227 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
1231 * ieee.c (ieee_write_debug_part): Rewrite a comment.
1232 * elf64-ia64.c: Fix a typo.
1236 * elf32-i860 (elf32_i860_howto_table): New structure.
1237 (lookup_howto): New function.
1238 (elf32_i860_reloc_type_lookup): New function.
1239 (elf32_i860_info_to_howto_rela): New function.
1240 (elf_code_to_howto_index): New structure.
1241 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
1242 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
1243 elf32_i860_reloc_type_lookup.
1247 * som.c (struct fixup_format): Constify `format'.
1248 (som_hppa_howto_table): Use SOM_HOWTO macro.
1249 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
1250 (som_bfd_reloc_type_lookup): Likewise.
1251 (compare_subspaces): Remove unused `count1', `count2'.
1252 (som_begin_writing): Remove unused `total_reloc_size'.
1253 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
1254 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
1255 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
1256 (som_find_nearest_line): Decorate unused parameter(s).
1257 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
1258 (som_bfd_link_split_section): Likewise.
1262 * section.c: Restore backed out code.
1263 * elf.c: Restore backed out code.
1264 (copy_private_bfd_data): Fix bug preventing stipped dynamic
1265 binaries from working.
1266 * bfd-in2.h: Regenerate.
1270 * section.c: Back out the change made by Nick Clifton
1273 * bfd-in2.h: Likewise.
1278 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
1282 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
1283 * bfd-in2.h, libbfd.h: Regenerate.
1287 * section.c (struct sec): Add new boolean field 'segment_mark'.
1288 (STD_SECTION): Initialise new field to zero.
1290 * bfd-in2.h: Regenerate.
1292 * elf.c (copy_private_bfd_data): Reorganise section to segment
1293 mapping to cope with moved sections requiring new segments,
1294 and overlapping segments.
1295 (SEGMENT_END): New macro: Return the end address of a segment.
1296 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
1297 contains a section by comparing their VMA addresses.
1298 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
1299 contains a section by comparing their LMA addresses.
1300 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
1301 section should be included in a segment.
1302 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
1303 follows another in memory.
1304 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
1309 * cpu-i860.c: Added comments.
1311 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
1312 bfd_elf32_i860_little_vec.
1313 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
1314 (ELF_MAXPAGESIZE): Changed to 4096.
1316 * targets.c (bfd_elf32_i860_little_vec): Declaration of
1318 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
1320 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
1321 config for little endian elf32 i860.
1322 (targ_defvec): Define for the new config above
1323 as "bfd_elf32_i860_little_vec".
1324 (targ_selvecs): Define for the new config above
1325 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
1327 * configure.in (bfd_elf32_i860_little_vec): Added recognition
1330 * configure: Regenerated.
1334 * elflink.h (elf_merge_symbol): Take one more argument,
1335 dt_needed, to indicate if the symbol comes from a DT_NEEDED
1336 entry. Don't overide the existing weak definition if dt_needed
1338 (elf_link_add_object_symbols): Pass dt_needed to
1339 elf_merge_symbol ().
1343 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
1348 * configure.host (*-*-aix*): AIX has 'long long' always.
1350 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
1351 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
1352 (xcoff_write_archive_contents_big): Don't update the offset
1353 of the symbol table, xcoff_write_armap will do it.
1357 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
1358 of dynobj for SGI_COMPAT checks.
1362 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
1363 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
1364 * bfd-in2.h: Regenerate.
1368 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
1369 range symbol indices in relocs and issue an error message.
1373 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
1374 info->new_dtags when setting DT_FLAGS_1. It will only be set
1375 by the new linker options. It shouldn't break anything.
1379 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
1380 only if info->new_dtags is true.
1384 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
1385 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
1389 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
1390 (ALL_MACHINES_CFILES): Add cpu-cris.c.
1391 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
1392 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
1393 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
1394 * Makefile.in: Rebuild.
1395 * aclocal.m4: Rebuild.
1396 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
1397 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
1398 (bfd_cris_arch): Declare.
1399 (bfd_archures_list): Add bfd_cris_arch.
1400 * bfd-in2.h: Rebuild.
1401 * config.bfd: (cris-*-*): New target.
1402 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
1403 * configure: Rebuild.
1404 * elf.c (prep_headers): Add bfd_arch_cris.
1405 * libbfd.h: Rebuild.
1406 * libaout.h (enum machine_type): Add M_CRIS.
1407 * reloc.c: Add CRIS relocations.
1408 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
1409 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
1410 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
1411 * po/POTFILES.in, po/bfd.pot: Regenerate.
1415 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
1416 DF_TEXTREL if DT_TEXTREL is set.
1417 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1418 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1419 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1420 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1421 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1422 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1423 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1424 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1425 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
1426 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1428 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
1429 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
1431 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
1435 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
1436 * bfd-in2.h: Rebuild.
1438 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
1439 (elf_dt_soname): New.
1441 * elf.c (bfd_elf_set_dt_needed_soname): New.
1443 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
1444 entry if the shared object loaded by DT_NEEDED is used to
1445 resolve the reference in a regular object.
1449 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
1450 DT_DEPAUDIT and DT_AUDIT as strings.
1454 * format.c: Fix formatting.
1458 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
1462 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
1463 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
1464 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
1465 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
1466 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
1467 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
1468 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
1472 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
1473 renamed functions from here...
1474 (assign_section_numbers): Use renamed functions.
1475 (prep_headers): Use renamed functions.
1477 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
1478 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
1479 * bfd-in2.h: Regenerate.
1483 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
1484 parenthesis in if statement.
1488 Enable the support for Traditional MIPS.
1489 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
1490 return ict_none appropriately for traditional mips targets.
1491 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
1492 (STUB_MOVE): Conditionalize for traditonal mips.
1493 (STUB_LI16): Likewise.
1494 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
1495 room for RTPROC header.
1496 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
1497 the permission for the PT_DYNAMIC as read, write and execute.
1498 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
1499 for traditonal mips.
1500 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
1501 _DYNAMIC_LINKING for traditonal mips.
1502 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
1503 in case of traditonal mips.
1504 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
1505 entry is required. For a function if PLT is not required then set the
1506 corresponding hash table entry to 0.
1507 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
1509 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
1510 shared object set the value to 0.
1511 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
1512 _DYNAMIC_LINKING for traditonal mips.
1513 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
1514 for traditonal mips.
1518 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
1522 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
1523 out a structure that is BFD_IN_MEMORY.
1527 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
1528 bfd pointer. Print section id instead of bfd pointer for local
1529 syms. Prefix addend with `+' for global syms as well as local.
1530 Correct calculation of name component lengths.
1531 (elf64_hppa_check_relocs): Update call to get_dyn_name.
1534 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
1535 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
1536 (elf64_hppa_modify_segment_map): Likewise.
1540 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
1541 addresses to be "naturally" sign extended. Return -1 if unknown.
1542 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
1543 * bfd-in2.h: Regenerate.
1547 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
1548 and ECOF_SIGNED_64 to list ways to extract an offset.
1549 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
1550 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
1552 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
1553 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
1557 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
1558 bfd_get_start_address.
1559 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
1560 (elf_swap_ehdr_out): Ditto.
1564 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
1565 compatibility with older binutils.
1569 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
1570 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
1573 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
1574 (parse_line_table): Ditto.
1575 (_bfd_dwarf1_find_nearest_line): Ditto.
1576 * syms.c (cmpindexentry): Remove extra `*' from params.
1580 * elf32-mips.c (sort_dynamic_relocs): New Function.
1581 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
1582 via qsort to sort the dynamic relocations in increasing r_symndx
1587 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
1588 ATTRIBUTE_UNUSED to unused args.
1589 (get_opd): Likewise.
1590 (get_plt): Likewise.
1591 (get_dlt): Likewise.
1592 (get_stub): Likewise.
1593 (elf64_hppa_adjust_dynamic_symbol): Likewise.
1594 (elf64_hppa_link_output_symbol_hook): Likewise.
1595 (elf64_hppa_check_relocs): Delete unused var.
1596 (elf64_hppa_size_dynamic_sections): Likewise.
1597 (elf64_hppa_finalize_opd): Likewise.
1598 (elf64_hppa_finalize_dynreloc): Likewise.
1599 (elf64_hppa_modify_segment_map): Likewise.
1600 (elf64_hppa_finish_dynamic_sections): Likewise.
1602 * elf-hppa.h (elf_hppa_final_write_processing): Add
1603 ATTRIBUTE_UNUSED to unused args.
1604 (elf_hppa_final_link_relocate): Likewise.
1605 (elf_hppa_record_segment_addrs): Add paretheses.
1606 (elf_hppa_relocate_section): Constify dyn_name.
1609 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
1610 rearrange case statement so that it gets preferred to 32-bit ones.
1612 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
1613 asection->id instead of address of asection structure.
1614 (elf32_hppa_size_stubs): Likewise.
1616 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
1617 for .init* and .fini*.
1619 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
1620 and addends used in stub names to 32 bits.
1621 (elf32_hppa_size_stubs): Likewise.
1623 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
1624 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
1625 not bfd_put_64. Fix minor comment typo and formatting.
1627 Changes to create multiple linker stubs, positioned immediately
1628 before the section where they are required.
1629 * elf32-hppa.c: Don't include hppa_stubs.h.
1630 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
1631 (elf32_hppa_stub_hash_table): Delete.
1632 (elf32_hppa_link_hash_entry): Delete.
1633 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
1634 stub_hash_table, and store the struct here rather than a pointer.
1635 Delete output_symbol_count. Add offset array. Change
1636 global_value to a bfd_vma.
1637 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
1638 (elf32_hppa_stub_hash_traverse): Delete.
1639 (elf32_hppa_name_of_stub): Delete.
1640 (elf32_hppa_link_hash_lookup): Delete.
1641 (elf32_hppa_link_hash_traverse): Delete.
1642 (elf32_hppa_stub_hash_table_init): Delete.
1643 (elf32_hppa_size_of_stub): Pass input section and offset rather
1644 than location and calculate location here. Don't pass name as all
1645 stubs are now the same size.
1646 (elf32_hppa_stub_hash_newfunc): Init new fields.
1647 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
1649 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
1650 comparing against ints. Rewrite stub handling code.
1651 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
1652 Case enums to int before comparing against ints. Remove
1653 bfd_reloc_dangerous case.
1654 (elf32_hppa_build_one_stub): Rewrite.
1655 (elf32_hppa_size_one_stub): New function.
1656 (elf32_hppa_build_stubs): Rewrite.
1657 (elf32_hppa_size_stubs): Pass in linker call-back functions.
1658 Rewrite stub-handling specific code.
1660 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
1662 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
1664 * hppa_stubs.h: Delete.
1665 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
1666 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
1667 * Makefile.in: Regenerate.
1669 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
1672 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
1674 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
1675 and section name for bfd_reloc_notsupported error message.
1676 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
1677 bfd_reloc_notsupported.
1678 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
1680 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
1681 undefined weak symbols for all relocs.
1682 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
1683 offsets are relative to one past the delay slot.
1684 (elf32_hppa_size_stubs): Account for reloc addend when calculating
1685 branch destination. Put addend into stub name too.
1686 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
1687 adjust by 8 when deciding whether a linker stub is needed. Put
1688 addend into stub name as for above.
1690 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
1691 various args and vars.
1692 (elf32_hppa_bfd_final_link_relocate): Here too.
1693 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
1694 inner block var to avoid shadowing.
1696 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
1698 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
1699 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
1700 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
1702 * libhppa.h: Change practically all unsigned ints to plain ints.
1703 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
1707 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
1708 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
1711 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
1712 to the new OP_* ones.
1714 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
1715 error exit. Bail out earlier on plabel relocs that we aren't
1716 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
1717 string, and then don't free our copy.
1718 (elf32_hppa_build_one_stub): Make insn unsigned int.
1720 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
1721 available with BL, not BE and BLE.
1723 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
1724 code for elf arg relocs.
1725 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
1726 argument with elf_link_hash_entry h. Handle undefined weak
1727 symbols. Move $global$ lookup from here...
1728 (elf32_hppa_relocate_section): ...to here. Return correct error
1729 message for non-handled relocs.
1730 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
1731 wrong test was -0x3ffff to +0x40000.
1733 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
1734 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
1735 Handle them as such.
1736 (elf_hppa_relocate_insn): Fix a typo.
1738 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
1739 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
1740 assemble_17, assemble_21): Delete.
1741 Supply defines for all 64 possible opcodes.
1742 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
1743 formats. Handle COMICLR.
1744 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
1747 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
1748 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
1749 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
1751 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
1752 the local syms - did this code get deleted accidentally? Ignore
1753 undefined and undefweak syms.
1755 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
1756 block. Use it instead of elf64_hppa_hash_table (info).
1757 (elf_hppa_final_link_relocate): Use hppa_info instead of
1758 elf64_hppa_hash_table (info).
1760 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1761 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1762 (hppa_rebuild_insn): Mask immediate bits here instead.
1763 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1767 * section.c (struct sec): Add id field. Tidy comment formatting.
1768 (bfd_make_section_anyway): Set id.
1769 (STD_SECTION): Init id too.
1770 Change CONST to const throughout.
1771 * archures.c (bfd_arch_info): Tidy comment.
1772 (bfd_arch_list): Change a CONST to const.
1773 * libbfd-in.h: Tidy comments and replace CONST with const.
1774 * elf-bfd.h: Likewise.
1775 * libbfd.h: Regenerate.
1776 * bfd-in2.h: Regenerate.
1777 * libcoff.h: Regenerate.
1781 * archive.c (_bfd_write_archive_contents): Add an informative
1786 * srec.c: Fix formatting.
1794 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
1795 value of PC-relative offsets.
1799 * elf64-alpha.c (alpha_elf_size_info): New.
1800 (elf_backend_size_info): Define to alpha_elf_size_info.
1801 * elfcode.h (elf_size_info): Change hash bucket size to 4.
1805 * elf32-mips.c: Include elf32-target.h again for the traditional
1810 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
1811 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
1812 (avr_info_to_howto_rela): Likewise.
1813 (elf32_avr_gc_mark_hook): Likewise.
1814 (elf32_avr_gc_sweep_hook): Likewise.
1815 (elf32_avr_relocate_section): Likewise.
1819 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
1820 an external symbol for a non-shared, non-relocatable link.
1824 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
1825 is an external symbol.
1826 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
1831 * reloc16.c: Fix formatting.
1835 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
1836 to add a new target for traditional mips i.e
1837 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
1838 * configure.in: Likewise.
1839 * configure: Rebuild.
1840 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
1842 (bfd_elf32_tradlittlemips_vec): Likewise.
1843 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
1844 to see that elfNN_bed does not get redefined even if the target file
1845 is included twice for a chip. See elf32-mips.c.
1849 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
1850 (CLEANFILES): Add DEPA.
1851 * Makefile.in: Regenerate.
1855 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
1856 can't assume the PE header is at 0x80.
1860 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
1864 * go32stub.h: Update stub.
1868 * archures.c (bfd_mach_avr5): Define.
1869 * bfd-in2.h (bfd_mach_avr5): Define.
1870 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
1871 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
1872 (compatible): Update comment. Add missing test.
1873 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
1874 for avr2 and avr4. Simplify 8K wrap code.
1875 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
1876 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
1880 * coff-h8300.c: Fix formatting.
1881 * cpu-h8300.c: Likewise.
1885 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
1886 for local symbols whose names are unknown.
1890 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
1892 * Makefile.in: Regenerate.
1893 * doc/Makefile.in: Regenerate.
1897 * Makefile.am: Rebuild dependency.
1898 * Makefile.in: Rebuild.
1902 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
1903 (elf_backend_copy_indirect_symbol): Map to the new function.
1907 * archive.c (normalize): Correct pointer comparison when checking
1909 (bfd_bsd_truncate_arname): Likewise.
1910 (bfd_gnu_truncate_arname): Likewise.
1914 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
1915 sections elf_{text,data}_{section,symbol}.
1916 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
1917 (_bfd_mips_elf_hide_symbol): New function.
1918 (elf_backend_hide_symbol): Map to the new function.
1919 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
1920 definitions of mips_elf_{text,data}_{section,symbol}.
1921 (mips_elf_local_relocation_p): Try to find the direct symbol
1922 based on new check_forced argument.
1923 (mips_elf_calculate_relocation): Use new version of
1924 mips_elf_local_relocation_p.
1925 (mips_elf_relocate_section): Likewise.
1926 (_bfd_mips_elf_relocate_section): Likewise.
1927 (mips_elf_sort_hash_table): Only assert that have enough GOT
1929 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
1930 entry if the relocation based on the new external argument.
1931 (mips_elf_create_dynamic_relocation): Assert that we have a
1932 section contents allocated where we can swap out the dynamic
1934 (mips_elf_calculate_relocation): Find the real hash-table entry
1935 correctly by using h->root.root.type. Only create a dynamic
1936 relocation entry if the symbol is defined in a shared library.
1937 Create an external GOT entry for the GOT16 relocation if the
1938 symbol was forced local.
1939 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
1940 dynamic index if the symbol was forced local.
1944 * elf32-mips.c: Fix typos in comments.
1948 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
1953 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
1954 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
1955 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
1956 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
1957 (bfd_elf32_m68hc11_vec): Likewise.
1958 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
1959 Supports 68hc11 & 68hc12 at the same time.
1960 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
1962 (bfd_elf32_m68hc11_vec): Likewise.
1963 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
1964 * archures.c (bfd_m68hc12_arch): Define and register in global list
1965 (bfd_m68hc11_arch): Likewise.
1966 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
1967 BFD_RELOC_M68HC11_3B): Define.
1968 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
1969 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
1973 * elf_bfd.h (struct elf_backend_data): Add info argument to
1974 elf_backend_hide_symbol.
1975 (_bfd_elf_link_hash_hide_symbol): Likewise.
1976 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
1977 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
1978 * elflink.h (elf_link_add_object_symbols): Likewise.
1979 (elf_link_assign_sym_version): Likewise.
1983 * coff-i386.c (coff_i386_reloc): Don't return in case of
1984 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
1985 Compensate PE relocations when linking with non-PE object
1986 files to generate a non-PE executable.
1990 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
1991 GOT entries if we're doing a static link or -Bsymbolic link.
1995 * elflink.h (elf_link_adjust_relocs): Check for and call backend
1996 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
1998 (elf_link_output_relocs): Likewise.
1999 (elf_reloc_link_order): Likewise.
2003 * archures.c (enum bfd_architecture): #define constants for
2004 PowerPc and RS6000 machine numbers.
2005 * bfd-in2.h: Regenerate.
2006 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
2007 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
2008 and RS6000 machine numbers using #defined constants from
2010 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
2011 machine numbers using #defined constants from archures.c. Add
2012 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
2013 64-bit words in 620 entry.
2014 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
2016 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
2020 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
2021 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
2022 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
2026 * bfd-in.h (bfd_family_coff): Define.
2027 * bfd-in2.h: Regenerate.
2028 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
2029 coff_find_nearest_line): Check COFFness using bfd_family_coff()
2030 instead of bfd_target_coff_flavour.
2031 * cofflink.c (_bfd_coff_final_link): Likewise.
2032 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
2033 exclude XCOFF files.
2034 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2036 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
2037 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
2038 * xcofflink.c (XCOFF_XVECP): Delete.
2039 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
2040 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
2041 bfd_xcoff_record_link_assignment,
2042 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
2043 check for bfd_target_xcoff_flavour.
2047 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
2049 (read_hdr): New function.
2050 (rs6000coff_core_p): Store mstsave or __context64 struct instead
2051 of trying to extract individual registers. Set abfd->arch_info
2052 to match the architecture that created the core file.
2053 (rs6000coff_get_section_contents): Delete.
2054 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
2058 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
2063 * configure: Regenerate.
2067 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
2072 * configure.in (VERSION): Update to show this is the CVS mainline.
2076 * elf32-d10v.c: Include elf/d10v.h
2077 (enum reloc_type): Delete.
2078 * elf32-d30v.c: Include elf/d30v.h
2079 (enum reloc_type): Delete.
2081 * Makefile.am: Run "make dep-am" to regenerate dependencies.
2082 * Makefile.in: Regenerate.
2084 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
2085 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
2086 move HOWTOs into elf_howto_table.
2087 (R_386_standard, R_386_ext_offset): Define.
2088 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
2089 (elf_i386_reloc_type_lookup): Modify calculation of index into
2090 elf_howto_table since we've removed the padding.
2091 (elf_i386_info_to_howto_rel): Likewise.
2092 (elf_i386_relocate_section): Likewise.
2096 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
2100 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
2101 an error when seeing an undefined symbol with hidden/internal
2102 attribute. It is handled in *_relocate_section ().
2106 * elflink.h (elf_fix_symbol_flags): Follow the link for the
2107 indirect symbol for the ELF_LINK_NON_ELF bit.
2108 (elf_link_output_extsym): Don't output the indirect symbol even
2109 if the ELF_LINK_NON_ELF bit is set.
2113 * config.bfd (i[3456]86-*-netbsdelf*): New target.
2114 (i[3456]86-*-netbsdaout*): New target.
2115 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
2116 (i[3456]86-*-openbsd*): Likewise.
2120 * trad-core.c: From hpux-core.c, include <dirent.h> or
2121 <sys/ndir.h> when possible.
2125 * opintl.h (_(String)): Explain why dgettext is used instead
2130 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
2131 definitions. We must not assume they are sorted in the file
2132 according to their index numbers.
2136 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
2137 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
2138 R_PARISC_DIR17F are for absolute branches; Handle them as such.
2142 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
2143 80960CA, 80960MC as valid machine names.
2147 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
2148 visibility bits if the symbol is undefined. Correctly handle
2149 weak undefined symbols with hidden and internal attributes.
2151 * elflink.h (elf_link_add_object_symbols): Always turn the
2152 symbol into local if it has the hidden or internal attribute.
2156 * ppcboot.c: Add packed attribute if compiling with GCC.
2160 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
2164 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
2165 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
2166 corefile on a 64-bit (Sparc Solaris) host. Also clean up
2171 * Makefile.am: Update dependencies with "make dep-am"
2172 * Makefile.in: Regenerate.
2174 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
2175 bindtextdomain): Replace defines with those from intl/libgettext.h
2176 to quieten gcc warnings.
2180 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
2182 * archive.c (normalize, bfd_bsd_truncate_arname,
2183 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
2184 file names with backslashes.
2186 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
2189 * sysdep.h: Include filenames.h.
2193 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
2197 * elf64-sparc.c (sparc64_elf_relax_section): New.
2198 (sparc64_elf_relocate_section): Optimize tail call into branch always
2200 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2201 (elf32_sparc_relax_section): New.
2205 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
2206 Remove unusued variables.
2207 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
2208 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
2209 previous fix, so that shared libs really don't influence targets
2210 extension mask and memory model.
2214 * elf64-alpha.c (elf64_alpha_relocate_section): Check
2215 h->root.other not h->other.
2216 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2218 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
2222 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
2223 undefined symbol with the non-default visibility attributes.
2224 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2225 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2226 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2227 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2228 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2229 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2230 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2231 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2232 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2233 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
2234 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2238 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
2239 PCREL22, PCREL64I. Zero size of special relocs.
2240 (elf64_ia64_reloc_type_lookup): Likewise.
2241 (USE_BRL, oor_brl, oor_ip): New.
2242 (elf64_ia64_relax_section): New.
2243 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
2244 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
2245 (elf64_ia64_relocate_section): Likewise.
2246 (bfd_elf64_bfd_relax_section): New.
2247 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
2248 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
2249 * bfd-in2.h, libbfd.h: Regenerate.
2253 * configure.in : Add peigen.lo to MIPS PE targets.
2254 * configure: Regenerate.
2258 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
2259 only if it is known for both input and output bfds. Separate
2260 error message strings as in some languages, it may be necessary
2261 to change more than one place in the string to change between
2264 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
2265 endianess checks, call _bfd_generic_verify_endian_match() instead.
2267 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2269 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
2271 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
2272 endianess before checking bfd flavours.
2276 * elflink.h (elf_link_output_extsym): Clear the visibility
2277 field for symbols not defined locally.
2281 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2282 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2283 (hppa_rebuild_insn): Mask immediate bits here instead.
2284 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2288 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
2289 relocs for an executable, ensure that they are virtual addresses.
2293 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
2298 * elflink.h: Add emitrelocations support: when enabled, relocation
2299 information and relocation sections are put into final output
2300 executables. If the emitrelocations flag is set, do the following:
2301 (elf_bfd_final_link): Emit relocation sections.
2302 (elf_link_input_bfd): Compute relocation section contents.
2303 (elf_gc_sections): Don't clean relocation sections.
2307 * som.c (som_decode_symclass): Recognize weak symbols.
2311 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
2312 read idata section only from dataoff.
2313 (pe_print_edata): Correctly check for valid eat_member.
2317 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
2321 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
2325 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
2327 * peigen.c (pe_print_idata): Look for .idata section and print
2328 info even if data directory has zero entries. Read idata section
2329 starting from dataoff, and adjust all data offsets to suit. Cast
2330 all bfd_vma vars to unsigned long before passing to fprintf.
2331 * peigen.c (pe_print_edata): Similarly, look for .edata section
2332 and print info even if data directory has zero entries. Cast
2333 all bfd_vma vars to unsigned long before passing to fprintf.
2336 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
2337 directory size which may be bogus.
2338 * peigen.c (pe_print_edata): Similarly.
2342 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
2344 (copy_private_bfd_data): Allow for space possibly taken up by elf
2345 headers when calculating segment physical address from lma.
2349 * versados.c (versados_scan): Init stringlen and pass_2_done.
2351 * trad-core.c (trad_unix_core_file_p): Return
2352 bfd_error_wrong_format rather than bfd_error_file_truncated.
2354 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
2355 add_data_entry. DataDirectory virtual address is relative.
2356 (pe_print_idata): Account for relative DataDirectory virtual
2357 addresses. Don't trash datasize inside POWERPC_LE_PE code.
2358 (pe_print_edata): Similarly.
2361 * peigen.c (dir_names): Add Delay Import Directory.
2362 (pe_print_idata): Always search for bfd section containing
2363 idata address rather than looking up section name. Print this
2364 section name rather than .idata.
2365 (pe_print_edata): Similarly. Also print some fields as %08lx.
2366 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
2371 * xcoff.h: Rename to xcoff-target.h
2372 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
2373 * coff-rs6000.c: Ditto.
2374 * coff64-rs6000.c: Ditto.
2375 * coff-pmac.c: Ditto.
2376 * Makefile.in: Regenerate.
2380 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
2381 Change U802TOC64MAGIC to U803XTOCMAGIC.
2385 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
2386 * bfd-in.h: Prototype bfd_elf_get_arch_size.
2387 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
2391 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
2395 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
2396 hidden and internal symbols.
2397 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
2399 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
2400 assign a PLT or GOT entry to symbols with hidden and
2401 internal visibility.
2405 * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
2407 * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2411 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
2416 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
2417 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
2419 * Makefile.in: Regenerate.
2423 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
2424 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
2425 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
2426 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
2427 * Makefile.in: Rebuild.
2431 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
2432 doesn't work very well.
2434 * elf-hppa.h (elf_hppa_internal_shdr): Define.
2435 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
2436 Set hdr->s_type to 1 if ARCH_SIZE == 32.
2437 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
2438 (elf_hppa_info_to_howto): Likewise.
2439 (elf_hppa_info_to_howto_rel): Likewise.
2440 (elf_hppa_reloc_type_lookup): Likewise.
2441 (elf_hppa_is_local_label_name): Likewise.
2442 (elf_hppa_fake_sections): Likewise.
2443 (elf_hppa_final_write_processing): Likewise.
2444 (elf_hppa_howto_table): Fully initialise all entries.
2445 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
2446 (elf_hppa_info_to_howto): Likewise.
2447 (elf_hppa_info_to_howto_rel): Likewise.
2448 (elf_hppa_reloc_type_lookup): Likewise.
2449 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
2450 elf_hppa_unmark_useless_dynamic_symbols,
2451 elf_hppa_remark_useless_dynamic_symbols,
2452 elf_hppa_record_segment_addrs, elf_hppa_final_link,
2453 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
2454 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
2455 elf32-hppa.c mess is cleaned up.
2456 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
2457 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
2458 r_field then call hppa_field_adjust inline func with variable
2459 r_field arg, instead call hppa_field_adjust with fixed arg.
2460 In case R_PARISC_PCREL22F, don't set r_field.
2461 (elf_hppa_relocate_insn): Change args and return type to unsigned
2462 int. Call re_assemble_* funcs to do the work.
2464 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
2467 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
2469 (sign_extend): Mask first before sign extending.
2470 (low_sign_extend): Rewrite without condition expression.
2471 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
2472 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
2473 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2474 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
2475 result as function return value rather than through pointer arg.
2476 Accept unsigned int args, and return unsigned int.
2477 (re_assemble_3): New. Combines function of dis_assemble_3 with
2478 re-assembly of opcode and immediate.
2479 (re_assemble_12): Likewise.
2480 (re_assemble_16): Likewise.
2481 (re_assemble_17): Likewise.
2482 (re_assemble_21): Likewise.
2483 (re_assemble_22): Likewise.
2484 (hppa_field_adjust): Rewrite and document, paying attention to
2485 size of types and signed/unsigned issues.
2486 (get_opcode): Shift before masking.
2487 (FDLW): Rename to FLDW.
2488 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
2489 (hppa_rebuild_insn): Change args and return value to unsigned
2490 int. Make use of re_assemble_*. Correct case 11.
2492 * dep-in.sed: Handle ../opcodes/.
2493 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
2494 elf64-hppa.h, hppa_stubs.h, xcoff.h.
2495 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
2496 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
2497 elfarm-nabi.lo dependencies outside of auto-dependency area.
2498 Regenerate dependencies.
2499 * Makefile.in: Regenerate.
2501 * configure.in (TRAD_HEADER): Test non-null before
2503 * configure: Regenerate.
2505 * reloc.c: Fix mis-spelling in comment.
2509 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
2510 * vms.c (vms_openr_next_archived_file): Return NULL.
2514 * coffcode.h Copy changes mistakenly done to libcoff.h in
2519 * libbfd-in.h: Correctly check GCC version.
2520 * bfd-in.h: Likewise.
2521 * libhppa.h: Likewise.
2522 * libbfd.h: Regenerate.
2523 * bfd-in2.h: Regenerate.
2527 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
2528 coffdu-rs6000.{lo,c}.
2529 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
2531 * Makefile.in: Regenerate.
2532 * xcoff.h: New file.
2533 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
2534 * coff-rs6000.c: Move all declarations and defines that are
2535 common to the xcoff backends into xcoff.h
2536 * coff64-rs6000.c: Ditto,
2540 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
2541 _bfd_coff_force_symnames in strings and
2542 _bfd_coff_debug_string_prefix_length to their default values.
2543 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
2547 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
2548 _bfd_coff_force_symnames in strings and
2549 _bfd_coff_debug_string_prefix_length to their default values.
2553 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
2554 Check local_got_refcounts before dereferencing.
2556 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
2557 before deciding we don't need R_PPC_PLT32 relocation.
2558 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
2561 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
2563 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
2565 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
2566 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
2567 (elf_i386_relocate_section): Allow for .plt to go missing.
2568 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
2569 can use a relative reloc for got as elf_i386_relocate_section.
2570 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
2574 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
2578 * Makefile.am (coff64-rs6000.lo): New rule.
2579 * Makefile.in: Regenerate.
2580 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
2581 xcoff_is_local_label_name, xcoff_rtype2howto,
2582 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
2583 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
2584 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
2585 (NO_COFF_SYMBOLS): Define.
2586 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
2587 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
2589 (MINUS_ONE): New macro.
2590 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
2592 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
2593 coff_SWAP_aux_out): Map to the new functions.
2594 * coff64-rs6000.c: New file.
2595 * libcoff.h (bfd_coff_backend_data): Add new fields
2596 _bfd_coff_force_symnames_in_strings and
2597 _bfd_coff_debug_string_prefix_length.
2598 (bfd_coff_force_symnames_in_strings,
2599 bfd_coff_debug_string_prefix_length): New macros for above fields.
2600 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
2601 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
2602 of using coff_swap_sym_in directly.
2603 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
2604 (coff_set_flags) Set magic for XCOFF64.
2605 (coff_compute_section_file_positions): Add symbol name length to
2606 string section length if bfd_coff_debug_string_prefix_length is
2608 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
2609 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
2610 using coff_swap_lineno_in directly.
2611 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
2612 and _bfd_coff_debug_string_prefix_length fields.
2613 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
2614 symbol names into strings table when
2615 bfd_coff_force_symnames_in_strings is true.
2616 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
2617 SET_RELOC_VADDR): New macros.
2618 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
2619 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
2621 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
2622 changes within RS6000COFF_C specific code.
2623 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
2624 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
2625 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2626 Extend existing hack on target name.
2627 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
2629 * coff-tic54x.c (ticof): Keep up to date with new fields
2630 in bfd_coff_backend_data.
2631 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
2632 targ_selvecs to include rs6000coff64_vec for rs6000.
2633 * configure.in: Add rs6000coff64_vec case.
2634 * cpu-powerpc.c: New bfd_arch_info_type.
2638 * config.bfd: Only disable elf32-hppa vectors, not all of the
2639 BSD and OSF configuration support. Provide (disabled) clauses
2641 * configure.in: Add clause for PA64 support.
2642 * configure: Rebuilt.
2644 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
2645 (bfd_elf64_hppa_vec): Declare.
2647 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
2648 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
2649 (elf64-hppa.lo): Add dependencies.
2650 * Makefile.in: Rebuilt.
2652 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
2656 * libhppa.h (dis_assemble_16): New function.
2657 (pa_arch): Added pa20w element.
2661 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
2662 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
2663 bfd_elf64_slurp_reloc_table.
2665 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
2666 definitions to get external names.
2667 (elf_write_relocs): Renamed from write_relocs and make global.
2668 (elf_slurp_reloc_table): Make global.
2669 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
2671 * archive.c (hpux_uid_gid_encode): New function.
2672 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
2673 defined and the ID is greater than 99999.
2674 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
2675 special uid/gid fields into 32 bit values.
2679 * config.bfd: Add NetBSD/sparc64 support.
2686 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
2687 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
2688 (BFD64_BACKENDS): Add elf64-ia64.lo.
2689 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
2690 (cpu-ia64.lo, elf64-ia64.lo): New rules.
2691 * Makefile.in: Rebuild.
2692 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
2693 (bfd_ia64_arch): Declare.
2694 (bfd_archures_list): Add bfd_ia64_arch.
2695 * bfd-in2.h: Rebuild.
2696 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
2697 * configure: Rebuild.
2698 * configure.host: (ia64-*-linux*): New host.
2699 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
2700 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
2701 * elf.c (prep_headers): Add bfd_arch_ia64.
2702 * libbfd.h: Rebuild.
2703 * reloc.c: Add IA-64 relocations.
2704 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
2706 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
2707 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
2711 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
2712 contents when performing a partial link.
2713 (bfd_elf_d30v_reloc_21): Likewise.
2717 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
2718 patch to symbols defined by a shared object.
2719 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
2724 * dwarf2.c (concat_filename): Avoid string literal concatenation.
2725 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
2729 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
2730 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
2731 (coff-ia64.lo): Add dependency.
2732 * Makefile.in: Regenerate.
2733 * coff-ia64.c: New file.
2734 * efi-app-ia32.c: Ditto.
2735 * efi-app-ia64.c: Ditto.
2736 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
2737 (coff_set_flags): Ditto.
2738 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
2739 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
2740 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
2741 * configure: Regenerate.
2742 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
2743 (PUT_OPTHDR_IMAGE_BASE): Ditto.
2744 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2745 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2746 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2747 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2748 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2749 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2750 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2751 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2752 (GET_PDATA_ENTRY): Ditto.
2753 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
2754 data_start. Use above macros to read fields that are 64 bit wide for
2755 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
2756 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
2757 FileAlignment and SectionAlignment to minimum alignment if they
2759 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
2760 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
2761 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
2762 Use above macros to write fields that are 64 bit wide for
2764 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
2765 5*4 otherwise. This should be right for IA-32 and IA-64, but may
2766 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
2767 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
2768 begin address, end address, and unwind info address only. Use
2769 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
2771 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
2772 HIGH3ADJ relocation names.
2773 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
2774 * targets.c: Declare bfd_efi_app_ia32_vec and
2775 bfd_efi_app_ia64_vec.
2776 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
2777 bfd_efi_app_ia64_vec.
2781 * bfd-in2.h: Add prototypes for tic54x load page access.
2782 * bfd-in.h: Regenerate.
2783 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
2784 in customized _set_arch_mach function.
2785 * coffcode.h (coff_set_alignment_hook): Set section load page if
2786 the appropriate macro is defined.
2787 (write_object_contents): Read section load page.
2791 * elf32-hppa.h: Update copyright date.
2793 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
2794 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
2796 * elf32-d30v.c (MAX32): Don't use LL suffix.
2797 (MIN32): Define in terms of MAX32.
2798 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
2800 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
2803 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
2807 * dep-in.sed: Match space before file name, not after.
2808 * Makefile.am: Regenerate dependencies.
2809 * Makefile.in: Regenerate.
2811 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
2812 case, allow address wrap-around stupidly removed 2000-03-17. Sign
2813 extend without an if statement.
2817 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
2819 * elf32-mips.c (gprel16_with_gp): Likewise.
2820 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
2821 here using -0x40000, not (int)0xfffc0000.
2822 (elf32_hppa_size_of_stub): Likewise.
2826 * coff-tic54x.c: Now builds with all targets.
2827 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
2828 * Makefile.in: Regenerate.
2829 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
2830 unitialized variable.
2834 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
2835 --enable-build-warnings option.
2836 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2837 * Makefile.in, configure: Re-generate.
2841 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
2842 BFD_RELOC_THUMB_PCREL_BLX.
2844 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2845 R_ARM_XPC25 and R_ARM_THM_PC22.
2847 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
2848 R_ARM_XPC25 and R_ARM_THM_XPC22.
2849 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
2850 R_ARM_[XPC25|THM_XPC22].
2852 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
2853 elf/arm-oabi.h to elf/arm.h
2855 * Makefile.am: Fix dependency for elfarm-oabi.c
2856 * Makefile.in: Regenerate.
2858 * bfd-in2.h: Regenerate.
2859 * libbfd.h: Regenerate.
2863 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
2864 and restore it on failure. Release newly allocated tdata on
2869 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
2870 (decode_line_info): Set it. Report error if unit->line_offset is
2871 equal to or larger than it.
2875 * targets.c: Added vecs for tic54x.
2876 * reloc.c: Added relocs for tic54x.
2877 * libbfd.h: Regenerated.
2878 * configure: Add TI COFF vecs for tic54x.
2879 * configure.in: Ditto.
2880 * config.bfd (targ_cpu): Recognize new tic54x target.
2881 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
2882 * bfd-in2.h: Add tic54x target and relocations.
2883 * Makefile.am, Makefile.in: Add tic54x target.
2884 * archures.c (bfd_archures_list): Add tic54x target.
2885 * coff-tic54x.c: New.
2886 * cpu-tic54x.c: New.
2890 * elfcore.h (elf_core_file_p): call backend_object_p which
2891 thereby gets an opportunity to update the arch/machine type.
2895 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
2896 class. Handle SEC_CLINK and SEC_BLOCK flags.
2897 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
2898 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
2902 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
2903 EF_INTERWORK if this is an unknown EABI.
2904 (elf32_arm_merge_private_bfd_data): Check EABI version
2905 numbers. Only check EF_xxx flags if the EABI version number
2907 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
2908 if the EABI version number is unknown.
2909 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
2910 if the EABI version number is unknown.
2914 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
2915 BFD_RELOC_SH_LOOP_END.
2916 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
2917 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
2918 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
2919 (sh_elf_reloc_loop): New function.
2920 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
2922 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
2923 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
2924 * bfd-in2.h, libbfd.h: Regenerate.
2928 * po/bfd.pot: Regenerate.
2930 * Makefile.am: Remove extraneous mkdep comment.
2931 (MKDEP): Use gcc -MM rather than mkdep.
2932 (DEP): Quote when passing vars to sub-make. Add warning
2934 (DEP1): Rewrite for "gcc -MM".
2935 (CLEANFILES): Add DEP2.
2936 Update dependencies.
2937 * Makefile.in: Regenerate.
2941 * configure.in: Added corefile support for AIX 4.3. In particular,
2942 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
2943 compiling rs6000-core.c.
2944 * configure: Regenerated.
2948 * cache.c (bfd_open_file): Unlink the output file only if
2949 it has non-zero size.
2953 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
2954 relative relocations for non-loaded sections in shared objects.
2955 (elf64_alpha_check_relocs): Similarly.
2959 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
2960 BFD_RELOC_16 to switch for extended relocs.
2961 (MY_swap_ext_reloc_in): New.
2962 (MY_swap_ext_reloc_out): New.
2963 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
2964 than NAME(aout,swap_ext_reloc_in) for extended relocs.
2965 (NAME(aout,squirt_out_relocs)): Similarly use
2966 MY_swap_ext_reloc_out.
2967 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
2971 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
2972 the R_PCRWORD_B case.
2976 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
2982 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
2983 HOWTO references to bfd_elf_generic_reloc, that have
2984 partial_inplace == true, now use the new function. The function
2985 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
2986 extends its fixes to the R_M32R_{16,24,32} relocs.
2987 The new logic in m32r_elf_lo16_reloc() has been removed, and
2988 it instead calls the new routine to obtain that functionality.
2992 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
2993 elf32_avr_check_relocs, avr_final_link_relocate,
2994 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
2995 elf32_avr_object_p): Add prototypes.
2996 (elf32_avr_gc_mark_hook): Add default for h->root.type.
2997 (bfd_elf_avr_final_write_processing): Make static.
3001 * cpu-avr.c: New file. BFD support routines for AVR architecture.
3002 * archures.c (bfd_architecture): Add AVR architecture.
3003 (bfd_archures_list): Add reference to AVR architecture info.
3004 * elf.c (prep_headers): Handle bfd_arch_avr.
3005 * reloc.c: Add various AVR relocation enums.
3006 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
3008 * Makefile.am: Add support for AVR elf.
3009 * configure.in: Likewise.
3010 * config.bfd: Likewise.
3011 * Makefile.in: Regenerate.
3012 * configure: This too.
3013 * bfd-in2.h: And this.
3014 * libbfd.h: And this.
3018 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
3019 (elf64_alpha_find_reloc_at_ofs): Likewise.
3023 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
3024 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
3025 allowable range used to be -2**(n-1) to 2**n-1.
3026 * reloc.c (_bfd_relocate_contents): Same here. Also replace
3027 "boolean overflow" with "bfd_reloc_status_type flag".
3031 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
3035 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
3036 of shrinks properly, including the last reloc.
3040 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
3045 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
3046 a format mismatch rather than an "error" from bfd_read such as
3047 bfd_error_file_truncated.
3051 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
3052 sign-extension and big-endian compensation for
3053 R_MIPS_64 even in ld -r.
3057 * elf32-mips.c (mips_elf_next_relocation): Rename from
3058 mips_elf_next_lo16_relocation, and generalize to look
3059 for any relocation type.
3060 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
3061 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
3062 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
3063 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
3064 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
3065 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
3066 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
3067 (mips_rtype_to_howto): Likewise.
3068 (mips_elf_calculate_relocation): Handle new relocs.
3069 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
3070 are paired. The addend for R_MIPS_GNU_REL16_S2
3071 is shifted right two bits.
3075 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
3076 comment, and ensure it doesn't happen again.
3077 (bfd_install_relocation): Same here.
3078 (_bfd_relocate_contents): Don't bother assigning unused signmask
3079 shift result. Fix typos in comments.
3080 Remove trailing whitespace throughout file.
3084 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
3085 * bfd-in2.h: Rebuild.
3089 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
3091 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
3092 (SIZEOF_ILF_STRINGS): Redefine.
3093 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
3094 relative reloc, as opposed to a section relative reloc.
3095 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
3097 Add length of symbol's prefix to string pointer.
3098 Store a pointer to the symbol in the symbol pointer table.
3099 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
3100 Initialise the symbol pointer table.
3101 Store the hint in the Hint/Name table.
3102 Make the jump reloc be symbol realtive, not section relative.
3103 Create an import symbol for imported code.
3107 * elf.c (swap_out_syms): Check for null type_ptr.
3111 * aout-target.h (MY(write_object_contents)): Remove unused
3112 and unusable "#if CHOOSE_RELOC_SIZE".
3113 * pc532-mach.c (MY(write_object_contents)): Ditto.
3114 * netbsd.h (MY(write_object_contents)): Ditto.
3115 * hp300hpux.c (MY(write_object_contents)): Ditto.
3116 * freebsd.h (MY(write_object_contents)): Ditto.
3117 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
3121 * peicode.h (jtab): Make it static.
3123 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
3124 defined and COFF_IMAGE_WITH_PE is not defined.
3125 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
3126 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
3130 * coff-arm.c (bfd_arm_process_before_allocation): Make
3131 'symndx' signed to prevent compile time warning.
3133 * coff-mcore.c: Remove unused prototype for pe_object_p.
3135 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
3136 functions that are not used when COFF_IMAGE_WITH_PE is
3138 (struct sh_opcode): Change type of 'flags' field to unsigned
3139 long so that it can hold the USESAS flag.
3141 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
3143 * elf-m10300.c (mn10300_elf_relax_section): Initialise
3146 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
3148 Remove unusued variables and code.
3149 (elf_backend_add_symbol_hook): Fix prototype.
3151 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
3154 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
3157 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
3159 Remove unusued variables and code.
3160 (elf_backend_add_symbol_hook): Fix prototype.
3162 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
3164 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
3165 to unused function parameter.
3167 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
3169 Use EMPTY_HOWTO to initialise empty howto slots.
3170 Remove unused variables.
3172 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
3176 * aoutx.h (aout_link_input_section_std): Pass "true" to
3177 the undefined_symbol callback.
3178 (aout_link_input_section_ext): Likewise.
3179 * bout.c (get_value): Likewise.
3180 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3181 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
3183 (alpha_relocate_section): Likewise.
3184 * coff-arm.c (coff_arm_relocate_section): Likewise.
3185 * coff-i960.c (coff_i960_relocate_section): Likewise.
3186 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3187 * coff-mips.c (mips_relocate_section): Likewise.
3188 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3189 * coff-sh.c (sh_relocate_section): Likewise.
3190 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3191 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
3192 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3193 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3194 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3195 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3196 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3197 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3198 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3199 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3200 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3201 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3202 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
3203 * elflink.h (elf_link_output_extsym): Likewise.
3204 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
3205 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
3206 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
3208 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
3209 undefined_symbol callback when building shared library with
3210 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
3212 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3213 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3214 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3215 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3216 (elf32_mips_get_relocated_section_content): Likewise.
3217 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3218 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3219 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3220 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3224 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
3225 * Makefile.in: Regenerate.
3227 * configure.in: Add support for mips and sh pe vectors.
3228 * configure: regenerate.
3230 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
3233 * targets.c: Add mips and sh pe vectors.
3235 * libpei.h (coff_final_link_postscript): Only define if not
3238 * coffcode.h: Add support for WinCE magic numbers.
3240 * peigen.c (pe_print_reloc): Update comment and rearrange
3241 appending of newline character.
3243 * peicode.h: Add support for Image Library Format.
3244 (pe_ILF_vars): Structure containing data used by ILF code.
3245 (pe_ILF_make_a_section): New function. Create a section based
3247 (pe_ILF_make_a_reloc): New function. Create a reloc based on
3249 (pe_ILF_make_a_symbol): New function. Create a symbol based
3251 (pe_ILF_save_relocs): New function. Store the relocs created
3252 by pe_ILF_make_a_reloc in a section.
3253 (pe_ILF_build_a_bfd): New function. Create a BFD describing
3255 (pe_ILF_object_p): New function. Return a bfd_target pointer
3257 (pe_bfd_object_p): If an ILF object is detected call
3258 pe_ILF_object_p on it.
3260 * coff-arm.c: Add support for WinCE relocs which are different
3261 from normal ARM COFF relocs.
3262 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
3264 * coff-sh.c: Add support for sh-pe target.
3265 * pe-sh.c: New file. Support code for sh-pe target.
3266 * pei-sh.c: New file. Support code for sh-pe target.
3268 * pe-mips.c: New file. Support code for mips-pe target.
3269 * pei-mips.c: New file. Support code for mips-pe target.
3273 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
3274 architecture if the object causing the bump is dynamic.
3275 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
3276 and also don't it for memory ordering.
3277 (sparc64_elf_write_relocs): Take src_rela out of the loop.
3281 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
3282 calling bfd_get_section_size_before_reloc.
3283 (decode_line_info): Likewise.
3284 (_bfd_dwarf2_find_nearest_line): Likewise.
3288 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
3289 name of the libtool directory.
3290 * Makefile.in: Rebuild.
3294 * som.c (SOM_HOWTO): Define.
3295 (som_hppa_howto_table): Use it.
3299 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
3301 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
3305 * som.c (som_misc_symbol_info): Add field
3307 (som_bfd_derive_misc_symbol_info): Initialize
3309 (som_build_and_write_symbol_table): Keep track
3310 of secondary_def field.
3311 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
3312 if secondary_def field is set.
3313 (som_bfd_ar_write_symbol_stuff): Initialize
3318 * dwarf2.c (read_address): Read 16-bits addresses.
3319 (parse_comp_unit): Accept addr_size == 2.
3323 * bfd-in.h: Update copyright date.
3327 * cpu-i370.c: New file.
3328 * elf32-i370.c: New file.
3329 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
3330 (bfd_i370_arch): New.
3331 (bfd_archures_list): Add bfd_i370_arch.
3332 * elf.c (prep_headers): Add bfd_arch_i370.
3333 * Makefile.am: Add support for IBM 370 elf.
3334 * config.bfd: Likewise.
3335 * configure.in: Likewise.
3336 * libbfd.h (bfd_reloc_code_real_names): Likewise.
3337 * reloc.c (bfd_reloc_code_type): Likewise.
3338 * targets.c: Likewise.
3340 * Makefile.in: Regenerate.
3341 * configure: Regenerate.
3342 * bfd-in2.h: Regenerate.
3346 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
3347 invalid relocation types, and change them to R_386_NONE.
3351 * elflink.h (elf_link_add_object_symbols): If a version symbol is
3352 not defined, don't add a second ELF_VER_CHR.
3354 * elflink.h (elf_bfd_final_link): Call output_extsym for global
3355 symbols converted to local symbols even when stripping all
3357 (elf_link_output_extsym): Process global symbols converted to
3358 local symbols even if they are being stripped.
3362 * archures.c (bfd_octets_per_byte): Return unsigned int.
3363 (bfd_arch_mach_octets_per_byte): Ditto.
3364 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
3366 * section.c (bfd_get_section_size_before_reloc): Quell signed
3367 vs. unsigned comparison warning.
3368 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
3369 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
3370 change. What was I thinking?
3371 * bfd-in2.h: Regenerate.
3373 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
3374 (elf_gc_sections): Same here.
3375 (elf_gc_common_finalize_got_offsets): And here.
3379 ELF HPPA doesn't work at present; remove it until it does.
3380 * config.bfd: Comment out setting targ_defvec to
3382 * Makefile.am: Rebuild dependencies.
3383 (BFD32_BACKENDS): Remove elf32-hppa.lo.
3384 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
3385 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
3386 * Makefile.in: Rebuild.
3387 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
3391 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
3392 is no bfd_free(). Revert bfd_free part of previous change.
3396 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
3398 (coff_compute_section_file_positions): Use bfd_free to pair
3400 (coff_write_object_contents): Likewise.
3402 * coff-rs6000.c (xcoff_howto_table_16): New variable.
3403 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
3407 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
3408 (xcoff_ar_file_hdr_big): New structure.
3409 (SIZEOF_AR_FILE_HDR_BIG): New macro.
3410 (xcoff_ar_hdr_big): New structure.
3411 (SIZEOF_AR_HDR_BIG): New macro.
3412 (xcoff_big_format_p): New macro.
3413 (xcoff_ardata_big): New macro.
3414 (arch_xhdr_big): New macro.
3415 (xcoff_slurp_armap): Handle large archives.
3416 (xcoff_archive_p): Detect large archives.
3417 (xcoff_read_ar_hdr): Handle large archives.
3418 (xcoff_openr_next_archived_file): Handle large archives.
3419 (xcoff_generic_stat_arch_elt): Handle large archives.
3420 (xcoff_write_armap_old): Rename from xcoff_write_armap.
3421 (xcoff_write_armap_big): New function.
3422 (xcoff_write_armap): New function, dispatch to _old or _big.
3423 (xcoff_write_archive_contents_old): Rename from
3424 xcoff_write_archive_contents.
3425 (xcoff_write_archive_contents_big): New function.
3426 (xcoff_write_archive_contents): New function, dispatch to _old or
3431 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
3432 and hide_symbol members.
3433 (elf_link_hash_copy_indirect): Remove.
3434 (elf_link_hash_hide_symbol): Remove.
3435 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
3436 and elf_backend_hide_symbol.
3437 (_bfd_elf_link_hash_copy_indirect): Declare.
3438 (_bfd_elf_link_hash_hide_symbol): Declare.
3439 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
3440 (_bfd_elf_link_hash_hide_symbol): Likewise.
3441 (_bfd_elf_link_hash_table_init): Don't init killed members.
3442 * elflink.h (elf_link_add_object_symbols): Use the bed function
3443 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
3444 (elf_link_assign_sym_version): Likewise.
3445 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
3446 (elf_backend_hide_symbol): Likewise.
3447 (elfNN_bed): Update for new members.
3451 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
3452 STACK_END_ADDR): Define for new core file format.
3453 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
3454 for handling the vagaries of the various core file structures used
3455 by AIX over the years.
3456 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
3457 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
3458 core_dumpx structure.
3462 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
3463 (bfd_mach_sh3_dsp): Likewise.
3464 (bfd_mach_sh4): Reinstate.
3465 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
3466 * bfd-in2.h: Regenerate.
3467 * coff-sh.c (struct sh_opcode): flags is no longer short.
3468 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
3469 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
3470 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
3471 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
3472 (sh_opcodes): No longer const.
3473 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
3474 (sh_insn_uses_reg): Check for USESAS and USESR8.
3475 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
3476 (_bfd_sh_align_load_span): Return early for SH4.
3477 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
3478 Take into account that field b of a parallel processing insn
3479 could be mistaken for a separate insn.
3480 * cpu-sh.c (arch_info_struct): New array elements for
3481 sh2, sh-dsp and sh3-dsp.
3482 Reinstate element for sh4.
3483 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
3484 (SH4_NEXT): Reinstate.
3485 (SH3_NEXT, SH3E_NEXT): Adjust.
3486 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
3487 * elf32-sh.c (sh_elf_set_private_flags): New function.
3488 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
3489 (sh_elf_merge_private_data): New function.
3490 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
3491 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3492 (bfd_elf32_bfd_merge_private_bfd_data): Change to
3493 sh_elf_merge_private_data.
3497 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
3498 hide_symbol members.
3499 (elf_link_hash_copy_indirect): New.
3500 (elf_link_hash_hide_symbol): New.
3501 * elflink.h (elf_link_add_object_symbols): Break out copy from
3502 indirect new new symbol to elf.c.
3503 (elf_link_assign_sym_version): Break out privatization of
3504 non-exported symbol to elf.c.
3505 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
3506 (_bfd_elf_link_hash_hide_symbol): New.
3507 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
3511 * section.c (_bfd_strip_section_from_output): Add info parameter.
3512 If it passed as non-NULL, use it to check whether any input BFD
3513 has an input section which uses this output section. Change all
3515 * bfd-in2.h: Rebuild.
3517 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
3518 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
3520 * bfd-in2.h: Rebuild.
3524 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
3525 allow final modifications of swapped-in symbol.
3526 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
3527 * coffcode.h (coff_write_relocs): Use macro
3528 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
3529 symbol index should be set to -1.
3533 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
3534 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
3535 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
3536 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
3537 sh_insns_uses_or_sets_freg): New functions.
3538 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
3539 * (sh_insns_conflict): Use new functions and new macros to
3540 detect conflicts when two instructions both set same integer registers,
3541 both set same fp register, and both set special register.
3545 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
3546 swapping in sections, so that the swapping routines have access to
3551 * coff-go32.c: Update comment. Update copyright.
3555 * syms.c (bfd_decode_symclass)
3556 Two new class characters were added - 'V' and 'v'. The
3557 meaning of 'W' is now restricted to just weak non-object
3558 symbols. This allows differentiation between, for example,
3559 weak functions vs weak objects. nm for example now dumps:
3561 'w' = weak unresolved
3562 'V' = weak global object
3563 'v' = weak unresolved object
3565 (bfd_is_undefined_symclass): New function. Return true if the
3566 given symbol class represents and undefined/unresolved symbol.
3568 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
3571 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
3573 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
3574 STT_ARM_16BIT flag set, but it is not attached to a data object
3575 return STT_ARM_16BIT so that it will be treated as code by the
3580 * coff-i386.c (i3coff_object_p): Remove prototype.
3583 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
3584 to name. Update copyright.
3586 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
3587 assignment to avoid warning. Update copyright.
3591 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
3592 instead of using GNU C extension.
3596 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
3597 amount from a bfd_in_memory structure.
3598 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
3603 * linker.c (default_indirect_link_order): oops - fix incorrectly
3604 applied patch from Tim Wall.
3608 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
3609 = scnhsz, filhsz, relsz, aoutsz, etc)
3611 * coffswap.h: Ditto.
3615 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
3616 interwork thumb to arm stub.
3620 * archures.c (bfd_octets_per_byte): New function: Return
3622 (bfd_arch_mach_octets_per_byte): New function: Return target
3625 * section.c: Distinguish between octets and bytes for usage of
3626 _cooked_size, _raw_size, and output_offset. Clarify
3627 description of bfd_set_section_contents.
3629 * bfd-in2.h: Regenerate.
3631 * coffgen.c: Indicate that the offset parameter is in bytes, not
3634 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
3635 where appropriate to get the octet offset when calling
3636 bfd_set_section_contents.
3637 (bfd_coff_reloc_link_order): Ditto.
3639 * linker.c (bfd_generic_reloc_link_order): Ditto.
3640 (_bfd_default_link_order): Ditto.
3642 * reloc.c (bfd_perform_relocation): Distinguish between octets
3643 and bytes. Use octets when indexing into octet data; use bytes
3644 when calculating target addresses.
3645 (bfd_install_relocation): Ditto.
3647 * srec.c (srec_write_section): Ditto.
3651 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3652 3 to 2. This allows 4 byte sized sections, which is necessary for
3653 dlltool to build functioning DLLs.
3657 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
3658 (arm*-*-conix*): New target.
3662 * config.bfd: Include elf32_i386 vector to target list for cygwin
3665 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
3666 * configure.in: Test for structure win32_pstatus_t in
3668 * configure: Regenerate.
3670 * elf.c (elfcore_grok_win32pstatus): New function: process
3671 win32_pstatus_t notes in elf core file.
3672 (elfcore_grok_note): Detect win32_pstatus notes.
3676 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
3678 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
3679 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
3683 * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
3684 if no dynamic sections created.
3688 * peicode.h (pe_bfd_object_p): Only define for PE format
3693 * coff-i386.c (i3coff_object_p): Delete.
3694 (i386coff_vec): Replace reference to i3coff_object_p with a
3695 reference to coff_object_p.
3697 * coff-mcore.c (pe_object_p): Delete.
3699 * peicode.h (pe_bfd_object_p): New function: Detect the
3700 presence of a PE format COFF object file. Also detect and
3701 warn about the presence of LINK6 format Image Library Format
3706 * coff-arm.c (NUM_ELEM): New macro.
3707 (NUM_RELOCS): New macro: The number of known ARM relocs.
3708 (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
3709 (coff_arm_rtype_to_howto): Return NULL if the reloc type is out
3711 (bfd_arm_process_before_allocation): Produce a warning message if
3712 an out of range symbol index is encountered.
3716 * elflink.h (is_global_symbol_definition): New Function: Return
3717 true iff the symbol is being given a global definition in this
3719 (elf_link_is_defined_archive_symbol): Do not bother processing
3720 symbols for an archive element that has already been included
3722 Use is_global_symbol_definition().
3726 * config.bfd: Add support for sparc-*-netbsdelf* and
3727 sparc-*-netbsdaout*.
3731 * elflink.h (elf_link_is_defined_archive_symbol): Check to see
3732 if the symbol is in the common section.
3736 * elflink.h (elf_link_is_defined_archive_symbol): New
3737 function: Decide if a symbol, in an archive map is there
3738 because it is defined in the archive element, or because it is
3739 just another common declaration of it.
3740 (elf_link_add_archive_symbols): Use
3741 elf_link_is_defined_archive_symbol to decide if an archive
3742 element contain a reference to a common symbol should be
3747 * elflink.h: Revert previous patch.
3748 * targets.c: Revert previous patch.
3749 * libbfd-in2.h: Revert previous patch.
3750 * libbfd.h: Revert previous patch.
3751 * elfxx-target.h: Revert previous patch.
3752 * archive.c: Revert previous patch.
3753 * aout-target.h: Revert previous patch.
3754 * aout-tic30.h: Revert previous patch.
3755 * bfd.c: Revert previous patch.
3756 * coff-alpha.c: Revert previous patch.
3757 * coff-rs6000.c: Revert previous patch.
3758 * elf64-mips.c: Revert previous patch.
3759 * ieee.c: Revert previous patch.
3760 * libecoff.h: Revert previous patch.
3761 * oasys.c: Revert previous patch.
3762 * som.c: Revert previous patch.
3763 * vms.c: Revert previous patch.
3767 * elflink.h (elf_link_add_archive_symbols): Add an archive
3768 element even if contains a symbol which is currently only
3769 considered to be a common.
3771 * targets.c (struct bfd_target): Add new field
3772 _bfd_allow_commons_in_armap.
3773 * bfd-in2.h:Regenerate.
3775 * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
3777 (_bfd_archive_bsd_allow_commons_in_armap): Define.
3778 * libbfd.h: Regenerate.
3780 * elfxx-target.h: If using COFF archive map, override
3781 definition of allow_commons_in_armap and replace with
3784 * archive.c (bfd_compute_and_write_armap): Do not place common
3785 symbols into the archive map unless _bfd_allow_commons_in_armap
3788 * aout-target.h (MY_allow_commons_in_armap): Define.
3789 * aout-tic30.h (MY_allow_commons_in_armap): Define.
3790 * bfd.c (bfd_allow_commons_in_armap): Define.
3791 * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
3792 * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
3793 * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
3794 * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
3795 * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
3796 * oasys.c (oasys_allow_commons_in_armap): Define.
3797 * som.c (som_allow_commons_in_armap): Define.
3798 * vms.c (vms_allow_commons_in_armap): Define.
3802 Add support for SSE registers in ELF core files.
3803 * elf.c (elfcore_make_note_pseudosection): New function.
3804 (elfcore_grok_prfpreg): Use it.
3805 (elfcore_grok_prxfpreg): New function.
3806 (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
3810 * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
3811 value by 4 before storing it back in the field. From
3816 * archures.c (bfd_mach_am33): Define.
3817 * bfd-in2.h: Rebuilt.
3818 * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
3819 * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
3820 (compute_function_info): Handle additional registers saved by
3822 (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
3823 (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
3827 * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3829 * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3834 * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
3835 internal use within gas for alpha explicit relocations.
3836 (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
3837 (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
3838 (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
3839 (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
3840 (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
3841 (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
3843 * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
3844 BFD_RELOC_ALPHA_USER_*.
3846 * bfd-in2.h: Regenerate.
3847 * libbfd.h: Regenerate.
3851 * elf.c (elfcore_read_notes): Add prototype for static function.
3852 (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
3853 (bfd_section_from_phdr): Replacement function that calls
3854 _bfd_elf_make_section_from_phdr for generic segment types and
3855 backend fucntion pointed to by elf_backend_section_from_phdr for
3856 backend specific segment types.
3857 (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
3858 now called by _bfd_elf_make_section_from_phdr. Note that this func
3859 is now just a stub between the caller and bfd_section_from_phdr.
3861 * elf-bfd.h (struct elf_backend_data): Add new function pointer
3862 elf_backend_section_from_phdr.
3863 (elf_backend_section_from_phdr): Add prototype.
3865 * elfxx-target.h (elf_backend_section_from_phdr): Define default.
3866 (elfNN_bed): Add elf_backend_section_from_phdr.
3870 * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add
3871 SEC_CODE and SEC_READONLY flags to glue sections.
3873 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
3874 SEC_CODE and SEC_READONLY flags to glue sections.
3878 * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
3883 * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
3884 (elf_cpu32_plt_entry): Likewise.
3888 * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
3890 (coff_mcore_relocate_section): Initialise addend to 0.
3891 Special case processing of RVA reloc.
3895 * elf-bfd.h (struct elf_backend_data): Reorder collect and
3896 type_change_ok; add sign_extend_vma.
3897 * elf32-mips.c (elf_backend_sign_extend_vma): Define.
3898 * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
3899 (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
3900 * elfxx-target.h (elf_backend_sign_extend_vma): Default.
3901 (elfNN_bed): Follow struture changes.
3905 * libbfd.c (bfd_read): Check result of read against desired result
3907 (_bfd_generic_get_section_contents): Set bfd_error if the seek is
3908 invalid compared to the section size.
3910 * ieee.c (ieee_slurp_debug): Get the length of the debug
3911 information right if there is no data part.
3915 * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
3916 R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
3920 * elflink.h (elf_bfd_final_link): Make last_local signed.
3924 * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
3929 * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
3931 * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
3932 * bfd-in2.h: Regenerate.
3936 * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
3940 * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
3944 * elflink.h (elf_merge_symbol): When overriding a weak symbol with
3945 a defined symbol in a shared library, clear the DEF_DYNAMIC flag
3950 * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
3951 relocs also need the GP value.
3952 (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
3953 properly. Handle sign-extension for R_MIPS_64 correctly. Correct
3954 the GP value for R_MIPS_LITERAL relocs too. Handle
3955 R_MIPS_64 relocs properly on big-endian MIPS.
3956 (mips_elf_sign_extend): Behave properly with 'long long'.
3957 (mips_elf_highest): Correct typo.
3961 * cpu-m32r.c (arch_info_struct): New static global.
3962 (bfd_m32r_arch): Refer to it.
3963 * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
3964 (m32r_elf_print_private_bfd_data): Ditto.
3965 (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
3966 * archures.c (bfd_mach_m32rx): Define it.
3967 * bfd-in2.h: Rebuild.
3971 * targets.c (cisco_core_vec): Replaced with two new vecs ...
3972 (cisco_core_big_vec): Add new bigendian vec.
3973 (cisco_core_little_vec): Add new little endian vec.
3975 * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
3976 (crash_info_locs): Add array of possible offsets.
3977 (MASK_ADDR): Mask to apply to crash info offset.
3978 (crashinfo_external): Add textbase, database, bssbase and
3979 turn into a typedef.
3980 (cisco_core_file_validate): Renamed from cisco_core_file_p.
3981 Many small changes to account for additional hardware versions.
3982 Pick a reasonable size for ".reg" section. Add a ".crash"
3983 section to allow access to crashinfo_external struct.
3984 (cisco_core_file_p): New version of this function that
3985 iterates over crash_info_locs, calling cisco_core_file_validate.
3986 (cisco_core_vec): Old big endian only vec replaced with ...
3987 (cisco_core_big_vec): Add big endian version.
3988 (cisco_core_little_vec): Add little endian version.
3990 * configure.in (cisco_core_vec): Split to two new vectors ...
3991 (cisco_core_big_vec): New target vector.
3992 (cisco_core_little_vec): New target vector.
3993 * configure: Regenerate.
3994 * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
3995 to cisco_core_big_vec in targ_selvecs.
3999 * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
4000 (mips_elf_relocate_got_local): Unused, delete.
4001 (mips_elf_relocate_global_got): Unused, delete.
4005 * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type
4006 to initialize it to something meaningful. Then use it to generate
4007 more useful segment names.
4011 * som.c (NO_PCREL_MODES): Define if the system does not define
4013 (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
4014 (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle
4015 R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
4016 * libhppa.h (dis_assemble_22): New function.
4017 (bfd_hppa_insn2fmt): Handle long branch.
4019 * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
4024 * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
4025 BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
4026 (reloc_howto_type howto_table): Tidy comments and whitespace.
4030 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
4031 previous delta. Set sec->gc_mark instead.
4035 * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
4036 (elf_cpu32_plt_entry): Likewise.
4040 * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
4042 * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
4043 symbol table, then just compute a suitable value (but do not
4044 create a __gp symbol).
4046 * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
4047 symbols when building shared libraries.
4048 (elf_hppa_final_link_relocate): Correct handling of PCREL
4049 relocations against undefined symbols.
4053 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
4054 interworking sections as linker created so that they will not
4055 be removed by garbage collection.
4059 * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
4060 (elf_hppa_final_link_relocate): Consistently create an absolute
4061 address, then subtract out the value of __gp.
4065 * configure.in (Canonicalization of target names): Remove adding
4066 ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
4067 generates $ac_config_sub with a ${CONFIG_SHELL} already.
4068 * configure: Regenerate.
4072 * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
4077 * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
4078 (elf_hppa_final_link): Initialize text_segment_base and
4080 (elf_hppa_final_link_relocate): Handle SEGREL relocations.
4082 * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
4083 (elf_hppa_final_link_relocate): Likewise.
4084 (elf_hppa_relocate_insn): Likewise.
4085 (elf_hppa_relocate_section): Initialize HOWTO.
4089 * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
4090 handling to support both GNU and MS objects.
4092 * coffcode.h (coff_write_object_contents): Don't check reloc_count
4093 when determining whether to set F_RELFLG.
4097 * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
4098 PC24 relocs if the target is an undefined weak symbol.
4099 (arm_add_to_rel): Fix compiler warning.
4100 (elf32_arm_plt0_entry): Correct comments.
4104 * elfcode.h (write_relocs): Check for the_bfd NULL when handling
4105 an absolute symbol in REL relocs.
4109 * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
4110 Stub SEGREL32. Return an error for any relocation not handled.
4114 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
4115 constant symbols, and avoid multiple definition errors on them.
4119 * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
4120 significant bit is set.
4124 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4126 * elfcode.h (write_relocs): Handle an absolute symbol in REL
4127 relocs as we do for RELA relocs.
4131 * libpei.h (_bfd_pei_final_link_postscript): Declare.
4132 (coff_final_link_postscript): Define.
4133 * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
4134 directory entries here.
4135 (_bfd_pei_final_link_postscript): New function.
4137 * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
4138 section flags based on the section name.
4140 * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
4141 get the overflow of the s_nlnno field from the s_nreloc field.
4142 * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
4143 the s_nlnno overflow of the .text section into the s_nreloc
4146 * peigen.c (add_data_entry): Declare.
4147 (pei_swap_aouthdr_out): Get image size right. Set linker version
4149 (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
4150 (pe_print_idata): Code cleanup, print more info, get rid of (now)
4151 extraneous ImageBase.
4152 (pe_print_edata): Likewise.
4153 (pe_print_pdata): Likewise. Print exception entries.
4154 (pe_print_reloc): Likewise. Print MIPS_JMPADDR.
4155 (tbl): Make const, add "UNKNOWN".
4156 (_bfd_pe_print_private_bfd_data_common): Print timestamp.
4157 (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
4158 section data directory.
4159 (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
4161 * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
4162 * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
4163 * peicode.h (coff_get_symbol_info): Define.
4165 * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
4167 * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
4169 (coff_classify_symbol): Re-revert 1999-08-08 patch if
4172 * libpei.h: New file, broken out of peicode.h.
4173 * peigen.c: New file, broken out of peicode.h.
4174 * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
4175 * configure.in: Add peigen.lo to list of files required for each
4177 * Makefile.am: Rebuild dependencies.
4178 (BFD32_BACKENDS): Add peigen.lo.
4179 (BFD32_BACKENDS_CFILES): Add peigen.c.
4180 (SOURCE_HFILES): Add libpei.h.
4181 * configure, Makefile.in: Rebuild.
4183 * peicode.h (coff_swap_scnhdr_in): Don't check for a special
4184 section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
4185 instead. Don't clear the s_paddr field for an uninitialized data
4188 * coffcode.h (coff_mkobject_hook): Set timestamp field in
4189 coff_data_type to f_timdat.
4190 * peicode.h (pe_mkobject_hook): Likewise.
4192 * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
4193 number if COFF_IMAGE_WITH_PE.
4195 * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
4196 to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
4197 (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
4198 there is no SEC_DEBUGGING section.
4199 * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
4200 IMAGE_FILE_DEBUG_STRIPPED.
4202 * pe-i386.c (COFF_LONG_FILENAMES): Define.
4203 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4204 * pei-i386.c (COFF_LONG_FILENAMES): Define.
4205 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4207 * coffswap.h (IMAGE_BASE): Don't define.
4208 * pei-arm.c (IMAGE_BASE): Don't define.
4209 * pei-i386.c (IMAGE_BASE): Don't define.
4210 * pei-mcore.c (IMAGE_BASE): Don't define.
4211 * pei-ppc.c (IMAGE_BASE): Don't define.
4213 * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
4214 symbol, switch on the class when determining whether to modify the
4215 value. For PE, don't modify the value of a C_FCN symbol not named
4218 * libbfd-in.h (_bfd_abort): Declare.
4220 * bfd.c (_bfd_abort): New function.
4221 * libbfd.h: Rebuild.
4223 * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
4226 * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
4227 don't write out the associated line numbers.
4229 * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
4232 * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
4233 changes when the base type is unknown.
4235 * coffgen.c (coff_print_symbol): Fix printing of aux record for
4238 * syms.c (BSF_DEBUGGING_RELOC): Define.
4239 * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
4240 for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
4242 * coffgen.c (fixup_symbol_value): Relocate a symbol which has
4243 BSF_DEBUGGING_RELOC set.
4244 * bfd-in2.h: Rebuild.
4248 * ecoff.c (bfd_debug_section): Update initialization for new
4250 (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
4251 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
4255 * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
4256 _bfd_filnmlen field.
4257 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4261 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
4262 for FPTR relocs involving local symbols.
4264 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
4265 value for the stub address in a call through a stub.
4266 Install the value for a local symbol directly into the DLT
4267 instead of generating a reloc. Correctly handle FPTR64 relocs.
4269 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
4270 (elf_hppa_remark_useless_dynamic_symbols): Similarly.
4271 (elf_hppa_final_link): Call them.
4275 * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
4276 (elf_adjust_dynamic_symbol): ...from here.
4280 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
4281 relocation, remove them. SECREL64->LTOFF16WF.
4282 (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle
4284 (elf_hppa_relocate_insn): Similarly.
4286 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
4287 (elf_hppa_relocate_insn): Similarly.
4289 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
4291 (elf_hppa_relocate_insn): Similarly.
4293 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
4294 Handle LTOFF_TP* relocs.
4295 (elf_hppa_relocate_insn): Similarly.
4297 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
4298 Consistently deal with addends. Handle DLTIND14F and DLTREL14F.
4299 (elf_hppa_relocate_insn): Handle PCREL* relocs.
4301 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
4302 DIR32, DIR64 and FPTR64 relocations.
4303 (elf_hppa_relocate_insn): Similarly.
4305 * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
4306 address of the .PARISC.global section.
4307 (elf_hppa_relocate_section): Lookup and pass the PA64 hash
4308 table entry elf_hppa_final_link_relocate. Do not give a warning
4309 for a reloc against an external symbol if it has a PA64 hash
4311 (elf_hppa_final_link_relocate): Significantly rework. Handle
4312 DLTIND relocations. Compute the final value of the relocation
4313 before passing the value of elf_hppa_relocate_insn.
4314 (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
4315 relocation support. Handle DLTIND relocation requests just like
4316 DLTREL relocation requests. Simplify branch handling.
4320 * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
4321 non-allocated section as done in i386 version.
4322 (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
4323 statement since this is no know relocation.
4327 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
4329 (elf_hppa_relocate_insn): Similarly.
4331 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
4333 (elf_hppa_relocate_insn): Similarly.
4335 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
4336 DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn.
4337 Pass the relocate type rather than the insn format to
4338 elf_hppa_relocate_insn.
4339 (elf_hppa_relocate_insn): Make switch dependent on relocation type
4340 rather than the opcode. Handle DLTREL21L and DLTREL14R relocs.
4344 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
4345 (bfd_coff_filnmlen): Define.
4346 (bfd_coff_std_swap_table): Initialize new field.
4347 * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
4349 (coff_write_symbols): Likewise.
4350 (coff_get_normalized_symtab): Likewise.
4351 * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
4352 * libcoff.h: Rebuild.
4356 * coffcode.h (sort_by_secaddr): New static function if
4358 (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
4359 sections by VMA when assigning target_index values. Always set
4362 * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
4363 * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
4365 * libcoff.h: Rebuild.
4367 * coffcode.h (coff_set_custom_section_alignment): Add const to
4368 declaration to match definition.
4369 (coff_write_object_contents): Don't set F_AR32W(R)? if
4372 * coff-i386.c (in_reloc_p): Add declaration.
4373 (i386coff_vec): Simplify initialization of
4374 application_section_flags.
4376 * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
4377 version. Move COFF_WITH_PE specific code to new version.
4378 (stype_to_sec_flags): Likewise. Add section parameter.
4379 * coffgen.c (make_a_section_from_file): Set target_index before
4380 calling styp_to_sec_flags. Pass section to styp_to_sec_flags.
4381 * libcoff.h: Rebuild.
4383 * syms.c (stt): Add some PE/PEI section names.
4384 (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
4386 (bfd_symbol_info): Check for 'w'.
4388 * section.c (struct bfd_comdat_info): Define.
4389 (asection): Add comdat field.
4390 (STD_SECTION): Initialize comdat field.
4391 (bfd_make_section_anyway): Likewise.
4392 * bfd-in2.h: Rebuild.
4396 * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
4401 * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
4402 bfd_realloc instead of calloc and realloc.
4406 * cpu-pj.c: New file.
4407 * elf32-pj.c: New file.
4408 * config.bfd (pj*): New cpu.
4409 (pj-*-*, pjl-*-*): New targets.
4410 * configure.in (bfd_elf32_pj_vec): New target vector.
4411 (bfd_elf32_pjl_vec): New target vector.
4412 * archures.c (bfd_arch_pj): Define.
4413 * elf.c (prep_headers): Handle bfd_arch_pj.
4414 * reloc.c: Define BFD_RELOC_PJ_* relocations.
4415 * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
4416 to target vector list.
4417 * Makefile.am: Rebuild dependencies.
4418 (ALL_MACHINES): Add cpu-pj.lo.
4419 (ALL_MACHINES_CFILES): Add cpu-pj.c.
4420 (BFD32_BACKENDS): Add elf32-pj.lo.
4421 (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
4422 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
4426 * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
4427 * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
4428 and NON_GOT_REF from weak defined symbol to real symbol.
4429 * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
4430 (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
4431 create a COPY reloc.
4432 * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
4433 (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
4434 don't create a COPY reloc.
4438 * elflink.h (elf_bfd_final_link): When counting relocations, don't
4439 count those in sections we are not including in the link.
4443 * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
4444 field in hpux11 shared libraries.
4448 * elflink.h (elf_gc_record_vtentry): Fix memory leak.
4452 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
4453 (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
4454 (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
4458 * elflink.h (record_link_assignment): When possible, keep the
4459 original type of the symbol.
4463 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
4464 R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
4465 tools were configured.
4466 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
4470 * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
4471 GOT entries for GOT16 relocations; they're not required.
4477 * config.bfd (arm-*-netbsd*): New target.
4478 * configure.in (armnetbsd_vec): New target vector.
4479 * configure: Regenerate
4480 * targets.c (bfd_target_vector): Add &armnetbsd_vec.
4482 * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
4483 (ALL_MACHINES_CFILES): Add armnetbsd.c.
4484 (armnetbsd.lo): New rule with deps.
4485 * Makefile.in: Regenerate.
4487 * armnetbsd.c: New file: Definitions specific to arm-netbsd
4492 * som.c (som_slurp_symbol_table): Fix typo in comment.
4496 * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
4497 here instead of using elf_section_data...
4501 * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit
4502 relocations into the base file.
4503 (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
4504 we are building a base file.
4508 * elf32-arm.h (arm_add_to_rel): New function. Add a value to
4510 (elf32_arm_relocate_section): Use arm_add_to_rel to increment
4511 REL relocs when performing a partial relocation.
4515 * cofflink.c: Move definitions of N_TMASK, et. al., out of
4516 _bfd_coff_link_input_bfd into top level.
4518 * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
4519 (RTYPE2HOWTO): Return NULL if reloc type is out of range.
4520 (coff_i386_rtype_to_howto): Likewise.
4521 * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
4522 Completely ignore symbols which are all zero.
4523 (dummy_reloc16_estimate): Add return 0.
4524 * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
4525 variable copy to name_copy to avoid shadowing outer scope
4527 * libcoff-in.h (coff_data_type): Change raw_syment_count field
4528 from unsigned int to unsigned long. Add timestamp field.
4529 * libcoff.h: Rebuild.
4533 * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
4538 * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
4539 for special section symbols.
4540 * elflink.h (elf_merge_symbol): If we have no old BFD, check
4541 BSF_DYNAMIC on the section symbol to see whether the old BFD is
4546 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
4547 coincidence of variable names between old and new code.
4551 * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter
4552 into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
4553 (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma
4554 and 'addend' parameter a 'bfd_signed_vma'.
4555 (elf32_arm_final_link_relocate): Do not involve stubs in
4556 R_ARM_THM_PC22 relocs relative to section symbols, they are long
4557 jumps, not function calls.
4561 * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
4562 in R_ARM_PC24 relocs.
4566 * elf-hppa.h (elf_hppa_fake_sections): New function.
4567 * elf32-hppa.c (elf_backend_fake_sections): Define.
4569 * elf-hppa.h (elf_hppa_final_write_processing): Update for
4570 recent changes to the arch_info structure.
4572 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
4573 R_HPPA_SEGBASE and R_HPPA_SEGREL32.
4574 * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
4580 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
4581 output DT_MIPS_GOTSYM.
4582 (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
4583 DT_MIPS_SYMTABNO if there are no global GOT symbols.
4587 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
4588 prototype. Handle local symbols. Add commentary.
4589 (mips_elf_calculate_relocation): Adjust accordingly.
4590 (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
4593 * elflink.h (elf_bfd_final_link): Tweak last change.
4597 * elflink.h (elf_link_size_reloc_section): Use the counts in the
4598 elf-section data to allocate just the right amount of relocation
4599 space. Don't allocate the hash space twice.
4600 (elf_bfd_final_link): Calculate the amount of space to allocate in
4601 each relocation section.
4605 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
4606 64bit mode, generate a section relative relocation for a 32bit
4608 (elf_hppa_is_local_label_name): New function.
4609 * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be
4610 shared between 32bit and 64bit port.
4614 * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
4615 R_MIPS_GOT16 and R_MIPS_CALL16.
4616 (mips_elf_got16_entry): Use mips_elf_high to calculate the value
4617 to use when looking for a preexisting GOT entry.
4621 * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
4622 the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug,
4624 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4628 * elflink.h (elf_link_output_extsym): Don't output a weak
4629 reference to an undefined symbol just because it was defined weak
4634 * coffgen.c (coff_find_nearest_line): When looking for file, use
4635 last best match rather than first. If address is beyond last line
4636 number record, don't return the last line as the correct value.
4640 * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
4641 * bfd-in2.h: Rebuild.
4645 * libcoff-in.h (struct coff_section_alignment_entry): Define.
4646 * coffcode.h (coff_set_custom_section_alignment): New static
4648 (coff_section_alignment_table): New static array.
4649 (coff_new_section_hook): Use coff_set_customer_section_alignment.
4650 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4651 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4652 * libcoff.h: Rebuild.
4656 * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
4658 * Makefile.in: Rebuild.
4662 * section.c (SEC_SHARED): Define.
4663 * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
4664 (styp_to_sec_flags): Likewise.
4665 * peicode.h (coff_swap_scnhdr_out): Likewise.
4666 * bfd-in2.h: Rebuild.
4670 * coffcode.h (coff_classify_symbol): Comment out part of
4671 1999-08-05 change which breaks cygwin DLLs.
4673 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
4674 * aclocal.m4, configure: Rebuild.
4678 * section.c (global_syms): Only initialize union field if
4683 * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
4684 the size of a GOT entry here.
4685 (mips_elf_calculate_relocation): Don't create a local GOT entry
4686 for the symbol in a GOT16 relocation; just for it's high-order bit
4687 (_bfd_mips_elf_relocate_section): Fix thinko.
4692 * coffcode.h (enum coff_symbol_classification): Define.
4693 (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
4694 _bfd_coff_classify_symbol. Change return type.
4695 (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
4696 (coff_slurp_symbol_table): Use coff_classify_symbol.
4697 (coff_classify_symbol): New static function.
4698 (coff_sym_is_global): Never define.
4699 (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
4700 * cofflink.c (coff_link_check_ar_symbols): Use
4701 bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
4702 (coff_link_add_symbols): Likewise.
4703 (_bfd_coff_link_input_bfd): Likewise.
4704 * coff-sh.c (bfd_coff_small_swap_table): Initialize with
4705 coff_classify_symbol.
4706 * libcoff.h: Rebuild.
4710 * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
4711 (e_ltpsel, e_rtpsel): Similarly.
4713 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
4714 and 14bit ertpsel. Handle 64bit psel.
4718 * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
4719 handling for REL relocations. And only left-shift R_MIPS26
4720 relocation addends where necessary.
4724 * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
4725 (mips_elf_next_lo16_relocation): Don't compute the addend here.
4726 Just return the relocation found.
4727 (mips_elf_relocate_section): Pull the LO16 addend out of the
4728 section itself when using REL relocations.
4730 * elf32-mips.c (mips_elf_calculate_relocation): Restore
4731 _DYNAMIC_LINK handling and handling of undefined symbols in shared
4736 * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
4737 value of a symbol in a SEC_DEBUGGING section. Warn when doing a
4738 relocation against a symbol in an input section with no output
4741 * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
4743 * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
4744 look for generated file correctly.
4745 * aclocal.m4, configure: Rebuild.
4749 * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
4750 and R_MIPS16_26 relocations correctly when relocating.
4751 (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
4752 and R_MIPS_CALL_LO16 are for global symbols.
4756 * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
4758 * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
4759 variables and initialize them.
4763 * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
4764 there are no global symbols requiring GOT entries.
4765 (_bfd_mips_elf_size_dynamic_sections): Likewise.
4766 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4767 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4769 * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
4770 symbols are considered to have the value zero.
4771 (_bfd_mips_elf_relocate_section): Don't try to perform a
4772 relocation for an undefined symbol.
4773 (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
4778 * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
4779 wants ba,a,pt %xcc instead of %icc.
4780 Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
4781 of large PLT entries.
4782 (sparc64_elf_plt_ptr_offset): Fix calculation.
4783 (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
4784 addend should be relative to load address, not .plt section start.
4785 (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
4789 * elf-bfd.h (struct elf_backend_data): Add
4790 print_symbol_all and output_arch_syms backend methods.
4791 * elfxx-target.h: Likewise.
4792 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
4793 sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
4794 sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
4796 (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
4797 symbols in .dynsym, add their names into .dynstr. Put those symbols
4799 (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
4800 pointers to STT_REGISTER symbols in dynsym section.
4801 (sparc64_elf_print_symbol_all): New function.
4802 * elf.c (bfd_elf_print_symbol): Allow special backend symbol
4803 printing using the print_symbol_all hook.
4807 * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
4812 * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
4813 dynamic_sections_created.
4817 * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
4818 (mips_rtype_to_howto): ... new function.
4819 (_bfd_mips_elf_relocate_section): Use it.
4823 * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
4829 * coff-arm.c (coff_arm_is_local_label_name): Change to strip
4830 out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
4834 * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
4835 field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
4836 * cofflink.c (coff_link_add_symbols): If PE, handle section
4838 * libcoff.h: Rebuild.
4840 * config.bfd (i[3456]86-*-interix*): New target.
4844 * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
4845 COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
4846 .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
4847 * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
4848 (COFF_SUPPORT_GNU_LINKONCE): Define.
4849 * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
4850 (COFF_SUPPORT_GNU_LINKONCE): Define.
4855 * makefile.dos: Remove; obsolete.
4856 * configure.bat: Remove; obsolete.
4860 * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
4864 * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
4865 message and fail if a symbol index is out of range.
4869 * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
4870 when looking at a R_MIPS_GOT16 relocation.
4874 * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4878 * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
4879 removed in previous change.
4880 (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
4881 in relocateable output.
4885 * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
4888 * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
4889 if they appear to be specially created by the linker.
4893 * targets.c (alternative_target): New field in bfd_target
4895 (bfd_search_for_target): New function: Find a target that
4896 satisifies a search function.
4897 * bfd-in2.h: Regenerate.
4899 * elfxx-target.h: Initialise the alternative_target field of
4900 the bfd_target structures to point to the other target (if
4902 * nlm-target.h: Initialise the alternative_target field of
4903 the bfd_target structures to point to the other target (if
4906 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
4907 (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
4909 * aix386-core.c: Initialise new field of bfd_target structure.
4910 * aout-adobe.c: Initialise new field of bfd_target structure.
4911 * aout-arm.c: Initialise new field of bfd_target structure.
4912 * aout-target.h: Initialise new field of bfd_target structure.
4913 * aout-tic30.c: Initialise new field of bfd_target structure.
4914 * binary.c: Initialise new field of bfd_target structure.
4915 * bout.c: Initialise new field of bfd_target structure.
4916 * cisco-core.c: Initialise new field of bfd_target structure.
4917 * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4918 * coff-alpha.c: Initialise new field of bfd_target structure.
4919 * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
4920 * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4921 * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
4922 * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
4923 * coff-i386.c: Initialise new field of bfd_target structure.
4924 * coff-i860.c: Initialise new field of bfd_target structure.
4925 * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4926 * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4927 * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4928 * coff-mips.c: Initialise new field of bfd_target structure.
4929 * coff-ppc.c: Initialise new field of bfd_target structure.
4930 * coff-rs6000.c: Initialise new field of bfd_target structure.
4931 * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4932 * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
4933 * coff-tic30.c: Initialise new field of bfd_target structure.
4934 * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4935 * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4936 * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4937 * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4938 * hppabsd-core.c: Initialise new field of bfd_target structure.
4939 * hpux-core.c: Initialise new field of bfd_target structure.
4940 * i386msdos.c: Initialise new field of bfd_target structure.
4941 * i386os9k.c: Initialise new field of bfd_target structure.
4942 * ieee.c: Initialise new field of bfd_target structure.
4943 * ihex.c: Initialise new field of bfd_target structure.
4944 * irix-core.c: Initialise new field of bfd_target structure.
4945 * mipsbsd.c: Initialise new field of bfd_target structure.
4946 * netbsd-core.c: Initialise new field of bfd_target structure.
4947 * oasys.c: Initialise new field of bfd_target structure.
4948 * osf-core.c: Initialise new field of bfd_target structure.
4949 * ppcboot.c: Initialise new field of bfd_target structure.
4950 * ptrace-core.c: Initialise new field of bfd_target structure.
4951 * sco5-core.c: Initialise new field of bfd_target structure.
4952 * som.c: Initialise new field of bfd_target structure.
4953 * srec.c: Initialise new field of bfd_target structure.
4954 * tekhex.c: Initialise new field of bfd_target structure.
4955 * trad-core.c: Initialise new field of bfd_target structure.
4956 * versados.c: Initialise new field of bfd_target structure.
4957 * vms.c: Initialise new field of bfd_target structure.
4961 * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
4966 * elflink.h (elf_link_adjust_relocs): New function.
4967 (elf_bfd_final_link): Use it.
4968 (elf_link_input_bfd): Deal with the fact that there can be
4969 two relocation sections for a single section.
4970 (elf_reloc_link_order): Likewise.
4972 * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
4973 a relocateable object.
4974 (_bfd_mips_elf_relocate_section): Handle relocateable links.
4978 * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
4979 (sparc64_elf_get_reloc_upper_bound,
4980 sparc64_elf_get_dynamic_reloc_upper_bound,
4981 sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
4982 sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
4984 (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
4985 ELF64_R_TYPE_ID/DATA where appropriate.
4989 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
4994 * elf32-mips.c (mips_elf_local_relocation_p): New static
4996 (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
4997 (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
4998 Always set *require_jalxp.
4999 (mips_elf_stub_section_p): Mark abfd parameter as unused.
5000 (_bfd_mips_elf_relocate_section): Only look for LO16 following
5001 GOT16 if the GOT16 is against a local symbol. Don't return false
5002 for an undefined symbol. If there is an overflow, assert that we
5007 * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
5008 variables `link' and `elfsec'.
5009 (elf_bfd_final_link): Remove unused variable `os'.
5013 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
5014 a PT_PHDR program headers.
5015 (_bfd_mips_elf_final_link): Don't assume there are going to be
5016 section symbols when we're not building a shared object.
5017 (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
5022 * config.bfd (i[3456]86-*-vxworks*): New target.
5026 * elf32-mips.c (mips_elf_stub_section_p): New function.
5027 (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
5028 (mips_elf_relocate_section): Adjust calling sequence for
5029 mips_elf_calculate_relocation and mips_elf_perform_relocation.
5030 (mips_elf_perform_relocation): Turn `jal' into `jalx' where
5035 * configure.in: Bump version number to 2.9.5.
5036 * configure: Rebuild.
5040 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
5042 (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
5043 to derive final type instead of hardwiring a selection.
5047 * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
5048 things relocated by R_MIPS16_GPREL.
5049 (mips_elf_perform_relocation): Likewise.
5053 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
5057 * elf32-mips.c (struct mips_got_info): Add global_gotno.
5058 (_bfd_mips_elf_size_dynamic_sections): Set it.
5059 (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
5060 (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
5061 new argument max_local.
5065 * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
5066 subwords when handling an R_MIPS16_26 relocation.
5067 (mips_elf_perform_relocation): Don't be paranoid abour right-shift
5070 * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
5071 dst_mask to match reality.
5072 (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
5073 (mips_elf_obtain_contents): Use bfd_get.
5074 (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
5075 (mips_elf_relocate_section): Likewise.
5079 * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
5080 (mips_elf_relocate_section): Adjust calling sequence for
5081 mips_elf_perform_relocation.
5082 (mips_elf_perform_relocation): Take additional argument. Handle
5083 R_MIPS16_26. Use bfd_put for convenience.
5087 * elf.c (assign_file_positions_for_segments): Thinko last change.
5088 Always overwrite p_flags.
5092 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
5093 * elflink.c (_bfd_elf_create_dynamic_sections): Only create
5094 .dynbss and .rel[a].bss if want_dynbss.
5095 * elfxx-target.h (elf_backend_want_dynbss): Provide default.
5099 * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
5103 * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
5104 (struct elf_link_hash_table): Add dynlocal.
5105 (_bfd_elf_link_lookup_local_dynindx): Prototype.
5106 (_bfd_elf_link_adjust_dynindx): Delete.
5107 (_bfd_elf_link_renumber_dynsyms): Prototype.
5108 (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
5109 * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
5110 * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
5111 (_bfd_elf_link_lookup_local_dynindx): New function.
5112 (elf_link_renumber_hash_table_dynsyms): New function.
5113 (_bfd_elf_link_renumber_dynsyms): New function.
5114 * elflink.h (elf_link_record_local_dynamic_symbol): New function.
5115 (struct elf_assign_sym_version_info): Delete removed_dynamic.
5116 (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
5117 instead of elf_link_remove_section_and_adjust_dynindices.
5118 Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms.
5119 (elf_link_assign_sym_version): Remove removed_dynamic code.
5120 (elf_link_renumber_dynsyms): Delete.
5121 (elf_bfd_final_link): Install section and local symbols into .dynsym.
5123 * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
5124 (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
5125 (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
5126 * elf32-mips.c: Similarly.
5127 * elf32-ppc.c: Similarly.
5128 * elf32-sparc.c: Similarly.
5129 * elf64-alpha.c: Similarly.
5130 * elf64-sparc.c: Similarly.
5134 * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
5135 when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow
5136 when the relocation is against _gp_disp.
5140 * dwarf2.c (read_attribute): Support DW_FORM_ref8.
5141 * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
5142 to possibly_dynamic_relocs. Adjust usage throughout code.
5143 (elf_mips_howto_table): Handle R_MIPS_64 correctly.
5144 (elf_mips_ctor64_howto): Likewise.
5145 (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
5147 (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
5148 (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
5149 Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
5150 * elf64-mips.c (elf_backend_may_use_rel_p): Define.
5154 * Makefile.am: Rebuild dependencies.
5155 * Makefile.in: Rebuild.
5157 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
5158 * bfd-in2.h: Rebuild.
5160 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
5161 as appropriate. Use EMPTY_HOWTO as appropriate. Fill in
5162 structure initializations. Add casts.
5163 * reloc.c (EMPTY_HOWTO): Define.
5164 * bfd-in2.h: Rebuild.
5165 * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
5166 comparisons against 0.
5167 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
5168 previous_ibfd_e_flags to unsigned long.
5169 * vms.h (struct vms_private_data_struct): Change section_count to
5171 * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
5172 (_bfd_vms_write_gsd): Change symnum to unsigned.
5173 * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
5174 * vms-tir.c (etir_sta): Change psect to unsigned.
5175 (alloc_section): Change idx to unsigned.
5176 (tir_sta, tir_ctl): Change psect to unsigned.
5177 (_bfd_vms_write_tir): Change len and before to bfd_size_type.
5178 * vms.c (priv_section_count): Change to unsigned.
5182 * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
5183 * m68klinux.c: Likewise.
5187 * Many files: Changes to avoid gcc warnings: Remove unused local
5188 variables. Add default case to enum switches.
5189 * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
5190 compile if not COFF_IMAGE_WITH_PE.
5191 (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
5192 (bfd_arm_get_bfd_for_interworking): Likewise.
5193 (bfd_arm_process_before_allocation): Likewise.
5194 * epoc-pei-arm.c: Don't rename bfd_arm functions.
5195 * pei-arm.c: Likewise.
5196 * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
5197 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
5198 (mips_elf_got16_entry): Put parens around & in body of ==.
5199 (mips_elf_calculate_relocation): Correct test for empty string.
5200 * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
5202 * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
5207 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
5208 as appropriate. Fill in structure initializations. Add variable
5209 initializations. Add casts.
5210 * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
5211 (dwarf1_unit_find_nearest_line): Change i to unsigned long.
5213 * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
5215 * elf-bfd.h (bfd_elf_hash): Update declaration.
5216 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
5217 when calling bfd_elf_hash.
5221 * libbfd.c (bfd_put_8): Make it of type `void'.
5222 * bfd-in2.h: Regenerated.
5223 * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
5225 (_bfd_mips_elf_final_link): Likewise.
5227 * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
5231 * config.bfd (hppa*-*-linux-gnu*): New target
5235 * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
5236 (_bfd_mips_elf_create_dynamic_sections): New function.
5237 (_bfd_mips_elf_add_symbol_hook): Likewise.
5238 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
5239 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
5240 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
5241 (_bfd_mips_elf_gc_mark_hook): Likewise.
5242 (_bfd_mips_elf_gc_sweep_hook): Likewise.
5243 (_bfd_mips_elf_always_size_sections): Likewise.
5244 (_bfd_mips_elf_size_dynamic_sections): Likewise.
5245 (_bfd_mips_elf_check_relocs): Likewise.
5246 (_bfd_mips_elf_link_hash_table_create): Likewise.
5247 (_bfd_mips_elf_print_private_data): Likewise.
5248 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
5249 (_bfd_mips_elf_final_link): Likewise.
5250 (_bfd_mips_elf_additional_program_headers): Likewise.
5251 (_bfd_mips_elf_modify_segment_map): Likewise.
5252 (_bfd_mips_elf_relocate_section): Likewise.
5253 * elf32-mips.c (mips_elf32_object_p): Move contents into
5254 _bfd_mips_elf_object_p.
5255 (mips_elf_additional_program_headers): Rename to
5256 _bfd_mips_elf_additional_program_headers.
5257 (mips_elf_modify_segment_map): Rename to
5258 _bfd_mips_elf_modify_segment_map.
5259 (elf_mips_abi_name): Change prototype.
5260 (mips_elf32_section_from_shdr): Merge into
5261 _bfd_mips_elf_section_from_shdr.
5262 (mips_elf32_section_processing): Merge into
5263 _bfd_mips_elf_section_processing.
5264 (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke
5265 the right back-end ELF linker.
5266 (mips_elf_relocate_section): Rename to
5267 _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code.
5268 (mips_elf_link_output_symbol_hook): Rename to
5269 _bfd_mips_elf_link_output_symbol_hook.
5270 (mips_elf_create_dynamic_section): Rename to
5271 _bfd_mips_elf_create_dynamic_section.
5272 (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
5273 Adjust for 64-bit code. Use mips_elf_got_section.
5274 (mips_elf_adjust_dynamic_symbol): Rename to
5275 _bfd_mips_elf_adjust_dynamic_symbol. Use
5276 mips_elf_allocate_dynamic_relocations.
5277 (mips_elf_finish_dynamic_symbol): Rename to
5278 _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section.
5279 Adjust for 64-bit code.
5280 (mips_elf_finish_dynamic_sections): Rename to
5281 _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code.
5282 (mips_elf_always_size_sections): Rename to
5283 _bfd_mips_elf_always_size_sections.
5284 (mips_elf_add_symbol_hook): Rename to
5285 _bfd_mips_elf_add_symbol_hook.
5286 (mips_elf_next_lo16_addend): Constify.
5287 (mips_elf_calculate_relocation): Likewise.
5288 (mips_elf_obtain_contents): Likewise.
5289 (mips_elf_perform_relocation): Likewise.
5290 (mips_elf_create_dynamic_relocation): Likewise.
5291 (mips_elf_allocate_dynamic_relocations): New function.
5292 (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
5293 (MIPS_ELF_REL_SIZE): Likewise.
5294 (MIPS_ELF_DYN_SIZE): Likewise.
5295 (MIPS_ELF_GOT_SIZE): Likewise.
5296 (MIPS_ELF_SYM_SIZE): Likewise.
5297 (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
5298 (MIPS_ELF_GET_WORD): Likewise.
5299 (MIPS_ELF_PUT_WORD): Likewise.
5300 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5301 (STUB_LW): Conditionalize for 64-bit value.
5302 (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
5304 (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
5305 Check it for inconsistency.
5306 (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
5308 (_bfd_mips_elf_fake_sections): Remove duplicate handling of
5310 (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
5311 (mips_elf_got_offset_from_index): Use misp_elf_got_section.
5312 (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
5313 (mips_elf_local_got_index): Likewise.
5314 (mips_elf_got_page): Likewise.
5315 (mips_elf_got_info): Likewise.
5316 (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
5317 (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
5318 (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
5319 instead of constant `2'.
5320 (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE.
5321 (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
5322 (mips_elf_size_dynamic_sections): Use
5323 MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
5324 MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code.
5325 Adjust all releveant entries in elf backend table.
5326 * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
5327 (mips_elf64_section_processing): Likewise.
5328 Adjust elf backend entries to use _bfd_mips_elf variants now
5331 * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
5333 (size_dynamic_sections): Likewise.
5334 (elf_link_output_extsym): Likewise.
5335 * elf.c: (elf_fake_sections): Likewise.
5336 * libbfd.c (bfd_get): New macro.
5337 (bfd_put): Likewise.
5338 * bfd-in2.h: Regenerated.
5342 * elf-bfd.h (elf_size_info): Add hash_entry_size,
5343 int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
5344 wap_reloca_in, and swap_reloca_out.
5345 * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
5346 multiple internal relocations per external relocation.
5347 (link_read_relocs): Likewise.
5348 (elf_bfd_final_link): Likewise.
5349 (elf_link_input_bfd): Likewise.
5350 (elf_gc_mark): Likewise.
5351 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5352 * elfcode.h (elf_swap_dyn_out): Adjust type to match
5354 (size_info): Add entries for new fields.
5355 * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
5356 (mips_elf64_be_swap_reloc_in): New function.
5357 (mips_elf64_be_swap_reloc_out): Likewise.
5358 (mips_elf64_be_swap_reloca_in): Likewise.
5359 (mips_elf64_be_swap_reloca_out): Likewise.
5360 (mips_elf64_size_info): Add entries for new fields.
5364 * elflink.h (elf_bfd_final_link): Assert that section reloc_count
5365 field equals the new rel_count field.
5366 (elf_link_input_bfd): When doing a relocateable link, use the new
5367 rel_count field rather than the reloc_count field.
5368 (elf_reloc_link_order): Likewise.
5369 (elf_finish_pointer_linker_section): Likewise.
5372 * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
5373 shared library to override a weak definition in a regular object.
5377 * libhppa.h: Revert July 2, 1999 patch.
5379 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
5380 need to generate DLTIND relocations, not DLTREL relocations.
5384 * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
5386 (coff_set_flags): Recognise arm 5 architectures.
5388 * cpu-arm.c: Add support for strongarm and arm9 cpus.
5389 Add support for armv5 architecture.
5391 * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
5393 * reloc.c: Add new, assembler only, ARM reloc:
5394 BFD_RELOC_ARM_ADRL_IMMEDIATE.
5396 * bfd-in2.h: Regenerate.
5400 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
5401 (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
5402 * elf.c (_bfd_elf_find_nearest_line): Pass it.
5403 * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
5404 * elf32-mips.c (ABI_64_P): New macro.
5405 (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
5406 (_bfd_mips_elf_find_nearest_line): Adjust call to
5407 _bfd_dwarf2_find_nearest_line.
5408 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5409 * libbfd.h: Regenerated.
5413 * config.bfd: Add * at the end of i[3456]86-*-unixware.
5417 * libhppa.h (HPPA_R_ARG_RELOC): Delete.
5418 (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
5422 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
5424 (_bfd_elf_init_reloc_shdr): New function.
5425 * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
5426 bfd_alloc followed by memset.
5427 (_bfd_elf_init_reloc_shdr): New function, split out from ...
5428 (elf_fake_sections): Here.
5429 (assign_section_numbers): Assign section numbers for the second
5430 relocation section, if required.
5431 * elflink.h (elf_link_output_relocs): New function.
5432 (elf_link_size_reloc_section): Likewise.
5433 (elf_bfd_final_link): Use elf_link_size_reloc_section.
5434 (elf_link_input_bfd): Use elf_link_output_relocs.
5436 * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
5437 _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
5441 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
5446 * elf32-mips.c (mips_elf_got_info): Move declaration before
5447 prototypes. Change global_gotsym to be a pointer to a hash entry,
5448 rather than a number index.
5449 (mips_elf_link_hash_entry): Move declaration before prototypes.
5450 (mips_elf_irix6_finish_dynamic_symbol): New function.
5451 (mips_elf_sign_extend): Likewise.
5452 (mips_elf_high): Likewise.
5453 (mips_elf_higher): Likewise.
5454 (mips_elf_highest): Likewise.
5455 (mips_elf_global_got_index): Likewise.
5456 (mips_elf_local_got_index): Likewise.
5457 (mips_elf_got_offset_from_index): Likeiwse.
5458 (mips_elf_record_global_got_symbol): Likewise.
5459 (mips_elf_got_page): Likewise.
5460 (mips_elf_next_lo16_addend): Likewise.
5461 (mips_elf_calculate_relocation): Likewise.
5462 (mips_elf_obtain_contents): Likewise.
5463 (mips_elf_perform_relocation): Likewise.
5464 (mips_elf_assign_gp): Likewise.
5465 (mips_elf_sort_hash_table_f): Likewise.
5466 (mips_elf_sort_hash_table): Likewise.
5467 (mips_elf_got_section): Likewise.
5468 (mips_elf_got_info): Likewise.
5469 (mips_elf_create_local_got_entry): Likewise.
5470 (mips_elf_got16_entry): Likewise.
5471 (mips_elf_create_dynamic_relocation): Likewise.
5472 (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
5473 (mips_elf_final_gp): Use mips_elf_assign_gp.
5474 (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
5475 into SHN_SCOMMON automatically on IRIX6.
5476 (mips_elf_add_symbol_hook): Likewise.
5477 (mips_elf_relocate_section): Rewrite, using
5478 mips_elf_calculate_relocation and mips_elf_perform_relocation.
5479 (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
5480 Don't deal with .rld_map on IRIX6.
5481 (mips_elf_create_got_section): Adjust use of global_gotsym. Set
5482 section flags appropriately for .got.
5483 (mips_elf_check_relocs): Handle IRIX6 relocations making use of
5484 the got. Call mips_elf_record_global_got_symbol and allocate
5485 local got space appropriately.
5486 (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
5487 char *. Rework calculation of GOT size. Sort dynamic symbol
5488 table entries so entries that do not require GOT entries appear at
5489 the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead
5490 code dealing with DT_INIT and DT_FINI. Remove fiddling with
5492 (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
5494 (mips_elf_finish_dynamic_symbol): Use
5495 mips_elf_irix6_finish_dynamic_symbol.
5496 (mips_elf_finish_dynamic_sections): Correct off-by-one error
5497 setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for
5498 change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6.
5502 * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
5507 * elf32-arm.h (elf_backend_got_header_size): Define.
5508 (elf_backend_plt_header_size): Likewise.
5512 * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
5516 * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
5517 relocation function.
5518 * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
5522 * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
5523 (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
5524 (MIPS_ELF_STUB_SECTION_NAME): Likewise.
5525 (_bfd_mips_elf_section_from_shdr): Use them.
5526 (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list
5527 of GP-relative sections.
5528 (_bfd_mips_elf_set_section_contents): Use them.
5529 (_bfd_mips_elf_section_processing): Share code between .sdata and
5530 .lit4/.lit8 sections. Set appropriate flags for .srdata.
5531 (mips_elf_additional_program_headers): Add handling for
5532 PT_MIPS_OPTIONS segment on IRIX6.
5533 (mips_elf_modify_segment_map): Likeiwse.
5534 (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
5535 Include the options sections on IRIX6. Don't look for GP-relative
5536 sections by name; use SHF_MIPS_GPREL instead.
5537 (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
5539 (mips_elf_create_dynamic_sections): Don't muck about with section
5540 alignments and such on IRIX6.
5541 (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5542 (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
5543 fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use
5544 bfd_zalloc rather than bfd_alloc and memset.
5545 (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5546 Don't assert the existence of .rld_map on IRIX6.
5547 (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
5549 * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
5550 (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
5555 * elf32-mips.c (mips_elf_swap_msym_in): New function.
5556 (mips_elf_swap_msym_out): New function.
5557 (mips_elf_create_msym_section): Likewise.
5558 (MIPS_ELF_MSYM_SECTION_NAME): New macro.
5559 (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
5560 (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
5561 section not named .msym.
5562 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
5563 .msym directly. Set appropriate attributes for the .msym
5565 (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
5566 (mips_elf_link_hash_newfunc): Clear it.
5567 (mips_elf_create_dynamic_sections): Create the .msym section
5569 (mips_elf_size_dynamic_sections): Allocate space for the
5570 .msym section. Add a DT_MIPS_MSYM entry.
5571 (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
5573 (mips_elf_finish_dynamic_sections): Assign a value for
5574 DT_MIPS_MSYM. Add .msym entries for the section symbols as well.
5576 * elf32-mips.c (irix_compat_t): New enumeration.
5577 (ABI_N32_P): New macro.
5578 (IRIX_COMPAT): Likewise.
5579 (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
5580 (mips_elf_relocate_section): Fix typo.
5584 * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
5585 as writable PE sections.
5589 * dwarf2.c (struct arange): New type.
5590 (struct comp_unit): Replace LOW and HIGH by member ARANGE.
5591 (arange_add): New function.
5592 (decode_line_info): Keep track of address ranges that a compilation
5594 (comp_unit_contains_address): Return true if address is contained
5595 in _any_ of the address ranges associated with a compilation unit.
5596 (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
5597 on the first comp_unit that contains the address.
5601 * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
5602 (decode_line_info): Add variable STASH and initialize it to point
5603 to the per-bfd dwarf2_debug info. Remove static variable
5604 dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
5608 * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
5609 shared library to have an undefined symbol.
5612 * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
5616 * elf-hppa.c (elf_hppa_final_write_processing): New function.
5617 * elf32-hppa.c: Remove everything related to symbol extension
5618 sections & records. Use the common elf_hppa_final_write_processing.
5622 * elflink.h (size_dynamic_sections): Use user-specified init/fini
5623 functions instead of _init/_fini if requested.
5627 * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
5633 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
5635 (ppc_elf_finish_dynamic_sections): Check for positive section
5636 dynindx field, rather than comparing against -1.
5637 (ppc_elf_relocate_section): Only return false if undefined_symbol
5638 or reloc_overflow fail, not always upon encountering an error.
5642 * elflink.h (link_read_relocs): Explicitly cast external_relocs to
5643 bfd_byte * before performing pointer arithmetic.
5647 * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
5649 * elf32-hppa.c: Include elf-hppa.h.
5650 (ARCH_SIZE): Define.
5651 (elf_hppa_reloc_type_lookup): Delete. Found in the common code
5653 (elf32_hppa_info_to_howto): Similarly.
5654 (elf_hppa_howto_table): Similarly.
5655 (elf_hppa_reloc_type_lookup): Similarly.
5656 (hppa_elf_gen_reloc_type): Similarly.
5657 * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
5661 * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
5662 handling R_V850_22_PCREL relocation.
5666 * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
5671 * section.c (_bfd_strip_section_from_output): Ignore sections
5672 DISCARDed by the link script.
5676 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5677 Remove unused local variable spp.
5679 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
5680 the entry symbol is not set.
5684 * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
5685 GPDISP or LITUSE in a relocatable link.
5689 * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
5690 * (alloc_dwarf1_func): Likewise.
5694 * libhppa.h: Fix various formatting errors.
5695 (assemble_3); Rewrite using CATENATE.
5696 (assemble_17): Fix various bugs.
5700 * elf32-mcore.c (R_MCORE_RAW): Fix definition.
5704 * section.c (SEC_SHORT): Define.
5705 * bfd-in2.h: Rebuild.
5709 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5710 Remove abfd parameter. Use _bfd_strip_section_from_output.
5711 (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
5713 * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
5714 * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
5715 * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
5717 (bfd_elf_size_dynamic_sections): Use it.
5721 * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
5722 complain_overflow_bitfield to complain_overflow_signed.
5726 * elflink.h (elf_link_read_relocs_from_section): New function,
5728 (elf_link_read_relocs): Here. Use it for both relocation
5733 * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
5734 asect->reloc_count is valid.
5738 * elf32-mips.c (mips_elf32_section_processing): Permit a
5739 SHT_MIPS_REGINFO section to have a size of 0.
5743 * config.bfd (alpha*-*-freebsd*): New target.
5744 (i[3456]86-*-freebsd*): Now defaults to ELF.
5748 * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
5749 wrap if the relocation covers the high bit of an address.
5751 * dwarf2.c (decode_line_info): Remove unused variable first_time.
5755 * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
5756 instead of R_SPARC_max.
5757 (sparc64_elf_info_to_howto): Likewise.
5758 * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
5759 (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
5763 * section.c (_bfd_strip_section_from_output): Remove output
5764 sections with no initial link_order.
5768 * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
5772 * Makefile.am (SOURCE_HFILES): Add missing headers.
5773 * Makefile.in: Regenerated.
5777 * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
5782 * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
5783 range undefweak symbols.
5784 * hash.c: Add missing comma after @xref{}
5785 * linker.c: Likewise.
5789 * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
5791 * elf32-gen.c (ELF_MAXPAGESIZE): Define.
5792 * elf32-i860.c (ELF_MAXPAGESIZE): Define.
5793 * elf32-i960.c (ELF_MAXPAGESIZE): Define.
5794 * elf64-gen.c (ELF_MAXPAGESIZE): Define.
5798 * Makefile.am: Rebuild dependencies.
5799 (BFD32_BACKENDS): Add dwarf1.lo.
5800 (BFD32_BACKENDS_CFILES): Add dwarf1.c.
5801 * Makefile.in: Rebuild.
5805 * Makefile.am: Add epoc-arm-pe target.
5806 * Makefile.in: Regenerate.
5807 * pe-arm.c: Only redefine interworking function names if they have
5808 not already been redefined.
5809 * pei-arm.c: Only redefine interworking function names if they have
5810 not already been redefined.
5811 * epoc-pe-arm.c: Redefine interworking function names to avoid a
5813 * epoc-pei-arm.c: Redefine interworking function names to avoid a
5818 * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
5822 * elf.c (elf_fake_sections): Undo change of 1999-05-10.
5826 * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
5827 start / stop for recalculating of r_addend of R_SH_SWITCH*.
5831 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
5832 in other text sections.
5836 * libbfd.c (_bfd_generic_verify_endian_match): New function.
5837 * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
5838 * libbfd.h: Regenerate.
5839 * coff-sh.c (sh_merge_private_data): Delete.
5840 (coff_bfd_merge_private_bfd_data): Change to
5841 _bfd_generic_verify_endian_match.
5842 (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
5846 * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
5850 * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
5852 (bfd_elf32_arm_process_before_allocation): Likewise.
5853 * bfd-in2.h: Rebuild.
5857 * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
5858 track of end_sequence markers.
5859 (add_line_info): Add END_SEQUENCE arg.
5860 (decode_line_info): Don't try to infer lo_pc and hi_pc from the
5861 debug-line info---it doesn't work right if a compilation unit
5862 consists of multiple discontiguous code-sequences. It would be
5863 worthwhile to optimize for the common case where a compilation
5864 unit results in a contiguous set of code sequences, but this is
5865 quite tricky to get right for arbitrary DWARF2 files.
5866 (lookup_address_in_line_info_table): Don't use the last line entry
5867 for a compilation unit for anything with an address higher than
5868 this line entry. Also, check for end_sequence markers to
5869 correctly handle discontinuities.
5870 (_bfd_dwarf2_find_nearest_line): When checking previously loaded
5871 compilation units, check all compilation units with each->high==0
5872 just like when reading compilation units.
5874 * dwarf2.c (decode_line_info): Initialize table->files and
5875 table->last_line to NULL to avoid segfaults due to random
5876 values in these members.
5877 (concat_filename): Check for out-of-range file number before
5878 indexing filename table. Segfaults suck.
5880 * dwarf2.c (decode_line_info): Don't truncate address to least
5881 significant 32 bits (breaks 64 bit targets).
5882 (lookup_address_in_function_table): Ditto.
5883 (comp_unit_contains_address): Ditto.
5887 * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
5888 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
5889 (mips_elf64_howto_table_rela): Likewise.
5891 * elfcode.h (elf_slurp_reloc_table_from_section): New function,
5893 (elf_slurp_reloc_table): Here. Use it to handle the case where a
5894 single section has two associated relocation sections.
5898 * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
5899 COFF_WITH_PE defined.
5903 * pe-arm.c: Rename global arm interworking functions to avoid name
5904 collision when all targets BFD is built.
5909 * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
5910 may_use_rel_p, may_use_rela_p, default_use_rela_p.
5911 (bfd_elf_section_data): Add use_rela_p.
5912 * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
5913 (_bfd_elf_new_section_hook): Likewise.
5914 (elf_fake_sections): Use may_use_rela_p, etc., instead of
5916 (_bfd_elf_copy_private_section_data): Copy use_rela_p.
5917 * elfcode.h (write_relocs): Determine whether or not use rela
5918 relocs based on the relocation section header.
5919 * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
5920 instead of use_rela_p.
5921 * elfxx-target.h (elf_backend_may_use_relp): New macro.
5922 (elf_backend_may_use_rela_p): Likewise.
5923 (elf_backend_default_use_rela_p): Likewise.
5924 (elfNN_bed): Use them.
5928 * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
5932 * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
5933 (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
5934 (BFD_RELOC_MIPS_GOT_OFST): Likewise.
5935 (BFD_RELOC_MIPS_GOT_DISP): Likewise.
5936 * bfd-in2.h: Regenerated.
5937 * libbfd.h: Likewise.
5938 * elf32-mips.c (mips_info_to_howto_rela): New function.
5939 (USE_REL): Adjust for new conventions.
5940 (MINUS_ONE): New macro.
5941 (elf_mips_howto_table): Add R_MIPS_SUB.
5942 (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
5944 (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
5945 .MIPS.content section.
5946 (_bfd_mips_elf_fake_sections): Treat all sections that begin
5947 with .MIPS.content as .MIPS.content sections. Set
5948 SHF_MNIPS_NOSTRIP for such section.
5949 (elf_info_to_howto): Define to mips_info_to_howto_rela.
5950 * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE,
5951 MIPS_GOT_OFST, and MIPS_GOT_DISP.
5955 * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
5958 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
5963 * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
5964 1993-03-25 (!!). Take into account the bitmasks for the reloc so
5965 the addend does not overflow into the rest of the word.
5969 * bfd-in.h: Amend prototype for
5970 bfd_elf32_arm_process_before_allocation .
5971 * bfd-in.h: Regenerate.
5973 * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
5974 elements in a fixed sized array.
5975 (ARM_ELF_ABI_VERSION): Define.
5976 (ARM_ELF_OS_ABI_VERSION): Define.
5977 (R_ARM_THM_ABS5): Fix rightshift and size.
5978 (R_ARM_THM_PC22): Fix size.
5979 (R_ARM_PLT32): Define Howto.
5980 (find_howto): New function: Locate a howto based on a reloc
5982 (elf32_arm_info_to_howto): Use find_howto if necessary.
5983 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5984 bfd_reloc_code_real_type.
5985 (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
5986 and BFD_RELOC_VTABLE_ENTRY.
5987 (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
5989 * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
5990 elements in a fixed sized array.
5991 (ARM_ELF_ABI_VERSION): Define.
5992 (ARM_ELF_OS_ABI_VERSION): Define.
5993 (R_ARM_THM_ABS5): Fix rightshift and size.
5994 (R_ARM_THM_PC22): Fix size.
5995 (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
5996 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5997 bfd_reloc_code_real_type.
5999 * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
6000 no_pipeline_knowledge.
6001 (elf32_arm_link_hash_create): Initialise new field to zero.
6002 (bfd_elf32_arm_process_before_allocation): Add new paraemter:
6003 no_pipeline_knowledge. Use this parameter to initialise the field
6004 in the globals data structure.
6005 (elf32_arm_final_link_relocate): Only add in pipeline offset if
6006 no_pipeline_knowledge is false and the binary is from an old
6008 (elf32_arm_merge_private_data): Generate an error if an attempt is
6009 made to link together big endian and little endian code.
6010 (elf32_arm_post_process_headers): New function: Initialise the
6011 EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
6013 (elf_backend_post_process_headers): Define.
6017 * elf-bfd.h (struct elf_backend_data): Add new field:
6018 elf_backend_post_process_headers.
6020 * elfxx-target.h (elf_backend_post_process_headers): Define to
6021 NULL if not already defined.
6022 (elfNN_bed): Initialise elf_backend_post_process_headers field.
6024 * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
6026 (_bfd_elf_compute_section_file_positions): Call
6027 elf_backend_post_process_headers if defined.
6031 * configure.in: Check whether getuid and getgid exist.
6032 * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
6033 HAVE_GETGID are not defined, respectively.
6034 (bfd_write_armap): Don't special case on _WIN32 for getuid and
6036 * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
6037 * configure, config.in: Rebuild.
6041 * elf32-i960.c: New file.
6042 * elf.c (prep_headers): Handle bfd_arch_i960.
6043 * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
6044 * config.bfd (i960-*-elf*): New target.
6045 * configure.in (bfd_elf32_i960_vec): New target vector.
6046 * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
6047 (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
6048 * Makefile.in, aclocal.m4, configure: Rebuild.
6052 * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
6054 (find_howto): New function: Find entries in the
6055 elf32_arm_howto_table.
6056 (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
6058 (elf32_arm_reloc_type_lookup): Add lookup for
6059 BFD_RELOC_ARM_PLT32.
6063 * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
6064 (elf32_arm_link_hash_table_create): Use above function as the
6065 constructor for hash table entries.
6066 (elf32_arm_relocate_section): Avoid crash when there is no output
6068 (elf32_arm_final_link_relocate): New parameter h.
6069 (elf32_arm_relocate_section): Pass symbol hash entry to above
6071 (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
6076 * coff-arm.c (coff_arm_relocate_section): Don't emit
6077 base file entries for pc-relative values.
6081 * peicode.h (coff_swap_sym_in): When we create the actual section
6082 to reflect the not-there section C_SECTION symbols refer to,
6083 change the symbol class to C_STAT as the section is now really
6088 * elf32-arm.h (elf32_arm_relocate_section): Undo change of
6093 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
6095 * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
6096 F_ARM_3M labels. Changed F_PIC_INT to F_PIC.
6100 * coff-mcore.c (in_reloc_p): Reinstate.
6104 * reloc.c (BFD_RELOC_MCORE_RVA): Define.
6105 * bfd-in2.h: Regenerate.
6106 * coff-mcore.c (in_reloc_p): Remove defintion.
6107 (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
6108 (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
6109 IMAGE_REL_MCORE_RVA.
6110 (coff_mcore_rtype_to_howto): Add special processing for
6111 IMAGE_REL_MCORE_RVA.
6112 (coff_mcore_relocate_section): Add support for
6113 IMAGE_REL_MCORE_RVA.
6114 * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
6115 (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
6117 (mcore_elf_relocate_section): Delete redundant case labels.
6121 * elf32-arm.h (elf32_arm_relocate_section): Fix operator
6122 precedence between bit-and and comparison.
6126 * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
6127 list of target formats (targ_selvecs).
6128 (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
6129 (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
6133 * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
6134 reasonable mode until "ar x" is smart enough to skip it (fixes
6135 gcc/libgcc.a builds on mips-ecoff targets
6137 * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
6138 to work. Hack to support MS import libraries, which use different
6139 COMDAT types than GNU.
6140 (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
6141 to implied zero-length sections (see peicode below)
6142 * coffgen.c (coff_get_normalized_symtab): Properly read long MS
6143 filename symbols, which use one *or more* auxents.
6144 * coffswap.h (coff_swap_aux_in): ditto
6145 * peicode.h (coff_swap_sym_in): Build the implied zero-length
6150 * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
6151 for all relocations.
6155 * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
6156 if COFF_IMAGE_WITH_PE.
6157 (bfd_arm_process_before_allocation): Likewise.
6158 (bfd_arm_get_bfd_for_interworking): Likewise.
6159 * coff-arm.c: Likewise.
6160 * bfd-in2.h: Regenerate.
6161 * configure.in (armpe_little_vec): Remove coff-arm.lo.
6162 (armpe_big_vec): Likewise.
6163 * configure: Rebuild.
6167 * elf.c (elf_fake_sections): Check for .rel. as start of rel
6168 section, not just .rel. Same for .rela.
6172 * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
6173 endianism with an error message.
6177 * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
6178 assignment from "unsigned char *" to "char *".
6179 (decode_line_info): Likewise for dwarf_line_buffer assignment.
6183 * coff-arm.c (coff_arm_relocate_section): Add one to
6184 address of ARM_RVA32 thumb functions.
6188 * elf32-m68k.c (elf32_m68k_set_private_flags): New.
6189 (elf32_m68k_copy_private_bfd_data): New.
6190 (elf32_m68k_merge_private_bfd_data): New.
6191 (elf32_m68k_print_private_bfd_data): New.
6192 (CPU32_FLAG): Define.
6193 (PLT_CPU32_ENTRY_SIZE): Define.
6194 (elf_cpu32_plt0_entry): Declare.
6195 (elf_cpu32_plt_entry): Declare.
6196 (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
6197 (elf_m68k_finish_dynamic_symbol): Likewise.
6198 (elf_m68k_finish_dynamic_sections): Likewise.
6199 (elf_backend_plt_header_size): Remove definition.
6200 (bfd_elf32_bfd_copy_private_bfd_data): Define.
6201 (bfd_elf32_bfd_merge_private_bfd_data): Define.
6202 (bfd_elf32_bfd_set_private_flags): Define.
6203 (bfd_elf32_bfd_print_private_bfd_data): Define.
6207 * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
6208 and R_LONG_PCREL_MODE.
6212 * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
6216 * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
6217 in relocation calculation.
6221 * aclocal.m4, configure: Updated for new version of libtool.
6225 * coff-mcore.c: Add support for mcore relocs.
6229 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
6230 incorrect use EF_MIPS_xxBITPTRS.
6234 * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
6237 * bfd-in2.h: Rebuild.
6238 * libbfd.h: Rebuild.
6242 * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
6243 (coff_arm_relocate_section): Add ARM26D transform. Only
6244 change to ARM26D for relocateable links.
6248 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
6249 (bfd_elf32_bfd_print_private_bfd_data): New.
6253 * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5,
6254 refetch addend if USE_REL, add many comments regarding current state.
6255 For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
6256 * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
6257 size and rightshift. For R_ARM_THM_PC22, fix bitsize.
6258 * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
6262 * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
6263 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
6267 * dwarf2.c (decode_line_info): Don't truncate address to least
6268 significant 32 bits (breaks 64 bit targets).
6269 (lookup_address_in_function_table): Ditto.
6270 (comp_unit_contains_address): Ditto.
6274 * coff-arm.c (arm_emit_base_file_entry): New routine.
6275 (A2T3_OFFSET): Define.
6276 (T2A3_OFFSET): Define.
6277 (coff_arm_relocate_section): Emit base file entries for interworking
6282 * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
6283 relocs 17 through 19.
6287 * elfcode.h: Remove fnmatch.h.
6288 * elflink.h (elf_link_assign_sym_version): Call back to ld
6289 instead of calling fnmatch.
6291 * config.bfd (i?86-*-beoself): Include pe vecs.
6295 * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
6300 * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
6301 when trying to resolve dynamic symbol references.
6302 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6303 * elf32-mips.c (mips_elf_relocate_section): Likewise.
6304 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6305 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6306 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6307 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6308 * elflink.h (elf_link_output_extsym): Likewise.
6312 * section.c (_bfd_strip_section_from_output): New function moved from
6313 * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
6314 * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
6315 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6316 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
6317 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6318 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6319 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6320 * bfd-in2.h: Update.
6324 * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
6328 * coff-mcore.c: New File: Support for mcore-pe targets.
6329 * cpu-mcore.c: New File: Support for mcore targets.
6330 * elf32-mcore.c: New File: Support for mcore-elf target.
6331 * pe-mcore.c: New File: Definitions for mcore-pe target.
6332 * pei-mcore.c: New File: Definitions for mcore-pei target.
6333 * Makefile.am: Add support for MCore targets.
6334 * Makefile.in: Regenerate.
6335 * config.bfd: Add support for MCore targets.
6336 * configure.in: Add support for MCore targets.
6337 * configure: Regenerate.
6338 * archures.c: Add support for MCore architecture.
6339 * bfd-in2.h: Regenerate.
6340 * coffcode.h: Add support for mcore-pe targets.
6341 * elf.c: Add support for mcore-elf target.
6342 * reloc.c: Add support for MCore relocs.
6343 * targets.c: Add support for MCore targets.
6347 * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
6348 R_ARM_XPC25 and R_ARM_THM_XPC22.
6349 (elf32_arm_reloc_map): Remove redundant entries.
6353 * sysdep.h (LC_MESSAGES): Never define.
6357 * reloc.c (bfd_check_overflow): Add addrsize parameter. Change
6358 all callers. Rewrite completely.
6359 (_bfd_relocate_contents): Rewrite overflow checking.
6360 * bfd-in2.h: Rebuild.
6365 * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
6366 R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
6367 Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
6368 have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
6369 * ppcboot.c (ppcboot_vec): Use little endian routines for
6372 * elf.c (elfcore_strndup): Only define if it will be used.
6373 * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
6375 (ppc_elf_check_relocs): Remove unused local i.
6376 (ppc_elf_gc_mark_hook): Add default case to switch.
6379 * srec.c (srec_scan): Accept \r in symbol definitions.
6380 (srec_object_p): Set HAS_SYMS if we saw any symbols.
6381 (symbolsrec_object_p): Likewise.
6385 * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
6389 * dwarf1.c (parse_line_table): Remove unused locals last_pc and
6391 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
6392 * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
6394 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
6396 * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
6401 * config.bfd: Add support for arm-epoc-pe target.
6402 * configure.in: Add support for arm-epoc-pe target.
6403 * configure: Regenerate.
6404 * targets.c: Add support for arm-epoc-pe target.
6405 * coff-arm.c: Allow header files to override definition of
6406 TARGET_UNDERSCORE and USER_LABEL_PREFIX.
6407 * pe-arm.h: Allow previous header files to override definition of
6408 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6409 * pei-arm.h: Allow previous header files to override definition of
6410 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6411 * epoc-pe-arm.c: New file. Support arm-epoc-pe target.
6412 * epoc-pei-arm.c: New file. Support arm-epoc-pei target.
6416 * elf.c (elf_map_symbols): Handle the case where section
6417 symbols are generated for content-less sections which are
6418 not mapped to the output file.
6420 * linker.c: Replace direct references to fields in BFD structure
6421 with accessor macros.
6423 * elflink.h: Replace direct references to fields in BFD structure
6424 with accessor macros.
6428 * config.bfd: Eliminate redundancy in checks for Linux/ARM.
6430 * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
6431 account when adjusting section symbols during a partial link.
6435 * coff-sparc.c (struct coff_reloc_map): Change type of field
6436 'bfd_reloc_val' to bfd_reloc_code_real_type.
6437 * elf-m10200.c (struct mn10200_reloc_map): Ditto.
6438 * elf-m10300.c (struct mn10300_reloc_map): Ditto.
6439 * elf32-arc.c (struct arc_reloc_map): Ditto.
6440 * elf32-d10v.c (struct d10v_reloc_map): Ditto.
6441 * elf32-d30v.c (struct d30v_reloc_map): Ditto.
6442 * elf32-fr30.c (struct fr30_reloc_map): Ditto.
6443 * elf32-m32r.c (struct m32r_reloc_map): Ditto.
6444 * elf32-sh.c (struct elf_reloc_map): Ditto.
6445 * elf32-sparc.c (struct elf_reloc_map): Ditto.
6446 * elf32-v850.c (struct v850_reloc_map): Ditto.
6447 * elf64-sparc.c (struct elf_reloc_map): Ditto.
6448 * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
6449 * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
6453 * syms.c (_bfd_stab_section_find_nearest_line): Changed this
6454 function so source-level assembly works. If multiple N_SOs
6455 are seen without and N_FUNs, create an indextable entry with
6456 a NULL function name.
6460 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
6461 of certian similar cpus.
6465 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6466 Add the 5000. Change the architecture for the 5400 to mips4.
6467 (elf_mips_mach): Add r5000.
6471 * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
6475 * binary.c (binary_set_section_contents): Generate warning about
6476 huge file offsets for any section that will occupy file space, not
6477 just those that are loadable.
6481 * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
6485 * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
6489 * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
6490 * elflink.h: Revert all changes since Feb 16. Instead:
6491 (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
6492 appropriate. Copy it to version symbols.
6493 (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
6494 symbols if appropriate.
6495 (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
6496 symbol if appropriate.
6497 (elf_link_output_extsym): If symbol is marked as undefined, and
6498 has no nonweak references, mark it as weak undefined.
6502 * elflink.h (elf_merge_symbol): When overriding a dynamic
6503 definition with a weak undefined symbol, set NEEDS_PLT if it is a
6505 (elf_link_add_object_symbols): Don't copy the other field if we
6510 * elflink.h (elf_merge_symbol): Do not merge any symbol from a
6511 shared object with a weak undefined symbol.
6515 * elfarm-nabi.c: Set partial_inplace back to false.
6519 * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
6520 (USER_LABEL_PREFIX): Set to "_".
6522 The following patches are from: Scott Bambrough
6525 * libaout.h (M_ARM6_NETBSD): Set to 143.
6527 * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12,
6528 BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
6529 BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
6530 BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
6531 * bfd-in2.h: Regenerate.
6533 * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
6534 'true' as REL relocs are now being used. Add new PIC relocs:
6535 R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
6536 R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
6538 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
6540 (elf32_arm_final_link_relocate): Change parameters so that entire
6541 reloc is passed. Add support for PIC relocs.
6542 (elf32_arm_relocate_section): Pass entire reloc to
6543 elf32_arm_final_link_relocate.
6544 (elf32_arm_check_relocs): Handle new PIC relocs.
6545 (elf32_arm_adjust_dynamic_symbol): New function.
6546 (elf32_arm_size_dynamic_sections): New function.
6547 (elf32_arm_discard_copies): New function.
6548 (elf32_arm_finish_dynamic_symbol): New function.
6549 (elf32_arm_finish_dynamic_sections): New function.
6550 (ELF_MAXPAGE_SIZE): Define.
6551 (bfd_elf32_bfd_reloc_type_lookup): Define.
6552 (elf_backend_relocate_section): Define.
6553 (elf_backend_adjust_dynamic_symbol): Define.
6554 (elf_backend_create_dynamic_sections): Define.
6555 (elf_backend_finish_dynamic_symbol): Define.
6556 (elf_backend_finish_dynamic_sections): Define.
6557 (elf_backend_size_dynamic_sections): Define.
6558 (elf_backend_plt_readonly): Define.
6559 (elf_backend_want_got_plt): Define.
6560 (elf_backend_want_plt_sym): Define.
6564 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
6565 sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
6566 (_bfd_mips_elf_fake_sections): Likewise.
6570 * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
6571 bfd_elf32_arm_get_bfd_for_interworking,
6572 bfd_elf32_arm_process_before_allocation): Define to avoid clash
6575 * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
6576 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
6577 elf32_arm_find_nearest_line): Make them static.
6581 * elflink.h (elf_merge_symbol): Add pflags parameter. Change all
6582 callers. Do not merge a definition from a shared object with a
6583 weak undefined symbol.
6584 (elf_link_add_object_symbols): Do not change the symbol type or
6585 size if the old symbol overrides the new one.
6589 * config.bfd: Add support for strongarm target.
6593 * elf32-m68k.c (reloc_map): Use the correct types for the struct
6594 fields instead of unsigned char.
6598 * Makefile.am: Rebuild dependencies.
6599 * Makefile.in: Rebuild.
6603 * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32.
6604 Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
6605 AC_PROG_INSTALL. Add comments to uses of AC_DEFINE.
6606 * acinclude.m4: Add comments to uses of AC_DEFINE.
6607 * acconfig.h: Remove.
6608 * configure: Rebuild with current autoconf/automake.
6609 * aclocal.m4: Likewise.
6610 * config.in: Likewise.
6611 * Makefile.in: Likewise.
6615 * libbfd.c (real_read): don't call fread for zero bytes. This
6616 covers up a bug (or misuse of bfd) that's exposed by Solaris.
6620 * elf32-mips.c (mips_elf_relocate_section): Insure that the target
6621 of a jump is in the current 256 MB region.
6625 * format.c (bfd_check_format_matches): Change last patch to only
6626 take effect for the binary target.
6630 * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
6634 * elf32-fr30.c (fr30_elf_check_relocs): New routine.
6638 * format.c (bfd_check_format_matches): If the target was
6639 previously specified, don't check other targets when checking for
6644 * elf32-arm.h (elf32_arm_reloc_map): Removed.
6645 (elf32_arm_reloc_type_lookup): Removed
6646 * elfarm-nabi.c (elf32_arm_reloc_map): New.
6647 (elf32_arm_reloc_type_lookup): New.
6648 * elfarm-oabi.c (elf32_arm_reloc_map): New.
6649 (elf32_arm_reloc_type_lookup): New.
6653 * elfarm-nabi.c: Renamed from elf32-arm-newabi.c.
6654 * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c
6655 * Makefile.am: Use new files.
6656 * Makefile.in: Regenerate.
6657 * configure.in: Use new files.
6658 * configure: Regenerate.
6662 * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
6663 (fr30_elf_gc_sweep_hook): New function.
6664 (elf_backend_can_gc_sections): Define.
6668 * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec
6669 and bfd_elf32_bigarm_oabi_vec.
6673 * Makefile.am (elf32-arm-oldabi.lo): New.
6674 (elf32-arm-newabi.lo): New.
6675 * Makefile.in: Regenerate.
6676 * config.bfd (thumb-*-elf): Remove definition of targ_underscore.
6677 (arm-*-elf): Likewise.
6679 (thumb-*-oabi): New.
6680 * configure: Regenerate.
6681 * configure.in (bfd_elf32_littlearm_oabi_vec): New.
6682 (bfd_elf32_bigarm_oabi_vec): New.
6683 * elf32-arm-newabi.c: New.
6684 * elf32-arm-oldabi.c: New.
6685 * elf32-arm.c: Removed.
6690 * binary.c (binary_set_section_contents): Omit warnings for
6691 unloadable sections.
6695 * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
6696 powerpc{,le}-*-eabi.
6700 * dwarf2.c (read_unsigned_leb128): Remove unused variables.
6701 * dwarf2.c (read_signed_leb128): Remove unused variables.
6705 * elf.c (assign_file_positions_for_segments): Only adjust
6706 p_align when needed.
6710 * binary.c (binary_set_section_contents): Don't return early for a
6711 non-loadable section, in case the first section is non-loadable.
6712 Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej
6717 * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
6718 R_FR30_GNU_VTENTRY relocs.
6722 * elflink.h (elf_link_output_sym): Zero syms which are
6723 part of sections which have been excluded.
6727 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
6729 * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
6730 F_ARM_3M labels. Changed F_PIC to F_PIC_INT.
6734 * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
6736 (fr30_final_link_relocate): Use computed value as result of
6741 * binary.c (binary_set_section_contents): Emit warning for
6742 huge file offsets due to widely-dispersed section LMAs.
6746 * elf.c (assign_file_positions_for_segments): If not D_PAGED,
6747 align first section to largest section alignment, not first
6752 * configure.in: Require autoconf 2.12.1 or higher.
6756 * archures.c (bfd_mach_i386_i386_intel_syntax): Define.
6757 * bfd-in2.h: Likewise.
6758 * cpu-i386.c (bfd_i386_arch_intel_syntax): New.
6762 * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
6763 * cpu-mips.c: Add support for and independent 4111.
6764 * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
6765 (_bfd_mips_elf_final_write_processing):
6766 bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
6770 * elf32-mips.c (elf_mips_abi_name): New.
6771 (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
6775 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6776 Handle bfd_mach_mips4300.
6780 * elf32-i386.c: Remove leaked development code from patch
6781 1998-12-10 by Richard Henderson.
6785 * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
6786 in debug sections for symbol defined externally.
6790 * targets.c (bfd_target_vector): Remove duplicate entry for
6795 * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
6796 since we are using RELAs.
6800 SCO Open Server Release 5 core file support, from Jouke Numan
6802 * sco5-core.c: New file.
6803 * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
6804 (sco5-core.lo): Define SCO5_CORE in COREFLAG.
6805 * Makefile.am: Rebuild dependencies.
6806 (OPTIONAL_BACKENDS): Add sco5-core.lo.
6807 (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
6808 * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
6809 * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
6810 * bfd-in2.h, configure, Makefile.in: Rebuild.
6814 * config.bfd (hppa*-*-mpeix*): New target.
6815 * configure.in: Add AC_HEADER_DIRENT.
6816 (hppa*-*-mpeix*): New target.
6817 * configure.host (hppa*-*-mpeix*): New host.
6818 * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and
6819 friends rather than just including <sys/dir.h>.
6820 * som.h (struct som_symbol): Add hppa_priv_level and apto
6821 tc_data. Change all users.
6822 (struct somdata): Add comp_unit field.
6823 (obj_som_compilation_unit): Define.
6824 (bfd_som_attach_compilation_unix): Declare.
6825 * som.c: Check HOST_HPPAMPEIX.
6826 (struct som_misc_symbol_info): Add new field priv_level.
6827 (som_object_setup): Add current_offset parameter. Change all
6829 (setup_sections): Likewise.
6830 (som_object_p): For EXECLIBMAGIC, read the lst header.
6831 (som_write_symbol_strings): Add compilation_unit parameter.
6833 (som_finish_writing): Write out compilation_unit.
6834 (som_bfd_derive_misc_symbol_info): Set priv_level.
6835 (som_build_and_write_symbol_table): Set xleast field to 3.
6836 (som_slurp_symbol_table): Set symbol priv_level.
6837 (bfd_som_attach_compilation_unit): New function.
6838 (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set
6839 priv_level into symbol_value.
6840 * configure, config.in: Rebuild.
6844 * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
6845 warning function to call _bfd_error_handler instead.
6847 * libbfd.c (COERCE32): Cast through unsigned long and long to
6848 avoid bug in old version of gcc.
6850 * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
6851 (elf_backend_additional_program_headers): Don't define.
6855 * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
6856 relocations to include offset of 2 included in the insns, and the
6857 offset of the relocs within the section.
6861 The following changes were made by David Taylor
6866 changes originally made by HP; HP did not create ChangeLog
6869 * aclocal.m4, configure, Makefile.in: Rebuilt using latest
6870 automake macro library.
6872 * hpux-core.c (hpux_core_core_file_p): this function now
6873 understands HPUX 10.30 thread info. Yes, the thread stacks can be
6874 found in the corefile! Also, in hpux_core_core_file_p, if we
6875 encounter a section with an unknown type, don't punt. Instead,
6876 just skip it. Also, count the number of sections of known type
6877 that we encounter. If we encounter at least one good one, then
6878 we'll declare that the file is a core file. If we encounter any
6879 unknown ones but some known ones, then we'll issue a warning (but
6880 still declare it to be a core file). Also, correctly decide when a
6882 (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
6883 (CORE_ANON_SHMEM): define if not defined.
6884 (hpux_core_struct): add members lwpid and user_tid.
6885 (core_kernel_thread_id, core_user_thread_id): new macros.
6886 (make_bfd_asection): use bfd_alloc to allocate room for a copy of
6887 the name before storing it in the bfd.
6888 (hpux_core_core_file_p): handle threads.
6890 * libhppa.h (GET_FIELD): protect against redefinition.
6891 (HPPA_WIDE): define.
6892 (GET_FIELD): define.
6897 (sign_extend): redefine.
6898 (assemble_6): define.
6899 (assemble_12): rewrite.
6900 (assemble_16): define.
6901 (assemble_16a): define.
6902 (assemble_17): rewrite.
6903 (assemble_22): define.
6907 * elf32-fr30.c (fr30_final_link_relocate): Using signed
6908 relocations for signed values.
6912 * mipsbsd.c (MY(set_arch_mach)): Make static.
6913 * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
6914 bfd_mach_mips* macros rather than simple numbers.
6916 COFF weak symbol support, based on patches from Mark Elbrecht
6918 * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
6919 * coffgen.c (coff_renumber_symbols): Handle weak symbols.
6920 (coff_write_alien_symbol): Likewise.
6921 * cofflink.c (coff_link_check_ar_symbols): Likewise.
6922 (coff_link_add_symbols): Likewise.
6923 (_bfd_coff_link_input_bfd): Likewise.
6924 (_bfd_coff_write_global_sym): Likewise.
6926 * elf.c (copy_private_bfd_data): Always initialize the
6927 includes_phdrs field.
6929 * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
6930 file defines a symbol first mentioned in an ELF file.
6932 * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
6933 possible, rather than only if BFD64.
6934 * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
6936 * bfd-in2.h: Rebuild.
6938 * srec.c (srec_set_section_contents): Correct test to avoid
6939 switching to 4 byte addresses after seeing a second section which
6940 requires 3 byte addresses. From Joel Schantz
6943 * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
6948 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
6949 decide whether the output file is -mrelocatable-lib,
6950 -mrelocatable, or neither. (gdb.base/nodebug.exp)
6954 * elf32-fr30.c: Add support for R_FR30_48 reloc.
6955 * reloc.c: Add BFD_RELOC_FR30_48 relocation.
6956 * bfd-in2.h: Regenerate.
6957 * libbfd.h: Regenerate
6961 * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
6962 link against a dynamic symbol with no type or size.
6966 * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
6967 relocation for section which does not get loaded.
6968 (elf_i386_relocate_section) [R_386_32]: Likewise.
6972 * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
6973 reloc_count and i long instead of unsigned long. Handle error
6974 return from bfd_canonicalize_reloc.
6978 * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
6983 * elf32-sh.c (elf/sh.h): Include.
6984 sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type.
6985 (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
6986 (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
6987 (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6988 * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
6992 * elflink.h (compute_bucket_count): Don't allow minsize==0, it
6993 causes division by zero later on.
6997 * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
7002 * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
7007 * elf32-fr30.c (fr30_elf_relocate_section): Call
7008 fr30_final_link_relocate.
7009 (fr30_final_link_relocate): New function: Handle I20 and I32
7011 (fr30_elf_i32_reloc): New function: Handle I32 relocs.
7012 (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
7013 (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
7015 * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
7018 The following changes are based on a patch submitted by Gianluca
7021 (v850_elf_perform_relocation): Only update a hi16s reloc if it has
7022 not already been updated.
7023 (find_remembered_hi16s_reloc): New parameter 'already_found'
7024 returns state of remembered hi16s reloc.
7025 (remember_hi16s_reloc): Set 'found' field to false.
7026 (hi16s_location): Add 'found' field.
7030 * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
7031 to see .DLL files as unrecognized.
7032 (i3coff_object_p): Sorry, had to hack it to not recognize these
7033 files (pei-i386) on request.
7037 * opncls.c (bfd_make_readable): need more cleanup for symbols and
7038 relents. Call bfd_check_format to reinitialize.
7042 * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
7047 * aclocal.m4: regenerate
7048 * configure: regenerate
7052 * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
7053 * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
7054 * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
7055 respect it as an upper bound on what memory to reference.
7056 (elf_gc_smash_unused_vtentry_relocs): Likewise.
7057 (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and
7058 update vtable_entries_size appropriately.
7062 * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
7067 * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
7068 bfds; they have no "file" so we fake it.
7069 * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
7070 * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
7071 resizing the memory buffer.
7072 * opncls.c (bfd_make_writable): New function; lets you write a
7073 bfd_create'd bfd to an in-memory buffer.
7074 (bfd_make_readable): New function; lets you read back that buffer
7075 as if it were from bfd_openr. Used to build generated archive
7076 members (winsup's ld's dlltool)
7080 * po/bfd.pot: Regenerated.
7084 * elf32-v850.c (hi16s_location): Replaced fixed size array with
7089 * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
7090 element of the gotentry list for local symbols too.
7091 (elf64_alpha_relocate_section): Unify local and global handling.
7092 Assert that gotent->use_count > 0.
7096 * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
7097 update for file name changes of July 2, 1998.
7099 * configure: Rebuild.
7103 * po/bfd.pot: Regenerated.
7107 * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
7108 * aclocal.m4, configure: regenerate
7112 * elf.c (prep_headers): Add support for bfd_arch_fr30.
7116 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
7117 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
7119 * aclocal.m4, configure: regenerated.
7123 * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and
7124 R_D10V_GNU_VTENTRY relocs.
7125 (elf_d10v_howto_table): Likewise.
7126 (d10v_reloc_map d10v_reloc_map): Likewise.
7127 (elf32_d10v_gc_mark_hook): New.
7128 (elf32_d10v_gc_sweep_hook): New.
7129 (elf32_d10v_check_relocs): New.
7130 (elf32_d10v_relocate_section): New.
7131 (elf_backend_relocate_section): Define.
7132 (elf_backend_can_gc_sections): Define.
7136 * Makefile.am (BFD32_BACKENDS): Move vms files here...
7137 (BFD64_BACKENDS): ...from here.
7138 (BFD32_BACKENDS_CFILES): Move vms files here...
7139 (BFD64_BACKENDS_CFILES): ...from here.
7140 * Makefile.in: Rebuild.
7144 * Makefile.am: Add FR30 target.
7145 * Makefile.in: Add FR30 target.
7146 * archures.c: Add support for FR30.
7147 * config.bfd: Add support for FR30.
7148 * configure.in: Add support for FR30.
7149 * reloc.c: Add support for FR30 relocations.
7150 * targets.c: Add support for FR30 relocations.
7151 * bfd-in2.h: Regenerate.
7152 * configure: Regenerate.
7153 * libbfd.h: Regenerate.
7154 * cpu-fr30.c: New file.
7155 * elf32-fr30.c: New file.
7159 * configure.in: detect cygwin* instead of cygwin32*
7160 * configure: regenerate
7164 * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
7165 use bfd_malloc and free instead and check return value from bfd_malloc.
7169 * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
7170 * libbfd.h: Rebuild.
7172 * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
7173 (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
7174 (MIPS_TEXT_DYNSYM_SECN): Likewise.
7175 (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
7177 (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
7179 (mips_elf_link_hash_table_create): Don't initialize
7180 dynsym_sec_strindex.
7181 (mips_elf_gc_mark_hook): Add default case to avoid warning.
7182 (mips_elf_size_dynamic_sections): Generate a section symbol for
7183 every output section.
7184 (mips_elf_finish_dynamic_sections): Count all sections for
7186 (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
7191 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
7192 for later PLT entries in large PLTs.
7193 (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
7197 * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
7201 * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
7202 * elflink.h (elf_collect_hash_codes): New function. This function is
7203 called for each exported symbol and we compute the ELF hash value for
7205 (compute_bucket_value): New function. It is called from
7206 size_dynamic_sections to determine the hash table size. When we are
7207 optimizing a better, but slower, algorithm is used.
7208 (size_dynamic_sections): Call compute_bucket_value.
7210 * elf.c (bfd_elf_hash): Optimize the hash function a bit.
7214 * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and
7216 (sh_elf_gc_mark_hook): New.
7217 (sh_elf_gc_sweep_hook): New.
7218 (sh_elf_check_relocs): New.
7219 (elf_backend_can_gc_sections): Define.
7223 * acinclude.m4: undo previous gettext change
7224 * aclocal.m4: rebuild with right version of aclocal.
7228 * acinclude.m4, aclocal.m4: move gettext-related fragments from
7229 aclocal.m4 to acinclude.m4, so they don't get lost.
7231 * elfcore.h: rewrite for better corefile support.
7232 * elf.c (elfcore_*): new functions.
7233 * elf-bfd.h (elf_obj_tdata): new structure members.
7234 * acconfig.h, acinclude.m4, configure.in: add feature-tests for
7236 * aclocal.m4, config.in, configure, Makefile.in: regenerated.
7240 * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT
7241 and R_M32R_GNU_VTENTRY.
7242 (elf_backend_can_gc_sections): Define.
7243 (m32r_elf_check_relocs): New.
7244 (m32r_elf_gc_mark_hook): New.
7245 (m32r_elf_gc_sweep_hook): New.
7246 (m32r_elf_relocate_section): Handle VT relocs.
7250 * coff-arm.c (arm_relocate_section): Remove redundant test.
7252 * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
7253 cleat that the 'bitsize' field is the size of the bitfield AFTER
7254 relocation not before.
7256 * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
7258 * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
7263 * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
7264 R_SPARC_GNU_VTENTRY.
7265 (elf32_sparc_check_relocs): Handle them.
7266 (elf32_sparc_reloc_type_lookup): Likewise.
7267 (elf32_sparc_relocate_section): Likewise.
7268 (elf32_sparc_gc_mark_hook): New.
7269 (elf32_sparc_gc_sweep_hook): New.
7273 * som.c (som_finish_writing): Perform some sanity checks when
7274 writing an executable or shared library.
7278 * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line.
7279 * configure.in (elf): Add dwarf1.lo.
7280 * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
7281 * elf.c (_bfd_elf_find_nearest_line): Add call to
7282 _bfd_dwarf1_find_nearest_line.
7283 * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
7284 Add call to _bfd_dwarf1_find_nearest_line.
7285 * configure: Rebuilt.
7289 * elflink.h (elf_gc_sections): Do not allow garbage
7290 collection if dynamic sections have been created.
7294 * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
7296 (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs.
7297 (v850_elf_perform_relocation): Likewise.
7298 (v850_elf_final_link_relocate): Likewise.
7299 (v850_elf_relocate_section): Likewise.
7300 (v850_elf_gc_sweep_hook): New routine.
7301 (v850_elf_gc_mark_hook): New routine.
7302 (elf_backend_can_gc_sections): Define.
7306 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
7311 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
7312 Declare size as bfd_size_type.
7313 (rs6000coff_get_section_contents): Declare count as bfd_size_type.
7317 * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
7319 * som.c (CPU_PA_RISC2_0): Define.
7320 (_PA_RISC2_0_ID): Likewise.
7321 (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
7325 * elflink.h (elf_link_add_object_symbols): When a versioned symbol
7326 has a base which is already defined, only add the referenced
7327 symbol to the dynamic symbol table if it is defined or referenced
7330 * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
7335 * elflink.h (elf_link_add_object_symbols): Undo last change.
7339 * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
7340 symbol for the indirect alias to a versioned symbol.
7344 * elf32-i386.c (elf32_i386_vtinherit_howto): New.
7345 (elf32_i386_vtentry_howto): New.
7346 (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto
7347 or elf32_i386_vtinherit_howto on lookup.
7351 * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum
7352 reloc_type. Rename R_68K__max to R_68K_max.
7353 (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
7358 * libbfd.c (bfd_getb32): Rewrite expression to get better code.
7359 (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7361 * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
7366 * elflink.h (elf_link_add_object_symbols): Ensure that the warning
7367 message has a null byte terminator.
7371 * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
7372 word subject to R_V850_32 relocation.
7376 * dwarf2.c: Add comment describing problem computing line numbers
7377 for undefined symbols at link time.
7381 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
7382 transform a defweak into a plt entry.
7383 (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
7384 plt entry references to receive a RELATIVE reloc.
7385 (elf64_alpha_finish_dynamic_symbol): Fill them in.
7386 (elf64_alpha_relocate_section): Assert we don't overrun
7387 the allocated relocation space.
7391 * elf.c (swap_out_syms): Always treat section symbols as
7392 special, even if they are attached to a common section.
7396 * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
7397 sections with v850 common section attributes into named v850
7399 (v850_elf_add_symbol_hook): Move symbols in sections with v850
7400 common section attributes into named v850 common sections.
7404 * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print
7409 * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
7410 part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16
7411 reloc to the wrong section a warning, not an error. .dynsbss
7412 is not an output section, so there is no need to check for it.
7416 * elf-bfd.h: Add argument to elf_backend_get_symbol_type.
7420 * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type.
7421 * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and
7423 (elf32_arm_gc_mark_hook): New.
7424 (elf32_arm_gc_sweep_hook): New.
7425 (elf32_arm_check_relocs): New.
7426 (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY
7428 (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
7433 * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
7434 assume there is no PLT or GOT.
7438 * elf32-arm.c (elf32_arm_find_nearest_line): New function: just
7439 like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
7440 also accepted as a function symbol type.
7444 * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only.
7448 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
7449 match definition of _bfd_gc_sections field.
7450 * libbfd.h: Rebuild.
7454 * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
7455 the addend of a dynamic relocation referencing a section.
7456 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7457 (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
7461 * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
7462 bed has a size_dynamic_sections routine before trying to use it.
7466 * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
7467 _bfd_elf_rel_vtable_reloc_fn.
7471 * Makefile.am: Add elf32-arm.c.
7472 * Makefile.in: Rebuild.
7473 * elf-bfd.h: Add elf_backend_get_symbol_type.
7474 * elf.c (swap_out_syms): If defined, call
7475 elf_backend_get_symbol_type.
7476 * elf32-arm.c: Define elf_backend_get_symbol_type.
7477 (elf32_arm_get_symbol-type): New routine.
7478 (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC.
7479 (bfd_elf32_arm_process_before_allocation): Change to
7480 check for STT_ARM_TFUNC.
7481 (elf32_arm_final_link_relocate): Likewise.
7482 * elfxx-target.h: Add elf_backend_get_symbol_type.
7486 * archures.c (bfd_mach_alpha_ev[456]): New.
7487 * cpu-alpha.c: Rework to match these types.
7488 * bfd-in2.h: Rebuild.
7492 * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
7493 * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
7495 * elf32-i386.c (elf_howto_table): Add vtable relocs.
7496 (elf_i386_reloc_type_lookup): Recognize them.
7497 (elf_i386_check_relocs): Pass them off to generic code.
7498 (elf_i386_relocate_section): Ignore them.
7499 (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
7500 (elf_backend_can_gc_sections): True.
7504 * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
7505 before looking at owner field.
7506 (elf32_arm_to_thumb_stub): Ditto.
7507 (elf32_arm_relocate_section): Compute name before calling
7508 elf32_arm_final_link_relocate().
7512 * elf.c: comment and formatting cleanups.
7517 * elfcode.h (elf_object_p): Reject files of header type ET_CORE
7518 (core files are treated differently than object files).
7519 * elf-bfd.h (_bfd_elf_write_corefile_contents,
7520 bfd_elf_mkcorefile): declare.
7521 * elfxx-target.h (_bfd_elf_write_corefile_contents,
7522 bfd_elf_mkcorefile): add to bfd_target vector.
7523 * elfcore.h (elf_core_file_p): save the program header table,
7524 and set the bfd architecture from the elf file header.
7525 * elf.c (bfd_elf_mkcorefile): new function.
7526 (_bfd_elf_write_corefile_contents): new function.
7527 (assign_file_positions_for_segments): add cases for handling
7528 PT_NOTE segments. (assign_file_positions_except_relocs):
7529 core files should be handled the same as exec files.
7530 (prep_headers): identify core files as type ET_CORE.
7531 (copy_private_bfd_data): identify the sections belonging to
7532 the PT_NOTE segment.
7534 * elf32-sparc.c (elf32_sparc_final_write_processing):
7535 add break statement to default case.
7539 * elf32-ppc.c (ppc_elf_relocate_section): Check that output
7540 section (not input) will be in sections ".sbss", ".sbss2",
7541 ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
7542 R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore
7543 output_offset for correct evaluation of addend.
7547 * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
7548 elf32_arm_allocate_interworking_sections and
7549 elf32_arm_process_before_allocation.
7553 * bfd-in.h: Ammend prototype for
7554 elf32_arm_process_before_allocation to remove surplus third
7557 * bfd-in2.h: Regenerate.
7561 * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
7565 * aoutx.h (aout_link_input_section_ext): Use the relocation already
7566 calculated for RELOC_SPARC_REV32 case.
7570 * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking,
7571 elf32_arm_allocate_interworking_sections and
7572 elf32_arm_process_before_allocation.
7573 * bfd-in2.h: Regenerated.
7574 * elf32-arm.c Define elf32_arm_link_hash_table.
7575 (insert_thumb_branch): New routine.
7576 (find_thumb_glue): New routine.
7577 (find_arm_glue): New routine.
7578 (record_arm_to_thumb_glue): New routine.
7579 (record_thumb_to_arm_glue): New routine.
7580 (elf32_arm_link_hash_table_create): New routine.
7581 (elf32_arm_get_bfd_for_interworking): New routine.
7582 (elf32_arm_allocate_interworking_sections) New routine.
7583 (elf32_arm_process_before_allocation) New routine.
7584 (elf32_thumb_to_arm_stub): New routine.
7585 (elf32_arm_to_thumb_stub): New routine.
7586 (elf32_print_private_bfd_data): Fix typo.
7587 (elf32_arm_final_link_relocate): Add argument sym_sec.
7588 Check for branches to thumb symbols in case R_ARM_PC24.
7589 Check for branches to arm symbols in case R_ARM_THM_PC22.
7590 (elf32_arm_relocate_section): Pass symbol section to
7591 elf32_arm_final_link_relocate.
7595 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
7596 entries unless the symbol is defined in the executable; in
7597 particular, undefined weak symbols get a PLT entry.
7601 * libaout.h: Remove nested comment to avoid warning.
7605 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
7606 R_ARM_PC24 relocation.
7610 * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
7611 argument is_local. Add argument sym_flags. Check sym_flags
7612 in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
7613 (elf32_arm_relocate_section): Don't pass local sym and pass
7614 sym_flags to elf32_arm_final_link_relocate.
7618 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
7619 to not count too few relocs for dynamicly linked executables.
7623 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
7624 symbols without a dynamic index dynamic. Consider all weak
7626 (elf64_alpha_strip_section_from_output): Don't assume 1-1
7627 correspondance between input and output sections.
7631 * elflink.h (elf_gc_common_finalize_got_offsets): For backends
7632 that use a .got.plt section start the got offset at zero.
7636 * ieee.c (ieee_write_processor): Correct the processor ID written
7637 out for bfd_arch_m68k, accommodating change of March 25.
7641 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
7642 R_ARM_THM_RPC22 relocations.
7646 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
7648 (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
7649 .got relocs in -Bsymbolic shared objects.
7653 * elf32-arm.c: Add private flags to ELF header.
7654 (elf32_arm_print_private_bfd_data): New Function.
7655 (elf32_arm_set_private_flags): New Function.
7656 (elf32_arm_copy_private_flags): New Function.
7657 (elf32_arm_merge_private_bfd_data): New Function.
7661 * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
7663 (elf32_sparc_relocate_section): Likewise.
7667 * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the
7668 .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
7669 (ppc_elf_relocate_section): Pull sgot and splt search to the start
7670 of the function. Recognize no .plt as static linking.
7674 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
7675 ".liblist" string through gettext.
7679 * Makefile.am: Add support for elf32-arm.lo.
7680 * Makefile.in: Rebuild.
7681 * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
7682 (thumb-*-elf): Define targ_defvec and targ_selvecs.
7683 * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
7684 * configure: Regenerate.
7685 * elf.c: (prep_headers): Support arch_type of EM_ARM.
7686 * targets.c: Support new targets bfd_elf32_bigarm_vec and
7687 bfd_target bfd_elf32_littlearm_vec.
7688 * elf32-arm.c: New file.
7692 * libaout.h (M_SPARCLITE_LE): New machine.
7693 * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
7694 * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
7695 (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
7696 * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
7697 (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
7698 (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
7699 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7700 elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
7701 * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
7702 be BFD_RELOC_SPARC_REV32.
7704 * config.bfd (sparc86x-*-aout): New
7708 * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
7709 actually mapping the output sections.
7714 * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
7715 (mn10300_elf_reloc_map): Similarly.
7716 (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
7720 * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
7722 (bfd_elf32_bfd_reloc_type_lookup): Add default case.
7723 * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
7724 elf_mips_reloc_type defined in elf/mips.h.
7728 * elf64-mips.c: Remove reloc_type definition completely. It's now
7733 * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
7734 as they are defined in elf/mips.h now.
7739 * Re-add lost change:
7740 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
7742 (mn10300_elf_relax_section): Include stack space for register saves
7743 in the imm8 field of a "call" instruction.
7744 (compute_function_info): Determine how much stack is allocated by
7745 the movm instruction. Fix typo.
7746 (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
7750 * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
7751 * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
7755 * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
7759 * elf32-hppa.h: Let ELF header define the enum containing the
7760 external reloc numbers.
7761 * elf32-i386.h: Likewise.
7765 * elf-m10300.c: Let ELF header now define the macros to get the enum.
7766 * elf32-mips.c: Likewise.
7767 * elf32-ppc.c: Likewise.
7771 * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
7772 bfd_coff_set_symbol_class(), in order to avoid K&R compatability
7774 * bfd-in.h: Regenerate.
7775 * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
7776 parameter to 'unsigned int' to avoid K&R compatability problems.
7780 * ieee.c (ieee_find_nearest_line): Change filename_ptr and
7781 functionname_ptr to be const. Change line_ptr to be unsigned.
7783 * coffcode.h (coff_link_output_has_begun): Simplify handling when
7784 macro is not defined. Change second parameter from bfd_link_info
7785 to coff_final_link_info. Add prototype.
7786 (coff_final_link_postscript): Simplify handling when macro is not
7787 defined. Add prototype.
7791 * elf-mn10300.c: Before include system specific ELF header define
7792 START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
7793 * elf32-mips.c: Likewise.
7794 * elf32-ppc.c: Likewise.
7798 * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
7799 temporary patch over to elf64-mips.c as well.
7803 * elf32-mips.c (reloc_type): Temporarily disable definition of
7804 standard relocation since they are now defined in elf/mips.h.
7808 * elf-m10200.c (mn10200_elf_final_link_relocate):
7809 Modify range test for case R_MN10200_8.
7811 * elf-m10300.c (mn10300_elf_final_link_relocate):
7812 Modify range test for case R_MN10300_8.
7816 * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
7817 * elf32-i386.c (elf_backend_got_header_size): Define.
7818 (elf_backend_plt_header_size): Define.
7819 * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
7820 * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
7821 * elfxx-target.h: Provide a default of zero.
7822 * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
7823 * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
7825 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
7826 entry from an executable, even if the plt refcount goes to 0.
7830 * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
7831 directory name at the line number.
7833 * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
7834 with an unspecified type.
7838 * sunos.c: Add undef of valid to avoid problem on SunOS.
7842 * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
7846 * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
7847 R_68K_PCxx and R_68K_xx relocations. Make sure that
7848 ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
7849 (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
7850 R_68K_xx relocations.
7851 (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
7852 that has no plt entry.
7853 (elf_m68k_relocate_section): Ignore the plt offset in a static
7855 * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
7857 (elf_gc_common_finalize_got_offsets): Set the got offsets also in
7860 * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
7862 (howto_table, reloc_map): Add entries for them.
7863 (elf_m68k_check_relocs): Handle them. Implement reference
7864 counting for got and plt entries.
7865 (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
7866 (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
7868 (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
7869 (elf_m68k_relocate_section): Handle the new reloc types.
7870 (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
7871 elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
7872 * elflink.h (elf_link_add_object_symbols): When creating an
7873 indirect reference for symbol versioning also copy the plt
7875 (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
7876 flag also reset the plt offset.
7877 (elf_link_assign_sym_version): Likewise.
7878 (elf_gc_common_finalize_got_offsets): Increment the got offset by
7879 the size of the entry in bytes.
7880 (elf_gc_allocate_got_offsets): Likewise.
7884 * elflink.h (elf_gc_sections): Return true rather than falling off
7887 * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
7892 * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
7893 comment describing when it should be enabled.
7894 Changed definition of USER_LABEL_PREFIX to "", to fall into line
7899 * ieee.c (ieee_slurp_external_symbols): Handle call optimization
7900 information ATN records.
7904 * ieee.c (ieee_slurp_external_symbols): Select an appropriate
7905 section for an absolute symbol in a fully linked file. Based on
7910 * coff-m88k.c (m88k_special_reloc): Don't lose the information
7911 that a symbol is undefined.
7915 * som.c (som_bfd_gc_sections): Define.
7919 * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
7920 overflows in ARM_26D patches, since they have already been
7925 * coffcode.h (coff_write_object_contents): If we have any long
7926 section names, call coff_write_symbols even if there are no
7931 * elf.c (copy_private_bfd_data): Only set phdr_included once for a
7932 PT_LOAD segment, rather than only setting it once for the entire
7935 * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
7936 rather than ignoring every phdr with a p_paddr of 0, ignore all
7937 the phdrs if they all have a p_paddr of 0.
7939 * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
7940 section was discarded from the link.
7944 * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
7948 * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
7949 floating point operations.
7953 * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
7958 Merge of vax/vms (read-only) support
7959 * configure.com: Support Vax target.
7960 * makefile.vms: Support Vax target.
7961 * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
7962 * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
7964 * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
7966 * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
7968 * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
7970 * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
7972 * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
7973 * targets.c (bfd_target_ovax_flavour): New flavour.
7974 (vms_alpha_vec): Renamed from evax_alpha_vec.
7976 (target_vector): Update accordingly.
7977 * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
7979 (vax*-*-*vms*): New target.
7980 * Makefile.am: Update for renamed files. Rebuild dependencies.
7981 * bfd-in2.h: Rebuild.
7982 * configure.in, Makefile.in, aclocal.m4: Rebuild.
7987 * linker.c (_bfd_generic_final_link): Force a trailing NULL
7988 pointer on abfd->outsymbols.
7989 (generic_add_output_symbol): Handle NULL sym parameter.
7993 * elf.c (copy_private_bfd_data): Add support for changing VMA or
7998 * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
7999 when handling 32 bit immediate relocs.
8000 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8004 * section.c (STD_SECTION): Account for recently added gc_mark
8005 field in struct asection.
8007 * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
8008 (bfd_elf32_bfd_merge_private_bfd_data): Define.
8012 ELF Section-level Garbage Collection:
8013 * bfd.c (bfd_gc_sections): New.
8014 * aout-adobe.c: Hook to default implementation.
8015 * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
8016 * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
8017 * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
8018 * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
8019 * tekhex.c, versados.c: Likewise.
8020 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
8021 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
8023 * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
8024 (bfd_generic_gc_sections): New.
8025 * section.c (SEC_KEEP): New.
8026 (asection): Add gc_mark member.
8028 * elfcode.h (elf_gc*): New name remappings.
8029 * elflink.h (elf_link_input_bfd): Don't set contents on stabs
8030 sections to be excluded.
8031 (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
8032 (elf_gc_propogate_vtable_entries_used): New.
8033 (elf_gc_smash_unused_vtentry_relocs): New.
8034 (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
8035 (elf_gc_common_finalize_got_offsets): New.
8036 (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
8037 * elfxx-target.h: Add and default gc hooks.
8039 * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
8041 (struct elf_obj_tdata): Likewise for local_got_offsets.
8042 * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
8043 * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
8044 * elf64-sparc.c, elflink.h: Likewise.
8046 * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
8047 (ELF_LINK_HASH_MARK): Define.
8048 (struct elf_backend_data): Add GC hooks.
8049 * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
8051 * elf-m10300.c (mn10300_elf_check_relocs): New.
8052 (mn10300_elf_gc_mark_hook): New.
8053 (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
8054 (elf_mn10300_howto, mn10300_reloc_map): Handle them.
8055 (mn10300_elf_final_link_relocate): Likewise.
8056 (mn10300_elf_relocate_section): Likewise.
8057 (elf_backend_can_gc_sections): Define.
8058 * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
8059 (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
8060 (bfd_elf32_bfd_reloc_type_lookup): Handle them.
8061 (mips_info_to_howto_rel): Likewise.
8062 (mips_elf_relocate_section): Likewise.
8063 (mips_elf_check_relocs): Likewise.
8064 (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
8065 (elf_backend_can_gc_sections): Define.
8066 * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
8067 (ppc_elf_howto_raw): Handle them.
8068 (ppc_elf_reloc_type_lookup): Likewise.
8069 (ppc_elf_relocate_section): Likewise.
8070 (ppc_elf_check_relocs): Reference count .got and .plt entries.
8071 Handle new vtable relocs.
8072 (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
8073 (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
8074 (elf_backend_can_gc_sections): Define.
8078 * archures.c (bfd_mach_mn10300): Define.
8079 * elf-m10300.c: Include elf/mn10300.h
8080 (elf_mn10300_mach): New function.
8081 (_bfd_mn10300_elf_final_write_processing): Likewise.
8082 (_bfd_mn10300_elf_object_p): Likewise.
8083 (elf_backendfinal_write_processing): Define.
8084 (elf_backend_object_p): Likewise.
8088 * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
8093 * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
8094 link_next field, not the next field.
8098 * elf.c (map_sections_to_segments): Check the section address
8099 against the phdr size both with and without a modulo of
8104 * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
8105 linker created empty input section if the output section has the
8108 * elflink.h (elf_link_output_extsym): Print an error message if
8109 _bfd_elf_section_from_bfd_section fails.
8111 * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
8116 * elf.c (copy_private_bfd_data): Improve handling of Solaris
8117 native linker output. Avoid putting an empty section in more than
8122 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
8123 ($(PACKAGE).pot): Unconditionally depend on POTFILES.
8127 * elf.c (swap_out_syms): New arg relocatable_p.
8128 Don't add section VMA to symbols for relocatable output.
8129 (_bfd_elf_compute_section_file_positions): Update call to
8134 * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
8135 against 'addend' be signed rather than unsigned.
8139 * elf32-m32r.c: Add prototyps for static functions.
8141 * coff-arm.c: Add prototypes for static functions.
8145 * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
8146 LMA is used to order sections in a segment.
8148 * elf32-v850.c: Add prototypes for static functions.
8149 Change type of addend parameter to bfd_vma in various functions.
8153 * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
8154 complain_overflow_signed instead of complain_overflow_bitfield.
8158 * elf.c (elf_map_symbols): Don't add section VMA to symbol value
8159 when comparing against 0.
8163 * Makefile.am (config.status): New target.
8164 * Makefile.in: Rebuild.
8168 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
8169 error if previous object endianness doesn't match current object.
8173 * elf32-v850.c (v850_elf_print_private_bfd_data): Call
8174 _bfd_elf_print_private)bfd_data ().
8178 * elflink.h (elf_merge_symbol): Don't always set type_change_ok
8180 (elf_link_add_object_symbols): Set type_change_ok and
8181 size_change_ok before calling elf_merge_symbol.
8183 * elf32-mips.c (mips_elf_relocate_section): If we issue an
8184 undefined symbol error, don't also issue an overflow error.
8188 * elf32-ppc.c (ppc_elf_relocate_section): The target of an
8189 R_PPC_LOCAL24PC relocation should be local; if not, print an error
8190 message instead of crashing.
8194 * archures.c (bfd_mach_cpu32): Define.
8195 (bfd_default_scan): Add case for 68060. Fix 68332 case to use
8197 * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
8198 * ieee.c: Include <ctype.h>.
8199 (ieee_object_p): Parse out process ID string to make it more
8200 likely to be acceptable for bfd_scan_arch.
8201 * bfd-in2.h: Rebuild.
8205 * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
8206 _bfd_elf_print_private_bfd_data() so that the program header will
8211 * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
8212 0x68. Reindent. Add some comments.
8216 * elf.c (copy_private_bfd_data): Adjust physical address of
8217 segment in output BFD to contain LMAs of its sections.
8221 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
8222 elf32_sparc_relocate_section): Added R_SPARC_32LE for little
8223 endian data 32 bit relocations.
8224 (elf32_sparc_merge_private_bfd_data): Check if linking little
8225 endian objects with big endian objects.
8226 (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
8227 (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
8228 * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
8230 * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
8231 * archures.c (bfd_mach_sparc_sparclite_le): New.
8232 * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
8236 * peicode.h (add_data_entry): Fix precedence of operators in if ()
8241 * bfd-in.h: Move over patch to bfd-in2.h.
8243 * reloc.c (bfd_check_overflow): Add casts before shifts which may
8245 (_bfd_relocate_contents): Likewise.
8249 * peicode.h (add_data_entry): If the section has no private data
8250 then do not create a Data Dictionary entry for it.
8254 * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
8255 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
8256 elf64_alpha_size_got_sections): Rewrite, handling multiple got
8257 subsections during relaxation more correctly.
8261 * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
8262 Add extra argument to bfd_arm_process_before_allocation ().
8263 * bfd-in.h: Reflect changes made in bfd-in2.h.
8264 * coffgen.c (bfd_coff_set_symbol_class): New function. Set the
8265 coff class of a BFD symbol.
8266 * coff-arm.c: Add support for interworking between Thumb code and
8267 non-interworking aware ARM code.
8271 * po/Make-in (install-info): New target.
8275 * filemode.c: Remove; not used.
8277 If sysdep.h includes a header file, don't include it again:
8278 * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
8280 * aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
8282 * archive.c: Don't include <string.h> or <errno.h>.
8283 * evax-alpha.c; Don't include <stdio.h>.
8284 * evax-egsd.c: Likewise.
8285 * evax-etir.c: Likewise.
8286 * evax-misc.c: Likewise.
8287 * evax-emh.c: Likewise. Also, don't include <sys/types.h>.
8288 * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
8290 * hpux-core.c: Likewise.
8291 * netbsd-core.c: Likewise.
8293 * libbfd.c: Don't include <sys/types.h>.
8294 * nlmcode.h: Don't include <string.h>.
8295 * osf-core.c: Don't include <string.h> or <stdio.h>.
8296 * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
8297 <errno.h>, or <unistd.h>.
8298 * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
8302 * configure.com: If the version number can not be found in
8303 configure.in, set it to "unknown" rather than "2.8.1".
8307 * elf32-mips.c (elf_mips_mach): New.
8308 (_bfd_mips_elf_object_p): Use elf_mips_mach.
8309 (_bfd_mips_elf_final_write_processing): Use the names
8310 of machines, rather than the numbers. Set both the ARCH
8311 and MACH in e_flags. Handle a few more specific machines.
8312 (_bfd_mips_elf_merge_private_bfd_data): Merge both
8313 EF_MIPS_ARCH and EF_MIPS_MACH.
8317 * syms.c (bfd_is_local_label): Revert last change.
8318 * srec.c (srec_write_symbols): Discard debugging symbols.
8322 * som.c: Include <ctype.h>.
8323 * som.h: Don't include sysdep.h.
8327 * libbfd.h: Rebuilt.
8328 * libbfd-in.h: Removed gettext includes and defines.
8329 * sysdep.h: Moved gettext-related includes and defines here.
8333 * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
8334 an ad-hoc test. Kill bogus #if 0 code.
8335 * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
8339 * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
8340 when generating a normal executable for a symbol defined in a
8341 regular file. When copying a reloc into the output file, adjust
8342 the addend for a PC relative reloc against a global symbol.
8346 * libbfd.h: Rebuilt.
8347 * libbfd-in.h (_): Define as dgettext.
8351 * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
8353 * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
8354 when declaring parameter types.
8355 (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
8359 * config.bfd: If we include any ELF targets in targ_defvec and/or
8360 targ_selvecs, then add the generic ELF targets to targ_selvecs.
8361 * elf32-gen.c (dummy): New static const variable.
8362 (elf_generic_info_to_howto): New static function.
8363 (elf_generic_info_to_howto_rel): New static function.
8364 (elf_info_to_howto): Define as elf_generic_info_to_howto.
8365 (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
8366 * elf64-gen.c: Same changes as elf32-gen.c.
8367 * elfcode.h (elf_object_p): For the generic target, ignore a
8368 failure of bfd_default_set_arch_mach. Fix indentation a bit.
8372 * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
8373 * configure: Rebuild.
8377 * config.bfd: Update OSR5/Unixware patterns.
8381 * elf.c (assign_file_positions_for_segments): Allow for holes
8382 between sections added by a link script.
8386 * configure.in: Change version number to 2.9.4
8387 * configure: Rebuild.
8390 * elf.c (bfd_elf_get_bfd_needed_list): New function.
8391 * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
8392 * bfd-in2.h: Rebuild.
8396 * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
8401 * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
8402 (elf64_alpha_relax_section): Fill them in.
8403 (elf64_alpha_relax_opt_call): Implement more than a stub.
8404 (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
8405 alignment on .scommon.
8406 (elf64_alpha_merge_gots): Merge use counts as well.
8410 * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
8411 for calculating a local symbol's address.
8412 (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
8413 Set the .got's cooked size as well as the raw size.
8417 * elf32-v850.c (v850_elf_print_private_bfd_data): Add
8418 internationalisation of printed information.
8420 * coff-arm.c (coff_arm_print_private_bfd_data): Add
8421 internationalisation of printed information.
8425 * syms.c (struct indexentry): Change directory_name, file_name,
8426 and function_name fields to char *.
8427 (struct stab_find_info): Change cached_file_name field to char *.
8431 * peicode.h (dir_names): Add missing N_() macros to dir_names array.
8435 * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
8439 * Makefile.am (install-data-local): Make $(includedir).
8440 * Makefile.in: Rebuild.
8444 * libbfd-in.h: Use `gettext' and not `dgettext' for now.
8448 * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
8449 * Makefile.in: Rebuild.
8451 * bfd-in2.h: Rebuild for Nick's changes.
8455 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
8456 change wrt length == max_namelen.
8460 * Many files: Added gettext invocations around user-visible
8462 * libbfd-in.h: Added gettext includes and defines.
8463 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
8464 HAVE_LC_MESSAGES): Define.
8465 * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
8467 * Makefile.am (SUBDIRS): Added po.
8468 (POTFILES): New macro.
8469 (po/POTFILES.in): New target.
8470 (SOURCE_HFILES): New macro.
8472 * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
8476 * elfcore.h (bfd_prstatus): Copy core_prstatus from the first
8477 NT_PRSTATUS note section encountered, it contains the status of
8478 the currently executing thread when the core file was written.
8482 * libcoff.h: Add extra parameter to
8483 bfd_coff_link_output_has_begun overrideable function.
8484 * cofflink.c: Pass extra parameter to
8485 bfd_coff_link_output_has_begun function.
8486 * bfd-in.h: Add prototypes for exported ARM interworking
8488 * peicode.h: ARM specific code reorganised to conform to BFD
8490 * coffcode.h: ARM specific code reorganised to conform to BFD
8492 * coff-arm.c: Code reorganised to conform to the BFD coding
8493 conventions. Global variables have been moved into an ARM
8494 specific hash table structure and a new function:
8495 bfd_arm_get_bfd_for_interworking() has been created which is
8496 called from the linker scripts.
8500 * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
8502 * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
8503 elf64_alpha_relax_find_reloc_ofs. Changed all callers.
8504 (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
8505 (elf64_alpha_size_got_sections): Don't merge .got sections twice.
8509 * config.bfd: Added sparc86x support.
8513 * elf32-mips.c (mips_elf_relocate_section): Do not complain about
8514 an out of range pc-relative jump/call to an undefined weak symbol.
8518 * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
8523 * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
8524 an error other than bfd_error_system_call, set the error to
8525 bfd_error_wrong_format.
8527 * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
8528 bfd_elf32_powerpcle_vec.
8530 * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
8531 program segments are zero, don't set p_paddr_valid.
8535 * elf64-alpha.c: Initial implementation of relaxation --
8536 (struct alpha_elf_link_hash_entry): Add use_count member.
8537 (elf64_alpha_check_relocs): Initialize and increment it.
8538 (elf64_alpha_can_merge_gots): Check it when considering merging.
8539 (elf64_alpha_merge_gots): Drop entries with zero use.
8540 (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8541 (elf64_alpha_always_size_sections): Split out got sizing ...
8542 (elf64_alpha_size_got_sections): ... here. New function.
8543 (elf64_alpha_relax_find_reloc_ofs): New function.
8544 (elf64_alpha_relax_with_lituse): Likewise.
8545 (elf64_alpha_relax_without_lituse): Likewise.
8546 (elf64_alpha_relax_opt_call): Likewise.
8547 (elf64_alpha_relax_section): Likewise.
8548 (elf64_alpha_add_symbol_hook): Likewise.
8549 (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
8550 (elf64_alpha_relocate_section): Likewise.
8551 (bfd_elf64_bfd_relax_section): Define.
8552 (elf_backend_add_symbol_hook): Likewise.
8556 * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
8557 * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
8558 (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64.
8562 * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
8563 * configure: Rebuild.
8567 * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
8568 (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
8569 * configure.in: Define and substitute WIN32LDFLAGS and
8571 * aclocal.m4: Rebuild with new libtool.
8572 * configure, Makefile.in: Rebuild.
8576 * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
8577 before any other symbols in the same section.
8581 * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
8586 * dwarf2.c (comp_unit): Move it earlier in the source. Add
8588 (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
8589 Use addr_size for address size, rather than sizeof(bfd_vma).
8590 (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
8591 Fix call to read_address.
8592 (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
8593 Scrap other unneeded arguments. Fix call to read_address.
8594 (scan_unit_for_functions): Fix call to read_attribute.
8595 (parse_comp_unit): We now handle more values for addr_size.
8596 Set addr_size in unit. Fix call to read_attribute and
8601 * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
8605 * archures.c (bfd_default_scan): Add m68k cases back to default
8606 switch, reverting patch of March 25, since IEEE support depends
8611 * Makefile.am (diststuff): New target.
8612 * Makefile.in: Rebuild.
8616 * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
8617 som_offset when we have an extended name table.
8621 * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
8623 * Makefile.in: Rebuild.
8627 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
8628 symbols when creating a shared library.
8629 (elf_m68k_adjust_dynindx): New function, used by above code.
8630 (elf_m68k_finish_dynamic_sections): Initialize the section
8632 (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
8636 * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
8641 * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
8646 * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
8651 * configure.in: Set version to 2.9.1.
8652 * configure: Rebuild.
8654 * Branched binutils 2.9.
8658 * syms.c (ENABLE_CACHING): Define.
8659 (struct indexentry): Define.
8660 (struct stab_cache): Remove.
8661 (cmpindexentry): New static function.
8662 (struct stab_find_info): Add new fields: indextable,
8663 indextablesize, cached_indexentry, cached_offset, cached_stab, and
8664 cached_file_name. Remove fields: file_cache, function_cache, and
8666 (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
8667 index table and search it.
8671 * elf.c (_bfd_elf_copy_private_section_data): Call
8672 copy_private_bfd_data once we've seen the last SEC_ALLOC section.
8674 * cpu-mips.c: Remove trailing comma at end of enumeration list.
8678 * coff-arm.c: Define all globally visible variables and functions
8679 only when COFF_WITH_PE is not defined.
8680 * configure.in (armpe_little_vec, armpe_big_vec): Add
8682 * configure: Rebuild.
8686 Fix some gcc -Wall warnings:
8687 * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
8688 * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
8689 * archures.c (bfd_default_scan): Likewise.
8690 * bfd.c (bfd_scan_vma): Likewise.
8691 * binary.c (mangle_name): Likewise
8692 * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
8693 * coff-sh.c (sh_relocate_section): Likewise.
8694 * coff-stgo32.c (create_go32_stub): Likewise.
8695 * coffcode.h (coff_slurp_line_table): Likewise.
8696 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
8697 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
8698 (assign_file_positions_for_segments): Likewise.
8699 * elf32-mips.c (mips_elf_relocate_section): Likewise.
8700 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
8701 * oasys.c (oasys_write_sections): Likewise.
8702 * ppcboot.c (ppcboot_object_p): Likewise.
8703 (mangle_name): Likewise.
8704 * riscix.c (riscix_fix_pcrel_26): Likewise.
8705 * srec.c (srec_scan): Likewise.
8706 * stabs.c (_bfd_write_section_stabs): Likewise.
8707 * sunos.c (sunos_add_dynamic_symbols): Likewise.
8708 * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
8709 switch. Declare parameters for function pointers.
8710 * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
8712 * elf.c (elf_sort_sections): Likewise.
8713 * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
8714 Add default cases to switches.
8715 (coff_arm_relocate_section): Remove unused local variables.
8717 (coff_arm_bfd_set_private_flags): Change flag variable to type
8719 * coff-mips.c (mips_relocate_section): Initialize use_lo.
8720 * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
8721 (dump_toc): Change cat to const, and initialize it.
8722 * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
8723 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8724 (sh_elf_relocate_section): Initialize r_symndx.
8725 * coffcode.h (coff_compute_section_file_positions): Only declare
8726 old_sofar if ALIGN_SECTIONS_IN_FILE.
8727 (coff_write_object_contents): Initialize csym.
8728 * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
8729 * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
8731 * dwarf2.c: Include libiberty.h.
8732 (read_2_signed_bytes, read_4_signed_bytes): Comment out.
8733 (decode_line_info): Remove unused local variables.
8734 * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
8735 (m32r_elf_relocate_section): Likewise.
8736 * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
8737 (v850_elf_reloc): Likewise.
8738 * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
8739 (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
8740 * elf.c (assign_file_positions_for_segments): Always set adjust.
8741 * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
8742 parenthesize expression.
8743 * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
8744 (m32r_elf_object_p): Return a value.
8745 (m32r_elf_print_private_bfd_data): Change fprintf format string.
8746 * elf32-mips.c (mips_elf_final_link): Initialize last.
8747 (mips_elf_finish_dynamic_sections): Initialize last and dindx.
8748 * elf32-v850.c (v850_elf_object_p): Return a value.
8749 (v850_elf_print_private_bfd_data): Change fprintf format string.
8750 * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
8752 * elflink.h (elf_link_add_object_symbols): Change vernum to
8753 unsigned int, and initialize it. Change fprintf format string.
8754 (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
8755 when setting or comparing to soname_indx.
8756 (elf_create_pointer_linker_section): Change num_symbols to
8758 * libcoff-in.h (coff_data_type): Change flags to flagword.
8759 * peicode.h (pe_print_idata): Initialize idx. Change j to
8760 bfd_size_type. Initialize hint_member. Remove useless test to
8762 (pe_print_edata): Change num_functions and num_names in struct
8763 EDT_type to unsigned long. Remove cast. Change fprintf format
8765 * ppcboot.c (ppcboot_object_p): Change i to size_t.
8766 * reloc.c (bfd_get_reloc_size): Change return type to unsigned
8768 * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
8769 int *. Update uses. Change j to long.
8770 * bfd-in2.h, libcoff.h: Rebuild.
8774 * elf32-v850.c Remove definition of USE_REL.
8775 (v850_elf_info_to_howto_rela): New function.
8776 (v850_elf_perform_relocation): Renamed from
8777 v850_elf_store_addend_in_insn. Removed replace argument.
8778 (v850_elf_reloc): store the relocation in the addend field instead
8780 (v850_elf_final_link_relocate): Now calls
8781 v850_elf_perform_relocation.
8782 (v850_elf_relocate_section): Remove code to generate REL
8787 * coffcode.h (coff_new_section_hook): Set the type and storage
8788 class in the native symbol information allocated for a new section
8793 * peicode.h: Chain together calls to
8794 coff_bfd_copy_private_bfd_data and
8795 coff_bfd_print_private_bfd_data.
8797 * coff-arm.c: Add prototypes for
8798 coff_arm_bfd_print_private_bfd_data and
8799 coff_arm_bfd_copy_private_bfd_data.
8803 * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
8806 * peicode.h: Call arm-coff private data functions after handling
8809 * coff-arm.c: Turn statics into globals so that they can be shared
8810 both pe and pei backends.
8814 * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
8816 (sunos_write_object_contents): Likewise.
8817 * aoutx.h (NAME(aout,machine_type)): Likewise.
8818 * coffcode.h (coff_set_arch_mach_hook): Likewise.
8822 * archures.c (bfd_mach_m68*): Add definitions for various m68k
8824 (bfd_default_scan): Remove m68k special cases.
8825 * bfd-in2.h: Rebuild.
8826 * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
8828 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
8829 * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
8831 (bfd_m68k_arch): Set mach field to zero to signal no explicit
8832 selection, change printable_name to just "m68k" and make that the
8833 default instead of m68k:68020.
8835 * aout-tic30.c (NAME): Define this to avoid multiple definitions
8837 (MY_get_section_contents): Define as aout_32_get_section_contents
8838 rather than NAME(aout,get_section_contents).
8840 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
8842 * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
8843 and call bfd_default_set_arch_mach to do the real work.
8847 * bout.c (BALX): Include return register g14 as part of the insn.
8849 (calljx_callback): Use it.
8853 * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
8854 * libbfd.h: Rebuild.
8856 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
8857 byte_count to unsigned int.
8858 (mn10300_elf_relax_section): Initialize internal_relocs. Remove
8859 unused local variables.
8861 * evax-alpha.c (evax_close_and_cleanup): Remove unused local
8862 variables er and er1.
8864 * cpu-v850.c: Include <ctype.h>.
8865 (scan): Case isdigit argument to unsigned char.
8868 * ihex.c (ihex_scan): Add extbase variable so that getting an
8869 extended linear address record does not ignore any previous
8871 (ihex_write_object_contents): When writing out an extended linear
8872 address record, zero out any previous extended address.
8876 * ieee.c (do_one): Check section before dereferencing it.
8877 (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
8878 (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
8882 * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
8886 * coff-arm.c: Add interworking functions to pe backends.
8890 * configure.in: Use AM_DISABLE_SHARED.
8891 * aclocal.m4, configure: Rebuild with libtool 1.2.
8895 * coff-arm.c (coff_arm_relocate_section): Better error messages
8896 when interowrking conflucts occur. Courtesy of Jonathan Walton
8898 (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
8899 relocations. Patch courtesy of Jonathan Walton and Tony
8904 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
8905 part of Feb 22 change controling when to override the existing
8906 symbol with the .plt entry.
8910 * config.bfd (targ_cpu): Add thumb-pe target.
8912 * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
8913 functions in PE build.
8917 * config.bfd (sparclite-*-elf*): Added.
8921 * configure.in: Add elf.lo to elf shell variable.
8922 * Makefile.am (BFD_LIBS): Remove elf.lo.
8923 (BFD_LIBS_CFILES): Remove elf.c.
8924 (BFD32_BACKENDS): Add elf.lo.
8925 (BFD32_BACKENDS_CFILES): Add elf.c.
8926 * configure, Makefile.in: Rebuild.
8930 * elf32-i386.c (elf_i386_relocate_section): A pc-relative
8931 relocation against a non-local symbol should not have a dynamic
8936 * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
8938 (pe_print_private_bfd_data): Print PE flags. From Mikey
8943 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
8944 a plt entry when we can determine that we authoritatively define
8949 * configure.in (COREFILE selection): Remove sparc-*-linux*. They
8950 don't actually use trad-core, but a SunOS-style core file handled
8952 * hosts/sparclinux.h: Remove.
8956 * peicode.h (pe_print_idata): If there is no .idata section, look
8957 for the import tables in some other section. Make the initial
8958 label line up better with the data. Print the import address
8959 table even if there is no import name table. If the import
8960 address table holds actual addresses, print them.
8964 * libbfd.c (bfd_seek): If fseek fails, save errno around call to
8965 bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
8966 bfd_error_system_call.
8970 * Makefile.am (AUTOMAKE_OPTIONS): Define.
8971 * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
8974 * Makefile.am (libbfd_la_LDFLAGS): Define.
8975 * Makefile.in: Rebuild.
8980 * netbsd.h (MACHTYPE_OK): Define.
8981 (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
8982 calling N_SET_MACHTYPE, rather than having a switch.
8983 * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
8985 * i386netbsd.c (MACHTYPE_OK): Don't define.
8986 (DEFAULT_MID): Define.
8987 * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
8988 (MACHTYPE_OK): Don't define.
8989 (DEFAULT_MID): Define.
8990 * m68knetbsd.c: (MACHTYPE_OK): Don't define.
8991 (DEFAULT_MID): Define.
8992 * ns32knetbsd.c (MACHTYPE_OK): Don't define.
8993 (DEFAULT_MID): Define.
8994 * sparcnetbsd.c (MACHTYPE_OK): Don't define.
8995 (DEFAULT_MID): Define.
8998 * vaxnetbsd.c: New file.
8999 * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
9000 rather than netbsd_core.
9001 * targets.c (vaxnetbsd_vec): Declare.
9002 (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
9003 defined, add netbsd_core_vec.
9004 * configure.in: Set COREFILE for alpha*-*-netbsd* and
9005 powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
9006 netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
9007 * config.bfd (alpha*-*-netbsd*): New target.
9008 * Makefile.am: Rebuild dependencies.
9009 (BFD32_BACKENDS): Add vaxnetbsd.lo.
9010 (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
9011 * configure, Makefile.in: Rebuild.
9013 * configure.host: Remove the old shared library build stuff. We
9014 now use libtool instead.
9018 * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
9022 * configure.in: Take stab-syms.lo out of sparclinux_vec list.
9023 * configure: Rebuild.
9026 * elf32-v850.c (remember_hi16s_reloc): New function.
9027 (find_remembered_hi16s_reloc): New function.
9028 (v850_elf_store_addend_in_insn): Use the above new functions to
9029 match up HI6S relocs with LO16 relocs.
9033 * configure.in: Change -linux* to -linux-gnu*.
9034 * config.bfd, configure.host: Likewise.
9035 * configure: Rebuild.
9039 * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
9040 LO16/HI16S bug and improve comments about what is going on.
9044 * configure, aclocal.m4: Rebuild with new libtool.
9048 * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
9049 when merging v850 code into v850e/v850ea code. Do not initialise
9050 output flags if the input is the default architecture.
9054 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
9055 get the size from bfd_arch_bits_per_address instead of directly
9060 * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
9061 to wrap, just return all 1's bits instead.
9062 * libbfd.h: Regenerate.
9066 * coff-i386.c (coff_pe_i386_relocate_section): New static function
9068 (coff_relocate_section): If COFF_WITH_PE, define as
9069 coff_pe_i386_relocate_section.
9070 * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
9071 skip empty sections, to match coff_write_object_contents.
9073 * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
9074 rather than swapping out r_offset twice. From Luke Deller
9079 * configure.in: Set libtool_enable_shared rather than
9080 libtool_shared. Remove diversion hack.
9081 * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
9086 * syms.c (struct stab_cache): Define.
9087 (struct stab_find_info): Remove cached_offset, cached_stab,
9088 cached_str, and cached_stroff fields. Add file_cache,
9089 function_cache, and line_cache fields.
9090 (_bfd_stab_section_find_nearest_line): Use extensive caching to
9095 * peicode.h (pe_print_idata): Check for import of ordinal rather
9097 (pe_print_edata): If there is no .edata section, look for the
9098 export data in some other section.
9102 * configure.in: Change version to 2.8.4.
9103 * configure: Regenerated.
9107 Add tms320c30 support:
9108 * cpu-tic30.c: New file.
9109 * aout-tic30.c: New file.
9110 * coff-tic30.c: New file.
9111 * archures.c (bfd_arch_tic30): Define.
9112 (bfd_tic30_arch): Declare.
9113 (bfd_archures_list): Add bfd_tic30_arch.
9114 * targets.c (bfd_target_vector): Add tic30_aout_vec and
9116 * reloc.c (BFD_RELOC_TIC30_LDP): Define.
9117 * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
9118 (coff_set_flags): Likewise.
9119 * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
9120 * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
9121 * Makefile.am: Rebuild dependencies.
9122 (ALL_MACHINES): Add cpu-tic30.lo.
9123 (ALL_MACHINES_CFILES): Add cpu-tic30.c.
9124 (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
9125 (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
9126 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
9130 * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
9131 to lag behind LO16 reloc by a couple of instructions.
9135 * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
9136 make to reexamine the file timestamp.
9137 ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
9139 * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
9144 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
9145 to create .dynsbss and .rela.sbss sections.
9146 (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
9147 copied from dynamic objects into .sbss.
9148 (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
9149 use it. Correct typo of .rela.sdata2.
9150 (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
9151 put the data, which may now be in .sbss.
9152 (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
9153 (elf_backend_create_dynamic_sections): Define as
9154 ppc_elf_create_dynamic_sections.
9156 * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
9157 against _GLOBAL_OFFSET_TABLE_.
9158 (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
9159 shared libraries which refer to local symbols. Make sure that the
9160 test for allocating space for a reloc in a shared object is the
9161 same as the test for emitting a reloc.
9165 * config.bfd (i[3456]-*-mingw32*): New target.
9166 * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
9167 * aclocal.m4, configure: Rebuild.
9171 * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
9176 Sparc v9 ABI compliant PLT:
9177 * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
9178 (plt_templates, sparc64_elf_build_plt_entry): Delete.
9179 (LARGE_PLT_THRESHOLD): New define.
9180 (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
9181 (sparc64_elf_build_plt): New function.
9182 (sparc64_elf_plt_entry_offset): Likewise.
9183 (sparc64_elf_plt_ptr_offset): Likewise.
9184 (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
9185 contain the index for convenience. Skip the initial entries
9187 (sparc64_elf_size_dynamic_sections): Zero the allocated contents
9188 memory for the benefit of .rela.plt.
9189 (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
9190 (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
9191 sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
9192 (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
9193 Call sparc64_elf_build_plt.
9194 (elf_backend_want_got_plt): No.
9195 (elf_backend_plt_readonly): No.
9196 (elf_backend_plt_alignment): 8.
9198 * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
9199 * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
9200 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
9205 * archures.c (bfd_mach_mips*): Add definitions for various MIPS
9207 * cpu-mips.c (arch_info_struct): Add mips variants.
9208 * bfd-in2.h: Rebuilt.
9212 * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
9217 * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
9218 (i[3456]86sco3.2v5*coff): New target.
9222 * bfd-in2.h: Rebuild with changes to chew--tab expansion.
9226 * bfd.c (bfd_get_error_handler): Add orthogonal function.
9227 * bfd-in2.h: Regenerate.
9231 * tekhex.c (tekhex_write_object_contents): Check for no symbols.
9235 * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
9236 adjust addend for an output common symbol (from Jimmy Blair
9238 defined symbol to counteract adjustment made in generic relocation
9241 * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
9245 * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
9246 (GET_SCNDHR_NLNNO): Likewise.
9250 * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
9254 * elf32-m32r.c: Add macros to handle NOP insertion.
9258 * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
9259 (xcoff_mark): Likewise.
9260 (xcoff_build_ldsyms): Mark absolute symbols.
9264 * bout.c (b_out_write_object_contents): Sort symbols before output
9265 to keep {CALL,BAL}NAME symbols adjacent.
9266 (b_out_symbol_cmp): New function.
9268 For older changes see ChangeLog-9697
9274 version-control: never