3 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
7 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
11 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
12 (pe_print_private_bfd_data): call pe_print_reloc.
13 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
14 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
15 up some debugging as well.
19 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
24 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
25 when setting sections to NULL.
29 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
31 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
32 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
34 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
39 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
43 * ihex.c (ihex_scan): Handle record types 4 and 5.
44 (ihex_object_p): Permit types 4 and 5.
45 (ihex_set_section_contents): Remove check for out of range
47 (ihex_write_object_contents): Generate types 4 and 5.
49 * elflink.h (elf_link_output_extsym): Just ignore warning and
50 indirect references to symbols which don't really exist.
54 * peicode.h (pe_print_idata): Minor format fixes
55 (pe_print_edata): New function. Under private printing, this formats
56 the edata section of a PE file.
57 (pe_print_private_bfd_data): Added call to pe_print_edata.
61 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
62 index, don't call stoi.
66 * srec.c (srec_scan): Set lma as well as vma.
68 * ihex.c: New file; support for Intel Hex format.
69 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
71 (bfd_target_vector): Always include ihex_vec.
72 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
73 * Makefile.in: Rebuild dependencies.
74 (BFD_LIBS): Add ihex.o
75 (BFD_LIBS_CFILES): Add ihex.c.
78 * elf.c (assign_file_positions_for_segments): Sort the sections in
80 (get_program_header_size): Return the right size if segment_map is
82 (copy_private_bfd_data): Don't bother to sort the sections.
84 * bfd.c (bfd_record_phdr): New function.
85 * bfd-in.h (bfd_record_phdr): Declare.
88 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
91 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
92 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
94 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
95 (bfd_zmalloc): Change declaration.
97 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
98 and realloc. Don't set bfd_error_no_memory if they fail.
102 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
103 uses as well. Added a new howto to deal with TOCREL16 relocs that
105 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
106 to handle RVA relocs from dlltool.
107 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
108 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
109 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
111 * coffcode.h (coff_set_alignment_hook): check idata$X sections
112 to get the right section alignment.
116 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
117 p_paddr if p_paddr is zero.
118 (make_mapping): Set includes_filehdr and includes_phdrs for first
120 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
122 (assign_file_positions_for_segments): Handle includes_filehdr and
123 includes_phdrs. Remove special handling of PT_PHDR and first
125 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
126 when appropriate. Remove special handling of PT_PHDR segment.
127 Use a more complex condition for when a section is included in a
128 segment to handle Solaris linker oddities.
132 * coff-m88k.c (howto_table): Reformatted for easier reading;
133 special_function now points to new function m88k_special_reloc.
134 (howto_hvrt16): Function previously used for handling HVRT16 relocs
136 (rtype2howto): Do not add reloc's r_offset to the addend, this will
137 be done correctly by m88k_special_reloc.
138 (reloc_processing): New function to be used by RELOC_PROCESSING.
139 (RELOC_PROCESSING): Define to call reloc_processing.
143 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
144 (pe_print_pdata): Likewise.
146 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
148 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
150 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
151 * Many files: don't set bfd_error_no_memory if one of the above
154 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
155 if p_paddr_valid is set.
156 (copy_private_bfd_data): New static function.
157 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
159 * elf.c (assign_file_positions_for_segments): Fix case where extra
160 program headers were allocated.
162 * elf.c (_bfd_elf_print_private_bfd_data): New function.
163 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
164 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
165 _bfd_elf_print_private_bfd_data.
167 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
168 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
169 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
170 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
171 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
172 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
173 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
177 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
178 * elf.c (make_mapping): New static function.
179 (map_sections_to_segments): New static function.
180 (elf_sort_sections): New static function.
181 (assign_file_positions_for_segments): New static function.
182 (map_program_segments): Remove.
183 (get_program_header_size): Remove sorted_hdrs, count, and
184 maxpagesize parameters. Simplify.
185 (assign_file_positions_except_relocs): When generating an
186 executable, use assign_file_positions_for_segments.
187 (elf_sort_hdrs): Remove.
188 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
189 to get_program_header_size.
193 * hp300hpux.c (MY(callback)): Set lma as well as vma.
195 * configure, config.in: Regenerate with autoconf 2.7.
197 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
198 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
202 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
203 (ecoff_sec_to_styp_flags): Likewise.
204 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
205 (ecoff_set_symbol_info): Handle scRConst.
206 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
207 (ecoff_compute_section_file_positions): Handle .rconst section.
208 (_bfd_ecoff_write_object_contents): Likewise.
209 (ecoff_link_check_archive_element): Handle scRConst.
210 (ecoff_link_add_externals): Likewise.
211 (ecoff_link_write_external): Handle .rconst section.
212 (ecoff_reloc_link_order): Likewise.
213 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
214 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
216 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
218 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
219 DEF_DYNAMIC flag is set.
223 * host-aout.c: If TRAD_HEADER is defined, include it.
227 * aclocal.m4 (AC_PROG_CC): Remove local definition.
228 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
229 (BFD_NEED_DECLARATION): New function.
230 * configure.in: Use BFD_NEED_DECLARATION.
231 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
232 * configure, config.in: Rebuild with autoconf 2.6.
234 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
235 special_sections before returning when called with a non XCOFF
238 * coffgen.c (coff_renumber_symbols): Sort common symbols with
241 * coffcode.h (coff_compute_section_file_positions): Only pad the
242 previous section to force file alignment when creating an
247 * coffcode.h (coff_compute_section_file_positions): If
248 RS6000COFF_C, set up the .debug section.
250 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
251 if it is not large enough to accomodate the entire TOC area with
252 signed 16 bit offsets.
253 (xcoff_write_global_symbol): Handle negative TOC offsets in global
255 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
256 TOC anchor to use the TOC value used in the output file.
260 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
261 (_bfd_coff_read_string_table): Likewise.
265 * pe-arm.c: Fix typos.
266 * coff-arm.c: Likewise.
270 * coff-ppc.c (list_ele): Added "cat"egory member.
271 (record_toc): New category parameter (priv or pub).
272 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
273 (ppc_process_before_allocation): Removed embrionic data-in-toc from
274 the mainline. It addes extra toc cells in error.
275 (ppc_coff_swap_sym_in_hook): Added some documentation.
276 (dump_toc): Can now diagnose "virtual toc" chicanery.
280 * elf-bfd.h (struct elf_link_hash_table): Change type of
281 dynsymcount and bucketcount fields from size_t to bfd_size_type.
285 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
286 pointerize C_LEAFSTAT or C_LEAFEXT entries.
288 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
289 DT_INIT and DT_FINI entries if the _init or _fini symbol is
290 defined or mentioned in a regular file.
294 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
295 (coff_ppc_relocate_section): Handle TOCDEFN attribute
296 (coff_ppc_relocate_section): Correct REL24 handling
297 (ppc_process_before_allocation): Correct TOCDEFN handling
299 * peicode.h (dir_names): Added name descriptions
303 * VERSION: Updated to cygnus-2.6.
307 * targets.c (m68k4knetbsd_vec): Declare.
311 * targets.c (bfd_target): Change type of second argument to
312 _bfd_print_private_bfd_data from void * to PTR.
313 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
314 using PTR rather than void *.
315 * bfd-in2, libbfd.h: Rebuild.
316 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
318 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
319 _bfd_generic_bfd_print_private_bfd_data rather than casting
324 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
325 "DO NOT DELETE" lines or blank lines that mkdep writes on some
327 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
328 BFD64_BACKENDS_CFILES): New variables.
333 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
334 not at the file position of the first section.
335 * coffcode.h (coff_compute_section_file_positions): Avoid using
337 (coff_write_object_contents): When generating a PPC PE executable
338 with no symbols, round up the file size to a COFF_PAGE_SIZE
340 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
341 don't write out a string table.
343 * elf.c (bfd_section_from_shdr): When using a different section
344 header, pass the new one to _bfd_elf_make_section_from_shdr.
345 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
346 (elf_map_symbols): Add section VMA to symbol value when comparing
348 (_bfd_elf_compute_section_file_positions): Only build symbol table
349 if there are some symbols. Set file offset of symtab and strtab
351 (assign_file_positions_except_relocs): Remove dosyms parameter.
352 Change all callers. Never set file offset of symtab and strtab
354 (_bfd_elf_copy_private_section_data): New function.
355 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
356 (_bfd_elf_copy_private_symbol_data): New function.
357 (swap_out_syms): Check for special mapping of st_shndx created by
358 copy_private_symbol_data.
359 * elfxx-target.h: Use new copy routines.
360 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
361 (_bfd_elf_copy_private_section_data): Declare.
363 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
365 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
368 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
369 _bfd_dummy_target, matching the recent change to archive
374 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
375 arithmetic on PTR types.
377 * aout-target.h (MY(callback)): Set the lma of the sections.
379 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
380 symbol into a reloc against the section.
384 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
385 glue for the relocs: IMGLUE and IFGLUE.
386 (record_toc): new function - tracks toc contents
387 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
388 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
389 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
390 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
391 (ppc_record_toc_entry): Removed a debug define (duh)
393 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
394 (pe_print_idata): New function - formats the idata section data
395 (pe_print_pdata): New function - formats the pdata section data
396 (pe_print_private_bfd_data): calls to above
400 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
401 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
402 TARGET_SYM and TARGET_NAME for vector and BFD name.
403 * coff-pmac.c (pmac_xcoff_vec): Remove.
404 (TARGET_SYM, TARGET_NAME): Define.
405 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
406 machine to 0, not all PowerMacs are 601s.
410 * elfcode.h (elf_object_p): Read in any program headers.
411 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
412 based on the program headers, if any.
413 (elf_fake_sections): Set sh_addr from the vma, not the lma.
414 (map_program_segments): Set p_paddr of program headers based on
419 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
422 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
423 trying to do a relocateable link with a non-a.out object file.
425 * archive.c (bfd_generic_archive_p): Check the first object file
426 in an archive even if target_defaulted is set. If the object file
427 has the wrong xvec, reject it.
429 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
430 be represented, report the name via _bfd_error_handler.
431 (translate_to_native_sym_flags): Likewise.
432 * elf32-mips.c (mips_elf_final_link): Likewise.
433 * oasys.c (oasys_write_sections): Likewise.
435 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
436 which checks for STYP_OVRFLO sections.
437 (coff_compute_section_file_positions): If RS6000COFF_C, handle
438 reloc and lineno count overflows.
439 (coff_write_object_contents): Call coff_count_linenumbers before
440 coff_compute_section_file_positions. If RS6000COFF_C, handle
441 reloc and lineno count overflows.
442 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
443 relocs before dealing with .pad sections. Count overflow section
444 headers when handling .pad sections.
446 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
449 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
450 (struct xcoff_link_hash_table): Add descriptor_section and
451 special_sections fields.
452 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
453 (xcoff_link_add_symbols): Set linkage section alignment. Create
454 descriptor section. Check for magic symbol names (_text, etc.),
455 and record them in special_sections if found. Set
456 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
457 descriptor field to point back to the function code symbol.
458 (xcoff_sweep): Always mark the special descriptor_section.
459 (bfd_xcoff_export_symbol): Check whether the symbol might be a
460 function descriptor, and mark it if it is.
461 (bfd_xcoff_size_dynamic_sections): Add new special_sections
462 parameter, and fill it in. Allocate space for the descriptor
464 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
465 global linkage code. If an undefined function descriptor is
466 exported, arrange to define it. Warn about any other undefined
468 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
469 (xcoff_write_global_symbol): Create a function descriptor when
471 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
472 * bfd-in2.h: Rebuild.
476 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
477 (ppc_coff_link_hash_table): new types for hashing
478 (ppc_coff_link_hash_newfunc): hash entry constructor
479 (ppc_coff_link_hash_table_init): hash table initializer
480 (ppc_coff_link_hash_table_create): hash table constructor
481 (ppc_record_toc_entry): changed references to hash table
482 (coff_ppc_relocate_section): changed references to hash table
484 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
487 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
488 (coff_link_add_symbols): removed toc_offset init
492 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
495 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
496 if it is given and mmep is available.
497 * acconfig.h: Undef USE_MMAP.
498 * configure, config.in: Regenerated.
499 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
500 table handling the old way.
501 (aout_get_external_symbols): Don't complain if last byte of string
503 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
504 (bfd_free_window) [! USE_MMAP]: Don't define.
505 (bfd_get_file_window,
506 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
510 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
515 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
516 compatible with AMD generated COFF files. Try to support both AMD
517 and GNU formats simultaneously.
518 (coff_a29k_relocate_section): Likewise.
520 * libbfd.c (bfd_get_file_window): Change writable parameter from
521 int to boolean; update all callers. Pass MAP_SHARED if not
522 writable--it's required on Solaris. Cast fprintf argument to
524 * bfd-in.h (bfd_get_file_window): Update declaration.
525 * bfd-in2.h: Rebuild.
526 * aoutx.h: Update calls to bfd_get_file_window.
528 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
530 (xcoff_swap_ldhdr_in): New static function.
531 (xcoff_swap_ldsym_in): New static function.
532 (xcoff_find_reloc): Handle the case of a single reloc correctly.
533 (xcoff_link_add_symbols): If we just created a descriptor, pass it
534 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
535 Handle XTY_ER/XMC_XO symbols correctly.
536 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
537 rather than normal symbol table.
538 (bfd_xcoff_import_symbol): It's not an error if the symbol is
539 already defined with the same absolute value.
540 (xcoff_mark): When considering called symbols, check whether the
541 descriptor is from a dynamic object, rather than the symbol
543 (xcoff_build_ldsyms): Likewise.
545 * libbfd.c (bfd_get_file_window): Change return type to boolean.
546 Cast realloc and malloc return values. If malloc or realloc fail,
547 set bfd_error_no_memory.
548 * bfd-in.h (bfd_get_file_window): Change type to boolean.
549 * bfd-in2.h: Rebuild.
553 * coff-ppc.c (ppc_record_toc_entry): new function.
554 (in_reloc_p): changed return value.
555 (coff_ppc_relocate_section): much rework.
556 (ppc_allocate_toc_section): new function.
557 (ppc_process_before_allocation): new function.
558 (ppc_coff_swap_sym_in_hook): new function.
560 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
561 (coff_link_add_symbols): initialize toc_offset.
563 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
564 (coff_swap_aouthdr_out): Added more sections to the data
565 dictionary for the pe file header. Also changed linker version
566 number on the ppc side.
567 (dir_names): small improvements to the dictionary printing.
568 (pe_mkobject_hook): save the file level flags.
570 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
571 (pe_tdata): added real_flags field
572 (coff_tdata): added local_toc_sym_map and access macro
574 * libcoff.h (coff_link_hash_entry): added toc_offset field
575 (pe_tdata): added real_flags field
576 (coff_tdata): added local_toc_sym_map and access macro
578 * coffcode.h (coff_set_alignment_hook): added hook for PE.
579 (coff_mkobject): init for local_toc_sym_map
580 (coff_write_object_contents): set the internal_a.magic to
581 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
586 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
587 entries until both the line number address and the function name
588 address are too large.
590 * configure.in: Call AC_CHECK_PROG to find and cache AR.
591 * configure: Rebuilt.
593 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
594 is defined in the environment.
598 * som.c (som_get_section_contents_in_window): Define to use
603 * coff-i860.c: New file, based on coff-i386.c.
604 * cpu-i860.c: New file, based on cpu-i386.c.
605 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
606 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
607 targets, using i860coff_vec.
608 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
609 trad-core.o and hosts/i860mach3.h.
610 (i860coff_vec): Use coff-i860.o and cofflink.o.
611 * configure: Rebuild.
612 * Makefile.in: Rebuild dependencies.
613 (ALL_MACHINES): Add cpu-i860.o.
614 (BFD32_BACKENDS): Add coff-i860.o.
615 (CFILES): Add cpu-i860.c and coff-i860.c.
616 * targets.c (i860coff_vec): Declare.
617 (bfd_target_vector): Add &i860coff_vec.
618 * archures.c (bfd_i860_arch): Declare.
619 (bfd_archures_list): Add &bfd_i860_arch.
620 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
621 (coff_set_flags): Handle bfd_arch_i860.
622 (coff_write_object_contents): Handle I860 a.out magic number.
626 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
627 the created .tc section to 2.
628 (xcoff_mark): Don't keep a .loader reloc for a call to an
629 undefined symbol when creating a shared library.
630 (xcoff_build_ldsyms): When creating a shared library, generate
631 global linkage code for a call to an undefined symbol.
635 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
636 BFD32_BACKENDS, BFD64_BACKENDS.
637 (.dep1): Put mkdep output in a separate file.
638 Rebuilt dependencies.
640 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
643 Permit use of mmap when available:
645 * configure.in: Check for mmap, madvise, mprotect.
646 * config.in, configure: Regenerated.
648 * libbfd.c (struct _bfd_window_internal): Define type.
649 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
651 (ok_to_map): New static variable for debugging.
652 (_bfd_generic_get_section_contents_in_window): New function.
653 * bfd-in.h (bfd_window_internal): Declare type.
654 (bfd_window): Define type.
655 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
656 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
659 * libaout.h (struct aoutdata): Add two window fields.
660 (obj_aout_sym_window, obj_aout_string_window): New macros.
661 * aoutx.h (some_aout_object_p): Initialize windows.
662 (aout_get_external_symbols): Get symbol data and strings in
663 windows instead of explicitly allocated buffers.
664 (slurp_symbol_table): Free window instead of memory.
665 (bfd_free_cached_info): Release windows instead of freeing storage
667 (aout_link_free_symbols): Ditto.
669 * targets.c (bfd_target): Add new field for
670 get_section_contents_in_window.
671 (BFD_JUMP_TABLE_GENERIC): Updated.
672 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
673 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
674 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
675 macros for get_section_contents_in_window field.
679 * core.c: Renamed to corefile.c
680 * makefile.dos (OBJS): Change core.o to corefile.o
681 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
686 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
687 targ_selvecs to allow debugging under Irix-5 native.
692 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
693 to o. Clobber and restore the list of new csects around the call
694 to _bfd_generic_link_add_one_symbol, in case it wants to report a
695 linker error and the linker wants to read the symbol table. Reset
696 the line number count of a real section even if it has no relocs.
697 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
699 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
704 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
705 an undefined symbol in a shared link.
707 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
708 oldtype from bfd_link_order_type to bfd_link_hash_type. From
713 * coff-m88k.c (rtype2howto): New static function.
714 (RTYPE2HOWTO): Use it rather than a macro definition.
716 * coffcode.h (coff_write_object_contents): set internal_a.magic
717 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
719 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
720 define TRAD_HEADER to new file hosts/delta68.h.
721 m88*-motorola-sysv*, however, does use ptrace-core.o.
722 * hosts/delta68.h: New file.
724 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
725 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
729 * i386linux.c (MY(vec)): Declare before use.
733 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
734 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
736 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
737 BFD is not of the right type.
738 (bfd_elf_get_needed_list): Likewise.
739 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
740 * sunos.c (bfd_sunos_get_needed_list): Likewise.
741 * xcofflink.c (XCOFF_XVECP): Define.
742 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
744 (bfd_xcoff_import_symbol): Likewise.
745 (bfd_xcoff_export_symbol): Likewise.
746 (bfd_xcoff_link_count_reloc): Likewise.
747 (bfd_xcoff_record_link_assignment): Likewise.
748 (bfd_xcoff_size_dynamic_sections): Likewise.
750 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
751 table index against the number of symbols for a base relative
754 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
756 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
757 full_aouthdr flag here...
758 (_bfd_xcoff_bfd_final_link): ...not here.
762 * libelf.h: Rename to elf-bfd.h to avoid conflict with
763 systems that have a system <libelf.h>.
764 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
765 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
766 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
767 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
768 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
769 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
770 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
774 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
775 set, set BSF_WEAK in symbol. Change all callers.
776 (ecoff_get_extr): Set weakext based on BSF_WEAK.
777 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
778 _bfd_generic_link_add_one_symbol.
779 (ecoff_indirect_link_order): Check that the section tdata relocs
780 are not NULL before using them.
782 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
783 define TRAD_HEADER as hosts/alphalinux.h.
784 * configure: Rebuild.
785 * hosts/alphalinux.h: New file.
786 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
791 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
792 C_ECOMM storage classes.
794 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
796 (xcoff_mark): Call xcoff_mark_symbol.
797 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
798 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
800 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
804 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
806 (xcoff_find_reloc): New static function.
807 (xcoff_link_add_symbols): Use it.
808 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
809 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
810 relocate the value of C_DECL.
812 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
816 * cofflink.c (_bfd_coff_generic_relocate_section): Make
817 callback decide what goes in .relocs.
818 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
819 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
824 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
829 * xcofflink.c: More improvements, mostly to fix handling of
830 constructors and a few other special cases.
831 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
832 zero, reverting yesterday's change.
833 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
834 (bfd_xcoff_link_count_reloc): Declare.
835 (bfd_xcoff_record_link_assignment): Declare.
836 * bfd-in2.h: Rebuild.
840 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
841 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
842 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
843 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
844 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
845 Change PAGE_SIZE to TARGET_PAGE_SIZE.
847 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
850 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
851 segments includes the a.out header. See to that the magic number
852 *always* is big-endian.
854 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
855 m68k4k NetBSD configurations.
857 * configure.in, configure: Separate i386 & mips NetBSD
858 configurations from other BSD ones. Don't assume DEC is the only
859 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
860 configurations. Add support for m68k4k NetBSD object format.
862 * libaout.h: Added M_68K4K_NETBSD magic.
864 * m68k4knetbsd.c: New file.
866 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
868 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
871 * hosts/mipsnbsd.h: New file.
876 * config.bfd: Add config stuff for mips*-*-magic* to set
877 targ_defvec to ecoff_big_vec.
882 * xcofflink.c: Numerous changes to get closer to a working XCOFF
884 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
885 toc_section, and entry_section fields.
886 (struct xcoff_section_tdata): Remove ldrel_count field.
887 * libcoff.h: Rebuild.
888 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
890 (coff_compute_section_file_positions): If RS6000COFF_C, generate
891 full a.out header if full_aouthdr is set in xcoff_data.
892 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
893 based on sections stored in xcoff_data.
894 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
896 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
897 (rs6000coff_vec): Set symbol_leading_char to '.'.
898 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
899 value stored in ret rather than returning a pointer value.
903 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
908 * som.c (som_slurp_string_table): Allocate the strings with malloc
909 since they're free'd by free_cached_info.
910 (som_slurp_symbol_table): Similarly for the symbol table.
914 * Makefile.in (diststuff): Don't make headers.
918 * Makefile.in: Rebuild dependencies.
920 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
921 output_bfd is not SunOS.
922 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
923 non-SunOS input files.
925 * xcofflink.c: Extensive changes to support linking shared objects
926 and generating a .loader section.
927 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
928 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
929 last_symndx, and ldrel_count fields.
930 * libcoff.h: Rebuild.
931 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
932 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
934 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
935 (bfd_xcoff_export_symbol): Declare.
936 (bfd_xcoff_size_dynamic_sections): Declare.
937 * bfd-in2.h: Rebuild.
941 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
942 * configure: Rebuild.
943 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
944 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
946 (pmac_xcoff_vec): Update to use new xcoff support.
947 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
948 (xcoff_write_armap): Declare buf as unsigned char.
949 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
951 * mpw-make.sed: Generalize subdir_do edit.
955 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
956 correctly. Don't initialize asect->vma.
960 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
961 something a little less than the page size.
965 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
969 * coff-i386.c (coff_i386_reloc_type_lookup): New.
970 * coffcode.h (coff_write_object_contents): If .bss is before
971 .data us that as data_start.
972 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
974 * peicode.h (add_data_entry): Use _cooked_size of data directory.
975 (coff_swap_outhdr_out): Hardwire in version number.
979 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
980 major and minor to *_vno, since the former are also macros in
981 SunOS header files. Cast result of bfd_alloc to appropriate
984 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
985 before assigning to sec_data.
989 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
990 now relative to the section, not absolute.
991 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
992 get the file name when there is a N_SO directory name. When
993 handling stabs, remember that section->vma was added to the
998 * sunos.c (struct sunos_link_hash_table): Add needed field.
999 (sunos_link_hash_table_create): Call bfd_release, not free.
1000 (sunos_link_hash_table_create): Initialize needed field.
1001 (sunos_add_dynamic_symbols): Record needed objects.
1002 (bfd_sunos_get_needed_list): New function.
1003 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
1004 * bfd-in2.h: Rebuild.
1008 * libcoff-in.h (pe_data_type.in_reloc_p): New.
1012 * bfd-in.h (struct bfd_link_needed_list): Rename from
1013 bfd_elf_link_needed_list.
1014 * bfd-in2.h: Rebuild.
1015 * elf.c, elflink.h, libelf.h: Corresponding changes.
1017 Add start at AIX linker support; no shared libraries yet.
1018 * xcofflink.c: New file.
1019 * configure.in (rs600coff_vec): Use xcofflink.o.
1020 * configure: Rebuild.
1021 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
1023 (struct xcoff_section_tdata): Define.
1024 (xcoff_section_data): Define macro.
1025 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
1026 (_bfd_xcoff_bfd_link_add_symbols): Declare.
1027 (_bfd_xcoff_bfd_final_link): Declare.
1028 (_bfd_ppc_xcoff_relocate_section): Declare.
1029 * libcoff.h: Rebuild.
1030 * coff-rs6000.c: Clean up a bit.
1031 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
1032 cputype, csects, and debug_indices.
1033 (xcoff_copy_private_bfd_data): Copy cputype.
1034 (xcoff_howto_table): Rename from rs6000coff_howto_table.
1035 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
1036 (xcoff_reloc_type_lookup): Rename from
1037 rs6000coff_reloc_type_lookup.
1038 (coff_relocate_section): Define.
1039 (_bfd_xcoff_sizeof_headers): Define.
1040 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
1041 (_bfd_xcoff_bfd_relax_section): Define.
1042 (_bfd_xcoff_bfd_link_split_section): Define.
1043 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
1045 * coffcode.h (coff_compute_section_file_positions): If AIX,
1046 increment sofar by SMALL_AOUTSZ if not executable.
1047 (coff_write_object_contents): If AIX, always output an a.out
1048 header; if not executable, header size of SMALL_AOUTSZ.
1049 * hash.c (struct bfd_strtab_hash): Add xcoff field.
1050 (_bfd_stringtab_init): Initialize xcoff field.
1051 (_bfd_xcoff_stringtab_init): New function.
1052 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
1053 (_bfd_stringtab_emit): In XCOFF mode, write out length.
1054 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
1055 * libbfd.h: Rebuild.
1056 * Makefile.in: Rebuild dependencies.
1057 (BFD32_BACKENDS): Add xcofflink.o.
1058 (CFILES): Add xcofflink.c.
1060 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
1061 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
1066 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
1070 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
1071 * config.in: Regenerated.
1073 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
1074 (_bfd_chunksize): New variable.
1075 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
1076 for obstack chunk size.
1077 * configure.in: Check for getpagesize.
1078 * configure: Regenerated.
1082 * trad-core.c (rawptr): Make it a local variable of
1083 ptrace_unix_core_file_p.
1087 * coff-arm.c (in_reloc_p): New.
1088 * coff-i386.c (in_reloc_p): New.
1089 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
1090 (coff_write_object_contents): Only set has_reloc_section
1092 * cofflink.c (_bfd_coff_generic_relocate_section): Call
1093 in_reloc_p to decide if reloc should be emitted.
1094 * libcoff.h (pe_data_type.in_reloc_p): New.
1095 * peicode.h (pe_mkobject): Initialize in_reloc_p.
1099 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
1100 (_bfd_coff_read_internal_relocs): Likewise.
1101 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
1102 (_bfd_coff_read_internal_relocs): Likewise.
1104 * elflink.h (elf_link_add_object_symbols): Correct conditions
1105 under which type and size change warnings are issued.
1109 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
1110 a symbol which is not in a real section.
1111 (coff_write_native_symbol): Corresponding change.
1113 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
1114 coff_link_hash_newfunc and make non-static.
1115 (_bfd_coff_link_hash_table_init): New function, broken out of
1116 _bfd_coff_link_hash_table_create.
1117 (_bfd_coff_link_hash_table_create): Use it.
1118 (process_embedded_commands): Make static.
1119 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
1120 (_bfd_coff_link_hash_table_init): Declare.
1121 * libcoff.h: Rebuild.
1123 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
1124 field in XCOFF tdata.
1125 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
1126 U802ROMAGIC, for clarity. Try to set arch and machine correctly
1127 based on cputype stored in a.out header, or in n_type of initial
1129 (coff_write_object_contents): Set cputype correctly in a.out
1131 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
1133 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
1134 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
1136 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
1137 * libcoff.h: Rebuild.
1139 * cpu-rs6000.c (rs6000_compatible): New static function.
1140 (bfd_rs6000_arch): Use it.
1141 * cpu-powerpc.c (powerpc_compatible): New static function.
1142 (arch_info_struct): Define various flavours of PowerPC.
1143 (bfd_powerpc_arch): Use powerpc_compatible. Point at
1148 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
1152 * elflink.h (elf_link_add_object_symbols): Don't warn about
1153 changing the size or type if the old definition was weak.
1157 * coffcode.h (combined_entry_type): Add fix_line field.
1158 (coff_slurp_line_table): Warn if we try to set the lineno field of
1160 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
1161 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
1162 * coffgen.c (coff_mangle_symbols): Handle fix_line.
1163 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
1165 (coff_print_symbol): Print fix_value symbols in a useful fashion.
1166 * libcoff.h: Rebuild.
1168 * libcoff-in.h (struct xcoff_tdata): Define.
1169 (xcoff_data): Define.
1170 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
1171 * bfd-in2.h, libcoff.h: Rebuild.
1172 * coff-rs6000.c (xcoff_mkobject): New static function.
1173 (coff_mkobject): Define.
1174 (xcoff_copy_private_bfd_data): New static function.
1175 (coff_bfd_copy_private_bfd_data): Define.
1176 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
1178 (rs6000coff_vec): Add DYNAMIC to object_flags.
1179 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
1180 .loader sections specially.
1181 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
1182 section alignment from the XCOFF tdata information.
1183 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
1184 F_SHROBJ, and copy the extra a.out header information into the
1185 XCOFF tdata structure.
1186 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
1187 F_DYNLOAD and the extra a.out header information.
1188 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
1189 C_HIDEXT symbol with attached csect information.
1190 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
1191 in the o_maxdata field.
1192 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
1193 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
1194 end if BSF_NOT_AT_END is set.
1196 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
1197 _bfd_read_ar_hdr_fn.
1198 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
1199 * bfd-in2.h, libbfd.h: Rebuild.
1200 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
1202 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
1203 (bfd_slurp_bsd_armap_f2): Likewise.
1204 (_bfd_slurp_extended_name_table): Likewise.
1210 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
1211 when the symbol table is empty.
1213 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
1214 space for section symbols, since we don't output them either.
1215 (elf_m68k_adjust_dynindx): Removed.
1217 * ptrace-core.c (rawptr): Make it a local variable of
1218 ptrace_unix_core_file_p.
1222 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
1225 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
1226 Mac object file formats.
1230 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
1231 auxent if there isn't one.
1232 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
1233 rather than FILNMLEN as the maximum name length.
1235 * coffcode.h (bfd_coff_backend_data): Add new field
1236 _bfd_coff_print_aux.
1237 (bfd_coff_print_aux): New static function.
1238 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
1239 scnlen field of an XTY_LD csect aux entry.
1240 (coff_print_aux): New static function.
1241 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
1242 in coff_pointerize_aux_hook.
1243 (bfd_coff_std_swap_table): Initialize new field.
1244 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
1245 * libcoff.h: Rebuild.
1246 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1247 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1249 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
1250 if there are symbols, for native AIX ld compatibility.
1252 * coffcode.h (bfd_coff_backend_data): Add new field
1253 _bfd_coff_pointerize_aux_hook.
1254 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
1255 or I960, and as 0 otherwise.
1256 (bfd_coff_std_swap_table): Initialize new field.
1257 * libcoff.h: Rebuild.
1258 * coffgen.c (coff_pointerize_aux): Change parameters to take
1259 symbol pointer instead of type and class, and to take aux index.
1260 Call _bfd_coff_pointerize_aux_hook if it is defined.
1261 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
1262 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
1263 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1265 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
1266 read-only/host-only support.
1268 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
1270 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
1273 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
1274 BFD_JUMP_TABLE_ARCHIVE accordingly.
1275 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
1276 (_bfd_compute_and_write_armap): Declare.
1277 (_bfd_generic_read_ar_hdr): Declare.
1278 (_bfd_read_ar_hdr): Define.
1279 (_bfd_noarchive_read_ar_hdr): Define.
1280 (_bfd_archive_bsd_read_ar_hdr): Define.
1281 (_bfd_archive_coff_read_ar_hdr): Define.
1282 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
1283 _bfd_read_ar_hdr instead.
1284 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
1285 (_bfd_compute_and_write_armap): Rename from
1286 compute_and_write_armap. Make non-static. Change all callers.
1287 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
1288 than _bfd_snarf_ar_hdr.
1289 * aout-target.h (MY_read_ar_hdr): Define if not defined.
1290 * ieee.c (ieee_read_ar_hdr): Define.
1291 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
1292 * oasys.c (oasys_read_ar_hdr): Define.
1293 * som.c (som_read_ar_hdr): Define.
1294 * bfd-in2.h, libbfd.h: Rebuild.
1298 * peicode.c (coff_swap_filehdr_in): If symptr is
1299 zero, there aren't any symbols, even if nsyms is set.
1303 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
1305 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
1306 sections, and set styp correctly for them: .got, .hash, .dynamic,
1307 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
1308 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
1310 (ecoff_sort_hdrs): New static function.
1311 (ecoff_compute_section_file_positions): Return boolean, not void.
1312 Sort the sections by VMA before looking through them. Put the
1313 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
1314 section on an appropriate boundary within the page.
1315 (ecoff_compute_reloc_file_positions): Check return value of
1316 ecoff_compute_section_file_positions.
1317 (_bfd_ecoff_set_section_contents): Likewise.
1318 (_bfd_ecoff_write_object_contents): Check for various Alpha
1319 section types when incrementing text_size and data_size. Call
1320 adjust_headers backend function if it exists.
1321 * coff-alpha.c (alpha_adjust_headers): New static function.
1322 (alpha_ecoff_backend_data): Initialize adjust_headers field.
1323 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1325 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
1329 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
1330 of ALTERNATE_AIX_CORE_FORMAT.
1331 * configure.in (aix4): No longer need CORE_FLAGS.
1332 * configure: Updated.
1336 NS32k changes from Ian Dall:
1337 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
1339 (aout_link_input_section_std, aout_link_input_section_ext,
1340 aout_link_reloc_link_order): Call them instead of _bfd_*
1342 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
1344 (backend_data): Use it instead of hardcoded zero.
1346 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
1347 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
1349 * ns32knetbsd.c: Include bfd.h.
1350 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
1351 (MY_bfd_reloc_type_lookup): Declare function too.
1352 * pc532-mach.c (set_sizes): Don't declare.
1353 (MY_text_includes_header, MY_exec_header_not_counted): Define.
1354 (backend_data, MY_backend_data): Don't define.
1356 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
1357 ns32k-*-lites* like ns32k-*-netbsd*.
1359 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
1364 * coffcode.h (coff_write_object_contents): Restore setting
1365 f_timdat to 0, deleted on August 22.
1369 * coffcode.h (coff_bfd_copy_private_symbol_data,
1370 coff_bfd_copy_private_section_data,
1371 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
1372 * peicode.h (coff_bfd_copy_private_bfd_data): New
1373 (pe_bfd_copy_private_bfd_data): New.
1374 (coff_swap_scnhdr_in): Swap bss size into the right place.
1375 (pe_print_private_bfd_data): Add some newlines.
1379 * som.c (setup_sections): Don't die if a space has no subspaces.
1383 * elflink.h (elf_link_add_object_symbols): Don't let a weak
1384 dynamic symbol override a common symbol. Don't change the size or
1385 type if they have been set and the new symbol is not a definition.
1386 Warn if the size or type changes.
1390 * som.c (som_begin_writing): Don't write the symbol table or
1392 (som_finish_writing): Write them here. Place them after the
1393 subspace data, but before the relocs.
1397 * sunos.c (sunos_add_one_symbol): Just pass false, not
1398 info->shared_library, to sunos_create_dynamic_sections.
1399 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
1401 (sunos_check_dynamic_reloc): Remove .text section assertion.
1405 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
1406 * configure, configure.in: Add pmac_xcoff_vec case.
1407 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
1408 * coff-pmac.c: New file, PowerMac XCOFF support.
1409 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
1410 * targets.c (pmac_xcoff_vec): Declare.
1412 * mpw-config.in: Various changes to be compatible with the
1413 autoconf-based configury.
1414 * mpw-make.sed: New file, sed commands to translate Unix
1415 makefile into MPW syntax.
1416 * mpw-make.in: Remove.
1417 * hosts/mpw.h: Remove.
1418 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
1419 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
1423 * binary.c (binary_get_symtab): Return an empty string on error.
1424 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
1426 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
1428 * coff-ppc.c: Reformatted according to gnu conventions
1429 Removed irrelevant "if 0" code
1433 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
1434 symbols rather than as indirect symbols.
1435 (MY(slurp_symbol_table)): Don't do anything special about
1438 * coffcode.h (coff_new_section_hook): Make sure that the alignment
1439 of .ctors and .dtors sections is no larger than 2.
1441 * sunos.c (sunos_add_one_symbol): Don't change
1442 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
1444 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
1445 dynamic symbols when creating a shared library.
1446 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
1448 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
1449 written even if it is not defined in a regular object.
1450 (sunos_write_dynamic_symbol): Use plt_offset for the address of
1451 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
1452 rather than the constant 22.
1453 (sunos_check_dynamic_reloc): Handle creating a shared library.
1454 (sunos_finish_dynamic_link): Set the first entry in the GOT to
1455 zero when creating a shared library.
1456 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
1457 write it out at the start of the symbol table.
1459 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
1463 * config.bfd: Add arm-*-coff.
1464 * configure.in, configure: Add armcoff_{little,big}_vec.
1465 * targets.c (armcoff_{little,big}_vec): Declare.
1466 (bfd_target_vector): Add armcoff_{little,big}_vec.
1467 * coff-arm.c (armcoff_{little,big}_vec): Always define.
1471 * targets.c (bfd_find_target): Remove debugging code.
1473 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
1475 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
1477 * Makefile.in: added *-ppc files
1478 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
1479 allow pe based .o's to be shared with other tools on ppc/NT
1480 * config.bfd: added powerpc[le]-[pe|winnt] config support
1481 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
1482 * peicode.h: Added more section flags for PE on ppc
1483 Added coff_swap_filehdr_out to allow peicode.h to be
1484 used for non-image PE files on ppc.
1485 Check for image, or not, before copying pe_opthdr
1486 * targets.c: Added new bfd's
1487 * targets.c: Removed two inactive bfds that shouldn't have made it this
1492 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
1493 explicit values to initialize all relocs. Change all users.
1494 (ppc_elf_brtaken_inner): New function to handle branch predicition
1496 (ppc_elf_brtaken_reloc): Ditto.
1497 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
1498 relocs use ppc_elf_unsupported_reloc.
1499 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
1500 needs to be reported.
1501 (ppc_elf_relocate_section): Support branch prediction relocs.
1505 * bfd.c (bfd_assert): Remove \n from string passed to
1508 * coff-i386.c: (TWO_DATA_SECS): Don't define.
1509 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
1510 (bfd_coff_make_section_hook): Don't define.
1511 (coff_make_section_hook): Remove.
1512 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
1513 (styp_to_sec_flags): Likewise.
1514 (coff_write_object_contents): Likewise.
1515 (bfd_coff_std_swap_table): Don't initialize make_section_hook
1517 * libcoff.h: Rebuild.
1518 * coffgen.c (make_a_section_from_file): Just call
1519 bfd_make_section_anyway, not bfd_make_section or
1520 bfd_coff_make_section_hook.
1521 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
1522 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
1523 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
1524 make_section_hook field.
1525 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1527 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
1528 pointers into value field for warning and indirect symbols; just
1529 leave the value field alone.
1530 * linker.c (generic_link_add_symbol_list): Use next symbol for
1531 warning and indirect symbols, rather than looking in symbol value.
1532 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
1533 parameter. Change all callers. Remove support for indirect
1534 symbols; it didn't work anyhow.
1535 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
1536 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
1537 * bfd-in2.h: Rebuild.
1541 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
1542 go back to telling the tools this reloc operates on 32 bits.
1546 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
1547 rather than a direct fprintf.
1548 * archive.c (_bfd_write_archive_contents): Likewise.
1549 * coffcode.h (coff_slurp_symbol_table): Likewise.
1550 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
1551 (ppc_elf_unsupported_reloc): Likewise.
1552 (ppc_elf_relocate_section): Likewise.
1553 * i386linux.c (linux_tally_symbols): Likewise.
1554 (linux_finish_dynamic_link): Likewise.
1555 * osf-core.c (osf_core_core_file_p): Likewise.
1556 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
1557 * som.c (som_sizeof_headers): Likewise.
1558 * srec.c (srec_bad_byte): Likewise.
1559 * bfd.c (bfd_assert): Likewise. Also change file to be const.
1560 * libbfd-in.h (bfd_assert): Declare first parameter const.
1561 * libbfd.h: Rebuild.
1562 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
1563 bfd_reloc_overflow is enough.
1564 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
1565 * coff-h8500.c (rtype2howto): Likewise.
1566 * coff-z8k.c (rtype2howto): Likewise.
1567 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
1568 * elf.c (_bfd_elf_get_lineno): Likewise.
1569 (_bfd_elf_no_info_to_howto): Likewise.
1570 (_bfd_elf_no_info_to_howto_rel): Likewise.
1571 * hp300hpux.c (convert_sym_type): Likewise.
1572 (MY(swap_std_reloc_in)): Likewise.
1573 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
1575 * libaout.h (struct aoutdata): Add line_buf field.
1576 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
1577 and filename_buffer. Instead, use a malloc buffer stored in the
1578 new line_buf field. Remove length restrictions.
1580 * coffgen.c (string_size): Remove static variable.
1581 (debug_string_size, debug_string_section): Likewise.
1582 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
1583 and debug_string_size_p parameters. Use them instead of the
1584 global variables. Change all callers.
1585 (coff_write_symbol): Likewise.
1586 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
1587 (coff_write_symbols): Add local variables to replace removed
1590 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
1591 function, and line_base fields.
1592 * libcoff.h: Rebuild.
1593 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
1594 information, rather than using static variables.
1596 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
1599 * init.c (initialized): Remove static variable.
1600 (bfd_init): Don't bother setting initialized.
1601 (bfd_check_init): Remove.
1602 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
1603 * libbfd.h: Rebuild.
1607 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
1608 size for full core dumps. Copy core file header to private data.
1609 (rs6000coff_core_file_failing_command,
1610 rs6000coff_core_file_failing_signal): New functions to extract
1611 the file name and terminating signal from the core file.
1612 * coff-rs6000.c: Use them.
1616 Change arch info to be const, initialized at compile time.
1617 * archures.c: Reindent many functions. Change CONST to const.
1618 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
1619 nothing set it anyhow. Make next const.
1620 (bfd_arch_info_list): Remove.
1621 (bfd_archures_list): Rename from archures_init_table. Change from
1622 a table of function pointers to a table of bfd_arch_info_type
1623 structure addresses.
1624 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
1625 (bfd_lookup_arch): Likewise.
1626 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
1628 (bfd_default_arch_struct): Make const.
1629 (bfd_arch_init, bfd_arch_linkin): Remove.
1630 (bfd_get_arch_info): Return a const pointer.
1631 * init.c (bfd_init): Don't call bfd_arch_init.
1632 * bfd.c (struct _bfd): Make arch_info const.
1633 * bfd-in2.h: Rebuild.
1634 * libbfd.h: Rebuild.
1635 * configure.in: Put & before everything in $selarchs.
1636 * configure: Rebuild.
1637 * cpu-*.c: Change bfd_*_arch from a function which calls
1638 bfd_arch_linkin to a const structure.
1639 * ieee.c (ieee_object_p): Make arch const.
1643 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
1645 * bfd-in2.h: Regenerate.
1646 * libbfd.h: Regenerate.
1648 * elf32-ppc.c (reloc_type): Update names to match current draft.
1649 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
1650 relative. Update names to current V.4 draft.
1651 (ppc_elf_reloc_type_lookup): Add support for more relocations.
1652 (ppc_elf_relocate_section): Rename relocations to match draft.
1656 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
1657 compiled with -mrelocatable-lib to be linked with either normal
1658 modules or -mrelocatable modules.
1662 * coffcode.h (coff_write_object_contents): Clear the vstamp field
1663 in the a.out header.
1665 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
1666 a reloc against a local symbol, even if it's not a section.
1670 * targets.c (bfd_target): Remove unused align_power_min field.
1671 * bfd-in2.h: Rebuild.
1672 * All backends: Remove initialization of align_power_min.
1676 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
1680 * config.bfd (mips-dec-netbsd*): New target.
1681 * configure.host (mips-dec-netbsd*): New host.
1682 * configure.in (mips-dec-netbsd*): New native.
1683 * configure: Rebuild.
1687 Make the COFF backend linker merge common types:
1688 * cofflink.c (struct coff_debug_merge_element): Define.
1689 (struct coff_debug_merge_type): Define.
1690 (struct coff_debug_merge_hash_entry): Define.
1691 (struct coff_debug_merge_hash_table): Define.
1692 (coff_debug_merge_hash_table_init): Define.
1693 (coff_debug_merge_hash_table_free): Define.
1694 (coff_debug_merge_hash_lookup): Define.
1695 (struct coff_final_link_info): Add debug_merge field.
1696 (coff_debug_merge_hash_newfunc): New static function.
1697 (_bfd_coff_final_link): Allocate and free debug_merge table.
1698 (coff_link_input_bfd): Merge identical enum, struct and union
1703 Convert i960 COFF to use COFF backend linker.
1704 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
1705 structure to store the symbol being used.
1706 (coff_i960_start_final_link): New static function.
1707 (coff_i960_relocate_section): New static function.
1708 (coff_i960_adjust_symndx): New static function.
1709 (coff_start_final_link): Define.
1710 (coff_relocate_section): Define.
1711 (coff_adjust_symndx): Define.
1712 * coffcode.h (bfd_coff_backend_data): Add new callback function
1713 _bfd_coff_start_final_link.
1714 (bfd_coff_start_final_link): Define.
1715 (coff_start_final_link): Define if not defined.
1716 (bfd_coff_std_swap_table): Add coff_start_final_link.
1717 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
1719 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
1720 function callback is not NULL.
1721 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
1722 (_bfd_coff_internal_syment_name): Declare.
1723 * libcoff.h: Rebuild.
1724 * configure.in (icoff_big_vec): Add cofflink.o.
1725 (icoff_little_vec): Likewise.
1726 * configure: Rebuild.
1730 * Makefile.in (clean-info): Remove extraneous tab from line
1735 * cofflink.c (coff_link_input_bfd): Fail if a section with no
1736 contents has relocs.
1740 * coffcode.h (coff_compute_section_file_positions): Keep the
1742 (coff_write_object_contents): Remember if it's a relocatable
1744 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
1745 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
1746 if relocatable file. Swap out saved raw size.
1750 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
1751 (maintainer-clean): Rename from realclean, passing
1752 maintainer-clean down to subdirectories, but leave realclean as a
1755 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
1758 * dep-in.sed: Remove config.h from generated dependencies.
1760 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
1761 broken out of sunos_canonicalize_dynamic_symtab.
1762 (sunos_canonicalize_dynamic_symtab): Call new function
1763 sunos_slurp_dynamic_symtab.
1764 (sunos_add_dynamic_symbols): Add three new parameters. Return the
1765 dynamic symbol table to the caller.
1766 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
1767 callback to override the symbols being read.
1768 * libaout.h (struct aout_backend_data): Add three new parameters
1769 to add_dynamic_symbols callback.
1771 Extensive minor changes to avoid various gcc warnings. Also:
1772 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
1773 * archures.c (bfd_arch_info_type): Change mach field from long to
1775 (bfd_lookup_arch): Change machine parameter from long to unsigned
1780 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
1781 a symbol with a non-zero plt_offset.
1785 * elfcode.h (align_file_position): Remove; not used.
1787 * configure.in: Only check for <sys/procfs.h> on a native system,
1788 and make sure it defines prstatus_t.
1789 * configure: Rebuild.
1793 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
1795 * config.in: Rename from config.h.in.
1796 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
1797 Check for config.h:config.in when creating stamp-h.
1798 * configure: Rebuild.
1799 * Makefile.in (stamp-h): Depend upon config.in rather than
1800 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
1801 calling config.status.
1803 * Makefile.in (do_distclean): Remove config.h and stamp-h.
1804 (Makefile): Just rebuild Makefile.
1805 (config.h, stamp-h): New targets.
1806 * configure.in: Create stamp-h when rebuilding config.h.
1807 * configure: Rebuild.
1811 * configure.in: Call AC_CONFIG_HEADER. Substitute
1812 HOST_64BIT_LONG. Check that various header files exist. Check
1813 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
1814 and/or free need to be declared. Don't make a link to sysdep.h.
1815 Define TRAD_HEADER for various hosts.
1816 * configure: Rebuild.
1817 * configure.host: Don't set my_host. Add definitions taken from
1818 host header files for various entries. Remove entries which now
1820 * acconfig.h: New file.
1821 * config.h.in: New file, built by autoheader.
1822 * sysdep.h: New file.
1823 * Makefile.in (do_distclean): Don't remove sysdep.h.
1825 (LOCAL_H_DEPS): New variable.
1826 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
1828 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
1829 ($(OPTIONAL_BACKENDS)): Likewise.
1830 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
1831 looking through sysdep.h.
1832 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
1833 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
1834 (fprintf_vma, sprintf_vma): Likewise.
1835 (int64_type, uint64_type): Don't define.
1836 * bfd-in2.h: Rebuild.
1837 * archures.c, bfd.c, srec.c: Include <ctype.h>.
1838 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
1839 * lynx-core.c: Include stuff from old hosts/lynx.h.
1840 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
1841 rather than NO_FCNTL.
1842 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
1843 rather than NATIVE_HPPAHPUX_COMPILER.
1844 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
1846 * hosts/*.h: Remove all header files which merely include,
1847 declare, and define things. Leave header files which define
1848 information needed by trad-core.c.
1850 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
1851 (BFD_CC_FOR_BUILD): Define.
1852 * configure.in: Use BFD_CC_FOR_BUILD.
1853 * configure: Rebuild.
1857 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
1858 * configure: Rebuild.
1860 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
1865 * config.bfd: i386pe_ve -> i386pe_vec.
1869 * configure.host: Incorporate host Makefile fragments by setting
1871 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
1872 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
1873 value based on whether the code is being compiled by a cross
1874 compiler. Don't substitute host_makefile_frag or frags.
1875 * aclocal.m4: New file to define local AC_PROG_CC.
1876 * configure: Rebuild.
1877 * Makefile.in (INSTALL): Set to @INSTALL@.
1878 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
1879 (INSTALL_DATA): Set to @INSTALL_DATA@.
1881 (CC): Define as @CC@.
1882 (CFLAGS): Set to @CFLAGS@.
1883 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
1884 (@host_makefile_frag@): Remove.
1885 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
1886 after other options.
1887 (config.status): Remove dependency upon @frags@.
1888 * config/*.mh, config/README: Remove.
1890 * config.bfd: Rewrite to incorporate the contents of the Makefile
1891 fragments by setting shell variables, rather than merely returning
1892 the name of a Makefile fragment.
1893 * configure.in: Use shell variables set by config.bfd rather than
1894 looking at the target Makefile fragment files. Don't substitute
1895 target_makefile_frag. Do substitute TDEFINES.
1896 * configure: Rebuild.
1897 * Makefile.in (@target_makefile_frag@): Remove.
1898 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
1899 * config/*.mt: Remove.
1903 * configure.in: Put changequote lines around "i[345]86" patterns
1904 section of core file support.
1908 * som.c (som_bfd_print_private_bfd_data): Define to use the
1913 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
1914 entry, text_start and data_start.
1918 * Makefile.in (OFILES): Remove $(TDEPFILES).
1919 * config/apollo.mt (TDEPFILES): Remove.
1920 * config/README: Update.
1922 * configure.in: For a native configuration, set COREFILE and
1923 COREFLAG based on the canonical host name.
1924 * configure: Rebuild.
1925 * Makefile.in: Rebuild dependencies.
1926 (ALL_CFLAGS): Add @COREFLAG@.
1927 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
1928 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
1929 support routines. Check LYNX_CORE rather than HOST_LYNX.
1930 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
1931 * i386lynx.c: Likewise.
1932 * m68klynx.c: Likewise.
1933 * sparclynx.c: Likewise.
1934 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
1935 * *-core.c: Comment changes.
1936 * config/decstation.mh (HDEPFILES): Remove.
1937 (HDEFINES): Remove -DTRAD_CORE.
1938 * config/irix3.mh (RANLIB): Remove.
1939 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
1940 (HDEFINES): Remove -DIRIX_CORE.
1941 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
1942 (HDEFINES): Remove -DTRAD_CORE.
1943 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
1944 * config/ultra3.mh (RANLIB): Remove.
1945 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
1946 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
1947 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
1948 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
1949 * config/hppahpux.mh, config/hppaosf.mh: Remove.
1950 * config/i386aix.mh, config/i386bsd.mh: Remove.
1951 * config/i386linux.mh, config/i386mach3.mh: Remove.
1952 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
1953 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
1954 * config/mipsmach3.mh, config/news-mips.mh: Remove.
1955 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
1956 * config/rs600.mh, config/rs6000lynx.mh: Remove.
1957 * config/solaris2.mh, config/stratus.mh: Remove.
1958 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
1959 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
1963 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
1964 DT_FINI entry if the appropriate symbol is not in the hash table.
1966 * libelf.h (struct elf_backend_data): Add create_program_headers
1967 and want_hdr_in_seg fields.
1968 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
1970 (elf_backend_create_program_headers): Likewise.
1971 (elfNN_bed): Initialize create_program_headers and
1973 * elf.c (get_program_header_size): Call create_program_headers
1975 (map_program_segments): Check want_hdr_in_seg backend field. Call
1976 create_program_headers backend routine.
1978 * elf.c (assign_file_positions_except_relocs): Align non allocated
1979 sections when creating an executable.
1981 * elfcode.h (elf_swap_phdr_in): Make non static.
1982 (elf_swap_phdr_out): Make non static.
1983 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
1984 (bfd_elf32_swap_phdr_out): Declare.
1985 (bfd_elf64_swap_phdr_in): Declare.
1986 (bfd_elf64_swap_phdr_out): Declare.
1988 * ecofflink.c (ecoff_collect_shuffle): New static function.
1989 (_bfd_ecoff_get_accumulated_pdr): New function.
1990 (_bfd_ecoff_get_accumulated_sym): New function.
1991 (_bfd_ecoff_get_accumulated_ss): New function.
1992 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
1993 (_bfd_ecoff_get_accumulated_sym): Declare.
1994 (_bfd_ecoff_get_accumulated_ss): Declare.
1995 * libbfd.h: Rebuild.
1999 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
2001 * elflink.h (elf_link_add_object_symbols): Handle indirect and
2002 warning symbols. If any section is named .gnu.warning.XXX, treat
2003 the contents as a warning to be issued if the symbol XXX is
2005 (elf_link_output_extsym): For an indirect or warning symbol, just
2006 output the symbol it points to.
2008 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
2009 if bfd_hash_allocate fails, since it will already be set.
2010 (generic_link_hash_newfunc): Likewise.
2011 (archive_hash_newfunc): Likewise.
2012 (hash_entry_bfd): New static function.
2013 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
2014 callback. Allocate a new warning using the hash table newfunc.
2015 Use bfd_hash_replace to update the entry in the hash table, rather
2016 than assuming we can copy the fields with structure assignment.
2018 * hash.c (bfd_hash_replace): New function.
2019 * bfd-in.h (bfd_hash_replace): Declare.
2020 * bfd-in2.h: Rebuild.
2024 * config.bfd: Add mips*vr4300-*-elf* target.
2025 * config/mipsbvr4300.mt: Added.
2027 See file ChangeLog.2
2034 version-control: never