3 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
4 a relocateable link, don't try to process them. From Heinz Wrobel
9 * elf32-mn10300.c (mn10300_info_howto): Renamed from
10 mn10300-Info_howto_rel. Tweak reloc argument to be an
12 (USE_RELA): Define instead of USE_REL.
13 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
17 * configure.in, configure: Handle mips*-sgi-irix6*.
18 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
23 * elf32-i386.c (elf_i386_relocate_section): Warn about a
24 relocation against a symbol defined in a section with no output
29 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
30 * configure, config.in: Rebuild with autoconf 2.12.
32 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
33 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
34 (swap_out_syms): Set st_other from existing st_other field.
35 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
37 (elf_link_output_extsym): Set the other field from the global hash
39 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
40 (elf_mips16_jump_howto): New static variable.
41 (mips16_jump_reloc): New static function.
42 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
43 (mips_info_to_howto_rel): Handle R_MIPS16_26.
44 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
46 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
47 * bfd-in2.h, libbfd.h: Rebuild.
48 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
52 * configure.host: Use long long for mips-sgi-irix6*.
54 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
59 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
60 (enum reloc_type): Add more reloc types.
61 (elf32_mn10300_howto_table): Update for new reloc types.
62 (elf32_mn10300_reloc_map): Update for new reloc types.
63 * reloc.c: Add some new relocs for the mn10300 series.
64 * bfd-in2.h, libbfd.h: Rebuilt.
68 * som.c (setup_sections): Don't lose for a space which has
69 no data, but some symbols.
73 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
74 (sunos_link_hash_table_create): Initialize got_needed.
75 (sunos_create_dynamic_sections): Only set .got section size if it
76 is not already set. Set got_needed.
77 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
78 sdynptr, and only handle dynamic sections, if dynamic sections are
80 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
81 Initialize .got section.
82 (sunos_scan_ext_relocs): Likewise.
83 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
85 (sunos_finish_dynamic_link): Check got_needed. Only set up
86 dynamic linking information if needed.
90 * config.bfd: Added VersaDOS format to the Ericsson configuration.
94 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
99 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
105 * filemode.c: Include sysdep.h.
106 * ihex.c: Add casts to eliminate compiler warnings.
107 * sunos.c: Add casts to eliminate compiler warnings.
111 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
113 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
114 appropriate relocations in the .so file if shared.
115 (ppc_elf_relocate_section): Ditto.
120 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
121 complain_overflow_unsigned.
127 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
128 overflows for R_D10V_16 and R_D10V_18.
133 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
134 (do_with_relocs): Likewise.
135 (do_as_repeat): Likewise.
136 (copy_expression): Likewise.
140 * ieee.c (ieee_write_external_part): Correctly record whether
141 there is an external part.
146 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
147 handle tda offsets for sld.w and sst.w instructions.
148 Fix alignment check in sld.w and sst.w tda reloc handling.
153 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
158 * elf32-v850.c: Add comments about assumptions about
159 char, short & long sizes.
160 (elf32_v850_bfd_final_link_relocate): Fix sign extension
161 problems for several relocs.
163 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
164 R_V850_SDA_OFFSET entry.
169 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
170 Store import file index in ldindx.
171 (xcoff_build_ldsyms): Assume that ldsym was not previously
172 allocated. For an imported symbol, copy ldindx into l_ifile.
177 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
178 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
179 fields in R_V850_TDA_OFFSET.
180 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
181 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
184 * elf32-v850.c: Include bfdlink.h.
185 (bfd_elf32_v850_reloc): Return an error if we get a reloc
187 (elf32_v850_bfd_final_link_relocate): New function.
188 (v850_elf_relocation_section): Likewise.
189 (elf_backend_relocate_section): Define.
194 * binary.c (binary_set_section_contents): Ignore sections which
195 don't have SEC_LOAD and SEC_ALLOC set.
199 * linker.c (_bfd_generic_final_link): Avoid losing static
200 symbols in the .bss section.
204 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
205 (mips32_64bit_reloc): New static function.
206 (mips_reloc_map): Add entry for BFD_RELOC_64.
207 (mips_elf_relocate_section): Handle R_MIPS_64.
209 * linker.c (default_indirect_link_order): Print an error message
210 when attempting to do a relocateable link with different object
211 file formats, rather than calling abort.
216 * reloc.c (m32r relocs): Rename them.
217 * bfd-in2.h, libbfd.h: Regenerated.
218 * elf32-m32r.c: Update.
219 (m32r_elf_10_pcrel_reloc): New function.
220 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
221 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
226 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
227 all sections that will be included in the output file.
228 (_bfd_generic_link_output_symbols): Discard symbols in sections
229 which are being discarded.
233 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
234 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
235 (elf_v850_howto_table): Corresponding changes.
236 (elf_v850_reloc_map): Corresponding changes.
237 * reloc.c: Add additional V850 relocations.
238 * bfd-in2.h, libbfd.h: Rebuilt.
240 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
241 no longer want in pc-relative relocs.
245 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
246 accept a reloc against an undefined sybmol!
250 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
255 * VERSION: Bump for new relocation.
257 * hosts/i386bsd.h: If NBPG is not defined, define it as
258 PAGE_SIZE, for recent versions of FreeBSD.
262 * configure.host: Use `long long' as the 64 bit type on a Solaris
263 host, since both gcc and the SunPRO compilers support it.
267 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
268 mistake to have reused the ECOFF LITERAL for ELF since they have
270 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
271 * bfd-in2.h, libbfd.h: Rebuild.
273 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
276 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
277 dynamic relocation for an undefweak symbol when we are building
282 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
283 point explicitly to srcdir.
284 (targmatch.h): Edit references to point explicitly to objdir.
288 * config.bfd: When setting targ_cpu, don't get confused by
293 * configure.host: Add support for windows host (a build done
294 under the Microsoft build environment).
298 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
299 definition in a dynamic object, add it to the dynamic symbol table
300 if any dynamic object mentions it. Reverts part of last patch.
302 * sunos.c (struct sunos_link_hash_table): Add got_base field.
303 (sunos_link_hash_table_create): Initialize got_base.
304 (bfd_sunos_size_dynamic_sections): If the .got section is more
305 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
307 (sunos_check_dynamic_reloc): Subtract got_base from a base
310 * elf32-mips.c (elf_mips_isa): New static function.
311 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
312 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
316 * archive.c (do_slurp_coff_armap): Only treat archive as little
317 endian for i960 COFF.
321 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
322 by the change in size of the section when EXEC_P is not set.
324 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
325 (m68kcoff_rtype_to_howto): New static function.
326 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
327 VMA to the addend for a PC relative reloc.
329 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
331 * Makefile.in: Rebuild dependencies.
333 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
338 * Makefile.in: Remove explicit dependencies for mn10200 and
340 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
341 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
342 (dependencies): Rebuilt.
346 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
347 during this function.
349 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
350 section if the flags are compatible.
352 * configure.in: Add havevecs, and put it in tdefaults.
353 * mpw-config.in: Likewise.
354 * configure: Rebuild.
355 * targmatch.sed: New file; a sed script to build targmatch.h from
357 * config.bfd: Add #if, #endif, and comments for targmatch.h.
358 * targets.c: Include "fnmatch.h".
359 (struct targmatch): Define.
360 (bfd_target_match): Define by including targmatch.h.
361 (bfd_find_target): If the target is not found by name, search for
362 it as a configuration triplet.
363 * Makefile.in: Rebuild dependencies.
364 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
365 i386dynix.o, m68k4knetbsd.o, and riscix.o.
366 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
367 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
368 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
369 (CFILES): Remove i386dynix.c and hp300bsd.c.
370 (targmatch.h): New target.
371 (do_clean): Remove targmatch.h.
373 * configure.in: Add BFD_NEED_DECLARATION(getenv).
374 * acconfig.h: Add NEED_DECLARATION_GETENV.
375 * configure, config.in: Rebuild.
376 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
377 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
381 * cpu-mn10x00.c, elf32-mn10x00: Removed.
382 * cpu-mn10200.c, cpu-mn10300.c: New files.
383 * elf32-mn10200.c, elf32-mn10300.c: New files.
384 * Makefile.in: Break mn10x00 support into two separate
385 configurations, mn10200 and mn10300.
386 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
387 * bfd-in2.h, configure: Rebuilt.
391 * Makefile.in (do_clean): Move config.log to do_distclean.
395 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
396 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
397 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
398 (elf32-mn10x00.o): Add dependencies.
399 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
400 (bfd_mn10x00_arch): Declare.
401 (bfd_archures_list): Add bfd_mn10x00_arch.
402 * config.bfd: Add mn10x00-*-*.
403 * configure.in: Add bfd_elf32_mn10x00_vec.
404 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
405 * targets.c (bfd_elf32_mn10x00_vec): Declare.
406 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
407 * bfd-in2.h, configure: Rebuilt.
411 openVMS/Alpha: Provide filename and case_hack flags via
412 symbol table from gas.
413 Add case_hack code for symbol output from vax/vms.
414 * evax-alpha.c (evax_initialize): Remove filename handling,
415 filename is provided via symbol table.
416 (evax_get_symtab): Use local symbol count when setting up table.
417 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
419 (_bfd_evax_write_egsd): Skip file name symbol.
420 * evax-emh.c (get_vms_time_string): Local function now.
421 (_bfd_evax_write_emh): Extract source filename and case_hack flags
423 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
424 through _bfd_evax_case_hack_symbol.
425 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
427 (_bfd_evax_basename): Removed.
428 (_bfd_get_vms_time_string): Moved to evax-emh.c.
429 * evax.h (evax_private_data_struct): Remove filename.
430 (flag_hash_long_names, flag_show_after_trunc,
431 flag_no_hash_mixed_case, vms_name_mapping): New flags for
436 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
437 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
438 (NO_SWAP_MAGIC): Don't define.
439 (SWAP_MAGIC): Define.
441 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
442 no hash table entry for a global symbol.
446 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
450 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
451 symbol type with T_NULL. Warn if symbol type changes. Based on
454 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
455 a dynamic object in the dynamic symbol table if it is referenced
456 or defined by a regular object.
461 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
462 remove dwarf local labels. Shrinks binaries by a factor of 3!
467 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
468 by hand, rather than by calling bfd_make_section.
473 * reloc.c: Rename m32r relocs.
474 * bfd-in2.h, libbfd.h: Rebuilt.
475 * elf32-m32r.c: Update.
480 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
481 link, adjust the symbol index of a base relative reloc. Don't
482 change the addend of a PC relative reloc if pcrel_offset is set.
483 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
486 * reloc.c (bfd_perform_relocation): Apply the relocation even if
487 it is zero, in case src_mask matters.
488 (bfd_install_relocation): Likewise.
492 * xcofflink.c (xcoff_link_add_symbols): Always initialize
494 (_bfd_xcoff_bfd_final_link): Don't set target_index
495 to an uninitialized value.
499 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
500 indices, rather than crashing.
501 (coff_slurp_reloc_table): Likewise. Check whether the howto field
503 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
508 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
510 (coff_arm_adjust_symndx): New static function.
511 (coff_adjust_symndx): Define.
513 * srec.c (srec_scan): Accept multiple symbols on a single line.
520 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
521 (sunos_merge_private_bfd_data): New function.
525 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
527 (bfd_merge_private_bfd_data): Likewise.
528 * section.c (bfd_copy_private_section_data): Likewise.
529 * syms.c (bfd_copy_private_symbol_data): Likewise.
530 * bfd-in2.h: Rebuild.
531 * aout-target.h (MY_bfd_copy_private_section_data): Check that
532 both BFD's are the right flavour.
533 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
534 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
535 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
536 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
537 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
538 (ppc_elf_merge_private_bfd_data): Likewise.
539 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
540 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
542 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
543 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
549 * reloc.c: Add m32r relocs.
550 * bfd-in2.h, libbfd.h: Rebuilt.
551 * cpu-m32r.c,elf32-m32r.c: New files.
556 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
560 * tekhex.c (first_phase): Change type parameter from char to int.
562 (pass_over): Change func to expect int, not char.
564 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
565 rather than SEC_LOAD when aligning the file offset for the first
566 section in a segment.
570 * syms.c (coff_section_type): Make arg const.
571 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
572 to make_bfd_asection().
573 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
574 * elfcode.h (bfd_section_from_phdr): Remove prototype.
575 (_bfd_elf_stringtab_init): Remove prototype.
577 * netbsd-core.c (swap_abort): Add prototype.
578 * aix386-core.c (swap_abort): Ditto & make static
579 * hpux-core.c (swap_abort): Ditto & make static.
580 * irix-core.c (swap_abort): Ditto & make static.
581 * ptrace-core.c (swap_abort): Ditto & make static.
582 * trad-core.c (swap_abort): Ditto & make static.
583 * coffswap.h (coff_swap_reloc_in): Ditto.
584 (coff_swap_reloc_out): Ditto.
585 (coff_swap_filehdr_in): Ditto.
586 (coff_swap_filehdr_out): Ditto.
587 (coff_swap_sym_in): Ditto.
588 (coff_swap_sym_out): Ditto.
589 (coff_swap_aux_in): Ditto.
590 (coff_swap_aux_out): Ditto.
591 (coff_swap_lineno_in): Ditto.
592 (coff_swap_lineno_out): Ditto.
593 (coff_swap_aouthdr_in): Ditto.
594 (coff_swap_aouthdr_out): Ditto.
595 (coff_swap_scnhdr_in): Ditto.
596 (coff_swap_scnhdr_out): Ditto.
597 * ihex.c (ihex_sizeof_headers): Ditto.
598 * tekhex.c (getsym): Ditto.
599 (find_chunk): Ditto & make static.
600 (insert_byte): Ditto.
601 (first_phase): Ditto.
603 (tekhex_get_symtab): Ditto & make static.
604 (tekhex_get_symtab_upper_bound): Ditto & make static.
605 (tekhex_mkobject): Ditto.
606 (tekhex_object_p): Ditto.
607 (move_section_contents): Ditto.
608 (tekhex_get_section_contents): Ditto.
609 (tekhex_set_arch_mach): Ditto & make static.
610 (tekhex_set_section_contents): Ditto.
614 (tekhex_write_object_contents): Ditto.
615 (tekhex_sizeof_headers): Ditto.
616 (tekhex_make_empty_symbol): Ditto.
617 (tekhex_get_symbol_info): Ditto.
618 (tekhex_print_symbol): Ditto.
619 * irix-core.c (make_bfd_asection): Ditto.
620 (irix_core_core_file_p): Ditto.
621 (irix_core_core_file_failing_command): Ditto.
622 (irix_core_core_file_failing_signal): Ditto.
623 (irix_core_core_file_matches_executable_p): Ditto.
624 (irix_core_make_empty_symbol): Ditto.
625 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
626 * srec.c (srec_new_symbol): Ditto.
627 (srec_get_section_contents): Ditto.
628 (srec_set_arch_mach): Ditto.
629 (srec_set_section_contents): Ditto.
630 (internal_srec_write_object_contents): Ditto.
631 (srec_write_object_contents): Ditto.
632 (symbolsrec_write_object_contents): Ditto.
633 (srec_sizeof_headers): Ditto.
634 (srec_make_empty_symbol): Ditto.
635 (srec_get_symtab_upper_bound): Ditto.
636 (srec_get_symtab): Ditto.
637 (srec_print_symbol): Ditto and make static.
638 * elf.c (elf_read): Ditto
639 (assign_section_numbers): Ditto.
640 (elf_fake_sections): Ditto.
641 (sym_is_global): Ditto.
642 (elf_map_symbols): Ditto.
643 (get_program_header_size): Ditto.
644 * coffgen.c (make_a_section_from_file): Ditto.
645 (coff_real_object_p): Ditto.
646 (fixup_symbol_value): Ditto.
647 (build_debug_section): Ditto.
649 * syms.c (coff_section_type): Ditto.
654 * bfd-in2.h: Rebuilt after m32r changes.
660 * config.bfd,configure.in,configure: Add m32r support.
661 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
663 * config.bfd: Keep target list alphabetically sorted.
668 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
669 to add in the constant part found in the instruction itself.
670 (case R_V850_HI16_S): Likewise.
676 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
677 and R_D10V_18 to be 1 (word).
682 * stabs.c (_bfd_link_section_stabs): If the output_section field
683 of either section is bfd_abs_section, then the linker is
684 discarding the section and we should not optimize it.
688 * Makefile.in (aout-sparcle.o): New target.
689 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
690 * config.bfd (sparclet-*-aout*): Add case.
691 * configure.in (sparcle_aout_vec): Add case.
692 * configure: Regenerated.
693 * targets.c (sparcle_aout_vec): Declare.
694 (bfd_target_vector): Add sparcle_aout_vec.
695 * aout-sparcle.c: New file.
700 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
701 low order sign bit propogation for R_V850_HI16_S.
703 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
704 handling V850 specific relocs.
705 (elf_v850_howto_table): Use the new function for some
706 relocations. Twiddle masks & shifts for some relocs.
707 Set partial_inplace where needed.
712 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
713 default architecture to a machine number of 0.
714 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
716 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
717 the output BFD is the default, set it from the first input BFD.
722 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
723 insert at bitpos zero. The HI16 relocs are shifted right
724 by 16 bits. Fix src_mask for all relocs.
725 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
727 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
733 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
734 Rewrite to use BFD file read routines and to avoid using a fixed
735 length for the file name.
740 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
741 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
742 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
747 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
748 (elf_v850_howto_table): Add info for HI16_S reloc.
749 (v850_reloc_map): Add HI_16_S reloc.
750 * reloc.c: Define BFD_RELOC_V850_* relocs.
756 * elf32-sh.c: New file.
757 * elf.c (prep_headers): Handle bfd_arch_sh.
758 * elfcode.h (write_relocs): Handle absolute symbol.
759 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
760 (_bfd_elf64_link_read_relocs): Declare.
761 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
762 elf_link_read_relocs. Make globally visible. Change all
764 (elf_link_input_bfd): Get external symbols from cache in
765 symtab_hdr->contents. Get contents from cache in
767 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
769 * reloc.c: Define BFD_RELOC_SH_* relocs.
770 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
771 * coff-sh.c (sh_insns_conflict): Fix a return value.
772 (_bfd_sh_align_load_span): New globally visible function, broken
773 out of sh_align_load.
774 (sh_align_load): Call _bfd_sh_align_load_span.
775 (sh_swap_insns): Change relocs parameter to PTR.
776 * bfd-in2.h, libbfd.h: Rebuild.
777 * targets.c (bfd_elf32_sh_vec): Declare.
778 (bfd_elf32_shl_vec): Declare.
779 * config.bfd (sh-*-elf*): New target.
780 * configure.in (bfd_elf32_sh_vec): New target vector.
781 (bfd_elf32_shl_vec): New target vector.
782 * configure: Rebuild.
783 * Makefile.in: Rebuild dependencies.
784 (BFD32_BACKENDS): Add elf32-sh.o.
785 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
787 * elf.c (map_sections_to_segments): Check that LMA does not skip a
788 page before checking D_PAGED.
790 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
791 (ihex_write_object_contents): Remove extbase; always use segbase
796 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
797 * configure.host (i[345]86-*-*): Ditto.
798 * config.bfd (i[345]86-*-*): Ditto.
799 * configure: Regenerate.
801 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
806 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
807 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
808 * som.c (hppa_som_gen_reloc_type): Add new argument. If
809 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
810 will have an ST_CODE type, change the symbol's type to ST_DATA.
811 * som.c (hppa_som_gen_reloc_type): Update prototype.
815 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
816 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
817 (mips_elf_size_dynamic_sections): Don't require .got to exist.
818 (mips_elf_finish_dynamic_sections): Likewise.
822 * configure.host (HLDENV): New variable to set. Set it for
823 *-*-sysv4*, since those linkers may not support -R but they always
826 * libieee.h (NSECTIONS): Don't define.
827 (ieee_data_struct): Change section_table to asection **. Add
829 * ieee.c (get_section_entry): If the table isn't big enough, make
831 (ieee_slurp_sections): Remove assertion about number of sections.
832 (ieee_object_p): Adjust initialization of ieee to match changes to
835 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
836 symbols merely because we are generating a shared library.
837 (xcoff_build_ldsyms): Don't set up global linkage code for an
838 undefined symbol merely because we are generating a shared
844 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
845 (BFD32_BACKENDS) Add elf32-v850.o.
846 * archures.c: Add bfd_v850_arch.
847 * bfd-in2.h: Add bfd_v850_arch.
848 * config.bfd (v850-*-*): New target.
849 * configure: (bfd_elf32_v850_vec) New vector.
850 * configure.in: (bfd_elf32_v850_vec) New vector.
851 * cpu-v850.c: New file.
852 * elf.c (prep_headers): Added case bfd_arch_v850.
853 * elf32-v850.c: New file.
854 * targets.c (bfd_elf32_v850_vec): New vector.
859 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
860 a function code symbol for an XMC_XO symbol.
864 * mpw-config.in: Update editing of autoconf vars to reflect
865 Jul 18 configure.in change.
866 * mpw-make.sed: Update editing of include pathnames to be
867 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
871 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
872 which to offset to get the .plt entry address is ".plt".
876 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
877 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
878 Added, for internal use by the ARM gas.
884 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
885 in section dynidx start.
889 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
890 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
891 optimization for g++.
895 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
896 the -mrelocatable-lib bit set and the other doesn't, clear the
897 -mrelocatable-lib bit in the header.
901 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
902 symbol against a STT_FUNC symbol in a shared library.
906 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
907 symbol is found, automatically define the corresponding function
910 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
911 if sym.n_numaux is not zero.
912 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
913 entry to disagree about the number of aux entries if the symbol
916 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
917 section if it might be needed, not just if info->shared.
918 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
919 the start of .rel.dyn if we are going to use it.
920 (mips_elf_finish_dynamic_sections): Only clear the first element
921 of .rel.dyn if the size is greater than zero.
925 * xcofflink.c (xcoff_link_input_bfd): If we already called the
926 undefined_symbol callback for a symbol, then don't issue any more
927 warnings about loader relocs.
928 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
929 after calling the undefined_symbol callback.
931 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
932 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
933 as the AIX linker seems to do.
937 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
938 (evax_initialize): Remove evax_reloc_table.
939 (evax_close_and_cleanup): Ditto.
941 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
943 (evax_bfd_reloc_type_lookup): Ditto.
944 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
945 cooked_size == raw_size.
946 * evax-emh.c (_bfd_evax_register_filename): Remove.
947 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
948 * evax-misc.c (add_new_contents): Malloc section at full size.
949 (_bfd_save_evax_section): Memcpy section contents directly.
950 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
951 (evax_reloc_table): Remove.
953 * hosts/alphavms.h (O_ACCMODE): Define if needed.
955 * makefile.vms: Add better support for DEC C compilation
956 Add evax.h dependencies
958 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
959 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
960 (BFD_RELOC_ALPHA_BASEREG): Remove.
961 * bfd-in2.h, libbfd.h: Rebuild.
965 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
966 getgid if _WIN32 is defined.
967 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
971 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
972 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
974 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
979 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
981 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
982 (NEED_DECLARATION_REALLOC): New macro.
983 * configure, config.in: Rebuild.
984 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
985 (realloc): Declare if NEED_DECLARATION_REALLOC.
987 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
988 <strings.h> if they exist.
990 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
994 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
997 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
998 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
999 (elf_howto_table): Add entries for new relocs.
1000 (elf_i386_reloc_type_lookup): Handle new relocs.
1001 (elf_i386_info_to_howto): Just call abort.
1002 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
1003 (elf_i386_relocate_section): Likewise.
1008 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
1013 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
1014 only get the LMA from the phdr if they are in the same part of the
1017 * elf.c (map_sections_to_segments): Rewrite tests for starting a
1018 new segment to make them more comprehensible. If the relationship
1019 between the LMA and the VMA changed, start a new segment. Don't
1020 check dynsec when deciding whether to start a new segment for a
1021 writeable section; -N will now handle this.
1025 * libhppa.h: Remove "esel" changes. Not the right approach.
1026 * som.c: Corresponding changes.
1027 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
1028 which don't have a SOM symbol type associated with them.
1029 Reverses a 1994 change.
1033 Make ld -N more reasonable for ELF:
1034 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
1035 phdr_in_section to false, and always use a single load segment.
1036 (elf_sort_sections): Sort sections by LMA after VMA.
1037 (assign_file_positions_for_segments): If D_PAGED is not set, don't
1038 align to maxpagesize.
1039 (assign_file_positions_except_relocs): Likewise.
1040 * elfcode.h (elf_object_p): If a section is loaded but not page
1041 aligned, clear D_PAGED.
1045 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
1046 Added, for internal use by the ARM gas.
1048 * bfd-in2.h: Rebuilt
1052 * libhppa.h (R_HPPA_ESEL): New field selector.
1053 (e_esel): Similarly.
1054 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
1055 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
1056 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
1060 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
1061 archive search before looking for stripped dynamic objects.
1065 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
1066 symbol a warning rather than an error.
1070 * elf.c (assign_file_positions_for_segments): Track the virtual
1071 memory position separately from the file position, and use it to
1072 compute the alignment adjustment.
1077 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
1078 and fixed mask on R_D10V_10_PCREL_L.
1083 * elf64-mips.c: Include "aout/ar.h".
1084 (mips_elf64_slurp_armap): New static function.
1085 (mips_elf64_write_armap): New static function.
1086 (bfd_elf64_archive_*): Define.
1087 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
1088 Use instead of bfd_generic_archive_p.
1089 (bfd_elfNN_write_archive_contents): Define if not defined. Use
1090 instead of _bfd_write_archive_contents.
1091 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
1092 _bfd_generic_mkarchive.
1093 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
1094 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
1096 (TARGET_LITTLE_SYM): Likewise.
1097 * archive.c (bfd_slurp_armap): Check for and reject an archive map
1099 * Makefile.in: Rebuild dependencies.
1101 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
1102 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
1103 SHT_MIPS_EVENTS sections.
1104 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
1105 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
1107 (_bfd_mips_elf_fake_sections): Likewise.
1109 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
1110 * ecoff.c (ecoff_compute_section_file_positions): Copy
1111 rdata_in_text from backend info to tdata. Clear it if any data
1112 section comes before .rdata.
1113 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
1114 tdata rather than backend info.
1118 * configure.in: Fix test for whether a compiler has a 64 bit
1123 * configure.host (mips-sgi-irix6*): New host.
1125 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
1126 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
1127 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
1129 * configure: Rebuild.
1130 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
1131 (BFD_HOST_64_BIT): Define conditionally.
1132 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
1133 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
1134 (symvalue, bfd_size_type): Likewise.
1135 * bfd-in2.h: Rebuild.
1136 * Makefile.in (do_clean): Remove bfd-tmp.h.
1137 (do_distclean): Remove bfd-in3.h.
1138 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
1139 (bfd-in3.h): New target.
1141 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
1144 * configure.host: Set INSTALL_SHLIB.
1145 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
1146 * configure: Rebuild.
1147 * Makefile.in (install): Use @INSTALL_SHLIB@.
1149 * config.bfd (mips*-*-irix6*): New target.
1150 * configure.host: Handle Irix 6 shared library like Irix 5.
1152 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
1153 symbol for a magic name.
1154 (xcoff_link_input_bfd): Don't change the reloc symbol for an
1156 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
1161 * mpw-config.in: Add ELF support to mips config, create the
1162 elf32-target.h file in the object dir.
1163 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
1167 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
1168 Also removed most abort calls, in favor of using bfd reporting.
1173 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
1174 (BFD32_BACKENDS) Add elf32-d10v.o.
1175 * archures.c: Add bfd_d10v_arch.
1176 * bfd-in2.h: Add bfd_d10v_arch.
1177 * config.bfd (d10v-*-*): New target.
1178 * configure: (bfd_elf32_d10v_vec) New vector.
1179 * configure.in: (bfd_elf32_d10v_vec) New vector.
1180 * cpu-d10v.c: New file.
1181 * elf.c (prep_headers): Added case bfd_arch_d10v.
1182 * elf32-d10v.c: New file.
1183 * libbfd.h: Rebuild.
1184 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
1185 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
1186 * targets.c (bfd_elf32_d10v_vec): New vector.
1191 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
1195 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
1196 bfd_mach_i386_i8086 machine types.
1200 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
1205 * coffcode.h (coff_set_section_contents): A/UX does not require
1206 special handling of the _LIB section.
1210 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
1211 value for R_RELBYTE.
1213 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
1214 array if one was allocated.
1219 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
1220 use_rld_obj_head and rld_value.
1221 (mips_elf_link_hash_table_create): Initialize new fields.
1222 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
1224 (mips_elf_create_dynamic_sections): Create .rld_map section. If
1225 __rld_obj_head symbol not seen, create an __rld_map symbol.
1226 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
1227 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
1228 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
1229 __rld_obj_head symbol.
1230 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
1234 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
1236 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
1237 ppc_elf_addr16_ha_reloc.
1238 (ppc_elf_addr16_ha_reloc): New static function.
1240 * coff-mips.c (struct mips_hi): Define.
1241 (mips_refhi_list): New static variable.
1242 (mips_refhi_addr, mips_refhi_addend): Remove.
1243 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
1244 (mips_reflo_reloc): Process mips_refhi_list.
1245 (mips_relhi_list): New static variable.
1246 (mips_relhi_addr, mips_relhi_addend): Remove.
1247 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
1248 (mips_rello_reloc): Process mips_relhi_list.
1249 (mips_relocate_section): Permit an arbitrary number of REFHI or
1250 RELHI relocs before the associated REFLO or RELLO reloc.
1254 * aout-target.h (MY(callback)): Set reloc_count fields.
1258 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
1259 sections unless this is a SunOS link.
1261 * VERSION: Set to 2.7.1.
1263 * Released binutils 2.7.
1267 * i386aout.c: Include "aout/aout64.h".
1268 (i386aout_write_object_contents): New static function.
1269 (MY_write_object_contents): Define.
1271 * netbsd.h (MY(write_object_contents)): Make sure that
1272 adjust_sizes_and_vmas is called before fiddling with the magic
1277 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
1281 * libbfd-in.h (itos, stoi): Don't define.
1282 * libbfd.h: Rebuild.
1283 * i386lynx.c (KEEPIT): Define as udata.i.
1284 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
1285 (NAME(lynx,swap_ext_reloc_out)): Likewise.
1286 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
1287 flags. Don't use stoi.
1289 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
1291 * elf.c (map_sections_to_segments): Don't start a new segment for
1292 a writable section if it's on the same page as the previous
1293 segment. Reset the writable variable for a readonly section.
1297 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
1298 first_thunk_address, thunk_size, and import_table_size.
1299 * peicode.h: Improved some diagnostics regarding edata sections.
1301 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
1303 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
1304 (TARGET_LITTLE_SYM): Added missing D_PAGED.
1308 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
1309 with XCOFF_DEF_DYNAMIC set is really defined.
1310 (xcoff_link_check_dynamic_ar_symbols): Likewise.
1311 (xcoff_link_add_symbols): Only create special sections if using an
1314 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
1316 (bfd_install_relocation): Likewise.
1320 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
1322 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
1323 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
1324 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
1325 (elf64_alpha_link_hash_newfunc): Initialize flags field.
1326 (elf64_alpha_check_relocs): Record types of LITUSE entries that
1327 are found for LITERAL relocs.
1328 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
1329 taken, we cannot generate a .plt entry for the symbol.
1333 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
1334 sysconf functions (for gprof).
1335 * configure, config.in: Rebuild.
1339 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
1340 an archive if it has a map. If the object file has the wrong
1343 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
1344 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
1346 (alpha_relocate_section): Likewise.
1348 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
1349 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
1350 (coff_swap_sym_out): Use SYMESZ, not sizeof.
1351 (coff_swap_aux_out): Use AUXESZ, not sizeof.
1352 (coff_swap_lineno_out): Use LINESZ, not sizeof.
1353 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
1354 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
1355 * peicode.h: Corresponding changes.
1359 * elflink.h (elf_create_pointer_linker_section): Comment out code
1360 dealing with making GOT pointers negative of the GOT symbol for
1365 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
1366 increment the .rela.plt size until after we're done creating the
1368 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
1369 .rela.plt offset directly rather than calculating it.
1373 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
1374 Use autoconf-set values.
1375 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
1376 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
1379 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
1380 * configure: Rebuilt.
1384 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
1385 handling code > 1k away.
1389 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
1390 defined, output whenever the symbol is updated.
1394 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
1395 section to 0 if user_set_vma is set.
1396 * elflink.h (elf_bfd_final_link): Likewise.
1400 Partially undo patch of Jun 20.
1401 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
1402 (coff_compute_section_file_positions): Likewise.
1403 (coff_write_object_contents): Likewise. Re-add deleted code, but
1404 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
1405 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
1409 * config.bfd: Add support for *-*-rtems* configurations.
1413 * elf.c (prep_headers): Add bfd_arch_alpha case.
1417 * elf64-alpha.c: New file.
1418 * config.bfd (alpha-*-linuxecoff*): New target.
1419 (alpha-*-linux*, alpha-*-elf*): New targets.
1420 * configure.in (bfd_elf64_alpha_vec): New vector.
1421 * configure: Rebuild.
1422 * targets.c (bfd_elf64_alpha_vec): Declare.
1423 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
1424 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
1425 * bfd-in2.h, libbfd.h: Rebuild.
1426 * Makefile.in: Rebuild dependencies.
1427 (BFD64_BACKENDS): Add elf64-alpha.o.
1428 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
1432 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
1433 than relying on a right shift of 32.
1437 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
1438 ifdef to COFF_WITH_PE.
1439 (coff_compute_section_file_positions): Likewise.
1440 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
1441 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
1442 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
1443 COFF_IMAGE_WITH_PE, always include.
1445 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
1449 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
1450 approximate the correct answer if SIZEOF_HEADERS was not used.
1452 * binary.c (binary_set_section_contents): Set section file
1453 position based on LMA rather than VMA.
1457 * linker.c (_bfd_generic_link_output_symbols): Don't output any
1458 symbols if info->strip == strip_all.
1462 * coff-h8300.c: Remove #if 0 code.
1463 (compatable): Don't allow mixing/matching of different architectures.
1465 * archures.c (bfd_mach_h8300s): Add.
1466 * bfd-in2.h: Rebuilt.
1467 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
1469 (h8300_reloc16_estimate): Likewise.
1470 (h8300_reloc16_extra_cases): Likewise.
1471 (h8300_bfd_link_add_symbols): Likewise.
1472 * coffcode.h (coff_set_arch_mach_hook): Likewise.
1473 (coff_set_flags): Likewise.
1474 * cpu-h8300.c (h8300_scan): Likewise.
1475 Add H8/S to bfd_h8300_arch list.
1479 Added support for Alpha OpenVMS:
1480 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
1481 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
1482 * config.h-vms, makefile.vms: New files.
1483 * config.bfd (alpha-*-*vms*): New target.
1484 * configure.in (evax_alpha_vec): New target vector.
1485 * configure: Rebuild.
1486 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
1487 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
1488 * targets.c (bfd_target_evax_flavour): Define.
1489 (evax_alpha_vec): Declare.
1490 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
1491 if BFD64 is defined.
1492 * bfd-in2.h, libbfd.h: Rebuild.
1493 * Makefile.in: Rebuild dependencies.
1494 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
1495 evax-emh.o, and evax-misc.o.
1496 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
1497 evax-etir.c, evax-emh.c, and evax-misc.c.
1498 (HFILES): Add evax.h.
1502 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
1504 (h8300_bfd_link_add_symbols): Likewise.
1508 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
1509 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
1513 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
1514 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
1516 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
1517 R_MIPS_32 relocs if creating a shared library.
1521 * peicode.h (add_data_entry): Use pei_section_data rather than
1522 _cooked_size. Corresponds to May 13 change in coffcode.h.
1526 * cofflink.c (_bfd_coff_final_link): Handle long section names.
1527 * coffcode.h (coff_write_object_contents): If there are long
1528 section names, always set the f_symptr field, even if there are no
1530 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
1531 if there are no symbols.
1533 * coffgen.c (make_a_section_from_file): Check return value of
1534 _bfd_coff_read_string_table.
1535 (coff_real_object_p): Check return value of
1536 make_a_section_from_file.
1537 (_bfd_coff_read_string_table): Check that there are some symbols
1538 before trying to read the string table size.
1542 * xcofflink.c (xcoff_link_add_symbols): When considering whether
1543 to replace a symbol in a dynamic object with a symbol from another
1544 dynamic object, do the replacement if the existing symbol is
1545 global linkage code.
1547 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
1548 for _ptrgl, and treat it as global linkage code.
1550 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
1551 filename or N_SO symbol past the offset, and use it to indicate
1552 that there is no line number or function when appropriate.
1556 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
1557 common symbol defined by the linker. Don't export function code
1558 even if export_defineds is set.
1562 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
1564 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
1565 (h8300_symbol_address_p): New function.
1566 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
1571 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
1573 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
1574 correctly for the two variants. Allow relaxing if the target
1575 is 128 bytes away since after relaxation it'll be 126 bytes away.
1576 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
1577 "dot" and "value". Allow relaxing if the target is 128 bytes
1578 away since after relaxation it'll be 126 bytes away.
1579 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
1580 the given section until nothing changes.
1584 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
1585 alignment hack--we can get the lnnoptr info another way without
1586 suddenly increasing the alignment requirements. Set the flags for
1588 (ecoff_compute_section_file_positions): Do so.
1592 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
1593 to keep the HP emulator database happy.
1595 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
1600 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
1601 name of a NULL section.
1605 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
1606 set, always call the notice callback.
1608 * VERSION: Increment for bfdlink.h change.
1612 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
1613 (sh_relax_delete_bytes): Correct handling of differently sized
1614 trailing alignment reloc.
1616 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
1617 * bfd-in2.h: Rebuild.
1618 * configure.in: Warn if there is no known 64 bit type.
1619 * configure: Rebuild.
1621 * Makefile.in: Rebuild dependencies.
1622 (BFD32_BACKENDS): Add ppcboot.o.
1623 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
1625 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
1630 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
1631 (bfd_mips_elf64_swap_reginfo_out): Move from here...
1632 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
1633 (bfd_mips_elf64_swap_reginfo_out): ...to here.
1637 * elf64-mips.c: Improve reloc special_functions and handling of
1638 SHT_MIPS_OPTIONS section.
1639 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
1640 mips_elf_hi16_reloc and make globally visible.
1641 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
1642 make globally visible.
1643 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
1644 make globally visible.
1645 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
1646 and make globally visible.
1647 (gprel16_with_gp): Check howto->src_mask before using value in
1649 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
1650 and make globally visible.
1651 (gprel32_with_gp): Check howto->src_mask before fetching value.
1652 (bfd_mips_elf_swap_options_in): New function.
1653 (bfd_mips_elf_swap_options_out): New function.
1654 (_bfd_mips_elf_set_private_flags): Rename from
1655 mips_elf_set_private_flags and make globally visible.
1656 (_bfd_mips_elf_copy_private_bfd_data): Rename from
1657 mips_elf_copy_private_bfd_data and make globally visible.
1658 (_bfd_mips_elf_merge_private_bfd_data): Rename from
1659 mips_elf_merge_private_bfd_data and make globally visible.
1660 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
1661 for a SHT_MIPS_OPTIONS section.
1662 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
1663 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
1664 name of a SHT_MIPS_OPTIONS section.
1665 (_bfd_mips_elf_set_section_contents): New function.
1666 (mips_elf32_section_processing): Set the GP value in a
1667 SHT_MIPS_OPTIONS section.
1668 (_bfd_mips_elf_find_nearest_line): Rename from
1669 mips_elf_find_nearest_line and make globally visible.
1670 (bfd_elf32_set_section_contents): Define.
1671 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
1672 (_bfd_mips_elf_lo16_reloc): Declare.
1673 (_bfd_mips_elf_gprel16_reloc): Declare.
1674 (_bfd_mips_elf_got16_reloc): Declare.
1675 (_bfd_mips_elf_gprel32_reloc): Declare.
1676 (_bfd_mips_elf_set_private_flags): Declare.
1677 (_bfd_mips_elf_copy_private_bfd_data): Declare.
1678 (_bfd_mips_elf_merge_private_bfd_data): Declare.
1679 (_bfd_mips_elf_find_nearest_line): Declare.
1680 (_bfd_mips_elf_set_section_contents): Declare.
1682 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
1684 (elf_info_to_howto): Define.
1685 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
1687 (elf_info_to_howto): Define.
1688 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
1690 (elf_info_to_howto): Define.
1692 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
1693 R_MOV16B[12], to match change in coff/internal.h.
1697 * elf64-mips.c: Extensive additions to provide better support for
1698 writing files and for gas.
1699 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
1700 of mips_elf_object_p.
1701 (mips_elf32_object_p): Rename from mips_elf_object_p; call
1702 _bfd_mips_elf_object_p.
1703 (_bfd_mips_elf_final_write_processing): Rename from
1704 mips_elf_final_write_processing and make globally visible.
1705 (_bfd_mips_elf_fake_sections): Rename from
1706 mips_elf_fake_sections and make globally visible.
1707 (_bfd_mips_elf_section_from_bfd_section): Rename from
1708 mips_elf_section_from_bfd_section and make globally visible.
1709 (_bfd_mips_elf_section_processing): New function, broken out of
1710 mips_elf_section_processing.
1711 (mips_elf32_section_processing): Rename from
1712 mips_elf_section_processing; call
1713 _bfd_mips_elf_section_processing.
1714 (_bfd_mips_elf_symbol_processing): Rename from
1715 mips_elf_symbol_processing and make globally visible.
1716 (_bfd_mips_elf_read_ecoff_info): Rename from
1717 mips_elf_read_ecoff_info and make globally visible.
1718 (mips_elf32_ecoff_debug_swap): Rename from
1719 mips_elf_ecoff_debug_swap.
1720 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
1721 struct symbol_cache_entry.
1722 (_bfd_elf_validate_reloc): New function, moved in from
1723 elfcode.h:validate_reloc.
1724 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
1725 to _bfd_elf_validate_reloc. Change all callers.
1726 * elf-bfd.h (bfd_section_from_shdr): Declare.
1727 (_bfd_elf_symbol_from_bfd_symbol): Declare.
1728 (_bfd_elf_validate_reloc): Declare.
1729 (_bfd_mips_elf_object_p): Declare.
1730 (_bfd_mips_elf_fake_sections): Declare.
1731 (_bfd_mips_elf_section_from_bfd_section): Declare.
1732 (_bfd_mips_elf_section_processing): Declare.
1733 (_bfd_mips_elf_symbol_processing): Declare.
1734 (_bfd_mips_elf_read_ecoff_info): Declare.
1735 (_bfd_mips_elf_final_write_processing): Declare.
1736 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
1739 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
1740 (mips_elf_final_write_processing): Likewise.
1744 64-bit MIPS ELF ABI objdump support:
1745 * elf64-mips.c: New file.
1746 * Makefile.in: Rebuild dependencies.
1747 (BFD64_BACKENDS): Add elf64-mips.o.
1748 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
1749 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
1750 bfd_elf64_littlemips_vec to targ_selvecs.
1751 (mips*-*-elf*): Likewise.
1752 * confingure.in: Add bfd_elf64_bigmips_vec and
1753 bfd_elf64_littlemips_vec to vector switch.
1754 * configure: Rebuild.
1755 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
1756 broken out of mips_elf_section_from_shdr.
1757 (mips_elf32_section_from_shdr): Rename from
1758 mips_elf_section_from_shdr. Call new function.
1759 (elf_backend_section_from_shdr): Update name of renamed function.
1760 * elf-bfd.h (struct elf_size_info): Change second parameter of
1761 write_out_phdrs to be const. Likewise for second parameter of
1763 (struct bfd_elf_section_data): Add rel_hdr2 field.
1764 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
1765 (bfd_elf32_swap_symbol_out): Likewise.
1766 (bfd_elf32_swap_reloc_in): Likewise.
1767 (bfd_elf32_swap_reloc_out): Likewise.
1768 (bfd_elf32_swap_reloca_in): Likewise.
1769 (bfd_elf32_swap_reloca_out): Likewise.
1770 (bfd_elf32_swap_phdr_in): Likewise.
1771 (bfd_elf32_swap_phdr_out): Likewise.
1772 (bfd_elf32_swap_dyn_in): Likewise.
1773 (bfd_elf32_swap_dyn_out): Likewise.
1774 (bfd_elf32_slurp_symbol_table): Declare.
1775 (bfd_elf32_write_shdrs_and_ehdr): Declare.
1776 (bfd_elf32_write_out_phdrs): Declare.
1777 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
1778 (bfd_elf64_swap_symbol_out): Likewise.
1779 (bfd_elf64_swap_reloc_in): Likewise.
1780 (bfd_elf64_swap_reloc_out): Likewise.
1781 (bfd_elf64_swap_reloca_in): Likewise.
1782 (bfd_elf64_swap_reloca_out): Likewise.
1783 (bfd_elf64_swap_phdr_in): Likewise.
1784 (bfd_elf64_swap_phdr_out): Likewise.
1785 (bfd_elf64_swap_dyn_in): Likewise.
1786 (bfd_elf64_swap_dyn_out): Likewise.
1787 (bfd_elf64_slurp_symbol_table): Declare.
1788 (bfd_elf64_write_shdrs_and_ehdr): Declare.
1789 (bfd_elf64_write_out_phdrs): Declare.
1790 (_bfd_mips_elf_section_from_shdr): Declare.
1791 * elf.c (bfd_section_from_shdr): Remove assertion requiring
1792 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
1793 section for the section, add the new one to rel_hdr2. Increment
1794 reloc_count rather than setting it.
1795 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
1796 Remove static declaration.
1797 (elf_write_shdrs_and_ehdr): Define name as macro.
1798 (elf_write_out_phdrs): Likewise.
1799 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
1800 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
1801 (elf_swap_symbol_in): Change second parameter to be const.
1802 (elf_swap_symbol_out): Likewise.
1803 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
1804 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
1805 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
1806 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
1807 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
1808 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
1809 parameter to be const. Make non-static.
1810 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
1812 (elf_slurp_symbol_table): Make non-static.
1813 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
1814 * elfxx-target.h (elf_info_to_howto): Define if not defined.
1815 (elf_backend_size_info): Likewise.
1816 (elfNN_bed): Use elf_backend_size_info.
1817 * targets.c (bfd_elf64_bigmips_vec): Declare.
1818 (bfd_elf64_littlemips_vec): Declare.
1819 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
1820 bfd_elf64_littlemips_vec if BFD64 is defined.
1822 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
1826 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
1827 zeroes, in alignment holes.
1829 * configure: Rebuild with autoconf 2.10.
1831 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
1832 potential leading underscore in the allocated buffer.
1836 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
1837 symbols into .sbss if this is a relocatable link.
1841 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
1842 undefined symbols when creating a shared library.
1846 * coff-sh.c: Add a bunch of new code and static const arrays to
1847 support aligning loads and stores on four byte memory boundaries.
1849 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
1851 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
1852 call sh_align_loads.
1853 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
1858 * cache.c (bfd_open_file): Unlink the file before opening it for
1861 * opncls.c (bfd_fdopenr): Set opened_once.
1865 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
1868 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
1869 the code unconditionally.
1873 * libcoff-in.h (struct pei_section_tdata): Define structure.
1874 (pei_section_data): Define macro.
1875 * libcoff.h: Rebuild.
1876 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
1877 store s_paddr field in pei_section_data.
1878 (coff_compute_section_file_positions): Use pei_section_data rather
1879 than _cooked_size, and don't overwrite an existing value.
1880 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
1881 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
1882 * peicode.h (coff_bfd_copy_private_section_data): Define if
1884 (pe_bfd_copy_private_section_data): New static function if
1889 * srec.c (srec_set_arch_mach): Write as a function rather than a
1892 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
1893 no map, just check each member in turn to see whether it is
1898 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
1899 table. Call BFD_ASSERT to validate header size, instead of
1901 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
1906 * ppcboot.c: New target for looking at PPCbug boot records.
1908 * config{ure.in,.bfd}: Add support for ppcboot target.
1910 * configure: Regenerate.
1914 * coff-h8300.c (howto_table): Update names to match recent
1915 changes to include/coff/internal.h. Fix minor errors in the
1916 existing relocs. Add R_MOVL1 and R_MOVL2.
1917 (rtype2howto): Similarly.
1918 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
1919 existing relaxing code and peform more relaxing.
1920 (h8300_reloc16_extra_cases): Likewise.
1924 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
1929 * elfcode.h (elf_object_p): Reject generic ELF target if
1930 e_machine matches an alternate machine code in a specific backend.
1932 * netbsd-core.c (netbsd_core_vec): Remove initializer for
1933 obsolete align_power_min field.
1937 * coff-h8300.c (reloc_howto_type): Add howto entry for
1939 (rtype2howto): Handle R_PCRWORD_B.
1940 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
1941 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
1942 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
1943 branch (R_PCWORD_B).
1947 * aoutx.h (translate_from_native_sym_flags): Set the section for
1948 BSF_CONSTRUCTOR symbols.
1950 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
1955 * coffcode.h (coff_write_object_contents): In comdat section lookup,
1956 stop looking when section is found.
1960 * coffcode.h (STRING_SIZE_SIZE): Define.
1961 (styp_to_sec_flags): Handle long symbol names when looking for the
1963 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
1964 (bfd_coff_long_section_names): Define.
1965 (coff_write_object_contents): Handle long section names.
1966 (bfd_coff_std_swap_table): Initialize new field.
1967 * libcoff.h: Rebuild.
1968 * coffgen.c (make_a_section_from_file): Handle long section
1970 (coff_write_symbols): Handle long section names.
1971 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1972 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1973 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
1974 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
1975 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
1976 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
1977 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1978 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1980 * bout.c (b_out_callback): Set lma of sections.
1981 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
1982 parameter to output_bfd. Used input_bfd instead of output_bfd in
1987 * aoutx.h (translate_from_native_sym_flags): Don't create
1988 SEC_CONSTRUCTOR sections.
1989 * ecoff.c (ecoff_set_symbol_info): Likewise.
1991 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
1996 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
1997 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
2001 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
2002 mips_32_relocs field.
2003 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
2004 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
2005 relocs against a global symbol which is not defined in a regular
2007 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
2008 against a global symbol, increment mips_32_relocs.
2009 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
2010 the symbol is not defined in a regular file, make room in the
2015 * ecoff.c (ecoff_compute_section_file_positions): Track the real
2016 file position and the virtual file position separately. Set
2017 filepos information bsaed on the real file position.
2018 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
2019 Jan 23 change to coffcode.h.
2021 * som.c (som_slurp_symbol_table): Set the symbol count to the
2022 number of BFD symbols created.
2026 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
2027 output file if linking shared objects. Loop to check all relocs,
2028 rather than returning false on first error.
2032 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
2033 (ppc_elf_additional_program_headers): If .interp section, bump #
2034 of program headers by 1.
2035 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
2036 (ppc_elf_size_dynamic_sections): Add support for .plt section.
2037 (ppc_elf_check_relocs): Print out filename in debug code. Enable
2039 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
2041 (ppc_elf_relocate_section): If the output section isn't defined,
2042 don't abort, just give an error message.
2044 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
2045 being created is .sdata or .sdata2, don't make the symbol dynamic.
2049 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
2050 members of an archive for dynamic objects with no symbols, and
2051 pass them directly to check_archive_element.
2052 (xcoff_link_check_ar_symbols): Pass dynamic objects to
2053 xcoff_link_check_dynamic_ar_symbols.
2054 (xcoff_link_check_dynamic_ar_symbols): New static function.
2056 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
2057 from _bfd_nodynamic to _bfd_xcoff.
2058 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
2060 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
2061 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
2062 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
2063 * libcoff.h: Rebuild.
2064 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
2065 (xcoff_get_section_contents): New static function.
2066 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
2067 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
2068 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
2069 (xcoff_dynamic_reloc): New static variable.
2070 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
2071 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
2075 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
2076 if reloc_entry->addend is not 0.
2077 (CALC_ADDEND): Just set the addend to reloc.r_offset.
2081 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
2083 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
2084 Add entries for R_SPARC_[56].
2085 (sparc_reloc_map): Add entries for R_SPARC_[56].
2089 Optimize linking of stabs in sections as used in ELF and COFF.
2090 * stabs.c: New file.
2091 * libbfd-in.h (_bfd_link_section_stabs): Declare.
2092 (_bfd_write_section_stabs): Declare.
2093 (_bfd_write_stab_strings): Declare.
2094 * libbfd.h: Rebuild.
2095 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
2096 (struct coff_link_hash_table): Add stab_info field.
2097 * libcoff.h: Rebuild.
2098 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
2100 (coff_link_add_symbols): Call _bfd_link_section_stabs if
2102 (_bfd_coff_final_link): Write out stab strings hash table.
2103 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
2104 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
2106 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
2107 (struct bfd_elf_section_data): Add stab_info field.
2108 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
2110 * elflink.h (elf_link_add_object_symbols): If appropriate, call
2111 _bfd_link_section_stabs.
2112 (elf_bfd_final_link): Write out stab strings hash table.
2113 (elf_link_input_bfd): Handle optimized stabs sections.
2114 * reloc.c (_bfd_final_link_relocate): Check address against
2115 _raw_size rather than _cooked_size.
2116 * Makefile.in: Rebuild dependencies.
2117 (BFD_LIBS): Add stabs.o
2118 (BFD_LIBS_CFILES): Add stabs.c.
2120 * VERSION: Increment for bfdlink.h change.
2122 * coffgen.c (coff_renumber_symbols): Correct handling of
2123 BSF_NOT_AT_END common symbols.
2127 * coff-ppc.c (record_toc): Add cast to avoid warning.
2128 (ppc_allocate_toc_section): Likewise.
2129 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
2130 (ppc_coff_reloc_type_lookup): Remove unreached code.
2131 * coffcode.h (coff_write_object_contents): Don't take the address
2133 * peicode.h (pe_print_idata): Add casts to avoid warning.
2134 (pe_print_edata): Likewise.
2135 (pe_print_reloc): Remove ANSI C string concatenation.
2139 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
2141 * libcoff.h: Rebuild.
2142 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
2144 (coff_swap_aux_out): Likewise.
2145 * peicode.h (coff_swap_aux_in): Likewise.
2146 (coff_swap_aux_out): Likewise.
2147 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
2149 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
2151 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
2152 Fix up .bf endndx link fields.
2153 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
2155 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
2160 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
2161 on Solaris PowerPC systems doesn't get confused.
2163 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
2166 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
2167 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
2168 update did_reg and did_reg2.
2172 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
2174 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
2175 callback routines, pass h->root.string rather than name, in case
2176 copy is true and name is transient.
2180 * elfcore.h: Add support for core files with multiple threads.
2181 (Primarily for Solaris.)
2185 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
2186 section->orelocation is NULL.
2188 * coffgen.c (bfd_coff_get_syment): New function.
2189 (bfd_coff_get_auxent): New function.
2190 * bfd-in.h (bfd_coff_get_syment): Declare.
2191 (bfd_coff_get_auxent): Declare.
2192 * bfd-in2.h: Rebuild.
2196 * elf32-mips.c (struct mips_hi16): Define.
2197 (mips_hi16_addr, mips_hi16_addend): Remove.
2198 (mips_hi16_list): New static variable.
2199 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
2200 (mips_elf_lo16_reloc): Process mips_hi16_list.
2201 (mips_elf_relocate_section): Permit an arbitrary number of HI16
2202 relocs before the associated LO16 reloc.
2206 * versados.c (versados_scan): Check bfd_alloc return value.
2207 (versados_object_p): Check all bfd_read return values. Require
2208 that lang field be less than 10, to avoid confusion with Intel Hex
2211 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
2213 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
2214 not 0, for an absolute symbol.
2215 (NAME(aout,swap_ext_reloc_out)): Likewise.
2217 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
2218 (ihex_write_object_contents): For a large start address, output
2219 the full 32 bit address in record type 5.
2221 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
2222 to int to avoid promotion problems in prototype.
2226 * configure.host: Use ${srcdir} when looking for picfrag.
2228 * configure.host: Switch on ${libdir}, not $(libdir). From
2231 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
2232 entry point, not just for DYNAMIC objects.
2233 * sunos.c (sunos_add_dynamic_symbols): Always call
2234 sunos_create_dynamic_sections. If called with a non DYNAMIC
2235 object, don't do anything else.
2236 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
2240 * configure.in: Permit --enable-shared to specify a list of
2242 * configure: Rebuild.
2244 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
2245 host when configuring with --enable-shard.
2249 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
2252 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
2253 to avoid crashing in bfd_hash_replace.
2255 * sysdep.h: Use #ifdef, not #if.
2259 * config.in: Rebuild.
2263 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
2264 (AC_CHECK_HEADERS): Check for sys/time.h
2265 (AC_HEADER_TIME): Add macro.
2266 * configure: Rebuild.
2267 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
2268 to control what combination of <time> and <sys/time.h>
2273 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
2274 (aout_32_sunos4_write_object_contents): Likewise.
2275 * aoutx.h (NAME(aout,machine_type)): Handle
2276 bfd_mach_sparc_{sparclet,sparclite}.
2277 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
2278 (bfd_mach_sparc_v9_p): Update.
2279 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
2280 * libaout.h (enum machine_type): Add M_SPARCLET.
2281 * sunos.c (MACHTYPE_OK): Define.
2282 * bfd-in2.h: Regenerated.
2286 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
2287 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
2288 * elflink.c (_bfd_elf_create_got_section): Store the
2289 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
2290 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
2291 global offset table goes over 0x1000, set the value of
2292 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
2293 (elf32_sparc_relocate_section): Subtract the offset of
2294 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
2296 * elfcode.h: Don't include <string.h>.
2300 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
2301 generic_link_hash_newfunc. All references changed.
2302 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
2303 moved here from libbfd-in.h.
2304 * libbfd-in.h: Corresponding changes.
2305 * libbfd.h: Regenerated.
2309 * aoutx.h (aout_link_input_section_std): When reporting an
2310 overflow error, use the name of the symbol in the hash table if
2312 (aout_link_input_section_ext): Likewise.
2314 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
2315 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
2319 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
2320 * coffcode.h (coff_compute_section_file_positions): Likewise.
2321 (coff_write_object_contents): Likewise.
2325 * section.c (SEC_LINK_ONCE): Define.
2326 (SEC_LINK_DUPLICATES): Define.
2327 (SEC_LINK_DUPLICATES_DISCARD): Define.
2328 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
2329 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
2330 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
2331 * bfd-in2.h: Rebuild.
2332 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
2333 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
2334 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
2335 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
2336 SEC_LINK_ONCE, and look through the symbol table for the setting
2337 for SEC_LINK_DUPLICATES.
2338 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
2339 set for a section, find the section symbol in the symbol table,
2340 and set the aux entry based on SEC_LINK_DUPLICATES.
2341 * coffgen.c (coff_print_symbol): Add a space before "checksum".
2342 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
2343 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
2344 * coff-i386.c (i386coff_vec): Likewise.
2345 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
2347 * VERSION: Bump to 2.6.1.
2348 * Makefile.in (stamp-h): Depend upon VERSION.
2352 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
2353 * libbfd.h: Rebuilt.
2354 * linker.c (generic_link_hash_newfunc): No longer static.
2355 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
2357 * coff-h8300.c: Add two derived hash tables and their associated
2358 funtions and #defines for use by the h8300 linker.
2359 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
2360 the function vector as needed. Place the address of the function
2361 vector entry in the location specified by the R_MEM_INDIRECT reloc.
2362 Rewrite the vectors section contents as necessary.
2363 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
2364 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
2365 (coff_bfd_link_hash_table_create): Likewise.
2369 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
2370 __attribute__ ((__unused__)) so that -Wall doesn't warn about
2372 (hppa_rebuild_insn): Pass pointer to correct type to
2373 low_sign_unext and dis_assemble_21.
2377 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
2378 Stick with sparc-*-{sysv4*,solaris2*}.
2382 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
2383 (coff_swap_aux_out): Swap out extra PE x_scn fields.
2384 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
2385 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
2386 fields is non-zero, print them.
2388 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
2389 ifdef. Remove unused variables.
2390 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
2392 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
2393 (get_symbol_value): Ifdef out.
2394 (pe_ppc_reloc): Ifdef out. Remove unused variables.
2395 (coff_ppc_relocate_section): Remove unused variables. Make
2396 fprintf strings and argument types correspond. Put before_addr in
2398 (dump_toc): Make fprintf strings and argument types correspond.
2399 (ppc_process_before_allocation): Remove unused variables. Always
2401 (ppc_reflo_reloc): Ifdef out.
2402 (ppc_addr32nb_reloc): Ifdef out.
2403 (ppc_coff_rtype2howto): Make fprintf strings and argument types
2405 (coff_ppc_rtype_to_howto): Likewise.
2406 (ppc_coff_swap_sym_in_hook): Remove unused variables.
2408 * peicode.h (pe_print_idata): Move otherwise unused variables into
2409 the #ifdef where they are used. Always return a value.
2410 (pe_print_edata): Make fprintf strings and argument types
2411 correspond. Always return a value.
2412 (pe_print_pdata): Removed unused variable addr_value. Always
2414 (pe_print_reloc): Remove unused variable onaline. Make fprintf
2415 strings and argument types correspond. Always return a value.
2417 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
2418 (ppc_elf_finish_dynamic_symbol): Move definition of unused
2419 variable rela inside #if 0 section where it is used.
2421 * ns32k.h: New file.
2422 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
2423 functions to start with _bfd_.
2424 * aout-ns32k.c: Include ns32k.h. Change references to renamed
2425 functions in cpu-ns32k.h.
2426 * Makefile.in: Rebuild dependencies.
2427 (HFILES): Add ns32k.h.
2429 * section.c (struct sec): Add linker_mark field. Change
2430 user_set_vma and reloc_done to be single bit fields.
2431 (STD_SECTION): Update accordingly.
2432 * bfd-in2.h: Rebuild.
2433 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
2435 (aout_link_input_bfd): Don't link unmarked sections.
2436 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
2438 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
2439 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
2441 * elflink.h (elf_bfd_final_link): Mark sections included in the
2443 (elf_link_input_bfd): Don't link unmarked sections.
2444 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
2446 (xcoff_link_input_bfd): Don't link unmarked sections.
2448 * coffswap.h (coff_swap_scnhdr_out): Include section name in
2449 overflow error messages.
2453 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
2454 is not set, print "BFD: " before the error message.
2456 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
2458 * configure: Rebuild.
2462 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
2465 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
2466 m68k-aout, m68k-coff, and m68k-elf targets.
2470 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
2471 (ieee_generic_stat_arch_elt): Restructured to prevent
2472 ieee_object_p from being called repeatedly.
2476 * coffcode.h (coff_write_object_contents): Allocate
2477 buffers large enough for any FILEHDR or AOUTHDR.
2481 * ecofflink.c (lookup_line): New static function, renamed and
2482 slighly changed from old _bfd_ecoff_locate_line.
2483 (_bfd_ecoff_locate_line): Cache line number information. Use
2484 lookup_line for actual lookup.
2488 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
2489 multiple of 20 bytes.
2493 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
2494 allocate ecoff_find_line, and don't initialize by hand.
2495 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
2496 mips_elf_find_line, and don't call memset.
2498 * coffcode.h (coff_compute_section_file_positions): If not
2499 producing a final executable, don't consider sofar when aligning
2500 the section to the correct size.
2504 * coffcode.h (coff_add_missing_symbols): Ifdef out.
2505 (coff_write_object_contents): Don't call coff_add_missing_symbols.
2506 * coffgen.c (coff_section_symbol): Ifdef out.
2510 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
2511 output_bfd is not NULL.
2515 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
2516 of bfd_alloc (fixes fix_line not being initialized).
2517 Delete zeroing of fix_{value,tag,end,scnlen} fields.
2521 * coffcode.h: Allow specific backends to override the
2522 bfd_link_add_symbols routine.
2524 * coff-h8300.c: Include genlink.h.
2525 (howto_table): Add R_MEM_INDIRECT.
2526 (rtype2howto): Support R_MEM_INDIRECT.
2527 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
2532 * coff-alpha.c (alpha_relocate_section): Use
2533 info->callbacks_warning, rather than _bfd_error_handler, for
2534 "multiple gp" warning.
2538 * linker.c (bfd_wrapped_link_hash_lookup): New function.
2539 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
2540 table string. Use bfd_wrapped_link_hash_lookup.
2541 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
2543 * aoutx.h (aout_link_write_symbols): Use the name from the hash
2544 table, if any, when writing out symbols.
2545 (aout_link_input_section_std): Use the name from the hash table,
2546 if any, when reporting undefined symbols.
2547 (aout_link_input_section_ext): Likewise.
2548 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
2549 * bout.c (get_value): Likewise.
2550 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2551 * ecoff.c (ecoff_reloc_link_order): Likewise.
2552 * elflink.h (elf_link_add_object_symbols): Likewise.
2553 (elf_reloc_link_order): Likewise.
2554 * linker.c (_bfd_generic_link_output_symbols): Likewise.
2555 (_bfd_generic_reloc_link_order): Likewise.
2556 (default_indirect_link_order): Likewise.
2557 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
2558 * sunos.c (sunos_add_one_symbol): Likewise.
2559 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2560 (bfd_xcoff_link_count_reloc): Likewise.
2561 (xcoff_reloc_link_order): Likewise.
2563 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
2564 into -1 for intern->rss.
2566 * configure: Rebuild with autoconf 2.8.
2570 * stab-syms.c (__define_stab_duplicate): Define.
2571 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
2573 * bfd-in.h (bfd_get_stab_name): Declare.
2574 * bfd-in2.h: Rebuild.
2575 * Makefile.in: Rebuild dependencies.
2576 (BFD_LIBS): Add stab-syms.o.
2577 (BFD_LIBS_CFILES): Add stab-syms.c.
2578 (BFD32_BACKENDS): Remove stab-syms.o.
2579 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
2580 * configure.in: Don't list stab-syms.o in bfd_backends.
2581 * configure: Rebuild.
2582 * libaout.h (aout_stab_name): Don't declare.
2583 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
2588 * elf.c (assign_file_positions_for_segments): Adjust file offset
2589 for section alignment even if SEC_LOAD is not set.
2593 * configure.in: Don't set SHLIB or SHLINK to an empty string,
2594 since they appear as targets in Makefile.in.
2595 * configure: Rebuild.
2597 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
2598 don't fiddle with a symbol which is not defined anywhere.
2602 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
2603 though they are defined in a shared library.
2604 (xcoff_build_ldsyms): Likewise.
2606 * coffgen.c (coff_find_nearest_line): Don't look at the line
2607 numbers for the section if section->lineno is NULL.
2609 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
2610 message rather than calling BFD_ASSERT.
2611 * elfcode.h (write_relocs): Check return value of
2612 _bfd_elf_symbol_from_bfd_symbol.
2616 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
2621 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
2623 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
2624 hppa_reloc_field_selector_type_alt.
2625 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
2626 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
2628 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
2632 * elf.c (assign_file_positions_for_segments): Adjust the segment
2633 memory size for the alignment of a SEC_ALLOC section, not just a
2638 * m68klinux.c: New file.
2639 * hosts/m68klinux.h: New file.
2640 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
2641 * configure.in (m68*-*-linux*): New native host.
2642 (m68klinux_vec): New vector.
2643 * configure: Rebuild.
2644 * targets.c (m68klinux_vec): Declare.
2645 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
2646 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
2647 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
2648 declaration from bfd_linux_size_dynamic_sections.
2649 (bfd_m68klinux_size_dynamic_sections): Declare.
2650 * bfd-in2.h: Rebuild.
2651 * Makefile.in: Rebuild dependencies.
2652 (BFD32_BACKENDS): Add m68klinux.o.
2653 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
2657 * libhppa.h (pa_arch): Add pa20.
2658 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
2659 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
2660 (hppa_field_adjust): Handle e_nsel.
2661 * som.c: Provide default definitions for many new relocs found only
2662 in hpux10 include files.
2663 (som_fixup_formats): Add several new relocs from hpux10.
2664 (som_hppa_howto_table): Add hpux10 relocs.
2665 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
2669 * mpw-make.sed: Edit out recent shared library support, and
2670 rules to rebuild .h files using doc/chew.
2674 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
2675 size even of sections with no contents.
2679 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
2680 starting with '$' the way we skip names starting with '.'. When
2681 updating x_endndx, don't be fooled by an index which has been
2684 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
2685 struct/union/enum type with no elements.
2689 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
2691 * archive.c (bfd_generic_archive_p): If the first file in the
2692 archive can not be recognized as an object, don't assume that this
2693 is the wrong format.
2695 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2696 format is not bfd_object.
2697 (bfd_elf_get_dt_soname): Likewise.
2701 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
2706 * bfd.c (tdata): Add netbsd_core_data.
2707 * bfd-in2.h: Regenerated.
2711 * sunos.c (SUNOS_CONSTRUCTOR): Define.
2712 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
2713 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
2716 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
2717 to get the symbol index, matching 14 Jul 95 change.
2721 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2722 Remove duplicate definition of gp.
2726 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
2727 assume that we can set the GP value and then get the same value,
2728 since it won't be true if the output file is neither ELF nor
2730 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
2731 _bfd_get_gp_value here.
2732 (mips_gprel_reloc): Don't assume we can set and get the GP value.
2733 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
2735 (mips_elf_lo16_reloc): Likewise.
2736 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
2737 Don't require that the BFD be ELF.
2738 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
2739 (mips_elf_gprel32_reloc): Likewise.
2740 (mips_elf_relocate_section): Don't assume we can set and get the
2742 (mips_elf_finish_dynamic_symbol): Don't bother to use
2743 _bfd_get_gp_value here.
2745 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
2746 Don't change epdr between malloc and free. Be careful not to free
2747 NULL pointers. Zero out the first RPDR.
2749 * configure.host: On Linux, only pass -rpath option if $(libdir)
2750 is neither /lib nor /usr/lib. From Alan Modra
2753 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
2755 (elf_dt_name): Rename from elf_dt_needed_name.
2756 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
2758 (bfd_elf_get_dt_soname): New function.
2759 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
2760 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
2761 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
2762 * bfd-in2.h: Rebuild.
2766 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
2767 _bfd_sparc_elf_reloc_type_lookup.
2768 (bfd_elf32_bfd_reloc_type_lookup): Update.
2769 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
2770 (sparc64_elf_howto_table): Define.
2771 (sparc_reloc_map): Define.
2772 (sparc64_elf_reloc_type_lookup): New function.
2773 (sparc_elf_wdisp16_reloc): New function.
2774 (elf_info_to_howto): Use sparc64_elf_howto_table.
2775 (sparc64_elf_relocate_section): Likewise.
2776 (bfd_elf64_bfd_reloc_type_lookup): Update.
2780 * configure.host: Check for 'do not mix' from native linker before
2781 trying to use -rpath.
2785 * bfd.c (_bfd_get_gp_value): New function.
2786 (_bfd_set_gp_value): New function.
2787 * libbfd-in.h (_bfd_get_gp_value): Declare.
2788 (_bfd_set_gp_value): Declare.
2789 * libbfd.h: Rebuild.
2790 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2791 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
2792 directly to the fields in the tdata information.
2793 (alpha_relocate_section): Likewise.
2794 * coff-mips.c (mips_adjust_reloc_in): Likewise.
2795 (mips_gprel_reloc): Likewise.
2796 (mips_relocate_section): Likewise.
2797 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
2798 (mips_elf_lo16_reloc): Likewise.
2799 (mips_elf_final_gp): Likewise.
2800 (mips_elf_gprel16_reloc): Likewise.
2801 (mips_elf_gprel32_reloc): Likewise.
2802 (mips_elf_relocate_section): Likewise.
2803 (mips_elf_finish_dynamic_symbol): Likewise.
2805 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
2809 * configure.in: Call AC_PROG_CC before configure.host.
2810 * configure: Rebuild.
2811 * configure.host: Don't set information which autoconf should
2812 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
2814 * configure.host: Remove go32 and win32 host information, since it
2815 should no longer be needed.
2817 * elf.c (map_sections_to_segments): If we have a .dynamic section,
2818 then start a new segment rather than put a writable section in a
2821 * configure.host: Set RPATH_ENVVAR.
2823 * Makefile.in: Rebuild dependencies.
2825 * elflink.c (_bfd_elf_create_linker_section): Remove unused
2826 zero_section variable.
2830 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
2831 ($(srcdir)/libbfd.h): Rename from libbfd.h.
2832 ($(srcdir)/libcoff.h): Rename from libcoff.h.
2836 * ieee.c (ieee_write_expression): Only use an R variable for a
2837 local symbol. Don't output a zero offset. Handle a zero address.
2838 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
2839 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
2841 (parse_expression): Don't try to handle multiple occurrences of a
2842 P variable. Handle I variables differently from X variables. Fix
2843 the order of minus expressions.
2844 (ieee_slurp_external_symbols): Generate an I variable for an NN
2845 record. Fix handling of ATI and ATX records.
2846 (ieee_slurp_sections): Only set minimal section attributes.
2847 Adjust them later, based on the section contents.
2848 (ieee_object_p): Read in the file until just after the ME record.
2849 Call ieee_slurp_section_data to set the section flags.
2850 (do_one): Add iterations parameter. Only repeat the first load
2851 item. Set the section and file reloc flags.
2852 (ieee_slurp_section_data): Set section flags. Pass iterations to
2854 (ieee_canonicalize_reloc): Handle I variables.
2855 (do_with_relocs): Only emit relocation size when necessary.
2856 Increase MAXRUN to 127. Change ov to be assigned, and take
2857 src_mask and pcrel_offset into account.
2858 (ieee_write_data_part): Skip sections that are not loaded.
2859 (ieee_write_external_part): Don't output optional last entry of WX
2861 (ieee_write_me_part): Make setting of me_record neater.
2862 (ieee_generic_stat_arch_elt): Get the size of an archive element.
2864 * syms.c (stt): Add entries for zerovars, vars, and code.
2866 * elfcode.h (validate_reloc): New static function.
2867 (write_relocs): Call validate_reloc for non ELF relocs.
2869 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
2870 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
2871 (TARGET_LITTLE_SYM): Likewise.
2873 * config.bfd (m68*-*-psos*): New target.
2877 * i386msdos.c: Remove some #if 0 code.
2878 (msdos_write_object_contents): Don't include empty sections in the
2879 size computation, regardless of their address.
2883 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
2884 is NULL, ie, the -r switch is used.
2888 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
2889 (BFD_RELOC_MIPS_GOT_LO16): Define.
2890 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
2891 * bfd-in2.h, libbfd.h: Rebuild.
2892 * elf32-mips.c (mips_reloc_map): Map new relocs.
2894 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
2896 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
2899 * ieee.c (get_symbol): Set the section to bfd_abs_section.
2900 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
2901 simple number for the section address, rather than an expression.
2902 Limit the number of bytes between relocs to MAXRUN.
2903 (ieee_write_me_part): Set me_record to the file offset after the
2905 (ieee_write_processor): New static function.
2906 (ieee_write_object_contents): Use ieee_write_processor.
2910 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
2912 * coff-aux.c: Change include of aux.h to aux-coff.h.
2916 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
2917 relocation put the addend both in the reloc entry and the data.
2918 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
2921 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
2922 a R_68K_PCxx reloc against a defined global symbol directly.
2923 (elf_m68k_check_relocs): Don't count such a reloc.
2925 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
2926 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
2927 symbol for now, otherwise always record the symbol as dynamic.
2928 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
2929 is not referenced by a dynamic object, and we are not making a
2930 shared object, then don't make a PLT entry. If we do make a PLT
2931 entry, make sure the symbol has been recorded as dynamic.
2935 * configure.host: When making a shared library, set HLDFLAGS to
2936 pass an appropriate -rpath option. Use the make variable SONAME
2937 as the shared library soname, rather than computing it here. On
2938 SunOS, build stamp-tshlink in place of $(SHLINK).
2939 * Makefile.in (SONAME): New variable.
2940 ($(SHLINK)): Make a link to the transformed name, as well.
2941 (stamp-tshlink): New target.
2942 (install): Skip stamp-tshlink during install.
2946 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
2947 linker sections have been set up yet.
2949 * elf.c (make_mapping): Add an additional argument to suppress
2950 making the first section include the program headers.
2951 (map_sections_to_segments): If the user used -Ttext such that the
2952 program headers are on a different page, do not set the flags
2953 saying that this section includes the program headers.
2957 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
2958 don't define TRAD_HEADER.
2959 * configure: Rebuild.
2961 * netbsd-core.c: New file, support for NetBSD core files.
2962 * hosts/*nbsd.h: Removed.
2966 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
2967 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
2968 * libbfd.h, bfd-in2.h: Regenerated.
2969 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
2970 bfd_elf32_bfd_reloc_type_lookup.
2971 (reloc_type{,_names}): Deleted.
2972 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2974 (sparc_reloc_map): Add sparc64 relocs.
2975 (sparc_elf_notsupported_reloc): New static function.
2976 (sparc_elf_wdisp16_reloc): New static function.
2977 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
2978 (elf32_sparc_relocate_section): Likewise.
2979 (bfd_elf32_bfd_reloc_type_lookup): Define.
2980 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
2981 (reloc_type{,_names}): Deleted.
2982 (elf_sparc_howto_table): Deleted.
2983 (sparc_reloc_map): Deleted.
2984 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2985 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
2989 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
2992 * Makefile.in (program_transform_name): New variable.
2993 (install): Transform library name before installing it.
2997 * archures.c (bfd_mach_i960_hx): Define.
2998 * bfd-in2.h: Rebuild.
2999 * cpu-i960.c (scan_960_mach): Accept machine "hx".
3000 (MATRIX): Expand entries for HX.
3001 (arch_info_struct): Add i960:hx entry.
3002 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
3003 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
3004 (coff_set_flags): Handle bfd_mach_i960_hx.
3006 Support for building as a shared library, based on patches from
3008 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
3009 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
3010 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
3011 * configure: Rebuild.
3012 * configure.host: If --enable-shared, adjust shared library stuff
3013 based on the host. If the host is SunOS, and the linker supports
3014 -rpath, set HLDFLAGS to use it.
3015 * Makefile.in (ALLLIBS): New variable.
3016 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
3017 (COMMON_SHLIB, SHLINK): New variables.
3018 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
3019 (STAGESTUFF): Remove variable.
3020 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
3022 (stamp-ofiles): New target, like old ofiles target, but build
3023 using a temporary file and move-if-change, and touch stamp-ofiles
3025 (ofiles): Just depend upon stamp-ofiles.
3026 (stamp-piclist, piclist): New targets.
3027 ($(SHLIB), $(SHLINK)): New targets.
3028 (targets.o, archures.o): Build twice if PICFLAG is set.
3029 (do_mostlyclean): Remove pic/*.o.
3030 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
3032 (do_distclean): Remove pic and stamp-picdir.
3033 (install): Install shared libraries.
3034 ($(OFILES)): Depend upon stamp-picdir.
3035 (stamp-picdir): New target.
3037 * libcoff-in.h: Add comment reminding people that libcoff.h is a
3039 * libcoff.h: Rebuild.
3041 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
3042 flavour of a section with no owner.
3044 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
3045 ELF_LINK_NON_ELF flag.
3046 (mips_elf_create_got_section): Likewise.
3048 * elf.c: Revert last change, since it breaks dynamic linking.
3049 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
3051 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
3052 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
3053 (elfNN_bed): Don't initialize want_hdr_in_seg field.
3057 * elf.c (assign_file_positions_for_segments): If the backend does
3058 not want the elf header or the program headers in the address
3059 space, do not include them in the calculations.
3061 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
3062 function to determine if we need additional program headers.
3063 (ppc_elf_modify_segment_map): Define as a NOP function for now.
3064 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
3068 * coffcode.h: Move today's libcoff.h change into coffcode.h.
3072 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
3073 back into one line. Some compilers (sunos 4.1.3 for example)
3074 won't accept args split across more than one line.
3078 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
3079 * configure: Regenerate.
3083 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
3084 try to do arithmetic on a void *, cast it to a unsigned char * first.
3088 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
3089 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
3091 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
3092 flag for a newly defined symbol.
3093 (NAME(bfd_elf,record_link_assignment)): Likewise.
3094 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
3095 set the DEF or REF_REGULAR flags correctly.
3097 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
3098 (libbfd.h, libcoff.h): Corresponding change.
3100 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
3101 a PLT32 reloc as dynamic.
3102 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
3103 is not referenced by a dynamic object, and we are not making a
3104 shared object, then don't make a PLT entry. If we do make a PLT
3105 entry, make sure the symbol has been recorded as dynamic.
3109 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
3110 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
3111 (powerpcle-*-cygwin32): New.
3112 * peicode.h (add_data_entry): Get address from vma.
3116 * elflink.c (_bfd_elf_create_linker_section): If the symbol
3117 attached to the section has already been created as an undefined
3118 symbol, treat it as if it hasn't been created yet.
3122 * elflink.h (elf_bfd_final_link): Don't output initial dummy
3123 symbol or section symbols if stripping all symbols and this is not
3124 a relocateable link. Don't output the symbol string table if
3125 there are no symbols.
3126 (elf_link_flush_output_syms): Don't do anything if there are no
3131 * coff-aux.c: New file.
3132 * hosts/m68kaux.h: New file.
3133 * config.bfd (m68*-apple-aux*): New target.
3134 * configure.in (m68*-apple-aux*): New native host.
3135 (m68kaux_coff_vec): New vector.
3136 * configure: Rebuild.
3137 * targets.c (m68kaux_coff_vec): Declare.
3138 * coffcode.h (bfd_coff_backend_data): Add field
3139 _bfd_coff_link_add_one_symbol.
3140 (bfd_coff_link_add_one_symbol): Define.
3141 (compare_arelent_ptr): New static function if TARG_AUX.
3142 (coff_write_relocs): If TARG_AUX, sort the relocs.
3143 (coff_write_object_contents): Set A/UX aouthdr magic number.
3144 (coff_link_add_one_symbol): Define if not defined.
3145 (bfd_coff_std_swap_table): Initialize new field.
3146 * libcoff.h: Rebuild.
3147 * cofflink.c (coff_link_add_symbols): Call
3148 bfd_coff_link_add_one_symbol rather than
3149 _bfd_generic_link_add_one_symbol.
3150 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
3151 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3152 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3153 * Makefile.in: Rebuild dependencies.
3154 (BFD32_BACKENDS): Add coff-aux.o.
3155 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
3159 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
3160 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
3164 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
3165 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
3166 (maintainer-clean): Warn about deleting special files.
3167 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
3169 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
3170 warning symbols correctly.
3171 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3172 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3173 * elf32-mips.c (mips_elf_relocate_section): Likewise.
3174 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3175 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3176 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3178 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
3183 * libcoff-in.h: aligned newly exported names with bfd naming
3184 conventions. Removed an erroneous define of POWERPC_LE_PE.
3185 * libcoff.h: Rebuild.
3186 * cofflink.c, coff-ppc.c: the above function name changes
3191 * ecoff.c (struct extsym_info): Define.
3192 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
3193 to ecoff_link_write_external.
3194 (ecoff_link_write_external): Accept a struct extsym_info pointer.
3195 Strip symbols when appropriate.
3198 * syms.c (BSF_OBJECT): Define.
3199 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
3200 * bfd-in2.h: Rebuild.
3201 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
3203 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
3206 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
3207 copying relocs into a shared object, treat a defined global symbol
3209 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3210 * elf32-mips.c (mips_elf_relocate_section): Likewise.
3211 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3213 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
3214 real defined symbol, not to a weak defined symbol.
3218 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
3219 and made a few static functions externs.
3221 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
3222 POWERPC_LE_PE hack in cofflink.
3224 * libcoff-in.h: promoted the following from cofflink.c to allow
3225 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
3226 coff_debug_merge_element, struct coff_debug_merge_type,
3227 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
3228 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
3229 coff_debug_merge_hash_lookup, coff_link_section_info,
3230 coff_final_link_info, coff_debug_merge_hash_newfunc,
3231 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
3233 * libcoff.h: re-gen'd
3237 * syms.c: Include "bfdlink.h".
3238 (struct stab_find_info): Define.
3239 (_bfd_stab_section_find_nearest_line): New function.
3240 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
3241 * libbfd.h: Rebuild.
3242 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
3243 * elf.c (_bfd_elf_find_nearest_line): Try calling
3244 _bfd_stab_section_find_nearest_line before searching the ELF
3245 symbol table. Find the closest STT_FUNC symbol, not the last one.
3246 * libcoff-in.h (coff_data_type): Add line_info field.
3247 * libcoff.h: Rebuild.
3248 * coffgen.c (coff_find_nearest_line): Try calling
3249 _bfd_stab_section_find_nearest_line before searching the COFF
3251 * Makefile.in: Rebuild dependencies.
3255 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
3256 4 bytes, so we get the correct value when updating the register
3257 field in little endian mode.
3261 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
3262 entry_section fields. Add sntoc and snentry fields.
3263 * libcoff.h: Rebuild.
3264 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
3265 not toc_section and entry_section (the COFF file does not have any
3266 sections at this point).
3267 (coff_write_object_contents): Set o_snentry and o_sntoc from
3268 snentry and sntoc rather than entry_section and toc_section.
3269 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
3270 snentry, not toc_section and entry_section.
3271 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
3272 entry_section from hentry.
3273 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
3275 (xcoff_link_input_bfd): Set sntoc, not toc_section.
3276 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
3277 than using toc_section directly.
3279 * archures.c: Add missing `.' in enum bfd_architecture.
3280 * bfd-in2.h: Rebuild.
3282 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
3287 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
3288 to sections we allocate. Use bfd_zalloc to allocate initialial
3289 sections, not bfd_alloc.
3290 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
3291 SDA{,2}I16 relocations.
3292 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
3293 whether to put something in .sbss or not.
3294 (ppc_elf_relocate_section): Add support for more relocations. Add
3295 in sec->output_offset where appropriate. Make error messages
3296 include the symbol name.
3298 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
3299 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
3300 doesn't get redefined messages if -shared.
3302 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
3303 section if the rel_section field has been set up.
3307 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
3312 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
3313 of flags, only flags used are controlled by mach number. Bump up
3314 output file mach number to highest of input file mach numbers.
3315 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
3316 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
3318 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
3319 bfd_elf64_sparc_vec support.
3323 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
3324 the embedded bit is set on some objects and not on others. Just
3326 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
3331 * coffcode.h (coff_new_section_hook): Don't try to align the
3334 * coffcode.h (coff_set_section_contents): Fix the handling of the
3335 .lib section to work even if the entire section contents are
3341 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
3342 memory here for contents.
3344 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
3345 _SDA2_BASE_ by 32768.
3346 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
3347 started using. Allocate contents for .sdata and .sdata2 sections
3349 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
3351 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
3352 size _SDA{,2}_BASE_.
3353 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
3358 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
3360 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
3361 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
3362 (bfd_mach_sparc_v9a): Define.
3363 (bfd_mach_sparc_v9_p): Define.
3364 * bfd-in2.h: Regenerated.
3365 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
3367 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
3368 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
3369 to bfd_elf32_sparc_vec.
3370 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
3371 Add v8plus{,a} support.
3373 (sparc_compatible): New function.
3374 * elf32-sparc.h: #include "elf/sparc.h".
3375 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
3376 elf32_sparc_final_write_processing): New functions.
3377 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
3378 elf_backend_final_write_processing): Define.
3382 * elf-bfd.h (struct elf_link_hash_entry): Add
3383 linker_section_pointer field.
3384 (enum elf_linker_section_enum): Enumeration for new way of
3385 creating linker dynamic sections and symbols.
3386 (elf_linker_section{,_pointers}): New structures for creating
3387 dynamic sections and symbols.
3388 (elf_obj_tdata): Add linker_section_pointers and linker_section
3390 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
3391 (_bfd_elf_create_linker_section): New declarations.
3392 (_bfd_elf_find_pointer_linker_section): Ditto.
3393 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
3394 (_bfd_elf_make_linker_section_rela): Ditto.
3396 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
3398 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
3399 (ppc_elf_create_linker_section): New function to create the
3400 sections .got, .sdata, and .sdata2.
3401 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
3403 (ppc_elf_check_relocs): Support more of the eabi relocations.
3404 (ppc_elf_relocate_section): Ditto.
3405 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
3406 if the .sdata{,2} + .sbss{,2} section size is > 32k.
3408 * elflink.h (elf_create_pointer_linker_section): New function to
3409 create initialized pointers in dynamic linker sections.
3410 (elf_finish_pointer_linker_section): Actually intialize the
3411 pointers created above.
3413 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
3414 macros to provide both 32 and 64 bit versions of
3415 elf_create_pointer_linker_section.
3416 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
3417 provide both 32 and 64 bit versions of
3418 elf_finish_pointer_linker_section.
3420 * elflink.c (_bfd_elf_create_linker_section): New function to
3421 create a linker section.
3422 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
3423 given address in the linker pointer offsets created for a given
3425 (_bfd_elf_make_linker_section_rela): Make a RELA section
3426 corresponding to the generated linker section.
3430 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
3434 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
3435 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
3436 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
3437 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
3438 toc entry in an objdump) for now.
3439 (ppc_do_last, ppc_get_last): New function - needed to save processing
3440 the toc owner to the end.
3441 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
3444 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
3445 toc owner from being done till last. Must define POWERPC_LE_PC
3448 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
3450 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
3452 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
3453 SizeOfImage for PowerPC. Ignore the size of the .junk section.
3457 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
3461 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
3463 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
3467 * elf.c (assign_file_positions_for_segments): Don't increment file
3468 offset for a segment which contains no loadable sections.
3472 * reloc.c: Add new PowerPC relocations.
3473 * {bfd-in2,libbfd}.h: Regenerate.
3475 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
3476 (ppc_elf_reloc_type_lookup): Lookup new relocations.
3480 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
3483 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
3486 * coffgen.c (coff_find_nearest_line): Don't try to cache
3487 information in sections that are not owned by a BFD. From Richard
3490 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
3492 * elflink.h (elf_link_output_extsym): Remove special check for
3495 * ecoffswap.h: Add prototypes for static functions.
3499 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
3500 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
3502 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
3503 to satisfy a TOC16 relocation. Rewrite unsupported relocation
3504 support. Begin support for R_PPC_SDA{2,}REL.
3508 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
3509 create the .got and .got.neg sections.
3510 (ppc_elf_size_dynamic_sections): Call it.
3511 (ppc_elf_check_relocs): Call it.
3512 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
3513 (ppc_elf_check_relocs): Add error messages for relocations we
3514 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
3519 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
3520 section flags for V.4 and eabi.
3524 * elf.c (assign_file_positions_for_segments): If a segment
3525 contains no sections, don't mark it as readable.
3527 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
3528 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
3530 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
3531 dynamic section, if there is one.
3532 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
3533 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
3534 (bfd_elf64_swap_dyn_in): Likewise.
3535 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
3537 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
3539 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
3540 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
3545 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
3546 PowerPC V.4 and eabi.
3547 * bfd-in2.h: Regenerate.
3548 * libfd.h: Regenerate.
3550 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
3552 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
3553 section type and SHF_EXCLUDE section flag, turning them into the
3554 appropriate bfd section flag.
3558 * xcofflink.c (xcoff_link_add_symbols): Create the special
3559 sections if we see a DYNAMIC object, in case that is the only
3560 XCOFF input object we see.
3562 * elf32-mips.c: Extensive changes for a start at dynamic linking
3565 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
3566 (struct elf_backend_data): Remove
3567 elf_backend_create_program_headers field. Add
3568 elf_backend_additional_program_headers and
3569 elf_backend_modify_segment_map fields.
3570 * elfxx-target.h (elf_backend_type_change_ok): Define if not
3572 (elf_backend_additional_program_headers): Likewise.
3573 (elf_backend_modify_segment_map): Likewise.
3574 (elf_backend_create_program_headers): Don't define.
3575 (elfNN_bed): Change to account for field changes.
3576 * elf.c (assign_file_positions_for_segments): Call new
3577 modify_segment_map backend function. Don't call old
3578 create_program_headers backend function.
3579 (get_program_header_size): Call additional_program_headers rather
3580 than create_program_headers.
3581 * elflink.h (elf_link_add_object_symbols): Initialize
3582 type_change_ok from new backend field.
3583 (elf_link_output_extsym): Don't warn if _rld_new_interface is
3585 (elf_reloc_link_order): Treat a reloc against a defined symbol as
3586 a reloc against the appropriate section.
3588 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
3589 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
3590 (elf_flags_init): Rename from elf_ppc_flags_init.
3591 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
3593 (ppc_elf_copy_private_bfd_data): Likewise.
3594 (ppc_elf_merge_private_bfd_data): Likewise.
3596 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
3601 * coff-alpha.c (alpha_relocate_section): During final link, allow
3602 output .lita section to be bigger than 64k by adjusting gp value
3603 on a per-input section basis.
3604 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
3606 (struct ecoff_section_tdata): Add gp field.
3610 Handle Alpha ECOFF changes in OSF/1 3.2.
3611 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
3613 * coff-alpha.c: Include "aout/ar.h".
3614 (alpha_ecoff_get_relocated_section_contents): Don't require an
3615 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
3616 3.2 doesn't generate one.
3617 (alpha_relocate_section): Likewise.
3618 (alpha_ecoff_slurp_armap): Define.
3619 (alpha_ecoff_slurp_extended_name_table): Define.
3620 (alpha_ecoff_construct_extended_name_table): Define.
3621 (alpha_ecoff_truncate_arname): Define.
3622 (alpha_ecoff_write_armap): Define.
3623 (alpha_ecoff_generic_stat_arch_elt): Define.
3624 (alpha_ecoff_update_armap_timestamp): Define.
3626 (alpha_ecoff_read_ar_hdr): New static function.
3627 (alpha_ecoff_get_elt_at_filepos): New static function.
3628 (alpha_ecoff_openr_next_archived_file): New static function.
3629 (alpha_ecoff_get_elt_at_index): New static function.
3630 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
3631 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
3632 _bfd_ecoff to alpha_ecoff.
3633 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
3634 field from backend structure, rather than always calling
3635 _bfd_get_elt_at_filepos.
3636 * coff-mips.c (mips_ecoff_backend_data): Initialize
3637 get_elt_at_filepos field.
3638 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
3639 from _bfd_generic_read_ar_hdr with minor changes.
3640 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
3641 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
3642 * libbfd.h: Rebuild.
3644 * bfd-in.h (BFD_IN_MEMORY): Define.
3645 * libbfd-in.h (struct bfd_in_memory): Define.
3646 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
3647 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
3648 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
3649 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
3650 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
3651 (bfd_get_size): Handle BFD_IN_MEMORY flag.
3652 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
3653 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
3654 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
3655 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
3657 (bfd_openstreamr): Likewise.
3658 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
3659 BFD_IN_MEMORY is not set.
3660 * riscix.c (riscix_some_aout_object_p): Likewise.
3661 * bfd-in2.h, libbfd.h: Rebuild.
3663 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
3664 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
3665 (bfd_get_elt_at_index): Define.
3666 * archive.c (_bfd_generic_get_elt_at_index): Rename from
3667 bfd_get_elt_at_index. Change index parameter from int to
3669 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
3670 (_bfd_noarchive_get_elt_at_index): Define.
3671 (_bfd_archive_bsd_get_elt_at_index): Define.
3672 (_bfd_archive_coff_get_elt_at_index): Define.
3673 * bfd-in2.h, libbfd.h: Rebuild.
3674 * aout-target.h (MY_get_elt_at_index): Define if not defined.
3675 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
3676 * ieee.c (ieee_get_elt_at_index): Define.
3677 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
3678 * oasys.c (oasys_get_elt_at_index): Define.
3679 * som.c (som_get_elt_at_index): Define.
3681 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
3682 numbers to the .text section.
3686 * ieee.c (ieee_write_debug_part): Change return type to boolean.
3687 If there is a SEC_DEBUGGING section, get the contents of the debug
3688 information part from it.
3689 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
3691 (ieee_write_object_contents): Check ieee_write_debug_part return.
3695 * config.bfd (i[345]86-*-freebsd*): Add target.
3696 * configure.in (i386freebsd_vec): Add vec.
3697 * configure: Regenerate.
3698 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
3699 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
3700 Rebuild dependencies..
3701 * freebsd.h: New file.
3702 * i386freebsd.c: New file.
3703 * targets.c (i386freebsd_vec): Declare.
3704 (bfd_target_vector): Add i386freebsd_vec.
3705 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3706 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3710 * ieee.c (ieee_slurp_debug): New static function.
3711 (ieee_object_p): Call it.
3712 (ieee_slurp_section_data): Skip debugging sections.
3713 (ieee_get_reloc_upper_bound): Likewise.
3714 (ieee_get_section_contents): Likewise.
3715 (ieee_canonicalize_reloc): Likewise.
3716 (ieee_write_section_part): Likewise.
3717 (ieee_write_debug_part): Likewise.
3718 (ieee_write_data_part): Likewise.
3719 (init_for_output): Likewise.
3723 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
3725 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
3726 relocs, since ppc_elf_relocate_section handles the linker case.
3727 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
3729 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
3730 ppc_elf_relocate_section since that is now the only caller.
3731 (ppc_elf_relocate_section): Ditto.
3735 * coffcode.h (coff_write_object_contents): If we don't know the
3736 section of the entry point for an XCOFF executable, always set the
3737 entry address to -1.
3741 * elf.c (bfd_section_from_shdr): Add support for note sections.
3745 * bfd-in.h (struct _symbol_info): Add stab_type field.
3746 * bfd-in2.h: Rebuild.
3747 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
3749 * elf32-ppc.c: Remove trailing newline from calls to
3751 (ppc_elf_merge_private_bfd_data): Only warn about endianness
3752 difference if target endianness is known.
3756 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
3757 old style TOC16 references without using R_PPC_GOT.
3758 (ppc_reloc_type): Ditto.
3759 (ppc_elf_reloc_type_lookup): Add support for TOC16.
3760 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
3761 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
3762 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
3763 (ppc_elf_check_relocs): New function for GOT/PLT support that is
3765 (ppc_elf_adjust_dynamic_symbol): Ditto.
3766 (ppc_elf_adjust_dynindx): Ditto.
3767 (ppc_elf_size_dynamic_sections): Ditto.
3768 (ppc_elf_finish_dynamic_symbol): Ditto.
3769 (ppc_elf_finish_dynamic_sections): Ditto.
3770 (ELF_DYNAMIC_INTERPRETER): Define.
3774 * elf.c (copy_private_bfd_data): When attaching sections to
3775 segments ignore sections that won't be allocated. Patch from
3780 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
3785 * coff-i960.c (CALC_ADDEND): Define.
3786 (coff_i960_relocate_section): Add the input section VMA to the
3787 addend for PC relative relocs.
3791 * peicode.h (pe_print_pdata): Must test the entire entry for zero
3792 to correctly terminate.
3796 * targets.c (enum bfd_endian): Define.
3797 (bfd_target): Rename byteorder_big_p to byteorder, and change it
3798 from boolean to enum bfd_endian. Change header_byteorder_big_p
3800 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
3801 (bfd_header_big_endian, bfd_header_little_endian): New macros.
3802 * bfd-in2.h: Rebuild.
3803 * All targets: Change initialization of byteorder and
3804 header_byteorder to use enum bfd_endian values rather than
3806 * All files: Change all references to byteorder_big_p and
3807 header_byteorder_big_p to use new bfd_*_endian macros.
3809 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
3811 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
3813 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
3817 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
3821 * ieee.c: Lots of minor cleanups. Make many functions return
3822 errors rather than calling abort. Also:
3823 (ieee_write_twobyte): Remove; change callers to call existing
3824 ieee_write_2bytes function.
3825 (ieee_write_expression): Don't output the section twice when
3826 outputting a local symbol. Don't emit an extraneous zero if there
3828 (ieee_slurp_sections): Set the lma as well as the vma.
3829 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
3831 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
3832 a recognized one or bfd_arch_unknown.
3833 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
3835 (ihex_get_symtab): Likewise.
3839 * aoutx.h: Include <ctype.h>.
3840 (struct aout_link_includes_table): Define.
3841 (struct aout_link_includes_totals): Define.
3842 (struct aout_link_includes_entry): Define.
3843 (aout_link_includes_lookup): Define macro.
3844 (struct aout_final_link_info): Add includes field.
3845 (aout_link_includes_newfunc): New static function.
3846 (NAME(aout,final_link)): Initialize includes hash table.
3847 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
3851 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
3855 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
3859 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
3860 (pe_print_private_bfd_data): call pe_print_reloc.
3861 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
3862 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
3863 up some debugging as well.
3867 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
3872 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
3873 when setting sections to NULL.
3877 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
3879 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
3880 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
3882 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3883 * bfd-in2.h: Rebuild.
3887 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
3891 * ihex.c (ihex_scan): Handle record types 4 and 5.
3892 (ihex_object_p): Permit types 4 and 5.
3893 (ihex_set_section_contents): Remove check for out of range
3895 (ihex_write_object_contents): Generate types 4 and 5.
3897 * elflink.h (elf_link_output_extsym): Just ignore warning and
3898 indirect references to symbols which don't really exist.
3902 * peicode.h (pe_print_idata): Minor format fixes
3903 (pe_print_edata): New function. Under private printing, this formats
3904 the edata section of a PE file.
3905 (pe_print_private_bfd_data): Added call to pe_print_edata.
3909 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
3910 index, don't call stoi.
3914 * srec.c (srec_scan): Set lma as well as vma.
3916 * ihex.c: New file; support for Intel Hex format.
3917 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
3918 (ihex_vec): Declare.
3919 (bfd_target_vector): Always include ihex_vec.
3920 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
3921 * Makefile.in: Rebuild dependencies.
3922 (BFD_LIBS): Add ihex.o
3923 (BFD_LIBS_CFILES): Add ihex.c.
3924 * bfd-in2.h: Rebuild.
3926 * elf.c (assign_file_positions_for_segments): Sort the sections in
3928 (get_program_header_size): Return the right size if segment_map is
3930 (copy_private_bfd_data): Don't bother to sort the sections.
3932 * bfd.c (bfd_record_phdr): New function.
3933 * bfd-in.h (bfd_record_phdr): Declare.
3934 * bfd_in2.h: Rebuild.
3936 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
3939 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
3940 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
3942 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
3943 (bfd_zmalloc): Change declaration.
3944 * libbfd.h: Rebuild.
3945 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
3946 and realloc. Don't set bfd_error_no_memory if they fail.
3950 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
3951 uses as well. Added a new howto to deal with TOCREL16 relocs that
3952 are TOCDEFN as well.
3953 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
3954 to handle RVA relocs from dlltool.
3955 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
3956 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
3957 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
3959 * coffcode.h (coff_set_alignment_hook): check idata$X sections
3960 to get the right section alignment.
3964 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3965 p_paddr if p_paddr is zero.
3966 (make_mapping): Set includes_filehdr and includes_phdrs for first
3968 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
3970 (assign_file_positions_for_segments): Handle includes_filehdr and
3971 includes_phdrs. Remove special handling of PT_PHDR and first
3973 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
3974 when appropriate. Remove special handling of PT_PHDR segment.
3975 Use a more complex condition for when a section is included in a
3976 segment to handle Solaris linker oddities.
3980 * coff-m88k.c (howto_table): Reformatted for easier reading;
3981 special_function now points to new function m88k_special_reloc.
3982 (howto_hvrt16): Function previously used for handling HVRT16 relocs
3984 (rtype2howto): Do not add reloc's r_offset to the addend, this will
3985 be done correctly by m88k_special_reloc.
3986 (reloc_processing): New function to be used by RELOC_PROCESSING.
3987 (RELOC_PROCESSING): Define to call reloc_processing.
3991 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
3992 (pe_print_pdata): Likewise.
3994 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
3995 obstack_alloc fails.
3996 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
3998 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
3999 * Many files: don't set bfd_error_no_memory if one of the above
4002 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
4003 if p_paddr_valid is set.
4004 (copy_private_bfd_data): New static function.
4005 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
4007 * elf.c (assign_file_positions_for_segments): Fix case where extra
4008 program headers were allocated.
4010 * elf.c (_bfd_elf_print_private_bfd_data): New function.
4011 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
4012 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
4013 _bfd_elf_print_private_bfd_data.
4015 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
4016 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
4017 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
4018 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
4019 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
4020 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
4021 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
4025 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
4026 * elf.c (make_mapping): New static function.
4027 (map_sections_to_segments): New static function.
4028 (elf_sort_sections): New static function.
4029 (assign_file_positions_for_segments): New static function.
4030 (map_program_segments): Remove.
4031 (get_program_header_size): Remove sorted_hdrs, count, and
4032 maxpagesize parameters. Simplify.
4033 (assign_file_positions_except_relocs): When generating an
4034 executable, use assign_file_positions_for_segments.
4035 (elf_sort_hdrs): Remove.
4036 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
4037 to get_program_header_size.
4041 * hp300hpux.c (MY(callback)): Set lma as well as vma.
4043 * configure, config.in: Regenerate with autoconf 2.7.
4045 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
4046 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
4050 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
4051 (ecoff_sec_to_styp_flags): Likewise.
4052 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
4053 (ecoff_set_symbol_info): Handle scRConst.
4054 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
4055 (ecoff_compute_section_file_positions): Handle .rconst section.
4056 (_bfd_ecoff_write_object_contents): Likewise.
4057 (ecoff_link_check_archive_element): Handle scRConst.
4058 (ecoff_link_add_externals): Likewise.
4059 (ecoff_link_write_external): Handle .rconst section.
4060 (ecoff_reloc_link_order): Likewise.
4061 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
4062 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
4064 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
4066 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
4067 DEF_DYNAMIC flag is set.
4071 * host-aout.c: If TRAD_HEADER is defined, include it.
4075 * aclocal.m4 (AC_PROG_CC): Remove local definition.
4076 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
4077 (BFD_NEED_DECLARATION): New function.
4078 * configure.in: Use BFD_NEED_DECLARATION.
4079 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
4080 * configure, config.in: Rebuild with autoconf 2.6.
4082 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
4083 special_sections before returning when called with a non XCOFF
4086 * coffgen.c (coff_renumber_symbols): Sort common symbols with
4089 * coffcode.h (coff_compute_section_file_positions): Only pad the
4090 previous section to force file alignment when creating an
4095 * coffcode.h (coff_compute_section_file_positions): If
4096 RS6000COFF_C, set up the .debug section.
4098 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
4099 if it is not large enough to accomodate the entire TOC area with
4100 signed 16 bit offsets.
4101 (xcoff_write_global_symbol): Handle negative TOC offsets in global
4103 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
4104 TOC anchor to use the TOC value used in the output file.
4108 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
4109 (_bfd_coff_read_string_table): Likewise.
4113 * pe-arm.c: Fix typos.
4114 * coff-arm.c: Likewise.
4118 * coff-ppc.c (list_ele): Added "cat"egory member.
4119 (record_toc): New category parameter (priv or pub).
4120 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
4121 (ppc_process_before_allocation): Removed embrionic data-in-toc from
4122 the mainline. It addes extra toc cells in error.
4123 (ppc_coff_swap_sym_in_hook): Added some documentation.
4124 (dump_toc): Can now diagnose "virtual toc" chicanery.
4128 * elf-bfd.h (struct elf_link_hash_table): Change type of
4129 dynsymcount and bucketcount fields from size_t to bfd_size_type.
4133 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
4134 pointerize C_LEAFSTAT or C_LEAFEXT entries.
4136 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
4137 DT_INIT and DT_FINI entries if the _init or _fini symbol is
4138 defined or mentioned in a regular file.
4142 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
4143 (coff_ppc_relocate_section): Handle TOCDEFN attribute
4144 (coff_ppc_relocate_section): Correct REL24 handling
4145 (ppc_process_before_allocation): Correct TOCDEFN handling
4147 * peicode.h (dir_names): Added name descriptions
4151 * VERSION: Updated to cygnus-2.6.
4155 * targets.c (m68k4knetbsd_vec): Declare.
4159 * targets.c (bfd_target): Change type of second argument to
4160 _bfd_print_private_bfd_data from void * to PTR.
4161 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
4162 using PTR rather than void *.
4163 * bfd-in2, libbfd.h: Rebuild.
4164 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
4166 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
4167 _bfd_generic_bfd_print_private_bfd_data rather than casting
4172 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
4173 "DO NOT DELETE" lines or blank lines that mkdep writes on some
4175 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
4176 BFD64_BACKENDS_CFILES): New variables.
4181 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
4182 not at the file position of the first section.
4183 * coffcode.h (coff_compute_section_file_positions): Avoid using
4185 (coff_write_object_contents): When generating a PPC PE executable
4186 with no symbols, round up the file size to a COFF_PAGE_SIZE
4188 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
4189 don't write out a string table.
4191 * elf.c (bfd_section_from_shdr): When using a different section
4192 header, pass the new one to _bfd_elf_make_section_from_shdr.
4193 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
4194 (elf_map_symbols): Add section VMA to symbol value when comparing
4196 (_bfd_elf_compute_section_file_positions): Only build symbol table
4197 if there are some symbols. Set file offset of symtab and strtab
4199 (assign_file_positions_except_relocs): Remove dosyms parameter.
4200 Change all callers. Never set file offset of symtab and strtab
4202 (_bfd_elf_copy_private_section_data): New function.
4203 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
4204 (_bfd_elf_copy_private_symbol_data): New function.
4205 (swap_out_syms): Check for special mapping of st_shndx created by
4206 copy_private_symbol_data.
4207 * elfxx-target.h: Use new copy routines.
4208 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
4209 (_bfd_elf_copy_private_section_data): Declare.
4211 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
4213 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
4216 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
4217 _bfd_dummy_target, matching the recent change to archive
4222 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
4223 arithmetic on PTR types.
4225 * aout-target.h (MY(callback)): Set the lma of the sections.
4227 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
4228 symbol into a reloc against the section.
4232 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
4233 glue for the relocs: IMGLUE and IFGLUE.
4234 (record_toc): new function - tracks toc contents
4235 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
4236 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
4237 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
4238 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
4239 (ppc_record_toc_entry): Removed a debug define (duh)
4241 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
4242 (pe_print_idata): New function - formats the idata section data
4243 (pe_print_pdata): New function - formats the pdata section data
4244 (pe_print_private_bfd_data): calls to above
4248 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
4249 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
4250 TARGET_SYM and TARGET_NAME for vector and BFD name.
4251 * coff-pmac.c (pmac_xcoff_vec): Remove.
4252 (TARGET_SYM, TARGET_NAME): Define.
4253 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
4254 machine to 0, not all PowerMacs are 601s.
4258 * elfcode.h (elf_object_p): Read in any program headers.
4259 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
4260 based on the program headers, if any.
4261 (elf_fake_sections): Set sh_addr from the vma, not the lma.
4262 (map_program_segments): Set p_paddr of program headers based on
4267 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
4270 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
4271 trying to do a relocateable link with a non-a.out object file.
4273 * archive.c (bfd_generic_archive_p): Check the first object file
4274 in an archive even if target_defaulted is set. If the object file
4275 has the wrong xvec, reject it.
4277 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
4278 be represented, report the name via _bfd_error_handler.
4279 (translate_to_native_sym_flags): Likewise.
4280 * elf32-mips.c (mips_elf_final_link): Likewise.
4281 * oasys.c (oasys_write_sections): Likewise.
4283 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
4284 which checks for STYP_OVRFLO sections.
4285 (coff_compute_section_file_positions): If RS6000COFF_C, handle
4286 reloc and lineno count overflows.
4287 (coff_write_object_contents): Call coff_count_linenumbers before
4288 coff_compute_section_file_positions. If RS6000COFF_C, handle
4289 reloc and lineno count overflows.
4290 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
4291 relocs before dealing with .pad sections. Count overflow section
4292 headers when handling .pad sections.
4294 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
4297 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
4298 (struct xcoff_link_hash_table): Add descriptor_section and
4299 special_sections fields.
4300 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
4301 (xcoff_link_add_symbols): Set linkage section alignment. Create
4302 descriptor section. Check for magic symbol names (_text, etc.),
4303 and record them in special_sections if found. Set
4304 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
4305 descriptor field to point back to the function code symbol.
4306 (xcoff_sweep): Always mark the special descriptor_section.
4307 (bfd_xcoff_export_symbol): Check whether the symbol might be a
4308 function descriptor, and mark it if it is.
4309 (bfd_xcoff_size_dynamic_sections): Add new special_sections
4310 parameter, and fill it in. Allocate space for the descriptor
4312 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
4313 global linkage code. If an undefined function descriptor is
4314 exported, arrange to define it. Warn about any other undefined
4316 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
4317 (xcoff_write_global_symbol): Create a function descriptor when
4319 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
4320 * bfd-in2.h: Rebuild.
4324 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
4325 (ppc_coff_link_hash_table): new types for hashing
4326 (ppc_coff_link_hash_newfunc): hash entry constructor
4327 (ppc_coff_link_hash_table_init): hash table initializer
4328 (ppc_coff_link_hash_table_create): hash table constructor
4329 (ppc_record_toc_entry): changed references to hash table
4330 (coff_ppc_relocate_section): changed references to hash table
4332 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
4333 * libcoff.h: Rebuild
4335 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
4336 (coff_link_add_symbols): removed toc_offset init
4340 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
4343 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
4344 if it is given and mmep is available.
4345 * acconfig.h: Undef USE_MMAP.
4346 * configure, config.in: Regenerated.
4347 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
4348 table handling the old way.
4349 (aout_get_external_symbols): Don't complain if last byte of string
4351 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
4352 (bfd_free_window) [! USE_MMAP]: Don't define.
4353 (bfd_get_file_window,
4354 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
4358 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
4363 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
4364 compatible with AMD generated COFF files. Try to support both AMD
4365 and GNU formats simultaneously.
4366 (coff_a29k_relocate_section): Likewise.
4368 * libbfd.c (bfd_get_file_window): Change writable parameter from
4369 int to boolean; update all callers. Pass MAP_SHARED if not
4370 writable--it's required on Solaris. Cast fprintf argument to
4372 * bfd-in.h (bfd_get_file_window): Update declaration.
4373 * bfd-in2.h: Rebuild.
4374 * aoutx.h: Update calls to bfd_get_file_window.
4376 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
4378 (xcoff_swap_ldhdr_in): New static function.
4379 (xcoff_swap_ldsym_in): New static function.
4380 (xcoff_find_reloc): Handle the case of a single reloc correctly.
4381 (xcoff_link_add_symbols): If we just created a descriptor, pass it
4382 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
4383 Handle XTY_ER/XMC_XO symbols correctly.
4384 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
4385 rather than normal symbol table.
4386 (bfd_xcoff_import_symbol): It's not an error if the symbol is
4387 already defined with the same absolute value.
4388 (xcoff_mark): When considering called symbols, check whether the
4389 descriptor is from a dynamic object, rather than the symbol
4391 (xcoff_build_ldsyms): Likewise.
4393 * libbfd.c (bfd_get_file_window): Change return type to boolean.
4394 Cast realloc and malloc return values. If malloc or realloc fail,
4395 set bfd_error_no_memory.
4396 * bfd-in.h (bfd_get_file_window): Change type to boolean.
4397 * bfd-in2.h: Rebuild.
4401 * coff-ppc.c (ppc_record_toc_entry): new function.
4402 (in_reloc_p): changed return value.
4403 (coff_ppc_relocate_section): much rework.
4404 (ppc_allocate_toc_section): new function.
4405 (ppc_process_before_allocation): new function.
4406 (ppc_coff_swap_sym_in_hook): new function.
4408 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
4409 (coff_link_add_symbols): initialize toc_offset.
4411 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
4412 (coff_swap_aouthdr_out): Added more sections to the data
4413 dictionary for the pe file header. Also changed linker version
4414 number on the ppc side.
4415 (dir_names): small improvements to the dictionary printing.
4416 (pe_mkobject_hook): save the file level flags.
4418 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
4419 (pe_tdata): added real_flags field
4420 (coff_tdata): added local_toc_sym_map and access macro
4422 * libcoff.h (coff_link_hash_entry): added toc_offset field
4423 (pe_tdata): added real_flags field
4424 (coff_tdata): added local_toc_sym_map and access macro
4426 * coffcode.h (coff_set_alignment_hook): added hook for PE.
4427 (coff_mkobject): init for local_toc_sym_map
4428 (coff_write_object_contents): set the internal_a.magic to
4429 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
4434 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
4435 entries until both the line number address and the function name
4436 address are too large.
4438 * configure.in: Call AC_CHECK_PROG to find and cache AR.
4439 * configure: Rebuilt.
4441 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
4442 is defined in the environment.
4446 * som.c (som_get_section_contents_in_window): Define to use
4451 * coff-i860.c: New file, based on coff-i386.c.
4452 * cpu-i860.c: New file, based on cpu-i386.c.
4453 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
4454 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
4455 targets, using i860coff_vec.
4456 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
4457 trad-core.o and hosts/i860mach3.h.
4458 (i860coff_vec): Use coff-i860.o and cofflink.o.
4459 * configure: Rebuild.
4460 * Makefile.in: Rebuild dependencies.
4461 (ALL_MACHINES): Add cpu-i860.o.
4462 (BFD32_BACKENDS): Add coff-i860.o.
4463 (CFILES): Add cpu-i860.c and coff-i860.c.
4464 * targets.c (i860coff_vec): Declare.
4465 (bfd_target_vector): Add &i860coff_vec.
4466 * archures.c (bfd_i860_arch): Declare.
4467 (bfd_archures_list): Add &bfd_i860_arch.
4468 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
4469 (coff_set_flags): Handle bfd_arch_i860.
4470 (coff_write_object_contents): Handle I860 a.out magic number.
4474 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
4475 the created .tc section to 2.
4476 (xcoff_mark): Don't keep a .loader reloc for a call to an
4477 undefined symbol when creating a shared library.
4478 (xcoff_build_ldsyms): When creating a shared library, generate
4479 global linkage code for a call to an undefined symbol.
4483 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
4484 BFD32_BACKENDS, BFD64_BACKENDS.
4485 (.dep1): Put mkdep output in a separate file.
4486 Rebuilt dependencies.
4488 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
4491 Permit use of mmap when available:
4493 * configure.in: Check for mmap, madvise, mprotect.
4494 * config.in, configure: Regenerated.
4496 * libbfd.c (struct _bfd_window_internal): Define type.
4497 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
4499 (ok_to_map): New static variable for debugging.
4500 (_bfd_generic_get_section_contents_in_window): New function.
4501 * bfd-in.h (bfd_window_internal): Declare type.
4502 (bfd_window): Define type.
4503 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
4504 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
4507 * libaout.h (struct aoutdata): Add two window fields.
4508 (obj_aout_sym_window, obj_aout_string_window): New macros.
4509 * aoutx.h (some_aout_object_p): Initialize windows.
4510 (aout_get_external_symbols): Get symbol data and strings in
4511 windows instead of explicitly allocated buffers.
4512 (slurp_symbol_table): Free window instead of memory.
4513 (bfd_free_cached_info): Release windows instead of freeing storage
4515 (aout_link_free_symbols): Ditto.
4517 * targets.c (bfd_target): Add new field for
4518 get_section_contents_in_window.
4519 (BFD_JUMP_TABLE_GENERIC): Updated.
4520 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
4521 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
4522 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
4523 macros for get_section_contents_in_window field.
4527 * core.c: Renamed to corefile.c
4528 * makefile.dos (OBJS): Change core.o to corefile.o
4529 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
4534 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
4535 targ_selvecs to allow debugging under Irix-5 native.
4540 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
4541 to o. Clobber and restore the list of new csects around the call
4542 to _bfd_generic_link_add_one_symbol, in case it wants to report a
4543 linker error and the linker wants to read the symbol table. Reset
4544 the line number count of a real section even if it has no relocs.
4545 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
4547 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
4552 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
4553 an undefined symbol in a shared link.
4555 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
4556 oldtype from bfd_link_order_type to bfd_link_hash_type. From
4561 * coff-m88k.c (rtype2howto): New static function.
4562 (RTYPE2HOWTO): Use it rather than a macro definition.
4564 * coffcode.h (coff_write_object_contents): set internal_a.magic
4565 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
4567 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
4568 define TRAD_HEADER to new file hosts/delta68.h.
4569 m88*-motorola-sysv*, however, does use ptrace-core.o.
4570 * hosts/delta68.h: New file.
4572 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
4573 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
4577 * i386linux.c (MY(vec)): Declare before use.
4581 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
4582 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
4584 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4585 BFD is not of the right type.
4586 (bfd_elf_get_needed_list): Likewise.
4587 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
4588 * sunos.c (bfd_sunos_get_needed_list): Likewise.
4589 * xcofflink.c (XCOFF_XVECP): Define.
4590 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
4592 (bfd_xcoff_import_symbol): Likewise.
4593 (bfd_xcoff_export_symbol): Likewise.
4594 (bfd_xcoff_link_count_reloc): Likewise.
4595 (bfd_xcoff_record_link_assignment): Likewise.
4596 (bfd_xcoff_size_dynamic_sections): Likewise.
4598 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
4599 table index against the number of symbols for a base relative
4602 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
4604 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
4605 full_aouthdr flag here...
4606 (_bfd_xcoff_bfd_final_link): ...not here.
4610 * libelf.h: Rename to elf-bfd.h to avoid conflict with
4611 systems that have a system <libelf.h>.
4612 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
4613 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
4614 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
4615 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
4616 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
4617 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
4618 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
4622 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
4623 set, set BSF_WEAK in symbol. Change all callers.
4624 (ecoff_get_extr): Set weakext based on BSF_WEAK.
4625 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
4626 _bfd_generic_link_add_one_symbol.
4627 (ecoff_indirect_link_order): Check that the section tdata relocs
4628 are not NULL before using them.
4630 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
4631 define TRAD_HEADER as hosts/alphalinux.h.
4632 * configure: Rebuild.
4633 * hosts/alphalinux.h: New file.
4634 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
4639 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
4640 C_ECOMM storage classes.
4642 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
4644 (xcoff_mark): Call xcoff_mark_symbol.
4645 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
4646 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
4648 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
4652 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
4654 (xcoff_find_reloc): New static function.
4655 (xcoff_link_add_symbols): Use it.
4656 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
4657 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
4658 relocate the value of C_DECL.
4660 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
4664 * cofflink.c (_bfd_coff_generic_relocate_section): Make
4665 callback decide what goes in .relocs.
4666 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
4667 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
4672 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
4677 * xcofflink.c: More improvements, mostly to fix handling of
4678 constructors and a few other special cases.
4679 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
4680 zero, reverting yesterday's change.
4681 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
4682 (bfd_xcoff_link_count_reloc): Declare.
4683 (bfd_xcoff_record_link_assignment): Declare.
4684 * bfd-in2.h: Rebuild.
4688 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
4689 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
4690 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
4691 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
4692 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
4693 Change PAGE_SIZE to TARGET_PAGE_SIZE.
4695 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
4698 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
4699 segments includes the a.out header. See to that the magic number
4700 *always* is big-endian.
4702 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
4703 m68k4k NetBSD configurations.
4705 * configure.in, configure: Separate i386 & mips NetBSD
4706 configurations from other BSD ones. Don't assume DEC is the only
4707 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
4708 configurations. Add support for m68k4k NetBSD object format.
4710 * libaout.h: Added M_68K4K_NETBSD magic.
4712 * m68k4knetbsd.c: New file.
4714 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
4716 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
4719 * hosts/mipsnbsd.h: New file.
4724 * config.bfd: Add config stuff for mips*-*-magic* to set
4725 targ_defvec to ecoff_big_vec.
4730 * xcofflink.c: Numerous changes to get closer to a working XCOFF
4732 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
4733 toc_section, and entry_section fields.
4734 (struct xcoff_section_tdata): Remove ldrel_count field.
4735 * libcoff.h: Rebuild.
4736 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
4738 (coff_compute_section_file_positions): If RS6000COFF_C, generate
4739 full a.out header if full_aouthdr is set in xcoff_data.
4740 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
4741 based on sections stored in xcoff_data.
4742 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
4744 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4745 (rs6000coff_vec): Set symbol_leading_char to '.'.
4746 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
4747 value stored in ret rather than returning a pointer value.
4751 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
4756 * som.c (som_slurp_string_table): Allocate the strings with malloc
4757 since they're free'd by free_cached_info.
4758 (som_slurp_symbol_table): Similarly for the symbol table.
4762 * Makefile.in (diststuff): Don't make headers.
4766 * Makefile.in: Rebuild dependencies.
4768 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
4769 output_bfd is not SunOS.
4770 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
4771 non-SunOS input files.
4773 * xcofflink.c: Extensive changes to support linking shared objects
4774 and generating a .loader section.
4775 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
4776 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
4777 last_symndx, and ldrel_count fields.
4778 * libcoff.h: Rebuild.
4779 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
4780 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
4782 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
4783 (bfd_xcoff_export_symbol): Declare.
4784 (bfd_xcoff_size_dynamic_sections): Declare.
4785 * bfd-in2.h: Rebuild.
4789 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
4790 * configure: Rebuild.
4791 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
4792 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
4794 (pmac_xcoff_vec): Update to use new xcoff support.
4795 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
4796 (xcoff_write_armap): Declare buf as unsigned char.
4797 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
4799 * mpw-make.sed: Generalize subdir_do edit.
4803 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
4804 correctly. Don't initialize asect->vma.
4808 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
4809 something a little less than the page size.
4813 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
4817 * coff-i386.c (coff_i386_reloc_type_lookup): New.
4818 * coffcode.h (coff_write_object_contents): If .bss is before
4819 .data us that as data_start.
4820 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
4822 * peicode.h (add_data_entry): Use _cooked_size of data directory.
4823 (coff_swap_outhdr_out): Hardwire in version number.
4827 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
4828 major and minor to *_vno, since the former are also macros in
4829 SunOS header files. Cast result of bfd_alloc to appropriate
4832 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
4833 before assigning to sec_data.
4837 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
4838 now relative to the section, not absolute.
4839 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
4840 get the file name when there is a N_SO directory name. When
4841 handling stabs, remember that section->vma was added to the
4846 * sunos.c (struct sunos_link_hash_table): Add needed field.
4847 (sunos_link_hash_table_create): Call bfd_release, not free.
4848 (sunos_link_hash_table_create): Initialize needed field.
4849 (sunos_add_dynamic_symbols): Record needed objects.
4850 (bfd_sunos_get_needed_list): New function.
4851 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
4852 * bfd-in2.h: Rebuild.
4856 * libcoff-in.h (pe_data_type.in_reloc_p): New.
4860 * bfd-in.h (struct bfd_link_needed_list): Rename from
4861 bfd_elf_link_needed_list.
4862 * bfd-in2.h: Rebuild.
4863 * elf.c, elflink.h, libelf.h: Corresponding changes.
4865 Add start at AIX linker support; no shared libraries yet.
4866 * xcofflink.c: New file.
4867 * configure.in (rs600coff_vec): Use xcofflink.o.
4868 * configure: Rebuild.
4869 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
4871 (struct xcoff_section_tdata): Define.
4872 (xcoff_section_data): Define macro.
4873 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
4874 (_bfd_xcoff_bfd_link_add_symbols): Declare.
4875 (_bfd_xcoff_bfd_final_link): Declare.
4876 (_bfd_ppc_xcoff_relocate_section): Declare.
4877 * libcoff.h: Rebuild.
4878 * coff-rs6000.c: Clean up a bit.
4879 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
4880 cputype, csects, and debug_indices.
4881 (xcoff_copy_private_bfd_data): Copy cputype.
4882 (xcoff_howto_table): Rename from rs6000coff_howto_table.
4883 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
4884 (xcoff_reloc_type_lookup): Rename from
4885 rs6000coff_reloc_type_lookup.
4886 (coff_relocate_section): Define.
4887 (_bfd_xcoff_sizeof_headers): Define.
4888 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
4889 (_bfd_xcoff_bfd_relax_section): Define.
4890 (_bfd_xcoff_bfd_link_split_section): Define.
4891 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
4893 * coffcode.h (coff_compute_section_file_positions): If AIX,
4894 increment sofar by SMALL_AOUTSZ if not executable.
4895 (coff_write_object_contents): If AIX, always output an a.out
4896 header; if not executable, header size of SMALL_AOUTSZ.
4897 * hash.c (struct bfd_strtab_hash): Add xcoff field.
4898 (_bfd_stringtab_init): Initialize xcoff field.
4899 (_bfd_xcoff_stringtab_init): New function.
4900 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
4901 (_bfd_stringtab_emit): In XCOFF mode, write out length.
4902 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
4903 * libbfd.h: Rebuild.
4904 * Makefile.in: Rebuild dependencies.
4905 (BFD32_BACKENDS): Add xcofflink.o.
4906 (CFILES): Add xcofflink.c.
4908 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
4909 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
4914 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
4918 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
4919 * config.in: Regenerated.
4921 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
4922 (_bfd_chunksize): New variable.
4923 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
4924 for obstack chunk size.
4925 * configure.in: Check for getpagesize.
4926 * configure: Regenerated.
4930 * trad-core.c (rawptr): Make it a local variable of
4931 ptrace_unix_core_file_p.
4935 * coff-arm.c (in_reloc_p): New.
4936 * coff-i386.c (in_reloc_p): New.
4937 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
4938 (coff_write_object_contents): Only set has_reloc_section
4940 * cofflink.c (_bfd_coff_generic_relocate_section): Call
4941 in_reloc_p to decide if reloc should be emitted.
4942 * libcoff.h (pe_data_type.in_reloc_p): New.
4943 * peicode.h (pe_mkobject): Initialize in_reloc_p.
4947 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
4948 (_bfd_coff_read_internal_relocs): Likewise.
4949 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
4950 (_bfd_coff_read_internal_relocs): Likewise.
4952 * elflink.h (elf_link_add_object_symbols): Correct conditions
4953 under which type and size change warnings are issued.
4957 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
4958 a symbol which is not in a real section.
4959 (coff_write_native_symbol): Corresponding change.
4961 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
4962 coff_link_hash_newfunc and make non-static.
4963 (_bfd_coff_link_hash_table_init): New function, broken out of
4964 _bfd_coff_link_hash_table_create.
4965 (_bfd_coff_link_hash_table_create): Use it.
4966 (process_embedded_commands): Make static.
4967 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
4968 (_bfd_coff_link_hash_table_init): Declare.
4969 * libcoff.h: Rebuild.
4971 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
4972 field in XCOFF tdata.
4973 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
4974 U802ROMAGIC, for clarity. Try to set arch and machine correctly
4975 based on cputype stored in a.out header, or in n_type of initial
4977 (coff_write_object_contents): Set cputype correctly in a.out
4979 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
4981 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
4982 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
4984 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
4985 * libcoff.h: Rebuild.
4987 * cpu-rs6000.c (rs6000_compatible): New static function.
4988 (bfd_rs6000_arch): Use it.
4989 * cpu-powerpc.c (powerpc_compatible): New static function.
4990 (arch_info_struct): Define various flavours of PowerPC.
4991 (bfd_powerpc_arch): Use powerpc_compatible. Point at
4996 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
5000 * elflink.h (elf_link_add_object_symbols): Don't warn about
5001 changing the size or type if the old definition was weak.
5005 * coffcode.h (combined_entry_type): Add fix_line field.
5006 (coff_slurp_line_table): Warn if we try to set the lineno field of
5008 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
5009 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
5010 * coffgen.c (coff_mangle_symbols): Handle fix_line.
5011 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
5013 (coff_print_symbol): Print fix_value symbols in a useful fashion.
5014 * libcoff.h: Rebuild.
5016 * libcoff-in.h (struct xcoff_tdata): Define.
5017 (xcoff_data): Define.
5018 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
5019 * bfd-in2.h, libcoff.h: Rebuild.
5020 * coff-rs6000.c (xcoff_mkobject): New static function.
5021 (coff_mkobject): Define.
5022 (xcoff_copy_private_bfd_data): New static function.
5023 (coff_bfd_copy_private_bfd_data): Define.
5024 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
5026 (rs6000coff_vec): Add DYNAMIC to object_flags.
5027 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
5028 .loader sections specially.
5029 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
5030 section alignment from the XCOFF tdata information.
5031 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
5032 F_SHROBJ, and copy the extra a.out header information into the
5033 XCOFF tdata structure.
5034 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
5035 F_DYNLOAD and the extra a.out header information.
5036 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
5037 C_HIDEXT symbol with attached csect information.
5038 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
5039 in the o_maxdata field.
5040 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
5041 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
5042 end if BSF_NOT_AT_END is set.
5044 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
5045 _bfd_read_ar_hdr_fn.
5046 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
5047 * bfd-in2.h, libbfd.h: Rebuild.
5048 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
5050 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
5051 (bfd_slurp_bsd_armap_f2): Likewise.
5052 (_bfd_slurp_extended_name_table): Likewise.
5058 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
5059 when the symbol table is empty.
5061 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
5062 space for section symbols, since we don't output them either.
5063 (elf_m68k_adjust_dynindx): Removed.
5065 * ptrace-core.c (rawptr): Make it a local variable of
5066 ptrace_unix_core_file_p.
5070 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
5073 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
5074 Mac object file formats.
5078 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
5079 auxent if there isn't one.
5080 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
5081 rather than FILNMLEN as the maximum name length.
5083 * coffcode.h (bfd_coff_backend_data): Add new field
5084 _bfd_coff_print_aux.
5085 (bfd_coff_print_aux): New static function.
5086 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
5087 scnlen field of an XTY_LD csect aux entry.
5088 (coff_print_aux): New static function.
5089 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
5090 in coff_pointerize_aux_hook.
5091 (bfd_coff_std_swap_table): Initialize new field.
5092 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
5093 * libcoff.h: Rebuild.
5094 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
5095 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5097 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
5098 if there are symbols, for native AIX ld compatibility.
5100 * coffcode.h (bfd_coff_backend_data): Add new field
5101 _bfd_coff_pointerize_aux_hook.
5102 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
5103 or I960, and as 0 otherwise.
5104 (bfd_coff_std_swap_table): Initialize new field.
5105 * libcoff.h: Rebuild.
5106 * coffgen.c (coff_pointerize_aux): Change parameters to take
5107 symbol pointer instead of type and class, and to take aux index.
5108 Call _bfd_coff_pointerize_aux_hook if it is defined.
5109 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
5110 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
5111 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5113 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
5114 read-only/host-only support.
5116 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
5118 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
5121 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
5122 BFD_JUMP_TABLE_ARCHIVE accordingly.
5123 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
5124 (_bfd_compute_and_write_armap): Declare.
5125 (_bfd_generic_read_ar_hdr): Declare.
5126 (_bfd_read_ar_hdr): Define.
5127 (_bfd_noarchive_read_ar_hdr): Define.
5128 (_bfd_archive_bsd_read_ar_hdr): Define.
5129 (_bfd_archive_coff_read_ar_hdr): Define.
5130 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
5131 _bfd_read_ar_hdr instead.
5132 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
5133 (_bfd_compute_and_write_armap): Rename from
5134 compute_and_write_armap. Make non-static. Change all callers.
5135 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
5136 than _bfd_snarf_ar_hdr.
5137 * aout-target.h (MY_read_ar_hdr): Define if not defined.
5138 * ieee.c (ieee_read_ar_hdr): Define.
5139 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
5140 * oasys.c (oasys_read_ar_hdr): Define.
5141 * som.c (som_read_ar_hdr): Define.
5142 * bfd-in2.h, libbfd.h: Rebuild.
5146 * peicode.c (coff_swap_filehdr_in): If symptr is
5147 zero, there aren't any symbols, even if nsyms is set.
5151 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
5153 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
5154 sections, and set styp correctly for them: .got, .hash, .dynamic,
5155 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
5156 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
5158 (ecoff_sort_hdrs): New static function.
5159 (ecoff_compute_section_file_positions): Return boolean, not void.
5160 Sort the sections by VMA before looking through them. Put the
5161 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
5162 section on an appropriate boundary within the page.
5163 (ecoff_compute_reloc_file_positions): Check return value of
5164 ecoff_compute_section_file_positions.
5165 (_bfd_ecoff_set_section_contents): Likewise.
5166 (_bfd_ecoff_write_object_contents): Check for various Alpha
5167 section types when incrementing text_size and data_size. Call
5168 adjust_headers backend function if it exists.
5169 * coff-alpha.c (alpha_adjust_headers): New static function.
5170 (alpha_ecoff_backend_data): Initialize adjust_headers field.
5171 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5173 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
5177 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
5178 of ALTERNATE_AIX_CORE_FORMAT.
5179 * configure.in (aix4): No longer need CORE_FLAGS.
5180 * configure: Updated.
5184 NS32k changes from Ian Dall:
5185 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
5187 (aout_link_input_section_std, aout_link_input_section_ext,
5188 aout_link_reloc_link_order): Call them instead of _bfd_*
5190 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
5192 (backend_data): Use it instead of hardcoded zero.
5194 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
5195 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
5197 * ns32knetbsd.c: Include bfd.h.
5198 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
5199 (MY_bfd_reloc_type_lookup): Declare function too.
5200 * pc532-mach.c (set_sizes): Don't declare.
5201 (MY_text_includes_header, MY_exec_header_not_counted): Define.
5202 (backend_data, MY_backend_data): Don't define.
5204 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
5205 ns32k-*-lites* like ns32k-*-netbsd*.
5207 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
5212 * coffcode.h (coff_write_object_contents): Restore setting
5213 f_timdat to 0, deleted on August 22.
5217 * coffcode.h (coff_bfd_copy_private_symbol_data,
5218 coff_bfd_copy_private_section_data,
5219 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
5220 * peicode.h (coff_bfd_copy_private_bfd_data): New
5221 (pe_bfd_copy_private_bfd_data): New.
5222 (coff_swap_scnhdr_in): Swap bss size into the right place.
5223 (pe_print_private_bfd_data): Add some newlines.
5227 * som.c (setup_sections): Don't die if a space has no subspaces.
5231 * elflink.h (elf_link_add_object_symbols): Don't let a weak
5232 dynamic symbol override a common symbol. Don't change the size or
5233 type if they have been set and the new symbol is not a definition.
5234 Warn if the size or type changes.
5238 * som.c (som_begin_writing): Don't write the symbol table or
5240 (som_finish_writing): Write them here. Place them after the
5241 subspace data, but before the relocs.
5245 * sunos.c (sunos_add_one_symbol): Just pass false, not
5246 info->shared_library, to sunos_create_dynamic_sections.
5247 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
5249 (sunos_check_dynamic_reloc): Remove .text section assertion.
5253 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
5254 * configure, configure.in: Add pmac_xcoff_vec case.
5255 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
5256 * coff-pmac.c: New file, PowerMac XCOFF support.
5257 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
5258 * targets.c (pmac_xcoff_vec): Declare.
5260 * mpw-config.in: Various changes to be compatible with the
5261 autoconf-based configury.
5262 * mpw-make.sed: New file, sed commands to translate Unix
5263 makefile into MPW syntax.
5264 * mpw-make.in: Remove.
5265 * hosts/mpw.h: Remove.
5266 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
5267 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
5271 * binary.c (binary_get_symtab): Return an empty string on error.
5272 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
5274 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
5276 * coff-ppc.c: Reformatted according to gnu conventions
5277 Removed irrelevant "if 0" code
5281 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
5282 symbols rather than as indirect symbols.
5283 (MY(slurp_symbol_table)): Don't do anything special about
5286 * coffcode.h (coff_new_section_hook): Make sure that the alignment
5287 of .ctors and .dtors sections is no larger than 2.
5289 * sunos.c (sunos_add_one_symbol): Don't change
5290 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
5292 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
5293 dynamic symbols when creating a shared library.
5294 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
5296 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
5297 written even if it is not defined in a regular object.
5298 (sunos_write_dynamic_symbol): Use plt_offset for the address of
5299 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
5300 rather than the constant 22.
5301 (sunos_check_dynamic_reloc): Handle creating a shared library.
5302 (sunos_finish_dynamic_link): Set the first entry in the GOT to
5303 zero when creating a shared library.
5304 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
5305 write it out at the start of the symbol table.
5307 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
5311 * config.bfd: Add arm-*-coff.
5312 * configure.in, configure: Add armcoff_{little,big}_vec.
5313 * targets.c (armcoff_{little,big}_vec): Declare.
5314 (bfd_target_vector): Add armcoff_{little,big}_vec.
5315 * coff-arm.c (armcoff_{little,big}_vec): Always define.
5319 * targets.c (bfd_find_target): Remove debugging code.
5321 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
5323 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
5325 * Makefile.in: added *-ppc files
5326 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
5327 allow pe based .o's to be shared with other tools on ppc/NT
5328 * config.bfd: added powerpc[le]-[pe|winnt] config support
5329 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
5330 * peicode.h: Added more section flags for PE on ppc
5331 Added coff_swap_filehdr_out to allow peicode.h to be
5332 used for non-image PE files on ppc.
5333 Check for image, or not, before copying pe_opthdr
5334 * targets.c: Added new bfd's
5335 * targets.c: Removed two inactive bfds that shouldn't have made it this
5340 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
5341 explicit values to initialize all relocs. Change all users.
5342 (ppc_elf_brtaken_inner): New function to handle branch predicition
5344 (ppc_elf_brtaken_reloc): Ditto.
5345 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
5346 relocs use ppc_elf_unsupported_reloc.
5347 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
5348 needs to be reported.
5349 (ppc_elf_relocate_section): Support branch prediction relocs.
5353 * bfd.c (bfd_assert): Remove \n from string passed to
5356 * coff-i386.c: (TWO_DATA_SECS): Don't define.
5357 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
5358 (bfd_coff_make_section_hook): Don't define.
5359 (coff_make_section_hook): Remove.
5360 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
5361 (styp_to_sec_flags): Likewise.
5362 (coff_write_object_contents): Likewise.
5363 (bfd_coff_std_swap_table): Don't initialize make_section_hook
5365 * libcoff.h: Rebuild.
5366 * coffgen.c (make_a_section_from_file): Just call
5367 bfd_make_section_anyway, not bfd_make_section or
5368 bfd_coff_make_section_hook.
5369 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
5370 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
5371 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
5372 make_section_hook field.
5373 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5375 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
5376 pointers into value field for warning and indirect symbols; just
5377 leave the value field alone.
5378 * linker.c (generic_link_add_symbol_list): Use next symbol for
5379 warning and indirect symbols, rather than looking in symbol value.
5380 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
5381 parameter. Change all callers. Remove support for indirect
5382 symbols; it didn't work anyhow.
5383 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
5384 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
5385 * bfd-in2.h: Rebuild.
5389 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
5390 go back to telling the tools this reloc operates on 32 bits.
5394 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
5395 rather than a direct fprintf.
5396 * archive.c (_bfd_write_archive_contents): Likewise.
5397 * coffcode.h (coff_slurp_symbol_table): Likewise.
5398 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
5399 (ppc_elf_unsupported_reloc): Likewise.
5400 (ppc_elf_relocate_section): Likewise.
5401 * i386linux.c (linux_tally_symbols): Likewise.
5402 (linux_finish_dynamic_link): Likewise.
5403 * osf-core.c (osf_core_core_file_p): Likewise.
5404 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
5405 * som.c (som_sizeof_headers): Likewise.
5406 * srec.c (srec_bad_byte): Likewise.
5407 * bfd.c (bfd_assert): Likewise. Also change file to be const.
5408 * libbfd-in.h (bfd_assert): Declare first parameter const.
5409 * libbfd.h: Rebuild.
5410 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
5411 bfd_reloc_overflow is enough.
5412 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
5413 * coff-h8500.c (rtype2howto): Likewise.
5414 * coff-z8k.c (rtype2howto): Likewise.
5415 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
5416 * elf.c (_bfd_elf_get_lineno): Likewise.
5417 (_bfd_elf_no_info_to_howto): Likewise.
5418 (_bfd_elf_no_info_to_howto_rel): Likewise.
5419 * hp300hpux.c (convert_sym_type): Likewise.
5420 (MY(swap_std_reloc_in)): Likewise.
5421 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
5423 * libaout.h (struct aoutdata): Add line_buf field.
5424 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
5425 and filename_buffer. Instead, use a malloc buffer stored in the
5426 new line_buf field. Remove length restrictions.
5428 * coffgen.c (string_size): Remove static variable.
5429 (debug_string_size, debug_string_section): Likewise.
5430 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
5431 and debug_string_size_p parameters. Use them instead of the
5432 global variables. Change all callers.
5433 (coff_write_symbol): Likewise.
5434 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
5435 (coff_write_symbols): Add local variables to replace removed
5438 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
5439 function, and line_base fields.
5440 * libcoff.h: Rebuild.
5441 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
5442 information, rather than using static variables.
5444 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
5447 * init.c (initialized): Remove static variable.
5448 (bfd_init): Don't bother setting initialized.
5449 (bfd_check_init): Remove.
5450 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
5451 * libbfd.h: Rebuild.
5455 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
5456 size for full core dumps. Copy core file header to private data.
5457 (rs6000coff_core_file_failing_command,
5458 rs6000coff_core_file_failing_signal): New functions to extract
5459 the file name and terminating signal from the core file.
5460 * coff-rs6000.c: Use them.
5464 Change arch info to be const, initialized at compile time.
5465 * archures.c: Reindent many functions. Change CONST to const.
5466 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
5467 nothing set it anyhow. Make next const.
5468 (bfd_arch_info_list): Remove.
5469 (bfd_archures_list): Rename from archures_init_table. Change from
5470 a table of function pointers to a table of bfd_arch_info_type
5471 structure addresses.
5472 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
5473 (bfd_lookup_arch): Likewise.
5474 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
5476 (bfd_default_arch_struct): Make const.
5477 (bfd_arch_init, bfd_arch_linkin): Remove.
5478 (bfd_get_arch_info): Return a const pointer.
5479 * init.c (bfd_init): Don't call bfd_arch_init.
5480 * bfd.c (struct _bfd): Make arch_info const.
5481 * bfd-in2.h: Rebuild.
5482 * libbfd.h: Rebuild.
5483 * configure.in: Put & before everything in $selarchs.
5484 * configure: Rebuild.
5485 * cpu-*.c: Change bfd_*_arch from a function which calls
5486 bfd_arch_linkin to a const structure.
5487 * ieee.c (ieee_object_p): Make arch const.
5491 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
5493 * bfd-in2.h: Regenerate.
5494 * libbfd.h: Regenerate.
5496 * elf32-ppc.c (reloc_type): Update names to match current draft.
5497 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
5498 relative. Update names to current V.4 draft.
5499 (ppc_elf_reloc_type_lookup): Add support for more relocations.
5500 (ppc_elf_relocate_section): Rename relocations to match draft.
5504 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
5505 compiled with -mrelocatable-lib to be linked with either normal
5506 modules or -mrelocatable modules.
5510 * coffcode.h (coff_write_object_contents): Clear the vstamp field
5511 in the a.out header.
5513 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
5514 a reloc against a local symbol, even if it's not a section.
5518 * targets.c (bfd_target): Remove unused align_power_min field.
5519 * bfd-in2.h: Rebuild.
5520 * All backends: Remove initialization of align_power_min.
5524 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
5528 * config.bfd (mips-dec-netbsd*): New target.
5529 * configure.host (mips-dec-netbsd*): New host.
5530 * configure.in (mips-dec-netbsd*): New native.
5531 * configure: Rebuild.
5535 Make the COFF backend linker merge common types:
5536 * cofflink.c (struct coff_debug_merge_element): Define.
5537 (struct coff_debug_merge_type): Define.
5538 (struct coff_debug_merge_hash_entry): Define.
5539 (struct coff_debug_merge_hash_table): Define.
5540 (coff_debug_merge_hash_table_init): Define.
5541 (coff_debug_merge_hash_table_free): Define.
5542 (coff_debug_merge_hash_lookup): Define.
5543 (struct coff_final_link_info): Add debug_merge field.
5544 (coff_debug_merge_hash_newfunc): New static function.
5545 (_bfd_coff_final_link): Allocate and free debug_merge table.
5546 (coff_link_input_bfd): Merge identical enum, struct and union
5551 Convert i960 COFF to use COFF backend linker.
5552 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
5553 structure to store the symbol being used.
5554 (coff_i960_start_final_link): New static function.
5555 (coff_i960_relocate_section): New static function.
5556 (coff_i960_adjust_symndx): New static function.
5557 (coff_start_final_link): Define.
5558 (coff_relocate_section): Define.
5559 (coff_adjust_symndx): Define.
5560 * coffcode.h (bfd_coff_backend_data): Add new callback function
5561 _bfd_coff_start_final_link.
5562 (bfd_coff_start_final_link): Define.
5563 (coff_start_final_link): Define if not defined.
5564 (bfd_coff_std_swap_table): Add coff_start_final_link.
5565 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
5567 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
5568 function callback is not NULL.
5569 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
5570 (_bfd_coff_internal_syment_name): Declare.
5571 * libcoff.h: Rebuild.
5572 * configure.in (icoff_big_vec): Add cofflink.o.
5573 (icoff_little_vec): Likewise.
5574 * configure: Rebuild.
5578 * Makefile.in (clean-info): Remove extraneous tab from line
5583 * cofflink.c (coff_link_input_bfd): Fail if a section with no
5584 contents has relocs.
5588 * coffcode.h (coff_compute_section_file_positions): Keep the
5590 (coff_write_object_contents): Remember if it's a relocatable
5592 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
5593 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
5594 if relocatable file. Swap out saved raw size.
5598 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
5599 (maintainer-clean): Rename from realclean, passing
5600 maintainer-clean down to subdirectories, but leave realclean as a
5603 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
5606 * dep-in.sed: Remove config.h from generated dependencies.
5608 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
5609 broken out of sunos_canonicalize_dynamic_symtab.
5610 (sunos_canonicalize_dynamic_symtab): Call new function
5611 sunos_slurp_dynamic_symtab.
5612 (sunos_add_dynamic_symbols): Add three new parameters. Return the
5613 dynamic symbol table to the caller.
5614 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
5615 callback to override the symbols being read.
5616 * libaout.h (struct aout_backend_data): Add three new parameters
5617 to add_dynamic_symbols callback.
5619 Extensive minor changes to avoid various gcc warnings. Also:
5620 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
5621 * archures.c (bfd_arch_info_type): Change mach field from long to
5623 (bfd_lookup_arch): Change machine parameter from long to unsigned
5628 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
5629 a symbol with a non-zero plt_offset.
5633 * elfcode.h (align_file_position): Remove; not used.
5635 * configure.in: Only check for <sys/procfs.h> on a native system,
5636 and make sure it defines prstatus_t.
5637 * configure: Rebuild.
5641 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
5643 * config.in: Rename from config.h.in.
5644 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
5645 Check for config.h:config.in when creating stamp-h.
5646 * configure: Rebuild.
5647 * Makefile.in (stamp-h): Depend upon config.in rather than
5648 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
5649 calling config.status.
5651 * Makefile.in (do_distclean): Remove config.h and stamp-h.
5652 (Makefile): Just rebuild Makefile.
5653 (config.h, stamp-h): New targets.
5654 * configure.in: Create stamp-h when rebuilding config.h.
5655 * configure: Rebuild.
5659 * configure.in: Call AC_CONFIG_HEADER. Substitute
5660 HOST_64BIT_LONG. Check that various header files exist. Check
5661 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
5662 and/or free need to be declared. Don't make a link to sysdep.h.
5663 Define TRAD_HEADER for various hosts.
5664 * configure: Rebuild.
5665 * configure.host: Don't set my_host. Add definitions taken from
5666 host header files for various entries. Remove entries which now
5668 * acconfig.h: New file.
5669 * config.h.in: New file, built by autoheader.
5670 * sysdep.h: New file.
5671 * Makefile.in (do_distclean): Don't remove sysdep.h.
5673 (LOCAL_H_DEPS): New variable.
5674 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
5676 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
5677 ($(OPTIONAL_BACKENDS)): Likewise.
5678 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
5679 looking through sysdep.h.
5680 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
5681 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
5682 (fprintf_vma, sprintf_vma): Likewise.
5683 (int64_type, uint64_type): Don't define.
5684 * bfd-in2.h: Rebuild.
5685 * archures.c, bfd.c, srec.c: Include <ctype.h>.
5686 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
5687 * lynx-core.c: Include stuff from old hosts/lynx.h.
5688 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
5689 rather than NO_FCNTL.
5690 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
5691 rather than NATIVE_HPPAHPUX_COMPILER.
5692 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
5694 * hosts/*.h: Remove all header files which merely include,
5695 declare, and define things. Leave header files which define
5696 information needed by trad-core.c.
5698 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
5699 (BFD_CC_FOR_BUILD): Define.
5700 * configure.in: Use BFD_CC_FOR_BUILD.
5701 * configure: Rebuild.
5705 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
5706 * configure: Rebuild.
5708 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
5713 * config.bfd: i386pe_ve -> i386pe_vec.
5717 * configure.host: Incorporate host Makefile fragments by setting
5719 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
5720 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
5721 value based on whether the code is being compiled by a cross
5722 compiler. Don't substitute host_makefile_frag or frags.
5723 * aclocal.m4: New file to define local AC_PROG_CC.
5724 * configure: Rebuild.
5725 * Makefile.in (INSTALL): Set to @INSTALL@.
5726 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
5727 (INSTALL_DATA): Set to @INSTALL_DATA@.
5729 (CC): Define as @CC@.
5730 (CFLAGS): Set to @CFLAGS@.
5731 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
5732 (@host_makefile_frag@): Remove.
5733 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
5734 after other options.
5735 (config.status): Remove dependency upon @frags@.
5736 * config/*.mh, config/README: Remove.
5738 * config.bfd: Rewrite to incorporate the contents of the Makefile
5739 fragments by setting shell variables, rather than merely returning
5740 the name of a Makefile fragment.
5741 * configure.in: Use shell variables set by config.bfd rather than
5742 looking at the target Makefile fragment files. Don't substitute
5743 target_makefile_frag. Do substitute TDEFINES.
5744 * configure: Rebuild.
5745 * Makefile.in (@target_makefile_frag@): Remove.
5746 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
5747 * config/*.mt: Remove.
5751 * configure.in: Put changequote lines around "i[345]86" patterns
5752 section of core file support.
5756 * som.c (som_bfd_print_private_bfd_data): Define to use the
5761 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
5762 entry, text_start and data_start.
5766 * Makefile.in (OFILES): Remove $(TDEPFILES).
5767 * config/apollo.mt (TDEPFILES): Remove.
5768 * config/README: Update.
5770 * configure.in: For a native configuration, set COREFILE and
5771 COREFLAG based on the canonical host name.
5772 * configure: Rebuild.
5773 * Makefile.in: Rebuild dependencies.
5774 (ALL_CFLAGS): Add @COREFLAG@.
5775 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
5776 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
5777 support routines. Check LYNX_CORE rather than HOST_LYNX.
5778 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
5779 * i386lynx.c: Likewise.
5780 * m68klynx.c: Likewise.
5781 * sparclynx.c: Likewise.
5782 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
5783 * *-core.c: Comment changes.
5784 * config/decstation.mh (HDEPFILES): Remove.
5785 (HDEFINES): Remove -DTRAD_CORE.
5786 * config/irix3.mh (RANLIB): Remove.
5787 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
5788 (HDEFINES): Remove -DIRIX_CORE.
5789 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
5790 (HDEFINES): Remove -DTRAD_CORE.
5791 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
5792 * config/ultra3.mh (RANLIB): Remove.
5793 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
5794 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
5795 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
5796 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
5797 * config/hppahpux.mh, config/hppaosf.mh: Remove.
5798 * config/i386aix.mh, config/i386bsd.mh: Remove.
5799 * config/i386linux.mh, config/i386mach3.mh: Remove.
5800 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
5801 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
5802 * config/mipsmach3.mh, config/news-mips.mh: Remove.
5803 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
5804 * config/rs600.mh, config/rs6000lynx.mh: Remove.
5805 * config/solaris2.mh, config/stratus.mh: Remove.
5806 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
5807 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
5811 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
5812 DT_FINI entry if the appropriate symbol is not in the hash table.
5814 * libelf.h (struct elf_backend_data): Add create_program_headers
5815 and want_hdr_in_seg fields.
5816 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
5818 (elf_backend_create_program_headers): Likewise.
5819 (elfNN_bed): Initialize create_program_headers and
5821 * elf.c (get_program_header_size): Call create_program_headers
5823 (map_program_segments): Check want_hdr_in_seg backend field. Call
5824 create_program_headers backend routine.
5826 * elf.c (assign_file_positions_except_relocs): Align non allocated
5827 sections when creating an executable.
5829 * elfcode.h (elf_swap_phdr_in): Make non static.
5830 (elf_swap_phdr_out): Make non static.
5831 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
5832 (bfd_elf32_swap_phdr_out): Declare.
5833 (bfd_elf64_swap_phdr_in): Declare.
5834 (bfd_elf64_swap_phdr_out): Declare.
5836 * ecofflink.c (ecoff_collect_shuffle): New static function.
5837 (_bfd_ecoff_get_accumulated_pdr): New function.
5838 (_bfd_ecoff_get_accumulated_sym): New function.
5839 (_bfd_ecoff_get_accumulated_ss): New function.
5840 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
5841 (_bfd_ecoff_get_accumulated_sym): Declare.
5842 (_bfd_ecoff_get_accumulated_ss): Declare.
5843 * libbfd.h: Rebuild.
5847 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
5849 * elflink.h (elf_link_add_object_symbols): Handle indirect and
5850 warning symbols. If any section is named .gnu.warning.XXX, treat
5851 the contents as a warning to be issued if the symbol XXX is
5853 (elf_link_output_extsym): For an indirect or warning symbol, just
5854 output the symbol it points to.
5856 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
5857 if bfd_hash_allocate fails, since it will already be set.
5858 (generic_link_hash_newfunc): Likewise.
5859 (archive_hash_newfunc): Likewise.
5860 (hash_entry_bfd): New static function.
5861 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
5862 callback. Allocate a new warning using the hash table newfunc.
5863 Use bfd_hash_replace to update the entry in the hash table, rather
5864 than assuming we can copy the fields with structure assignment.
5866 * hash.c (bfd_hash_replace): New function.
5867 * bfd-in.h (bfd_hash_replace): Declare.
5868 * bfd-in2.h: Rebuild.
5872 * config.bfd: Add mips*vr4300-*-elf* target.
5873 * config/mipsbvr4300.mt: Added.
5875 See file ChangeLog.2
5882 version-control: never