3 * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
4 allocate space for a PC relative reloc against a symbol which is
5 defined in a regular file.
6 (elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
7 relative reloc against a symbol which is defined in a regular
13 * config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
15 (mips*el-*-netbsd*): Like mips-dec-netbsd*.
16 (mips*-*-netbsd*): New target.
20 * elflink.h (elf_link_assign_sym_version): Change error message
21 from "undefined version name" to "undefined versioned symbol
26 * coff-arm.c (coff_arm_relocate_section): Fix typo from previous
31 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
34 * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
35 shared. Set stab* sections to be shared and read. Set .rsrc
36 section to be read and shared.
40 * Makefile.am: Rebuild dependencies.
41 (ALL_MACHINES_CFILES): Add dwarf2.lo.
42 (ALL_MACHINES_CFILES): Add dwarf2.c.
43 * Makefile.in: Rebuild.
45 * coff-arm.c: Don't include obstack.h.
49 * config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
54 * configure: Regenerate to get @SHELL@ substituted.
58 * coff-arm.c (coff_arm_relocate_section): Only look at section
59 owner if there is one.
61 * elf.c (assign_file_positions_for_segments): Fail if there is not
62 enough room for the program headers.
66 * elf.c (_bfd_elf_find_nearest_line): Call
67 _bfd_dwarf2_find_nearest_line first.
68 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Same.
69 * dwarf2.c: New file; implement _bfd_dwarf2_find_nearest_line.
74 * elf32-m32r.c (m32r_elf_merge_private_bfd_data): Allow M32R
75 object files to be merged into a M32RX executable.
77 * archures.c: Add bfd_mach_m32rx.
79 * archures.c: Add bfd_mach_m32r.
83 * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
84 (coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
85 to decide when to align the file sections for paging.
87 * coffcode.h (ALIGN_SECTIONS_IN_FILE): Undefine for TIC80COFF.
92 * elf32-m32r.c (m32r_elf_object_p): New Function.
93 (m32r_elf_final_write_processing): New Function.
94 (m32r_elf_set_private_flags): New Function.
95 (m32r_elf_copy_private_bfd_data): New Function.
96 (m32r_elf_merge_private_bfd_data): New Function.
97 (m32r_elf_print_private_bfd_data): New Function.
98 (elf_backend_object_p): Point to m32r_object_p.
99 (elf_backend_final_write_processing): Point to
100 m32r_elf_final_write_processing.
101 (bfd_elf32_bfd_copy_private_bfd_data): Point to
102 m32r_elf_copy_private_bfd_data.
103 (bfd_elf32_bfd_merge_private_bfd_data): Point to
104 m32r_elf_merge_private_bfd_data.
105 (bfd_elf32_bfd_set_private_flags): Point to
106 m32r_elf_set_private_bfd_data.
107 (bfd_elf32_bfd_print_private_bfd_data): Point to
108 m32r_elf_print_private_bfd_data.
111 * cpu-m32r.c: Add m32rx cpu architecture.
112 * bfd-in2.h (bfd_mach_m32rx): Add identifier for M32RX
113 architecture machines.
116 * bfd-in2.h (bfd_mach_m32r): Add identifier for M32R architecture
121 * configure: Only build libbfd shared if --enable-shared's value
122 was `yes', or was set to `*bfd*'.
123 * aclocal.m4: Likewise.
124 * NOTE: this really needs to be fixed in libtool/libtool.m4, the
125 original source of this bit of code. It's not clear what the best fix
130 * linker.c (generic_link_add_symbol_list): Always init udata.p so
131 that the generic relaxation code can function when input and output
132 file formats are mismatched.
136 * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields.
138 * elf.c (assign_file_positions_for_segments): For a loadable
139 section, make sure that the load address is correct relative to
140 the load address of the segment plus the size of the segment so
143 * coffcode.h (_coff_link_output_has_begun): Make static.
144 (_coff_final_link_postscript): Likewise.
148 * elflink.h (elf_link_input_bfd): Handle a relocateable link in
149 which a relocation refers to an indirect or warning symbol.
153 * coff-arm.c (bfd_arm_coff_final_link): Function deleted.
154 (coff_arm_final_link_postscript): New function.
155 (coff_arm_link_output_has_begun): New function.
157 * libcoff.h (struct bfd_coff_backend_data): Add new fields:
158 _bfd_coff_link_output_has_begun and
159 _bfd_coff_final_link_postscript. Add new macros:
160 bfd_coff_link_output_has_begun() and
161 bfd_coff_final_link_postscript().
163 * cofflink.c (_bfd_coff_final_link): Insert calls to
164 bfd_coff_link_output_has_begun() and
165 bfd_coff_final_link_postscript().
167 * coffcode.h: Add two new fields to bfd_coff_backend_data
168 structure: _bfd_coff_link_output_has_begun and
169 _bfd_coff_final_link_postscript. Add default initialisers for
170 these fields. Add overridable aliases for the coff swap functions
171 in the backend data structure.
173 * elf32-v850.c: Update with patches from the branch to fix
174 HI16_S/LO16 reloc pairs.
178 * elf32-d30v.c (d30v_info_to_howto_rela): New function to support
180 (USE_REL): Don't define any more, switch to using RELA
182 (elf_info_to_howto): Define as d30v_info_to_howto_rela.
186 * archures.c (bfd_mach_mips*): Define.
187 (start-sanitize-cygnus):
188 (vr5400, bfd_mach_vr5000): Define.
189 (end-sanitize-cygnus):
190 (bfd_default_scan): For 3000 and 4000 replace magic constant with
193 * cpu-mips.c (N): Define.
194 (bfd_mips_arch, arch_info_struct): Re-write using macro N, replace
195 numbers with bfd_mach_mips* macros.
199 * elf32-v850.c (v850_elf_reloc, v850_elf_store_addend_in_insn,
200 v850_elf_relocate_section): Fix reloc addend handling.
201 (v850_elf_section_from_bfd_section, v850_elf_symbol_processing,
202 v850_elf_add_symbol_hook, v850_elf_link_output_symbol_hook,
203 v850_elf_section_from_shdr, v850_elf_fake_sections): New functions
204 to create and handle special common sections.
205 (v850_elf_final_link_relocate): Fix HI16 and HI16_S relocations
206 which have data stored in the instructions.
210 * coff-arm.c (TARGET_UNDERSCORE): Revert back to '_'
211 (USER_LABEL_PREFIX): Revert back to '_'
213 * config.bfd (targ_cpu): Add support for Thumb target.
217 * coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
218 (get_symbol_value): Handle R_SH_SWITCH8.
219 (sh_relax_delete_bytes): Likewise.
223 * coff-arm.c (TARGET_UNDERSCORE): Changed to match definition in
224 gcc/config/arm/semi.h
226 * coffcode.h (coff_slurp_symbol_table): Add ARM and Thumb symbol
231 * freebsd.h (SWAP_MAGIC): Read magic number little and not big
236 * coffcode.h (coff_mkobject_hook): Only set private flags for non
241 * binary.c (binary_set_section_contents): Also ignore NEVER_LOAD
246 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Do not
247 complain if inout and output formats differ.
251 * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
252 (BFD32_BACKENDS_CFILES): Remove tekhex.c.
253 * Makefile.in: Rebuild.
254 * aclocal.m4, configure, src/Makefile.in: Rebuild with current
255 automake and autoconf.
257 * coff-arm.c (arm_allocate_interworking_sections): Fix typo
258 (COFF_WITH_PR to COFF_WITH_PE).
262 * coff-arm.c: Make variables and some functions static, so that
263 this file can be included in multiple object files.
264 (coff_arm_bfd_final_link): Fix minor bug.
268 * coff-arm.c: Add support for PIC and APCS-FLOAT type binaries.
270 * coffcode.h: Add support for PIC and APCS-FLOAT type binaries.
274 * evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
278 * sunos.c (sunos_add_one_symbol): When overriding a defined
279 symbol, set it to undefined, not new.
281 * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
286 * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
287 (sh_relax_delete_bytes): Don't kill LABEL relocs.
291 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
292 (mn10300_elf_relax_section): Likewise.
296 * peicode.h (coff_swap_aouthdr_in): Cast second arg of
297 bfd_h_get_* calls to "bfd_byte *".
301 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
303 (mn10300_elf_relax_section): Include stack space for register saves
304 in the imm8 field of a "call" instruction.
305 (compute_function_info): Determine how much stack is allocated by
306 the movm instruction. Fix typo.
307 (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
311 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
312 a version dependency could not be found.
316 * configure.com: Get version info from configure.in
320 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
321 New function. Avoid mixing US1 and HAL R1 code.
322 Set resulting memory ordering to the strongest one used.
323 (sparc64_elf_object_p): Set bfd_mach correctly.
327 * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
328 (sparc64_elf_check_relocs): Handle them.
329 (sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
330 check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
334 * configure.in (sparc*-*-linux*): Use trad-core and ...
335 * hosts/sparclinux.h: New file.
339 * config.bfd (sparc64-*-linux*): New target.
341 * elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
342 * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
344 (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
345 Set .plt alignment from new plt_alignment.
346 * elflink.h (elf_link_create_dynamic_sections): Set version section
347 alignment to LOG_FILE_ALIGN.
348 * elfxx-target.h (elf_backend_plt_alignment): Provide default.
349 (elfXX_bed): Init plt_alignment.
351 * elf64-sparc.c (sparc64_elf_check_relocs,
352 sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
353 sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
354 sparc64_elf_finish_dynamic_sections): New functions.
355 (sparc64_elf_howto_table): Fix a few name strings.
356 (ELF_DYNAMIC_INTERPRETER): New definition.
357 (sparc64_elf_relocate_section): Handle shared libraries.
359 * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
360 sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
361 PLT definitions sparc64-linux originally choose. These will go
362 away soon in favour of the official abi definitions.
366 * coff-sh.c (coff_small_object_p): New static function.
367 (coff_small_new_section_hook): New static function.
368 (bfd_coff_small_swap_table): New static const structure.
369 (coff_small_close_and_cleanup): Define.
370 (coff_small_bfd_free_cached_info): Define.
371 (coff_small_get_section_contents): Define.
372 (coff_small_get_section_contents_in_window): Define.
373 (shcoff_small_vec): New static structure.
374 (shlcoff_small_vec): New static structure.
375 * targets.c (bfd_target_vector): Add shcoff_small_vec and
377 * config.bfd (sh-*-elf*): Add shcoff_small_vec and
378 shlcoff_small_vec to targ_selvecs.
380 * configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
381 * configure: Rebuild.
385 * evax-egsd.c: Weak symbols are global.
387 * evax-emh.c: Use proper casts.
389 * evax-egsd.c (_bfd_evax_write_egsd): Remove unneeded uname.
391 * evax-egsd.c: Section names and symbols have different
392 length restrictions. Add length parameter to
393 _bfd_evax_length_hash_symbol.
394 * evax-etir.c: Likewise.
395 * evax-misc.c (_bfd_evax_length_hash_symbol): Add length
397 * evax.h (EOBJ_S_C_SECSIZ): Define.
399 * evax-alpha.c: Remove duplicate test.
401 * evax-emh.c: SYS$ functions are upper-case.
403 * evax-egsd.c: Create separate sections for common symbols.
404 * evax-etir.c: Don't output common section.
405 * evax.h: Bump up section count.
407 * configure.com: Use 64bit integers with DEC C.
409 * evax-egsd.c: Make section flags dec c compatible.
413 * som.c (normalize): Delete function.
414 (som_bfd_ar_write_symbol_stuff): New parameter elength. All callers
415 changed. Use passed in elength to determine size of the extended
416 name table instead of computing it again.
420 * peicode.h (coff_swap_scnhdr_out): Use |= not = to set
421 IMAGE_SCN_MEM_READ for an unrecognized section.
425 * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
426 '/' in the extended name table.
430 * elflink.h (elf_link_assign_sym_version): For explicitly versioned
431 symbols, check globals list before matching on locals.
435 * peicode.h (coff_swap_scnhdr_out,pe_print_idata): Fix mangled
440 * peicode.h (pe_mkobject_hook): Set DLL flag.
441 (pe_bfd_copy_private_bfd_data): Copy DLL flag.
443 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
444 for .stab* sections. Replace strlen of constant strings with
449 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
450 merge got and reloc entries from ind syms to their target.
451 (elf64_alpha_always_size_sections): Call it.
452 (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
453 (elf64_alpha_can_merge_gots): Likewise.
454 (elf64_alpha_merge_gots): Likewise.
456 * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
457 as it is insufficient to handle the relocation changes as well.
461 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
462 relocs for symbols in shlibs that have been forced local.
463 (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
467 * elf64-alpha.c (elf64_alpha_relocate_section): Use the
468 got_enties of the default symbol for the default versioned
474 * elf32-v850.c (v850_elf_final_link_relocate): Only use the bottom
475 24 bits of the PC when computing a PC relative relocation.
479 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate):
480 Correct value for maximum positive 22 bit PC relative relocation.
481 (v850_elf_final_link_relocate): Prevent overflow from HI16_S and
482 HI_16 relocations. Correct bit adjustment in TDA offsets.
486 * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
487 (sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
491 * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
496 * config.bfd: Missed one alpha* change.
500 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove BFD64 support.
501 * elf64-sparc.c (SPARC64_OLD_RELOCS): Undef.
502 (MINUS_ONE): New macro.
503 (sparc_elf_notsup_reloc): New function.
504 (sparc64_elf_howto_table): Add entries for DISP64,PLT64,HIX22,LOX10,
505 H44,M44,L44,REGISTER.
506 (sparc_reloc_map): Likewise. Map BFD_RELOC_CTOR to R_SPARC_64.
507 (init_insn_reloc): New function.
508 (sparc_elf_wdisp16_reloc): Use it.
509 (sparc64_elf_relocate_section): Add entries for OLO10,HIX22,LOX10.
513 * som.c (som_construct_extended_name_table): Remove static
514 function, and define as macro instead.
518 * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
519 recognizes alphaev5 etc.
520 * configure.host: Likewise.
524 Make ld -s work on AIX:
525 * xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
526 section if we are stripping.
527 (bfd_xcoff_size_dynamic_sections): Don't set the .debug section
528 size if we are stripping.
529 (_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
530 and don't write out relocs, if we are stripping.
531 (xcoff_link_input_bfd): Don't set up reloc if we are stripping.
532 (xcoff_write_global_symbol): Don't write out symbol or reloc if we
535 * configure.in: Don't include elf.lo again for ELF targets; it's
536 always in the library anyhow.
537 * configure: Rebuild.
539 * bfd-in2.h: Rebuild.
541 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
542 char *, when calling bfd_get_32 and bfd_put_32.
543 * sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
548 * reloc.c (bfd_check_overflow): New function.
549 (bfd_perform_relocation, bfd_install_relocation): Use it.
550 (BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
551 (BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
552 * bfd-in2.h: Regenerate.
553 * libbfd.h: Regenerate.
557 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
562 * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
563 (stmp-bfd-h): Rename from stmp-bfd.h.
564 (BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
565 ($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
566 (stmp-bin2-h): New target.
567 ($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
568 (stmp-lbfd-h): New target.
569 ($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
570 (stmp-lcoff-h): New target.
571 (CLEANFILES): Change stmp-bfd.h to stmp-bfd-h. Add stmp-bin2.h,
572 stmp-lbfd-h, and stmp-lcoff-h.
573 * Makefile.in: Rebuild.
575 * configure.in: Use a diversion to set enable_shared before the
576 arguments are parsed.
577 * configure: Rebuild.
581 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
582 renamed to R_SPARC_UNUSED_42.
583 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
584 * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
585 renamed to R_SPARC_UNUSED_42.
586 (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
587 * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
588 * bfd-in2.h: Regenerated.
589 * libbfd.h: Regenerated.
593 * elflink.h (elf_merge_symbol): Don't check the hash creator until
594 after we have set *sym_hash.
598 * config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
602 * Makefile.am (libbfd_a_SOURCES): Define.
603 * Makefile.in: Rebuild.
605 * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
606 * aclocal.m4: Rebuild with new libtool.
607 * configure: Rebuild.
611 * elf.c (map_sections_to_segments): Even if we are not demand
612 paged, don't put a loadable section after a nonloadable section.
613 (assign_file_positions_for_segments): Increment the file offset
614 for a section with contents, even if it is not loadable.
618 * elf32-v850.c (v850_elf_final_link_relocate): Add return code
619 indicating that __ctbp could not be found.
623 * elf32-v850.c (v850_elf_check_relocs): Improve error message.
627 * elf32-v850.c (v850_elf_final_link_relocate, v850_elf_reloc,
628 v850_elf_check_relocs, v850_elf_reloc_map, v850_elf_howto_table):
629 Add support for the CALLT relocs.
631 * reloc.c (COMMENT): Add BFD_RELOC_V850_CALLT_6_7_OFFSET and
632 BFD_RELOC_V850_CALLT_16_16_OFFSET.
634 * elf32-v850.c (v850_elf_final_link_relocate): Add checks to catch
635 relocations against non-existant symbols.
639 * reloc.c: Add BFR_RELOC_V850_TDA_16_16_OFFSET.
641 * elf32-v850.c (v850_elf_reloc, v850_elf_final_link_relocate,
642 v850_elf_howto_table, v850_elf_reloc_map): Add support for a 16
643 bit reloc in the tiny data area.
647 Merged changes from Martin Hunt:
649 * elf32-d30v.c (bfd_elf_d30v_reloc): Change pc-relative relocs
650 over 2^32 bytes to be absolute. Needed because D30V PC doesn't
653 * reloc.c, elf32-d30v.c (BFD_RELOC_D30V_9_PCREL,
654 BFD_RELOC_D30V_9_PCREL_R): New relocs.
656 * elf32-d30v.c (bfd_elf_d30v_reloc_21): New function.
657 Do 15 and 21 bit pc-relative relocations.
658 * reloc.c (BFD_RELOC_D30V_15_PCREL_R, BFD_RELOC_D30V_21_PCREL_R):
661 * elf32-d30v.c (bfd_elf_d30v_reloc): Addend needs to be
662 added to the relocation, not or'd.
666 * elf32-v850.c (v850_elf_reloc): Remove spurious error message.
670 * archures.c (bfd_default_scan): Use strcasecmp.
671 (bfd_default_scan): Test for match with arch_name + ":" +
673 (bfd_default_scan): Test for match with printable_name - ":".
674 (bfd_default_scan): Delete w65, h8300, h8500, z8k, i960 special
675 cases. Each implements their own scan function.
676 (bfd_default_scan): Delete 386, 2900, 860, mips 2000, mips 4400
677 special cases. Since info->mach == 0. The test mach == number
679 (bfd_arch_list): New function, return name of all the supported
684 * elf32-v850.c (v850_elf_print_private_bfd_data): Break after
685 decoding architecture.
686 (v850_elf_reloc): Do not complain if a R_V850_LO16 reloc has bit
691 * bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
695 * Makefile.am: Rebuild dependencies.
696 (ALL_MACHINES_CFILES): Add cpu-v850.c.
697 (ALL_MACHINES_CFILES): Add elf32-v850.c.
698 * Makefile.in: Rebuild.
700 * reloc.c: Remove extraneous commas from relocation entries.
701 Remove BFD_RELOC_V850_16_PCREL.
702 * bfd-in2.h: Rebuild.
704 * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
705 in sections named .tocbss rather than .bss.
709 * libbfd.h, bfd-in2.h, elf32-v850.c: Removed
710 BFD_RELOC_V850_16_PCREL.
714 * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
715 the same as C_EXT syms.
716 (coff_link_add_symbols): Ditto.
717 (_bfd_coff_link_input_bfd): Ditto.
718 (_bfd_coff_write_task_globals): Add save_global_to_static. Use
719 it to preserve and restore state of global_to_static flag.
723 * elf32-v850.c (v850_elf_object_p): Set machine number based on
724 bits in e_flags field rather than magic numbers.
725 (v850_elf_final_write_processing, v850_elf_set_private_flags,
726 v850_elf_copy_private_bfd_data, v850_elf_merge_private_bfd_data,
727 v850_elf_print_private_bfd_data): New functions.
731 * elf.c (prep_headers): Remove V850E magic number.
732 * elf.c (prep_headers): Remove V850EA magic number.
736 * cpu-arc.c (arc_get_mach): Properly scan defined mach entries.
740 * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
741 instructions are relative to the next instruction, not the
743 (mn10200_elf_relax_section): Similarly.
747 * cpu-v850.c: Use a macro to construct bfd_arch_info_type
750 * reloc.c, libbfd.h, bfd-in2.h, elf32-v850.c: Replace
751 BFD_RELOC_V850_{SDA/TDA/ZDA}_OFFSET relocs with new bit pattern
752 specific versions: BFD_RELOC_V850_{area}_{bits}_OFFSET.
756 * cpu-v850.c: Remove "plain" from v850 printable name.
757 (scan): Use strcasecmp.
759 * archures.c (bfd_mach_v850): Define.
761 * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
762 just sh/SH, use strcasecmp.
763 (arch_info_struct): Add entries for sh3 et.al.
765 * archures.c (bfd_mach_sh, ...): Define.
769 * archures.c (bfd_archures_list): Always NULL terminate the list.
773 * Makefile.am: Rebuild dependencies.
774 (ALL_MACHINES_CFILES): Add cpu-arc.c.
775 (ALL_MACHINES_CFILES): Add elf32-arc.c.
776 (elf32-arc.lo): Remove explicit dependency.
777 * Makefile.in: Rebuild.
779 * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
780 * doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
781 * aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
785 * configure: Rebuild with latest devo autoconf for NT support
789 * cpu-arm.c (compatible): If B is a default type, return A.
793 * cpu-v850.c (scan): New function.
794 (arch_info_struct): New structure.
795 (bfd_v850_arch): Add link into arch_info_structure.
797 * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
800 * elf32-v850.c (v850_elf_object_p): New function.
802 * archures.c (bfd_mach_v850e): Machine value for v850e.
804 * bfd-in2.h (bfd_mach_v850e): Machine value for v850e.
806 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850e machine
809 * elf.c (prep_headers): Add support for v850e machine number.
811 * archures.c (bfd_mach_v850ea): Machine value for v850ea.
813 * bfd-in2.h (bfd_mach_v850ea): Machine value for v850ea.
815 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850ea machine
818 * elf.c (prep_headers): Add support for v850ea machine number.
822 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
823 cached_stab field if the offset prevents us from using the cache.
827 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
829 * aout-arm.c (aout_arm_little_vec): Likewise.
830 (aout_arm_big_vec): Likewise.
831 * bout.c (b_out_vec_big_host): Likewise.
832 (b_out_vec_little_host): Likewise.
833 * mipsbsd.c (aout_mips_little_vec): Likewise.
834 (aout_mips_big_vec): Likewise.
839 * coff-tic80.c (COFF_ALIGN_IN_SFLAGS): Define to 1.
840 * coffcode.h (styp_to_sec_flags): Ignore incoming STYP_INFO
841 bit in s_flags if COFF_ALIGN_IN_S_FLAGS is defined.
846 * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
847 (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
848 * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
849 * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
850 COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
851 of two for I960 only.
852 * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
853 PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
855 (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
856 GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
857 (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
859 * Makefile.in (coff-tic80.o): Depends upon coffswap.h.
860 * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
861 (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
862 *coffcode.h (coff_write_object_contents): Set alignment field in
863 section header for TIC80COFF files.
868 * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
869 v850_elf_check_relocs, v850_elf_reloc,
870 v850_elf_final_link_relocate): Add support for
871 BFD_RELOC_V850_16_PCREL relocation.
873 * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
876 * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
878 * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
882 * cpu-v850e: New file.
884 * elf.c (prep_headers): Add support for v850e target.
886 * bfd-in2.h (bfd_architecture): Add support for v850e target.
888 * config.bfd: Add support for v850e target.
890 * archures.c: Add support for v850e target.
894 * cpu-v850ea: New file.
896 * elf.c (prep_headers): Add support for v850ea target.
898 * bfd-in2.h (bfd_architecture): Add support for v850ea target.
900 * config.bfd: Add support for v850ea target.
902 * archures.c: Add support for v850ea target.
906 * coffgen.c (coff_find_nearest_line): Correctly handle the offset
907 argument as section relative, rather than an absolute address.
912 * config.bfd (arc-*-elf*): Add.
913 * configure.in (bfd_elf32_{little,big}arc_vec): Add.
914 * configure: Rebuild.
915 * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
916 (BFD32_BACKENDS): Add elf32-arc.lo.
917 (cpu-arc.lo,elf32-arc.lo): Add rules for.
918 * Makefile.in: Rebuild.
919 * archures.c (architecture list): Add bfd_arch_arc.
920 (bfd_archures_list): Add bfd_arc_arch.
921 (bfd_mach_arc_base): Define.
922 * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
923 * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
924 (bfd_target_vect): Add them.
925 * bfd-in2.h, libbfd.h: Rebuild.
926 * cpu-arc.c, elf32-arc.c: New files.
927 * elf.c (pre_headers): Recognize bfd_arch_arc.
931 * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
932 data section is correctly rounded to a page in the file.
936 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
937 there are no symbols.
941 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
942 file system 14 character limit.
943 * Makefile.am, configure.in: Corresponding changes.
944 * Makefile.in, configure: Rebuild.
948 * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
949 Rebuild dependencies.
950 * Makefile.in: Rebuild.
954 * Makefile.am (docdir): Define.
955 * Makefile.in: Rebuild.
959 * configure: Rebuild with autoconf 2.12.1.
963 * aclocal.m4, configure: Rebuild with new automake patches.
967 * rs6000-core.c (make_bfd_asection): New function to add a section
968 to the core file bfd.
969 (rs6000coff_core_p): Use make_bfd_asection to add the core file
971 Use BFD routines to seek, read and stat the core file.
972 Handle .data sections from loaded objects and anonymously mmapped
973 regions, these are available in AIX 4 core files.
977 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
978 * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
979 copy; use a patches libtool instead.
980 * acmacros.m4: Remove.
981 * Makefile.in, aclocal.m4, configure: Rebuild.
985 * Makefile.am: New file, based on old Makefile.in.
986 * acmacros.m4: New file, copied from old aclocal.m4.
987 * acinclude.m4: New file.
988 * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
989 handling; now handled by libtool. Replace AC_CONFIG_HEADER with
990 AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
991 Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
992 .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
993 * acconfig.h: Mention PACKAGE and VERSION.
994 * stamp-h.in: New file.
995 * dep-in.sed: Change .o to .lo.
996 * Makefile.in: Now built with automake.
997 * aclocal.m4: Now built with aclocal.
998 * config.in, configure: Rebuild.
1003 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
1004 if there is only a relocation to a read-only but not allocatable
1005 section (like .stab).
1006 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1007 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1008 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1009 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
1010 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1012 * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
1013 (ppc_elf_create_linker_section): These sections are not
1014 created by the linker (that is, they are created by the user
1015 putting data in them). In particular, they can be the source
1016 and target of relocations.
1017 (ppc_elf_adjust_dynamic_symbol): Check postcondition of
1018 bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
1019 objects (for instance, 'long double') to 16-byte boundaries.
1020 (ppc_elf_size_dynamic_sections): Make the code that generates
1021 section symbols exactly the same as for sparc, reducing the
1022 number of section symbols output.
1023 (ppc_elf_check_relocs): Check postcondition of
1024 bfd_elf32_link_record_dynamic_symbol. Make default case the
1025 same as corresponding code for sparc, fixing bug involving
1027 (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
1028 forced to be local because of versioning (by replicating
1029 corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
1030 as usual in ELF, not as pseudo-REL relocs (as the sparc linker
1032 (ppc_elf_relocate_section): Add handy debugging code for when
1033 assertion fails. Add some more 'symbol made local because of
1036 * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
1037 processing a GOT relocation as required by ABI.
1041 * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
1042 version info if this symbol came from a dynamic object.
1043 (elf_link_add_object_symbols): Set the version info of a symbol
1044 only if the object actually contains version definitions and
1045 defines this symbol.
1049 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
1050 * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
1052 * configure: Regenerated with autoconf 2.12.
1053 * doc/Makefile.in: Add $(EXEEXT) to chew executable.
1057 * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
1058 a warning rather than returning an error.
1062 * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
1066 * cisco-core.c: define signals for wingdb.
1070 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
1071 the same number of aux entries.
1075 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
1076 difference of two symbols if the relocation size is 32 bits.
1077 (som_write_fixups): Handle R_DATA_EXPR.
1081 * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
1082 its value if COFF_WITH_PE is defined.
1086 * coff-stubgo32.c: New file.
1087 * go32stub.h: New file.
1088 * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
1089 * coffswap.h (coff_swap_filehdr_in): Invoke
1090 COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
1092 (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
1093 COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
1094 (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
1095 COFF_ADJUST_AUX_IN_POST if they are defined.
1096 (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
1097 COFF_ADJUST_AUX_OUT_POST if they are defined.
1098 (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
1099 COFF_ADJUST_SCNHDR_IN_POST if they are defined.
1100 (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
1101 COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
1102 * targets.c (go32stubbedcoff_vec): Declare.
1103 (bfd_target_vector): Add go32stubbedcoff_vec.
1104 * configure.in (go32coff_vec): New target vector.
1105 (go32stubbedcoff_vec): Likewise.
1106 * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
1107 (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
1108 * Makefile.in: Rebuild dependencies.
1109 (BFD32_BACKENDS): Add coff-stubgo32.o.
1110 (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
1111 (HFILES): Add go32stub.h.
1115 * configure.in: Check for fdopen.
1116 * configure, config.in: Rebuild.
1117 * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
1118 __GO32__. Reindent a bit.
1122 * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
1123 flag for newly created sections.
1124 (sunos_add_dynamic_symbols): Don't discard newly created sections
1125 if shared library is dynobj.
1129 * elf.c (map_sections_to_segments): When checking whether
1130 including a section in a segment would force us to skip a page,
1131 align the address of the next segment to avoid wraparound
1134 start-sanitize-tic80
1137 * coffcode.h (coff_write_object_contents): Initialize
1138 target id field to TIC80_TARGET_ID.
1139 * coffswap.h (coff_swap_filehdr_out): Swap out target id field
1141 (coff_swap_filehdr_in): Swap in target id field if used.
1146 * coff-i386.c (coff_i386_is_local_label_name): New static function
1147 if TARGET_UNDERSCORE.
1148 (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
1149 (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
1153 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
1154 complain_overflow_signed, for 32 bit PC relative relocations.
1158 * elflink.h (elf_link_add_object_symbols): When a version
1159 indirection symbol is overridden, make the original symbol point
1160 at the real overriding symbol.
1162 * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
1165 * elflink.h (elf_link_output_extsym): Use the right section for a
1167 * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
1168 symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
1172 * elflink.h (elf_merge_symbols): Resolve indirect and warning
1173 symbols before checking for new symbols.
1175 * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
1179 * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
1180 file, not aoutsz bytes (they are different in XCOFF .o files).
1182 * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
1183 redefined by objects included from archives.
1187 * elflink.h (elf_merge_symbol): In the case of a new defined
1188 symbol overriding an old defined symbol, return the hash table
1189 entry which we modify, even if it is the target of an
1191 (elf_link_add_object_symbols): If the real name of the symbol gets
1192 overridden, convert the versioned symbol into an indirect symbol
1195 * elflink.h (elf_merge_symbol): New static function, broken out of
1196 elf_link_add_object_symbols.
1197 (elf_link_add_object_symbols): Call it.
1201 * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
1202 handle case where COFF filehdr does not immediately follow PE
1204 * coffgen.c (coff_object_p): Remove useless seek to current
1209 * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
1214 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
1215 symbols, skip N_ABS symbols with debugging storage classes.
1219 * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
1220 relocs in shared libraries which refer to local symbols. Cope
1221 with addend when processing a GOT relocation.
1223 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
1224 for sections that the linker didn't create.
1225 (ppc_elf_finish_dynamic_sections): Only try to write out a section
1226 symbol if it was created in ppc_elf_size_dynamic_sections.
1227 (ppc_elf_relocate_section): Complain if we have to generate a reloc
1228 relative to a section for which we didn't output a symbol.
1230 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
1231 relocs are 'rela' relocs, like everything else. .rela.plt is not
1232 a read-only section, so we don't have to special-case it.
1234 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
1235 .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
1237 * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
1238 (ppc_elf_relocate_section): @got offsets are 4 from start of the
1239 actual .got section.
1240 * elflink.c (_bfd_elf_create_got_section): The three reserved
1241 words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
1243 * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
1246 * elf32-ppc.c (ppc_elf_check_relocs): Use
1247 _bfd_elf_create_got_section to create the GOT rather than
1248 ppc_elf_create_linker_section. Create the '.rela.got' section
1250 (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
1251 symbol has a GOT entry.
1252 (ppc_elf_relocate_section): Record when a symbol is used through
1253 the GOT, and allocate space in the GOT for each such symbol.
1254 (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
1255 (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
1258 * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
1259 treated in a similar way to ADDR16_HA relocs.
1260 (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
1261 shared objects; the linker must deal with them.
1262 (ppc_elf_create_linker_section): Stop setting
1263 _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
1264 LINKER_SECTION_PLT stuff.
1265 (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
1266 (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
1267 section, not ELF-specific calls.
1268 (elf_backend_plt_not_loaded): Set to 1.
1269 (elf_backend_got_symbol_offset): Set to 4.
1270 * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
1271 for when ld.so fills in the PLT; and 'got_symbol_offset' member.
1272 * elflink.c (_bfd_elf_create_dynamic_sections): Apply
1273 plt_not_loaded member.
1274 (_bfd_elf_create_got_section): Apply got_symbol_offset.
1275 * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
1277 (elf_backend_G_O_T_offset): Set default to 0.
1278 (elfNN_bed): Set added fields.
1280 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
1281 DT_RELENT in shared objects; should be DT_RELAENT.
1283 * elf32-ppc.c (ppc_elf_relocate_section): Propagate
1284 R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
1285 such a reloc (in a non-shared object) refers to a symbol that's
1290 * elfcode.h (put_signed_word): Define.
1291 (get_signed_word): Define.
1292 (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
1293 (elf_swap_reloca_out): Use put_signed_word for the r_addend
1295 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
1296 bfd_get_signed_32 to set the r_addend field.
1297 * elf64-mips.c (mips_elf64_swap_reloca_in): Use
1298 bfd_h_get_signed_64 to set the r_addend field.
1302 * elf32-i386.c (elf_i386_relocate_section): When generating a
1303 shared library, do the relocation if the input section is not
1304 allocated in memory.
1306 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
1307 elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
1308 (elf_fix_symbol_flags): New static function, broken out of
1309 elf_adjust_dynamic_symbol.
1310 (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
1311 (elf_link_assign_sym_version): Likewise. Permit a symbol to be
1312 forced local even if NEEDS_PLT is set. When forcing a symbol to
1313 be local, clear NEEDS_PLT.
1314 (elf_link_output_extsym): Remove unused local bed.
1318 * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
1319 for derived elf linker hash table entries. References to
1320 elf_link_hash_entry changed appropriately.
1321 (elf32_mn10300_link_hash_table): New structure for derived elf
1323 (elf32_mn10300_hash_table): Define.
1324 (elf32_mn10300_link_hash_traverse): Likewise.
1325 (elf32_mn10300_link_hash_newfunc): New function.
1326 (elf32_mn10300_link_hash_table_create): Likewise.
1327 (elf32_mn10300_finish_hash_table_entry): Likewise.
1328 (mn10300_elf_relax_section): Handle "call" -> "calls", removal
1329 of prologue code, and call:32->call:16 relaxing.
1330 (compute_function_info: New function.
1331 (bfd_elf32_bfd_ilink_hash_table_create): Define.
1335 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
1336 for a symbol which is being forced to be local.
1337 * elf32-i386.c (elf_i386_relocate_section): Write out the
1338 relocation value for a GOT reloc for a symbol which is turning
1339 into a local symbol.
1340 (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
1341 local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
1343 * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
1345 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
1346 value if the symbol is turning into a local symbol.
1347 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1348 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1352 * elflink.h (elf_link_add_object_symbols): Also read verneed
1353 information by calling `_bfd_elf_slurp_version_tables'.
1354 (elf_link_add_object_symbols): For undefined symbols look for
1355 version information in the verneed records.
1356 (elf_link_add_object_symbols): Use soname of shared object
1357 for verneed record if it is available.
1361 * cpu-arm.c: Add prototypes for compatible and scan.
1362 * cofflink.c: Add prototype for mark_relocs.
1364 * archive.c (bfd_special_undocumented_glue): Change filename to
1365 const pointer. Add prototype.
1369 * elflink.h (elf_link_add_object_symbols): Ignore relocations of
1370 sections that will be discarded.
1374 * elflink.h (elf_link_find_version_dependencies): When searching
1375 for known version symbol skip non-matching verdef records, not
1380 * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
1381 not a bfd_vma, to the base file, to match how dlltool reads it.
1385 * reloc.c: Add thumb relocations.
1387 * bfd-in2.h: Add Thumb relocations.
1389 * libbfd.h: Add Thumb relocations.
1393 * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
1397 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
1398 for a section even if it is not loaded.
1400 * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
1402 (_bfd_coff_link_input_bfd): Separate section VMA handling for
1403 input and output files.
1404 (_bfd_coff_generic_relocate_section): Check whether input file,
1405 not output file, is a PE file.
1409 * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
1413 * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
1418 * cpu-arm.c (compatible): Add test for supersets of ARM
1423 * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
1428 * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
1429 called directly by gas/config/tc-arm.c.
1433 * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
1434 (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
1438 * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
1443 * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
1444 (coff_bfd_copy_private_bfd_data): Ditto.
1445 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
1446 (coff_arm_bfd_print_private_bfd_data): Ditto.
1447 (coff_arm_bfd_set_private_flags): Ditto.
1448 (coff_arm_bfd_copy_private_bfd_data): Ditto.
1452 * libcoff-in.h (struct coff_final_link_info): Add boolean
1453 global_to_static member for support of task linking.
1454 (_bfd_coff_write_task_globals): Add prototype.
1455 * libcoff.h: Regenerate.
1456 * coffcode.h (coff_write_object_contents): Use #ifdef to
1457 check RS6000COFF_C, to be consistent with all other uses
1459 * cofflink.c (_bfd_coff_final_link): If doing task linking,
1460 call _bfd_coff_write_task_globals.
1461 (_bfd_coff_link_input_bfd): If doing task linking, convert
1462 global functions to static.
1463 (_bfd_coff_write_global_sym): If doing task linking, convert
1464 global variables to static.
1465 (_bfd_coff_write_task_globals): New function.
1466 start-sanitize-tic80
1467 * coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
1468 (C_AUTOARG): #undef since it clashes with C_UEXT.
1469 (C_LASTENT): #undef since it clashes with C_STATLAB.
1470 * coffcode.h (coff_write_object_contents): Use TIC80COFF
1472 (coff_slurp_symbol_table): Use C_SYSTEM. Hide C_AUTOARG use
1473 when TIC80COFF defined (clashes with C_UEXT). Explicitly
1474 recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
1477 start-sanitize-tic80
1480 * coff-tic80.c (tic80_howto_table): Change overflow check for most
1481 PP relocations to complain_overflow_dont.
1485 * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
1486 name of R_RELLONG to "RELLONG". Set rightshift and complain for
1488 (ppbase_reloc, glob15_reloc): New static functions.
1489 (glob16_reloc, local16_reloc): New static functions.
1490 (rtype2howto): Handle all relocation types.
1491 (coff_tic80_relocate_section): New static function.
1492 (coff_relocate_section): Define to coff_tic80_relocate_section.
1493 * Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
1498 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
1499 COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
1501 * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
1502 callers. If PE file, don't add section VMA.
1503 (coff_write_alien_symbol): If PE file, don't add section VMA.
1504 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1505 (_bfd_coff_write_global_sym): Likewise.
1506 (_bfd_coff_generic_relocate_section): Likewise.
1508 * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
1513 * cofflink.c (mark_relocs): Add new function to mark symbols which
1514 are used by relocations.
1515 (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
1516 suppress the skipping of symbols that have thus been marked.
1520 * coff-sh.c (sh_merge_private_data): New static function.
1521 (coff_bfd_merge_private_bfd_data): Define.
1523 start-sanitize-tic80
1526 * coff-tic80.c: Remove unnecessary #ifdefs.
1527 * config.bfd: Set targ_underscore to yes for tic80.
1531 * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
1532 with unresolved external symbols in GDB).
1537 * elf-m10300.c (elf32_mn10300_relax_section): Read in all
1538 the symbols associated with each BFD.
1539 (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
1541 * elf-m10200.c: Likewise.
1542 * elf32-m32r.c: Likewise.
1543 * elf32-sh.c: Likewise.
1547 * elflink.h (elf_link_add_object_symbols): Don't decrease the
1548 alignment of a common symbol. If two symbols that look like
1549 common symbols are found in two shared libraries, and the size is
1550 different, use the larger size, and warn if --warn-common. If a
1551 common symbol overrides a definition in a shared library, set the
1552 size to the larger size, and warn if --warn-common.
1556 * cpu-arm.c (compatible): Allow default machine to be polymorphed
1557 into any other machine type.
1559 * coffcode.h (coff_set_flags): Initialise flags variable to 0.
1561 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
1562 data into an unitialised destination set its machine type as well.
1566 * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
1567 to common symbol size. Consistently treat uninitialized symbols
1568 in shared objects as common symbols.
1572 * archures.c (constants): Added new constants to identify the
1573 type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
1574 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
1576 * bfd-in2.h (constants): Added new constants to identify
1577 the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
1578 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
1579 bfd_mach_arm_4T. This file is auto-magically generated from the
1580 archures.c file. This update is just to save work.
1582 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
1583 coff_arm_bfd_print_private_bfd_data,
1584 coff_arm_bfd_set_private_flags,
1585 coff_arm_bfd_copy_private_bfd_data): Added these new functions.
1586 (global): Macro redefinitions set up to use these new functions.
1588 * coffcode.h (coff_mkobject_hook): Added call to
1589 coff_arm_bfd_set_private_flags().
1590 (coff_set_arch_mach_hook): Added code to set machine type based on
1591 bits stored in internal flags.
1592 (coff_set_flags): Added code to set the new bits in the flags
1593 field based on the machine number.
1594 (function definition macros): Made all function definition macros
1595 conditional so that they can be overridden by target specific
1598 * cpu-arm.c (compatible): Added this function. (arch_info_struct):
1599 Structure extended to include new types, one each for ARMv2,
1600 ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
1602 * libcoff-in.h (struct coff_tdata): Added flags field.
1606 * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
1608 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
1613 * coffgen.c (coff_find_nearest_line): If there are no syments,
1618 * config.bfd: cope with '*-*-linux-gnuaout' targets.
1622 * targmatch.sed: Add explicit \n characters to work around bug in
1623 HP/UX 10.20 sed program.
1627 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
1632 * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
1636 * elf32-m68k.c: Follow the last changes in elf32-i386.c:
1637 (struct elf_m68k_pcrel_relocs_copied, struct
1638 elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
1639 elf_m68k_link_hash_traverse, elf_m68k_hash_table,
1640 elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
1641 elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
1643 (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
1644 PC relative relocs for a global symbol defined in a regular
1645 object, and count the number of PC relative relocs copied for any
1647 (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
1648 traverse with elf_m68k_discard_copies.
1652 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
1655 * coffcode.h (coff_compute_section_file_positions): Force the
1656 potential last byte in the file to be written out when
1661 * configure.host (mips*-*-openbsd*): New host.
1665 * elflink.h (elf_link_add_object_symbols): Only subtract the
1666 section VMA from the symbol value if this is a fully linked file.
1668 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
1669 (struct elf_i386_link_hash_entry): Define.
1670 (struct elf_i386_link_hash_table): Define.
1671 (elf_i386_link_hash_traverse): Define.
1672 (elf_i386_hash_table): Define.
1673 (elf_i386_link_hash_newfunc): New static function.
1674 (elf_i386_link_hash_table_create): New static function.
1675 (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
1676 PC relative relocs for a global symbol defined in a regular
1677 object, and count the number of PC relative relocs copied for any
1679 (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
1680 traverse with elf_i386_discard_copies.
1681 (elf_i386_discard_copies): New static function.
1682 (bfd_elf32_bfd_link_hash_table_create): Define.
1685 * aoutf1.h (MY_entry_is_text_address): Define if not defined.
1686 (sunos4_aout_backend): Use MY_entry_is_text_address.
1690 * elf32-d30v.c (elf_d30v_howto_table): Changed size of
1691 R_D30V_32_NORMAL to 2 (4 bytes).
1696 * netbsd.h (N_SHARED_LIB): Define.
1697 (SEGMENT_SIZE): Don't define.
1698 * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
1700 * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
1701 (SEGMENT_SIZE): Don't define.
1703 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
1704 to sizeof Rela structure, not sizeof Rel structure. From Gary
1709 * aout-target.h (MY(callback)): If entry_is_text_address, adjust
1710 whenever entry is larger than text address, but only by whole
1713 * Makefile.in (install): Depend upon installdirs. Use
1714 mkinstalldirs to build $(oldincludedir).
1715 (installdirs): New target.
1717 * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
1718 if this is a debugging section which we are stripping.
1722 * elf64-alpha.c (elf64_alpha_object_p): Allocate the
1723 alpha-specific target data struct.
1728 * Makefile.in: Always use $(SHELL) when running move-if-change.
1729 * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
1730 * configure: Rebuild.
1734 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
1735 VMA if this is an executable file or a shared object.
1737 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
1740 * libaout.h (struct aout_backend_data): Add entry_is_text_address
1742 * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
1743 start of the file. Remove uses later on which switch using
1745 (MY(callback)): Handle entry_is_text_address.
1746 (MY_entry_is_text_address): Define if not defined.
1747 (MY(backend_data)): Initialize new field.
1748 * aoutf1.h (sunos4_aout_backend): Likewise.
1749 * i386aout.c (MY(backend_data)): Likewise.
1750 * i386mach3.c (MY(backend_data)): Likewise.
1751 * mipsbsd.c (MY(backend_data)): Likewise.
1752 * sparclynx.c (sparclynx_aout_backend): Likewise.
1753 * netbsd.h (SEGMENT_SIZE): Define if not defined.
1754 (MY_entry_is_text_address): Define.
1755 * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
1757 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
1758 whose name starts with `.'.
1762 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
1763 mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
1764 powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
1765 * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
1766 m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
1767 sparc-*-openbsd*): New targets.
1768 * configure: Rebuild.
1772 * stabs.c (struct stab_section_info): New field
1774 (_bfd_link_section_stabs): Fill the above array.
1775 (_bfd_stab_section_offset): Use `cumulative_skips' to
1776 speed up offset calculation.
1780 * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
1781 addend for non pc-relative relocations.
1783 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
1784 for non-existent function.
1786 * elf-m10300.c (mn10300_elf_relax_section): New function.
1787 (mn10300_elf_relax_delete_bytes): Likewise.
1788 (mn10300_elf_symbol_address_p): Likewise.
1789 (mn10300_elf_get_relocated_section_contents): Likewise.
1790 (bfd_elf32_bfd_relax_section): Define.
1791 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1795 * configure.host: Set SHLIB_LIBS.
1796 * configure.in: Substitute SHLIB_LIBS.
1797 * configure: Rebuild.
1798 * Makefile.in (SHLIB_LIBS): New variable.
1799 ($(SHLIB)): Use $(SHLIB_LIBS).
1803 * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
1804 with bfd_section_vma.
1808 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
1809 Correct CPU file names for mn10[23]00.
1810 * configure: Rebuild.
1812 * bfd.c (bfd_record_phdr): Cast count to size_t before
1815 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
1816 * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
1817 (xcoff_write_archive_contents): LIkewise.
1818 * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
1819 (mips_elf_create_procedure_table): Likewise.
1820 * peicode.h (pe_print_idata): Likewise.
1821 (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
1822 * xcofflink.c (xcoff_get_section_contents): Likewise.
1823 (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
1824 (xcoff_link_add_symbols): Likewise.
1825 (xcoff_link_add_symbols): Likewise.
1827 * ppcboot.c (ppcboot_set_arch_mach): Make static.
1828 (ppcboot_bfd_print_private_bfd_data): Likewise.
1830 * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
1831 to complain_overflow_signed.
1835 * VERSION: Set to 2.8.1.
1837 * Branched binutils 2.8.
1839 * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
1840 deciding whether to copy a reloc into a shared object.
1841 (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
1842 relocs in unallocated sections.
1843 * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
1844 R_SPARC_RELATIVE relocs in unallocated sections.
1848 * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
1849 always create got section so that the _GLOBAL_OFFSET_TABLE_ label
1854 * elflink.h (elf_link_add_object_symbols): Let a common symbol
1855 override an uninitialized symbol from a shared library with a
1858 * elf-m10200.c: Rename from elf32-mn10200.c.
1859 * elf-m10300.c: Rename from elf32-mn10300.c.
1860 * cpu-m10200.c: Rename from cpu-mn10200.c
1861 * cpu-m10300.c: Rename from cpu-mn10300.c
1862 * Makefile.in: Update accordingly.
1864 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
1865 (elf_mips_isa): Move to earlier in file.
1866 (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
1867 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
1870 * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
1875 * configure.com: New file.
1876 * config.h-vms: Remove file.
1877 * makefile.vms: Update for new configure scheme.
1881 * libcoff-in.h (ppc_allocate_toc_section): Declare.
1882 (ppc_process_before_allocation): Declare.
1883 * libcoff.h: Rebuild.
1885 * coffcode.h (coff_mkobject_hook): Declare if not a macro.
1889 * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
1893 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
1894 symbol index for a R_IHCONST reloc.
1898 * targmatch.sed: Do not use \(\) recursively.
1902 * m68klinux.c (MACHTYPE_OK): Define.
1903 * i386linux.c (MACHTYPE_OK): Define.
1909 * sparclinux.c: New file.
1910 * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
1911 * bfd-in2.h: Rebuild.
1912 * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
1913 * configure.in (sparclinux_vec): Add to list of vectors.
1914 * configure: Rebuild.
1915 * targets.c (sparclinux_vec): Declare.
1916 (bfd_target_vector): Add sparclinux_vec.
1917 * Makefile.in: Rebuild dependencies.
1918 (BFD32_BACKENDS): Add sparclinux.o.
1919 (BFD32_BACKENDS_CFILES): Add sparclinux.c.
1921 * coff-mips.c (mips_ecoff_backend_data): Initialize new
1922 bfd_coff_backend_data field.
1923 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1925 * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
1926 for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
1929 * bfd.c: Include "libiberty.h".
1930 (strerror): Don't declare.
1931 (bfd_errmsg): Call xstrerror rather than strerror.
1935 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
1936 reloc even if the symbol is in the .bss section.
1937 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1938 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1939 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1941 * coffcode.h (bfd_coff_backend_data): Add new field
1942 _bfd_coff_default_section_alignment_power.
1943 (bfd_coff_default_section_alignment_power): Define.
1944 (bfd_coff_std_swap_table): Initialize new field.
1945 * libcoff.h: Rebuild.
1946 * cofflink.c (coff_link_add_symbols): Limit alignment of a common
1947 symbol to the default section alignment.
1949 * COPYING: Update FSF address.
1953 * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
1954 21-bit absolute that made it act as a relative.
1958 * elflink.c (_bfd_elf_create_linker_section): Don't set
1959 bss_section and rel_section from existing sections.
1961 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
1966 * aoutx.h (some_aout_object_p): Change executable test to fix
1967 problems with embedded a.out systems.
1971 * stabs.c (_bfd_stab_section_offset): New function.
1972 * libbfd-in.h (_bfd_stab_section_offset): Declare.
1973 * libbfd.h: Rebuild.
1974 * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
1976 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1977 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1978 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1979 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1980 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1982 * stabs.c (_bfd_link_section_stabs): Copy over the first header
1983 symbol. Check for memory allocation failure of *psinfo.
1984 (_bfd_write_section_stabs): Add psinfo parameter. Change all
1985 callers. Set the value of the header symbol.
1986 * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
1987 * libbfd.h: Rebuild.
1989 start-sanitize-tic80
1992 * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
1993 (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
1994 reloc types, rather than silently failing to generate an output file.
1999 * targmatch.sed: Use the hold space to put the #ifdef around the
2000 the string constant.
2001 * targets.c (UNSUPPORTED_TARGET): Don't define.
2002 (find_target): Don't check for UNSUPPORTED_TARGET.
2003 (bfd_set_default_target): Don't try to optimize by checking for
2006 * Makefile.in: Rebuild dependencies.
2007 (ALL_MACHINES_CFILES): Add cpu-m32r.c.
2008 (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
2009 (elf32-m32r.o): Remove explicit target.
2011 * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
2014 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
2015 count section symbols for sections that were created by the
2016 linker, or are not allocatable or not loadable.
2017 (elf32_sparc_finish_dynamic_sections): Output output section
2018 symbols for section for which we made space for them.
2022 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
2023 no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
2027 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
2028 (m32r_hi16_list): New static local.
2029 (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
2030 (m32r_elf_do_hi16_reloc): Delete.
2031 (m32r_elf_relocate_hi16): New function.
2032 (m32r_elf_lo16_reloc): New function.
2033 (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
2038 * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
2039 (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
2040 (m32r_elf_final_sda_base): New function.
2041 (m32r_elf_relocate_section): Rewrite sdata support.
2042 (m32r_elf_finish_dynamic_sections): Delete.
2047 * coff-svm68k.c: New file. Just defines some macros and includes
2049 * coff-m68k.c: Add functions to handle common addends, moved in
2050 from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
2051 Control whether relocs are visible using STATIC_RELOCS.
2052 * cf-m68klynx.c: Simplify greatly: just define macros to control
2054 * coff-aux.c: Likewise. Just leave add_one_symbol routine.
2055 * targets. (m68ksysvcoff_vec): Declare.
2056 (bfd_target_vector): Add m68ksysvcoff_vec.
2057 * config.bfd (m68*-motorola-sysv*): New target.
2058 * configure.in (m68ksysvcoff_vec): New vector.
2059 * configure: Rebuild.
2060 * Makefile.in: Rebuild dependencies.
2061 (BFD32_BACKENDS): Add coff-svm68k.o.
2062 (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
2064 * binary.c (binary_set_section_contents): Don't get misled if the
2065 first section is not loadable. From Matthew L. Martin
2068 * elflink.h (elf_bfd_final_link): Set the value of a section
2069 symbol to the section address unless doing a relocateable link.
2073 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
2074 .plt entry if we've taken the function's address.
2075 (elf64_alpha_merge_gots): Merge collected flags info as well.
2079 * Many files: Add function prototypes.
2080 * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
2081 * ecofflink.c: Include "libcoff.h" and "libecoff.h".
2082 * elf32-ppc.c (ppc_elf_fake_sections): Make static.
2083 * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
2084 * peicode.h: Change several void * parameters to PTR.
2085 * srec.c (srec_get_symbol_info): Make static.
2086 * syms.c (bfd_symbol_is_absolute): Remove.
2087 * Makefile.in: Rebuild dependencies.
2091 * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
2092 (bfd_elf32_bfd_is_local_label): Don't define.
2094 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
2099 * bfd-in.h: Don't include obstack.h.
2100 (struct bfd_hash_table): Change memory field to PTR.
2101 * bfd.c (struct _bfd): Change memory field to PTR.
2102 * bfd-in2.h: Rebuild.
2103 * libbfd-in.h (bfd_release): Declare as function, don't define as
2105 * libbfd.h: Rebuild.
2106 * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
2107 objalloc routines rather than obstack routines.
2108 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
2109 (getpagesize): Don't define.
2110 (_bfd_new_bfd): Don't set _bfd_chunksize.
2111 (bfd_openr): Free new bfd and objalloc on failure.
2112 (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
2113 (bfd_alloc_size): Remove.
2114 (bfd_release): New function.
2115 * hash.c: Include "objalloc.h" rather than "obstack.h". Use
2116 objalloc routines rather than obstack routines.
2117 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
2118 * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
2119 objalloc routines rather than obstack routines.
2120 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
2121 (struct accumulate): Change memory to struct objalloc *.
2122 * liboasys.h (oasys_data_type): Remove oasys_obstack field.
2123 * dep-in.sed: Don't remove obstack.h from dependency list.
2124 * Makefile.in: Rebuild dependencies.
2125 (BFD_H_DEPS): Remove obstack.h.
2126 (install): Don't install obstack.h.
2127 * Many files: Don't include "obstack.h".
2130 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
2131 * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
2132 * libbfd.h: Rebuild.
2133 * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
2134 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2135 * srec.c (srec_scan): Rewrite to not use obstack_1grow.
2137 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
2138 old version of bfd_alloc.
2139 * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
2140 * libbfd.h: Rebuild.
2141 * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
2145 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
2146 ELF local label syntax as well.
2150 * config.bfd (powerpc-*-beos*): New target.
2151 * configure.in (powerpc-*-beos*): Add case that explicitly
2152 does not set COREFILE for now. A future BeOS version is
2153 expected to support core files.
2154 * configure: Regenerate with autoconf.
2158 * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
2159 seen with a local symbol, rather than crashing.
2161 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
2162 version symbols if there aren't any.
2164 start-sanitize-tic80
2167 * coff-tic80.c (coff_rtype_to_howto): Define
2168 (coff_tic80_rtype_to_howto): Clone generic coff version and
2169 add code to handle the funky TI "internal relocations".
2174 * elflink.h (elf_link_add_object_symbols): Don't warn about type
2175 or size changes because of a weak symbol.
2177 * cisco-core.c (SIGEMT): Define if not defined.
2181 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
2182 setting ever. Sanity check the version number. Sort out copying
2183 flags and other information when adding an indirect symbol.
2184 (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
2185 symbols added by the backend. Clear the entire contents of the
2187 (elf_export_symbol): Ignore indirect symbols.
2188 (elf_link_output_extsym): Accept a section without an owner in an
2190 * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
2191 version count. Correct the allocation of x_versymp.
2193 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
2194 the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
2195 Don't return bfd_und_section_ptr when info->shared.
2196 (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
2197 (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
2198 (mips_elf_check_relocs): Resolve an indirect symbol in
2200 (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
2201 SHN_MIPS_TEXT or SHN_MIPS_DATA.
2203 * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
2208 * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
2209 * elf.c (bfd_elf_print_symbol): Correct errors in last change.
2210 * elflink.h (elf_link_add_object_symbols): Handle cases in which a
2211 versioned symbol appears in both a regular and a shared object.
2212 (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
2213 appropriate. Improve error message.
2214 (struct elf_outext_info): Rename from elf_finfo_failed. Change
2215 all uses. Add localsyms field.
2216 (elf_bfd_final_link): When generating a shared library, call
2217 elf_link_output_extsym to output all local symbols.
2218 (elf_link_output_extsym): Handle symbols which were forced to
2224 * elf-bfd.h (elf_symbol_type): Add version field.
2225 * elfcode.h (elf_slurp_symbol_table): Set version field.
2226 * elflink.h (elf_link_add_object_symbols): When creating an
2227 indirect symbol for a default version symbol, set DEF_DYNAMIC if
2228 appropriate. Set up an indirection from the nondefault version of
2230 (NAME(bfd_elf,size_dynamic_sections)): Call
2231 elf_link_assign_sym_version before checking whether there are any
2232 versions. Always record the version name as a dynamic symbol.
2233 Initialize counters.
2234 (elf_link_assign_sym_version): After finding a version, see if a
2235 symbol should be forced to local scope. Create a new version
2236 definition if appropriate.
2237 (elf_link_output_extsym): Correct indirect symbol handling.
2238 * elf.c (bfd_elf_print_symbol): Print version information.
2239 (bfd_section_from_shdr): Turn version sections into BFD sections.
2240 (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
2241 if sh_info is not already set.
2242 (_bfd_elf_copy_private_section_data): Copy sh_info for version
2244 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
2245 _bfd_stringtab_add to copy the name into permanent memory if
2250 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
2254 * coffcode.h (bfd_coff_backend_data): Change
2255 _bfd_coff_compute_section_file_positions to return a boolean
2256 value. Change all callers.
2257 (coff_compute_section_file_positions): Change return type to
2258 boolean. If the size of the last section changed, then output a
2259 zero byte at the end of the file.
2260 * libcoff.h: Rebuild.
2262 * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
2263 for at least 6 output symbols.
2264 (xcoff_write_global_symbol): When emitting TOC entry relocs, also
2265 emit a TC csect to represent the space they take up. For an XO
2266 symbol, just emit a reference, not a csect.
2268 * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
2269 Solaris doesn't like the combined options, and the -f is
2271 (stamp-tshlink, install): Likewise.
2273 * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
2274 handling when little endian.
2278 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
2279 (mn10300_elf_relocate_section): Likewise.
2280 (elf_backend_relocate_section): Define.
2282 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
2283 relocs. Replace them with generic PCREL_{8,16,32} relocs.
2284 (elf32_mn10300_howto_table): Likewise.
2285 (elf32_mn10300_reloc_map): Likewise.
2286 (bfd_elf32_mn10300_reloc): Delete unused function.
2290 start-sanitize-tic80
2291 * coff-tic80.c (rtype2howto): If passed a relocation type we don't
2292 understand, just set the howto field to NULL, and the caller will
2293 print an appropriate error message.
2295 * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
2296 code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
2297 block. Use NULL for initializations of "ptr" rather than bare 0.
2298 * coff-h8300.c: Fix typo in comment.
2299 * coff-h8500.c: Ditto.
2301 * coff-z8k.c: Ditto.
2305 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
2306 (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
2307 m32r_elf_get_relocated_section_contents): First pass at relax support.
2311 * elflink.h (elf_link_add_object_symbols): Use correct sh_size
2312 entry for reading verdef records.
2313 Use correct braces for computing increments of extverdaux and
2314 exteverdef record pointers.
2316 start-sanitize-tic80
2319 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
2325 * elflink.h (elf_link_find_version_dependencies): Check that
2326 DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
2329 start-sanitize-tic80
2332 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
2337 * targets.c (bfd_default_vector): Make non-const.
2338 (find_target): New static function, broken out of
2340 (bfd_set_default_target): New function.
2341 (bfd_find_target): Call find_target. When defaulting, use
2342 bfd_default_vector[0] if it is not NULL.
2343 * libbfd-in.h (bfd_default_vector): Adjust declaration.
2344 * bfd-in2.h, libbfd.h: Rebuild.
2346 * syms.c (bfd_is_local_label): Return false if the symbol has no
2348 * coff-i960.c (coff_i960_is_local_label_name): New function.
2349 (coff_bfd_is_local_label_name): Define.
2350 * coff-m68k.c (m68k_coff_is_local_label_name): New function.
2351 (coff_bfd_is_local_label_name): Define.
2352 * coff-rs6000.c (xcoff_is_local_label_name): New function.
2353 (coff_bfd_is_local_label_name): Define.
2354 * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
2355 with .. or _.L_ as local.
2356 * elf32-i386.c (elf_i386_is_local_label_name): New function.
2357 (bfd_elf32_bfd_is_local_label_name): Define.
2358 * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
2359 beginning with $ as local.
2363 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
2364 rather than comparing against info->lprefix.
2365 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2366 * elflink.h (elf_link_input_bfd): Likewise.
2367 * linker.c (_bfd_generic_link_output_symbols): Likewise.
2368 * xcofflink.c (xcoff_link_input_bfd): Likewise.
2370 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
2371 _bfd_elf_is_local_label_name if not already defined.
2372 * elf.c (_bfd_elf_is_local_label_name): New function.
2373 * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
2375 * coff-m88k.c (coff_bfd_is_local_label_name): Define.
2376 (m88k_is_local_label_name): New static function.
2378 * coffcode.h (coff_bfd_is_local_label_name): Define as
2379 _bfd_coff_is_local_label_name if not already defined.
2380 * coffgen.c (_bfd_coff_is_local_label_name): New function.
2381 * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
2382 * libcoff.h: Rebuild.
2384 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
2385 to _bfd_is_local_label_name.
2386 (bfd_target): Likewise.
2387 * syms.c (bfd_is_local_label): Define as function, not macro.
2388 (bfd_is_local_name): Define.
2389 * libbfd.c (bfd_generic_is_local_label_name): Rename from
2390 bfd_generic_is_local_label, and take a string rather than a
2392 * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
2393 (_bfd_nosymbols_bfd_is_local_label_name): Define.
2394 (bfd_generic_is_local_label): Don't declare.
2395 (bfd_generic_is_local_label_name): Declare.
2396 * bfd-in2.h, libbfd.h: Rebuild.
2397 * All backends: Change local_label to local_label_name.
2399 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
2400 (mips_elf_relocate_got_local): Change return type to boolean.
2401 Don't assume that the first zero entry is unassigned; instead, use
2403 (mips_elf_relocate_section): Check return value of
2404 mips_elf_relocate_got_local.
2405 (mips_elf_create_got_section): Initialize assigned_gotno field.
2409 * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
2414 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
2415 that have no contents merely because linker_mark is not set.
2419 * config.bfd (mips*-*-lnews*): New target.
2420 * coff-mips.c (mips_relocate_section): Make assert compare
2421 content byteorder instead of header byteorder.
2422 (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
2424 * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
2425 * configure.in (ecoff_biglittle_vec): Add case.
2426 * configure: Update.
2430 * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
2431 name begins with ".note".
2432 (map_sections_to_segments): Add a PT_NOTE segment for any loadable
2433 section whose name begins with ".note".
2434 (get_program_header_size): Corresponding change.
2436 * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
2437 jal and for jal overflow.
2442 * elflink.h (elf_link_add_archive_symbols): If a default symbol is
2443 not found, try looking it up again without the version name.
2444 (elf_link_add_object_symbols): Always link against the dynamic
2445 symbol table of a dynamic object. When linking against a dynamic
2446 object, include version strings in symbol names, and set up
2447 version information. Add indirect symbols for default versions.
2448 (elf_link_create_dynamic_sections): Add special version sections.
2449 (struct elf_assign_sym_version_info): Define.
2450 (struct elf_find_verdep_info): Define.
2451 (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
2452 up version sections.
2453 (elf_adjust_dynamic_symbol): Ignore indirect symbols.
2454 (elf_link_find_version_dependencies): New static function.
2455 (elf_link_assign_sym_version): New static function.
2456 (elf_link_renumber_dynsyms): New static function.
2457 (struct elf_final_link_info): Add symver_sec field.
2458 (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
2459 local symbols of a dynamic object. Handle DT_VER* constants.
2460 (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
2461 dynamic object. Skip indirect symbols from ELF objects. Remove
2462 the version name before choosing a hash bucket. Write out the
2463 version information if appropriate.
2464 (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
2465 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2466 (bfd_elf64_size_dynamic_sections): Likewise.
2467 * bfd-in2.h: Rebuild.
2468 * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
2469 Change elf_link_hash_flags to unsigned short.
2470 (ELF_LINK_HIDDEN): Define.
2471 (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
2472 dynverdef_hdr, dynversym_section, dynverdef_section,
2473 dynverref_section, cverdefs, cverrefs, verdef, verref.
2474 (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
2475 (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
2476 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
2477 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
2478 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
2479 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
2480 (_bfd_elf_slurp_version_tables): Declare.
2481 * elf.c (_bfd_elf_swap_verdef_in): New function.
2482 (_bfd_elf_swap_verdef_out): Likewise.
2483 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
2484 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
2485 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
2486 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
2487 (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
2488 version information if there is any.
2489 (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
2490 (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
2491 (elf_fake_sections): Handle .gnu.version* section names.
2492 (assign_section_numbers): Handle SHT_GNU_ver* section types.
2493 (_bfd_elf_slurp_version_tables): New function.
2494 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
2495 version name in string entered in dynamic hash table.
2496 * elfcode.h: Include fnmatch.h.
2497 * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
2498 symbol which was forced to become local.
2499 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2500 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2501 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2502 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2506 * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
2508 (mn10200_elf_relax_section): Correctly compute a symbol's value
2509 when the symbol is local, but not in the same section as we are
2510 relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
2515 * elf32-m32r.c: Rewrite to use ELF backend linker.
2516 Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
2517 Add small data area support (R_M32R_SDA16).
2518 * reloc.c: Document BFD_RELOC_M32R_SDA16.
2519 * bfd-in2.h,libbfd.h: Regenerated.
2523 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
2524 (mn10200_elf_relax_delete_bytes): Likewise.
2525 (mn10200_elf_symbol_address_p): Likewise.
2526 (mn10200_elf_get_relocated_section_contents): Likewise.
2527 (bfd_elf32_bfd_relax_section): Define.
2528 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2530 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
2531 (mn10200_elf_relocate_section): Likewise.
2532 (elf_backend_relocate_section): Define.
2536 * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
2537 reloc.c, targets.c: New target, elf-*-D30V.
2539 * bfd-in2.h, configure, libbfd.h: Rebuilt.
2541 * cpu-d30v.c, elf32-d30v.c: New files.
2545 * reloc.c (struct reloc_howto_struct): Fix typo in comment.
2546 * bfd-in2.h: Regenerated.
2547 start-sanitize-tic80
2548 * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
2549 (rtype2howto): Add function.
2550 (tic80_howto_table): Add.
2555 * sysdep.h: Don't define errno in MSVC if error.h is included.
2559 * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
2560 is initialized before it is used.
2564 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
2565 symbol into a weak undefined symbol; leave it as a common symbol.
2569 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
2570 about a symbol defined in a dynamic object if it has already been
2571 defined in a regular object.
2575 * makefile.vms: Add gcc flags to allow compiling with current gcc
2577 (targmatch.h): New dependency.
2579 * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
2581 * evax.h (ALPHA_R_CODEADDR): New relocation.
2582 * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
2584 * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
2586 * bfd-in2.h, libbfd.h: Rebuild.
2588 Restrict symbol length to 64 bytes, case preserving:
2589 * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
2590 * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
2591 (_bfd_evax_length_hash_symbol): Added.
2592 * evax-etir.c (_bfd_evax_write_etir): Call
2593 _bfd_evax_length_hash_symbol before output of symbol.
2594 * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
2595 * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
2597 * evax-emh.c: Output filename to object file without path.
2599 * evax-egsd.c: New sections for local and global commons.
2601 * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
2602 evax-misc.c, evax.h: Remove 8 bit characters from copyright
2603 notices. Replace AXP with Alpha.
2607 * sunos.c (sunos_create_dynamic_sections): We need the dynamic
2608 sections if we are creating a shared library.
2612 * configure.host (i386-windows): Don't set host64=true.
2616 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
2617 (elf_mips16_gprel_howto): New static variable.
2618 (mips16_gprel_reloc): New static function.
2619 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
2620 (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
2621 (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
2622 * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
2623 * bfd-in2.h, libbfd.h: Rebuild.
2627 * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
2628 for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
2630 start-sanitize-r5900
2633 * config.bfd: add r5900
2638 * elflink.h (elf_link_input_bfd): If we've discarded a section,
2639 the output section will be the absolute section; don't print an
2640 assertion message for that case when doing a relocateable link.
2644 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
2645 (struct mips_elf_link_hash_entry): Add new fields fn_stub,
2646 need_fn_sub, call_stub, and call_fp_stub.
2647 (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
2648 (mips_elf_link_hash_newfunc): Initialize new fields.
2649 (mips_elf_link_hash_table_create): Likewise.
2650 (mips_elf_relocate_section): Redirect relocations to use mips16
2651 stubs when appropriate.
2652 (mips_elf_check_relocs): Attach stub sections to the appropriate
2653 symbol. Set need_fn_stub when appropriate.
2654 (mips_elf_always_size_sections): New static function.
2655 (mips_elf_check_mips16_stubs): New static function.
2656 (elf_backend_always_size_sections): Define.
2657 * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
2659 * elflink.h (elf_link_input_bfd): Discard local symbols that are
2660 attached to sections which are not being included in the link.
2664 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
2665 symbol value when computing the addend for a pc_relative
2670 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
2671 relocateable link, just skip pc_relative pcrel_offset relocs.
2672 * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
2673 structure for an ARM26 reloc which can be resolved.
2674 (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
2675 reloc can be resolved.
2677 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
2678 error in overflow check for R_RELBYTE.
2682 * ieee.c (ieee_slurp_section_data): Pick up the start address.
2685 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
2690 * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
2691 (elf_mn10200_howto_table): Likewise.
2692 (mn10200_reloc_map): Likewise.
2696 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
2697 * bfd-in2.h, libbfd.h: Regenerated.
2698 * elf32-m32r.c: Add support for them.
2702 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
2703 * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
2704 * elf32-v850.c (v850_elf_final_link_relocate): Remove used
2705 r_format and r_pcrel. Always return a value.
2706 * riscix.c (MY_final_link_callback): Define to dummy value.
2708 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
2709 relocations against the text segment, look up the output name of
2711 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2712 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
2713 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2714 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2715 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2717 start-sanitize-tic80
2720 * coff-tic80.c (tic80coff_vec): Use correct data put/get
2721 routines for little endian data.
2722 * coffcode.h (coff_write_object_contents): Set magic to
2723 TIC80_ARCH_MAGIC for TIc80.
2727 * coff-tic80.c (tic80coff_vec): Change to little endian data
2733 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
2734 auxiliary_filters parameter to be const char * const *. Accept a
2735 NULL terminated array.
2736 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2737 (bfd_elf32_size_dynamic_sections): Update declaration.
2738 * bfd-in2.h: Rebuild.
2742 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
2743 NOTYPE symbol in a text section as a FUNC symbol.
2745 * coffcode.h (coff_compute_section_file_positions): Force
2746 relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
2750 * libaout.h (machine_type): Reserve several values for sparclet.
2752 start-sanitize-tic80
2755 * config.bfd (tic80-*-*): Don't require 'coff'.
2760 * elf32-v850.c (v850_elf_howto_table): Set the special_function
2761 table to v850_elf_reloc for all non-standard relocations.
2762 (v850_elf_check_relocs): Add check for h being non-null.
2763 (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
2764 statement instead of multiple ifs.
2765 (v850_elf_relocate_section): Fix up error message, don't just call
2770 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
2771 Use bfd_elf_generic_reloc as special function for all relocs.
2772 (bfd_elf32_mn10200_reloc): Remove unnecessary function.
2774 * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
2775 24bit pc-relative reloc.
2777 start-sanitize-tic80
2780 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
2781 * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
2782 header byte order is little endian. Use correct bfd_get and
2783 bfd_put routines for little endian headers.
2784 * coffcode.h (coff_set_arch_mach_hook): Set arch to
2785 bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
2790 * reloc.c: Add BFD_RELOC_24.
2791 * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
2792 (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
2793 * bfd-in2.h, libbfd.h: Rebuilt.
2797 elf64-alpha multiple .got rewrite:
2799 * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
2800 (bfd_elf*_mkobject): Don't define here ...
2801 * elfxx-target.h: ... but rather here. Default always_size_sections
2803 * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
2804 what the #defines in elf-bfd.h transmuted it to anyway.
2806 * section.c: Add SEC_LINKER_CREATED flag.
2807 * bfd-in2.h: Rebuild.
2808 * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
2809 relocation section flags.
2810 (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
2811 SEC_IN_MEMORY to recognize generated bits.
2812 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
2814 * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
2815 mips_elf_create_compact_rel_section, mips_elf_create_got_section,
2816 mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
2817 * elf32-ppc.c (ppc_elf_create_linker_section,
2818 ppc_elf_size_dynamic_sections): Likewise.
2819 * elf32-sparc.c (elf32_sparc_check_relocs,
2820 elf32_sparc_size_dynamic_sections): Likewise.
2821 * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
2823 (_bfd_elf_create_dynamic_sections): Likewise.
2824 (_bfd_elf_make_linker_section_rela): Likewise.
2825 * elflink.h (elf_link_create_dynamic_sections): Likewise.
2826 (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
2827 (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
2828 to identify generated bits.
2829 (elf_link_input_bfd): Likewise.
2831 * elf64-alpha.c: Rewrite everything touching relocations.
2835 * elf32-v850.c (all functions and static variables): Go through
2836 and regularize names to be of the form v850_elf_<xxx>.
2837 (toplevel): Include <elf/v850.h>.
2838 (enum reloc_type): Move to include/elf/v850.h.
2839 (v850_elf_check_relocs): For common variables, if the variable is
2840 referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
2841 into the appropriate section.
2842 (elf_backend_check_relocs): Define.
2846 * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
2850 * config.bfd (mips*el-*-linux*): New target.
2851 (mips*-*-linux*): New target.
2853 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
2854 Return a useful value.
2856 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
2858 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
2860 * configure: Rebuild.
2861 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
2862 ac_cv_func_mmap in bfd/configure.host.
2864 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
2865 filter_shlib and auxiliary_filter_shlib parameters.
2866 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
2868 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2869 (bfd_elf64_size_dynamic_sections): Likewise.
2870 * bfd-in2.h: Rebuild.
2874 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
2875 symbols, don't export a symbol which is defined by an object in an
2876 archive which contains shared objects.
2878 start-sanitize-tic80
2881 * archures.c (enum bfd_architecture): Add bfd_arch_tic80
2882 for TI TMS320c80 (MVP).
2883 (bfd_archures_list): Add bfd_tic80_arch.
2884 * bfd-in2.h: Regenerate by running "make headers".
2888 * cpu-tic80.c (bfd_tic80_arch): Add struct.
2889 * configure.in (case $vec): Correct typo, "tb" not "tp".
2890 Also add cofflink.o for tic80coff_vec.
2891 * configure: Regenerate with autoconf.
2896 * libbfd.c: Patch up the mmap code so that it is only built if BFD
2897 is configured with --with-mmap.
2899 start-sanitize-tic80
2902 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
2903 (ALL_MACHINES): Add cpu-tic80.o
2904 (cpu-tic80.o, coff-tic80.o): Add dependencies.
2905 * coff-tic80.c: Add skeleton, cloned from another coff config.
2906 * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
2912 * TODO: Correct a misspelling.
2913 start-sanitize-tic80
2914 * coff-tic80.c: New file for TI TMS320C80 (MVP).
2915 * cpu-tic80.c: New file for TI TMS320C80 (MVP).
2916 * configure.in (case $vec): Add tic80coff_vec entry.
2917 * configure: Regenerate with autoconf.
2918 * archures.c (bfd_tic80_arch): Declare.
2919 * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
2920 * config.bfd (case ${targ}): Add tic80*-*-coff* target.
2921 * targets.c (tic80coff_vec): Add decl as extern bfd_target.
2922 (bfd_target_vector): Add tic80coff_vec entry.
2927 * elflink.h (elf_buckets): Add some more values for larger
2932 * Makefile.in (install): Move subdir_do out of conditional. From
2937 * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
2939 (elf_mn10200_howto_table): Likewise.
2940 (mn10200_reloc_map): Likewise.
2944 * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
2945 mips16 symbol during the link.
2946 (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
2948 (mips_elf_link_output_symbol_hook): New static function.
2949 (elf_backend_link_output_symbol_hook): Define.
2951 * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
2956 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
2957 against SEC_DEBUGGING sections here (revert patch of December 5).
2958 * elfcode.h (elf_object_p): Check for them here, instead.
2962 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
2963 * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
2965 (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
2966 (_bfd_elf_canonicalize_dynamic_reloc): New function.
2967 * elf-bfd.h (struct elf_size_info): Update declaration of
2969 (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
2970 (_bfd_elf_canonicalize_dynamic_reloc): Declare.
2971 * elfxx-target.h: Use new dynamic reloc routines by default.
2972 * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
2977 * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
2978 if NAMES_HAVE_UNDERSCORE is defined.
2982 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
2986 * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
2991 * elflink.h (elf_link_add_object_symbols): Only add a weak
2992 symbol if the real definition is in the dynamic symbol table.
2993 After finding the real definition, then, if it is dynamic, add the
2994 weak symbol to the dynamic symbol table.
2996 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
2998 * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
3000 (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
3005 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
3007 (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
3008 (bfd_elf32_mn10300_reloc): Write data in little endian format.
3009 * reloc.c: Remove mn10300 big endian relocs.
3010 * bfd-in2.h, libbfd.h: Rebuilt.
3012 * elf32-mn10200.c: Update from elf32-mn10300.c.
3016 * elf32-mn10300.c (elf_symbol_leading_char): Define.
3018 * elf32-mn10300.c: Add some comments.
3022 * ihex.c (ihex_scan): Always initialize buf before jumping to
3024 (ihex_read_section): Likewise.
3028 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
3029 inplace for most relocs.
3033 * elflink.h (elf_link_add_object_symbols): Calling check_relocs
3034 even if SEC_ALLOC is not set.
3035 * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
3036 when deciding whether to copy a reloc into a shared object.
3037 (elf_i386_relocate_section): Likewise.
3038 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
3039 (elf32_sparc_relocate_section): Likewise.
3040 * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
3041 reloc section if it is not set in the source section.
3042 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
3043 * elf.c (bfd_section_from_shdr): Mark a reloc section associated
3044 with a SEC_DEBUGGING section as SEC_DEBUGGING.
3048 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
3049 expects a .got.plt until we actually create it.
3053 * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
3054 message for bfd_reloc_outofrange, rather than aborting. From
3057 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
3058 a relocateable link, don't try to process them. From Heinz Wrobel
3063 * elf32-mn10300.c (mn10300_info_howto): Renamed from
3064 mn10300_info_howto_rel. Tweak reloc argument to be an
3065 Elf32_Internal_Rela.
3066 (USE_RELA): Define instead of USE_REL.
3067 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
3071 * configure.in, configure: Handle mips*-sgi-irix6*.
3072 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
3077 * elf32-i386.c (elf_i386_relocate_section): Warn about a
3078 relocation against a symbol defined in a section with no output
3083 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
3084 * configure, config.in: Rebuild with autoconf 2.12.
3086 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
3087 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
3088 (swap_out_syms): Set st_other from existing st_other field.
3089 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
3091 (elf_link_output_extsym): Set the other field from the global hash
3093 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
3094 (elf_mips16_jump_howto): New static variable.
3095 (mips16_jump_reloc): New static function.
3096 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
3097 (mips_info_to_howto_rel): Handle R_MIPS16_26.
3098 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
3100 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
3101 * bfd-in2.h, libbfd.h: Rebuild.
3102 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
3106 * configure.host: Use long long for mips-sgi-irix6*.
3108 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
3113 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
3114 (enum reloc_type): Add more reloc types.
3115 (elf32_mn10300_howto_table): Update for new reloc types.
3116 (elf32_mn10300_reloc_map): Update for new reloc types.
3117 * reloc.c: Add some new relocs for the mn10300 series.
3118 * bfd-in2.h, libbfd.h: Rebuilt.
3122 * som.c (setup_sections): Don't lose for a space which has
3123 no data, but some symbols.
3127 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
3128 (sunos_link_hash_table_create): Initialize got_needed.
3129 (sunos_create_dynamic_sections): Only set .got section size if it
3130 is not already set. Set got_needed.
3131 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
3132 sdynptr, and only handle dynamic sections, if dynamic sections are
3134 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
3135 Initialize .got section.
3136 (sunos_scan_ext_relocs): Likewise.
3137 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
3139 (sunos_finish_dynamic_link): Check got_needed. Only set up
3140 dynamic linking information if needed.
3144 * config.bfd: Added VersaDOS format to the Ericsson configuration.
3148 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
3152 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
3157 * filemode.c: Include sysdep.h.
3158 * ihex.c: Add casts to eliminate compiler warnings.
3159 * sunos.c: Add casts to eliminate compiler warnings.
3163 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
3165 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
3166 appropriate relocations in the .so file if shared.
3167 (ppc_elf_relocate_section): Ditto.
3171 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
3172 complain_overflow_unsigned.
3176 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
3177 overflows for R_D10V_16 and R_D10V_18.
3181 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
3182 (do_with_relocs): Likewise.
3183 (do_as_repeat): Likewise.
3184 (copy_expression): Likewise.
3188 * ieee.c (ieee_write_external_part): Correctly record whether
3189 there is an external part.
3193 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
3194 handle tda offsets for sld.w and sst.w instructions.
3195 Fix alignment check in sld.w and sst.w tda reloc handling.
3199 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
3203 * elf32-v850.c: Add comments about assumptions about
3204 char, short & long sizes.
3205 (elf32_v850_bfd_final_link_relocate): Fix sign extension
3206 problems for several relocs.
3208 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
3209 R_V850_SDA_OFFSET entry.
3213 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
3214 Store import file index in ldindx.
3215 (xcoff_build_ldsyms): Assume that ldsym was not previously
3216 allocated. For an imported symbol, copy ldindx into l_ifile.
3220 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
3221 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
3222 fields in R_V850_TDA_OFFSET.
3223 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
3224 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
3227 * elf32-v850.c: Include bfdlink.h.
3228 (bfd_elf32_v850_reloc): Return an error if we get a reloc
3230 (elf32_v850_bfd_final_link_relocate): New function.
3231 (v850_elf_relocation_section): Likewise.
3232 (elf_backend_relocate_section): Define.
3236 * binary.c (binary_set_section_contents): Ignore sections which
3237 don't have SEC_LOAD and SEC_ALLOC set.
3241 * linker.c (_bfd_generic_final_link): Avoid losing static
3242 symbols in the .bss section.
3246 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
3247 (mips32_64bit_reloc): New static function.
3248 (mips_reloc_map): Add entry for BFD_RELOC_64.
3249 (mips_elf_relocate_section): Handle R_MIPS_64.
3251 * linker.c (default_indirect_link_order): Print an error message
3252 when attempting to do a relocateable link with different object
3253 file formats, rather than calling abort.
3257 * reloc.c (m32r relocs): Rename them.
3258 * bfd-in2.h, libbfd.h: Regenerated.
3259 * elf32-m32r.c: Update.
3260 (m32r_elf_10_pcrel_reloc): New function.
3261 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
3262 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
3266 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
3267 all sections that will be included in the output file.
3268 (_bfd_generic_link_output_symbols): Discard symbols in sections
3269 which are being discarded.
3270 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
3271 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
3272 (elf_v850_howto_table): Corresponding changes.
3273 (elf_v850_reloc_map): Corresponding changes.
3274 * reloc.c: Add additional V850 relocations.
3275 * bfd-in2.h, libbfd.h: Rebuilt.
3277 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
3278 no longer want in pc-relative relocs.
3282 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
3283 accept a reloc against an undefined sybmol!
3287 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
3291 * VERSION: Bump for new relocation.
3293 * hosts/i386bsd.h: If NBPG is not defined, define it as
3294 PAGE_SIZE, for recent versions of FreeBSD.
3298 * configure.host: Use `long long' as the 64 bit type on a Solaris
3299 host, since both gcc and the SunPRO compilers support it.
3303 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
3304 mistake to have reused the ECOFF LITERAL for ELF since they have
3305 different semantics.
3306 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
3307 * bfd-in2.h, libbfd.h: Rebuild.
3309 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
3312 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
3313 dynamic relocation for an undefweak symbol when we are building
3314 a static executable.
3318 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
3319 point explicitly to srcdir.
3320 (targmatch.h): Edit references to point explicitly to objdir.
3324 * config.bfd: When setting targ_cpu, don't get confused by
3329 * configure.host: Add support for windows host (a build done
3330 under the Microsoft build environment).
3334 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
3335 definition in a dynamic object, add it to the dynamic symbol table
3336 if any dynamic object mentions it. Reverts part of last patch.
3338 * sunos.c (struct sunos_link_hash_table): Add got_base field.
3339 (sunos_link_hash_table_create): Initialize got_base.
3340 (bfd_sunos_size_dynamic_sections): If the .got section is more
3341 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
3343 (sunos_check_dynamic_reloc): Subtract got_base from a base
3344 relative relocation.
3346 * elf32-mips.c (elf_mips_isa): New static function.
3347 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
3348 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
3352 * archive.c (do_slurp_coff_armap): Only treat archive as little
3353 endian for i960 COFF.
3357 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
3358 by the change in size of the section when EXEC_P is not set.
3360 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
3361 (m68kcoff_rtype_to_howto): New static function.
3362 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
3363 VMA to the addend for a PC relative reloc.
3365 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
3367 * Makefile.in: Rebuild dependencies.
3369 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
3374 * Makefile.in: Remove explicit dependencies for mn10200 and
3376 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
3377 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
3378 (dependencies): Rebuilt.
3382 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
3383 during this function.
3385 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
3386 section if the flags are compatible.
3388 * configure.in: Add havevecs, and put it in tdefaults.
3389 * mpw-config.in: Likewise.
3390 * configure: Rebuild.
3391 * targmatch.sed: New file; a sed script to build targmatch.h from
3393 * config.bfd: Add #if, #endif, and comments for targmatch.h.
3394 * targets.c: Include "fnmatch.h".
3395 (struct targmatch): Define.
3396 (bfd_target_match): Define by including targmatch.h.
3397 (bfd_find_target): If the target is not found by name, search for
3398 it as a configuration triplet.
3399 * Makefile.in: Rebuild dependencies.
3400 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
3401 i386dynix.o, m68k4knetbsd.o, and riscix.o.
3402 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
3403 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
3404 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
3405 (CFILES): Remove i386dynix.c and hp300bsd.c.
3406 (targmatch.h): New target.
3407 (do_clean): Remove targmatch.h.
3409 * configure.in: Add BFD_NEED_DECLARATION(getenv).
3410 * acconfig.h: Add NEED_DECLARATION_GETENV.
3411 * configure, config.in: Rebuild.
3412 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
3413 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
3417 * cpu-mn10x00.c, elf32-mn10x00: Removed.
3418 * cpu-mn10200.c, cpu-mn10300.c: New files.
3419 * elf32-mn10200.c, elf32-mn10300.c: New files.
3420 * Makefile.in: Break mn10x00 support into two separate
3421 configurations, mn10200 and mn10300.
3422 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
3423 * bfd-in2.h, configure: Rebuilt.
3427 * Makefile.in (do_clean): Move config.log to do_distclean.
3431 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
3432 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
3433 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
3434 (elf32-mn10x00.o): Add dependencies.
3435 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
3436 (bfd_mn10x00_arch): Declare.
3437 (bfd_archures_list): Add bfd_mn10x00_arch.
3438 * config.bfd: Add mn10x00-*-*.
3439 * configure.in: Add bfd_elf32_mn10x00_vec.
3440 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
3441 * targets.c (bfd_elf32_mn10x00_vec): Declare.
3442 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
3443 * bfd-in2.h, configure: Rebuilt.
3447 openVMS/Alpha: Provide filename and case_hack flags via
3448 symbol table from gas.
3449 Add case_hack code for symbol output from vax/vms.
3450 * evax-alpha.c (evax_initialize): Remove filename handling,
3451 filename is provided via symbol table.
3452 (evax_get_symtab): Use local symbol count when setting up table.
3453 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
3455 (_bfd_evax_write_egsd): Skip file name symbol.
3456 * evax-emh.c (get_vms_time_string): Local function now.
3457 (_bfd_evax_write_emh): Extract source filename and case_hack flags
3459 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
3460 through _bfd_evax_case_hack_symbol.
3461 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
3463 (_bfd_evax_basename): Removed.
3464 (_bfd_get_vms_time_string): Moved to evax-emh.c.
3465 * evax.h (evax_private_data_struct): Remove filename.
3466 (flag_hash_long_names, flag_show_after_trunc,
3467 flag_no_hash_mixed_case, vms_name_mapping): New flags for
3472 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
3473 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
3474 (NO_SWAP_MAGIC): Don't define.
3475 (SWAP_MAGIC): Define.
3477 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
3478 no hash table entry for a global symbol.
3482 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
3486 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
3487 symbol type with T_NULL. Warn if symbol type changes. Based on
3490 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
3491 a dynamic object in the dynamic symbol table if it is referenced
3492 or defined by a regular object.
3496 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
3497 remove dwarf local labels. Shrinks binaries by a factor of 3!
3501 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
3502 by hand, rather than by calling bfd_make_section.
3506 * reloc.c: Rename m32r relocs.
3507 * bfd-in2.h, libbfd.h: Rebuilt.
3508 * elf32-m32r.c: Update.
3512 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
3513 link, adjust the symbol index of a base relative reloc. Don't
3514 change the addend of a PC relative reloc if pcrel_offset is set.
3515 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
3516 a relocateable link.
3518 * reloc.c (bfd_perform_relocation): Apply the relocation even if
3519 it is zero, in case src_mask matters.
3520 (bfd_install_relocation): Likewise.
3524 * xcofflink.c (xcoff_link_add_symbols): Always initialize
3526 (_bfd_xcoff_bfd_final_link): Don't set target_index
3527 to an uninitialized value.
3531 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
3532 indices, rather than crashing.
3533 (coff_slurp_reloc_table): Likewise. Check whether the howto field
3535 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
3540 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
3542 (coff_arm_adjust_symndx): New static function.
3543 (coff_adjust_symndx): Define.
3545 * srec.c (srec_scan): Accept multiple symbols on a single line.
3552 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
3553 (sunos_merge_private_bfd_data): New function.
3557 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
3559 (bfd_merge_private_bfd_data): Likewise.
3560 * section.c (bfd_copy_private_section_data): Likewise.
3561 * syms.c (bfd_copy_private_symbol_data): Likewise.
3562 * bfd-in2.h: Rebuild.
3563 * aout-target.h (MY_bfd_copy_private_section_data): Check that
3564 both BFD's are the right flavour.
3565 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
3566 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
3567 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
3568 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3569 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
3570 (ppc_elf_merge_private_bfd_data): Likewise.
3571 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
3572 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
3574 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
3575 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
3580 * reloc.c: Add m32r relocs.
3581 * bfd-in2.h, libbfd.h: Rebuilt.
3582 * cpu-m32r.c,elf32-m32r.c: New files.
3586 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
3590 * tekhex.c (first_phase): Change type parameter from char to int.
3592 (pass_over): Change func to expect int, not char.
3594 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
3595 rather than SEC_LOAD when aligning the file offset for the first
3596 section in a segment.
3600 * syms.c (coff_section_type): Make arg const.
3601 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
3602 to make_bfd_asection().
3603 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
3604 * elfcode.h (bfd_section_from_phdr): Remove prototype.
3605 (_bfd_elf_stringtab_init): Remove prototype.
3607 * netbsd-core.c (swap_abort): Add prototype.
3608 * aix386-core.c (swap_abort): Ditto & make static
3609 * hpux-core.c (swap_abort): Ditto & make static.
3610 * irix-core.c (swap_abort): Ditto & make static.
3611 * ptrace-core.c (swap_abort): Ditto & make static.
3612 * trad-core.c (swap_abort): Ditto & make static.
3613 * coffswap.h (coff_swap_reloc_in): Ditto.
3614 (coff_swap_reloc_out): Ditto.
3615 (coff_swap_filehdr_in): Ditto.
3616 (coff_swap_filehdr_out): Ditto.
3617 (coff_swap_sym_in): Ditto.
3618 (coff_swap_sym_out): Ditto.
3619 (coff_swap_aux_in): Ditto.
3620 (coff_swap_aux_out): Ditto.
3621 (coff_swap_lineno_in): Ditto.
3622 (coff_swap_lineno_out): Ditto.
3623 (coff_swap_aouthdr_in): Ditto.
3624 (coff_swap_aouthdr_out): Ditto.
3625 (coff_swap_scnhdr_in): Ditto.
3626 (coff_swap_scnhdr_out): Ditto.
3627 * ihex.c (ihex_sizeof_headers): Ditto.
3628 * tekhex.c (getsym): Ditto.
3629 (find_chunk): Ditto & make static.
3630 (insert_byte): Ditto.
3631 (first_phase): Ditto.
3633 (tekhex_get_symtab): Ditto & make static.
3634 (tekhex_get_symtab_upper_bound): Ditto & make static.
3635 (tekhex_mkobject): Ditto.
3636 (tekhex_object_p): Ditto.
3637 (move_section_contents): Ditto.
3638 (tekhex_get_section_contents): Ditto.
3639 (tekhex_set_arch_mach): Ditto & make static.
3640 (tekhex_set_section_contents): Ditto.
3641 (writevalue): Ditto.
3644 (tekhex_write_object_contents): Ditto.
3645 (tekhex_sizeof_headers): Ditto.
3646 (tekhex_make_empty_symbol): Ditto.
3647 (tekhex_get_symbol_info): Ditto.
3648 (tekhex_print_symbol): Ditto.
3649 * irix-core.c (make_bfd_asection): Ditto.
3650 (irix_core_core_file_p): Ditto.
3651 (irix_core_core_file_failing_command): Ditto.
3652 (irix_core_core_file_failing_signal): Ditto.
3653 (irix_core_core_file_matches_executable_p): Ditto.
3654 (irix_core_make_empty_symbol): Ditto.
3655 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
3656 * srec.c (srec_new_symbol): Ditto.
3657 (srec_get_section_contents): Ditto.
3658 (srec_set_arch_mach): Ditto.
3659 (srec_set_section_contents): Ditto.
3660 (internal_srec_write_object_contents): Ditto.
3661 (srec_write_object_contents): Ditto.
3662 (symbolsrec_write_object_contents): Ditto.
3663 (srec_sizeof_headers): Ditto.
3664 (srec_make_empty_symbol): Ditto.
3665 (srec_get_symtab_upper_bound): Ditto.
3666 (srec_get_symtab): Ditto.
3667 (srec_print_symbol): Ditto and make static.
3668 * elf.c (elf_read): Ditto
3669 (assign_section_numbers): Ditto.
3670 (elf_fake_sections): Ditto.
3671 (sym_is_global): Ditto.
3672 (elf_map_symbols): Ditto.
3673 (get_program_header_size): Ditto.
3674 * coffgen.c (make_a_section_from_file): Ditto.
3675 (coff_real_object_p): Ditto.
3676 (fixup_symbol_value): Ditto.
3677 (build_debug_section): Ditto.
3679 * syms.c (coff_section_type): Ditto.
3683 * bfd-in2.h: Rebuilt after m32r changes.
3687 * config.bfd,configure.in,configure: Add m32r support.
3688 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
3689 * config.bfd: Keep target list alphabetically sorted.
3693 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
3694 to add in the constant part found in the instruction itself.
3695 (case R_V850_HI16_S): Likewise.
3699 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
3700 and R_D10V_18 to be 1 (word).
3704 * stabs.c (_bfd_link_section_stabs): If the output_section field
3705 of either section is bfd_abs_section, then the linker is
3706 discarding the section and we should not optimize it.
3710 * Makefile.in (aout-sparcle.o): New target.
3711 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
3712 * config.bfd (sparclet-*-aout*): Add case.
3713 * configure.in (sparcle_aout_vec): Add case.
3714 * configure: Regenerated.
3715 * targets.c (sparcle_aout_vec): Declare.
3716 (bfd_target_vector): Add sparcle_aout_vec.
3717 * aout-sparcle.c: New file.
3721 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
3722 low order sign bit propogation for R_V850_HI16_S.
3724 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
3725 handling V850 specific relocs.
3726 (elf_v850_howto_table): Use the new function for some
3727 relocations. Twiddle masks & shifts for some relocs.
3728 Set partial_inplace where needed.
3732 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
3733 default architecture to a machine number of 0.
3734 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
3736 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
3737 the output BFD is the default, set it from the first input BFD.
3741 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
3742 insert at bitpos zero. The HI16 relocs are shifted right
3743 by 16 bits. Fix src_mask for all relocs.
3744 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
3746 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
3751 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
3752 Rewrite to use BFD file read routines and to avoid using a fixed
3753 length for the file name.
3757 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
3758 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
3759 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
3760 to R_V850_{32,16,8}.
3764 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
3765 (elf_v850_howto_table): Add info for HI16_S reloc.
3766 (v850_reloc_map): Add HI_16_S reloc.
3767 * reloc.c: Define BFD_RELOC_V850_* relocs.
3772 * elf32-sh.c: New file.
3773 * elf.c (prep_headers): Handle bfd_arch_sh.
3774 * elfcode.h (write_relocs): Handle absolute symbol.
3775 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
3776 (_bfd_elf64_link_read_relocs): Declare.
3777 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
3778 elf_link_read_relocs. Make globally visible. Change all
3780 (elf_link_input_bfd): Get external symbols from cache in
3781 symtab_hdr->contents. Get contents from cache in
3783 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
3785 * reloc.c: Define BFD_RELOC_SH_* relocs.
3786 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
3787 * coff-sh.c (sh_insns_conflict): Fix a return value.
3788 (_bfd_sh_align_load_span): New globally visible function, broken
3789 out of sh_align_load.
3790 (sh_align_load): Call _bfd_sh_align_load_span.
3791 (sh_swap_insns): Change relocs parameter to PTR.
3792 * bfd-in2.h, libbfd.h: Rebuild.
3793 * targets.c (bfd_elf32_sh_vec): Declare.
3794 (bfd_elf32_shl_vec): Declare.
3795 * config.bfd (sh-*-elf*): New target.
3796 * configure.in (bfd_elf32_sh_vec): New target vector.
3797 (bfd_elf32_shl_vec): New target vector.
3798 * configure: Rebuild.
3799 * Makefile.in: Rebuild dependencies.
3800 (BFD32_BACKENDS): Add elf32-sh.o.
3801 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
3803 * elf.c (map_sections_to_segments): Check that LMA does not skip a
3804 page before checking D_PAGED.
3806 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
3807 (ihex_write_object_contents): Remove extbase; always use segbase
3812 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
3813 * configure.host (i[345]86-*-*): Ditto.
3814 * config.bfd (i[345]86-*-*): Ditto.
3815 * configure: Regenerate.
3817 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
3822 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
3823 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
3824 * som.c (hppa_som_gen_reloc_type): Add new argument. If
3825 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
3826 will have an ST_CODE type, change the symbol's type to ST_DATA.
3827 * som.c (hppa_som_gen_reloc_type): Update prototype.
3831 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
3832 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
3833 (mips_elf_size_dynamic_sections): Don't require .got to exist.
3834 (mips_elf_finish_dynamic_sections): Likewise.
3838 * configure.host (HLDENV): New variable to set. Set it for
3839 *-*-sysv4*, since those linkers may not support -R but they always
3840 support LD_RUN_PATH.
3842 * libieee.h (NSECTIONS): Don't define.
3843 (ieee_data_struct): Change section_table to asection **. Add
3845 * ieee.c (get_section_entry): If the table isn't big enough, make
3847 (ieee_slurp_sections): Remove assertion about number of sections.
3848 (ieee_object_p): Adjust initialization of ieee to match changes to
3851 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
3852 symbols merely because we are generating a shared library.
3853 (xcoff_build_ldsyms): Don't set up global linkage code for an
3854 undefined symbol merely because we are generating a shared
3859 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
3860 (BFD32_BACKENDS) Add elf32-v850.o.
3861 * archures.c: Add bfd_v850_arch.
3862 * bfd-in2.h: Add bfd_v850_arch.
3863 * config.bfd (v850-*-*): New target.
3864 * configure: (bfd_elf32_v850_vec) New vector.
3865 * configure.in: (bfd_elf32_v850_vec) New vector.
3866 * cpu-v850.c: New file.
3867 * elf.c (prep_headers): Added case bfd_arch_v850.
3868 * elf32-v850.c: New file.
3869 * targets.c (bfd_elf32_v850_vec): New vector.
3873 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
3874 a function code symbol for an XMC_XO symbol.
3878 * mpw-config.in: Update editing of autoconf vars to reflect
3879 Jul 18 configure.in change.
3880 * mpw-make.sed: Update editing of include pathnames to be
3881 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
3885 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
3886 which to offset to get the .plt entry address is ".plt".
3890 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
3891 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
3892 Added, for internal use by the ARM gas.
3894 * bfd-in2.h: Rebuilt
3898 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
3899 in section dynidx start.
3903 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
3904 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
3905 optimization for g++.
3909 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
3910 the -mrelocatable-lib bit set and the other doesn't, clear the
3911 -mrelocatable-lib bit in the header.
3915 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
3916 symbol against a STT_FUNC symbol in a shared library.
3920 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
3921 symbol is found, automatically define the corresponding function
3924 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
3925 if sym.n_numaux is not zero.
3926 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
3927 entry to disagree about the number of aux entries if the symbol
3930 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
3931 section if it might be needed, not just if info->shared.
3932 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
3933 the start of .rel.dyn if we are going to use it.
3934 (mips_elf_finish_dynamic_sections): Only clear the first element
3935 of .rel.dyn if the size is greater than zero.
3939 * xcofflink.c (xcoff_link_input_bfd): If we already called the
3940 undefined_symbol callback for a symbol, then don't issue any more
3941 warnings about loader relocs.
3942 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
3943 after calling the undefined_symbol callback.
3945 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
3946 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
3947 as the AIX linker seems to do.
3951 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
3952 (evax_initialize): Remove evax_reloc_table.
3953 (evax_close_and_cleanup): Ditto.
3955 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
3957 (evax_bfd_reloc_type_lookup): Ditto.
3958 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
3959 cooked_size == raw_size.
3960 * evax-emh.c (_bfd_evax_register_filename): Remove.
3961 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
3962 * evax-misc.c (add_new_contents): Malloc section at full size.
3963 (_bfd_save_evax_section): Memcpy section contents directly.
3964 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
3965 (evax_reloc_table): Remove.
3967 * hosts/alphavms.h (O_ACCMODE): Define if needed.
3969 * makefile.vms: Add better support for DEC C compilation
3970 Add evax.h dependencies
3972 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
3973 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
3974 (BFD_RELOC_ALPHA_BASEREG): Remove.
3975 * bfd-in2.h, libbfd.h: Rebuild.
3979 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
3980 getgid if _WIN32 is defined.
3981 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
3985 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
3986 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
3988 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
3993 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
3995 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
3996 (NEED_DECLARATION_REALLOC): New macro.
3997 * configure, config.in: Rebuild.
3998 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
3999 (realloc): Declare if NEED_DECLARATION_REALLOC.
4001 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
4002 <strings.h> if they exist.
4004 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
4008 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
4011 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
4012 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
4013 (elf_howto_table): Add entries for new relocs.
4014 (elf_i386_reloc_type_lookup): Handle new relocs.
4015 (elf_i386_info_to_howto): Just call abort.
4016 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
4017 (elf_i386_relocate_section): Likewise.
4021 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
4025 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
4026 only get the LMA from the phdr if they are in the same part of the
4029 * elf.c (map_sections_to_segments): Rewrite tests for starting a
4030 new segment to make them more comprehensible. If the relationship
4031 between the LMA and the VMA changed, start a new segment. Don't
4032 check dynsec when deciding whether to start a new segment for a
4033 writeable section; -N will now handle this.
4037 * libhppa.h: Remove "esel" changes. Not the right approach.
4038 * som.c: Corresponding changes.
4039 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
4040 which don't have a SOM symbol type associated with them.
4041 Reverses a 1994 change.
4045 Make ld -N more reasonable for ELF:
4046 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
4047 phdr_in_section to false, and always use a single load segment.
4048 (elf_sort_sections): Sort sections by LMA after VMA.
4049 (assign_file_positions_for_segments): If D_PAGED is not set, don't
4050 align to maxpagesize.
4051 (assign_file_positions_except_relocs): Likewise.
4052 * elfcode.h (elf_object_p): If a section is loaded but not page
4053 aligned, clear D_PAGED.
4057 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
4058 Added, for internal use by the ARM gas.
4060 * bfd-in2.h: Rebuilt
4064 * libhppa.h (R_HPPA_ESEL): New field selector.
4065 (e_esel): Similarly.
4066 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
4067 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
4068 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
4072 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
4073 archive search before looking for stripped dynamic objects.
4077 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
4078 symbol a warning rather than an error.
4082 * elf.c (assign_file_positions_for_segments): Track the virtual
4083 memory position separately from the file position, and use it to
4084 compute the alignment adjustment.
4088 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
4089 and fixed mask on R_D10V_10_PCREL_L.
4093 * elf64-mips.c: Include "aout/ar.h".
4094 (mips_elf64_slurp_armap): New static function.
4095 (mips_elf64_write_armap): New static function.
4096 (bfd_elf64_archive_*): Define.
4097 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
4098 Use instead of bfd_generic_archive_p.
4099 (bfd_elfNN_write_archive_contents): Define if not defined. Use
4100 instead of _bfd_write_archive_contents.
4101 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
4102 _bfd_generic_mkarchive.
4103 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
4104 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
4106 (TARGET_LITTLE_SYM): Likewise.
4107 * archive.c (bfd_slurp_armap): Check for and reject an archive map
4109 * Makefile.in: Rebuild dependencies.
4111 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
4112 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
4113 SHT_MIPS_EVENTS sections.
4114 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
4115 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
4117 (_bfd_mips_elf_fake_sections): Likewise.
4119 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
4120 * ecoff.c (ecoff_compute_section_file_positions): Copy
4121 rdata_in_text from backend info to tdata. Clear it if any data
4122 section comes before .rdata.
4123 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
4124 tdata rather than backend info.
4128 * configure.in: Fix test for whether a compiler has a 64 bit
4133 * configure.host (mips-sgi-irix6*): New host.
4135 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
4136 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
4137 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
4139 * configure: Rebuild.
4140 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
4141 (BFD_HOST_64_BIT): Define conditionally.
4142 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
4143 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
4144 (symvalue, bfd_size_type): Likewise.
4145 * bfd-in2.h: Rebuild.
4146 * Makefile.in (do_clean): Remove bfd-tmp.h.
4147 (do_distclean): Remove bfd-in3.h.
4148 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
4149 (bfd-in3.h): New target.
4151 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
4154 * configure.host: Set INSTALL_SHLIB.
4155 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
4156 * configure: Rebuild.
4157 * Makefile.in (install): Use @INSTALL_SHLIB@.
4159 * config.bfd (mips*-*-irix6*): New target.
4160 * configure.host: Handle Irix 6 shared library like Irix 5.
4162 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
4163 symbol for a magic name.
4164 (xcoff_link_input_bfd): Don't change the reloc symbol for an
4166 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
4171 * mpw-config.in: Add ELF support to mips config, create the
4172 elf32-target.h file in the object dir.
4173 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
4177 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
4178 Also removed most abort calls, in favor of using bfd reporting.
4182 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
4183 (BFD32_BACKENDS) Add elf32-d10v.o.
4184 * archures.c: Add bfd_d10v_arch.
4185 * bfd-in2.h: Add bfd_d10v_arch.
4186 * config.bfd (d10v-*-*): New target.
4187 * configure: (bfd_elf32_d10v_vec) New vector.
4188 * configure.in: (bfd_elf32_d10v_vec) New vector.
4189 * cpu-d10v.c: New file.
4190 * elf.c (prep_headers): Added case bfd_arch_d10v.
4191 * elf32-d10v.c: New file.
4192 * libbfd.h: Rebuild.
4193 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
4194 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
4195 * targets.c (bfd_elf32_d10v_vec): New vector.
4199 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
4203 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
4204 bfd_mach_i386_i8086 machine types.
4208 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
4213 * coffcode.h (coff_set_section_contents): A/UX does not require
4214 special handling of the _LIB section.
4218 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
4219 value for R_RELBYTE.
4221 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
4222 array if one was allocated.
4227 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
4228 use_rld_obj_head and rld_value.
4229 (mips_elf_link_hash_table_create): Initialize new fields.
4230 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
4232 (mips_elf_create_dynamic_sections): Create .rld_map section. If
4233 __rld_obj_head symbol not seen, create an __rld_map symbol.
4234 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
4235 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
4236 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
4237 __rld_obj_head symbol.
4238 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
4242 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
4244 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
4245 ppc_elf_addr16_ha_reloc.
4246 (ppc_elf_addr16_ha_reloc): New static function.
4248 * coff-mips.c (struct mips_hi): Define.
4249 (mips_refhi_list): New static variable.
4250 (mips_refhi_addr, mips_refhi_addend): Remove.
4251 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
4252 (mips_reflo_reloc): Process mips_refhi_list.
4253 (mips_relhi_list): New static variable.
4254 (mips_relhi_addr, mips_relhi_addend): Remove.
4255 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
4256 (mips_rello_reloc): Process mips_relhi_list.
4257 (mips_relocate_section): Permit an arbitrary number of REFHI or
4258 RELHI relocs before the associated REFLO or RELLO reloc.
4262 * aout-target.h (MY(callback)): Set reloc_count fields.
4266 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
4267 sections unless this is a SunOS link.
4269 * VERSION: Set to 2.7.1.
4271 * Released binutils 2.7.
4275 * i386aout.c: Include "aout/aout64.h".
4276 (i386aout_write_object_contents): New static function.
4277 (MY_write_object_contents): Define.
4279 * netbsd.h (MY(write_object_contents)): Make sure that
4280 adjust_sizes_and_vmas is called before fiddling with the magic
4285 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
4289 * libbfd-in.h (itos, stoi): Don't define.
4290 * libbfd.h: Rebuild.
4291 * i386lynx.c (KEEPIT): Define as udata.i.
4292 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
4293 (NAME(lynx,swap_ext_reloc_out)): Likewise.
4294 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
4295 flags. Don't use stoi.
4297 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
4299 * elf.c (map_sections_to_segments): Don't start a new segment for
4300 a writable section if it's on the same page as the previous
4301 segment. Reset the writable variable for a readonly section.
4305 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
4306 first_thunk_address, thunk_size, and import_table_size.
4307 * peicode.h: Improved some diagnostics regarding edata sections.
4309 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
4311 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
4312 (TARGET_LITTLE_SYM): Added missing D_PAGED.
4316 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
4317 with XCOFF_DEF_DYNAMIC set is really defined.
4318 (xcoff_link_check_dynamic_ar_symbols): Likewise.
4319 (xcoff_link_add_symbols): Only create special sections if using an
4322 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
4324 (bfd_install_relocation): Likewise.
4328 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
4330 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
4331 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
4332 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
4333 (elf64_alpha_link_hash_newfunc): Initialize flags field.
4334 (elf64_alpha_check_relocs): Record types of LITUSE entries that
4335 are found for LITERAL relocs.
4336 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
4337 taken, we cannot generate a .plt entry for the symbol.
4341 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
4342 sysconf functions (for gprof).
4343 * configure, config.in: Rebuild.
4347 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
4348 an archive if it has a map. If the object file has the wrong
4351 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
4352 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
4354 (alpha_relocate_section): Likewise.
4356 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
4357 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
4358 (coff_swap_sym_out): Use SYMESZ, not sizeof.
4359 (coff_swap_aux_out): Use AUXESZ, not sizeof.
4360 (coff_swap_lineno_out): Use LINESZ, not sizeof.
4361 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
4362 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
4363 * peicode.h: Corresponding changes.
4367 * elflink.h (elf_create_pointer_linker_section): Comment out code
4368 dealing with making GOT pointers negative of the GOT symbol for
4373 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
4374 increment the .rela.plt size until after we're done creating the
4376 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
4377 .rela.plt offset directly rather than calculating it.
4381 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
4382 Use autoconf-set values.
4383 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
4384 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
4387 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
4388 * configure: Rebuilt.
4392 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
4393 handling code > 1k away.
4397 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
4398 defined, output whenever the symbol is updated.
4402 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
4403 section to 0 if user_set_vma is set.
4404 * elflink.h (elf_bfd_final_link): Likewise.
4408 Partially undo patch of Jun 20.
4409 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
4410 (coff_compute_section_file_positions): Likewise.
4411 (coff_write_object_contents): Likewise. Re-add deleted code, but
4412 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
4413 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
4417 * config.bfd: Add support for *-*-rtems* configurations.
4421 * elf.c (prep_headers): Add bfd_arch_alpha case.
4425 * elf64-alpha.c: New file.
4426 * config.bfd (alpha-*-linuxecoff*): New target.
4427 (alpha-*-linux*, alpha-*-elf*): New targets.
4428 * configure.in (bfd_elf64_alpha_vec): New vector.
4429 * configure: Rebuild.
4430 * targets.c (bfd_elf64_alpha_vec): Declare.
4431 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
4432 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
4433 * bfd-in2.h, libbfd.h: Rebuild.
4434 * Makefile.in: Rebuild dependencies.
4435 (BFD64_BACKENDS): Add elf64-alpha.o.
4436 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
4440 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
4441 than relying on a right shift of 32.
4445 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
4446 ifdef to COFF_WITH_PE.
4447 (coff_compute_section_file_positions): Likewise.
4448 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
4449 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
4450 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
4451 COFF_IMAGE_WITH_PE, always include.
4453 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
4457 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
4458 approximate the correct answer if SIZEOF_HEADERS was not used.
4460 * binary.c (binary_set_section_contents): Set section file
4461 position based on LMA rather than VMA.
4465 * linker.c (_bfd_generic_link_output_symbols): Don't output any
4466 symbols if info->strip == strip_all.
4470 * coff-h8300.c: Remove #if 0 code.
4471 (compatable): Don't allow mixing/matching of different architectures.
4473 * archures.c (bfd_mach_h8300s): Add.
4474 * bfd-in2.h: Rebuilt.
4475 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
4477 (h8300_reloc16_estimate): Likewise.
4478 (h8300_reloc16_extra_cases): Likewise.
4479 (h8300_bfd_link_add_symbols): Likewise.
4480 * coffcode.h (coff_set_arch_mach_hook): Likewise.
4481 (coff_set_flags): Likewise.
4482 * cpu-h8300.c (h8300_scan): Likewise.
4483 Add H8/S to bfd_h8300_arch list.
4487 Added support for Alpha OpenVMS:
4488 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
4489 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
4490 * config.h-vms, makefile.vms: New files.
4491 * config.bfd (alpha-*-*vms*): New target.
4492 * configure.in (evax_alpha_vec): New target vector.
4493 * configure: Rebuild.
4494 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
4495 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
4496 * targets.c (bfd_target_evax_flavour): Define.
4497 (evax_alpha_vec): Declare.
4498 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
4499 if BFD64 is defined.
4500 * bfd-in2.h, libbfd.h: Rebuild.
4501 * Makefile.in: Rebuild dependencies.
4502 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
4503 evax-emh.o, and evax-misc.o.
4504 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
4505 evax-etir.c, evax-emh.c, and evax-misc.c.
4506 (HFILES): Add evax.h.
4510 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
4512 (h8300_bfd_link_add_symbols): Likewise.
4516 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
4517 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
4521 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
4522 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
4524 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
4525 R_MIPS_32 relocs if creating a shared library.
4529 * peicode.h (add_data_entry): Use pei_section_data rather than
4530 _cooked_size. Corresponds to May 13 change in coffcode.h.
4534 * cofflink.c (_bfd_coff_final_link): Handle long section names.
4535 * coffcode.h (coff_write_object_contents): If there are long
4536 section names, always set the f_symptr field, even if there are no
4538 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
4539 if there are no symbols.
4541 * coffgen.c (make_a_section_from_file): Check return value of
4542 _bfd_coff_read_string_table.
4543 (coff_real_object_p): Check return value of
4544 make_a_section_from_file.
4545 (_bfd_coff_read_string_table): Check that there are some symbols
4546 before trying to read the string table size.
4550 * xcofflink.c (xcoff_link_add_symbols): When considering whether
4551 to replace a symbol in a dynamic object with a symbol from another
4552 dynamic object, do the replacement if the existing symbol is
4553 global linkage code.
4555 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
4556 for _ptrgl, and treat it as global linkage code.
4558 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
4559 filename or N_SO symbol past the offset, and use it to indicate
4560 that there is no line number or function when appropriate.
4564 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
4565 common symbol defined by the linker. Don't export function code
4566 even if export_defineds is set.
4570 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
4572 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
4573 (h8300_symbol_address_p): New function.
4574 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
4579 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
4581 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
4582 correctly for the two variants. Allow relaxing if the target
4583 is 128 bytes away since after relaxation it'll be 126 bytes away.
4584 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
4585 "dot" and "value". Allow relaxing if the target is 128 bytes
4586 away since after relaxation it'll be 126 bytes away.
4587 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
4588 the given section until nothing changes.
4592 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
4593 alignment hack--we can get the lnnoptr info another way without
4594 suddenly increasing the alignment requirements. Set the flags for
4596 (ecoff_compute_section_file_positions): Do so.
4600 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
4601 to keep the HP emulator database happy.
4603 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
4608 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
4609 name of a NULL section.
4613 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
4614 set, always call the notice callback.
4616 * VERSION: Increment for bfdlink.h change.
4620 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
4621 (sh_relax_delete_bytes): Correct handling of differently sized
4622 trailing alignment reloc.
4624 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
4625 * bfd-in2.h: Rebuild.
4626 * configure.in: Warn if there is no known 64 bit type.
4627 * configure: Rebuild.
4629 * Makefile.in: Rebuild dependencies.
4630 (BFD32_BACKENDS): Add ppcboot.o.
4631 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
4633 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
4638 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
4639 (bfd_mips_elf64_swap_reginfo_out): Move from here...
4640 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
4641 (bfd_mips_elf64_swap_reginfo_out): ...to here.
4645 * elf64-mips.c: Improve reloc special_functions and handling of
4646 SHT_MIPS_OPTIONS section.
4647 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
4648 mips_elf_hi16_reloc and make globally visible.
4649 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
4650 make globally visible.
4651 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
4652 make globally visible.
4653 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
4654 and make globally visible.
4655 (gprel16_with_gp): Check howto->src_mask before using value in
4657 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
4658 and make globally visible.
4659 (gprel32_with_gp): Check howto->src_mask before fetching value.
4660 (bfd_mips_elf_swap_options_in): New function.
4661 (bfd_mips_elf_swap_options_out): New function.
4662 (_bfd_mips_elf_set_private_flags): Rename from
4663 mips_elf_set_private_flags and make globally visible.
4664 (_bfd_mips_elf_copy_private_bfd_data): Rename from
4665 mips_elf_copy_private_bfd_data and make globally visible.
4666 (_bfd_mips_elf_merge_private_bfd_data): Rename from
4667 mips_elf_merge_private_bfd_data and make globally visible.
4668 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
4669 for a SHT_MIPS_OPTIONS section.
4670 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
4671 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
4672 name of a SHT_MIPS_OPTIONS section.
4673 (_bfd_mips_elf_set_section_contents): New function.
4674 (mips_elf32_section_processing): Set the GP value in a
4675 SHT_MIPS_OPTIONS section.
4676 (_bfd_mips_elf_find_nearest_line): Rename from
4677 mips_elf_find_nearest_line and make globally visible.
4678 (bfd_elf32_set_section_contents): Define.
4679 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
4680 (_bfd_mips_elf_lo16_reloc): Declare.
4681 (_bfd_mips_elf_gprel16_reloc): Declare.
4682 (_bfd_mips_elf_got16_reloc): Declare.
4683 (_bfd_mips_elf_gprel32_reloc): Declare.
4684 (_bfd_mips_elf_set_private_flags): Declare.
4685 (_bfd_mips_elf_copy_private_bfd_data): Declare.
4686 (_bfd_mips_elf_merge_private_bfd_data): Declare.
4687 (_bfd_mips_elf_find_nearest_line): Declare.
4688 (_bfd_mips_elf_set_section_contents): Declare.
4690 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
4692 (elf_info_to_howto): Define.
4693 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
4695 (elf_info_to_howto): Define.
4696 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
4698 (elf_info_to_howto): Define.
4700 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
4701 R_MOV16B[12], to match change in coff/internal.h.
4705 * elf64-mips.c: Extensive additions to provide better support for
4706 writing files and for gas.
4707 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
4708 of mips_elf_object_p.
4709 (mips_elf32_object_p): Rename from mips_elf_object_p; call
4710 _bfd_mips_elf_object_p.
4711 (_bfd_mips_elf_final_write_processing): Rename from
4712 mips_elf_final_write_processing and make globally visible.
4713 (_bfd_mips_elf_fake_sections): Rename from
4714 mips_elf_fake_sections and make globally visible.
4715 (_bfd_mips_elf_section_from_bfd_section): Rename from
4716 mips_elf_section_from_bfd_section and make globally visible.
4717 (_bfd_mips_elf_section_processing): New function, broken out of
4718 mips_elf_section_processing.
4719 (mips_elf32_section_processing): Rename from
4720 mips_elf_section_processing; call
4721 _bfd_mips_elf_section_processing.
4722 (_bfd_mips_elf_symbol_processing): Rename from
4723 mips_elf_symbol_processing and make globally visible.
4724 (_bfd_mips_elf_read_ecoff_info): Rename from
4725 mips_elf_read_ecoff_info and make globally visible.
4726 (mips_elf32_ecoff_debug_swap): Rename from
4727 mips_elf_ecoff_debug_swap.
4728 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
4729 struct symbol_cache_entry.
4730 (_bfd_elf_validate_reloc): New function, moved in from
4731 elfcode.h:validate_reloc.
4732 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
4733 to _bfd_elf_validate_reloc. Change all callers.
4734 * elf-bfd.h (bfd_section_from_shdr): Declare.
4735 (_bfd_elf_symbol_from_bfd_symbol): Declare.
4736 (_bfd_elf_validate_reloc): Declare.
4737 (_bfd_mips_elf_object_p): Declare.
4738 (_bfd_mips_elf_fake_sections): Declare.
4739 (_bfd_mips_elf_section_from_bfd_section): Declare.
4740 (_bfd_mips_elf_section_processing): Declare.
4741 (_bfd_mips_elf_symbol_processing): Declare.
4742 (_bfd_mips_elf_read_ecoff_info): Declare.
4743 (_bfd_mips_elf_final_write_processing): Declare.
4744 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
4747 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
4748 (mips_elf_final_write_processing): Likewise.
4752 64-bit MIPS ELF ABI objdump support:
4753 * elf64-mips.c: New file.
4754 * Makefile.in: Rebuild dependencies.
4755 (BFD64_BACKENDS): Add elf64-mips.o.
4756 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
4757 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
4758 bfd_elf64_littlemips_vec to targ_selvecs.
4759 (mips*-*-elf*): Likewise.
4760 * confingure.in: Add bfd_elf64_bigmips_vec and
4761 bfd_elf64_littlemips_vec to vector switch.
4762 * configure: Rebuild.
4763 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
4764 broken out of mips_elf_section_from_shdr.
4765 (mips_elf32_section_from_shdr): Rename from
4766 mips_elf_section_from_shdr. Call new function.
4767 (elf_backend_section_from_shdr): Update name of renamed function.
4768 * elf-bfd.h (struct elf_size_info): Change second parameter of
4769 write_out_phdrs to be const. Likewise for second parameter of
4771 (struct bfd_elf_section_data): Add rel_hdr2 field.
4772 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
4773 (bfd_elf32_swap_symbol_out): Likewise.
4774 (bfd_elf32_swap_reloc_in): Likewise.
4775 (bfd_elf32_swap_reloc_out): Likewise.
4776 (bfd_elf32_swap_reloca_in): Likewise.
4777 (bfd_elf32_swap_reloca_out): Likewise.
4778 (bfd_elf32_swap_phdr_in): Likewise.
4779 (bfd_elf32_swap_phdr_out): Likewise.
4780 (bfd_elf32_swap_dyn_in): Likewise.
4781 (bfd_elf32_swap_dyn_out): Likewise.
4782 (bfd_elf32_slurp_symbol_table): Declare.
4783 (bfd_elf32_write_shdrs_and_ehdr): Declare.
4784 (bfd_elf32_write_out_phdrs): Declare.
4785 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
4786 (bfd_elf64_swap_symbol_out): Likewise.
4787 (bfd_elf64_swap_reloc_in): Likewise.
4788 (bfd_elf64_swap_reloc_out): Likewise.
4789 (bfd_elf64_swap_reloca_in): Likewise.
4790 (bfd_elf64_swap_reloca_out): Likewise.
4791 (bfd_elf64_swap_phdr_in): Likewise.
4792 (bfd_elf64_swap_phdr_out): Likewise.
4793 (bfd_elf64_swap_dyn_in): Likewise.
4794 (bfd_elf64_swap_dyn_out): Likewise.
4795 (bfd_elf64_slurp_symbol_table): Declare.
4796 (bfd_elf64_write_shdrs_and_ehdr): Declare.
4797 (bfd_elf64_write_out_phdrs): Declare.
4798 (_bfd_mips_elf_section_from_shdr): Declare.
4799 * elf.c (bfd_section_from_shdr): Remove assertion requiring
4800 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
4801 section for the section, add the new one to rel_hdr2. Increment
4802 reloc_count rather than setting it.
4803 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
4804 Remove static declaration.
4805 (elf_write_shdrs_and_ehdr): Define name as macro.
4806 (elf_write_out_phdrs): Likewise.
4807 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
4808 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
4809 (elf_swap_symbol_in): Change second parameter to be const.
4810 (elf_swap_symbol_out): Likewise.
4811 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
4812 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
4813 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
4814 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
4815 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
4816 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
4817 parameter to be const. Make non-static.
4818 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
4820 (elf_slurp_symbol_table): Make non-static.
4821 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
4822 * elfxx-target.h (elf_info_to_howto): Define if not defined.
4823 (elf_backend_size_info): Likewise.
4824 (elfNN_bed): Use elf_backend_size_info.
4825 * targets.c (bfd_elf64_bigmips_vec): Declare.
4826 (bfd_elf64_littlemips_vec): Declare.
4827 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
4828 bfd_elf64_littlemips_vec if BFD64 is defined.
4830 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
4834 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
4835 zeroes, in alignment holes.
4837 * configure: Rebuild with autoconf 2.10.
4839 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
4840 potential leading underscore in the allocated buffer.
4844 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
4845 symbols into .sbss if this is a relocatable link.
4849 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
4850 undefined symbols when creating a shared library.
4854 * coff-sh.c: Add a bunch of new code and static const arrays to
4855 support aligning loads and stores on four byte memory boundaries.
4857 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
4859 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
4860 call sh_align_loads.
4861 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
4866 * cache.c (bfd_open_file): Unlink the file before opening it for
4869 * opncls.c (bfd_fdopenr): Set opened_once.
4873 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
4876 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
4877 the code unconditionally.
4881 * libcoff-in.h (struct pei_section_tdata): Define structure.
4882 (pei_section_data): Define macro.
4883 * libcoff.h: Rebuild.
4884 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
4885 store s_paddr field in pei_section_data.
4886 (coff_compute_section_file_positions): Use pei_section_data rather
4887 than _cooked_size, and don't overwrite an existing value.
4888 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
4889 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
4890 * peicode.h (coff_bfd_copy_private_section_data): Define if
4892 (pe_bfd_copy_private_section_data): New static function if
4897 * srec.c (srec_set_arch_mach): Write as a function rather than a
4900 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
4901 no map, just check each member in turn to see whether it is
4906 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
4907 table. Call BFD_ASSERT to validate header size, instead of
4909 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
4914 * ppcboot.c: New target for looking at PPCbug boot records.
4916 * config{ure.in,.bfd}: Add support for ppcboot target.
4918 * configure: Regenerate.
4922 * coff-h8300.c (howto_table): Update names to match recent
4923 changes to include/coff/internal.h. Fix minor errors in the
4924 existing relocs. Add R_MOVL1 and R_MOVL2.
4925 (rtype2howto): Similarly.
4926 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
4927 existing relaxing code and peform more relaxing.
4928 (h8300_reloc16_extra_cases): Likewise.
4932 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
4937 * elfcode.h (elf_object_p): Reject generic ELF target if
4938 e_machine matches an alternate machine code in a specific backend.
4940 * netbsd-core.c (netbsd_core_vec): Remove initializer for
4941 obsolete align_power_min field.
4945 * coff-h8300.c (reloc_howto_type): Add howto entry for
4947 (rtype2howto): Handle R_PCRWORD_B.
4948 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
4949 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
4950 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
4951 branch (R_PCWORD_B).
4955 * aoutx.h (translate_from_native_sym_flags): Set the section for
4956 BSF_CONSTRUCTOR symbols.
4958 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
4963 * coffcode.h (coff_write_object_contents): In comdat section lookup,
4964 stop looking when section is found.
4968 * coffcode.h (STRING_SIZE_SIZE): Define.
4969 (styp_to_sec_flags): Handle long symbol names when looking for the
4971 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
4972 (bfd_coff_long_section_names): Define.
4973 (coff_write_object_contents): Handle long section names.
4974 (bfd_coff_std_swap_table): Initialize new field.
4975 * libcoff.h: Rebuild.
4976 * coffgen.c (make_a_section_from_file): Handle long section
4978 (coff_write_symbols): Handle long section names.
4979 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4980 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4981 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
4982 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
4983 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
4984 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
4985 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4986 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4988 * bout.c (b_out_callback): Set lma of sections.
4989 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
4990 parameter to output_bfd. Used input_bfd instead of output_bfd in
4995 * aoutx.h (translate_from_native_sym_flags): Don't create
4996 SEC_CONSTRUCTOR sections.
4997 * ecoff.c (ecoff_set_symbol_info): Likewise.
4999 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
5004 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
5005 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
5009 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
5010 mips_32_relocs field.
5011 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
5012 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
5013 relocs against a global symbol which is not defined in a regular
5015 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
5016 against a global symbol, increment mips_32_relocs.
5017 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
5018 the symbol is not defined in a regular file, make room in the
5023 * ecoff.c (ecoff_compute_section_file_positions): Track the real
5024 file position and the virtual file position separately. Set
5025 filepos information bsaed on the real file position.
5026 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
5027 Jan 23 change to coffcode.h.
5029 * som.c (som_slurp_symbol_table): Set the symbol count to the
5030 number of BFD symbols created.
5034 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
5035 output file if linking shared objects. Loop to check all relocs,
5036 rather than returning false on first error.
5040 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
5041 (ppc_elf_additional_program_headers): If .interp section, bump #
5042 of program headers by 1.
5043 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
5044 (ppc_elf_size_dynamic_sections): Add support for .plt section.
5045 (ppc_elf_check_relocs): Print out filename in debug code. Enable
5047 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
5049 (ppc_elf_relocate_section): If the output section isn't defined,
5050 don't abort, just give an error message.
5052 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
5053 being created is .sdata or .sdata2, don't make the symbol dynamic.
5057 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
5058 members of an archive for dynamic objects with no symbols, and
5059 pass them directly to check_archive_element.
5060 (xcoff_link_check_ar_symbols): Pass dynamic objects to
5061 xcoff_link_check_dynamic_ar_symbols.
5062 (xcoff_link_check_dynamic_ar_symbols): New static function.
5064 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
5065 from _bfd_nodynamic to _bfd_xcoff.
5066 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
5068 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
5069 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
5070 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
5071 * libcoff.h: Rebuild.
5072 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
5073 (xcoff_get_section_contents): New static function.
5074 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
5075 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
5076 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
5077 (xcoff_dynamic_reloc): New static variable.
5078 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
5079 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
5083 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
5084 if reloc_entry->addend is not 0.
5085 (CALC_ADDEND): Just set the addend to reloc.r_offset.
5089 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
5091 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5092 Add entries for R_SPARC_[56].
5093 (sparc_reloc_map): Add entries for R_SPARC_[56].
5097 Optimize linking of stabs in sections as used in ELF and COFF.
5098 * stabs.c: New file.
5099 * libbfd-in.h (_bfd_link_section_stabs): Declare.
5100 (_bfd_write_section_stabs): Declare.
5101 (_bfd_write_stab_strings): Declare.
5102 * libbfd.h: Rebuild.
5103 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
5104 (struct coff_link_hash_table): Add stab_info field.
5105 * libcoff.h: Rebuild.
5106 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
5108 (coff_link_add_symbols): Call _bfd_link_section_stabs if
5110 (_bfd_coff_final_link): Write out stab strings hash table.
5111 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
5112 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
5114 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
5115 (struct bfd_elf_section_data): Add stab_info field.
5116 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
5118 * elflink.h (elf_link_add_object_symbols): If appropriate, call
5119 _bfd_link_section_stabs.
5120 (elf_bfd_final_link): Write out stab strings hash table.
5121 (elf_link_input_bfd): Handle optimized stabs sections.
5122 * reloc.c (_bfd_final_link_relocate): Check address against
5123 _raw_size rather than _cooked_size.
5124 * Makefile.in: Rebuild dependencies.
5125 (BFD_LIBS): Add stabs.o
5126 (BFD_LIBS_CFILES): Add stabs.c.
5128 * VERSION: Increment for bfdlink.h change.
5130 * coffgen.c (coff_renumber_symbols): Correct handling of
5131 BSF_NOT_AT_END common symbols.
5135 * coff-ppc.c (record_toc): Add cast to avoid warning.
5136 (ppc_allocate_toc_section): Likewise.
5137 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
5138 (ppc_coff_reloc_type_lookup): Remove unreached code.
5139 * coffcode.h (coff_write_object_contents): Don't take the address
5141 * peicode.h (pe_print_idata): Add casts to avoid warning.
5142 (pe_print_edata): Likewise.
5143 (pe_print_reloc): Remove ANSI C string concatenation.
5147 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
5149 * libcoff.h: Rebuild.
5150 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
5152 (coff_swap_aux_out): Likewise.
5153 * peicode.h (coff_swap_aux_in): Likewise.
5154 (coff_swap_aux_out): Likewise.
5155 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
5157 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
5159 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
5160 Fix up .bf endndx link fields.
5161 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
5163 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
5168 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
5169 on Solaris PowerPC systems doesn't get confused.
5171 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
5174 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
5175 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
5176 update did_reg and did_reg2.
5180 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
5182 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
5183 callback routines, pass h->root.string rather than name, in case
5184 copy is true and name is transient.
5188 * elfcore.h: Add support for core files with multiple threads.
5189 (Primarily for Solaris.)
5193 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
5194 section->orelocation is NULL.
5196 * coffgen.c (bfd_coff_get_syment): New function.
5197 (bfd_coff_get_auxent): New function.
5198 * bfd-in.h (bfd_coff_get_syment): Declare.
5199 (bfd_coff_get_auxent): Declare.
5200 * bfd-in2.h: Rebuild.
5204 * elf32-mips.c (struct mips_hi16): Define.
5205 (mips_hi16_addr, mips_hi16_addend): Remove.
5206 (mips_hi16_list): New static variable.
5207 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
5208 (mips_elf_lo16_reloc): Process mips_hi16_list.
5209 (mips_elf_relocate_section): Permit an arbitrary number of HI16
5210 relocs before the associated LO16 reloc.
5214 * versados.c (versados_scan): Check bfd_alloc return value.
5215 (versados_object_p): Check all bfd_read return values. Require
5216 that lang field be less than 10, to avoid confusion with Intel Hex
5219 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
5221 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
5222 not 0, for an absolute symbol.
5223 (NAME(aout,swap_ext_reloc_out)): Likewise.
5225 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
5226 (ihex_write_object_contents): For a large start address, output
5227 the full 32 bit address in record type 5.
5229 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
5230 to int to avoid promotion problems in prototype.
5234 * configure.host: Use ${srcdir} when looking for picfrag.
5236 * configure.host: Switch on ${libdir}, not $(libdir). From
5239 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
5240 entry point, not just for DYNAMIC objects.
5241 * sunos.c (sunos_add_dynamic_symbols): Always call
5242 sunos_create_dynamic_sections. If called with a non DYNAMIC
5243 object, don't do anything else.
5244 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
5248 * configure.in: Permit --enable-shared to specify a list of
5250 * configure: Rebuild.
5252 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
5253 host when configuring with --enable-shard.
5257 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
5260 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
5261 to avoid crashing in bfd_hash_replace.
5263 * sysdep.h: Use #ifdef, not #if.
5267 * config.in: Rebuild.
5271 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
5272 (AC_CHECK_HEADERS): Check for sys/time.h
5273 (AC_HEADER_TIME): Add macro.
5274 * configure: Rebuild.
5275 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
5276 to control what combination of <time> and <sys/time.h>
5281 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
5282 (aout_32_sunos4_write_object_contents): Likewise.
5283 * aoutx.h (NAME(aout,machine_type)): Handle
5284 bfd_mach_sparc_{sparclet,sparclite}.
5285 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
5286 (bfd_mach_sparc_v9_p): Update.
5287 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
5288 * libaout.h (enum machine_type): Add M_SPARCLET.
5289 * sunos.c (MACHTYPE_OK): Define.
5290 * bfd-in2.h: Regenerated.
5294 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
5295 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
5296 * elflink.c (_bfd_elf_create_got_section): Store the
5297 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
5298 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
5299 global offset table goes over 0x1000, set the value of
5300 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
5301 (elf32_sparc_relocate_section): Subtract the offset of
5302 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
5304 * elfcode.h: Don't include <string.h>.
5308 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
5309 generic_link_hash_newfunc. All references changed.
5310 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
5311 moved here from libbfd-in.h.
5312 * libbfd-in.h: Corresponding changes.
5313 * libbfd.h: Regenerated.
5317 * aoutx.h (aout_link_input_section_std): When reporting an
5318 overflow error, use the name of the symbol in the hash table if
5320 (aout_link_input_section_ext): Likewise.
5322 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
5323 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
5327 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
5328 * coffcode.h (coff_compute_section_file_positions): Likewise.
5329 (coff_write_object_contents): Likewise.
5333 * section.c (SEC_LINK_ONCE): Define.
5334 (SEC_LINK_DUPLICATES): Define.
5335 (SEC_LINK_DUPLICATES_DISCARD): Define.
5336 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
5337 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
5338 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
5339 * bfd-in2.h: Rebuild.
5340 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
5341 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
5342 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
5343 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
5344 SEC_LINK_ONCE, and look through the symbol table for the setting
5345 for SEC_LINK_DUPLICATES.
5346 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
5347 set for a section, find the section symbol in the symbol table,
5348 and set the aux entry based on SEC_LINK_DUPLICATES.
5349 * coffgen.c (coff_print_symbol): Add a space before "checksum".
5350 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
5351 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
5352 * coff-i386.c (i386coff_vec): Likewise.
5353 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
5355 * VERSION: Bump to 2.6.1.
5356 * Makefile.in (stamp-h): Depend upon VERSION.
5360 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
5361 * libbfd.h: Rebuilt.
5362 * linker.c (generic_link_hash_newfunc): No longer static.
5363 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
5365 * coff-h8300.c: Add two derived hash tables and their associated
5366 funtions and #defines for use by the h8300 linker.
5367 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
5368 the function vector as needed. Place the address of the function
5369 vector entry in the location specified by the R_MEM_INDIRECT reloc.
5370 Rewrite the vectors section contents as necessary.
5371 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
5372 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
5373 (coff_bfd_link_hash_table_create): Likewise.
5377 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
5378 __attribute__ ((__unused__)) so that -Wall doesn't warn about
5380 (hppa_rebuild_insn): Pass pointer to correct type to
5381 low_sign_unext and dis_assemble_21.
5385 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
5386 Stick with sparc-*-{sysv4*,solaris2*}.
5390 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
5391 (coff_swap_aux_out): Swap out extra PE x_scn fields.
5392 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
5393 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
5394 fields is non-zero, print them.
5396 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
5397 ifdef. Remove unused variables.
5398 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
5400 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
5401 (get_symbol_value): Ifdef out.
5402 (pe_ppc_reloc): Ifdef out. Remove unused variables.
5403 (coff_ppc_relocate_section): Remove unused variables. Make
5404 fprintf strings and argument types correspond. Put before_addr in
5406 (dump_toc): Make fprintf strings and argument types correspond.
5407 (ppc_process_before_allocation): Remove unused variables. Always
5409 (ppc_reflo_reloc): Ifdef out.
5410 (ppc_addr32nb_reloc): Ifdef out.
5411 (ppc_coff_rtype2howto): Make fprintf strings and argument types
5413 (coff_ppc_rtype_to_howto): Likewise.
5414 (ppc_coff_swap_sym_in_hook): Remove unused variables.
5416 * peicode.h (pe_print_idata): Move otherwise unused variables into
5417 the #ifdef where they are used. Always return a value.
5418 (pe_print_edata): Make fprintf strings and argument types
5419 correspond. Always return a value.
5420 (pe_print_pdata): Removed unused variable addr_value. Always
5422 (pe_print_reloc): Remove unused variable onaline. Make fprintf
5423 strings and argument types correspond. Always return a value.
5425 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
5426 (ppc_elf_finish_dynamic_symbol): Move definition of unused
5427 variable rela inside #if 0 section where it is used.
5429 * ns32k.h: New file.
5430 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
5431 functions to start with _bfd_.
5432 * aout-ns32k.c: Include ns32k.h. Change references to renamed
5433 functions in cpu-ns32k.h.
5434 * Makefile.in: Rebuild dependencies.
5435 (HFILES): Add ns32k.h.
5437 * section.c (struct sec): Add linker_mark field. Change
5438 user_set_vma and reloc_done to be single bit fields.
5439 (STD_SECTION): Update accordingly.
5440 * bfd-in2.h: Rebuild.
5441 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
5443 (aout_link_input_bfd): Don't link unmarked sections.
5444 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
5446 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
5447 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
5449 * elflink.h (elf_bfd_final_link): Mark sections included in the
5451 (elf_link_input_bfd): Don't link unmarked sections.
5452 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
5454 (xcoff_link_input_bfd): Don't link unmarked sections.
5456 * coffswap.h (coff_swap_scnhdr_out): Include section name in
5457 overflow error messages.
5461 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
5462 is not set, print "BFD: " before the error message.
5464 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
5466 * configure: Rebuild.
5470 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
5473 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
5474 m68k-aout, m68k-coff, and m68k-elf targets.
5478 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
5479 (ieee_generic_stat_arch_elt): Restructured to prevent
5480 ieee_object_p from being called repeatedly.
5484 * coffcode.h (coff_write_object_contents): Allocate
5485 buffers large enough for any FILEHDR or AOUTHDR.
5489 * ecofflink.c (lookup_line): New static function, renamed and
5490 slighly changed from old _bfd_ecoff_locate_line.
5491 (_bfd_ecoff_locate_line): Cache line number information. Use
5492 lookup_line for actual lookup.
5496 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
5497 multiple of 20 bytes.
5501 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
5502 allocate ecoff_find_line, and don't initialize by hand.
5503 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
5504 mips_elf_find_line, and don't call memset.
5506 * coffcode.h (coff_compute_section_file_positions): If not
5507 producing a final executable, don't consider sofar when aligning
5508 the section to the correct size.
5512 * coffcode.h (coff_add_missing_symbols): Ifdef out.
5513 (coff_write_object_contents): Don't call coff_add_missing_symbols.
5514 * coffgen.c (coff_section_symbol): Ifdef out.
5518 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
5519 output_bfd is not NULL.
5523 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
5524 of bfd_alloc (fixes fix_line not being initialized).
5525 Delete zeroing of fix_{value,tag,end,scnlen} fields.
5529 * coffcode.h: Allow specific backends to override the
5530 bfd_link_add_symbols routine.
5532 * coff-h8300.c: Include genlink.h.
5533 (howto_table): Add R_MEM_INDIRECT.
5534 (rtype2howto): Support R_MEM_INDIRECT.
5535 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
5540 * coff-alpha.c (alpha_relocate_section): Use
5541 info->callbacks_warning, rather than _bfd_error_handler, for
5542 "multiple gp" warning.
5546 * linker.c (bfd_wrapped_link_hash_lookup): New function.
5547 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
5548 table string. Use bfd_wrapped_link_hash_lookup.
5549 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
5551 * aoutx.h (aout_link_write_symbols): Use the name from the hash
5552 table, if any, when writing out symbols.
5553 (aout_link_input_section_std): Use the name from the hash table,
5554 if any, when reporting undefined symbols.
5555 (aout_link_input_section_ext): Likewise.
5556 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
5557 * bout.c (get_value): Likewise.
5558 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5559 * ecoff.c (ecoff_reloc_link_order): Likewise.
5560 * elflink.h (elf_link_add_object_symbols): Likewise.
5561 (elf_reloc_link_order): Likewise.
5562 * linker.c (_bfd_generic_link_output_symbols): Likewise.
5563 (_bfd_generic_reloc_link_order): Likewise.
5564 (default_indirect_link_order): Likewise.
5565 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
5566 * sunos.c (sunos_add_one_symbol): Likewise.
5567 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5568 (bfd_xcoff_link_count_reloc): Likewise.
5569 (xcoff_reloc_link_order): Likewise.
5571 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
5572 into -1 for intern->rss.
5574 * configure: Rebuild with autoconf 2.8.
5578 * stab-syms.c (__define_stab_duplicate): Define.
5579 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
5581 * bfd-in.h (bfd_get_stab_name): Declare.
5582 * bfd-in2.h: Rebuild.
5583 * Makefile.in: Rebuild dependencies.
5584 (BFD_LIBS): Add stab-syms.o.
5585 (BFD_LIBS_CFILES): Add stab-syms.c.
5586 (BFD32_BACKENDS): Remove stab-syms.o.
5587 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
5588 * configure.in: Don't list stab-syms.o in bfd_backends.
5589 * configure: Rebuild.
5590 * libaout.h (aout_stab_name): Don't declare.
5591 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
5596 * elf.c (assign_file_positions_for_segments): Adjust file offset
5597 for section alignment even if SEC_LOAD is not set.
5601 * configure.in: Don't set SHLIB or SHLINK to an empty string,
5602 since they appear as targets in Makefile.in.
5603 * configure: Rebuild.
5605 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
5606 don't fiddle with a symbol which is not defined anywhere.
5610 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
5611 though they are defined in a shared library.
5612 (xcoff_build_ldsyms): Likewise.
5614 * coffgen.c (coff_find_nearest_line): Don't look at the line
5615 numbers for the section if section->lineno is NULL.
5617 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
5618 message rather than calling BFD_ASSERT.
5619 * elfcode.h (write_relocs): Check return value of
5620 _bfd_elf_symbol_from_bfd_symbol.
5624 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
5629 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
5631 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
5632 hppa_reloc_field_selector_type_alt.
5633 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
5634 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
5636 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
5640 * elf.c (assign_file_positions_for_segments): Adjust the segment
5641 memory size for the alignment of a SEC_ALLOC section, not just a
5646 * m68klinux.c: New file.
5647 * hosts/m68klinux.h: New file.
5648 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
5649 * configure.in (m68*-*-linux*): New native host.
5650 (m68klinux_vec): New vector.
5651 * configure: Rebuild.
5652 * targets.c (m68klinux_vec): Declare.
5653 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
5654 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
5655 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
5656 declaration from bfd_linux_size_dynamic_sections.
5657 (bfd_m68klinux_size_dynamic_sections): Declare.
5658 * bfd-in2.h: Rebuild.
5659 * Makefile.in: Rebuild dependencies.
5660 (BFD32_BACKENDS): Add m68klinux.o.
5661 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
5665 * libhppa.h (pa_arch): Add pa20.
5666 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
5667 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
5668 (hppa_field_adjust): Handle e_nsel.
5669 * som.c: Provide default definitions for many new relocs found only
5670 in hpux10 include files.
5671 (som_fixup_formats): Add several new relocs from hpux10.
5672 (som_hppa_howto_table): Add hpux10 relocs.
5673 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
5677 * mpw-make.sed: Edit out recent shared library support, and
5678 rules to rebuild .h files using doc/chew.
5682 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
5683 size even of sections with no contents.
5687 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
5688 starting with '$' the way we skip names starting with '.'. When
5689 updating x_endndx, don't be fooled by an index which has been
5692 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
5693 struct/union/enum type with no elements.
5697 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
5699 * archive.c (bfd_generic_archive_p): If the first file in the
5700 archive can not be recognized as an object, don't assume that this
5701 is the wrong format.
5703 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
5704 format is not bfd_object.
5705 (bfd_elf_get_dt_soname): Likewise.
5709 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
5714 * bfd.c (tdata): Add netbsd_core_data.
5715 * bfd-in2.h: Regenerated.
5719 * sunos.c (SUNOS_CONSTRUCTOR): Define.
5720 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
5721 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
5724 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
5725 to get the symbol index, matching 14 Jul 95 change.
5729 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5730 Remove duplicate definition of gp.
5734 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
5735 assume that we can set the GP value and then get the same value,
5736 since it won't be true if the output file is neither ELF nor
5738 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
5739 _bfd_get_gp_value here.
5740 (mips_gprel_reloc): Don't assume we can set and get the GP value.
5741 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
5743 (mips_elf_lo16_reloc): Likewise.
5744 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
5745 Don't require that the BFD be ELF.
5746 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
5747 (mips_elf_gprel32_reloc): Likewise.
5748 (mips_elf_relocate_section): Don't assume we can set and get the
5750 (mips_elf_finish_dynamic_symbol): Don't bother to use
5751 _bfd_get_gp_value here.
5753 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
5754 Don't change epdr between malloc and free. Be careful not to free
5755 NULL pointers. Zero out the first RPDR.
5757 * configure.host: On Linux, only pass -rpath option if $(libdir)
5758 is neither /lib nor /usr/lib. From Alan Modra
5761 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
5763 (elf_dt_name): Rename from elf_dt_needed_name.
5764 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
5766 (bfd_elf_get_dt_soname): New function.
5767 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
5768 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
5769 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
5770 * bfd-in2.h: Rebuild.
5774 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
5775 _bfd_sparc_elf_reloc_type_lookup.
5776 (bfd_elf32_bfd_reloc_type_lookup): Update.
5777 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
5778 (sparc64_elf_howto_table): Define.
5779 (sparc_reloc_map): Define.
5780 (sparc64_elf_reloc_type_lookup): New function.
5781 (sparc_elf_wdisp16_reloc): New function.
5782 (elf_info_to_howto): Use sparc64_elf_howto_table.
5783 (sparc64_elf_relocate_section): Likewise.
5784 (bfd_elf64_bfd_reloc_type_lookup): Update.
5788 * configure.host: Check for 'do not mix' from native linker before
5789 trying to use -rpath.
5793 * bfd.c (_bfd_get_gp_value): New function.
5794 (_bfd_set_gp_value): New function.
5795 * libbfd-in.h (_bfd_get_gp_value): Declare.
5796 (_bfd_set_gp_value): Declare.
5797 * libbfd.h: Rebuild.
5798 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
5799 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
5800 directly to the fields in the tdata information.
5801 (alpha_relocate_section): Likewise.
5802 * coff-mips.c (mips_adjust_reloc_in): Likewise.
5803 (mips_gprel_reloc): Likewise.
5804 (mips_relocate_section): Likewise.
5805 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
5806 (mips_elf_lo16_reloc): Likewise.
5807 (mips_elf_final_gp): Likewise.
5808 (mips_elf_gprel16_reloc): Likewise.
5809 (mips_elf_gprel32_reloc): Likewise.
5810 (mips_elf_relocate_section): Likewise.
5811 (mips_elf_finish_dynamic_symbol): Likewise.
5813 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
5817 * configure.in: Call AC_PROG_CC before configure.host.
5818 * configure: Rebuild.
5819 * configure.host: Don't set information which autoconf should
5820 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
5822 * configure.host: Remove go32 and win32 host information, since it
5823 should no longer be needed.
5825 * elf.c (map_sections_to_segments): If we have a .dynamic section,
5826 then start a new segment rather than put a writable section in a
5829 * configure.host: Set RPATH_ENVVAR.
5831 * Makefile.in: Rebuild dependencies.
5833 * elflink.c (_bfd_elf_create_linker_section): Remove unused
5834 zero_section variable.
5838 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
5839 ($(srcdir)/libbfd.h): Rename from libbfd.h.
5840 ($(srcdir)/libcoff.h): Rename from libcoff.h.
5844 * ieee.c (ieee_write_expression): Only use an R variable for a
5845 local symbol. Don't output a zero offset. Handle a zero address.
5846 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
5847 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
5849 (parse_expression): Don't try to handle multiple occurrences of a
5850 P variable. Handle I variables differently from X variables. Fix
5851 the order of minus expressions.
5852 (ieee_slurp_external_symbols): Generate an I variable for an NN
5853 record. Fix handling of ATI and ATX records.
5854 (ieee_slurp_sections): Only set minimal section attributes.
5855 Adjust them later, based on the section contents.
5856 (ieee_object_p): Read in the file until just after the ME record.
5857 Call ieee_slurp_section_data to set the section flags.
5858 (do_one): Add iterations parameter. Only repeat the first load
5859 item. Set the section and file reloc flags.
5860 (ieee_slurp_section_data): Set section flags. Pass iterations to
5862 (ieee_canonicalize_reloc): Handle I variables.
5863 (do_with_relocs): Only emit relocation size when necessary.
5864 Increase MAXRUN to 127. Change ov to be assigned, and take
5865 src_mask and pcrel_offset into account.
5866 (ieee_write_data_part): Skip sections that are not loaded.
5867 (ieee_write_external_part): Don't output optional last entry of WX
5869 (ieee_write_me_part): Make setting of me_record neater.
5870 (ieee_generic_stat_arch_elt): Get the size of an archive element.
5872 * syms.c (stt): Add entries for zerovars, vars, and code.
5874 * elfcode.h (validate_reloc): New static function.
5875 (write_relocs): Call validate_reloc for non ELF relocs.
5877 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
5878 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
5879 (TARGET_LITTLE_SYM): Likewise.
5881 * config.bfd (m68*-*-psos*): New target.
5885 * i386msdos.c: Remove some #if 0 code.
5886 (msdos_write_object_contents): Don't include empty sections in the
5887 size computation, regardless of their address.
5891 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
5892 is NULL, ie, the -r switch is used.
5896 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
5897 (BFD_RELOC_MIPS_GOT_LO16): Define.
5898 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
5899 * bfd-in2.h, libbfd.h: Rebuild.
5900 * elf32-mips.c (mips_reloc_map): Map new relocs.
5902 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
5904 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
5907 * ieee.c (get_symbol): Set the section to bfd_abs_section.
5908 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
5909 simple number for the section address, rather than an expression.
5910 Limit the number of bytes between relocs to MAXRUN.
5911 (ieee_write_me_part): Set me_record to the file offset after the
5913 (ieee_write_processor): New static function.
5914 (ieee_write_object_contents): Use ieee_write_processor.
5918 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
5920 * coff-aux.c: Change include of aux.h to aux-coff.h.
5924 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
5925 relocation put the addend both in the reloc entry and the data.
5926 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
5929 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
5930 a R_68K_PCxx reloc against a defined global symbol directly.
5931 (elf_m68k_check_relocs): Don't count such a reloc.
5933 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
5934 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
5935 symbol for now, otherwise always record the symbol as dynamic.
5936 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
5937 is not referenced by a dynamic object, and we are not making a
5938 shared object, then don't make a PLT entry. If we do make a PLT
5939 entry, make sure the symbol has been recorded as dynamic.
5943 * configure.host: When making a shared library, set HLDFLAGS to
5944 pass an appropriate -rpath option. Use the make variable SONAME
5945 as the shared library soname, rather than computing it here. On
5946 SunOS, build stamp-tshlink in place of $(SHLINK).
5947 * Makefile.in (SONAME): New variable.
5948 ($(SHLINK)): Make a link to the transformed name, as well.
5949 (stamp-tshlink): New target.
5950 (install): Skip stamp-tshlink during install.
5954 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
5955 linker sections have been set up yet.
5957 * elf.c (make_mapping): Add an additional argument to suppress
5958 making the first section include the program headers.
5959 (map_sections_to_segments): If the user used -Ttext such that the
5960 program headers are on a different page, do not set the flags
5961 saying that this section includes the program headers.
5965 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
5966 don't define TRAD_HEADER.
5967 * configure: Rebuild.
5969 * netbsd-core.c: New file, support for NetBSD core files.
5970 * hosts/*nbsd.h: Removed.
5974 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
5975 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
5976 * libbfd.h, bfd-in2.h: Regenerated.
5977 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
5978 bfd_elf32_bfd_reloc_type_lookup.
5979 (reloc_type{,_names}): Deleted.
5980 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5982 (sparc_reloc_map): Add sparc64 relocs.
5983 (sparc_elf_notsupported_reloc): New static function.
5984 (sparc_elf_wdisp16_reloc): New static function.
5985 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
5986 (elf32_sparc_relocate_section): Likewise.
5987 (bfd_elf32_bfd_reloc_type_lookup): Define.
5988 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
5989 (reloc_type{,_names}): Deleted.
5990 (elf_sparc_howto_table): Deleted.
5991 (sparc_reloc_map): Deleted.
5992 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5993 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
5997 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
6000 * Makefile.in (program_transform_name): New variable.
6001 (install): Transform library name before installing it.
6005 * archures.c (bfd_mach_i960_hx): Define.
6006 * bfd-in2.h: Rebuild.
6007 * cpu-i960.c (scan_960_mach): Accept machine "hx".
6008 (MATRIX): Expand entries for HX.
6009 (arch_info_struct): Add i960:hx entry.
6010 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
6011 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
6012 (coff_set_flags): Handle bfd_mach_i960_hx.
6014 Support for building as a shared library, based on patches from
6016 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
6017 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
6018 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
6019 * configure: Rebuild.
6020 * configure.host: If --enable-shared, adjust shared library stuff
6021 based on the host. If the host is SunOS, and the linker supports
6022 -rpath, set HLDFLAGS to use it.
6023 * Makefile.in (ALLLIBS): New variable.
6024 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
6025 (COMMON_SHLIB, SHLINK): New variables.
6026 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
6027 (STAGESTUFF): Remove variable.
6028 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
6030 (stamp-ofiles): New target, like old ofiles target, but build
6031 using a temporary file and move-if-change, and touch stamp-ofiles
6033 (ofiles): Just depend upon stamp-ofiles.
6034 (stamp-piclist, piclist): New targets.
6035 ($(SHLIB), $(SHLINK)): New targets.
6036 (targets.o, archures.o): Build twice if PICFLAG is set.
6037 (do_mostlyclean): Remove pic/*.o.
6038 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
6040 (do_distclean): Remove pic and stamp-picdir.
6041 (install): Install shared libraries.
6042 ($(OFILES)): Depend upon stamp-picdir.
6043 (stamp-picdir): New target.
6045 * libcoff-in.h: Add comment reminding people that libcoff.h is a
6047 * libcoff.h: Rebuild.
6049 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
6050 flavour of a section with no owner.
6052 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
6053 ELF_LINK_NON_ELF flag.
6054 (mips_elf_create_got_section): Likewise.
6056 * elf.c: Revert last change, since it breaks dynamic linking.
6057 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
6059 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
6060 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
6061 (elfNN_bed): Don't initialize want_hdr_in_seg field.
6065 * elf.c (assign_file_positions_for_segments): If the backend does
6066 not want the elf header or the program headers in the address
6067 space, do not include them in the calculations.
6069 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
6070 function to determine if we need additional program headers.
6071 (ppc_elf_modify_segment_map): Define as a NOP function for now.
6072 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
6076 * coffcode.h: Move today's libcoff.h change into coffcode.h.
6080 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
6081 back into one line. Some compilers (sunos 4.1.3 for example)
6082 won't accept args split across more than one line.
6086 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
6087 * configure: Regenerate.
6091 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
6092 try to do arithmetic on a void *, cast it to a unsigned char * first.
6096 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
6097 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
6099 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
6100 flag for a newly defined symbol.
6101 (NAME(bfd_elf,record_link_assignment)): Likewise.
6102 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
6103 set the DEF or REF_REGULAR flags correctly.
6105 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
6106 (libbfd.h, libcoff.h): Corresponding change.
6108 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
6109 a PLT32 reloc as dynamic.
6110 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
6111 is not referenced by a dynamic object, and we are not making a
6112 shared object, then don't make a PLT entry. If we do make a PLT
6113 entry, make sure the symbol has been recorded as dynamic.
6117 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
6118 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
6119 (powerpcle-*-cygwin32): New.
6120 * peicode.h (add_data_entry): Get address from vma.
6124 * elflink.c (_bfd_elf_create_linker_section): If the symbol
6125 attached to the section has already been created as an undefined
6126 symbol, treat it as if it hasn't been created yet.
6130 * elflink.h (elf_bfd_final_link): Don't output initial dummy
6131 symbol or section symbols if stripping all symbols and this is not
6132 a relocateable link. Don't output the symbol string table if
6133 there are no symbols.
6134 (elf_link_flush_output_syms): Don't do anything if there are no
6139 * coff-aux.c: New file.
6140 * hosts/m68kaux.h: New file.
6141 * config.bfd (m68*-apple-aux*): New target.
6142 * configure.in (m68*-apple-aux*): New native host.
6143 (m68kaux_coff_vec): New vector.
6144 * configure: Rebuild.
6145 * targets.c (m68kaux_coff_vec): Declare.
6146 * coffcode.h (bfd_coff_backend_data): Add field
6147 _bfd_coff_link_add_one_symbol.
6148 (bfd_coff_link_add_one_symbol): Define.
6149 (compare_arelent_ptr): New static function if TARG_AUX.
6150 (coff_write_relocs): If TARG_AUX, sort the relocs.
6151 (coff_write_object_contents): Set A/UX aouthdr magic number.
6152 (coff_link_add_one_symbol): Define if not defined.
6153 (bfd_coff_std_swap_table): Initialize new field.
6154 * libcoff.h: Rebuild.
6155 * cofflink.c (coff_link_add_symbols): Call
6156 bfd_coff_link_add_one_symbol rather than
6157 _bfd_generic_link_add_one_symbol.
6158 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
6159 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
6160 * coff-mips.c (mips_ecoff_backend_data): Likewise.
6161 * Makefile.in: Rebuild dependencies.
6162 (BFD32_BACKENDS): Add coff-aux.o.
6163 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
6167 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
6168 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
6172 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
6173 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
6174 (maintainer-clean): Warn about deleting special files.
6175 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
6177 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
6178 warning symbols correctly.
6179 * elf32-i386.c (elf_i386_relocate_section): Likewise.
6180 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6181 * elf32-mips.c (mips_elf_relocate_section): Likewise.
6182 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6183 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6184 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6186 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
6191 * libcoff-in.h: aligned newly exported names with bfd naming
6192 conventions. Removed an erroneous define of POWERPC_LE_PE.
6193 * libcoff.h: Rebuild.
6194 * cofflink.c, coff-ppc.c: the above function name changes
6199 * ecoff.c (struct extsym_info): Define.
6200 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
6201 to ecoff_link_write_external.
6202 (ecoff_link_write_external): Accept a struct extsym_info pointer.
6203 Strip symbols when appropriate.
6206 * syms.c (BSF_OBJECT): Define.
6207 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
6208 * bfd-in2.h: Rebuild.
6209 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
6211 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
6214 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
6215 copying relocs into a shared object, treat a defined global symbol
6217 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6218 * elf32-mips.c (mips_elf_relocate_section): Likewise.
6219 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6221 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
6222 real defined symbol, not to a weak defined symbol.
6226 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
6227 and made a few static functions externs.
6229 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
6230 POWERPC_LE_PE hack in cofflink.
6232 * libcoff-in.h: promoted the following from cofflink.c to allow
6233 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
6234 coff_debug_merge_element, struct coff_debug_merge_type,
6235 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
6236 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
6237 coff_debug_merge_hash_lookup, coff_link_section_info,
6238 coff_final_link_info, coff_debug_merge_hash_newfunc,
6239 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
6241 * libcoff.h: re-gen'd
6245 * syms.c: Include "bfdlink.h".
6246 (struct stab_find_info): Define.
6247 (_bfd_stab_section_find_nearest_line): New function.
6248 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
6249 * libbfd.h: Rebuild.
6250 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
6251 * elf.c (_bfd_elf_find_nearest_line): Try calling
6252 _bfd_stab_section_find_nearest_line before searching the ELF
6253 symbol table. Find the closest STT_FUNC symbol, not the last one.
6254 * libcoff-in.h (coff_data_type): Add line_info field.
6255 * libcoff.h: Rebuild.
6256 * coffgen.c (coff_find_nearest_line): Try calling
6257 _bfd_stab_section_find_nearest_line before searching the COFF
6259 * Makefile.in: Rebuild dependencies.
6263 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
6264 4 bytes, so we get the correct value when updating the register
6265 field in little endian mode.
6269 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
6270 entry_section fields. Add sntoc and snentry fields.
6271 * libcoff.h: Rebuild.
6272 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
6273 not toc_section and entry_section (the COFF file does not have any
6274 sections at this point).
6275 (coff_write_object_contents): Set o_snentry and o_sntoc from
6276 snentry and sntoc rather than entry_section and toc_section.
6277 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
6278 snentry, not toc_section and entry_section.
6279 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
6280 entry_section from hentry.
6281 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
6283 (xcoff_link_input_bfd): Set sntoc, not toc_section.
6284 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
6285 than using toc_section directly.
6287 * archures.c: Add missing `.' in enum bfd_architecture.
6288 * bfd-in2.h: Rebuild.
6290 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
6295 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
6296 to sections we allocate. Use bfd_zalloc to allocate initialial
6297 sections, not bfd_alloc.
6298 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
6299 SDA{,2}I16 relocations.
6300 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
6301 whether to put something in .sbss or not.
6302 (ppc_elf_relocate_section): Add support for more relocations. Add
6303 in sec->output_offset where appropriate. Make error messages
6304 include the symbol name.
6306 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
6307 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
6308 doesn't get redefined messages if -shared.
6310 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
6311 section if the rel_section field has been set up.
6315 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
6320 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
6321 of flags, only flags used are controlled by mach number. Bump up
6322 output file mach number to highest of input file mach numbers.
6323 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
6324 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
6326 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
6327 bfd_elf64_sparc_vec support.
6331 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
6332 the embedded bit is set on some objects and not on others. Just
6334 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
6339 * coffcode.h (coff_new_section_hook): Don't try to align the
6342 * coffcode.h (coff_set_section_contents): Fix the handling of the
6343 .lib section to work even if the entire section contents are
6349 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
6350 memory here for contents.
6352 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
6353 _SDA2_BASE_ by 32768.
6354 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
6355 started using. Allocate contents for .sdata and .sdata2 sections
6357 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
6359 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
6360 size _SDA{,2}_BASE_.
6361 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
6366 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
6368 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
6369 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
6370 (bfd_mach_sparc_v9a): Define.
6371 (bfd_mach_sparc_v9_p): Define.
6372 * bfd-in2.h: Regenerated.
6373 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
6375 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
6376 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
6377 to bfd_elf32_sparc_vec.
6378 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
6379 Add v8plus{,a} support.
6381 (sparc_compatible): New function.
6382 * elf32-sparc.h: #include "elf/sparc.h".
6383 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
6384 elf32_sparc_final_write_processing): New functions.
6385 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
6386 elf_backend_final_write_processing): Define.
6390 * elf-bfd.h (struct elf_link_hash_entry): Add
6391 linker_section_pointer field.
6392 (enum elf_linker_section_enum): Enumeration for new way of
6393 creating linker dynamic sections and symbols.
6394 (elf_linker_section{,_pointers}): New structures for creating
6395 dynamic sections and symbols.
6396 (elf_obj_tdata): Add linker_section_pointers and linker_section
6398 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
6399 (_bfd_elf_create_linker_section): New declarations.
6400 (_bfd_elf_find_pointer_linker_section): Ditto.
6401 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
6402 (_bfd_elf_make_linker_section_rela): Ditto.
6404 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
6406 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
6407 (ppc_elf_create_linker_section): New function to create the
6408 sections .got, .sdata, and .sdata2.
6409 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
6411 (ppc_elf_check_relocs): Support more of the eabi relocations.
6412 (ppc_elf_relocate_section): Ditto.
6413 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
6414 if the .sdata{,2} + .sbss{,2} section size is > 32k.
6416 * elflink.h (elf_create_pointer_linker_section): New function to
6417 create initialized pointers in dynamic linker sections.
6418 (elf_finish_pointer_linker_section): Actually intialize the
6419 pointers created above.
6421 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
6422 macros to provide both 32 and 64 bit versions of
6423 elf_create_pointer_linker_section.
6424 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
6425 provide both 32 and 64 bit versions of
6426 elf_finish_pointer_linker_section.
6428 * elflink.c (_bfd_elf_create_linker_section): New function to
6429 create a linker section.
6430 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
6431 given address in the linker pointer offsets created for a given
6433 (_bfd_elf_make_linker_section_rela): Make a RELA section
6434 corresponding to the generated linker section.
6438 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
6442 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
6443 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
6444 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
6445 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
6446 toc entry in an objdump) for now.
6447 (ppc_do_last, ppc_get_last): New function - needed to save processing
6448 the toc owner to the end.
6449 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
6452 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
6453 toc owner from being done till last. Must define POWERPC_LE_PC
6456 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
6458 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
6460 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
6461 SizeOfImage for PowerPC. Ignore the size of the .junk section.
6465 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
6469 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
6471 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
6475 * elf.c (assign_file_positions_for_segments): Don't increment file
6476 offset for a segment which contains no loadable sections.
6480 * reloc.c: Add new PowerPC relocations.
6481 * {bfd-in2,libbfd}.h: Regenerate.
6483 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
6484 (ppc_elf_reloc_type_lookup): Lookup new relocations.
6488 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
6491 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
6494 * coffgen.c (coff_find_nearest_line): Don't try to cache
6495 information in sections that are not owned by a BFD. From Richard
6498 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
6500 * elflink.h (elf_link_output_extsym): Remove special check for
6503 * ecoffswap.h: Add prototypes for static functions.
6507 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
6508 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
6510 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
6511 to satisfy a TOC16 relocation. Rewrite unsupported relocation
6512 support. Begin support for R_PPC_SDA{2,}REL.
6516 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
6517 create the .got and .got.neg sections.
6518 (ppc_elf_size_dynamic_sections): Call it.
6519 (ppc_elf_check_relocs): Call it.
6520 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
6521 (ppc_elf_check_relocs): Add error messages for relocations we
6522 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
6527 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
6528 section flags for V.4 and eabi.
6532 * elf.c (assign_file_positions_for_segments): If a segment
6533 contains no sections, don't mark it as readable.
6535 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
6536 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
6538 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
6539 dynamic section, if there is one.
6540 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
6541 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
6542 (bfd_elf64_swap_dyn_in): Likewise.
6543 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
6545 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
6547 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
6548 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
6553 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
6554 PowerPC V.4 and eabi.
6555 * bfd-in2.h: Regenerate.
6556 * libfd.h: Regenerate.
6558 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
6560 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
6561 section type and SHF_EXCLUDE section flag, turning them into the
6562 appropriate bfd section flag.
6566 * xcofflink.c (xcoff_link_add_symbols): Create the special
6567 sections if we see a DYNAMIC object, in case that is the only
6568 XCOFF input object we see.
6570 * elf32-mips.c: Extensive changes for a start at dynamic linking
6573 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
6574 (struct elf_backend_data): Remove
6575 elf_backend_create_program_headers field. Add
6576 elf_backend_additional_program_headers and
6577 elf_backend_modify_segment_map fields.
6578 * elfxx-target.h (elf_backend_type_change_ok): Define if not
6580 (elf_backend_additional_program_headers): Likewise.
6581 (elf_backend_modify_segment_map): Likewise.
6582 (elf_backend_create_program_headers): Don't define.
6583 (elfNN_bed): Change to account for field changes.
6584 * elf.c (assign_file_positions_for_segments): Call new
6585 modify_segment_map backend function. Don't call old
6586 create_program_headers backend function.
6587 (get_program_header_size): Call additional_program_headers rather
6588 than create_program_headers.
6589 * elflink.h (elf_link_add_object_symbols): Initialize
6590 type_change_ok from new backend field.
6591 (elf_link_output_extsym): Don't warn if _rld_new_interface is
6593 (elf_reloc_link_order): Treat a reloc against a defined symbol as
6594 a reloc against the appropriate section.
6596 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
6597 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
6598 (elf_flags_init): Rename from elf_ppc_flags_init.
6599 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
6601 (ppc_elf_copy_private_bfd_data): Likewise.
6602 (ppc_elf_merge_private_bfd_data): Likewise.
6604 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
6609 * coff-alpha.c (alpha_relocate_section): During final link, allow
6610 output .lita section to be bigger than 64k by adjusting gp value
6611 on a per-input section basis.
6612 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
6614 (struct ecoff_section_tdata): Add gp field.
6618 Handle Alpha ECOFF changes in OSF/1 3.2.
6619 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
6621 * coff-alpha.c: Include "aout/ar.h".
6622 (alpha_ecoff_get_relocated_section_contents): Don't require an
6623 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
6624 3.2 doesn't generate one.
6625 (alpha_relocate_section): Likewise.
6626 (alpha_ecoff_slurp_armap): Define.
6627 (alpha_ecoff_slurp_extended_name_table): Define.
6628 (alpha_ecoff_construct_extended_name_table): Define.
6629 (alpha_ecoff_truncate_arname): Define.
6630 (alpha_ecoff_write_armap): Define.
6631 (alpha_ecoff_generic_stat_arch_elt): Define.
6632 (alpha_ecoff_update_armap_timestamp): Define.
6634 (alpha_ecoff_read_ar_hdr): New static function.
6635 (alpha_ecoff_get_elt_at_filepos): New static function.
6636 (alpha_ecoff_openr_next_archived_file): New static function.
6637 (alpha_ecoff_get_elt_at_index): New static function.
6638 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
6639 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
6640 _bfd_ecoff to alpha_ecoff.
6641 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
6642 field from backend structure, rather than always calling
6643 _bfd_get_elt_at_filepos.
6644 * coff-mips.c (mips_ecoff_backend_data): Initialize
6645 get_elt_at_filepos field.
6646 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
6647 from _bfd_generic_read_ar_hdr with minor changes.
6648 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
6649 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
6650 * libbfd.h: Rebuild.
6652 * bfd-in.h (BFD_IN_MEMORY): Define.
6653 * libbfd-in.h (struct bfd_in_memory): Define.
6654 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
6655 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
6656 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
6657 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
6658 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
6659 (bfd_get_size): Handle BFD_IN_MEMORY flag.
6660 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
6661 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
6662 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
6663 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
6665 (bfd_openstreamr): Likewise.
6666 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
6667 BFD_IN_MEMORY is not set.
6668 * riscix.c (riscix_some_aout_object_p): Likewise.
6669 * bfd-in2.h, libbfd.h: Rebuild.
6671 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
6672 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
6673 (bfd_get_elt_at_index): Define.
6674 * archive.c (_bfd_generic_get_elt_at_index): Rename from
6675 bfd_get_elt_at_index. Change index parameter from int to
6677 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
6678 (_bfd_noarchive_get_elt_at_index): Define.
6679 (_bfd_archive_bsd_get_elt_at_index): Define.
6680 (_bfd_archive_coff_get_elt_at_index): Define.
6681 * bfd-in2.h, libbfd.h: Rebuild.
6682 * aout-target.h (MY_get_elt_at_index): Define if not defined.
6683 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
6684 * ieee.c (ieee_get_elt_at_index): Define.
6685 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
6686 * oasys.c (oasys_get_elt_at_index): Define.
6687 * som.c (som_get_elt_at_index): Define.
6689 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
6690 numbers to the .text section.
6694 * ieee.c (ieee_write_debug_part): Change return type to boolean.
6695 If there is a SEC_DEBUGGING section, get the contents of the debug
6696 information part from it.
6697 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
6699 (ieee_write_object_contents): Check ieee_write_debug_part return.
6703 * config.bfd (i[345]86-*-freebsd*): Add target.
6704 * configure.in (i386freebsd_vec): Add vec.
6705 * configure: Regenerate.
6706 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
6707 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
6708 Rebuild dependencies..
6709 * freebsd.h: New file.
6710 * i386freebsd.c: New file.
6711 * targets.c (i386freebsd_vec): Declare.
6712 (bfd_target_vector): Add i386freebsd_vec.
6713 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
6714 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
6718 * ieee.c (ieee_slurp_debug): New static function.
6719 (ieee_object_p): Call it.
6720 (ieee_slurp_section_data): Skip debugging sections.
6721 (ieee_get_reloc_upper_bound): Likewise.
6722 (ieee_get_section_contents): Likewise.
6723 (ieee_canonicalize_reloc): Likewise.
6724 (ieee_write_section_part): Likewise.
6725 (ieee_write_debug_part): Likewise.
6726 (ieee_write_data_part): Likewise.
6727 (init_for_output): Likewise.
6731 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
6733 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
6734 relocs, since ppc_elf_relocate_section handles the linker case.
6735 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
6737 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
6738 ppc_elf_relocate_section since that is now the only caller.
6739 (ppc_elf_relocate_section): Ditto.
6743 * coffcode.h (coff_write_object_contents): If we don't know the
6744 section of the entry point for an XCOFF executable, always set the
6745 entry address to -1.
6749 * elf.c (bfd_section_from_shdr): Add support for note sections.
6753 * bfd-in.h (struct _symbol_info): Add stab_type field.
6754 * bfd-in2.h: Rebuild.
6755 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
6757 * elf32-ppc.c: Remove trailing newline from calls to
6759 (ppc_elf_merge_private_bfd_data): Only warn about endianness
6760 difference if target endianness is known.
6762 For older changes see ChangeLog-9495
6768 version-control: never