3 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4 rs6000coff_core_file_matches_executable_p,
5 rs6000coff_core_file_failing_command and
6 rs6000coff_core_file_failing_signal only if AIX_CORE is
8 (pmac_xcoff_vec): Likewise.
9 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
13 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
14 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
18 * bfd-in2.h: Regenerated.
19 * libcoff.h: Likewise.
23 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
24 undefined millicode syms in shared libs.
25 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
26 (elf32_hppa_check_relocs): Likewise.
27 (elf32_hppa_adjust_dynamic_symbol): Likewise.
28 (elf32_hppa_size_dynamic_sections): Likewise.
29 (elf32_hppa_relocate_section): Likewise.
30 (elf32_hppa_finish_dynamic_symbol): Likewise.
31 (elf32_hppa_finish_dynamic_sections): Likewise.
35 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
36 xcoff-target.h not used to define rs6000 or ppc bfd.
39 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
42 * coff-rs6000.c : Many changes for 64 bit support. Move common
43 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
46 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
47 linker now supported. Explictly define the rs6000coff64_vec.
49 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
51 (coff_write_object_contents) same
52 (coff_slurp_line_table) same
54 * coffgen.c : (coff_fix_symbol_name) formatting
55 (coff_mangle_symbols) xcoff 64 bit support
56 (coff_write_symbol) same
57 (coff_write_alien_symbol) same
58 (coff_write_native_symbol) same
59 (coff_write_symbols) same
60 (coff_get_symbol_info) same
61 (bfd_coff_get_syment) same
62 (coff_print_symbol) same
64 * config.bfd : add powerpc64-*-aix* target
66 * libcoff-in.h : formatting
68 * libcoff.h : move xcoff extern declarations to libxcoff.h
70 * libxcoff.h : New file
72 * xcofflink.c : Many changes for xcoff64 support. Move common
73 structures to include/coff/xcoff.h. Move specific structure to
74 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
75 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
77 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
80 (xcoff_build_ldsyms) : handle special __rtinit symbol.
84 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
89 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
90 * libbfd.h: Regenerate.
91 * bfd0in2.h: Regenerate.
93 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
94 * archures.c (bfd_mach_mips12000): Define.
95 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
96 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
98 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
99 * bfd-in2.h: Regenerate.
100 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
104 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
105 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
106 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
111 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
112 of entries in a structured section.
113 * elf.c: Use new macro.
114 * elf32-i386.c: Use new macro.
115 * elf32-mips.c: Use new macro.
116 * elf64-alpha.c: Use new macro.
117 * elf64-sparc.c: Use new macro.
118 * elfcode.h: Use new macro.
119 * elflink.h: Use new macro.
123 * bfdint.texi: Replace -oformat with --oformat.
127 * dwarf2.c (decode_line_info): Fix error message.
128 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
129 adjust error message.
133 * elflink.h (elf_link_add_object_symbols): Revert the last
138 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
139 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
140 (hppa_build_one_stub): Add an assert to check plt.offset.
144 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
145 version definition to basename of the output filename.
149 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
150 basename of the bfd filename.
154 * section.c (asection): Add linker_has_input field.
155 (STD_SECTION): Adjust initialization to suit.
156 * ecoff.c (bfd_debug_section): Likewise.
157 * bfd-in2.h: Regenerate.
161 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
162 negative 32-bit operands to 16 operands when the operand is
163 going to be zero-extended by the modified opcode.
167 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
168 name for 'arc5' core versions.
169 (bfd_arc_arch): Make bfd_mach_arc_6 default.
171 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
173 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
177 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
179 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
180 to .gnu.linkonce.t.FOO text section.
184 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
185 fields, change sec into secinfo.
186 (struct sec_merge_info): Add chain, remove last fields.
187 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
188 (sec_merge_hash_lookup): If lookup could not use a string only
189 because it has bad alignment, mark the old string for deletion.
190 (sec_merge_add): Add secinfo argument. Don't compute entry's
191 position, instead record the section.
192 (sec_merge_emit): Update for the sec into secinfo change in
193 struct sec_merge_hash_entry.
194 (_bfd_merge_section): Only record the section for merging, defer
195 putting strings into the hash table.
196 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
197 _bfd_merge_sections): New functions.
198 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
200 * libbfd-in.h (_bfd_merge_sections): Add prototype.
201 (_bfd_nolink_bfd_merge_sections): Define.
202 * libbfd.h: Likewise.
203 (bfd_generic_merge_sections): Add prototype.
204 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
205 (struct bfd_target): Likewise.
206 * bfd.c (bfd_merge_sections): Define.
207 * bfd-in2.h: Rebuilt.
208 * elf.c (_bfd_elf_merge_sections): New function.
209 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
210 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
211 * reloc.c (bfd_generic_merge_sections): New function.
212 * vms.c (vms_bfd_merge_sections): New function.
213 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
214 * aout-target.h (MY_bfd_merge_sections): Define.
215 * aout-tic30.c (MY_bfd_merge_sections): Define.
216 * binary.c (binary_bfd_merge_sections): Define.
217 * bout.c (b_out_bfd_merge_sections): Define.
218 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
219 * coffcode.c (coff_bfd_merge_sections): Define.
220 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
221 * i386msdos.c (msdos_bfd_merge_sections): Define.
222 * i386os9k.c (os9k_bfd_merge_sections): Define.
223 * ieee.c (ieee_bfd_merge_sections): Define.
224 * ihex.c (ihex_bfd_merge_sections): Define.
225 * nlm-target.h (nlm_bfd_merge_sections): Define.
226 * oasys.c (oasys_bfd_merge_sections): Define.
227 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
228 * som.c (som_bfd_merge_sections): Define.
229 * srec.c (srec_bfd_merge_sections): Define.
230 * tekhex.c (tekhex_bfd_merge_sections): Define.
231 * versados.c (versados_bfd_merge_sections): Define.
232 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
236 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
237 to be unsigned long, in order to match its use.
241 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
246 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
247 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
248 Remove the unused veriable `dynver'.
252 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
254 (coff_i386_rtype_to_howto): Don't dump core if output section
259 * ecoff.c (bfd_debug_section): Fix initialization.
260 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
261 is always a positive integer. Cast away sign mismatch.
262 * elf32-mips.c: Fix misleading comment and typo.
263 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
265 * elflink.c: Fix typo.
266 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
267 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
271 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
275 * elf32-arm.h (elf32_arm_final_link_relocate): Set
276 EF_ARM_HASENTRY if the start address is set.
280 * targets.c (_bfd_target_vector_entries): Compute value based on
281 the size of the _bfd_target_vector and not bfd_target_vector.
285 * elfcode.h: Include "libiberty.h".
287 * elflink.h (elf_link_add_object_symbols): Set
288 elf_dt_name (abfd) to basename of the bfd filename.
289 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
294 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
295 (elf_generic_info_to_howto_rel): Likewise.
296 * coff-alpha.c (reloc_nil): Likewise.
297 (alpha_ecoff_bad_format_hook): Likewise.
298 (alpha_adjust_reloc_out): Likewise.
299 (alpha_bfd_reloc_type_lookup): Likewise.
300 (alpha_convert_external_reloc): Likewise.
301 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
302 (elf64_alpha_reloc_bad): Likewise.
303 (elf64_alpha_reloc_gpdisp): Likewise.
304 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
305 (elf64_alpha_info_to_howto): Likewise.
306 (elf64_alpha_add_symbol_hook): Likewise.
307 (elf64_alpha_create_got_section): Likewise.
308 (elf64_alpha_is_local_label_name): Likewise.
309 (elf64_alpha_merge_ind_symbols): Likewise.
310 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
311 (mips_elf64_get_reloc_upper_bound): Likewise.
312 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
313 (nlm_alpha_get_public_offset): Likewise.
317 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
318 about overflow in R_OPENRISC_LO_16_IN_INSN and
319 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
323 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
324 only for ELF_LINK_FORCED_LOCAL.
325 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
326 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
327 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
329 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
330 if the symbol has hidden or internal visibility.
334 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
335 calls to undefined weak symbols.
339 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
340 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
344 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
346 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
347 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
348 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
353 * config.bfd: Add arm-vxworks target.
354 * coff-arm (coff_arm_relocate_section): Add in symbol value to
355 addend (fro VXworks targets).
359 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
364 * bfd-in.h (bfd_cache_close): Declare newly exported function.
365 * bfd-in2.h: Regenerated.
369 * merge.c (struct sec_merge_hash_entry): Add alignment field.
370 (struct sec_merge_hash): Remove alignment_power.
371 (sec_merge_hash_newfunc): Clear alignment.
372 (sec_merge_hash_lookup): Pass alignment as argument.
373 Use hashp->root.next, not hashp->next to walk the hash chain.
374 If a string already in the hashtable does not have required
375 alignment, create a new hashtable entry.
376 (sec_merge_init): Remove alignment_power argument.
377 (sec_merge_add): Add alignment argument.
378 (sec_merge_emit): Alignment is now a per-entity thing, not per
380 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
381 for proper alignment.
382 Pass alignment information to sec_merge_add.
386 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
387 and R_REL16 reloc types; accept odd values for R_REL16 type
391 * cpu-openrisc.c: New file.
392 * elf32-openrisc.c: Likewise.
394 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
395 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
396 (BFD32_BACKENDS): Add elf32-openrisc.lo.
397 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
398 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
399 * Makefile.in: Regenerated.
400 * config.bfd: (openrisc-*-elf): New target.
401 * configure.in (bfd_elf32_openrisc_vec): New vector.
402 * configure: Regenerated.
403 * libbfd.h: Regenerated.
404 * bfd-in2.h: Regenerated.
405 * reloc.c: Add OpenRISC relocations.
406 * targets.c (bfd_elf32_openrisc_vec): Declare.
407 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
408 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
409 (bfd_openrisc_arch): Declare.
410 (bfd_archures_list): Add bfd_openrisc_arch.
411 * elf.c (prep_headers): Add bfd_arch_openrisc.
415 * elf64-x86-64.c: Add c++ vtable hack.
416 Small whitespace and comment changes.
420 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
421 (elf64_x86_64_plt_entry): Likewise.
422 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
423 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
427 * elf32-cris.c: Tweak comments related to dynamic linking.
428 (cris_elf_relocate_section): When not creating shared object, fill
429 in the .got table for any symbol not in the dynamic symbol table.
430 (elf_cris_finish_dynamic_symbol): When not creating shared object,
431 only emit a .got.rela reloc if the symbol is in the dynamic symbol
433 (cris_elf_check_relocs): Use variable r_type in all places rather
434 than the original expression. Add default case in switch for
436 (elf_cris_size_dynamic_sections): Iterate over
437 elf_cris_discard_excess_program_dynamics when not creating shared
439 (elf_cris_discard_excess_dso_dynamics): Renamed from
440 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
441 (elf_cris_discard_excess_program_dynamics): New.
445 * coffcode.h (coff_write_object_contents): Use
446 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
450 * bfd-in2.h: Regenerate.
454 * section.c (STD_SECTION): Add entsize.
458 * section.c (SEC_MERGE): Define new flag for merging.
459 (SEC_STRINGS): Likewise.
460 (entsize): New field.
464 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
465 flag on pe-i386 targets.
469 * libbfd-in.h (_bfd_merge_section): New.
470 (_bfd_write_merged_section): New.
471 (_bfd_merged_section_offset): New.
473 * linker.c (_bfd_generic_link_output_symbols): Handle
475 * aoutx.h (aout_link_write_symbols): Likewise.
476 * pdp11.c (aout_link_write_symbols): Likewise.
477 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
478 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
480 (elf_link_sec_merge_syms): New.
481 (elf_link_input_bfd): Call _bfd_merged_section_offset
482 and _bfd_write_merged_section.
483 Handle discard_sec_merge.
484 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
486 (struct bfd_elf_section_data): Likewise.
487 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
488 SEC_STRINGS section flags and entsize from their ELF counterparts.
489 (_bfd_elf_link_hash_table_init): Initialize merge_info.
490 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
491 from their BFD counterparts.
493 * Makefile.am: Add strtab.lo.
494 * Makefile.in: Rebuilt.
498 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
499 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
503 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
504 endian MIPS ELF target.
505 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
508 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
509 64bit big endian MIPS ELF target.
510 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
511 endian MIPS ELF target.
512 * configure: Regenerated.
514 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
515 little endian targets.
516 (mips_elf_sym_is_global): Handle traditional targets.
518 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
519 64bit big endian MIPS ELF target.
520 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
521 endian MIPS ELF target.
523 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
524 and bfd_elf64_tradlittlemips_vec.
528 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
529 ordinary "progbits" section.
533 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
534 when -Bsymbolic causes a symbol to no longer need a .plt entry.
538 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
542 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
543 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
547 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
548 if there are any relocations for generic ELF.
549 (bfd_elf32_bfd_link_add_symbols): Defined to
550 elf32_generic_link_add_symbols.
551 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
552 if there are any relocations for generic ELF.
553 (bfd_elf64_bfd_link_add_symbols): Defined to
554 elf64_generic_link_add_symbols.
558 * Makefile.am (BUILD_CFILES): New variable: List of C source
559 files created in build directory.
560 (BUILD_HFILES): New variable: List of header files created in
563 (po/POTFILES.in): Replace rule with empty entry.
564 (po/SRC-POTFILES.in): New rule: Create a list of source files
565 in the source directory.
566 (po/BLD-POTFILES.in): New rule: Create a list of source files
567 in the build directory.
568 (MOSTLYCLEAN): Do not delete source files created in build
570 * Makefile.in: Regenerate.
571 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
573 * configure: Regenerate.
575 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
577 Add .. to the search path when building bfd.pot.
578 Delete POTFILES when performing distclean.
579 Add comment describing why distclean is broken in maintainer mode.
580 * po/POTFILES.in: Delete.
581 * po/SRC-POTFILES.in: New file.
582 * po/BLD-POTFILES.in: New file.
583 * po/bfd.pot: Regenerate.
587 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
588 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
589 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
590 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
591 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
592 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
594 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
595 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
596 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
597 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
598 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
599 New HOWTO members for new relocs.
600 (cris_reloc_map): Map new relocs.
601 (ELF_DYNAMIC_INTERPRETER): Define.
602 (PLT_ENTRY_SIZE): Define.
603 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
604 elf_cris_pic_plt_entry): New, PLT templates.
605 (struct elf_cris_pcrel_relocs_copied, struct
606 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
607 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
608 (cris_final_link_relocate): Check that 16-bit GOT relocs have
609 positive values. Adjust PCREL relocs to be relative to location
611 (cris_elf_relocate_section): Handle relocations to dynamic
612 objects. Handle new relocations. Call error handler when seeing
613 non-PIC relocation for read-only sections while generating shared
615 (cris_elf_check_relocs): Set reference counts for GOT and PLT
617 (bfd_elf32_bfd_link_hash_table_create,
618 elf_backend_adjust_dynamic_symbol,
619 elf_backend_size_dynamic_sections,
620 elf_backend_finish_dynamic_symbol,
621 elf_backend_finish_dynamic_sections,
622 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
623 elf_backend_hide_symbol, elf_backend_want_got_plt,
624 elf_backend_plt_readonly, elf_backend_want_plt_sym,
625 elf_backend_got_header_size, elf_backend_plt_header_size):
628 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
629 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
630 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
631 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
632 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
633 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
634 * bfd-in2.h, libbfd.h: Regenerate.
638 (_bfd_mips_elf_relocate_section): Give a better error message when
639 a relocation is not recognized.
643 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
644 non-NULL before attempting to dereference.
648 * configure.in: Remove the redundent AC_ARG_PROGRAM.
649 * configure: Rebuild.
653 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
654 relocation value when resolving a reference from a debugging
659 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
660 (xcoff64_swap_sym_out): Fix syntax errors.
664 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
668 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
669 (hppa_link_hash_newfunc): Init it.
670 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
671 section appears to be non-PIC.
672 (final_link_relocate): Likewise.
673 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
674 possible candidate function, and set pic_call for those that will
675 only have a .plt entry for the PIC call stub.
676 (hppa_handle_PIC_calls): Set maybe_pic_call.
680 * elf32-sh.c (sh_elf_relocate_section): Only relocation
681 R_SH_DIR8WP* relocs if they're against external symbols, else
682 they're just for relaxing. Validate the reloc values.
686 * binary.c (bfd_external_binary_architecture): Declare.
687 (binary_object_p): If bfd_external_binary_architecture is defined,
688 set the architecture to this string.
692 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
693 entries that could serve as a definition for a weak symbol.
697 * Most files: Update copyright notices using Perl script created
702 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
703 prior patch on ! defined OLD_ARM_ABI.
707 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
708 some relocation values.
712 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
713 of offset in BLX(1) instruction.
714 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
715 offset in BLX(1) instruction.
720 * coff-arm.c (coff_arm_reloc_type_lookup): Add
721 BFD_RELOC_THUMB_PCREL_BLX.
725 * archures.c (bfd_default_scan): Add Coldfire CPUs.
726 * bfd-in2.h: Regenerate.
727 * cpu-m68k.c: Add Coldfire CPUs for arch table.
728 * ieee.c (ieee_write_processor): Set proper id for
733 * configure.in: Add s390 target.
734 * configure: Regenerate.
738 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
743 * elf32-arm.h: Update mentions of renamed EF_xx constants.
744 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
748 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
749 abfd->tdata.aout_data == NULL.
753 * elf32-hppa.c: Correct field selector in stub comments.
754 (clobber_millicode_symbols): Formatting fix.
756 * configure.in: Bump version to 2.11.90.
757 * configure: Regenerate.
758 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
759 (CFILES): $SOURCE_CFILES + generated C files.
760 (POTFILES): Include $HFILES not $SOURCE_HFILES.
762 * Makefile.in: Regenerate.
763 * doc/Makefile.in: This too.
767 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
772 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
773 up, replacing multiple if statements with a switch.
774 (handle_COMDAT): New function.
778 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
779 a warning for section flags we do not handle instead of
784 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
788 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
789 * configure.in: Add objects for elf64_ia64_aix vectors.
790 * configure: Regenerated.
791 * configure.host: Recognize ia64-*-aix*.
792 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
793 for AIX. AIX5 requires most relocations to be dynamic (*all*
794 binaries are somewhat similar to shared libraries).
795 * targets.c: Add elf64_ia64_aix vectors.
799 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
800 C8 said "1" instead of "8". Clarify error string for IMM22:
801 "signed integer" instead of just "integer".
805 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
806 PLT entries that could serve as a definition for a weak symbol.
810 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
811 entries that could serve as a definition for a weak symbol.
812 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
814 2001-02-18 David O'Brien <obrien@FreeBSD>
816 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
817 FreeBSD/i386-CURRENT differently until I can figure out the needed
819 * configure: Regenerate.
820 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
821 FreeBSD/PowerPC, and FreeBSD/sparc64.
825 * Makefile.am: Add PDP-11 a.out target.
826 * config.bfd: Likewise.
827 * configure.in: Likewise.
828 * targets.c: Likewise.
829 * archures.c: Likewise.
830 * bfd-in2.h: Likewise. Add PDP-11 relocations.
831 * libbfd.h: Add PDP-11 relocations.
833 * cpu-pdp11.c: New file.
836 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
837 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
838 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
839 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
840 (GET_MAGIC): New macro.
841 (PUT_MAGIC): Likewise.
842 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
846 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
851 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
856 * vms-misc.c: Fix formatting.
860 * vms.c: Fix formatting.
864 * elf.c (elf_find_function): New function.
865 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
866 the file name and function name.
870 * ecoff.c (bfd_debug_section): Update to initialise new fields in
873 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
874 (BFD64_BACKENDS): Add pepigen.c
875 Add rules to create peigen.c and pepigen.c from peXXigen.c.
877 * Makefile.in: Regenerate.
878 * configure: Regenerate.
879 * po/POTFILES.in: Regenerate.
880 * po/bfd.pot: Regenerate.
884 * libcoff-in.h (pe_tdata): Add members target_subsystem and
885 force_minimum_alignment.
889 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
890 (elf64_86_64_size_info): Struct added to fix a problem
891 with the hashtable string entries.
892 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
893 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
894 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
895 remove the FIXME for this.
896 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
897 section. Also removed the FIXME for it.
898 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
899 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
900 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
904 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
905 and not user provided.
909 * vms.c (vms_print_symbol): Remove unreachable code.
911 * rs6000-core.c: Fix formatting.
915 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
916 as _bfd_XXi_only_swap_filehdr_out.
917 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
918 pe->force_minimum_alignment to TRUE.
919 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
920 PEI_TARGET_SUBSYSTEM.
921 (pe_print_private_bfd_data): Call
922 _bfd_XX_print_private_bfd_data_common() instead of
923 _bfd_pe_print_private_bfd_data_common().
924 (pe_bfd_copy_private_bfd_data): Call
925 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
926 _bfd_pe_bfd_copy_private_bfd_data_common().
927 (coff_bfd_copy_private_section_data): Define as
928 _bfd_XX_bfd_copy_private_section_data instead of
929 _bfd_pe_bfd_copy_private_section_data.
930 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
931 of a _bfd_pe_get_symbol_info.
935 * peXXigen.c: Renamed from peigen.c.
936 (COFF_WITH_XX): Define this macro (will get expanded into
937 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
938 compiled as peigen.c or pepigen.c.
939 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
940 define the canonical PEP structures and definitions.
941 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
942 effect, enforce minimum file and section alignments. If
943 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
944 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
945 so, by default, this is a no-op).
947 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
948 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
949 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
950 _bfd_pefoo if it's not defined. Use these macros to define
953 * libcoff.h (pe_tdata): Add members target_subsystem and
954 force_minimum_alignment.
956 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
958 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
960 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
963 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
964 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
967 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
968 (BFD64_BACKENDS_CFILES): Mention pepigen.c
969 (peigen.c): Add rule to generate from peXXigen.c.
971 (pepigen.lo): List dependencies for pepigen.lo.
975 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
976 $global$ referenced but not defined, set its value here.
980 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
982 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
984 (elf64_x86_64_relocate_section): Fix formatting.
985 (elf64_x86_64_relocate_section): Fix addend for relocation of
986 R_X86_64_(8|16|32|PC8|PC16|PC32).
990 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
994 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
999 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
1000 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
1001 relocations against dynsym symbols.
1003 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
1004 the R_MIPS_26 relocation.
1005 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
1006 the R_MIPS_26 relocation.
1007 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
1009 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
1010 the R_MIPS_26 relocation.
1011 (mips_elf64_howto_table_rela): Likewise.
1013 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
1014 member to mark symbols that have non-CALL relocations against
1016 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
1017 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
1019 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
1020 non-CALL relocation against it is encountered.
1021 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
1022 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
1023 no_fn_stub is not set.
1025 * elf32-mips.c (mips_elf_output_extsym): Get the output section
1026 information from the real symbol for indirect ones.
1027 Check no_fn_stub to find out if a symbol has a function stub
1032 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
1033 * Makefile.in: Regenerate.
1037 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
1038 true if section name is an unwind table section name.
1039 (elfNN_ia64_additional_program_headers): Count each unwind section
1041 (elfNN_ia64_modify_segment_map): Install one unwind program header
1042 for each unwind separate section. Note: normally the linker
1043 script merges the unwind sections that go into a single segment,
1044 so this still generates at most one unwind program header per
1047 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
1048 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
1049 (elfNN_ia64_fake_sections): Mark sections with names that start
1050 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
1053 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
1054 Use it to make sh_info in unwind section point to the text section
1059 * Makefile.am: Add linux target for S/390.
1060 * archures.c: Likewise.
1061 * bfd-in2.h: Likewise.
1062 * config.bfd: Likewise.
1063 * configure.in: Likewise.
1065 * libbfd.h: Likewise.
1066 * targets.c: Likewise.
1067 * cpu-s390.c: New file.
1068 * elf32-s390.c: New file.
1069 * elf64-s390.c: New file.
1073 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
1074 ImageBase. This has already been done by coff_swap_hdr_in.
1078 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
1082 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
1083 (sparc64_elf_relocate_section): Likewise.
1087 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
1088 similar to R_SPARC_32.
1089 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1093 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
1094 relocation entries for weak definitions when building DSO with
1099 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
1100 before visibility. Locally defined protected symbols are not
1105 * config.bfd: Enable coff64 for rs6000-*. Patch from
1110 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
1111 found, do not attempt to find dwarf2 info before returning.
1115 * elflink.h (is_global_symbol_definition): Rename to
1116 is_global_data_symbol_definition and have it reject function
1118 (elf_link_is_defined_archive_symbol): Use renamed function.
1122 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
1123 * libbfd.h (bfd_target_vector): Likewise.
1124 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
1125 make static; create pointer reference named bfd_target_vector.
1126 (_bfd_target_vector_entries): Calculate this based on the array
1127 typed _bfd_target_vector.
1131 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
1132 internal symbols are not dynamic.
1133 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1137 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
1138 that it will not be pulled into the list of files that make up
1140 * Makefile.in: Regenerate.
1141 * po/bfd.pot: Regenerate.
1145 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
1147 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
1148 external_PEI_IMAGE_hdr.
1152 * elf-m10200.c: Fix formatting.
1156 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
1157 rel, it will be handled later on.
1161 * Makefile.in: Fix typo.
1165 * elf-m10300.c: Fix formatting.
1169 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
1170 (elf_backend_get_symbol_type): Define.
1171 (elf64_hppa_object_p): Set architecture and machine from elf
1176 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
1181 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
1182 for non-default visibility.
1183 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
1184 delete ugly macro and replace with pretty function.
1188 * coff-go32.c: Update copyright.
1189 * coff-stgo32.c: Likewise.
1190 * coff-go32.c (COFF_LONG_FILENAMES): Define.
1191 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
1192 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
1193 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1197 * bfd-in2.h: Rebuild.
1198 * libbfd.h: Likewise.
1202 * bfd-in2.h: Rebuild.
1206 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
1207 is NULL or PRIV(vms_rec) is outside of the buffer.
1211 * coff64-rs6000.c: Fix formatting.
1212 * coff-arm.c: Likewise.
1213 * coffgen.c: Likewise.
1214 * cofflink.c: Likewise.
1215 * coff-mcore.c: Likewise.
1216 * coff-mips.c: Likewise.
1217 * coff-pmac.c: Likewise.
1218 * coff-ppc.c: Likewise.
1219 * coff-rs6000.c: Likewise.
1220 * elf32.c: Likewise.
1221 * elf32-fr30.c: Likewise.
1222 * elf32-i370.c: Likewise.
1223 * elf32-i860.c: Likewise.
1224 * elf32-m32r.c: Likewise.
1225 * elf32-m68k.c: Likewise.
1226 * elf32-mcore.c: Likewise.
1227 * elf32-ppc.c: Likewise.
1228 * elf32-sh.c: Likewise.
1229 * elf32-v850.c: Likewise.
1230 * elf64-alpha.c: Likewise.
1231 * elf64-sparc.c: Likewise.
1232 * elflink.c: Likewise.
1233 * elflink.h: Likewise.
1234 * elf-m10200.c: Likewise.
1235 * elf-m10300.c: Likewise.
1236 * elfxx-ia64.c: Likewise.
1238 * aoutx.h: Fix formatting.
1240 * bfd-in2.h: Likewise.
1241 * bfd-in.h: Likewise.
1242 * cpu-i386.c: Likewise.
1243 * cpu-m68hc11.c: Likewise.
1244 * dwarf2.c: Likewise.
1245 * elf64-x86-64.c: Likewise.
1246 * format.c: Likewise.
1247 * freebsd.h: Likewise.
1249 * hp300hpux.c: Likewise.
1250 * hppabsd-core.c: Likewise.
1251 * hpux-core.c: Likewise.
1255 * elf64-x86-64.c: Added PIC support for X86-64.
1256 (elf64_x86_64_link_hash_newfunc): Function added.
1257 (elf64_x86_64_link_hash_table_create): Likewise.
1258 (elf64_x86_64_check_relocs): Likewise.
1259 (elf64_x86_64_gc_mark_hook): Likewise.
1260 (elf64_x86_64_gc_sweep_hook): Likewise.
1261 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1262 (elf64_x86_64_size_dynamic_sections): Likewise.
1263 (elf64_x86_64_discard_copies): Likewise.
1264 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1265 (elf64_x86_64_finish_dynamic_sections): Likewise.
1266 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
1270 * Makefile.am (install-data-local): Make use of $(DESTDIR).
1271 * Makefile.in: Regenerate.
1275 * coff-a29k.c: Fix formatting.
1279 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
1280 relocation section names.
1281 (elf_i386_relocate_section): Report files with bad relocation
1282 section names and return false.
1286 * targets.c: Alphabetize list of xvecs.
1290 * config.bfd: Add linux target variant for elfxx-hppa.
1291 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
1292 bfd_elf64_hppa_linux_vec.
1293 * configure: Regenerate.
1294 * elf64-hppa.c: Include elf64-target.h again to support linux
1296 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
1297 * elf32-hppa.c: Include elf32-target.h again to support linux
1299 (elf32_hppa_post_process_headers): New function.
1300 (elf_backend_post_process_headers): Define.
1301 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
1302 bfd_elf32_hppa_linux_vec.
1304 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
1305 and data_segment_base fields.
1306 (elf32_hppa_link_hash_table_create ): Init them.
1307 (elf32_hppa_check_relocs): Update comments.
1308 (hppa_record_segment_addr): New function.
1309 (elf32_hppa_relocate_section): Call it.
1310 (final_link_relocate): Handle R_PARISC_SEGREL32.
1311 (elf32_hppa_final_link): New function.
1312 (bfd_elf32_bfd_final_link): Define to call it.
1313 (hppa_unwind_entry_compare): New function.
1314 * cache.c (bfd_open_file): Create files in write+read mode.
1316 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
1317 SEGREL32 and numerous other relocs. Change duplicate
1318 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
1320 * opncls.c (bfd_fdopenr): Add parens like the comment says around
1323 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
1324 .plt entries for DT_INIT and DT_FINI.
1325 (elf32_hppa_finish_dynamic_sections): Remove special handling of
1326 DT_INIT and DT_FINI.
1328 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
1329 offsets for stub .plt access if wide mode. Check offset in range.
1333 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
1336 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
1341 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
1342 * configure: Regenerate.
1346 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
1347 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
1348 * cpu-arc.c (arch_info_struct): Add entries for variants.
1349 (bfd_arc_arch) Set default to bfd_mach_arc_5.
1350 (arc_get_mach) Don't assume machine names prefixed arc- before
1352 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
1354 (arc_elf_final_write_processing) Likewise.
1355 (ELF_MACHINE_CODE) Use EM_ARC.
1359 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
1368 * som.c: Fix formatting.
1372 * ecoffswap.h: Fix formatting.
1373 * elf-bfd.h: Likewise.
1374 * elfarm-nabi.c: Likewise.
1375 * elfarm-oabi.c: Likewise.
1376 * elfcode.h: Likewise.
1377 * elfcore.h: Likewise.
1378 * elflink.c: Likewise.
1379 * elflink.h: Likewise.
1380 * elfxx-ia64.c: Likewise.
1381 * elfxx-target.h: Likewise.
1382 * libbfd.c: Likewise
1383 * linker.c: Likewise.
1384 * lynx-core.c: Likewise.
1388 * pc532-mach.c: Fix formatting.
1389 * pe-arm.c: Likewise.
1390 * pe-i386.c: Likewise.
1391 * pe-mips.c: Likewise.
1392 * pe-ppc.c: Likewise.
1393 * pe-sh.c: Likewise.
1394 * pei-mips.c: Likewise.
1395 * pei-sh.c: Likewise.
1396 * peicode.h: Likewise.
1397 * ppcboot.c: Likewise.
1398 * ptrace-core.c: Likewise.
1402 * reloc.c: Fix formatting.
1403 * riscix.c: Likewise.
1404 * rs6000-core.c: Likewise.
1405 * xcoff-target.h: Likewise.
1409 * elfcode.h (elf_object_p): Also restore the bfd mach field on
1410 error, by calling bfd_default_set_arch_mach with incoming
1415 * vaxnetbsd.c: Fix formatting.
1416 * versados.c: Likewise.
1417 * vms-gsd.c: Likewise.
1418 * vms-hdr.c: Likewise.
1419 * vms-misc.c: Likewise.
1423 * archive.c (coff_write_armap): Don't write more than symbol_count
1424 `archive_member_file_ptr's.
1428 * vms-tir.c: Fix formatting.
1432 * vms.c: Fix formatting.
1437 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
1439 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
1441 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
1444 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
1446 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
1450 * libbfd.c (bfd_get_bits): Added
1451 (bfd_put_bits): Likewise
1452 * bfd-in.h: Declared the above.
1453 * bfd-in2.h: Regenerated.
1457 * targets.c: Fix formatting.
1458 * tekhex.c: Likewise.
1459 * trad-core.c: Likewise.
1463 * sco5-core.c: Fix formatting.
1464 * section.c: Likewise.
1465 * sparclinux.c: Likewise.
1466 * sparclynx.c: Likewise.
1467 * sparcnetbsd.c: Likewise.
1469 * stabs.c: Likewise.
1470 * stab-syms.c: Likewise.
1471 * sunos.c: Likewise.
1473 * sysdep.h: Likewise.
1477 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
1479 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
1480 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
1484 * vms-misc.c (_bfd_vms_get_record): Add default case to
1489 * elfcore.h (elf_core_file_p): Move to the start of the program
1490 headers before attempting to read them.
1494 * peigen.c: Fix formatting.
1500 * peigen.c: Fix formatting.
1504 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
1508 * binary.c (binary_set_section_contents): Ignore sections
1513 * m68klinux.c: Fix formatting.
1514 * m68knetbsd.c: Likewise.
1515 * mipsbsd.c: Likewise.
1516 * netbsd-core.c: Likewise.
1517 * netbsd.h: Likewise.
1518 * newsos3.c: Likewise.
1519 * nlm32-alpha.c: Likewise.
1520 * nlm32-i386.c: Likewise.
1521 * nlm32-ppc.c: Likewise.
1522 * nlm32-sparc.c: Likewise.
1523 * nlmcode.h: Likewise.
1524 * nlmswap.h: Likewise.
1525 * nlm-target.h: Likewise.
1526 * ns32knetbsd.c: Likewise.
1530 * elflink.h (elf_link_output_extsym): Don't complain about undefined
1531 symbols in shared objects if allow_shlib_undefined is true.
1535 * cpu-sh.c: Fix formattng.
1536 * elf.c: Fix formattng.
1537 * elf32-mips.c: Fix formattng.
1538 * elf32-sh.c: Fix formattng.
1539 * elf64-alpha.c: Fix formattng.
1543 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
1544 dwarf2_find_line_info as last parameter to invocation of
1545 _bfd_dwarf2_find_nearest_line.
1546 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
1547 dwarf2_find_line_info as last parameter to invocation of
1548 _bfd_dwarf2_find_nearest_line.
1552 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
1553 (BFD_LIBS): ...to here.
1554 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
1555 (BFD_LIBS_CFILES): ...to here.
1556 * Makefile.in: Regenerate.
1557 * configure.in: Remove dwarf.lo from the elf shell variable.
1558 * configure: Regenerate.
1559 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
1560 * libcoff.h: Regenerate.
1561 * coffgen.c (coff_find_nearest_line): Call
1562 _bfd_dwarf2_find_nearest_line.
1563 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
1565 (read_abbrevs): Likewise
1566 (decode_line_info): Likewise.
1567 (parse_comp_unit): Likewise.
1568 (comp_unit_find_nearest_line): Likewise.
1569 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1570 * libbfd.h: Regenerate.
1571 * elf.c (_bfd_elf_find_nearest_line): Update call.
1572 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
1573 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
1574 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
1575 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
1576 (styp_to_sec_flags): Handle DWARF2 sections.
1577 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
1578 to _bfd_find_nearest_line.
1579 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
1580 call to _bfd_find_nearest_line.
1584 * coffgen.c: Fix formatting.
1585 * elf-m10300.c: Likewise.
1586 * elf32-i386.c: Likewise.
1587 * elf32-i960.c: Likewise.
1588 * elf32-m68k.c: Likewise.
1589 * elf32-mcore.c: Likewise.
1590 * elf32-ppc.c: Likewise.
1591 * elf32-sh.c: Likewise.
1592 * elf32-sparc.c: Likewise.
1593 * elf32-v850.c: Likewise.
1594 * elf64-alpha.c: Likewise.
1595 * elf64-hppa.c: Likewise.
1596 * elf64-mips.c: Likewise.
1597 * elf64-sparc.c: Likewise.
1601 * elf32-ppc.c: Fix formatting.
1602 * elf64-x86-64.c: Likewise.
1608 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
1609 BFDs containing no sections or empty .text, .data or .bss sections
1610 to be merged, regardless of their flags.
1614 * elf32-m32r.c: Fix formatting.
1615 * elf32-m68hc11.c: Likewise.
1616 * elf32-m68hc12.c: Likewise.
1617 * elf32-m68k.c: Likewise.
1618 * elf32-mcore.c: Likewise.
1619 * elf32-pj.c: Likewise.
1620 * elf32-ppc.c: Likewise.
1624 * elf32-fr30.c: Fix formatting.
1625 * elf32-hppa.c: Likewise.
1626 * elf32-i370.c: Likewise.
1627 * elf32-i386.c: Likewise.
1628 * elf32-i860.c: Likewise.
1629 * elf32-i960.c: Likewise.
1633 * elf32-arm.h: Fix formatting.
1634 * elf32-avr.c: Likewise.
1635 * elf32-cris.c: Likewise.
1636 * elf32-d10v.c: Likewise.
1637 * elf32-d30v.c: Likewise.
1638 * elf-hppa.h: Likewise.
1639 * elf-m10200.c: Likewise.
1640 * elf-m10300.c: Likewise.
1644 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
1645 bfd_mach_mips32_4k. Update FIXME comment.
1646 * archures.c (bfd_mach_mips32): New constant.
1647 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1648 the latter, renumber it.
1649 * bfd-in2.h (bfd_mach_mips32): New constant.
1650 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1651 the latter, renumber it.
1652 * cpu-mips.c (I_mips32): New constant.
1653 (I_mips4K, I_mips32_4k): Rename the former to the latter.
1654 (arch_info_struct): Add bfd_mach_mips32 entry, replace
1655 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
1656 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
1657 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
1658 with E_MIPS_MACH_MIPS32_4K.
1659 (_bfd_mips_elf_final_write_processing): Replace
1660 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
1661 bfd_mach_mips32 case.
1662 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
1663 comparison with support for MIPS32.
1664 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
1667 * aoutx.h (NAME(aout,machine_type)): Add cases for
1668 bfd_mach_mips5 and bfd_mach_mips64.
1669 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
1670 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
1671 * cpu_mips.c (I_mips5, I_mips64): New definitions.
1672 (arch_info_struct): Add entries for bfd_mach_mips5 and
1674 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
1675 _bfd_mips_elf_print_private_bfd_data): Add cases for
1676 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
1677 (_bfd_mips_elf_final_write_processing): Add cases for
1678 bfd_mach_mips5 and bfd_mach_mips64.
1680 * aoutx.h (NAME(aout,machine_type)): Add a
1681 bfd_mach_mips_sb1 case.
1682 * archures.c (bfd_mach_mips_sb1): New constant.
1683 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
1684 * cpu-mips.c (I_sb1): New constant.
1685 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
1686 * elf32-mips.c (elf_mips_mach): Add case for
1688 (_bfd_mips_elf_final_write_processing): Add case for
1693 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
1694 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
1695 (sparc*-*-rtems*): Switched from a.out to ELF.
1699 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
1700 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
1701 (elf64-x86-64.lo): Add dependencies.
1702 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
1703 bfd_mach_x86_64_intel_syntax.
1704 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
1705 * config.bfd (x86_64): Add.
1706 * configure.in: Add support for bfd_elf64_x86_64_vec.
1707 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
1708 (bfd_i386_arch, i8086_ar): Link in.
1709 * elf64-x86-64.c: New file.
1710 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
1711 * targets.c (bfd_elf64_x86_64_vec): Add.
1712 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
1716 * xcofflink.c: Fix formatting.
1720 * aoutx.h: Fix formatting.
1721 * bfd-in.h: Likewise.
1722 * bfd-in2.h: Likewise.
1723 * cache.c: Likewise.
1724 * cisco-core.c: Likewise.
1725 * coff64-rs6000.c: Likewise.
1726 * coffcode.h: Likewise.
1727 * coffswap.h: Likewise.
1728 * corefile.c: Likewise.
1729 * elf32-mips.c: Likewise.
1733 * aout-adobe.c: Fix formatting.
1734 * coff64-rs6000.c: Likewise.
1735 * coffgen.c: Likewise.
1736 * cofflink.c: Likewise.
1740 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
1741 (obj_coff_strings_written): New accessor macro for above.
1742 * libcoff.h: Regenerate.
1743 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
1745 * coffcode.h (coff_write_object_contents): No need to write out
1746 the string table if it's already been done.
1750 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
1751 weak undefined symbols.
1755 * archures.c (bfd_mach_arm_5TE): Define.
1756 (bfd_mach_arm+XScale): Define.
1757 * bfd-in2.h: Regenerate.
1759 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
1760 BFD_RELOC_ARM_PCREL_BLX.
1762 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
1763 XScale machine numbers.
1765 * config.bfd (xscale-elf): Add target.
1766 (xscale-coff): Add target.
1768 * cpu-arm.c: Add xscale machine name.
1769 Add v5t, v5te and XScale machine numbers.
1773 * aix386-core.c: Fix formatting.
1777 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
1778 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
1779 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
1780 (ins_imms_scaled): Initialize sign_bit at function entry.
1781 (elf64_ia64_operands): Add missing initializers.
1782 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
1783 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
1784 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
1785 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
1786 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
1788 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
1789 and free_extsyms at function entry.
1790 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
1791 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
1792 (get_got): Delete unused local srel.
1793 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
1794 (elfNN_ia64_relocate_section): Delete unused local dynindx.
1798 * coff-a29k.c: Fix formatting.
1799 * coff-h8500.c: Likewise.
1800 * coff-i960.c: Likewise.
1801 * coff-ppc.c: Likewise.
1802 * coff-rs6000.c: Likewise.
1803 * coff-stgo32.c: Likewise.
1804 * coff-tic54x.c: Likewise.
1805 * coff-w65.c: Likewise.
1806 * cpu-h8500.c: Likewise.
1807 * cpu-hppa.c: Likewise.
1808 * cpu-ns32k.c: Likewise.
1809 * ecoff.c: Likewise.
1810 * ecofflink.c: Likewise.
1814 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
1815 remove possibility of infinite loop.
1819 * aix386-core.c: Fix formatting.
1820 * aout-adobe.c: Likewise.
1821 * aout-arm.c: Likewise.
1822 * aout-encap.c: Likewise.
1823 * aout-ns32k.c: Likewise.
1824 * aout-target.h: Likewise.
1825 * aout-tic30.c: Likewise.
1826 * aoutf1.h: Likewise.
1827 * aoutx.h: Likewise.
1828 * archive.c: Likewise.
1829 * bfd-in.h: Likewise.
1830 * bfd-in2.h: Likewise.
1836 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
1837 pltoff entries for DT_INIT and DT_FINI.
1838 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
1839 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
1844 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
1845 (allocate_dynrel_entries): Likewise.
1846 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
1847 (set_pltoff_entry): Likewise.
1848 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
1849 (elfNN_ia64_reloc_type_lookup): Likewise.
1850 (elfNN_ia64_install_value): Likewise.
1851 (elfNN_ia64_relocate_section): Likewise.
1852 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
1853 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
1857 * cpu-a29k.c: Fix formatting.
1858 * cpu-alpha.c: Likewise.
1859 * cpu-arm.c: Likewise.
1860 * cpu-avr.c: Likewise.
1861 * cpu-d10v.c: Likewise.
1862 * cpu-h8500.c: Likewise.
1863 * cpu-hppa.c: Likewise.
1864 * cpu-i370.c: Likewise.
1865 * cpu-i386.c: Likewise.
1866 * cpu-i960.c: Likewise.
1867 * cpu-ia64-opc.c: Likewise.
1868 * cpu-ia64.c: Likewise.
1869 * cpu-m32r.c: Likewise.
1870 * cpu-m68hc11.c: Likewise.
1871 * cpu-m68hc12.c: Likewise.
1872 * cpu-m68k.c: Likewise.
1873 * cpu-m88k.c: Likewise.
1874 * cpu-mips.c: Likewise.
1875 * cpu-ns32k.c: Likewise.
1876 * cpu-pj.c: Likewise.
1877 * cpu-powerpc.c: Likewise.
1878 * cpu-sh.c: Likewise.
1879 * cpu-sparc.c: Likewise.
1880 * cpu-tic54x.c: Likewise.
1881 * cpu-v850.c: Likewise.
1882 * cpu-vax.c: Likewise.
1883 * cpu-w65.c: Likewise.
1884 * cpu-we32k.c: Likewise.
1885 * cpu-z8k.c: Likewise.
1886 * dwarf1.c: Likewise.
1887 * dwarf2.c: Likewise.
1891 * coff-arm.c: Fix formatting.
1892 * coff-ppc.c: Likewise.
1893 * coff-rs6000.c: Likewise.
1894 * coff-sh.c: Likewise.
1895 * coff-sparc.c: Likewise.
1896 * coff-tic30.c: Likewise.
1897 * coff-tic54x.c: Likewise.
1898 * coff-tic80.c: Likewise.
1899 * coff-w65.c: Likewise.
1900 * coff-we32k.c: Likewise.
1901 * coff-z8k.c: Likewise.
1905 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
1906 section with the same ALLOC|LOAD flags as the source section.
1910 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
1911 by STO_ALPHA constants.
1915 * coff-pmac.c: Fix formatting.
1916 * coff-ppc.c: Likewise.
1920 * elflink.h (elf_link_add_object_symbols): Also add indirect
1921 symbols for common symbols with the default version.
1925 * section.c (STD_SECTION): Set gc_mark flag.
1929 * coff-i960.c: Likewise.
1930 * coff-m68k.c: Likewise.
1931 * coff-m88k.c: Likewise.
1932 * coff-mcore.c: Likewise.
1933 * coff-mips.c: Likewise.
1937 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
1941 * coff-h8300.c: Fix formatting.
1942 * coff-h8500.c: Likewise.
1943 * coff-i386.c: Likewise.
1944 * coff-i860.c: Likewise.
1945 * coff-i960.c: Likewise.
1946 * coff-ia64.c: Likewise.
1950 * archive.c: Fix formatting.
1951 * archures.c: Likewise.
1955 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
1956 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
1957 * section.c (bfd_set_section_contents): Call memcpy if
1958 section->contents set and location not equal to contents plus offset.
1962 * bfd-in.h: Fix formatting.
1963 * bfd-in2.h: Likewise.
1965 * binary.c: Likewise.
1967 * coff-a29k.c: Likewise.
1968 * coff-alpha.c: Likewise.
1969 * coff-apollo.c: Likewise.
1970 * coff-aux.c: Likewise.
1974 * aix386-core.c: Fix formatting.
1975 * aoutf1.h: Likewise.
1976 * aoutx.h: Likewise.
1977 * archures.c: Likewise.
1978 * armnetbsd.c: Likewise.
1982 * coff-h8300.c (special): Adjust reloc address.
1986 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
1987 to differentiate elf32 and elf64 on ia64.
1988 * bfd-in2.h: Regenerate.
1989 * config.bfd: Add target for "ia64*-*-hpux*".
1990 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
1991 * configure: Regenerate.
1992 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
1993 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
1995 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
1996 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
1997 * Makefile.in: Regnerate.
1998 * elf64-ia64.c: Deleted.
1999 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
2003 * aout-adobe.c: Fix formatting.
2004 * aout-arm.c: Likewise.
2005 * aout-cris.c: Likewise.
2006 * aout-encap.c: Likewise.
2007 * aout-ns32k.c: Likewise.
2008 * aout-target.h: Likewise.
2009 * aout-tic30.c: Likewise.
2013 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
2014 BFDs containing no sections to be merged, regardless of their flags.
2018 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
2019 if a relocation for an undefined symbol also results in an
2024 * config.bfd: Add support for Sun Chorus.
2028 * configure.in: Recognize alpha-*-freebsd*.
2029 * configure: Regenerate.
2033 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
2034 (Chunk): New global variable set by a parameter in objcopy.c.
2035 (S3Forced): New global variable set by a parameter in
2037 (srec_set_section_contents): If S3Forced is true, always generate
2039 (srec_write_section): Use 'Chunk' to limit maximum length of S
2044 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
2045 * Makefile.in: Regenerate.
2046 * bfd-in2.h: Regenerate.
2047 * po/bfd.pot: Regenerate.
2051 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
2052 EF_SOFT_FLOAT if it is defined.
2056 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
2057 attempts to mix PIC code with non-PIC, just mark the output as
2058 being position dependent.
2059 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
2060 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
2061 all mismatches, not just the first one.
2065 * ieee.c (ieee_archive_p): Plug one of many possible
2066 memory leaks in error handling.
2070 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
2071 elf32_sparc_object_p, elf32_sparc_final_write_processing):
2073 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
2074 sparc64_elf_object_p): Support v9b.
2075 * archures.c: Declare v8plusb and v9b machines.
2077 * cpu-sparc.c: Ditto.
2081 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
2084 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
2085 (SYMBOL_CALLS_LOCAL): New macro.
2086 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
2087 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
2088 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
2089 (ppc_elf_relocate_section): Use flag variable to determine
2090 whether the relocation refers to a local symbol.
2091 Test whether a PLTREL24 reloc will produce a reloc by looking
2092 to see whether a PLT entry was made.
2096 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
2097 entries that could serve as a definition for a weak symbol.
2103 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
2104 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
2105 against local symbols.
2106 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
2110 * section.c (struct sec): Add kept_section.
2111 (struct bfd_comdat_info): Remove sec, we can use above.
2112 (STD_SECTION): Add initializer.
2113 (bfd_make_section_anyway): Init here too.
2115 * bfd-in2.h: Regenerate.
2117 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
2119 (elf_link_input_bfd): Set all asection->symbol->value's here, and
2120 fudge values for discarded link-once section symbols.
2122 * elf64-hppa.c: Include alloca-conf.h
2126 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
2128 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
2132 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
2136 * section.c (bfd_make_section_anyway): Release newsect ptr when
2137 newsect->symbol fails to alloc. Use bfd_release instead of free.
2141 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
2142 (elf64_ia64_unwind_entry_compare): New.
2143 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
2147 * elflink.h (size_dynamic_sections): Don't create various tags if
2148 .dynstr is excluded from the link. Don't set first dynsym entry
2149 if dynsymcount is zero.
2150 (elf_bfd_final_link): Don't try to swap out dynamic syms if
2151 .dynsym excluded from the link. Don't try to write any dynamic
2152 sections excluded from the link.
2154 * elf.c (swap_out_syms): Handle global section symbols.
2158 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
2159 * coffcode.h (coff_set_alignment_hook): read extended reloc count
2160 (coff_write_relocs): write extended reloc count
2161 (coff_write_object_contents): account for extended relocs
2165 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
2167 * elf.c (_bfd_elf_make_section_from_shdr): Call the
2168 elf_backend_section_flags function.
2169 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
2171 (elf64_ia64_section_flags): New function containing flag conversion
2173 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
2174 * elfxx-target.h (elf_backend_section_flags): Define.
2175 (elfNN_bed): Initialize elf_backend_section_flags field.
2179 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
2180 _bfd_elf32_gc_record_vtable. Correct a comment.
2186 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
2187 produces binaries with got[1] = 0x80000001 to differenciate them
2188 for the dynamic linker from the broken binaries produced by old
2193 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
2194 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
2195 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
2196 * configure: Regenerate.
2200 Define two bfd_targets for absence and presence of leading
2201 underscore on symbols. Make sure to only link same kind.
2202 * elf32-cris.c (cris_elf_object_p,
2203 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
2204 cris_elf_merge_private_bfd_data): New.
2205 (elf_backend_object_p, elf_backend_final_write_processing,
2206 bfd_elf32_bfd_print_private_bfd_data,
2207 bfd_elf32_bfd_merge_private_bfd_data): Define.
2208 <Target vector definition>: Include elf32-target.h twice with
2209 different macro settings:
2210 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
2211 bfd_elf32_us_cris_vec.
2212 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
2213 (elf_symbol_leading_char): First as 0, then '_'.
2214 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
2215 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
2216 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
2217 * configure: Regenerate.
2218 * targets.c: Declare bfd_elf32_us_cris_vec.
2219 * po/bfd.pot: Regenerate.
2223 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
2224 R_ARM_THM_PC22 relocations.
2228 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
2232 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
2233 is has the SEC_HAS_CONTENTS flag set.
2238 * aout-cris.c (N_TXTADDR): Define.
2242 * som.c: Include alloca-conf.h.
2243 * Makefile.am: "make dep-am"
2244 * Makefile.in: Regenerate.
2248 * elf32-hppa.c (plt_stub): New.
2249 (PLT_STUB_ENTRY): Define.
2250 (elf32_hppa_link_hash_table): Change multi_subspace to packed
2251 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
2252 (elf32_hppa_link_hash_table_create): Init to suit.
2253 (elf32_hppa_check_relocs): Set has_12bit_branch and
2254 has_17bit_branch as appropriate.
2255 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
2256 non-local functions.
2257 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
2258 Add space for plt_stub as needed.
2259 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
2260 functions at plt_stub.
2261 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
2262 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
2264 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
2265 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
2266 of fixed size, and if negative, disable handling of input sections
2267 before stub section. Set up default stub group size depending
2268 on detected branch relocs.
2269 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
2270 ensure different offsets from sym_value aren't rounded to
2271 different 2k blocks. Use lrsel and rrsel for other stubs too for
2272 consistency rather than necessity.
2273 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
2274 (final_link_relocate): Likewise.
2275 (elf32_hppa_relocate_section): Likewise.
2277 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
2278 (_bfd_elf_hppa_gen_reloc_type): Generate them.
2279 (elf_hppa_final_link_relocate): Handle them.
2280 (elf_hppa_relocate_insn): Likewise.
2281 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
2285 * elfcode.h (elf_object_p): Preserve and clear abfd section
2286 information. Restore at error.
2290 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
2291 is empty, make sure that its rva also 0. NT loader dislikes
2296 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
2301 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
2302 currently unused RELATIVE_DYNAMIC_RELOCS code.
2303 (hppa_discard_copies): Likewise.
2304 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
2305 comments. Don't check non-code output sections for stub grouping.
2309 * section.c (bfd_get_unique_section_name): Return NULL if
2314 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
2315 instruction sequence to actually work.
2316 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
2321 * elf32-sh.c (sh_elf_relocate_section): Use
2322 _bfd_final_link_relocate to apply the relocation against a section
2323 symbol, when doing relocatable links.
2327 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
2329 (stub_hash_newfunc): Here too.
2330 (hppa_add_stub): And here.
2331 (elf32_hppa_link_hash_table): Remove stub_section_created,
2332 reloc_section_created, first_init_sec and first_fini_sec. Add
2334 (elf32_hppa_link_hash_table_create): Init to suit.
2335 (hppa_get_stub_entry): Add support for grouping stub sections.
2336 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
2337 section code. Index stub vars by section->id.
2338 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
2339 exit paths. Zap allocation of above removed vars. Refine
2342 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
2343 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2344 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
2345 rather than pointer to bfd_link_info.
2346 (hppa_add_stub): Likewise.
2347 (final_link_relocate): Likewise.
2351 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
2356 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
2357 ld/emulparams/shelf.sh.
2361 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
2362 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
2363 * bfd-in2.h: Regenerate.
2367 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
2368 LITUSE relocations incorrectly if -relax is specified on the ld
2369 command line and the displacement field of the load or store
2374 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
2375 first_fini_sec here.
2376 (elf32_hppa_size_stubs): Instead correctly find the first .init
2377 and .fini section here.
2381 * elf32-hppa.c (clobber_millicode_symbols): New function.
2382 (elf32_hppa_size_dynamic_sections): Call it.
2386 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
2387 packed. Add plabel, plt_abs packed booleans.
2388 (hppa_link_hash_newfunc): Init new fields.
2389 (PLABEL_PLT_ENTRY_SIZE): Define.
2390 (hppa_stub_name): Use size_t len vars.
2391 (hppa_add_stub): Likewise.
2392 (elf32_hppa_build_stubs): Likewise.
2393 (hppa_build_one_stub): Kill some compiler warnings.
2394 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
2395 if dynamic linking. Munge the local plt offsets into
2396 local_got_refcounts. Set h->plabel for all global PLABELs. Use
2397 size_t len vars. Add assert for plabel addend.
2398 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
2399 (elf32_hppa_hide_symbol): New function.
2400 (elf_backend_hide_symbol): Define.
2401 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
2402 with h->plabel set. Don't make plt entries to have dynamic syms
2403 when they have been forced local. If plt entry is used by a
2404 plabel, make it PLABEL_PLT_ENTRY_SIZE.
2405 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
2406 Set up .plt offsets for local syms.
2407 (elf32_hppa_relocate_section): Initialise plt entries for local
2408 syms. Leave weak undefined plabels zero. Make global plabel
2409 relocs against function symbol, and leave the addend zero.
2410 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
2411 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
2412 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
2413 relocs instead of SEGREL32 for dynamic got relocs.
2414 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
2415 (elf_backend_got_header_size): Adjust.
2416 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
2418 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
2419 (hppa_type_of_stub): Use it instead of #if 0
2420 (hppa_discard_copies): Use it here too.
2421 (elf32_hppa_size_dynamic_sections): And here.
2423 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
2424 (elf32_hppa_link_hash_table_create): And here.
2425 (hppa_build_one_stub): And here. Instead keep track of stub
2426 offset using _raw_size.
2427 (elf32_hppa_size_stubs): Likewise.
2428 (elf32_hppa_build_stubs): Likewise.
2429 (hppa_size_one_stub): Likewise. Resize reloc section too.
2431 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
2432 first_fini_sec handling. Don't search for reloc section or set
2433 hplink->reloc_section_created here.
2434 (elf32_hppa_size_stubs): Instead search for reloc sections, and
2435 set reloc_section_created here.
2436 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
2437 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
2439 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
2441 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
2442 with `hplink->root.'.
2443 (elf32_hppa_check_relocs): Likewise.
2444 (elf32_hppa_gc_sweep_hook): Likewise.
2445 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2446 (hppa_handle_PIC_calls): Likewise.
2447 (elf32_hppa_size_dynamic_sections): Likewise.
2448 (elf32_hppa_set_gp): Likewise.
2449 (elf32_hppa_relocate_section): Likewise.
2450 (elf32_hppa_finish_dynamic_symbol): Likewise.
2451 (elf32_hppa_finish_dynamic_sections): Likewise.
2454 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
2455 defined weak symbols in shared links.
2456 (final_link_relocate): Calls to defined weak symbols in shared
2457 objects must go via import stubs, as the target might not be known
2462 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
2463 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
2464 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
2465 the original entries with EMPTY_HOWTOs, and added new ones to fill
2467 (sh_elf_info_to_howto): Make sure the new gap isn't used.
2468 (sh_elf_relocate_section): Likewise.
2472 * cpu-mips.c (arch_info_struct): Add mips:4K
2473 * bfd-in2.h (bfd_mach_mips4K): New define.
2474 * archures.c: Add bfd_mach_mips4K to comment.
2475 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
2476 E_MIPS_ARCH_2 for bfd_mach_mips4K.
2480 * som.c (som_write_symbol_strings): Do not used fixed buffers,
2481 use size_t as a counter.
2482 (som_write_space_strings): Similarly.
2486 * elf32-i860.c (elf32_i860_relocate_pc26): New function
2488 (elf32_i860_relocate_section): Invoke new function from here.
2492 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
2497 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
2498 target section name instead of dumping core when the target symbol is
2503 * riscix.c: Remove DEFUN.
2507 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
2508 initialise flags in output bfd if the input bfd is the default
2509 architecture with the default flags.
2513 * archive.c: Fix formatting.
2514 * coff-arm.c: Likewise.
2515 * doc/chew.c: Likewise.
2519 * section.c (bfd_get_unique_section_name): Put a dot before the
2524 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
2525 * elf.c: Fix formatting.
2529 * config.bfd (sh-*-linux*): Added.
2530 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
2531 * targets.c: Declare them.
2532 * elf32-sh-lin.c: New file.
2533 * Makefile.am: Compile it.
2534 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
2535 * configure, Makefile.in: Rebuilt.
2539 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
2540 pseduo-section when determining where the TOC ends.
2542 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
2543 output x_tvndx as it is only two bytes wide.
2545 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
2546 reloc is 26 or 32 bits wide.
2548 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
2549 for relocs that don't change anything. Also look at the full
2554 * config.bfd (arm*-*-uclinux*): New target.
2558 * configure: Rebuilt with new libtool.m4.
2562 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
2563 word for variable name.
2564 * bfd-in2.h: Regenerate.
2568 * config.in: Regenerate.
2569 * libbfd.h: Regenerate.
2570 * po/bfd.pot: Regenerate.
2571 * doc/bfdint.texi: Remove CVS date string - it foils compares with
2576 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
2580 Shared library and PIC support.
2581 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
2582 (GOT_ENTRY_SIZE): New.
2583 (ELF_DYNAMIC_INTERPRETER): New.
2584 (STUB_SUFFIX): Define.
2585 (LONG_BRANCH_PIC_IN_SHLIB): Define.
2586 (RELATIVE_DYNAMIC_RELOCS): Define.
2587 (enum elf32_hppa_stub_type): New.
2588 (struct elf32_hppa_stub_hash_entry): Rename offset to
2589 stub_offset. Add a number of new fields.
2590 (struct elf32_hppa_link_hash_entry): New.
2591 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
2593 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
2594 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
2595 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
2597 (hppa_link_hash_newfunc): New function.
2598 (elf32_hppa_link_hash_table_create): Use above function. Init new
2600 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
2601 instead of addend, and remove sym_name from args. Don't use
2602 symbol name for local syms, instead use sym index.
2603 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
2604 stub type rather than size. Pass in hash and handle import stub
2605 case. Also pass in reloc instead of offset so we can calculate
2606 PCREL22F and PCREL12F branches properly.
2607 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
2608 import and export stubs too.
2609 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
2610 import and export stub sizing.
2611 (elf32_hppa_check_relocs): New function.
2612 (elf32_hppa_adjust_dynamic_symbol): New function.
2613 (hppa_discard_copies): New function.
2614 (elf32_hppa_size_dynamic_sections): New function.
2615 (elf_backend_size_dynamic_sections): Define.
2616 (elf32_hppa_finish_dynamic_symbol): New function.
2617 (elf_backend_finish_dynamic_symbol): Define.
2618 (elf32_hppa_size_stubs): Stash params in link hash table, and move
2619 some local vars into the link hash table too. For shared links,
2620 trundle over function syms, generating export stubs. Handle
2621 PCREL22F branches. Break out stub creation code from here..
2622 (hppa_add_stub): .. to here. New function.
2623 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
2624 call the bfd linker. Use elf_gp to record global pointer.
2625 Calculate a value from sections if $global$ is missing.
2626 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
2627 (elf32_hppa_gc_mark_hook): New function.
2628 (elf_backend_gc_mark_hook): Define.
2629 (elf32_hppa_gc_sweep_hook): New function.
2630 (elf_backend_gc_sweep_hook): Define.
2631 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
2632 Add rel to args, and remove howto, input_bfd, offset, addend,
2633 sym_name as we can recalculate these locally. Handle calls to
2634 dynamic objects, extra PIC relocs, PCREL22F branches. Change
2635 handling of undefined weak syms. Check that stubs are in range.
2636 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
2637 message on hitting a DPREL21L reloc that needs fixing. Subtract
2638 off PC for PCREL14F. Break out code that does a stub lookup from
2640 (hppa_get_stub_entry): ..to here. New function.
2641 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
2642 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
2644 (elf32_hppa_finish_dynamic_sections): New function.
2645 (elf_backend_finish_dynamic_sections): Define.
2646 (elf_backend_final_write_processing) Define.
2647 (hppa_handle_PIC_calls): New function.
2648 (elf32_hppa_build_stubs): Call it. Pass link_info to
2649 hppa_build_one_stub.
2650 (elf32_hppa_create_dynamic_sections): New function
2651 to create .plt and .got then set .plt flags correctly.
2652 (elf_backend_create_dynamic_sections): Define.
2653 (elf32_hppa_object_p): New function.
2654 (elf_backend_object_p): Define.
2655 (elf32_hppa_elf_get_symbol_type): New function.
2656 (elf_backend_get_symbol_type): Define.
2657 (elf_backend_can_gc_sections): Define.
2658 (elf_backend_want_got_plt): Define.
2659 (elf_backend_plt_alignment): Set to 2.
2660 (elf_backend_plt_readonly): Define.
2661 (elf_backend_want_plt_sym): Define.
2662 (elf_backend_got_header_size): Reserve one entry.
2664 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
2665 (elf32_hppa_size_stubs): Pass in multi_subspace.
2666 (elf32_hppa_set_gp): Declare.
2668 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
2669 (bfd_get_unique_section_name): New function.
2670 * bfd-in2.h: Regenerate.
2672 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
2673 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
2677 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
2678 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
2679 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
2680 been updated in finish_dynamic_symbol before modifying function
2683 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
2684 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
2685 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
2686 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
2687 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
2688 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
2689 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
2690 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
2693 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
2694 style of local labels as well.
2698 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
2699 references to undefined symbols in debugging sections.
2703 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2704 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
2705 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
2710 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
2711 (elf32_i860_is_local_label_name): New function and prototype.
2715 * configure.in: Increase version number to 2.10.91.
2716 * configure: Regenerate.
2717 * aclocal.m4: Regenerate.
2718 * config.in: Regenerate.
2719 * po/bfd.pot: Regenerate.
2723 * elf.c (_bfd_elf_make_section_from_shdr): Add
2724 .gnu.linkobce.wi. to the list of debug section names.
2728 * dwarf2.c (find_debug_info): New function: Locate a section
2729 containing dwarf2 debug information.
2730 (bfd_dwarf2_find_nearest_line): Find all sections containing
2731 debug information and include them in the stash.
2735 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
2736 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
2737 (sh_reloc_map): Add new relocs.
2738 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
2739 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
2740 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
2741 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
2743 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
2744 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2745 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
2746 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2747 New array constants.
2748 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
2750 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2751 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
2752 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
2753 elf_sh_plt_reloc_offset): Define.
2754 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
2755 elf_sh_link_hash_table): New structs.
2756 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
2757 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
2759 (elf_backend_create_dynamic_sections,
2760 bfd_elf32_bfd_link_hash_table_create,
2761 elf_backend_adjust_dynamic_symbol,
2762 elf_backend_size_dynamic_sections,
2763 elf_backend_finish_dynamic_symbol,
2764 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2765 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2766 elf_backend_got_header_size, elf_backend_plt_header_size):
2768 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2769 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
2771 * bfd-in2.h, libbfd.h: Rebuilt.
2775 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
2780 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
2781 not initialized, set them to indicate the SH1 instruction set.
2785 * acinclude.m4: Include libtool and gettext macros from the
2787 * aclocal.m4, configure: Rebuilt.
2791 * elf.c: Eliminate references to __sparcv9 macro; replace with
2792 autoconf variables HAVE_PSINFO32_T etc.
2793 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
2794 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
2796 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
2797 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
2798 * aclocal.m4: Ditto.
2799 * configure: Regenerate.
2803 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
2804 for any shared link, not just shared -Bsymbolic.
2805 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
2806 any shared link, and pass link info to it.
2807 (elf_i386_size_dynamic_sections): Update comment.
2808 (elf_i386_discard_copies): Modify to discard relocs for symbols
2809 that have been forced local.
2810 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
2811 that have been forced local.
2815 * elflink.h (elf_link_add_object_symbols): Allow common
2816 symbols to have an alignment of 1 if explicitly requested, and
2817 not overridden by other definitions.
2821 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
2822 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
2826 * elf-bfd.h (elf_link_hash_table): Add runpath.
2828 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
2829 * bfd-in2.h: Rebuilt.
2831 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
2832 "runpath" field to NULL.
2833 (bfd_elf_get_runpath_list): New function.
2835 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
2840 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
2841 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
2842 explicitly. Improve validation of r_type.
2846 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
2847 dynamic allocated content space. Add a comment to remind us that
2848 one day this ought to be fixed.
2849 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2850 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2851 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2855 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
2856 field with the newly relocated value instead of adding it to the
2857 existing immediate field.
2858 (elf32_i860_relocate_splitn): Likewise.
2859 (elf32_i860_relocate_highadj): Likewise.
2863 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
2864 was previously just a stub).
2868 * elflink.c (_bfd_elf_create_got_section): Don't abort().
2870 (_bfd_elf_create_dynamic_sections): Likewise.
2874 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
2875 for undefined symbols to be the beginning of the section.
2877 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
2878 four extra entries at the beginning of the .rela.plt section.
2879 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
2880 section to account for the four reserved entries in the .plt section.
2884 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
2885 to the list of NOPs we recognize after a branch-and-link.
2886 Use the ori NOP when one is needed.
2888 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
2893 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
2894 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
2895 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
2900 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
2904 * elf32-i860.c (elf32_i860_relocate_section): New function.
2905 (i860_final_link_relocate): New function.
2906 (elf32_i860_relocate_splitn): New function.
2907 (elf32_i860_relocate_pc16): New function.
2908 (elf32_i860_relocate_highadj): New function.
2909 (elf32_i860_howto): Minor adjustments to some relocations.
2910 (elf_info_to_howto_rel): Define.
2911 (elf_backend_relocate_section): Define.
2915 * elf32-arm.h: Fix formatting.
2919 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
2923 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2927 * ieee.c (ieee_write_debug_part): Rewrite a comment.
2928 * elf64-ia64.c: Fix a typo.
2932 * elf32-i860.c (elf32_i860_howto_table): New structure.
2933 (lookup_howto): New function.
2934 (elf32_i860_reloc_type_lookup): New function.
2935 (elf32_i860_info_to_howto_rela): New function.
2936 (elf_code_to_howto_index): New structure.
2937 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
2938 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
2939 elf32_i860_reloc_type_lookup.
2943 * som.c (struct fixup_format): Constify `format'.
2944 (som_hppa_howto_table): Use SOM_HOWTO macro.
2945 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
2946 (som_bfd_reloc_type_lookup): Likewise.
2947 (compare_subspaces): Remove unused `count1', `count2'.
2948 (som_begin_writing): Remove unused `total_reloc_size'.
2949 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
2950 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
2951 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
2952 (som_find_nearest_line): Decorate unused parameter(s).
2953 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
2954 (som_bfd_link_split_section): Likewise.
2958 * section.c: Restore backed out code.
2959 * elf.c: Restore backed out code.
2960 (copy_private_bfd_data): Fix bug preventing stipped dynamic
2961 binaries from working.
2962 * bfd-in2.h: Regenerate.
2966 * section.c: Back out the change made by Nick Clifton
2969 * bfd-in2.h: Likewise.
2974 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
2978 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
2979 * bfd-in2.h, libbfd.h: Regenerate.
2983 * section.c (struct sec): Add new boolean field 'segment_mark'.
2984 (STD_SECTION): Initialise new field to zero.
2986 * bfd-in2.h: Regenerate.
2988 * elf.c (copy_private_bfd_data): Reorganise section to segment
2989 mapping to cope with moved sections requiring new segments,
2990 and overlapping segments.
2991 (SEGMENT_END): New macro: Return the end address of a segment.
2992 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
2993 contains a section by comparing their VMA addresses.
2994 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
2995 contains a section by comparing their LMA addresses.
2996 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
2997 section should be included in a segment.
2998 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
2999 follows another in memory.
3000 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
3005 * cpu-i860.c: Added comments.
3007 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
3008 bfd_elf32_i860_little_vec.
3009 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
3010 (ELF_MAXPAGESIZE): Changed to 4096.
3012 * targets.c (bfd_elf32_i860_little_vec): Declaration of
3014 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
3016 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
3017 config for little endian elf32 i860.
3018 (targ_defvec): Define for the new config above
3019 as "bfd_elf32_i860_little_vec".
3020 (targ_selvecs): Define for the new config above
3021 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
3023 * configure.in (bfd_elf32_i860_little_vec): Added recognition
3026 * configure: Regenerated.
3030 * elflink.h (elf_merge_symbol): Take one more argument,
3031 dt_needed, to indicate if the symbol comes from a DT_NEEDED
3032 entry. Don't overide the existing weak definition if dt_needed
3034 (elf_link_add_object_symbols): Pass dt_needed to
3035 elf_merge_symbol ().
3039 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
3044 * configure.host (*-*-aix*): AIX has 'long long' always.
3046 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
3047 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
3048 (xcoff_write_archive_contents_big): Don't update the offset
3049 of the symbol table, xcoff_write_armap will do it.
3053 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
3054 of dynobj for SGI_COMPAT checks.
3058 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
3059 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
3060 * bfd-in2.h: Regenerate.
3064 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
3065 range symbol indices in relocs and issue an error message.
3069 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
3070 info->new_dtags when setting DT_FLAGS_1. It will only be set
3071 by the new linker options. It shouldn't break anything.
3075 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
3076 only if info->new_dtags is true.
3080 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
3081 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
3085 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
3086 (ALL_MACHINES_CFILES): Add cpu-cris.c.
3087 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
3088 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
3089 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
3090 * Makefile.in: Rebuild.
3091 * aclocal.m4: Rebuild.
3092 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
3093 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
3094 (bfd_cris_arch): Declare.
3095 (bfd_archures_list): Add bfd_cris_arch.
3096 * bfd-in2.h: Rebuild.
3097 * config.bfd: (cris-*-*): New target.
3098 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
3099 * configure: Rebuild.
3100 * elf.c (prep_headers): Add bfd_arch_cris.
3101 * libbfd.h: Rebuild.
3102 * libaout.h (enum machine_type): Add M_CRIS.
3103 * reloc.c: Add CRIS relocations.
3104 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
3105 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
3106 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
3107 * po/POTFILES.in, po/bfd.pot: Regenerate.
3111 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
3112 DF_TEXTREL if DT_TEXTREL is set.
3113 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3114 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3115 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3116 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
3117 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3118 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3119 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
3120 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3121 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
3122 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
3124 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
3125 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
3127 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
3131 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
3132 * bfd-in2.h: Rebuild.
3134 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
3135 (elf_dt_soname): New.
3137 * elf.c (bfd_elf_set_dt_needed_soname): New.
3139 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
3140 entry if the shared object loaded by DT_NEEDED is used to
3141 resolve the reference in a regular object.
3145 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
3146 DT_DEPAUDIT and DT_AUDIT as strings.
3150 * format.c: Fix formatting.
3154 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
3158 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
3159 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
3160 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
3161 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
3162 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
3163 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
3164 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
3168 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
3169 renamed functions from here...
3170 (assign_section_numbers): Use renamed functions.
3171 (prep_headers): Use renamed functions.
3173 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
3174 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
3175 * bfd-in2.h: Regenerate.
3179 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
3180 parenthesis in if statement.
3184 Enable the support for Traditional MIPS.
3185 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
3186 return ict_none appropriately for traditional mips targets.
3187 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
3188 (STUB_MOVE): Conditionalize for traditonal mips.
3189 (STUB_LI16): Likewise.
3190 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
3191 room for RTPROC header.
3192 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
3193 the permission for the PT_DYNAMIC as read, write and execute.
3194 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
3195 for traditonal mips.
3196 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
3197 _DYNAMIC_LINKING for traditonal mips.
3198 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
3199 in case of traditonal mips.
3200 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
3201 entry is required. For a function if PLT is not required then set the
3202 corresponding hash table entry to 0.
3203 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
3205 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
3206 shared object set the value to 0.
3207 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
3208 _DYNAMIC_LINKING for traditonal mips.
3209 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
3210 for traditonal mips.
3214 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
3218 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
3219 out a structure that is BFD_IN_MEMORY.
3223 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
3224 bfd pointer. Print section id instead of bfd pointer for local
3225 syms. Prefix addend with `+' for global syms as well as local.
3226 Correct calculation of name component lengths.
3227 (elf64_hppa_check_relocs): Update call to get_dyn_name.
3230 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
3231 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
3232 (elf64_hppa_modify_segment_map): Likewise.
3236 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
3237 addresses to be "naturally" sign extended. Return -1 if unknown.
3238 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
3239 * bfd-in2.h: Regenerate.
3243 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
3244 and ECOF_SIGNED_64 to list ways to extract an offset.
3245 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
3246 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
3248 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
3249 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
3253 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
3254 bfd_get_start_address.
3255 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
3256 (elf_swap_ehdr_out): Ditto.
3260 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
3261 compatibility with older binutils.
3265 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
3266 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
3269 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
3270 (parse_line_table): Ditto.
3271 (_bfd_dwarf1_find_nearest_line): Ditto.
3272 * syms.c (cmpindexentry): Remove extra `*' from params.
3276 * elf32-mips.c (sort_dynamic_relocs): New Function.
3277 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
3278 via qsort to sort the dynamic relocations in increasing r_symndx
3283 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
3284 ATTRIBUTE_UNUSED to unused args.
3285 (get_opd): Likewise.
3286 (get_plt): Likewise.
3287 (get_dlt): Likewise.
3288 (get_stub): Likewise.
3289 (elf64_hppa_adjust_dynamic_symbol): Likewise.
3290 (elf64_hppa_link_output_symbol_hook): Likewise.
3291 (elf64_hppa_check_relocs): Delete unused var.
3292 (elf64_hppa_size_dynamic_sections): Likewise.
3293 (elf64_hppa_finalize_opd): Likewise.
3294 (elf64_hppa_finalize_dynreloc): Likewise.
3295 (elf64_hppa_modify_segment_map): Likewise.
3296 (elf64_hppa_finish_dynamic_sections): Likewise.
3298 * elf-hppa.h (elf_hppa_final_write_processing): Add
3299 ATTRIBUTE_UNUSED to unused args.
3300 (elf_hppa_final_link_relocate): Likewise.
3301 (elf_hppa_record_segment_addrs): Add paretheses.
3302 (elf_hppa_relocate_section): Constify dyn_name.
3305 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
3306 rearrange case statement so that it gets preferred to 32-bit ones.
3308 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
3309 asection->id instead of address of asection structure.
3310 (elf32_hppa_size_stubs): Likewise.
3312 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
3313 for .init* and .fini*.
3315 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
3316 and addends used in stub names to 32 bits.
3317 (elf32_hppa_size_stubs): Likewise.
3319 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
3320 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
3321 not bfd_put_64. Fix minor comment typo and formatting.
3323 Changes to create multiple linker stubs, positioned immediately
3324 before the section where they are required.
3325 * elf32-hppa.c: Don't include hppa_stubs.h.
3326 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
3327 (elf32_hppa_stub_hash_table): Delete.
3328 (elf32_hppa_link_hash_entry): Delete.
3329 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
3330 stub_hash_table, and store the struct here rather than a pointer.
3331 Delete output_symbol_count. Add offset array. Change
3332 global_value to a bfd_vma.
3333 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
3334 (elf32_hppa_stub_hash_traverse): Delete.
3335 (elf32_hppa_name_of_stub): Delete.
3336 (elf32_hppa_link_hash_lookup): Delete.
3337 (elf32_hppa_link_hash_traverse): Delete.
3338 (elf32_hppa_stub_hash_table_init): Delete.
3339 (elf32_hppa_size_of_stub): Pass input section and offset rather
3340 than location and calculate location here. Don't pass name as all
3341 stubs are now the same size.
3342 (elf32_hppa_stub_hash_newfunc): Init new fields.
3343 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
3345 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
3346 comparing against ints. Rewrite stub handling code.
3347 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
3348 Case enums to int before comparing against ints. Remove
3349 bfd_reloc_dangerous case.
3350 (elf32_hppa_build_one_stub): Rewrite.
3351 (elf32_hppa_size_one_stub): New function.
3352 (elf32_hppa_build_stubs): Rewrite.
3353 (elf32_hppa_size_stubs): Pass in linker call-back functions.
3354 Rewrite stub-handling specific code.
3356 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
3358 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
3360 * hppa_stubs.h: Delete.
3361 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
3362 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
3363 * Makefile.in: Regenerate.
3365 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
3368 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
3370 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
3371 and section name for bfd_reloc_notsupported error message.
3372 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
3373 bfd_reloc_notsupported.
3374 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
3376 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
3377 undefined weak symbols for all relocs.
3378 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
3379 offsets are relative to one past the delay slot.
3380 (elf32_hppa_size_stubs): Account for reloc addend when calculating
3381 branch destination. Put addend into stub name too.
3382 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
3383 adjust by 8 when deciding whether a linker stub is needed. Put
3384 addend into stub name as for above.
3386 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
3387 various args and vars.
3388 (elf32_hppa_bfd_final_link_relocate): Here too.
3389 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
3390 inner block var to avoid shadowing.
3392 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
3394 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
3395 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
3396 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
3398 * libhppa.h: Change practically all unsigned ints to plain ints.
3399 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
3403 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
3404 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
3407 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
3408 to the new OP_* ones.
3410 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
3411 error exit. Bail out earlier on plabel relocs that we aren't
3412 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
3413 string, and then don't free our copy.
3414 (elf32_hppa_build_one_stub): Make insn unsigned int.
3416 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
3417 available with BL, not BE and BLE.
3419 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
3420 code for elf arg relocs.
3421 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
3422 argument with elf_link_hash_entry h. Handle undefined weak
3423 symbols. Move $global$ lookup from here...
3424 (elf32_hppa_relocate_section): ...to here. Return correct error
3425 message for non-handled relocs.
3426 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
3427 wrong test was -0x3ffff to +0x40000.
3429 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
3430 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
3431 Handle them as such.
3432 (elf_hppa_relocate_insn): Fix a typo.
3434 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
3435 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3436 assemble_17, assemble_21): Delete.
3437 Supply defines for all 64 possible opcodes.
3438 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
3439 formats. Handle COMICLR.
3440 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
3443 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
3444 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
3445 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
3447 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
3448 the local syms - did this code get deleted accidentally? Ignore
3449 undefined and undefweak syms.
3451 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
3452 block. Use it instead of elf64_hppa_hash_table (info).
3453 (elf_hppa_final_link_relocate): Use hppa_info instead of
3454 elf64_hppa_hash_table (info).
3456 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3457 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3458 (hppa_rebuild_insn): Mask immediate bits here instead.
3459 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3463 * section.c (struct sec): Add id field. Tidy comment formatting.
3464 (bfd_make_section_anyway): Set id.
3465 (STD_SECTION): Init id too.
3466 Change CONST to const throughout.
3467 * archures.c (bfd_arch_info): Tidy comment.
3468 (bfd_arch_list): Change a CONST to const.
3469 * libbfd-in.h: Tidy comments and replace CONST with const.
3470 * elf-bfd.h: Likewise.
3471 * libbfd.h: Regenerate.
3472 * bfd-in2.h: Regenerate.
3473 * libcoff.h: Regenerate.
3477 * archive.c (_bfd_write_archive_contents): Add an informative
3482 * srec.c: Fix formatting.
3490 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
3491 value of PC-relative offsets.
3495 * elf64-alpha.c (alpha_elf_size_info): New.
3496 (elf_backend_size_info): Define to alpha_elf_size_info.
3497 * elfcode.h (elf_size_info): Change hash bucket size to 4.
3501 * elf32-mips.c: Include elf32-target.h again for the traditional
3506 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
3507 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
3508 (avr_info_to_howto_rela): Likewise.
3509 (elf32_avr_gc_mark_hook): Likewise.
3510 (elf32_avr_gc_sweep_hook): Likewise.
3511 (elf32_avr_relocate_section): Likewise.
3515 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
3516 an external symbol for a non-shared, non-relocatable link.
3520 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
3521 is an external symbol.
3522 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
3527 * reloc16.c: Fix formatting.
3531 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
3532 to add a new target for traditional mips i.e
3533 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
3534 * configure.in: Likewise.
3535 * configure: Rebuild.
3536 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
3538 (bfd_elf32_tradlittlemips_vec): Likewise.
3539 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
3540 to see that elfNN_bed does not get redefined even if the target file
3541 is included twice for a chip. See elf32-mips.c.
3545 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
3546 (CLEANFILES): Add DEPA.
3547 * Makefile.in: Regenerate.
3551 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
3552 can't assume the PE header is at 0x80.
3556 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
3560 * go32stub.h: Update stub.
3564 * archures.c (bfd_mach_avr5): Define.
3565 * bfd-in2.h (bfd_mach_avr5): Define.
3566 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
3567 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
3568 (compatible): Update comment. Add missing test.
3569 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
3570 for avr2 and avr4. Simplify 8K wrap code.
3571 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
3572 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
3576 * coff-h8300.c: Fix formatting.
3577 * cpu-h8300.c: Likewise.
3581 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
3582 for local symbols whose names are unknown.
3586 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
3588 * Makefile.in: Regenerate.
3589 * doc/Makefile.in: Regenerate.
3593 * Makefile.am: Rebuild dependency.
3594 * Makefile.in: Rebuild.
3598 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
3599 (elf_backend_copy_indirect_symbol): Map to the new function.
3603 * archive.c (normalize): Correct pointer comparison when checking
3605 (bfd_bsd_truncate_arname): Likewise.
3606 (bfd_gnu_truncate_arname): Likewise.
3610 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
3611 sections elf_{text,data}_{section,symbol}.
3612 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
3613 (_bfd_mips_elf_hide_symbol): New function.
3614 (elf_backend_hide_symbol): Map to the new function.
3615 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
3616 definitions of mips_elf_{text,data}_{section,symbol}.
3617 (mips_elf_local_relocation_p): Try to find the direct symbol
3618 based on new check_forced argument.
3619 (mips_elf_calculate_relocation): Use new version of
3620 mips_elf_local_relocation_p.
3621 (mips_elf_relocate_section): Likewise.
3622 (_bfd_mips_elf_relocate_section): Likewise.
3623 (mips_elf_sort_hash_table): Only assert that have enough GOT
3625 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
3626 entry if the relocation based on the new external argument.
3627 (mips_elf_create_dynamic_relocation): Assert that we have a
3628 section contents allocated where we can swap out the dynamic
3630 (mips_elf_calculate_relocation): Find the real hash-table entry
3631 correctly by using h->root.root.type. Only create a dynamic
3632 relocation entry if the symbol is defined in a shared library.
3633 Create an external GOT entry for the GOT16 relocation if the
3634 symbol was forced local.
3635 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
3636 dynamic index if the symbol was forced local.
3640 * elf32-mips.c: Fix typos in comments.
3644 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
3649 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
3650 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
3651 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
3652 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
3653 (bfd_elf32_m68hc11_vec): Likewise.
3654 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
3655 Supports 68hc11 & 68hc12 at the same time.
3656 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
3658 (bfd_elf32_m68hc11_vec): Likewise.
3659 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
3660 * archures.c (bfd_m68hc12_arch): Define and register in global list
3661 (bfd_m68hc11_arch): Likewise.
3662 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
3663 BFD_RELOC_M68HC11_3B): Define.
3664 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
3665 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
3669 * elf_bfd.h (struct elf_backend_data): Add info argument to
3670 elf_backend_hide_symbol.
3671 (_bfd_elf_link_hash_hide_symbol): Likewise.
3672 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
3673 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
3674 * elflink.h (elf_link_add_object_symbols): Likewise.
3675 (elf_link_assign_sym_version): Likewise.
3679 * coff-i386.c (coff_i386_reloc): Don't return in case of
3680 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
3681 Compensate PE relocations when linking with non-PE object
3682 files to generate a non-PE executable.
3686 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
3687 GOT entries if we're doing a static link or -Bsymbolic link.
3691 * elflink.h (elf_link_adjust_relocs): Check for and call backend
3692 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
3694 (elf_link_output_relocs): Likewise.
3695 (elf_reloc_link_order): Likewise.
3699 * archures.c (enum bfd_architecture): #define constants for
3700 PowerPc and RS6000 machine numbers.
3701 * bfd-in2.h: Regenerate.
3702 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
3703 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
3704 and RS6000 machine numbers using #defined constants from
3706 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
3707 machine numbers using #defined constants from archures.c. Add
3708 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
3709 64-bit words in 620 entry.
3710 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
3712 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
3716 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
3717 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
3718 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
3722 * bfd-in.h (bfd_family_coff): Define.
3723 * bfd-in2.h: Regenerate.
3724 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
3725 coff_find_nearest_line): Check COFFness using bfd_family_coff()
3726 instead of bfd_target_coff_flavour.
3727 * cofflink.c (_bfd_coff_final_link): Likewise.
3728 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
3729 exclude XCOFF files.
3730 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3732 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
3733 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
3734 * xcofflink.c (XCOFF_XVECP): Delete.
3735 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
3736 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
3737 bfd_xcoff_record_link_assignment,
3738 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
3739 check for bfd_target_xcoff_flavour.
3743 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
3745 (read_hdr): New function.
3746 (rs6000coff_core_p): Store mstsave or __context64 struct instead
3747 of trying to extract individual registers. Set abfd->arch_info
3748 to match the architecture that created the core file.
3749 (rs6000coff_get_section_contents): Delete.
3750 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
3754 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
3759 * configure: Regenerate.
3763 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
3768 * configure.in (VERSION): Update to show this is the CVS mainline.
3772 * elf32-d10v.c: Include elf/d10v.h
3773 (enum reloc_type): Delete.
3774 * elf32-d30v.c: Include elf/d30v.h
3775 (enum reloc_type): Delete.
3777 * Makefile.am: Run "make dep-am" to regenerate dependencies.
3778 * Makefile.in: Regenerate.
3780 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
3781 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
3782 move HOWTOs into elf_howto_table.
3783 (R_386_standard, R_386_ext_offset): Define.
3784 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
3785 (elf_i386_reloc_type_lookup): Modify calculation of index into
3786 elf_howto_table since we've removed the padding.
3787 (elf_i386_info_to_howto_rel): Likewise.
3788 (elf_i386_relocate_section): Likewise.
3792 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
3796 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
3797 an error when seeing an undefined symbol with hidden/internal
3798 attribute. It is handled in *_relocate_section ().
3802 * elflink.h (elf_fix_symbol_flags): Follow the link for the
3803 indirect symbol for the ELF_LINK_NON_ELF bit.
3804 (elf_link_output_extsym): Don't output the indirect symbol even
3805 if the ELF_LINK_NON_ELF bit is set.
3809 * config.bfd (i[3456]86-*-netbsdelf*): New target.
3810 (i[3456]86-*-netbsdaout*): New target.
3811 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
3812 (i[3456]86-*-openbsd*): Likewise.
3816 * trad-core.c: From hpux-core.c, include <dirent.h> or
3817 <sys/ndir.h> when possible.
3821 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
3822 definitions. We must not assume they are sorted in the file
3823 according to their index numbers.
3827 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
3828 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
3829 R_PARISC_DIR17F are for absolute branches; Handle them as such.
3833 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
3834 80960CA, 80960MC as valid machine names.
3838 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
3839 visibility bits if the symbol is undefined. Correctly handle
3840 weak undefined symbols with hidden and internal attributes.
3842 * elflink.h (elf_link_add_object_symbols): Always turn the
3843 symbol into local if it has the hidden or internal attribute.
3847 * ppcboot.c: Add packed attribute if compiling with GCC.
3851 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
3855 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
3856 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
3857 corefile on a 64-bit (Sparc Solaris) host. Also clean up
3862 * Makefile.am: Update dependencies with "make dep-am"
3863 * Makefile.in: Regenerate.
3865 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
3866 bindtextdomain): Replace defines with those from intl/libgettext.h
3867 to quieten gcc warnings.
3871 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
3873 * archive.c (normalize, bfd_bsd_truncate_arname,
3874 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
3875 file names with backslashes.
3877 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
3880 * sysdep.h: Include filenames.h.
3884 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
3888 * elf64-sparc.c (sparc64_elf_relax_section): New.
3889 (sparc64_elf_relocate_section): Optimize tail call into branch always
3891 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3892 (elf32_sparc_relax_section): New.
3896 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
3897 Remove unusued variables.
3898 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
3899 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
3900 previous fix, so that shared libs really don't influence targets
3901 extension mask and memory model.
3905 * elf64-alpha.c (elf64_alpha_relocate_section): Check
3906 h->root.other not h->other.
3907 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3909 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
3913 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
3914 undefined symbol with the non-default visibility attributes.
3915 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3916 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3917 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3918 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3919 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3920 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3921 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3922 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3923 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3924 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
3925 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3929 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
3930 PCREL22, PCREL64I. Zero size of special relocs.
3931 (elf64_ia64_reloc_type_lookup): Likewise.
3932 (USE_BRL, oor_brl, oor_ip): New.
3933 (elf64_ia64_relax_section): New.
3934 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
3935 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
3936 (elf64_ia64_relocate_section): Likewise.
3937 (bfd_elf64_bfd_relax_section): New.
3938 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
3939 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
3940 * bfd-in2.h, libbfd.h: Regenerate.
3944 * configure.in : Add peigen.lo to MIPS PE targets.
3945 * configure: Regenerate.
3949 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
3950 only if it is known for both input and output bfds. Separate
3951 error message strings as in some languages, it may be necessary
3952 to change more than one place in the string to change between
3955 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
3956 endianess checks, call _bfd_generic_verify_endian_match() instead.
3958 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3960 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
3962 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
3963 endianess before checking bfd flavours.
3967 * elflink.h (elf_link_output_extsym): Clear the visibility
3968 field for symbols not defined locally.
3972 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3973 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3974 (hppa_rebuild_insn): Mask immediate bits here instead.
3975 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3979 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
3980 relocs for an executable, ensure that they are virtual addresses.
3984 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
3989 * elflink.h: Add emitrelocations support: when enabled, relocation
3990 information and relocation sections are put into final output
3991 executables. If the emitrelocations flag is set, do the following:
3992 (elf_bfd_final_link): Emit relocation sections.
3993 (elf_link_input_bfd): Compute relocation section contents.
3994 (elf_gc_sections): Don't clean relocation sections.
3998 * som.c (som_decode_symclass): Recognize weak symbols.
4002 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
4003 read idata section only from dataoff.
4004 (pe_print_edata): Correctly check for valid eat_member.
4008 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
4012 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
4016 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
4018 * peigen.c (pe_print_idata): Look for .idata section and print
4019 info even if data directory has zero entries. Read idata section
4020 starting from dataoff, and adjust all data offsets to suit. Cast
4021 all bfd_vma vars to unsigned long before passing to fprintf.
4022 * peigen.c (pe_print_edata): Similarly, look for .edata section
4023 and print info even if data directory has zero entries. Cast
4024 all bfd_vma vars to unsigned long before passing to fprintf.
4027 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
4028 directory size which may be bogus.
4029 * peigen.c (pe_print_edata): Similarly.
4033 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
4035 (copy_private_bfd_data): Allow for space possibly taken up by elf
4036 headers when calculating segment physical address from lma.
4040 * versados.c (versados_scan): Init stringlen and pass_2_done.
4042 * trad-core.c (trad_unix_core_file_p): Return
4043 bfd_error_wrong_format rather than bfd_error_file_truncated.
4045 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
4046 add_data_entry. DataDirectory virtual address is relative.
4047 (pe_print_idata): Account for relative DataDirectory virtual
4048 addresses. Don't trash datasize inside POWERPC_LE_PE code.
4049 (pe_print_edata): Similarly.
4052 * peigen.c (dir_names): Add Delay Import Directory.
4053 (pe_print_idata): Always search for bfd section containing
4054 idata address rather than looking up section name. Print this
4055 section name rather than .idata.
4056 (pe_print_edata): Similarly. Also print some fields as %08lx.
4057 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
4062 * xcoff.h: Rename to xcoff-target.h
4063 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
4064 * coff-rs6000.c: Ditto.
4065 * coff64-rs6000.c: Ditto.
4066 * coff-pmac.c: Ditto.
4067 * Makefile.in: Regenerate.
4071 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
4072 Change U802TOC64MAGIC to U803XTOCMAGIC.
4076 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
4077 * bfd-in.h: Prototype bfd_elf_get_arch_size.
4078 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
4082 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
4086 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
4087 hidden and internal symbols.
4088 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
4090 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
4091 assign a PLT or GOT entry to symbols with hidden and
4092 internal visibility.
4096 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
4098 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4102 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
4107 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
4108 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
4110 * Makefile.in: Regenerate.
4114 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
4115 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
4116 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
4117 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
4118 * Makefile.in: Rebuild.
4122 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
4123 doesn't work very well.
4125 * elf-hppa.h (elf_hppa_internal_shdr): Define.
4126 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
4127 Set hdr->s_type to 1 if ARCH_SIZE == 32.
4128 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
4129 (elf_hppa_info_to_howto): Likewise.
4130 (elf_hppa_info_to_howto_rel): Likewise.
4131 (elf_hppa_reloc_type_lookup): Likewise.
4132 (elf_hppa_is_local_label_name): Likewise.
4133 (elf_hppa_fake_sections): Likewise.
4134 (elf_hppa_final_write_processing): Likewise.
4135 (elf_hppa_howto_table): Fully initialise all entries.
4136 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
4137 (elf_hppa_info_to_howto): Likewise.
4138 (elf_hppa_info_to_howto_rel): Likewise.
4139 (elf_hppa_reloc_type_lookup): Likewise.
4140 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
4141 elf_hppa_unmark_useless_dynamic_symbols,
4142 elf_hppa_remark_useless_dynamic_symbols,
4143 elf_hppa_record_segment_addrs, elf_hppa_final_link,
4144 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
4145 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
4146 elf32-hppa.c mess is cleaned up.
4147 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
4148 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
4149 r_field then call hppa_field_adjust inline func with variable
4150 r_field arg, instead call hppa_field_adjust with fixed arg.
4151 In case R_PARISC_PCREL22F, don't set r_field.
4152 (elf_hppa_relocate_insn): Change args and return type to unsigned
4153 int. Call re_assemble_* funcs to do the work.
4155 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
4158 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
4160 (sign_extend): Mask first before sign extending.
4161 (low_sign_extend): Rewrite without condition expression.
4162 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
4163 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
4164 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4165 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
4166 result as function return value rather than through pointer arg.
4167 Accept unsigned int args, and return unsigned int.
4168 (re_assemble_3): New. Combines function of dis_assemble_3 with
4169 re-assembly of opcode and immediate.
4170 (re_assemble_12): Likewise.
4171 (re_assemble_16): Likewise.
4172 (re_assemble_17): Likewise.
4173 (re_assemble_21): Likewise.
4174 (re_assemble_22): Likewise.
4175 (hppa_field_adjust): Rewrite and document, paying attention to
4176 size of types and signed/unsigned issues.
4177 (get_opcode): Shift before masking.
4178 (FDLW): Rename to FLDW.
4179 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
4180 (hppa_rebuild_insn): Change args and return value to unsigned
4181 int. Make use of re_assemble_*. Correct case 11.
4183 * dep-in.sed: Handle ../opcodes/.
4184 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
4185 elf64-hppa.h, hppa_stubs.h, xcoff.h.
4186 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
4187 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
4188 elfarm-nabi.lo dependencies outside of auto-dependency area.
4189 Regenerate dependencies.
4190 * Makefile.in: Regenerate.
4192 * configure.in (TRAD_HEADER): Test non-null before
4194 * configure: Regenerate.
4196 * reloc.c: Fix mis-spelling in comment.
4200 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
4201 * vms.c (vms_openr_next_archived_file): Return NULL.
4205 * coffcode.h Copy changes mistakenly done to libcoff.h in
4210 * libbfd-in.h: Correctly check GCC version.
4211 * bfd-in.h: Likewise.
4212 * libhppa.h: Likewise.
4213 * libbfd.h: Regenerate.
4214 * bfd-in2.h: Regenerate.
4218 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
4219 coffdu-rs6000.{lo,c}.
4220 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
4222 * Makefile.in: Regenerate.
4223 * xcoff.h: New file.
4224 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
4225 * coff-rs6000.c: Move all declarations and defines that are
4226 common to the xcoff backends into xcoff.h
4227 * coff64-rs6000.c: Ditto,
4231 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
4232 _bfd_coff_force_symnames in strings and
4233 _bfd_coff_debug_string_prefix_length to their default values.
4234 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
4238 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
4239 _bfd_coff_force_symnames in strings and
4240 _bfd_coff_debug_string_prefix_length to their default values.
4244 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
4245 Check local_got_refcounts before dereferencing.
4247 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
4248 before deciding we don't need R_PPC_PLT32 relocation.
4249 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
4252 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
4254 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
4256 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
4257 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
4258 (elf_i386_relocate_section): Allow for .plt to go missing.
4259 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
4260 can use a relative reloc for got as elf_i386_relocate_section.
4261 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
4265 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
4269 * Makefile.am (coff64-rs6000.lo): New rule.
4270 * Makefile.in: Regenerate.
4271 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
4272 xcoff_is_local_label_name, xcoff_rtype2howto,
4273 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
4274 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
4275 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
4276 (NO_COFF_SYMBOLS): Define.
4277 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
4278 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
4280 (MINUS_ONE): New macro.
4281 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
4283 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
4284 coff_SWAP_aux_out): Map to the new functions.
4285 * coff64-rs6000.c: New file.
4286 * libcoff.h (bfd_coff_backend_data): Add new fields
4287 _bfd_coff_force_symnames_in_strings and
4288 _bfd_coff_debug_string_prefix_length.
4289 (bfd_coff_force_symnames_in_strings,
4290 bfd_coff_debug_string_prefix_length): New macros for above fields.
4291 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
4292 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
4293 of using coff_swap_sym_in directly.
4294 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
4295 (coff_set_flags) Set magic for XCOFF64.
4296 (coff_compute_section_file_positions): Add symbol name length to
4297 string section length if bfd_coff_debug_string_prefix_length is
4299 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
4300 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
4301 using coff_swap_lineno_in directly.
4302 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
4303 and _bfd_coff_debug_string_prefix_length fields.
4304 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
4305 symbol names into strings table when
4306 bfd_coff_force_symnames_in_strings is true.
4307 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
4308 SET_RELOC_VADDR): New macros.
4309 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
4310 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
4312 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
4313 changes within RS6000COFF_C specific code.
4314 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
4315 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
4316 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4317 Extend existing hack on target name.
4318 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
4320 * coff-tic54x.c (ticof): Keep up to date with new fields
4321 in bfd_coff_backend_data.
4322 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
4323 targ_selvecs to include rs6000coff64_vec for rs6000.
4324 * configure.in: Add rs6000coff64_vec case.
4325 * cpu-powerpc.c: New bfd_arch_info_type.
4329 * config.bfd: Only disable elf32-hppa vectors, not all of the
4330 BSD and OSF configuration support. Provide (disabled) clauses
4332 * configure.in: Add clause for PA64 support.
4333 * configure: Rebuilt.
4335 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
4336 (bfd_elf64_hppa_vec): Declare.
4338 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
4339 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
4340 (elf64-hppa.lo): Add dependencies.
4341 * Makefile.in: Rebuilt.
4343 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
4347 * libhppa.h (dis_assemble_16): New function.
4348 (pa_arch): Added pa20w element.
4352 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
4353 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
4354 bfd_elf64_slurp_reloc_table.
4356 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
4357 definitions to get external names.
4358 (elf_write_relocs): Renamed from write_relocs and make global.
4359 (elf_slurp_reloc_table): Make global.
4360 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
4362 * archive.c (hpux_uid_gid_encode): New function.
4363 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
4364 defined and the ID is greater than 99999.
4365 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
4366 special uid/gid fields into 32 bit values.
4370 * config.bfd: Add NetBSD/sparc64 support.
4377 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
4378 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
4379 (BFD64_BACKENDS): Add elf64-ia64.lo.
4380 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
4381 (cpu-ia64.lo, elf64-ia64.lo): New rules.
4382 * Makefile.in: Rebuild.
4383 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
4384 (bfd_ia64_arch): Declare.
4385 (bfd_archures_list): Add bfd_ia64_arch.
4386 * bfd-in2.h: Rebuild.
4387 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
4388 * configure: Rebuild.
4389 * configure.host: (ia64-*-linux*): New host.
4390 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
4391 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
4392 * elf.c (prep_headers): Add bfd_arch_ia64.
4393 * libbfd.h: Rebuild.
4394 * reloc.c: Add IA-64 relocations.
4395 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
4397 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
4398 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
4402 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
4403 contents when performing a partial link.
4404 (bfd_elf_d30v_reloc_21): Likewise.
4408 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
4409 patch to symbols defined by a shared object.
4410 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
4415 * dwarf2.c (concat_filename): Avoid string literal concatenation.
4416 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
4420 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
4421 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
4422 (coff-ia64.lo): Add dependency.
4423 * Makefile.in: Regenerate.
4424 * coff-ia64.c: New file.
4425 * efi-app-ia32.c: Ditto.
4426 * efi-app-ia64.c: Ditto.
4427 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
4428 (coff_set_flags): Ditto.
4429 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
4430 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
4431 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
4432 * configure: Regenerate.
4433 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
4434 (PUT_OPTHDR_IMAGE_BASE): Ditto.
4435 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4436 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4437 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4438 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4439 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4440 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4441 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4442 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4443 (GET_PDATA_ENTRY): Ditto.
4444 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
4445 data_start. Use above macros to read fields that are 64 bit wide for
4446 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
4447 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
4448 FileAlignment and SectionAlignment to minimum alignment if they
4450 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
4451 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
4452 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
4453 Use above macros to write fields that are 64 bit wide for
4455 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
4456 5*4 otherwise. This should be right for IA-32 and IA-64, but may
4457 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
4458 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
4459 begin address, end address, and unwind info address only. Use
4460 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
4462 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
4463 HIGH3ADJ relocation names.
4464 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
4465 * targets.c: Declare bfd_efi_app_ia32_vec and
4466 bfd_efi_app_ia64_vec.
4467 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
4468 bfd_efi_app_ia64_vec.
4472 * bfd-in2.h: Add prototypes for tic54x load page access.
4473 * bfd-in.h: Regenerate.
4474 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
4475 in customized _set_arch_mach function.
4476 * coffcode.h (coff_set_alignment_hook): Set section load page if
4477 the appropriate macro is defined.
4478 (write_object_contents): Read section load page.
4482 * elf32-hppa.h: Update copyright date.
4484 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
4485 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
4487 * elf32-d30v.c (MAX32): Don't use LL suffix.
4488 (MIN32): Define in terms of MAX32.
4489 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
4491 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
4494 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
4498 * dep-in.sed: Match space before file name, not after.
4499 * Makefile.am: Regenerate dependencies.
4500 * Makefile.in: Regenerate.
4502 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
4503 case, allow address wrap-around stupidly removed 2000-03-17. Sign
4504 extend without an if statement.
4508 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
4510 * elf32-mips.c (gprel16_with_gp): Likewise.
4511 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
4512 here using -0x40000, not (int)0xfffc0000.
4513 (elf32_hppa_size_of_stub): Likewise.
4517 * coff-tic54x.c: Now builds with all targets.
4518 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
4519 * Makefile.in: Regenerate.
4520 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
4521 unitialized variable.
4525 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
4526 --enable-build-warnings option.
4527 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
4528 * Makefile.in, configure: Re-generate.
4532 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
4533 BFD_RELOC_THUMB_PCREL_BLX.
4535 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4536 R_ARM_XPC25 and R_ARM_THM_PC22.
4538 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
4539 R_ARM_XPC25 and R_ARM_THM_XPC22.
4540 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
4541 R_ARM_[XPC25|THM_XPC22].
4543 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
4544 elf/arm-oabi.h to elf/arm.h
4546 * Makefile.am: Fix dependency for elfarm-oabi.c
4547 * Makefile.in: Regenerate.
4549 * bfd-in2.h: Regenerate.
4550 * libbfd.h: Regenerate.
4554 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
4555 and restore it on failure. Release newly allocated tdata on
4560 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
4561 (decode_line_info): Set it. Report error if unit->line_offset is
4562 equal to or larger than it.
4566 * targets.c: Added vecs for tic54x.
4567 * reloc.c: Added relocs for tic54x.
4568 * libbfd.h: Regenerated.
4569 * configure: Add TI COFF vecs for tic54x.
4570 * configure.in: Ditto.
4571 * config.bfd (targ_cpu): Recognize new tic54x target.
4572 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
4573 * bfd-in2.h: Add tic54x target and relocations.
4574 * Makefile.am, Makefile.in: Add tic54x target.
4575 * archures.c (bfd_archures_list): Add tic54x target.
4576 * coff-tic54x.c: New.
4577 * cpu-tic54x.c: New.
4581 * elfcore.h (elf_core_file_p): call backend_object_p which
4582 thereby gets an opportunity to update the arch/machine type.
4586 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
4587 class. Handle SEC_CLINK and SEC_BLOCK flags.
4588 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
4589 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
4593 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
4594 EF_INTERWORK if this is an unknown EABI.
4595 (elf32_arm_merge_private_bfd_data): Check EABI version
4596 numbers. Only check EF_xxx flags if the EABI version number
4598 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
4599 if the EABI version number is unknown.
4600 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
4601 if the EABI version number is unknown.
4605 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
4606 BFD_RELOC_SH_LOOP_END.
4607 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
4608 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
4609 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
4610 (sh_elf_reloc_loop): New function.
4611 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
4613 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
4614 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
4615 * bfd-in2.h, libbfd.h: Regenerate.
4619 * po/bfd.pot: Regenerate.
4621 * Makefile.am: Remove extraneous mkdep comment.
4622 (MKDEP): Use gcc -MM rather than mkdep.
4623 (DEP): Quote when passing vars to sub-make. Add warning
4625 (DEP1): Rewrite for "gcc -MM".
4626 (CLEANFILES): Add DEP2.
4627 Update dependencies.
4628 * Makefile.in: Regenerate.
4632 * configure.in: Added corefile support for AIX 4.3. In particular,
4633 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
4634 compiling rs6000-core.c.
4635 * configure: Regenerated.
4639 * cache.c (bfd_open_file): Unlink the output file only if
4640 it has non-zero size.
4644 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
4645 relative relocations for non-loaded sections in shared objects.
4646 (elf64_alpha_check_relocs): Similarly.
4650 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
4651 BFD_RELOC_16 to switch for extended relocs.
4652 (MY_swap_ext_reloc_in): New.
4653 (MY_swap_ext_reloc_out): New.
4654 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
4655 than NAME(aout,swap_ext_reloc_in) for extended relocs.
4656 (NAME(aout,squirt_out_relocs)): Similarly use
4657 MY_swap_ext_reloc_out.
4658 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
4662 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
4663 the R_PCRWORD_B case.
4667 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
4673 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
4674 HOWTO references to bfd_elf_generic_reloc, that have
4675 partial_inplace == true, now use the new function. The function
4676 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
4677 extends its fixes to the R_M32R_{16,24,32} relocs.
4678 The new logic in m32r_elf_lo16_reloc() has been removed, and
4679 it instead calls the new routine to obtain that functionality.
4683 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
4684 elf32_avr_check_relocs, avr_final_link_relocate,
4685 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
4686 elf32_avr_object_p): Add prototypes.
4687 (elf32_avr_gc_mark_hook): Add default for h->root.type.
4688 (bfd_elf_avr_final_write_processing): Make static.
4692 * cpu-avr.c: New file. BFD support routines for AVR architecture.
4693 * archures.c (bfd_architecture): Add AVR architecture.
4694 (bfd_archures_list): Add reference to AVR architecture info.
4695 * elf.c (prep_headers): Handle bfd_arch_avr.
4696 * reloc.c: Add various AVR relocation enums.
4697 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
4699 * Makefile.am: Add support for AVR elf.
4700 * configure.in: Likewise.
4701 * config.bfd: Likewise.
4702 * Makefile.in: Regenerate.
4703 * configure: This too.
4704 * bfd-in2.h: And this.
4705 * libbfd.h: And this.
4709 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
4710 (elf64_alpha_find_reloc_at_ofs): Likewise.
4714 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
4715 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
4716 allowable range used to be -2**(n-1) to 2**n-1.
4717 * reloc.c (_bfd_relocate_contents): Same here. Also replace
4718 "boolean overflow" with "bfd_reloc_status_type flag".
4722 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
4726 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
4727 of shrinks properly, including the last reloc.
4731 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
4736 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
4737 a format mismatch rather than an "error" from bfd_read such as
4738 bfd_error_file_truncated.
4742 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
4743 sign-extension and big-endian compensation for
4744 R_MIPS_64 even in ld -r.
4748 * elf32-mips.c (mips_elf_next_relocation): Rename from
4749 mips_elf_next_lo16_relocation, and generalize to look
4750 for any relocation type.
4751 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
4752 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
4753 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
4754 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
4755 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
4756 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
4757 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
4758 (mips_rtype_to_howto): Likewise.
4759 (mips_elf_calculate_relocation): Handle new relocs.
4760 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
4761 are paired. The addend for R_MIPS_GNU_REL16_S2
4762 is shifted right two bits.
4766 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
4767 comment, and ensure it doesn't happen again.
4768 (bfd_install_relocation): Same here.
4769 (_bfd_relocate_contents): Don't bother assigning unused signmask
4770 shift result. Fix typos in comments.
4771 Remove trailing whitespace throughout file.
4775 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
4776 * bfd-in2.h: Rebuild.
4780 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
4782 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
4783 (SIZEOF_ILF_STRINGS): Redefine.
4784 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
4785 relative reloc, as opposed to a section relative reloc.
4786 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
4788 Add length of symbol's prefix to string pointer.
4789 Store a pointer to the symbol in the symbol pointer table.
4790 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
4791 Initialise the symbol pointer table.
4792 Store the hint in the Hint/Name table.
4793 Make the jump reloc be symbol realtive, not section relative.
4794 Create an import symbol for imported code.
4798 * elf.c (swap_out_syms): Check for null type_ptr.
4802 * aout-target.h (MY(write_object_contents)): Remove unused
4803 and unusable "#if CHOOSE_RELOC_SIZE".
4804 * pc532-mach.c (MY(write_object_contents)): Ditto.
4805 * netbsd.h (MY(write_object_contents)): Ditto.
4806 * hp300hpux.c (MY(write_object_contents)): Ditto.
4807 * freebsd.h (MY(write_object_contents)): Ditto.
4808 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
4812 * peicode.h (jtab): Make it static.
4814 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
4815 defined and COFF_IMAGE_WITH_PE is not defined.
4816 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
4817 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
4821 * coff-arm.c (bfd_arm_process_before_allocation): Make
4822 'symndx' signed to prevent compile time warning.
4824 * coff-mcore.c: Remove unused prototype for pe_object_p.
4826 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
4827 functions that are not used when COFF_IMAGE_WITH_PE is
4829 (struct sh_opcode): Change type of 'flags' field to unsigned
4830 long so that it can hold the USESAS flag.
4832 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
4834 * elf-m10300.c (mn10300_elf_relax_section): Initialise
4837 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
4839 Remove unusued variables and code.
4840 (elf_backend_add_symbol_hook): Fix prototype.
4842 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
4845 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
4848 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
4850 Remove unusued variables and code.
4851 (elf_backend_add_symbol_hook): Fix prototype.
4853 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
4855 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
4856 to unused function parameter.
4858 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
4860 Use EMPTY_HOWTO to initialise empty howto slots.
4861 Remove unused variables.
4863 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
4867 * aoutx.h (aout_link_input_section_std): Pass "true" to
4868 the undefined_symbol callback.
4869 (aout_link_input_section_ext): Likewise.
4870 * bout.c (get_value): Likewise.
4871 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4872 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
4874 (alpha_relocate_section): Likewise.
4875 * coff-arm.c (coff_arm_relocate_section): Likewise.
4876 * coff-i960.c (coff_i960_relocate_section): Likewise.
4877 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4878 * coff-mips.c (mips_relocate_section): Likewise.
4879 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4880 * coff-sh.c (sh_relocate_section): Likewise.
4881 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4882 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
4883 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4884 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4885 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4886 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4887 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4888 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4889 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4890 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4891 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4892 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4893 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4894 * elflink.h (elf_link_output_extsym): Likewise.
4895 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
4896 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
4897 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
4899 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
4900 undefined_symbol callback when building shared library with
4901 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
4903 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4904 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4905 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4906 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4907 (elf32_mips_get_relocated_section_content): Likewise.
4908 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4909 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4910 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4911 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4915 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
4916 * Makefile.in: Regenerate.
4918 * configure.in: Add support for mips and sh pe vectors.
4919 * configure: regenerate.
4921 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
4924 * targets.c: Add mips and sh pe vectors.
4926 * libpei.h (coff_final_link_postscript): Only define if not
4929 * coffcode.h: Add support for WinCE magic numbers.
4931 * peigen.c (pe_print_reloc): Update comment and rearrange
4932 appending of newline character.
4934 * peicode.h: Add support for Image Library Format.
4935 (pe_ILF_vars): Structure containing data used by ILF code.
4936 (pe_ILF_make_a_section): New function. Create a section based
4938 (pe_ILF_make_a_reloc): New function. Create a reloc based on
4940 (pe_ILF_make_a_symbol): New function. Create a symbol based
4942 (pe_ILF_save_relocs): New function. Store the relocs created
4943 by pe_ILF_make_a_reloc in a section.
4944 (pe_ILF_build_a_bfd): New function. Create a BFD describing
4946 (pe_ILF_object_p): New function. Return a bfd_target pointer
4948 (pe_bfd_object_p): If an ILF object is detected call
4949 pe_ILF_object_p on it.
4951 * coff-arm.c: Add support for WinCE relocs which are different
4952 from normal ARM COFF relocs.
4953 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
4955 * coff-sh.c: Add support for sh-pe target.
4956 * pe-sh.c: New file. Support code for sh-pe target.
4957 * pei-sh.c: New file. Support code for sh-pe target.
4959 * pe-mips.c: New file. Support code for mips-pe target.
4960 * pei-mips.c: New file. Support code for mips-pe target.
4964 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
4965 architecture if the object causing the bump is dynamic.
4966 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
4967 and also don't it for memory ordering.
4968 (sparc64_elf_write_relocs): Take src_rela out of the loop.
4972 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
4973 calling bfd_get_section_size_before_reloc.
4974 (decode_line_info): Likewise.
4975 (_bfd_dwarf2_find_nearest_line): Likewise.
4979 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
4980 name of the libtool directory.
4981 * Makefile.in: Rebuild.
4985 * som.c (SOM_HOWTO): Define.
4986 (som_hppa_howto_table): Use it.
4990 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
4992 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
4996 * som.c (som_misc_symbol_info): Add field
4998 (som_bfd_derive_misc_symbol_info): Initialize
5000 (som_build_and_write_symbol_table): Keep track
5001 of secondary_def field.
5002 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
5003 if secondary_def field is set.
5004 (som_bfd_ar_write_symbol_stuff): Initialize
5009 * dwarf2.c (read_address): Read 16-bits addresses.
5010 (parse_comp_unit): Accept addr_size == 2.
5014 * bfd-in.h: Update copyright date.
5018 * cpu-i370.c: New file.
5019 * elf32-i370.c: New file.
5020 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
5021 (bfd_i370_arch): New.
5022 (bfd_archures_list): Add bfd_i370_arch.
5023 * elf.c (prep_headers): Add bfd_arch_i370.
5024 * Makefile.am: Add support for IBM 370 elf.
5025 * config.bfd: Likewise.
5026 * configure.in: Likewise.
5027 * libbfd.h (bfd_reloc_code_real_names): Likewise.
5028 * reloc.c (bfd_reloc_code_type): Likewise.
5029 * targets.c: Likewise.
5031 * Makefile.in: Regenerate.
5032 * configure: Regenerate.
5033 * bfd-in2.h: Regenerate.
5037 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
5038 invalid relocation types, and change them to R_386_NONE.
5042 * elflink.h (elf_link_add_object_symbols): If a version symbol is
5043 not defined, don't add a second ELF_VER_CHR.
5045 * elflink.h (elf_bfd_final_link): Call output_extsym for global
5046 symbols converted to local symbols even when stripping all
5048 (elf_link_output_extsym): Process global symbols converted to
5049 local symbols even if they are being stripped.
5053 * archures.c (bfd_octets_per_byte): Return unsigned int.
5054 (bfd_arch_mach_octets_per_byte): Ditto.
5055 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
5057 * section.c (bfd_get_section_size_before_reloc): Quell signed
5058 vs. unsigned comparison warning.
5059 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
5060 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
5061 change. What was I thinking?
5062 * bfd-in2.h: Regenerate.
5064 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
5065 (elf_gc_sections): Same here.
5066 (elf_gc_common_finalize_got_offsets): And here.
5070 ELF HPPA doesn't work at present; remove it until it does.
5071 * config.bfd: Comment out setting targ_defvec to
5073 * Makefile.am: Rebuild dependencies.
5074 (BFD32_BACKENDS): Remove elf32-hppa.lo.
5075 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
5076 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
5077 * Makefile.in: Rebuild.
5078 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
5082 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
5083 is no bfd_free(). Revert bfd_free part of previous change.
5087 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
5089 (coff_compute_section_file_positions): Use bfd_free to pair
5091 (coff_write_object_contents): Likewise.
5093 * coff-rs6000.c (xcoff_howto_table_16): New variable.
5094 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
5098 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
5099 (xcoff_ar_file_hdr_big): New structure.
5100 (SIZEOF_AR_FILE_HDR_BIG): New macro.
5101 (xcoff_ar_hdr_big): New structure.
5102 (SIZEOF_AR_HDR_BIG): New macro.
5103 (xcoff_big_format_p): New macro.
5104 (xcoff_ardata_big): New macro.
5105 (arch_xhdr_big): New macro.
5106 (xcoff_slurp_armap): Handle large archives.
5107 (xcoff_archive_p): Detect large archives.
5108 (xcoff_read_ar_hdr): Handle large archives.
5109 (xcoff_openr_next_archived_file): Handle large archives.
5110 (xcoff_generic_stat_arch_elt): Handle large archives.
5111 (xcoff_write_armap_old): Rename from xcoff_write_armap.
5112 (xcoff_write_armap_big): New function.
5113 (xcoff_write_armap): New function, dispatch to _old or _big.
5114 (xcoff_write_archive_contents_old): Rename from
5115 xcoff_write_archive_contents.
5116 (xcoff_write_archive_contents_big): New function.
5117 (xcoff_write_archive_contents): New function, dispatch to _old or
5122 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
5123 and hide_symbol members.
5124 (elf_link_hash_copy_indirect): Remove.
5125 (elf_link_hash_hide_symbol): Remove.
5126 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
5127 and elf_backend_hide_symbol.
5128 (_bfd_elf_link_hash_copy_indirect): Declare.
5129 (_bfd_elf_link_hash_hide_symbol): Declare.
5130 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
5131 (_bfd_elf_link_hash_hide_symbol): Likewise.
5132 (_bfd_elf_link_hash_table_init): Don't init killed members.
5133 * elflink.h (elf_link_add_object_symbols): Use the bed function
5134 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
5135 (elf_link_assign_sym_version): Likewise.
5136 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
5137 (elf_backend_hide_symbol): Likewise.
5138 (elfNN_bed): Update for new members.
5142 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
5143 STACK_END_ADDR): Define for new core file format.
5144 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
5145 for handling the vagaries of the various core file structures used
5146 by AIX over the years.
5147 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
5148 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
5149 core_dumpx structure.
5153 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
5154 (bfd_mach_sh3_dsp): Likewise.
5155 (bfd_mach_sh4): Reinstate.
5156 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
5157 * bfd-in2.h: Regenerate.
5158 * coff-sh.c (struct sh_opcode): flags is no longer short.
5159 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
5160 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
5161 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
5162 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
5163 (sh_opcodes): No longer const.
5164 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
5165 (sh_insn_uses_reg): Check for USESAS and USESR8.
5166 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
5167 (_bfd_sh_align_load_span): Return early for SH4.
5168 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
5169 Take into account that field b of a parallel processing insn
5170 could be mistaken for a separate insn.
5171 * cpu-sh.c (arch_info_struct): New array elements for
5172 sh2, sh-dsp and sh3-dsp.
5173 Reinstate element for sh4.
5174 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
5175 (SH4_NEXT): Reinstate.
5176 (SH3_NEXT, SH3E_NEXT): Adjust.
5177 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
5178 * elf32-sh.c (sh_elf_set_private_flags): New function.
5179 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
5180 (sh_elf_merge_private_data): New function.
5181 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
5182 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5183 (bfd_elf32_bfd_merge_private_bfd_data): Change to
5184 sh_elf_merge_private_data.
5188 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
5189 hide_symbol members.
5190 (elf_link_hash_copy_indirect): New.
5191 (elf_link_hash_hide_symbol): New.
5192 * elflink.h (elf_link_add_object_symbols): Break out copy from
5193 indirect new new symbol to elf.c.
5194 (elf_link_assign_sym_version): Break out privatization of
5195 non-exported symbol to elf.c.
5196 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
5197 (_bfd_elf_link_hash_hide_symbol): New.
5198 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
5202 * section.c (_bfd_strip_section_from_output): Add info parameter.
5203 If it passed as non-NULL, use it to check whether any input BFD
5204 has an input section which uses this output section. Change all
5206 * bfd-in2.h: Rebuild.
5208 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
5209 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
5211 * bfd-in2.h: Rebuild.
5215 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
5216 allow final modifications of swapped-in symbol.
5217 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
5218 * coffcode.h (coff_write_relocs): Use macro
5219 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
5220 symbol index should be set to -1.
5224 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
5225 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
5226 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
5227 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
5228 sh_insns_uses_or_sets_freg): New functions.
5229 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
5230 * (sh_insns_conflict): Use new functions and new macros to
5231 detect conflicts when two instructions both set same integer registers,
5232 both set same fp register, and both set special register.
5236 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
5237 swapping in sections, so that the swapping routines have access to
5242 * coff-go32.c: Update comment. Update copyright.
5246 * syms.c (bfd_decode_symclass)
5247 Two new class characters were added - 'V' and 'v'. The
5248 meaning of 'W' is now restricted to just weak non-object
5249 symbols. This allows differentiation between, for example,
5250 weak functions vs weak objects. nm for example now dumps:
5252 'w' = weak unresolved
5253 'V' = weak global object
5254 'v' = weak unresolved object
5256 (bfd_is_undefined_symclass): New function. Return true if the
5257 given symbol class represents and undefined/unresolved symbol.
5259 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
5262 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
5264 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
5265 STT_ARM_16BIT flag set, but it is not attached to a data object
5266 return STT_ARM_16BIT so that it will be treated as code by the
5271 * coff-i386.c (i3coff_object_p): Remove prototype.
5274 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
5275 to name. Update copyright.
5277 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
5278 assignment to avoid warning. Update copyright.
5282 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
5283 instead of using GNU C extension.
5287 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
5288 amount from a bfd_in_memory structure.
5289 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
5294 * linker.c (default_indirect_link_order): oops - fix incorrectly
5295 applied patch from Tim Wall.
5299 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
5300 = scnhsz, filhsz, relsz, aoutsz, etc)
5302 * coffswap.h: Ditto.
5306 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
5307 interwork thumb to arm stub.
5311 * archures.c (bfd_octets_per_byte): New function: Return
5313 (bfd_arch_mach_octets_per_byte): New function: Return target
5316 * section.c: Distinguish between octets and bytes for usage of
5317 _cooked_size, _raw_size, and output_offset. Clarify
5318 description of bfd_set_section_contents.
5320 * bfd-in2.h: Regenerate.
5322 * coffgen.c: Indicate that the offset parameter is in bytes, not
5325 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
5326 where appropriate to get the octet offset when calling
5327 bfd_set_section_contents.
5328 (bfd_coff_reloc_link_order): Ditto.
5330 * linker.c (bfd_generic_reloc_link_order): Ditto.
5331 (_bfd_default_link_order): Ditto.
5333 * reloc.c (bfd_perform_relocation): Distinguish between octets
5334 and bytes. Use octets when indexing into octet data; use bytes
5335 when calculating target addresses.
5336 (bfd_install_relocation): Ditto.
5338 * srec.c (srec_write_section): Ditto.
5342 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
5343 3 to 2. This allows 4 byte sized sections, which is necessary for
5344 dlltool to build functioning DLLs.
5348 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
5349 (arm*-*-conix*): New target.
5353 * config.bfd: Include elf32_i386 vector to target list for cygwin
5356 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
5357 * configure.in: Test for structure win32_pstatus_t in
5359 * configure: Regenerate.
5361 * elf.c (elfcore_grok_win32pstatus): New function: process
5362 win32_pstatus_t notes in elf core file.
5363 (elfcore_grok_note): Detect win32_pstatus notes.
5367 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
5369 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
5370 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
5372 For older changes see ChangeLog-9899
5378 version-control: never