1 Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
3 * syms.c (coff_section_type): Make arg const.
4 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
5 to make_bfd_asection().
6 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
7 * elfcode.h (bfd_section_from_phdr): Remove prototype.
8 (_bfd_elf_stringtab_init): Remove prototype.
10 * netbsd-core.c (swap_abort): Add prototype.
11 * aix386-core.c (swap_abort): Ditto & make static
12 * hpux-core.c (swap_abort): Ditto & make static.
13 * irix-core.c (swap_abort): Ditto & make static.
14 * ptrace-core.c (swap_abort): Ditto & make static.
15 * trad-core.c (swap_abort): Ditto & make static.
16 * coffswap.h (coff_swap_reloc_in): Ditto.
17 (coff_swap_reloc_out): Ditto.
18 (coff_swap_filehdr_in): Ditto.
19 (coff_swap_filehdr_out): Ditto.
20 (coff_swap_sym_in): Ditto.
21 (coff_swap_sym_out): Ditto.
22 (coff_swap_aux_in): Ditto.
23 (coff_swap_aux_out): Ditto.
24 (coff_swap_lineno_in): Ditto.
25 (coff_swap_lineno_out): Ditto.
26 (coff_swap_aouthdr_in): Ditto.
27 (coff_swap_aouthdr_out): Ditto.
28 (coff_swap_scnhdr_in): Ditto.
29 (coff_swap_scnhdr_out): Ditto.
30 * ihex.c (ihex_sizeof_headers): Ditto.
31 * tekhex.c (getsym): Ditto.
32 (find_chunk): Ditto & make static.
36 (tekhex_get_symtab): Ditto & make static.
37 (tekhex_get_symtab_upper_bound): Ditto & make static.
38 (tekhex_mkobject): Ditto.
39 (tekhex_object_p): Ditto.
40 (move_section_contents): Ditto.
41 (tekhex_get_section_contents): Ditto.
42 (tekhex_set_arch_mach): Ditto & make static.
43 (tekhex_set_section_contents): Ditto.
47 (tekhex_write_object_contents): Ditto.
48 (tekhex_sizeof_headers): Ditto.
49 (tekhex_make_empty_symbol): Ditto.
50 (tekhex_get_symbol_info): Ditto.
51 (tekhex_print_symbol): Ditto.
52 * irix-core.c (make_bfd_asection): Ditto.
53 (irix_core_core_file_p): Ditto.
54 (irix_core_core_file_failing_command): Ditto.
55 (irix_core_core_file_failing_signal): Ditto.
56 (irix_core_core_file_matches_executable_p): Ditto.
57 (irix_core_make_empty_symbol): Ditto.
58 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
59 * srec.c (srec_new_symbol): Ditto.
60 (srec_get_section_contents): Ditto.
61 (srec_set_arch_mach): Ditto.
62 (srec_set_section_contents): Ditto.
63 (internal_srec_write_object_contents): Ditto.
64 (srec_write_object_contents): Ditto.
65 (symbolsrec_write_object_contents): Ditto.
66 (srec_sizeof_headers): Ditto.
67 (srec_make_empty_symbol): Ditto.
68 (srec_get_symtab_upper_bound): Ditto.
69 (srec_get_symtab): Ditto.
70 (srec_print_symbol): Ditto and make static.
71 * elf.c (elf_read): Ditto
72 (assign_section_numbers): Ditto.
73 (elf_fake_sections): Ditto.
74 (sym_is_global): Ditto.
75 (elf_map_symbols): Ditto.
76 (get_program_header_size): Ditto.
77 * coffgen.c (make_a_section_from_file): Ditto.
78 (coff_real_object_p): Ditto.
79 (fixup_symbol_value): Ditto.
80 (build_debug_section): Ditto.
82 * syms.c (coff_section_type): Ditto.
85 Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
87 * bfd-in2.h: Rebuilt after m32r changes.
90 Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
93 * config.bfd,configure.in,configure: Add m32r support.
94 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
96 * config.bfd: Keep target list alphabetically sorted.
99 Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
101 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
102 to add in the constant part found in the instruction itself.
103 (case R_V850_HI16_S): Likewise.
107 Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
109 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
110 and R_D10V_18 to be 1 (word).
113 Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
115 * stabs.c (_bfd_link_section_stabs): If the output_section field
116 of either section is bfd_abs_section, then the linker is
117 discarding the section and we should not optimize it.
119 Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
121 * Makefile.in (aout-sparcle.o): New target.
122 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
123 * config.bfd (sparclet-*-aout*): Add case.
124 * configure.in (sparcle_aout_vec): Add case.
125 * configure: Regenerated.
126 * targets.c (sparcle_aout_vec): Declare.
127 (bfd_target_vector): Add sparcle_aout_vec.
128 * aout-sparcle.c: New file.
131 Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
133 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
134 low order sign bit propogation for R_V850_HI16_S.
136 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
137 handling V850 specific relocs.
138 (elf_v850_howto_table): Use the new function for some
139 relocations. Twiddle masks & shifts for some relocs.
140 Set partial_inplace where needed.
143 Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
145 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
146 default architecture to a machine number of 0.
147 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
149 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
150 the output BFD is the default, set it from the first input BFD.
153 Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
155 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
156 insert at bitpos zero. The HI16 relocs are shifted right
157 by 16 bits. Fix src_mask for all relocs.
158 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
160 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
164 Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
166 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
167 Rewrite to use BFD file read routines and to avoid using a fixed
168 length for the file name.
171 Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
173 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
174 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
175 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
178 Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
180 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
181 (elf_v850_howto_table): Add info for HI16_S reloc.
182 (v850_reloc_map): Add HI_16_S reloc.
183 * reloc.c: Define BFD_RELOC_V850_* relocs.
186 Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
189 * elf32-sh.c: New file.
190 * elf.c (prep_headers): Handle bfd_arch_sh.
191 * elfcode.h (write_relocs): Handle absolute symbol.
192 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
193 (_bfd_elf64_link_read_relocs): Declare.
194 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
195 elf_link_read_relocs. Make globally visible. Change all
197 (elf_link_input_bfd): Get external symbols from cache in
198 symtab_hdr->contents. Get contents from cache in
200 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
202 * reloc.c: Define BFD_RELOC_SH_* relocs.
203 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
204 * coff-sh.c (sh_insns_conflict): Fix a return value.
205 (_bfd_sh_align_load_span): New globally visible function, broken
206 out of sh_align_load.
207 (sh_align_load): Call _bfd_sh_align_load_span.
208 (sh_swap_insns): Change relocs parameter to PTR.
209 * bfd-in2.h, libbfd.h: Rebuild.
210 * targets.c (bfd_elf32_sh_vec): Declare.
211 (bfd_elf32_shl_vec): Declare.
212 * config.bfd (sh-*-elf*): New target.
213 * configure.in (bfd_elf32_sh_vec): New target vector.
214 (bfd_elf32_shl_vec): New target vector.
215 * configure: Rebuild.
216 * Makefile.in: Rebuild dependencies.
217 (BFD32_BACKENDS): Add elf32-sh.o.
218 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
220 * elf.c (map_sections_to_segments): Check that LMA does not skip a
221 page before checking D_PAGED.
223 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
224 (ihex_write_object_contents): Remove extbase; always use segbase
227 Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
229 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
230 * configure.host (i[345]86-*-*): Ditto.
231 * config.bfd (i[345]86-*-*): Ditto.
232 * configure: Regenerate.
234 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
237 Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
239 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
240 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
241 * som.c (hppa_som_gen_reloc_type): Add new argument. If
242 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
243 will have an ST_CODE type, change the symbol's type to ST_DATA.
244 * som.c (hppa_som_gen_reloc_type): Update prototype.
246 Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
248 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
249 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
250 (mips_elf_size_dynamic_sections): Don't require .got to exist.
251 (mips_elf_finish_dynamic_sections): Likewise.
253 Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
255 * configure.host (HLDENV): New variable to set. Set it for
256 *-*-sysv4*, since those linkers may not support -R but they always
259 * libieee.h (NSECTIONS): Don't define.
260 (ieee_data_struct): Change section_table to asection **. Add
262 * ieee.c (get_section_entry): If the table isn't big enough, make
264 (ieee_slurp_sections): Remove assertion about number of sections.
265 (ieee_object_p): Adjust initialization of ieee to match changes to
268 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
269 symbols merely because we are generating a shared library.
270 (xcoff_build_ldsyms): Don't set up global linkage code for an
271 undefined symbol merely because we are generating a shared
275 Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
277 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
278 (BFD32_BACKENDS) Add elf32-v850.o.
279 * archures.c: Add bfd_v850_arch.
280 * bfd-in2.h: Add bfd_v850_arch.
281 * config.bfd (v850-*-*): New target.
282 * configure: (bfd_elf32_v850_vec) New vector.
283 * configure.in: (bfd_elf32_v850_vec) New vector.
284 * cpu-v850.c: New file.
285 * elf.c (prep_headers): Added case bfd_arch_v850.
286 * elf32-v850.c: New file.
287 * targets.c (bfd_elf32_v850_vec): New vector.
290 Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
292 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
293 a function code symbol for an XMC_XO symbol.
295 Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
297 * mpw-config.in: Update editing of autoconf vars to reflect
298 Jul 18 configure.in change.
299 * mpw-make.sed: Update editing of include pathnames to be
300 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
302 Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
304 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
305 which to offset to get the .plt entry address is ".plt".
307 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
309 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
310 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
311 Added, for internal use by the ARM gas.
315 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
317 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
318 in section dynidx start.
320 Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
322 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
323 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
324 optimization for g++.
326 Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
328 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
329 the -mrelocatable-lib bit set and the other doesn't, clear the
330 -mrelocatable-lib bit in the header.
332 Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
334 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
335 symbol against a STT_FUNC symbol in a shared library.
337 Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
339 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
340 symbol is found, automatically define the corresponding function
343 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
344 if sym.n_numaux is not zero.
345 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
346 entry to disagree about the number of aux entries if the symbol
349 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
350 section if it might be needed, not just if info->shared.
351 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
352 the start of .rel.dyn if we are going to use it.
353 (mips_elf_finish_dynamic_sections): Only clear the first element
354 of .rel.dyn if the size is greater than zero.
356 Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
358 * xcofflink.c (xcoff_link_input_bfd): If we already called the
359 undefined_symbol callback for a symbol, then don't issue any more
360 warnings about loader relocs.
361 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
362 after calling the undefined_symbol callback.
364 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
365 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
366 as the AIX linker seems to do.
368 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
370 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
371 (evax_initialize): Remove evax_reloc_table.
372 (evax_close_and_cleanup): Ditto.
374 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
376 (evax_bfd_reloc_type_lookup): Ditto.
377 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
378 cooked_size == raw_size.
379 * evax-emh.c (_bfd_evax_register_filename): Remove.
380 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
381 * evax-misc.c (add_new_contents): Malloc section at full size.
382 (_bfd_save_evax_section): Memcpy section contents directly.
383 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
384 (evax_reloc_table): Remove.
386 * hosts/alphavms.h (O_ACCMODE): Define if needed.
388 * makefile.vms: Add better support for DEC C compilation
389 Add evax.h dependencies
391 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
392 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
393 (BFD_RELOC_ALPHA_BASEREG): Remove.
394 * bfd-in2.h, libbfd.h: Rebuild.
396 Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
398 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
399 getgid if _WIN32 is defined.
400 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
402 Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
404 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
405 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
407 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
410 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
412 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
414 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
415 (NEED_DECLARATION_REALLOC): New macro.
416 * configure, config.in: Rebuild.
417 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
418 (realloc): Declare if NEED_DECLARATION_REALLOC.
420 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
421 <strings.h> if they exist.
423 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
425 Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
427 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
429 Based on patches from Eric Valette <valette@crf.canon.fr>:
430 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
431 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
432 (elf_howto_table): Add entries for new relocs.
433 (elf_i386_reloc_type_lookup): Handle new relocs.
434 (elf_i386_info_to_howto): Just call abort.
435 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
436 (elf_i386_relocate_section): Likewise.
439 Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
441 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
444 Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
446 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
447 only get the LMA from the phdr if they are in the same part of the
450 * elf.c (map_sections_to_segments): Rewrite tests for starting a
451 new segment to make them more comprehensible. If the relationship
452 between the LMA and the VMA changed, start a new segment. Don't
453 check dynsec when deciding whether to start a new segment for a
454 writeable section; -N will now handle this.
456 Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
458 * libhppa.h: Remove "esel" changes. Not the right approach.
459 * som.c: Corresponding changes.
460 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
461 which don't have a SOM symbol type associated with them.
462 Reverses a 1994 change.
464 Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
466 Make ld -N more reasonable for ELF:
467 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
468 phdr_in_section to false, and always use a single load segment.
469 (elf_sort_sections): Sort sections by LMA after VMA.
470 (assign_file_positions_for_segments): If D_PAGED is not set, don't
471 align to maxpagesize.
472 (assign_file_positions_except_relocs): Likewise.
473 * elfcode.h (elf_object_p): If a section is loaded but not page
474 aligned, clear D_PAGED.
476 Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
478 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
479 Added, for internal use by the ARM gas.
483 Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
485 * libhppa.h (R_HPPA_ESEL): New field selector.
487 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
488 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
489 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
491 Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
493 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
494 archive search before looking for stripped dynamic objects.
496 Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
498 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
499 symbol a warning rather than an error.
501 Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
503 * elf.c (assign_file_positions_for_segments): Track the virtual
504 memory position separately from the file position, and use it to
505 compute the alignment adjustment.
508 Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
510 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
511 and fixed mask on R_D10V_10_PCREL_L.
514 Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
516 * elf64-mips.c: Include "aout/ar.h".
517 (mips_elf64_slurp_armap): New static function.
518 (mips_elf64_write_armap): New static function.
519 (bfd_elf64_archive_*): Define.
520 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
521 Use instead of bfd_generic_archive_p.
522 (bfd_elfNN_write_archive_contents): Define if not defined. Use
523 instead of _bfd_write_archive_contents.
524 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
525 _bfd_generic_mkarchive.
526 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
527 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
529 (TARGET_LITTLE_SYM): Likewise.
530 * archive.c (bfd_slurp_armap): Check for and reject an archive map
532 * Makefile.in: Rebuild dependencies.
534 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
535 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
536 SHT_MIPS_EVENTS sections.
537 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
538 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
540 (_bfd_mips_elf_fake_sections): Likewise.
542 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
543 * ecoff.c (ecoff_compute_section_file_positions): Copy
544 rdata_in_text from backend info to tdata. Clear it if any data
545 section comes before .rdata.
546 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
547 tdata rather than backend info.
549 Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
551 * configure.in: Fix test for whether a compiler has a 64 bit
552 type. From Jim Wilson <wilson@cygnus.com>.
554 Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
556 * configure.host (mips-sgi-irix6*): New host.
558 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
559 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
560 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
562 * configure: Rebuild.
563 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
564 (BFD_HOST_64_BIT): Define conditionally.
565 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
566 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
567 (symvalue, bfd_size_type): Likewise.
568 * bfd-in2.h: Rebuild.
569 * Makefile.in (do_clean): Remove bfd-tmp.h.
570 (do_distclean): Remove bfd-in3.h.
571 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
572 (bfd-in3.h): New target.
574 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
575 Andrew Gierth <ANDREWG@microlise.co.uk>.
577 * configure.host: Set INSTALL_SHLIB.
578 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
579 * configure: Rebuild.
580 * Makefile.in (install): Use @INSTALL_SHLIB@.
582 * config.bfd (mips*-*-irix6*): New target.
583 * configure.host: Handle Irix 6 shared library like Irix 5.
585 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
586 symbol for a magic name.
587 (xcoff_link_input_bfd): Don't change the reloc symbol for an
589 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
592 Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
594 * mpw-config.in: Add ELF support to mips config, create the
595 elf32-target.h file in the object dir.
596 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
598 Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
600 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
601 Also removed most abort calls, in favor of using bfd reporting.
604 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
606 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
607 (BFD32_BACKENDS) Add elf32-d10v.o.
608 * archures.c: Add bfd_d10v_arch.
609 * bfd-in2.h: Add bfd_d10v_arch.
610 * config.bfd (d10v-*-*): New target.
611 * configure: (bfd_elf32_d10v_vec) New vector.
612 * configure.in: (bfd_elf32_d10v_vec) New vector.
613 * cpu-d10v.c: New file.
614 * elf.c (prep_headers): Added case bfd_arch_d10v.
615 * elf32-d10v.c: New file.
617 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
618 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
619 * targets.c (bfd_elf32_d10v_vec): New vector.
622 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
624 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
626 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
628 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
629 bfd_mach_i386_i8086 machine types.
631 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
633 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
636 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
638 * coffcode.h (coff_set_section_contents): A/UX does not require
639 special handling of the _LIB section.
641 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
643 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
646 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
647 array if one was allocated.
649 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
651 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
652 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
653 use_rld_obj_head and rld_value.
654 (mips_elf_link_hash_table_create): Initialize new fields.
655 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
657 (mips_elf_create_dynamic_sections): Create .rld_map section. If
658 __rld_obj_head symbol not seen, create an __rld_map symbol.
659 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
660 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
661 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
662 __rld_obj_head symbol.
663 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
665 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
667 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
669 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
670 ppc_elf_addr16_ha_reloc.
671 (ppc_elf_addr16_ha_reloc): New static function.
673 * coff-mips.c (struct mips_hi): Define.
674 (mips_refhi_list): New static variable.
675 (mips_refhi_addr, mips_refhi_addend): Remove.
676 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
677 (mips_reflo_reloc): Process mips_refhi_list.
678 (mips_relhi_list): New static variable.
679 (mips_relhi_addr, mips_relhi_addend): Remove.
680 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
681 (mips_rello_reloc): Process mips_relhi_list.
682 (mips_relocate_section): Permit an arbitrary number of REFHI or
683 RELHI relocs before the associated REFLO or RELLO reloc.
685 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
687 * aout-target.h (MY(callback)): Set reloc_count fields.
689 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
691 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
692 sections unless this is a SunOS link.
694 * VERSION: Set to 2.7.1.
696 * Released binutils 2.7.
698 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
700 * i386aout.c: Include "aout/aout64.h".
701 (i386aout_write_object_contents): New static function.
702 (MY_write_object_contents): Define.
704 * netbsd.h (MY(write_object_contents)): Make sure that
705 adjust_sizes_and_vmas is called before fiddling with the magic
708 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
710 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
712 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
714 * libbfd-in.h (itos, stoi): Don't define.
716 * i386lynx.c (KEEPIT): Define as udata.i.
717 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
718 (NAME(lynx,swap_ext_reloc_out)): Likewise.
719 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
720 flags. Don't use stoi.
722 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
724 * elf.c (map_sections_to_segments): Don't start a new segment for
725 a writable section if it's on the same page as the previous
726 segment. Reset the writable variable for a readonly section.
728 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
730 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
731 first_thunk_address, thunk_size, and import_table_size.
732 * peicode.h: Improved some diagnostics regarding edata sections.
734 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
736 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
737 (TARGET_LITTLE_SYM): Added missing D_PAGED.
739 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
741 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
742 with XCOFF_DEF_DYNAMIC set is really defined.
743 (xcoff_link_check_dynamic_ar_symbols): Likewise.
744 (xcoff_link_add_symbols): Only create special sections if using an
747 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
749 (bfd_install_relocation): Likewise.
751 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
753 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
755 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
756 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
757 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
758 (elf64_alpha_link_hash_newfunc): Initialize flags field.
759 (elf64_alpha_check_relocs): Record types of LITUSE entries that
760 are found for LITERAL relocs.
761 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
762 taken, we cannot generate a .plt entry for the symbol.
764 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
766 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
767 sysconf functions (for gprof).
768 * configure, config.in: Rebuild.
770 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
772 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
773 an archive if it has a map. If the object file has the wrong
776 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
777 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
779 (alpha_relocate_section): Likewise.
781 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
782 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
783 (coff_swap_sym_out): Use SYMESZ, not sizeof.
784 (coff_swap_aux_out): Use AUXESZ, not sizeof.
785 (coff_swap_lineno_out): Use LINESZ, not sizeof.
786 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
787 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
788 * peicode.h: Corresponding changes.
790 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
792 * elflink.h (elf_create_pointer_linker_section): Comment out code
793 dealing with making GOT pointers negative of the GOT symbol for
796 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
798 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
799 increment the .rela.plt size until after we're done creating the
801 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
802 .rela.plt offset directly rather than calculating it.
804 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
806 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
807 Use autoconf-set values.
808 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
809 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
812 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
813 * configure: Rebuilt.
815 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
817 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
818 handling code > 1k away.
820 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
822 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
823 defined, output whenever the symbol is updated.
825 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
827 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
828 section to 0 if user_set_vma is set.
829 * elflink.h (elf_bfd_final_link): Likewise.
831 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
833 Partially undo patch of Jun 20.
834 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
835 (coff_compute_section_file_positions): Likewise.
836 (coff_write_object_contents): Likewise. Re-add deleted code, but
837 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
838 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
840 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
842 * config.bfd: Add support for *-*-rtems* configurations.
844 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
846 * elf.c (prep_headers): Add bfd_arch_alpha case.
848 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
850 * elf64-alpha.c: New file.
851 * config.bfd (alpha-*-linuxecoff*): New target.
852 (alpha-*-linux*, alpha-*-elf*): New targets.
853 * configure.in (bfd_elf64_alpha_vec): New vector.
854 * configure: Rebuild.
855 * targets.c (bfd_elf64_alpha_vec): Declare.
856 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
857 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
858 * bfd-in2.h, libbfd.h: Rebuild.
859 * Makefile.in: Rebuild dependencies.
860 (BFD64_BACKENDS): Add elf64-alpha.o.
861 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
863 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
865 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
866 than relying on a right shift of 32.
868 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
870 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
871 ifdef to COFF_WITH_PE.
872 (coff_compute_section_file_positions): Likewise.
873 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
874 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
875 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
876 COFF_IMAGE_WITH_PE, always include.
878 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
880 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
882 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
883 approximate the correct answer if SIZEOF_HEADERS was not used.
885 * binary.c (binary_set_section_contents): Set section file
886 position based on LMA rather than VMA.
888 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
890 * linker.c (_bfd_generic_link_output_symbols): Don't output any
891 symbols if info->strip == strip_all.
893 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
895 * coff-h8300.c: Remove #if 0 code.
896 (compatable): Don't allow mixing/matching of different architectures.
898 * archures.c (bfd_mach_h8300s): Add.
899 * bfd-in2.h: Rebuilt.
900 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
902 (h8300_reloc16_estimate): Likewise.
903 (h8300_reloc16_extra_cases): Likewise.
904 (h8300_bfd_link_add_symbols): Likewise.
905 * coffcode.h (coff_set_arch_mach_hook): Likewise.
906 (coff_set_flags): Likewise.
907 * cpu-h8300.c (h8300_scan): Likewise.
908 Add H8/S to bfd_h8300_arch list.
910 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
912 Added support for Alpha OpenVMS:
913 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
914 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
915 * config.h-vms, makefile.vms: New files.
916 * config.bfd (alpha-*-*vms*): New target.
917 * configure.in (evax_alpha_vec): New target vector.
918 * configure: Rebuild.
919 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
920 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
921 * targets.c (bfd_target_evax_flavour): Define.
922 (evax_alpha_vec): Declare.
923 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
925 * bfd-in2.h, libbfd.h: Rebuild.
926 * Makefile.in: Rebuild dependencies.
927 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
928 evax-emh.o, and evax-misc.o.
929 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
930 evax-etir.c, evax-emh.c, and evax-misc.c.
931 (HFILES): Add evax.h.
933 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
935 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
937 (h8300_bfd_link_add_symbols): Likewise.
939 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
941 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
942 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
944 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
946 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
947 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
949 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
950 R_MIPS_32 relocs if creating a shared library.
952 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
954 * peicode.h (add_data_entry): Use pei_section_data rather than
955 _cooked_size. Corresponds to May 13 change in coffcode.h.
957 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
959 * cofflink.c (_bfd_coff_final_link): Handle long section names.
960 * coffcode.h (coff_write_object_contents): If there are long
961 section names, always set the f_symptr field, even if there are no
963 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
964 if there are no symbols.
966 * coffgen.c (make_a_section_from_file): Check return value of
967 _bfd_coff_read_string_table.
968 (coff_real_object_p): Check return value of
969 make_a_section_from_file.
970 (_bfd_coff_read_string_table): Check that there are some symbols
971 before trying to read the string table size.
973 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
975 * xcofflink.c (xcoff_link_add_symbols): When considering whether
976 to replace a symbol in a dynamic object with a symbol from another
977 dynamic object, do the replacement if the existing symbol is
980 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
981 for _ptrgl, and treat it as global linkage code.
983 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
984 filename or N_SO symbol past the offset, and use it to indicate
985 that there is no line number or function when appropriate.
987 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
989 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
990 common symbol defined by the linker. Don't export function code
991 even if export_defineds is set.
993 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
995 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
997 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
998 (h8300_symbol_address_p): New function.
999 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
1002 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
1004 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
1006 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
1007 correctly for the two variants. Allow relaxing if the target
1008 is 128 bytes away since after relaxation it'll be 126 bytes away.
1009 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
1010 "dot" and "value". Allow relaxing if the target is 128 bytes
1011 away since after relaxation it'll be 126 bytes away.
1012 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
1013 the given section until nothing changes.
1015 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
1017 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
1018 alignment hack--we can get the lnnoptr info another way without
1019 suddenly increasing the alignment requirements. Set the flags for
1021 (ecoff_compute_section_file_positions): Do so.
1023 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
1025 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
1026 to keep the HP emulator database happy.
1028 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
1029 From Kevin Buettner <kev@primenet.com>.
1031 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
1033 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
1034 name of a NULL section.
1036 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
1038 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
1039 set, always call the notice callback.
1041 * VERSION: Increment for bfdlink.h change.
1043 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
1045 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
1046 (sh_relax_delete_bytes): Correct handling of differently sized
1047 trailing alignment reloc.
1049 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
1050 * bfd-in2.h: Rebuild.
1051 * configure.in: Warn if there is no known 64 bit type.
1052 * configure: Rebuild.
1054 * Makefile.in: Rebuild dependencies.
1055 (BFD32_BACKENDS): Add ppcboot.o.
1056 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
1058 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
1059 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
1061 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
1063 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
1064 (bfd_mips_elf64_swap_reginfo_out): Move from here...
1065 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
1066 (bfd_mips_elf64_swap_reginfo_out): ...to here.
1068 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
1070 * elf64-mips.c: Improve reloc special_functions and handling of
1071 SHT_MIPS_OPTIONS section.
1072 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
1073 mips_elf_hi16_reloc and make globally visible.
1074 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
1075 make globally visible.
1076 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
1077 make globally visible.
1078 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
1079 and make globally visible.
1080 (gprel16_with_gp): Check howto->src_mask before using value in
1082 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
1083 and make globally visible.
1084 (gprel32_with_gp): Check howto->src_mask before fetching value.
1085 (bfd_mips_elf_swap_options_in): New function.
1086 (bfd_mips_elf_swap_options_out): New function.
1087 (_bfd_mips_elf_set_private_flags): Rename from
1088 mips_elf_set_private_flags and make globally visible.
1089 (_bfd_mips_elf_copy_private_bfd_data): Rename from
1090 mips_elf_copy_private_bfd_data and make globally visible.
1091 (_bfd_mips_elf_merge_private_bfd_data): Rename from
1092 mips_elf_merge_private_bfd_data and make globally visible.
1093 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
1094 for a SHT_MIPS_OPTIONS section.
1095 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
1096 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
1097 name of a SHT_MIPS_OPTIONS section.
1098 (_bfd_mips_elf_set_section_contents): New function.
1099 (mips_elf32_section_processing): Set the GP value in a
1100 SHT_MIPS_OPTIONS section.
1101 (_bfd_mips_elf_find_nearest_line): Rename from
1102 mips_elf_find_nearest_line and make globally visible.
1103 (bfd_elf32_set_section_contents): Define.
1104 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
1105 (_bfd_mips_elf_lo16_reloc): Declare.
1106 (_bfd_mips_elf_gprel16_reloc): Declare.
1107 (_bfd_mips_elf_got16_reloc): Declare.
1108 (_bfd_mips_elf_gprel32_reloc): Declare.
1109 (_bfd_mips_elf_set_private_flags): Declare.
1110 (_bfd_mips_elf_copy_private_bfd_data): Declare.
1111 (_bfd_mips_elf_merge_private_bfd_data): Declare.
1112 (_bfd_mips_elf_find_nearest_line): Declare.
1113 (_bfd_mips_elf_set_section_contents): Declare.
1115 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
1117 (elf_info_to_howto): Define.
1118 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
1120 (elf_info_to_howto): Define.
1121 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
1123 (elf_info_to_howto): Define.
1125 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
1126 R_MOV16B[12], to match change in coff/internal.h.
1128 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
1130 * elf64-mips.c: Extensive additions to provide better support for
1131 writing files and for gas.
1132 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
1133 of mips_elf_object_p.
1134 (mips_elf32_object_p): Rename from mips_elf_object_p; call
1135 _bfd_mips_elf_object_p.
1136 (_bfd_mips_elf_final_write_processing): Rename from
1137 mips_elf_final_write_processing and make globally visible.
1138 (_bfd_mips_elf_fake_sections): Rename from
1139 mips_elf_fake_sections and make globally visible.
1140 (_bfd_mips_elf_section_from_bfd_section): Rename from
1141 mips_elf_section_from_bfd_section and make globally visible.
1142 (_bfd_mips_elf_section_processing): New function, broken out of
1143 mips_elf_section_processing.
1144 (mips_elf32_section_processing): Rename from
1145 mips_elf_section_processing; call
1146 _bfd_mips_elf_section_processing.
1147 (_bfd_mips_elf_symbol_processing): Rename from
1148 mips_elf_symbol_processing and make globally visible.
1149 (_bfd_mips_elf_read_ecoff_info): Rename from
1150 mips_elf_read_ecoff_info and make globally visible.
1151 (mips_elf32_ecoff_debug_swap): Rename from
1152 mips_elf_ecoff_debug_swap.
1153 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
1154 struct symbol_cache_entry.
1155 (_bfd_elf_validate_reloc): New function, moved in from
1156 elfcode.h:validate_reloc.
1157 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
1158 to _bfd_elf_validate_reloc. Change all callers.
1159 * elf-bfd.h (bfd_section_from_shdr): Declare.
1160 (_bfd_elf_symbol_from_bfd_symbol): Declare.
1161 (_bfd_elf_validate_reloc): Declare.
1162 (_bfd_mips_elf_object_p): Declare.
1163 (_bfd_mips_elf_fake_sections): Declare.
1164 (_bfd_mips_elf_section_from_bfd_section): Declare.
1165 (_bfd_mips_elf_section_processing): Declare.
1166 (_bfd_mips_elf_symbol_processing): Declare.
1167 (_bfd_mips_elf_read_ecoff_info): Declare.
1168 (_bfd_mips_elf_final_write_processing): Declare.
1169 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
1172 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
1173 (mips_elf_final_write_processing): Likewise.
1175 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
1177 64-bit MIPS ELF ABI objdump support:
1178 * elf64-mips.c: New file.
1179 * Makefile.in: Rebuild dependencies.
1180 (BFD64_BACKENDS): Add elf64-mips.o.
1181 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
1182 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
1183 bfd_elf64_littlemips_vec to targ_selvecs.
1184 (mips*-*-elf*): Likewise.
1185 * confingure.in: Add bfd_elf64_bigmips_vec and
1186 bfd_elf64_littlemips_vec to vector switch.
1187 * configure: Rebuild.
1188 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
1189 broken out of mips_elf_section_from_shdr.
1190 (mips_elf32_section_from_shdr): Rename from
1191 mips_elf_section_from_shdr. Call new function.
1192 (elf_backend_section_from_shdr): Update name of renamed function.
1193 * elf-bfd.h (struct elf_size_info): Change second parameter of
1194 write_out_phdrs to be const. Likewise for second parameter of
1196 (struct bfd_elf_section_data): Add rel_hdr2 field.
1197 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
1198 (bfd_elf32_swap_symbol_out): Likewise.
1199 (bfd_elf32_swap_reloc_in): Likewise.
1200 (bfd_elf32_swap_reloc_out): Likewise.
1201 (bfd_elf32_swap_reloca_in): Likewise.
1202 (bfd_elf32_swap_reloca_out): Likewise.
1203 (bfd_elf32_swap_phdr_in): Likewise.
1204 (bfd_elf32_swap_phdr_out): Likewise.
1205 (bfd_elf32_swap_dyn_in): Likewise.
1206 (bfd_elf32_swap_dyn_out): Likewise.
1207 (bfd_elf32_slurp_symbol_table): Declare.
1208 (bfd_elf32_write_shdrs_and_ehdr): Declare.
1209 (bfd_elf32_write_out_phdrs): Declare.
1210 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
1211 (bfd_elf64_swap_symbol_out): Likewise.
1212 (bfd_elf64_swap_reloc_in): Likewise.
1213 (bfd_elf64_swap_reloc_out): Likewise.
1214 (bfd_elf64_swap_reloca_in): Likewise.
1215 (bfd_elf64_swap_reloca_out): Likewise.
1216 (bfd_elf64_swap_phdr_in): Likewise.
1217 (bfd_elf64_swap_phdr_out): Likewise.
1218 (bfd_elf64_swap_dyn_in): Likewise.
1219 (bfd_elf64_swap_dyn_out): Likewise.
1220 (bfd_elf64_slurp_symbol_table): Declare.
1221 (bfd_elf64_write_shdrs_and_ehdr): Declare.
1222 (bfd_elf64_write_out_phdrs): Declare.
1223 (_bfd_mips_elf_section_from_shdr): Declare.
1224 * elf.c (bfd_section_from_shdr): Remove assertion requiring
1225 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
1226 section for the section, add the new one to rel_hdr2. Increment
1227 reloc_count rather than setting it.
1228 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
1229 Remove static declaration.
1230 (elf_write_shdrs_and_ehdr): Define name as macro.
1231 (elf_write_out_phdrs): Likewise.
1232 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
1233 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
1234 (elf_swap_symbol_in): Change second parameter to be const.
1235 (elf_swap_symbol_out): Likewise.
1236 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
1237 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
1238 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
1239 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
1240 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
1241 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
1242 parameter to be const. Make non-static.
1243 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
1245 (elf_slurp_symbol_table): Make non-static.
1246 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
1247 * elfxx-target.h (elf_info_to_howto): Define if not defined.
1248 (elf_backend_size_info): Likewise.
1249 (elfNN_bed): Use elf_backend_size_info.
1250 * targets.c (bfd_elf64_bigmips_vec): Declare.
1251 (bfd_elf64_littlemips_vec): Declare.
1252 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
1253 bfd_elf64_littlemips_vec if BFD64 is defined.
1255 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
1257 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
1259 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
1260 zeroes, in alignment holes.
1262 * configure: Rebuild with autoconf 2.10.
1264 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
1265 potential leading underscore in the allocated buffer.
1267 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1269 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
1270 symbols into .sbss if this is a relocatable link.
1272 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
1274 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
1275 undefined symbols when creating a shared library.
1277 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
1279 * coff-sh.c: Add a bunch of new code and static const arrays to
1280 support aligning loads and stores on four byte memory boundaries.
1282 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
1284 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
1285 call sh_align_loads.
1286 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
1289 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
1291 * cache.c (bfd_open_file): Unlink the file before opening it for
1292 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
1294 * opncls.c (bfd_fdopenr): Set opened_once.
1296 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
1298 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
1301 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
1302 the code unconditionally.
1304 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
1306 * libcoff-in.h (struct pei_section_tdata): Define structure.
1307 (pei_section_data): Define macro.
1308 * libcoff.h: Rebuild.
1309 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
1310 store s_paddr field in pei_section_data.
1311 (coff_compute_section_file_positions): Use pei_section_data rather
1312 than _cooked_size, and don't overwrite an existing value.
1313 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
1314 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
1315 * peicode.h (coff_bfd_copy_private_section_data): Define if
1317 (pe_bfd_copy_private_section_data): New static function if
1320 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
1322 * srec.c (srec_set_arch_mach): Write as a function rather than a
1325 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
1326 no map, just check each member in turn to see whether it is
1329 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1331 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
1332 table. Call BFD_ASSERT to validate header size, instead of
1334 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
1337 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1339 * ppcboot.c: New target for looking at PPCbug boot records.
1341 * config{ure.in,.bfd}: Add support for ppcboot target.
1343 * configure: Regenerate.
1345 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
1347 * coff-h8300.c (howto_table): Update names to match recent
1348 changes to include/coff/internal.h. Fix minor errors in the
1349 existing relocs. Add R_MOVL1 and R_MOVL2.
1350 (rtype2howto): Similarly.
1351 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
1352 existing relaxing code and peform more relaxing.
1353 (h8300_reloc16_extra_cases): Likewise.
1355 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
1357 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
1360 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1362 * elfcode.h (elf_object_p): Reject generic ELF target if
1363 e_machine matches an alternate machine code in a specific backend.
1365 * netbsd-core.c (netbsd_core_vec): Remove initializer for
1366 obsolete align_power_min field.
1368 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
1370 * coff-h8300.c (reloc_howto_type): Add howto entry for
1372 (rtype2howto): Handle R_PCRWORD_B.
1373 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
1374 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
1375 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
1376 branch (R_PCWORD_B).
1378 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
1380 * aoutx.h (translate_from_native_sym_flags): Set the section for
1381 BSF_CONSTRUCTOR symbols.
1383 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
1386 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
1388 * coffcode.h (coff_write_object_contents): In comdat section lookup,
1389 stop looking when section is found.
1391 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
1393 * coffcode.h (STRING_SIZE_SIZE): Define.
1394 (styp_to_sec_flags): Handle long symbol names when looking for the
1396 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
1397 (bfd_coff_long_section_names): Define.
1398 (coff_write_object_contents): Handle long section names.
1399 (bfd_coff_std_swap_table): Initialize new field.
1400 * libcoff.h: Rebuild.
1401 * coffgen.c (make_a_section_from_file): Handle long section
1403 (coff_write_symbols): Handle long section names.
1404 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1405 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1406 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
1407 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
1408 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
1409 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
1410 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1411 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1413 * bout.c (b_out_callback): Set lma of sections.
1414 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
1415 parameter to output_bfd. Used input_bfd instead of output_bfd in
1418 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
1420 * aoutx.h (translate_from_native_sym_flags): Don't create
1421 SEC_CONSTRUCTOR sections.
1422 * ecoff.c (ecoff_set_symbol_info): Likewise.
1424 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
1425 From Don Bowman <bowman@waterloo.hp.com>.
1427 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
1429 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
1430 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1432 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
1434 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
1435 mips_32_relocs field.
1436 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
1437 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
1438 relocs against a global symbol which is not defined in a regular
1440 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
1441 against a global symbol, increment mips_32_relocs.
1442 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
1443 the symbol is not defined in a regular file, make room in the
1446 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
1448 * ecoff.c (ecoff_compute_section_file_positions): Track the real
1449 file position and the virtual file position separately. Set
1450 filepos information bsaed on the real file position.
1451 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
1452 Jan 23 change to coffcode.h.
1454 * som.c (som_slurp_symbol_table): Set the symbol count to the
1455 number of BFD symbols created.
1457 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1459 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
1460 output file if linking shared objects. Loop to check all relocs,
1461 rather than returning false on first error.
1463 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1465 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
1466 (ppc_elf_additional_program_headers): If .interp section, bump #
1467 of program headers by 1.
1468 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
1469 (ppc_elf_size_dynamic_sections): Add support for .plt section.
1470 (ppc_elf_check_relocs): Print out filename in debug code. Enable
1472 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
1474 (ppc_elf_relocate_section): If the output section isn't defined,
1475 don't abort, just give an error message.
1477 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
1478 being created is .sdata or .sdata2, don't make the symbol dynamic.
1480 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
1482 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
1483 members of an archive for dynamic objects with no symbols, and
1484 pass them directly to check_archive_element.
1485 (xcoff_link_check_ar_symbols): Pass dynamic objects to
1486 xcoff_link_check_dynamic_ar_symbols.
1487 (xcoff_link_check_dynamic_ar_symbols): New static function.
1489 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
1490 from _bfd_nodynamic to _bfd_xcoff.
1491 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
1493 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
1494 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
1495 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
1496 * libcoff.h: Rebuild.
1497 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
1498 (xcoff_get_section_contents): New static function.
1499 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
1500 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
1501 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
1502 (xcoff_dynamic_reloc): New static variable.
1503 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
1504 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
1506 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
1508 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
1509 if reloc_entry->addend is not 0.
1510 (CALC_ADDEND): Just set the addend to reloc.r_offset.
1512 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
1514 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
1516 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1517 Add entries for R_SPARC_[56].
1518 (sparc_reloc_map): Add entries for R_SPARC_[56].
1520 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
1522 Optimize linking of stabs in sections as used in ELF and COFF.
1523 * stabs.c: New file.
1524 * libbfd-in.h (_bfd_link_section_stabs): Declare.
1525 (_bfd_write_section_stabs): Declare.
1526 (_bfd_write_stab_strings): Declare.
1527 * libbfd.h: Rebuild.
1528 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
1529 (struct coff_link_hash_table): Add stab_info field.
1530 * libcoff.h: Rebuild.
1531 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
1533 (coff_link_add_symbols): Call _bfd_link_section_stabs if
1535 (_bfd_coff_final_link): Write out stab strings hash table.
1536 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
1537 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
1539 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
1540 (struct bfd_elf_section_data): Add stab_info field.
1541 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
1543 * elflink.h (elf_link_add_object_symbols): If appropriate, call
1544 _bfd_link_section_stabs.
1545 (elf_bfd_final_link): Write out stab strings hash table.
1546 (elf_link_input_bfd): Handle optimized stabs sections.
1547 * reloc.c (_bfd_final_link_relocate): Check address against
1548 _raw_size rather than _cooked_size.
1549 * Makefile.in: Rebuild dependencies.
1550 (BFD_LIBS): Add stabs.o
1551 (BFD_LIBS_CFILES): Add stabs.c.
1553 * VERSION: Increment for bfdlink.h change.
1555 * coffgen.c (coff_renumber_symbols): Correct handling of
1556 BSF_NOT_AT_END common symbols.
1558 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
1560 * coff-ppc.c (record_toc): Add cast to avoid warning.
1561 (ppc_allocate_toc_section): Likewise.
1562 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
1563 (ppc_coff_reloc_type_lookup): Remove unreached code.
1564 * coffcode.h (coff_write_object_contents): Don't take the address
1566 * peicode.h (pe_print_idata): Add casts to avoid warning.
1567 (pe_print_edata): Likewise.
1568 (pe_print_reloc): Remove ANSI C string concatenation.
1570 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
1572 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
1574 * libcoff.h: Rebuild.
1575 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
1577 (coff_swap_aux_out): Likewise.
1578 * peicode.h (coff_swap_aux_in): Likewise.
1579 (coff_swap_aux_out): Likewise.
1580 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
1582 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
1584 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
1585 Fix up .bf endndx link fields.
1586 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
1588 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
1591 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1593 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
1594 on Solaris PowerPC systems doesn't get confused.
1596 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
1599 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
1600 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
1601 update did_reg and did_reg2.
1603 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
1605 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
1607 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
1608 callback routines, pass h->root.string rather than name, in case
1609 copy is true and name is transient.
1611 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
1613 * elfcore.h: Add support for core files with multiple threads.
1614 (Primarily for Solaris.)
1616 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1618 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
1619 section->orelocation is NULL.
1621 * coffgen.c (bfd_coff_get_syment): New function.
1622 (bfd_coff_get_auxent): New function.
1623 * bfd-in.h (bfd_coff_get_syment): Declare.
1624 (bfd_coff_get_auxent): Declare.
1625 * bfd-in2.h: Rebuild.
1627 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
1629 * elf32-mips.c (struct mips_hi16): Define.
1630 (mips_hi16_addr, mips_hi16_addend): Remove.
1631 (mips_hi16_list): New static variable.
1632 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
1633 (mips_elf_lo16_reloc): Process mips_hi16_list.
1634 (mips_elf_relocate_section): Permit an arbitrary number of HI16
1635 relocs before the associated LO16 reloc.
1637 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1639 * versados.c (versados_scan): Check bfd_alloc return value.
1640 (versados_object_p): Check all bfd_read return values. Require
1641 that lang field be less than 10, to avoid confusion with Intel Hex
1644 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
1646 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
1647 not 0, for an absolute symbol.
1648 (NAME(aout,swap_ext_reloc_out)): Likewise.
1650 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1651 (ihex_write_object_contents): For a large start address, output
1652 the full 32 bit address in record type 5.
1654 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1655 to int to avoid promotion problems in prototype.
1657 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1659 * configure.host: Use ${srcdir} when looking for picfrag.
1661 * configure.host: Switch on ${libdir}, not $(libdir). From
1662 alan@spri.levels.unisa.edu.au (Alan Modra).
1664 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1665 entry point, not just for DYNAMIC objects.
1666 * sunos.c (sunos_add_dynamic_symbols): Always call
1667 sunos_create_dynamic_sections. If called with a non DYNAMIC
1668 object, don't do anything else.
1669 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1671 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1673 * configure.in: Permit --enable-shared to specify a list of
1675 * configure: Rebuild.
1677 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1678 host when configuring with --enable-shard.
1680 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1682 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1685 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1686 to avoid crashing in bfd_hash_replace.
1688 * sysdep.h: Use #ifdef, not #if.
1690 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1692 * config.in: Rebuild.
1694 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1696 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1697 (AC_CHECK_HEADERS): Check for sys/time.h
1698 (AC_HEADER_TIME): Add macro.
1699 * configure: Rebuild.
1700 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1701 to control what combination of <time> and <sys/time.h>
1704 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1706 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1707 (aout_32_sunos4_write_object_contents): Likewise.
1708 * aoutx.h (NAME(aout,machine_type)): Handle
1709 bfd_mach_sparc_{sparclet,sparclite}.
1710 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1711 (bfd_mach_sparc_v9_p): Update.
1712 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1713 * libaout.h (enum machine_type): Add M_SPARCLET.
1714 * sunos.c (MACHTYPE_OK): Define.
1715 * bfd-in2.h: Regenerated.
1717 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1719 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1720 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1721 * elflink.c (_bfd_elf_create_got_section): Store the
1722 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1723 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1724 global offset table goes over 0x1000, set the value of
1725 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1726 (elf32_sparc_relocate_section): Subtract the offset of
1727 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1729 * elfcode.h: Don't include <string.h>.
1731 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1733 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1734 generic_link_hash_newfunc. All references changed.
1735 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1736 moved here from libbfd-in.h.
1737 * libbfd-in.h: Corresponding changes.
1738 * libbfd.h: Regenerated.
1740 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1742 * aoutx.h (aout_link_input_section_std): When reporting an
1743 overflow error, use the name of the symbol in the hash table if
1745 (aout_link_input_section_ext): Likewise.
1747 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1748 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1750 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1752 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1753 * coffcode.h (coff_compute_section_file_positions): Likewise.
1754 (coff_write_object_contents): Likewise.
1756 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1758 * section.c (SEC_LINK_ONCE): Define.
1759 (SEC_LINK_DUPLICATES): Define.
1760 (SEC_LINK_DUPLICATES_DISCARD): Define.
1761 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1762 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1763 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1764 * bfd-in2.h: Rebuild.
1765 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1766 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1767 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1768 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1769 SEC_LINK_ONCE, and look through the symbol table for the setting
1770 for SEC_LINK_DUPLICATES.
1771 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1772 set for a section, find the section symbol in the symbol table,
1773 and set the aux entry based on SEC_LINK_DUPLICATES.
1774 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1775 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1776 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1777 * coff-i386.c (i386coff_vec): Likewise.
1778 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1780 * VERSION: Bump to 2.6.1.
1781 * Makefile.in (stamp-h): Depend upon VERSION.
1783 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1785 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1786 * libbfd.h: Rebuilt.
1787 * linker.c (generic_link_hash_newfunc): No longer static.
1788 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1790 * coff-h8300.c: Add two derived hash tables and their associated
1791 funtions and #defines for use by the h8300 linker.
1792 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1793 the function vector as needed. Place the address of the function
1794 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1795 Rewrite the vectors section contents as necessary.
1796 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1797 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1798 (coff_bfd_link_hash_table_create): Likewise.
1800 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1802 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1803 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1805 (hppa_rebuild_insn): Pass pointer to correct type to
1806 low_sign_unext and dis_assemble_21.
1808 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1810 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1811 Stick with sparc-*-{sysv4*,solaris2*}.
1813 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1815 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1816 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1817 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1818 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1819 fields is non-zero, print them.
1821 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1822 ifdef. Remove unused variables.
1823 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1825 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1826 (get_symbol_value): Ifdef out.
1827 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1828 (coff_ppc_relocate_section): Remove unused variables. Make
1829 fprintf strings and argument types correspond. Put before_addr in
1831 (dump_toc): Make fprintf strings and argument types correspond.
1832 (ppc_process_before_allocation): Remove unused variables. Always
1834 (ppc_reflo_reloc): Ifdef out.
1835 (ppc_addr32nb_reloc): Ifdef out.
1836 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1838 (coff_ppc_rtype_to_howto): Likewise.
1839 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1841 * peicode.h (pe_print_idata): Move otherwise unused variables into
1842 the #ifdef where they are used. Always return a value.
1843 (pe_print_edata): Make fprintf strings and argument types
1844 correspond. Always return a value.
1845 (pe_print_pdata): Removed unused variable addr_value. Always
1847 (pe_print_reloc): Remove unused variable onaline. Make fprintf
1848 strings and argument types correspond. Always return a value.
1850 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1851 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1852 variable rela inside #if 0 section where it is used.
1854 * ns32k.h: New file.
1855 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1856 functions to start with _bfd_.
1857 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1858 functions in cpu-ns32k.h.
1859 * Makefile.in: Rebuild dependencies.
1860 (HFILES): Add ns32k.h.
1862 * section.c (struct sec): Add linker_mark field. Change
1863 user_set_vma and reloc_done to be single bit fields.
1864 (STD_SECTION): Update accordingly.
1865 * bfd-in2.h: Rebuild.
1866 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1868 (aout_link_input_bfd): Don't link unmarked sections.
1869 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1871 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1872 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1874 * elflink.h (elf_bfd_final_link): Mark sections included in the
1876 (elf_link_input_bfd): Don't link unmarked sections.
1877 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1879 (xcoff_link_input_bfd): Don't link unmarked sections.
1881 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1882 overflow error messages.
1884 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1886 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1887 is not set, print "BFD: " before the error message.
1889 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1890 Miles Bader <miles@gnu.ai.mit.edu>.
1891 * configure: Rebuild.
1893 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1895 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1898 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1899 m68k-aout, m68k-coff, and m68k-elf targets.
1901 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1903 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1904 (ieee_generic_stat_arch_elt): Restructured to prevent
1905 ieee_object_p from being called repeatedly.
1907 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1909 * coffcode.h (coff_write_object_contents): Allocate
1910 buffers large enough for any FILEHDR or AOUTHDR.
1912 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1914 * ecofflink.c (lookup_line): New static function, renamed and
1915 slighly changed from old _bfd_ecoff_locate_line.
1916 (_bfd_ecoff_locate_line): Cache line number information. Use
1917 lookup_line for actual lookup.
1919 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1921 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1922 multiple of 20 bytes.
1924 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1926 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1927 allocate ecoff_find_line, and don't initialize by hand.
1928 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1929 mips_elf_find_line, and don't call memset.
1931 * coffcode.h (coff_compute_section_file_positions): If not
1932 producing a final executable, don't consider sofar when aligning
1933 the section to the correct size.
1935 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1937 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1938 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1939 * coffgen.c (coff_section_symbol): Ifdef out.
1941 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1943 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1944 output_bfd is not NULL.
1946 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1948 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1949 of bfd_alloc (fixes fix_line not being initialized).
1950 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1952 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1954 * coffcode.h: Allow specific backends to override the
1955 bfd_link_add_symbols routine.
1957 * coff-h8300.c: Include genlink.h.
1958 (howto_table): Add R_MEM_INDIRECT.
1959 (rtype2howto): Support R_MEM_INDIRECT.
1960 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1963 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1965 * coff-alpha.c (alpha_relocate_section): Use
1966 info->callbacks_warning, rather than _bfd_error_handler, for
1967 "multiple gp" warning.
1969 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1971 * linker.c (bfd_wrapped_link_hash_lookup): New function.
1972 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
1973 table string. Use bfd_wrapped_link_hash_lookup.
1974 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
1976 * aoutx.h (aout_link_write_symbols): Use the name from the hash
1977 table, if any, when writing out symbols.
1978 (aout_link_input_section_std): Use the name from the hash table,
1979 if any, when reporting undefined symbols.
1980 (aout_link_input_section_ext): Likewise.
1981 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
1982 * bout.c (get_value): Likewise.
1983 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1984 * ecoff.c (ecoff_reloc_link_order): Likewise.
1985 * elflink.h (elf_link_add_object_symbols): Likewise.
1986 (elf_reloc_link_order): Likewise.
1987 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1988 (_bfd_generic_reloc_link_order): Likewise.
1989 (default_indirect_link_order): Likewise.
1990 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1991 * sunos.c (sunos_add_one_symbol): Likewise.
1992 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1993 (bfd_xcoff_link_count_reloc): Likewise.
1994 (xcoff_reloc_link_order): Likewise.
1996 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
1997 into -1 for intern->rss.
1999 * configure: Rebuild with autoconf 2.8.
2001 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
2003 * stab-syms.c (__define_stab_duplicate): Define.
2004 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
2006 * bfd-in.h (bfd_get_stab_name): Declare.
2007 * bfd-in2.h: Rebuild.
2008 * Makefile.in: Rebuild dependencies.
2009 (BFD_LIBS): Add stab-syms.o.
2010 (BFD_LIBS_CFILES): Add stab-syms.c.
2011 (BFD32_BACKENDS): Remove stab-syms.o.
2012 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
2013 * configure.in: Don't list stab-syms.o in bfd_backends.
2014 * configure: Rebuild.
2015 * libaout.h (aout_stab_name): Don't declare.
2016 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
2019 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
2021 * elf.c (assign_file_positions_for_segments): Adjust file offset
2022 for section alignment even if SEC_LOAD is not set.
2024 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
2026 * configure.in: Don't set SHLIB or SHLINK to an empty string,
2027 since they appear as targets in Makefile.in.
2028 * configure: Rebuild.
2030 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
2031 don't fiddle with a symbol which is not defined anywhere.
2033 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
2035 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
2036 though they are defined in a shared library.
2037 (xcoff_build_ldsyms): Likewise.
2039 * coffgen.c (coff_find_nearest_line): Don't look at the line
2040 numbers for the section if section->lineno is NULL.
2042 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
2043 message rather than calling BFD_ASSERT.
2044 * elfcode.h (write_relocs): Check return value of
2045 _bfd_elf_symbol_from_bfd_symbol.
2047 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2049 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
2052 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
2054 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
2056 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
2057 hppa_reloc_field_selector_type_alt.
2058 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
2059 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
2061 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
2063 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
2065 * elf.c (assign_file_positions_for_segments): Adjust the segment
2066 memory size for the alignment of a SEC_ALLOC section, not just a
2069 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2071 * m68klinux.c: New file.
2072 * hosts/m68klinux.h: New file.
2073 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
2074 * configure.in (m68*-*-linux*): New native host.
2075 (m68klinux_vec): New vector.
2076 * configure: Rebuild.
2077 * targets.c (m68klinux_vec): Declare.
2078 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
2079 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
2080 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
2081 declaration from bfd_linux_size_dynamic_sections.
2082 (bfd_m68klinux_size_dynamic_sections): Declare.
2083 * bfd-in2.h: Rebuild.
2084 * Makefile.in: Rebuild dependencies.
2085 (BFD32_BACKENDS): Add m68klinux.o.
2086 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
2088 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
2090 * libhppa.h (pa_arch): Add pa20.
2091 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
2092 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
2093 (hppa_field_adjust): Handle e_nsel.
2094 * som.c: Provide default definitions for many new relocs found only
2095 in hpux10 include files.
2096 (som_fixup_formats): Add several new relocs from hpux10.
2097 (som_hppa_howto_table): Add hpux10 relocs.
2098 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
2100 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
2102 * mpw-make.sed: Edit out recent shared library support, and
2103 rules to rebuild .h files using doc/chew.
2105 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
2107 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
2108 size even of sections with no contents.
2110 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
2112 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
2113 starting with '$' the way we skip names starting with '.'. When
2114 updating x_endndx, don't be fooled by an index which has been
2117 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
2118 struct/union/enum type with no elements.
2120 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
2122 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
2124 * archive.c (bfd_generic_archive_p): If the first file in the
2125 archive can not be recognized as an object, don't assume that this
2126 is the wrong format.
2128 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2129 format is not bfd_object.
2130 (bfd_elf_get_dt_soname): Likewise.
2132 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
2134 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
2137 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2139 * bfd.c (tdata): Add netbsd_core_data.
2140 * bfd-in2.h: Regenerated.
2142 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
2144 * sunos.c (SUNOS_CONSTRUCTOR): Define.
2145 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
2146 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
2149 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
2150 to get the symbol index, matching 14 Jul 95 change.
2152 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
2154 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2155 Remove duplicate definition of gp.
2157 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
2159 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
2160 assume that we can set the GP value and then get the same value,
2161 since it won't be true if the output file is neither ELF nor
2163 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
2164 _bfd_get_gp_value here.
2165 (mips_gprel_reloc): Don't assume we can set and get the GP value.
2166 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
2168 (mips_elf_lo16_reloc): Likewise.
2169 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
2170 Don't require that the BFD be ELF.
2171 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
2172 (mips_elf_gprel32_reloc): Likewise.
2173 (mips_elf_relocate_section): Don't assume we can set and get the
2175 (mips_elf_finish_dynamic_symbol): Don't bother to use
2176 _bfd_get_gp_value here.
2178 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
2179 Don't change epdr between malloc and free. Be careful not to free
2180 NULL pointers. Zero out the first RPDR.
2182 * configure.host: On Linux, only pass -rpath option if $(libdir)
2183 is neither /lib nor /usr/lib. From Alan Modra
2184 <alan@mullet.Levels.UniSA.Edu.Au>.
2186 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
2188 (elf_dt_name): Rename from elf_dt_needed_name.
2189 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
2191 (bfd_elf_get_dt_soname): New function.
2192 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
2193 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
2194 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
2195 * bfd-in2.h: Rebuild.
2197 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
2199 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
2200 _bfd_sparc_elf_reloc_type_lookup.
2201 (bfd_elf32_bfd_reloc_type_lookup): Update.
2202 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
2203 (sparc64_elf_howto_table): Define.
2204 (sparc_reloc_map): Define.
2205 (sparc64_elf_reloc_type_lookup): New function.
2206 (sparc_elf_wdisp16_reloc): New function.
2207 (elf_info_to_howto): Use sparc64_elf_howto_table.
2208 (sparc64_elf_relocate_section): Likewise.
2209 (bfd_elf64_bfd_reloc_type_lookup): Update.
2211 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
2213 * configure.host: Check for 'do not mix' from native linker before
2214 trying to use -rpath.
2216 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
2218 * bfd.c (_bfd_get_gp_value): New function.
2219 (_bfd_set_gp_value): New function.
2220 * libbfd-in.h (_bfd_get_gp_value): Declare.
2221 (_bfd_set_gp_value): Declare.
2222 * libbfd.h: Rebuild.
2223 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2224 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
2225 directly to the fields in the tdata information.
2226 (alpha_relocate_section): Likewise.
2227 * coff-mips.c (mips_adjust_reloc_in): Likewise.
2228 (mips_gprel_reloc): Likewise.
2229 (mips_relocate_section): Likewise.
2230 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
2231 (mips_elf_lo16_reloc): Likewise.
2232 (mips_elf_final_gp): Likewise.
2233 (mips_elf_gprel16_reloc): Likewise.
2234 (mips_elf_gprel32_reloc): Likewise.
2235 (mips_elf_relocate_section): Likewise.
2236 (mips_elf_finish_dynamic_symbol): Likewise.
2238 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
2240 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
2242 * configure.in: Call AC_PROG_CC before configure.host.
2243 * configure: Rebuild.
2244 * configure.host: Don't set information which autoconf should
2245 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
2247 * configure.host: Remove go32 and win32 host information, since it
2248 should no longer be needed.
2250 * elf.c (map_sections_to_segments): If we have a .dynamic section,
2251 then start a new segment rather than put a writable section in a
2254 * configure.host: Set RPATH_ENVVAR.
2256 * Makefile.in: Rebuild dependencies.
2258 * elflink.c (_bfd_elf_create_linker_section): Remove unused
2259 zero_section variable.
2261 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
2263 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
2264 ($(srcdir)/libbfd.h): Rename from libbfd.h.
2265 ($(srcdir)/libcoff.h): Rename from libcoff.h.
2267 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
2269 * ieee.c (ieee_write_expression): Only use an R variable for a
2270 local symbol. Don't output a zero offset. Handle a zero address.
2271 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
2272 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
2274 (parse_expression): Don't try to handle multiple occurrences of a
2275 P variable. Handle I variables differently from X variables. Fix
2276 the order of minus expressions.
2277 (ieee_slurp_external_symbols): Generate an I variable for an NN
2278 record. Fix handling of ATI and ATX records.
2279 (ieee_slurp_sections): Only set minimal section attributes.
2280 Adjust them later, based on the section contents.
2281 (ieee_object_p): Read in the file until just after the ME record.
2282 Call ieee_slurp_section_data to set the section flags.
2283 (do_one): Add iterations parameter. Only repeat the first load
2284 item. Set the section and file reloc flags.
2285 (ieee_slurp_section_data): Set section flags. Pass iterations to
2287 (ieee_canonicalize_reloc): Handle I variables.
2288 (do_with_relocs): Only emit relocation size when necessary.
2289 Increase MAXRUN to 127. Change ov to be assigned, and take
2290 src_mask and pcrel_offset into account.
2291 (ieee_write_data_part): Skip sections that are not loaded.
2292 (ieee_write_external_part): Don't output optional last entry of WX
2294 (ieee_write_me_part): Make setting of me_record neater.
2295 (ieee_generic_stat_arch_elt): Get the size of an archive element.
2297 * syms.c (stt): Add entries for zerovars, vars, and code.
2299 * elfcode.h (validate_reloc): New static function.
2300 (write_relocs): Call validate_reloc for non ELF relocs.
2302 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
2303 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
2304 (TARGET_LITTLE_SYM): Likewise.
2306 * config.bfd (m68*-*-psos*): New target.
2308 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
2310 * i386msdos.c: Remove some #if 0 code.
2311 (msdos_write_object_contents): Don't include empty sections in the
2312 size computation, regardless of their address.
2314 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2316 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
2317 is NULL, ie, the -r switch is used.
2319 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
2321 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
2322 (BFD_RELOC_MIPS_GOT_LO16): Define.
2323 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
2324 * bfd-in2.h, libbfd.h: Rebuild.
2325 * elf32-mips.c (mips_reloc_map): Map new relocs.
2327 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
2329 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
2332 * ieee.c (get_symbol): Set the section to bfd_abs_section.
2333 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
2334 simple number for the section address, rather than an expression.
2335 Limit the number of bytes between relocs to MAXRUN.
2336 (ieee_write_me_part): Set me_record to the file offset after the
2338 (ieee_write_processor): New static function.
2339 (ieee_write_object_contents): Use ieee_write_processor.
2341 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
2343 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
2345 * coff-aux.c: Change include of aux.h to aux-coff.h.
2347 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2349 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
2350 relocation put the addend both in the reloc entry and the data.
2351 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
2354 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
2355 a R_68K_PCxx reloc against a defined global symbol directly.
2356 (elf_m68k_check_relocs): Don't count such a reloc.
2358 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
2359 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
2360 symbol for now, otherwise always record the symbol as dynamic.
2361 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
2362 is not referenced by a dynamic object, and we are not making a
2363 shared object, then don't make a PLT entry. If we do make a PLT
2364 entry, make sure the symbol has been recorded as dynamic.
2366 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
2368 * configure.host: When making a shared library, set HLDFLAGS to
2369 pass an appropriate -rpath option. Use the make variable SONAME
2370 as the shared library soname, rather than computing it here. On
2371 SunOS, build stamp-tshlink in place of $(SHLINK).
2372 * Makefile.in (SONAME): New variable.
2373 ($(SHLINK)): Make a link to the transformed name, as well.
2374 (stamp-tshlink): New target.
2375 (install): Skip stamp-tshlink during install.
2377 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2379 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
2380 linker sections have been set up yet.
2382 * elf.c (make_mapping): Add an additional argument to suppress
2383 making the first section include the program headers.
2384 (map_sections_to_segments): If the user used -Ttext such that the
2385 program headers are on a different page, do not set the flags
2386 saying that this section includes the program headers.
2388 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2390 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
2391 don't define TRAD_HEADER.
2392 * configure: Rebuild.
2394 * netbsd-core.c: New file, support for NetBSD core files.
2395 * hosts/*nbsd.h: Removed.
2397 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
2399 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
2400 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
2401 * libbfd.h, bfd-in2.h: Regenerated.
2402 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
2403 bfd_elf32_bfd_reloc_type_lookup.
2404 (reloc_type{,_names}): Deleted.
2405 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2407 (sparc_reloc_map): Add sparc64 relocs.
2408 (sparc_elf_notsupported_reloc): New static function.
2409 (sparc_elf_wdisp16_reloc): New static function.
2410 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
2411 (elf32_sparc_relocate_section): Likewise.
2412 (bfd_elf32_bfd_reloc_type_lookup): Define.
2413 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
2414 (reloc_type{,_names}): Deleted.
2415 (elf_sparc_howto_table): Deleted.
2416 (sparc_reloc_map): Deleted.
2417 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2418 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
2420 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
2422 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
2425 * Makefile.in (program_transform_name): New variable.
2426 (install): Transform library name before installing it.
2428 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
2430 * archures.c (bfd_mach_i960_hx): Define.
2431 * bfd-in2.h: Rebuild.
2432 * cpu-i960.c (scan_960_mach): Accept machine "hx".
2433 (MATRIX): Expand entries for HX.
2434 (arch_info_struct): Add i960:hx entry.
2435 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
2436 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
2437 (coff_set_flags): Handle bfd_mach_i960_hx.
2439 Support for building as a shared library, based on patches from
2440 Alan Modra <alan@spri.levels.unisa.edu.au>:
2441 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
2442 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
2443 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
2444 * configure: Rebuild.
2445 * configure.host: If --enable-shared, adjust shared library stuff
2446 based on the host. If the host is SunOS, and the linker supports
2447 -rpath, set HLDFLAGS to use it.
2448 * Makefile.in (ALLLIBS): New variable.
2449 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
2450 (COMMON_SHLIB, SHLINK): New variables.
2451 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
2452 (STAGESTUFF): Remove variable.
2453 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
2455 (stamp-ofiles): New target, like old ofiles target, but build
2456 using a temporary file and move-if-change, and touch stamp-ofiles
2458 (ofiles): Just depend upon stamp-ofiles.
2459 (stamp-piclist, piclist): New targets.
2460 ($(SHLIB), $(SHLINK)): New targets.
2461 (targets.o, archures.o): Build twice if PICFLAG is set.
2462 (do_mostlyclean): Remove pic/*.o.
2463 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
2465 (do_distclean): Remove pic and stamp-picdir.
2466 (install): Install shared libraries.
2467 ($(OFILES)): Depend upon stamp-picdir.
2468 (stamp-picdir): New target.
2470 * libcoff-in.h: Add comment reminding people that libcoff.h is a
2472 * libcoff.h: Rebuild.
2474 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
2475 flavour of a section with no owner.
2477 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
2478 ELF_LINK_NON_ELF flag.
2479 (mips_elf_create_got_section): Likewise.
2481 * elf.c: Revert last change, since it breaks dynamic linking.
2482 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
2484 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
2485 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
2486 (elfNN_bed): Don't initialize want_hdr_in_seg field.
2488 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2490 * elf.c (assign_file_positions_for_segments): If the backend does
2491 not want the elf header or the program headers in the address
2492 space, do not include them in the calculations.
2494 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
2495 function to determine if we need additional program headers.
2496 (ppc_elf_modify_segment_map): Define as a NOP function for now.
2497 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
2499 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
2501 * coffcode.h: Move today's libcoff.h change into coffcode.h.
2503 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
2505 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
2506 back into one line. Some compilers (sunos 4.1.3 for example)
2507 won't accept args split across more than one line.
2509 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
2511 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
2512 * configure: Regenerate.
2514 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
2516 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
2517 try to do arithmetic on a void *, cast it to a unsigned char * first.
2519 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
2521 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
2522 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
2524 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
2525 flag for a newly defined symbol.
2526 (NAME(bfd_elf,record_link_assignment)): Likewise.
2527 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
2528 set the DEF or REF_REGULAR flags correctly.
2530 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
2531 (libbfd.h, libcoff.h): Corresponding change.
2533 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
2534 a PLT32 reloc as dynamic.
2535 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
2536 is not referenced by a dynamic object, and we are not making a
2537 shared object, then don't make a PLT entry. If we do make a PLT
2538 entry, make sure the symbol has been recorded as dynamic.
2540 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
2542 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
2543 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
2544 (powerpcle-*-cygwin32): New.
2545 * peicode.h (add_data_entry): Get address from vma.
2547 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2549 * elflink.c (_bfd_elf_create_linker_section): If the symbol
2550 attached to the section has already been created as an undefined
2551 symbol, treat it as if it hasn't been created yet.
2553 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
2555 * elflink.h (elf_bfd_final_link): Don't output initial dummy
2556 symbol or section symbols if stripping all symbols and this is not
2557 a relocateable link. Don't output the symbol string table if
2558 there are no symbols.
2559 (elf_link_flush_output_syms): Don't do anything if there are no
2562 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
2564 * coff-aux.c: New file.
2565 * hosts/m68kaux.h: New file.
2566 * config.bfd (m68*-apple-aux*): New target.
2567 * configure.in (m68*-apple-aux*): New native host.
2568 (m68kaux_coff_vec): New vector.
2569 * configure: Rebuild.
2570 * targets.c (m68kaux_coff_vec): Declare.
2571 * coffcode.h (bfd_coff_backend_data): Add field
2572 _bfd_coff_link_add_one_symbol.
2573 (bfd_coff_link_add_one_symbol): Define.
2574 (compare_arelent_ptr): New static function if TARG_AUX.
2575 (coff_write_relocs): If TARG_AUX, sort the relocs.
2576 (coff_write_object_contents): Set A/UX aouthdr magic number.
2577 (coff_link_add_one_symbol): Define if not defined.
2578 (bfd_coff_std_swap_table): Initialize new field.
2579 * libcoff.h: Rebuild.
2580 * cofflink.c (coff_link_add_symbols): Call
2581 bfd_coff_link_add_one_symbol rather than
2582 _bfd_generic_link_add_one_symbol.
2583 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
2584 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2585 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2586 * Makefile.in: Rebuild dependencies.
2587 (BFD32_BACKENDS): Add coff-aux.o.
2588 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
2590 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2592 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
2593 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
2595 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
2597 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
2598 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
2599 (maintainer-clean): Warn about deleting special files.
2600 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
2602 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
2603 warning symbols correctly.
2604 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2605 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2606 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2607 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2608 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2609 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2611 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
2614 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
2616 * libcoff-in.h: aligned newly exported names with bfd naming
2617 conventions. Removed an erroneous define of POWERPC_LE_PE.
2618 * libcoff.h: Rebuild.
2619 * cofflink.c, coff-ppc.c: the above function name changes
2621 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
2623 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
2624 * ecoff.c (struct extsym_info): Define.
2625 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
2626 to ecoff_link_write_external.
2627 (ecoff_link_write_external): Accept a struct extsym_info pointer.
2628 Strip symbols when appropriate.
2630 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
2631 * syms.c (BSF_OBJECT): Define.
2632 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
2633 * bfd-in2.h: Rebuild.
2634 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
2636 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
2639 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
2640 copying relocs into a shared object, treat a defined global symbol
2642 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2643 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2644 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2646 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
2647 real defined symbol, not to a weak defined symbol.
2649 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2651 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2652 and made a few static functions externs.
2654 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2655 POWERPC_LE_PE hack in cofflink.
2657 * libcoff-in.h: promoted the following from cofflink.c to allow
2658 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2659 coff_debug_merge_element, struct coff_debug_merge_type,
2660 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2661 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2662 coff_debug_merge_hash_lookup, coff_link_section_info,
2663 coff_final_link_info, coff_debug_merge_hash_newfunc,
2664 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2666 * libcoff.h: re-gen'd
2668 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2670 * syms.c: Include "bfdlink.h".
2671 (struct stab_find_info): Define.
2672 (_bfd_stab_section_find_nearest_line): New function.
2673 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2674 * libbfd.h: Rebuild.
2675 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2676 * elf.c (_bfd_elf_find_nearest_line): Try calling
2677 _bfd_stab_section_find_nearest_line before searching the ELF
2678 symbol table. Find the closest STT_FUNC symbol, not the last one.
2679 * libcoff-in.h (coff_data_type): Add line_info field.
2680 * libcoff.h: Rebuild.
2681 * coffgen.c (coff_find_nearest_line): Try calling
2682 _bfd_stab_section_find_nearest_line before searching the COFF
2684 * Makefile.in: Rebuild dependencies.
2686 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2688 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2689 4 bytes, so we get the correct value when updating the register
2690 field in little endian mode.
2692 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2694 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2695 entry_section fields. Add sntoc and snentry fields.
2696 * libcoff.h: Rebuild.
2697 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2698 not toc_section and entry_section (the COFF file does not have any
2699 sections at this point).
2700 (coff_write_object_contents): Set o_snentry and o_sntoc from
2701 snentry and sntoc rather than entry_section and toc_section.
2702 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2703 snentry, not toc_section and entry_section.
2704 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2705 entry_section from hentry.
2706 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
2708 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2709 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2710 than using toc_section directly.
2712 * archures.c: Add missing `.' in enum bfd_architecture.
2713 * bfd-in2.h: Rebuild.
2715 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2716 Robert Lipe <robertl@arnet.com>.
2718 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2720 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2721 to sections we allocate. Use bfd_zalloc to allocate initialial
2722 sections, not bfd_alloc.
2723 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2724 SDA{,2}I16 relocations.
2725 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2726 whether to put something in .sbss or not.
2727 (ppc_elf_relocate_section): Add support for more relocations. Add
2728 in sec->output_offset where appropriate. Make error messages
2729 include the symbol name.
2731 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2732 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2733 doesn't get redefined messages if -shared.
2735 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2736 section if the rel_section field has been set up.
2738 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2740 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2743 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2745 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2746 of flags, only flags used are controlled by mach number. Bump up
2747 output file mach number to highest of input file mach numbers.
2748 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2749 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2751 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2752 bfd_elf64_sparc_vec support.
2754 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2756 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2757 the embedded bit is set on some objects and not on others. Just
2759 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2762 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2764 * coffcode.h (coff_new_section_hook): Don't try to align the
2767 * coffcode.h (coff_set_section_contents): Fix the handling of the
2768 .lib section to work even if the entire section contents are
2769 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2770 Robert Lipe <robertl@arnet.com>.
2772 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2774 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2775 memory here for contents.
2777 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2778 _SDA2_BASE_ by 32768.
2779 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2780 started using. Allocate contents for .sdata and .sdata2 sections
2782 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2784 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2785 size _SDA{,2}_BASE_.
2786 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2789 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2791 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2793 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
2794 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
2795 (bfd_mach_sparc_v9a): Define.
2796 (bfd_mach_sparc_v9_p): Define.
2797 * bfd-in2.h: Regenerated.
2798 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2800 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
2801 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2802 to bfd_elf32_sparc_vec.
2803 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
2804 Add v8plus{,a} support.
2806 (sparc_compatible): New function.
2807 * elf32-sparc.h: #include "elf/sparc.h".
2808 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
2809 elf32_sparc_final_write_processing): New functions.
2810 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
2811 elf_backend_final_write_processing): Define.
2813 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2815 * elf-bfd.h (struct elf_link_hash_entry): Add
2816 linker_section_pointer field.
2817 (enum elf_linker_section_enum): Enumeration for new way of
2818 creating linker dynamic sections and symbols.
2819 (elf_linker_section{,_pointers}): New structures for creating
2820 dynamic sections and symbols.
2821 (elf_obj_tdata): Add linker_section_pointers and linker_section
2823 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2824 (_bfd_elf_create_linker_section): New declarations.
2825 (_bfd_elf_find_pointer_linker_section): Ditto.
2826 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2827 (_bfd_elf_make_linker_section_rela): Ditto.
2829 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2831 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2832 (ppc_elf_create_linker_section): New function to create the
2833 sections .got, .sdata, and .sdata2.
2834 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2836 (ppc_elf_check_relocs): Support more of the eabi relocations.
2837 (ppc_elf_relocate_section): Ditto.
2838 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2839 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2841 * elflink.h (elf_create_pointer_linker_section): New function to
2842 create initialized pointers in dynamic linker sections.
2843 (elf_finish_pointer_linker_section): Actually intialize the
2844 pointers created above.
2846 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2847 macros to provide both 32 and 64 bit versions of
2848 elf_create_pointer_linker_section.
2849 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2850 provide both 32 and 64 bit versions of
2851 elf_finish_pointer_linker_section.
2853 * elflink.c (_bfd_elf_create_linker_section): New function to
2854 create a linker section.
2855 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2856 given address in the linker pointer offsets created for a given
2858 (_bfd_elf_make_linker_section_rela): Make a RELA section
2859 corresponding to the generated linker section.
2861 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2863 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2865 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2867 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2868 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2869 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2870 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2871 toc entry in an objdump) for now.
2872 (ppc_do_last, ppc_get_last): New function - needed to save processing
2873 the toc owner to the end.
2874 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2877 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2878 toc owner from being done till last. Must define POWERPC_LE_PC
2881 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2883 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2885 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2886 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2888 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2890 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2892 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2894 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2896 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2898 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2900 * elf.c (assign_file_positions_for_segments): Don't increment file
2901 offset for a segment which contains no loadable sections.
2903 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2905 * reloc.c: Add new PowerPC relocations.
2906 * {bfd-in2,libbfd}.h: Regenerate.
2908 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2909 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2911 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2913 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2916 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2919 * coffgen.c (coff_find_nearest_line): Don't try to cache
2920 information in sections that are not owned by a BFD. From Richard
2921 Henderson <richard@atheist.tamu.edu>.
2923 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2924 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2925 * elflink.h (elf_link_output_extsym): Remove special check for
2928 * ecoffswap.h: Add prototypes for static functions.
2930 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2932 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2933 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2935 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2936 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2937 support. Begin support for R_PPC_SDA{2,}REL.
2939 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2941 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2942 create the .got and .got.neg sections.
2943 (ppc_elf_size_dynamic_sections): Call it.
2944 (ppc_elf_check_relocs): Call it.
2945 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2946 (ppc_elf_check_relocs): Add error messages for relocations we
2947 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2950 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2952 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2953 section flags for V.4 and eabi.
2955 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2957 * elf.c (assign_file_positions_for_segments): If a segment
2958 contains no sections, don't mark it as readable.
2960 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2961 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2963 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2964 dynamic section, if there is one.
2965 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2966 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2967 (bfd_elf64_swap_dyn_in): Likewise.
2968 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2970 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2972 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
2973 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
2974 <pirker@eiunix.tuwien.ac.at>.
2976 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2978 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
2979 PowerPC V.4 and eabi.
2980 * bfd-in2.h: Regenerate.
2981 * libfd.h: Regenerate.
2983 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
2985 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
2986 section type and SHF_EXCLUDE section flag, turning them into the
2987 appropriate bfd section flag.
2989 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2991 * xcofflink.c (xcoff_link_add_symbols): Create the special
2992 sections if we see a DYNAMIC object, in case that is the only
2993 XCOFF input object we see.
2995 * elf32-mips.c: Extensive changes for a start at dynamic linking
2996 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2998 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
2999 (struct elf_backend_data): Remove
3000 elf_backend_create_program_headers field. Add
3001 elf_backend_additional_program_headers and
3002 elf_backend_modify_segment_map fields.
3003 * elfxx-target.h (elf_backend_type_change_ok): Define if not
3005 (elf_backend_additional_program_headers): Likewise.
3006 (elf_backend_modify_segment_map): Likewise.
3007 (elf_backend_create_program_headers): Don't define.
3008 (elfNN_bed): Change to account for field changes.
3009 * elf.c (assign_file_positions_for_segments): Call new
3010 modify_segment_map backend function. Don't call old
3011 create_program_headers backend function.
3012 (get_program_header_size): Call additional_program_headers rather
3013 than create_program_headers.
3014 * elflink.h (elf_link_add_object_symbols): Initialize
3015 type_change_ok from new backend field.
3016 (elf_link_output_extsym): Don't warn if _rld_new_interface is
3018 (elf_reloc_link_order): Treat a reloc against a defined symbol as
3019 a reloc against the appropriate section.
3021 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
3022 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
3023 (elf_flags_init): Rename from elf_ppc_flags_init.
3024 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
3026 (ppc_elf_copy_private_bfd_data): Likewise.
3027 (ppc_elf_merge_private_bfd_data): Likewise.
3029 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
3032 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
3034 * coff-alpha.c (alpha_relocate_section): During final link, allow
3035 output .lita section to be bigger than 64k by adjusting gp value
3036 on a per-input section basis.
3037 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
3039 (struct ecoff_section_tdata): Add gp field.
3041 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
3043 Handle Alpha ECOFF changes in OSF/1 3.2.
3044 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
3046 * coff-alpha.c: Include "aout/ar.h".
3047 (alpha_ecoff_get_relocated_section_contents): Don't require an
3048 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
3049 3.2 doesn't generate one.
3050 (alpha_relocate_section): Likewise.
3051 (alpha_ecoff_slurp_armap): Define.
3052 (alpha_ecoff_slurp_extended_name_table): Define.
3053 (alpha_ecoff_construct_extended_name_table): Define.
3054 (alpha_ecoff_truncate_arname): Define.
3055 (alpha_ecoff_write_armap): Define.
3056 (alpha_ecoff_generic_stat_arch_elt): Define.
3057 (alpha_ecoff_update_armap_timestamp): Define.
3059 (alpha_ecoff_read_ar_hdr): New static function.
3060 (alpha_ecoff_get_elt_at_filepos): New static function.
3061 (alpha_ecoff_openr_next_archived_file): New static function.
3062 (alpha_ecoff_get_elt_at_index): New static function.
3063 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
3064 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
3065 _bfd_ecoff to alpha_ecoff.
3066 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
3067 field from backend structure, rather than always calling
3068 _bfd_get_elt_at_filepos.
3069 * coff-mips.c (mips_ecoff_backend_data): Initialize
3070 get_elt_at_filepos field.
3071 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
3072 from _bfd_generic_read_ar_hdr with minor changes.
3073 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
3074 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
3075 * libbfd.h: Rebuild.
3077 * bfd-in.h (BFD_IN_MEMORY): Define.
3078 * libbfd-in.h (struct bfd_in_memory): Define.
3079 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
3080 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
3081 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
3082 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
3083 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
3084 (bfd_get_size): Handle BFD_IN_MEMORY flag.
3085 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
3086 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
3087 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
3088 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
3090 (bfd_openstreamr): Likewise.
3091 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
3092 BFD_IN_MEMORY is not set.
3093 * riscix.c (riscix_some_aout_object_p): Likewise.
3094 * bfd-in2.h, libbfd.h: Rebuild.
3096 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
3097 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
3098 (bfd_get_elt_at_index): Define.
3099 * archive.c (_bfd_generic_get_elt_at_index): Rename from
3100 bfd_get_elt_at_index. Change index parameter from int to
3102 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
3103 (_bfd_noarchive_get_elt_at_index): Define.
3104 (_bfd_archive_bsd_get_elt_at_index): Define.
3105 (_bfd_archive_coff_get_elt_at_index): Define.
3106 * bfd-in2.h, libbfd.h: Rebuild.
3107 * aout-target.h (MY_get_elt_at_index): Define if not defined.
3108 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
3109 * ieee.c (ieee_get_elt_at_index): Define.
3110 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
3111 * oasys.c (oasys_get_elt_at_index): Define.
3112 * som.c (som_get_elt_at_index): Define.
3114 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
3115 numbers to the .text section.
3117 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
3119 * ieee.c (ieee_write_debug_part): Change return type to boolean.
3120 If there is a SEC_DEBUGGING section, get the contents of the debug
3121 information part from it.
3122 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
3124 (ieee_write_object_contents): Check ieee_write_debug_part return.
3126 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
3128 * config.bfd (i[345]86-*-freebsd*): Add target.
3129 * configure.in (i386freebsd_vec): Add vec.
3130 * configure: Regenerate.
3131 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
3132 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
3133 Rebuild dependencies..
3134 * freebsd.h: New file.
3135 * i386freebsd.c: New file.
3136 * targets.c (i386freebsd_vec): Declare.
3137 (bfd_target_vector): Add i386freebsd_vec.
3138 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3139 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3141 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
3143 * ieee.c (ieee_slurp_debug): New static function.
3144 (ieee_object_p): Call it.
3145 (ieee_slurp_section_data): Skip debugging sections.
3146 (ieee_get_reloc_upper_bound): Likewise.
3147 (ieee_get_section_contents): Likewise.
3148 (ieee_canonicalize_reloc): Likewise.
3149 (ieee_write_section_part): Likewise.
3150 (ieee_write_debug_part): Likewise.
3151 (ieee_write_data_part): Likewise.
3152 (init_for_output): Likewise.
3154 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
3156 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
3158 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
3159 relocs, since ppc_elf_relocate_section handles the linker case.
3160 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
3162 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
3163 ppc_elf_relocate_section since that is now the only caller.
3164 (ppc_elf_relocate_section): Ditto.
3166 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
3168 * coffcode.h (coff_write_object_contents): If we don't know the
3169 section of the entry point for an XCOFF executable, always set the
3170 entry address to -1.
3172 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3174 * elf.c (bfd_section_from_shdr): Add support for note sections.
3176 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
3178 * bfd-in.h (struct _symbol_info): Add stab_type field.
3179 * bfd-in2.h: Rebuild.
3180 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
3182 * elf32-ppc.c: Remove trailing newline from calls to
3184 (ppc_elf_merge_private_bfd_data): Only warn about endianness
3185 difference if target endianness is known.
3187 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3189 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
3190 old style TOC16 references without using R_PPC_GOT.
3191 (ppc_reloc_type): Ditto.
3192 (ppc_elf_reloc_type_lookup): Add support for TOC16.
3193 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
3194 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
3195 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
3196 (ppc_elf_check_relocs): New function for GOT/PLT support that is
3198 (ppc_elf_adjust_dynamic_symbol): Ditto.
3199 (ppc_elf_adjust_dynindx): Ditto.
3200 (ppc_elf_size_dynamic_sections): Ditto.
3201 (ppc_elf_finish_dynamic_symbol): Ditto.
3202 (ppc_elf_finish_dynamic_sections): Ditto.
3203 (ELF_DYNAMIC_INTERPRETER): Define.
3205 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
3207 * elf.c (copy_private_bfd_data): When attaching sections to
3208 segments ignore sections that won't be allocated. Patch from
3211 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
3213 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
3216 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
3218 * coff-i960.c (CALC_ADDEND): Define.
3219 (coff_i960_relocate_section): Add the input section VMA to the
3220 addend for PC relative relocs.
3222 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
3224 * peicode.h (pe_print_pdata): Must test the entire entry for zero
3225 to correctly terminate.
3227 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
3229 * targets.c (enum bfd_endian): Define.
3230 (bfd_target): Rename byteorder_big_p to byteorder, and change it
3231 from boolean to enum bfd_endian. Change header_byteorder_big_p
3233 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
3234 (bfd_header_big_endian, bfd_header_little_endian): New macros.
3235 * bfd-in2.h: Rebuild.
3236 * All targets: Change initialization of byteorder and
3237 header_byteorder to use enum bfd_endian values rather than
3239 * All files: Change all references to byteorder_big_p and
3240 header_byteorder_big_p to use new bfd_*_endian macros.
3242 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
3244 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
3246 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
3248 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
3250 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
3252 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
3254 * ieee.c: Lots of minor cleanups. Make many functions return
3255 errors rather than calling abort. Also:
3256 (ieee_write_twobyte): Remove; change callers to call existing
3257 ieee_write_2bytes function.
3258 (ieee_write_expression): Don't output the section twice when
3259 outputting a local symbol. Don't emit an extraneous zero if there
3261 (ieee_slurp_sections): Set the lma as well as the vma.
3262 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
3264 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
3265 a recognized one or bfd_arch_unknown.
3266 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
3268 (ihex_get_symtab): Likewise.
3270 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
3272 * aoutx.h: Include <ctype.h>.
3273 (struct aout_link_includes_table): Define.
3274 (struct aout_link_includes_totals): Define.
3275 (struct aout_link_includes_entry): Define.
3276 (aout_link_includes_lookup): Define macro.
3277 (struct aout_final_link_info): Add includes field.
3278 (aout_link_includes_newfunc): New static function.
3279 (NAME(aout,final_link)): Initialize includes hash table.
3280 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
3282 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
3284 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
3286 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
3288 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
3290 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
3292 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
3293 (pe_print_private_bfd_data): call pe_print_reloc.
3294 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
3295 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
3296 up some debugging as well.
3298 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
3300 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
3303 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
3305 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
3306 when setting sections to NULL.
3308 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
3310 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
3312 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
3313 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
3315 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3316 * bfd-in2.h: Rebuild.
3318 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
3320 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
3322 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
3324 * ihex.c (ihex_scan): Handle record types 4 and 5.
3325 (ihex_object_p): Permit types 4 and 5.
3326 (ihex_set_section_contents): Remove check for out of range
3328 (ihex_write_object_contents): Generate types 4 and 5.
3330 * elflink.h (elf_link_output_extsym): Just ignore warning and
3331 indirect references to symbols which don't really exist.
3333 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
3335 * peicode.h (pe_print_idata): Minor format fixes
3336 (pe_print_edata): New function. Under private printing, this formats
3337 the edata section of a PE file.
3338 (pe_print_private_bfd_data): Added call to pe_print_edata.
3340 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3342 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
3343 index, don't call stoi.
3345 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
3347 * srec.c (srec_scan): Set lma as well as vma.
3349 * ihex.c: New file; support for Intel Hex format.
3350 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
3351 (ihex_vec): Declare.
3352 (bfd_target_vector): Always include ihex_vec.
3353 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
3354 * Makefile.in: Rebuild dependencies.
3355 (BFD_LIBS): Add ihex.o
3356 (BFD_LIBS_CFILES): Add ihex.c.
3357 * bfd-in2.h: Rebuild.
3359 * elf.c (assign_file_positions_for_segments): Sort the sections in
3361 (get_program_header_size): Return the right size if segment_map is
3363 (copy_private_bfd_data): Don't bother to sort the sections.
3365 * bfd.c (bfd_record_phdr): New function.
3366 * bfd-in.h (bfd_record_phdr): Declare.
3367 * bfd_in2.h: Rebuild.
3369 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
3372 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
3373 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
3375 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
3376 (bfd_zmalloc): Change declaration.
3377 * libbfd.h: Rebuild.
3378 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
3379 and realloc. Don't set bfd_error_no_memory if they fail.
3381 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
3383 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
3384 uses as well. Added a new howto to deal with TOCREL16 relocs that
3385 are TOCDEFN as well.
3386 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
3387 to handle RVA relocs from dlltool.
3388 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
3389 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
3390 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
3392 * coffcode.h (coff_set_alignment_hook): check idata$X sections
3393 to get the right section alignment.
3395 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
3397 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3398 p_paddr if p_paddr is zero.
3399 (make_mapping): Set includes_filehdr and includes_phdrs for first
3401 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
3403 (assign_file_positions_for_segments): Handle includes_filehdr and
3404 includes_phdrs. Remove special handling of PT_PHDR and first
3406 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
3407 when appropriate. Remove special handling of PT_PHDR segment.
3408 Use a more complex condition for when a section is included in a
3409 segment to handle Solaris linker oddities.
3411 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3413 * coff-m88k.c (howto_table): Reformatted for easier reading;
3414 special_function now points to new function m88k_special_reloc.
3415 (howto_hvrt16): Function previously used for handling HVRT16 relocs
3417 (rtype2howto): Do not add reloc's r_offset to the addend, this will
3418 be done correctly by m88k_special_reloc.
3419 (reloc_processing): New function to be used by RELOC_PROCESSING.
3420 (RELOC_PROCESSING): Define to call reloc_processing.
3422 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
3424 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
3425 (pe_print_pdata): Likewise.
3427 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
3428 obstack_alloc fails.
3429 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
3431 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
3432 * Many files: don't set bfd_error_no_memory if one of the above
3435 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
3436 if p_paddr_valid is set.
3437 (copy_private_bfd_data): New static function.
3438 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
3440 * elf.c (assign_file_positions_for_segments): Fix case where extra
3441 program headers were allocated.
3443 * elf.c (_bfd_elf_print_private_bfd_data): New function.
3444 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
3445 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
3446 _bfd_elf_print_private_bfd_data.
3448 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
3449 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
3450 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
3451 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
3452 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
3453 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
3454 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
3456 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
3458 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
3459 * elf.c (make_mapping): New static function.
3460 (map_sections_to_segments): New static function.
3461 (elf_sort_sections): New static function.
3462 (assign_file_positions_for_segments): New static function.
3463 (map_program_segments): Remove.
3464 (get_program_header_size): Remove sorted_hdrs, count, and
3465 maxpagesize parameters. Simplify.
3466 (assign_file_positions_except_relocs): When generating an
3467 executable, use assign_file_positions_for_segments.
3468 (elf_sort_hdrs): Remove.
3469 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
3470 to get_program_header_size.
3472 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
3474 * hp300hpux.c (MY(callback)): Set lma as well as vma.
3476 * configure, config.in: Regenerate with autoconf 2.7.
3478 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
3479 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
3481 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
3483 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
3484 (ecoff_sec_to_styp_flags): Likewise.
3485 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
3486 (ecoff_set_symbol_info): Handle scRConst.
3487 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
3488 (ecoff_compute_section_file_positions): Handle .rconst section.
3489 (_bfd_ecoff_write_object_contents): Likewise.
3490 (ecoff_link_check_archive_element): Handle scRConst.
3491 (ecoff_link_add_externals): Likewise.
3492 (ecoff_link_write_external): Handle .rconst section.
3493 (ecoff_reloc_link_order): Likewise.
3494 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
3495 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
3497 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
3499 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
3500 DEF_DYNAMIC flag is set.
3502 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
3504 * host-aout.c: If TRAD_HEADER is defined, include it.
3506 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
3508 * aclocal.m4 (AC_PROG_CC): Remove local definition.
3509 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
3510 (BFD_NEED_DECLARATION): New function.
3511 * configure.in: Use BFD_NEED_DECLARATION.
3512 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
3513 * configure, config.in: Rebuild with autoconf 2.6.
3515 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
3516 special_sections before returning when called with a non XCOFF
3519 * coffgen.c (coff_renumber_symbols): Sort common symbols with
3522 * coffcode.h (coff_compute_section_file_positions): Only pad the
3523 previous section to force file alignment when creating an
3526 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
3528 * coffcode.h (coff_compute_section_file_positions): If
3529 RS6000COFF_C, set up the .debug section.
3531 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
3532 if it is not large enough to accomodate the entire TOC area with
3533 signed 16 bit offsets.
3534 (xcoff_write_global_symbol): Handle negative TOC offsets in global
3536 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
3537 TOC anchor to use the TOC value used in the output file.
3539 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
3541 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
3542 (_bfd_coff_read_string_table): Likewise.
3544 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3546 * pe-arm.c: Fix typos.
3547 * coff-arm.c: Likewise.
3549 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
3551 * coff-ppc.c (list_ele): Added "cat"egory member.
3552 (record_toc): New category parameter (priv or pub).
3553 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
3554 (ppc_process_before_allocation): Removed embrionic data-in-toc from
3555 the mainline. It addes extra toc cells in error.
3556 (ppc_coff_swap_sym_in_hook): Added some documentation.
3557 (dump_toc): Can now diagnose "virtual toc" chicanery.
3559 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
3561 * elf-bfd.h (struct elf_link_hash_table): Change type of
3562 dynsymcount and bucketcount fields from size_t to bfd_size_type.
3564 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
3566 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
3567 pointerize C_LEAFSTAT or C_LEAFEXT entries.
3569 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
3570 DT_INIT and DT_FINI entries if the _init or _fini symbol is
3571 defined or mentioned in a regular file.
3573 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
3575 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
3576 (coff_ppc_relocate_section): Handle TOCDEFN attribute
3577 (coff_ppc_relocate_section): Correct REL24 handling
3578 (ppc_process_before_allocation): Correct TOCDEFN handling
3580 * peicode.h (dir_names): Added name descriptions
3582 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
3584 * VERSION: Updated to cygnus-2.6.
3586 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
3588 * targets.c (m68k4knetbsd_vec): Declare.
3590 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
3592 * targets.c (bfd_target): Change type of second argument to
3593 _bfd_print_private_bfd_data from void * to PTR.
3594 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
3595 using PTR rather than void *.
3596 * bfd-in2, libbfd.h: Rebuild.
3597 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
3599 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
3600 _bfd_generic_bfd_print_private_bfd_data rather than casting
3603 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
3605 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
3606 "DO NOT DELETE" lines or blank lines that mkdep writes on some
3608 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
3609 BFD64_BACKENDS_CFILES): New variables.
3612 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
3614 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
3615 not at the file position of the first section.
3616 * coffcode.h (coff_compute_section_file_positions): Avoid using
3618 (coff_write_object_contents): When generating a PPC PE executable
3619 with no symbols, round up the file size to a COFF_PAGE_SIZE
3621 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
3622 don't write out a string table.
3624 * elf.c (bfd_section_from_shdr): When using a different section
3625 header, pass the new one to _bfd_elf_make_section_from_shdr.
3626 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
3627 (elf_map_symbols): Add section VMA to symbol value when comparing
3629 (_bfd_elf_compute_section_file_positions): Only build symbol table
3630 if there are some symbols. Set file offset of symtab and strtab
3632 (assign_file_positions_except_relocs): Remove dosyms parameter.
3633 Change all callers. Never set file offset of symtab and strtab
3635 (_bfd_elf_copy_private_section_data): New function.
3636 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
3637 (_bfd_elf_copy_private_symbol_data): New function.
3638 (swap_out_syms): Check for special mapping of st_shndx created by
3639 copy_private_symbol_data.
3640 * elfxx-target.h: Use new copy routines.
3641 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
3642 (_bfd_elf_copy_private_section_data): Declare.
3644 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
3646 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3649 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3650 _bfd_dummy_target, matching the recent change to archive
3653 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3655 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3656 arithmetic on PTR types.
3658 * aout-target.h (MY(callback)): Set the lma of the sections.
3660 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3661 symbol into a reloc against the section.
3663 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3665 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3666 glue for the relocs: IMGLUE and IFGLUE.
3667 (record_toc): new function - tracks toc contents
3668 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3669 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3670 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3671 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
3672 (ppc_record_toc_entry): Removed a debug define (duh)
3674 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3675 (pe_print_idata): New function - formats the idata section data
3676 (pe_print_pdata): New function - formats the pdata section data
3677 (pe_print_private_bfd_data): calls to above
3679 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3681 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3682 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3683 TARGET_SYM and TARGET_NAME for vector and BFD name.
3684 * coff-pmac.c (pmac_xcoff_vec): Remove.
3685 (TARGET_SYM, TARGET_NAME): Define.
3686 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3687 machine to 0, not all PowerMacs are 601s.
3689 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3691 * elfcode.h (elf_object_p): Read in any program headers.
3692 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3693 based on the program headers, if any.
3694 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3695 (map_program_segments): Set p_paddr of program headers based on
3698 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3700 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3703 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3704 trying to do a relocateable link with a non-a.out object file.
3706 * archive.c (bfd_generic_archive_p): Check the first object file
3707 in an archive even if target_defaulted is set. If the object file
3708 has the wrong xvec, reject it.
3710 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3711 be represented, report the name via _bfd_error_handler.
3712 (translate_to_native_sym_flags): Likewise.
3713 * elf32-mips.c (mips_elf_final_link): Likewise.
3714 * oasys.c (oasys_write_sections): Likewise.
3716 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3717 which checks for STYP_OVRFLO sections.
3718 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3719 reloc and lineno count overflows.
3720 (coff_write_object_contents): Call coff_count_linenumbers before
3721 coff_compute_section_file_positions. If RS6000COFF_C, handle
3722 reloc and lineno count overflows.
3723 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3724 relocs before dealing with .pad sections. Count overflow section
3725 headers when handling .pad sections.
3727 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3730 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3731 (struct xcoff_link_hash_table): Add descriptor_section and
3732 special_sections fields.
3733 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3734 (xcoff_link_add_symbols): Set linkage section alignment. Create
3735 descriptor section. Check for magic symbol names (_text, etc.),
3736 and record them in special_sections if found. Set
3737 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3738 descriptor field to point back to the function code symbol.
3739 (xcoff_sweep): Always mark the special descriptor_section.
3740 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3741 function descriptor, and mark it if it is.
3742 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3743 parameter, and fill it in. Allocate space for the descriptor
3745 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3746 global linkage code. If an undefined function descriptor is
3747 exported, arrange to define it. Warn about any other undefined
3749 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3750 (xcoff_write_global_symbol): Create a function descriptor when
3752 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3753 * bfd-in2.h: Rebuild.
3755 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3757 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3758 (ppc_coff_link_hash_table): new types for hashing
3759 (ppc_coff_link_hash_newfunc): hash entry constructor
3760 (ppc_coff_link_hash_table_init): hash table initializer
3761 (ppc_coff_link_hash_table_create): hash table constructor
3762 (ppc_record_toc_entry): changed references to hash table
3763 (coff_ppc_relocate_section): changed references to hash table
3765 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3766 * libcoff.h: Rebuild
3768 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3769 (coff_link_add_symbols): removed toc_offset init
3771 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3773 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3776 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3777 if it is given and mmep is available.
3778 * acconfig.h: Undef USE_MMAP.
3779 * configure, config.in: Regenerated.
3780 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3781 table handling the old way.
3782 (aout_get_external_symbols): Don't complain if last byte of string
3784 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3785 (bfd_free_window) [! USE_MMAP]: Don't define.
3786 (bfd_get_file_window,
3787 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3789 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3791 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3794 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3796 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3797 compatible with AMD generated COFF files. Try to support both AMD
3798 and GNU formats simultaneously.
3799 (coff_a29k_relocate_section): Likewise.
3801 * libbfd.c (bfd_get_file_window): Change writable parameter from
3802 int to boolean; update all callers. Pass MAP_SHARED if not
3803 writable--it's required on Solaris. Cast fprintf argument to
3805 * bfd-in.h (bfd_get_file_window): Update declaration.
3806 * bfd-in2.h: Rebuild.
3807 * aoutx.h: Update calls to bfd_get_file_window.
3809 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3811 (xcoff_swap_ldhdr_in): New static function.
3812 (xcoff_swap_ldsym_in): New static function.
3813 (xcoff_find_reloc): Handle the case of a single reloc correctly.
3814 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3815 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
3816 Handle XTY_ER/XMC_XO symbols correctly.
3817 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3818 rather than normal symbol table.
3819 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3820 already defined with the same absolute value.
3821 (xcoff_mark): When considering called symbols, check whether the
3822 descriptor is from a dynamic object, rather than the symbol
3824 (xcoff_build_ldsyms): Likewise.
3826 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3827 Cast realloc and malloc return values. If malloc or realloc fail,
3828 set bfd_error_no_memory.
3829 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3830 * bfd-in2.h: Rebuild.
3832 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3834 * coff-ppc.c (ppc_record_toc_entry): new function.
3835 (in_reloc_p): changed return value.
3836 (coff_ppc_relocate_section): much rework.
3837 (ppc_allocate_toc_section): new function.
3838 (ppc_process_before_allocation): new function.
3839 (ppc_coff_swap_sym_in_hook): new function.
3841 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3842 (coff_link_add_symbols): initialize toc_offset.
3844 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3845 (coff_swap_aouthdr_out): Added more sections to the data
3846 dictionary for the pe file header. Also changed linker version
3847 number on the ppc side.
3848 (dir_names): small improvements to the dictionary printing.
3849 (pe_mkobject_hook): save the file level flags.
3851 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3852 (pe_tdata): added real_flags field
3853 (coff_tdata): added local_toc_sym_map and access macro
3855 * libcoff.h (coff_link_hash_entry): added toc_offset field
3856 (pe_tdata): added real_flags field
3857 (coff_tdata): added local_toc_sym_map and access macro
3859 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3860 (coff_mkobject): init for local_toc_sym_map
3861 (coff_write_object_contents): set the internal_a.magic to
3862 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3865 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3867 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3868 entries until both the line number address and the function name
3869 address are too large.
3871 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3872 * configure: Rebuilt.
3874 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3875 is defined in the environment.
3877 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3879 * som.c (som_get_section_contents_in_window): Define to use
3882 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3884 * coff-i860.c: New file, based on coff-i386.c.
3885 * cpu-i860.c: New file, based on cpu-i386.c.
3886 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3887 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3888 targets, using i860coff_vec.
3889 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3890 trad-core.o and hosts/i860mach3.h.
3891 (i860coff_vec): Use coff-i860.o and cofflink.o.
3892 * configure: Rebuild.
3893 * Makefile.in: Rebuild dependencies.
3894 (ALL_MACHINES): Add cpu-i860.o.
3895 (BFD32_BACKENDS): Add coff-i860.o.
3896 (CFILES): Add cpu-i860.c and coff-i860.c.
3897 * targets.c (i860coff_vec): Declare.
3898 (bfd_target_vector): Add &i860coff_vec.
3899 * archures.c (bfd_i860_arch): Declare.
3900 (bfd_archures_list): Add &bfd_i860_arch.
3901 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3902 (coff_set_flags): Handle bfd_arch_i860.
3903 (coff_write_object_contents): Handle I860 a.out magic number.
3905 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3907 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3908 the created .tc section to 2.
3909 (xcoff_mark): Don't keep a .loader reloc for a call to an
3910 undefined symbol when creating a shared library.
3911 (xcoff_build_ldsyms): When creating a shared library, generate
3912 global linkage code for a call to an undefined symbol.
3914 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3916 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3917 BFD32_BACKENDS, BFD64_BACKENDS.
3918 (.dep1): Put mkdep output in a separate file.
3919 Rebuilt dependencies.
3921 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3924 Permit use of mmap when available:
3926 * configure.in: Check for mmap, madvise, mprotect.
3927 * config.in, configure: Regenerated.
3929 * libbfd.c (struct _bfd_window_internal): Define type.
3930 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3932 (ok_to_map): New static variable for debugging.
3933 (_bfd_generic_get_section_contents_in_window): New function.
3934 * bfd-in.h (bfd_window_internal): Declare type.
3935 (bfd_window): Define type.
3936 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3937 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3940 * libaout.h (struct aoutdata): Add two window fields.
3941 (obj_aout_sym_window, obj_aout_string_window): New macros.
3942 * aoutx.h (some_aout_object_p): Initialize windows.
3943 (aout_get_external_symbols): Get symbol data and strings in
3944 windows instead of explicitly allocated buffers.
3945 (slurp_symbol_table): Free window instead of memory.
3946 (bfd_free_cached_info): Release windows instead of freeing storage
3948 (aout_link_free_symbols): Ditto.
3950 * targets.c (bfd_target): Add new field for
3951 get_section_contents_in_window.
3952 (BFD_JUMP_TABLE_GENERIC): Updated.
3953 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3954 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3955 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3956 macros for get_section_contents_in_window field.
3958 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3960 * core.c: Renamed to corefile.c
3961 * makefile.dos (OBJS): Change core.o to corefile.o
3962 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3965 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3967 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3968 targ_selvecs to allow debugging under Irix-5 native.
3971 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
3973 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
3974 to o. Clobber and restore the list of new csects around the call
3975 to _bfd_generic_link_add_one_symbol, in case it wants to report a
3976 linker error and the linker wants to read the symbol table. Reset
3977 the line number count of a real section even if it has no relocs.
3978 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
3980 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
3983 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
3985 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
3986 an undefined symbol in a shared link.
3988 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
3989 oldtype from bfd_link_order_type to bfd_link_hash_type. From
3990 phdm@info.ucl.ac.be (Philippe De Muyter).
3992 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3994 * coff-m88k.c (rtype2howto): New static function.
3995 (RTYPE2HOWTO): Use it rather than a macro definition.
3997 * coffcode.h (coff_write_object_contents): set internal_a.magic
3998 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
4000 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
4001 define TRAD_HEADER to new file hosts/delta68.h.
4002 m88*-motorola-sysv*, however, does use ptrace-core.o.
4003 * hosts/delta68.h: New file.
4005 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
4006 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
4008 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
4010 * i386linux.c (MY(vec)): Declare before use.
4012 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
4014 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
4015 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
4017 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4018 BFD is not of the right type.
4019 (bfd_elf_get_needed_list): Likewise.
4020 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
4021 * sunos.c (bfd_sunos_get_needed_list): Likewise.
4022 * xcofflink.c (XCOFF_XVECP): Define.
4023 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
4025 (bfd_xcoff_import_symbol): Likewise.
4026 (bfd_xcoff_export_symbol): Likewise.
4027 (bfd_xcoff_link_count_reloc): Likewise.
4028 (bfd_xcoff_record_link_assignment): Likewise.
4029 (bfd_xcoff_size_dynamic_sections): Likewise.
4031 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
4032 table index against the number of symbols for a base relative
4035 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
4037 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
4038 full_aouthdr flag here...
4039 (_bfd_xcoff_bfd_final_link): ...not here.
4041 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
4043 * libelf.h: Rename to elf-bfd.h to avoid conflict with
4044 systems that have a system <libelf.h>.
4045 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
4046 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
4047 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
4048 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
4049 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
4050 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
4051 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
4053 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
4055 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
4056 set, set BSF_WEAK in symbol. Change all callers.
4057 (ecoff_get_extr): Set weakext based on BSF_WEAK.
4058 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
4059 _bfd_generic_link_add_one_symbol.
4060 (ecoff_indirect_link_order): Check that the section tdata relocs
4061 are not NULL before using them.
4063 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
4064 define TRAD_HEADER as hosts/alphalinux.h.
4065 * configure: Rebuild.
4066 * hosts/alphalinux.h: New file.
4067 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
4070 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
4072 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
4073 C_ECOMM storage classes.
4075 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
4077 (xcoff_mark): Call xcoff_mark_symbol.
4078 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
4079 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
4081 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
4083 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
4085 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
4087 (xcoff_find_reloc): New static function.
4088 (xcoff_link_add_symbols): Use it.
4089 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
4090 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
4091 relocate the value of C_DECL.
4093 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
4095 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
4097 * cofflink.c (_bfd_coff_generic_relocate_section): Make
4098 callback decide what goes in .relocs.
4099 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
4100 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
4103 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
4105 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
4108 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
4110 * xcofflink.c: More improvements, mostly to fix handling of
4111 constructors and a few other special cases.
4112 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
4113 zero, reverting yesterday's change.
4114 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
4115 (bfd_xcoff_link_count_reloc): Declare.
4116 (bfd_xcoff_record_link_assignment): Declare.
4117 * bfd-in2.h: Rebuild.
4119 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
4121 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
4122 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
4123 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
4124 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
4125 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
4126 Change PAGE_SIZE to TARGET_PAGE_SIZE.
4128 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
4131 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
4132 segments includes the a.out header. See to that the magic number
4133 *always* is big-endian.
4135 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
4136 m68k4k NetBSD configurations.
4138 * configure.in, configure: Separate i386 & mips NetBSD
4139 configurations from other BSD ones. Don't assume DEC is the only
4140 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
4141 configurations. Add support for m68k4k NetBSD object format.
4143 * libaout.h: Added M_68K4K_NETBSD magic.
4145 * m68k4knetbsd.c: New file.
4147 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
4149 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
4152 * hosts/mipsnbsd.h: New file.
4155 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
4157 * config.bfd: Add config stuff for mips*-*-magic* to set
4158 targ_defvec to ecoff_big_vec.
4161 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
4163 * xcofflink.c: Numerous changes to get closer to a working XCOFF
4165 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
4166 toc_section, and entry_section fields.
4167 (struct xcoff_section_tdata): Remove ldrel_count field.
4168 * libcoff.h: Rebuild.
4169 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
4171 (coff_compute_section_file_positions): If RS6000COFF_C, generate
4172 full a.out header if full_aouthdr is set in xcoff_data.
4173 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
4174 based on sections stored in xcoff_data.
4175 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
4177 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4178 (rs6000coff_vec): Set symbol_leading_char to '.'.
4179 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
4180 value stored in ret rather than returning a pointer value.
4182 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4184 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
4187 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
4189 * som.c (som_slurp_string_table): Allocate the strings with malloc
4190 since they're free'd by free_cached_info.
4191 (som_slurp_symbol_table): Similarly for the symbol table.
4193 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
4195 * Makefile.in (diststuff): Don't make headers.
4197 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
4199 * Makefile.in: Rebuild dependencies.
4201 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
4202 output_bfd is not SunOS.
4203 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
4204 non-SunOS input files.
4206 * xcofflink.c: Extensive changes to support linking shared objects
4207 and generating a .loader section.
4208 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
4209 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
4210 last_symndx, and ldrel_count fields.
4211 * libcoff.h: Rebuild.
4212 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
4213 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
4215 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
4216 (bfd_xcoff_export_symbol): Declare.
4217 (bfd_xcoff_size_dynamic_sections): Declare.
4218 * bfd-in2.h: Rebuild.
4220 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
4222 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
4223 * configure: Rebuild.
4224 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
4225 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
4227 (pmac_xcoff_vec): Update to use new xcoff support.
4228 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
4229 (xcoff_write_armap): Declare buf as unsigned char.
4230 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
4232 * mpw-make.sed: Generalize subdir_do edit.
4234 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
4236 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
4237 correctly. Don't initialize asect->vma.
4239 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
4241 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
4242 something a little less than the page size.
4244 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
4246 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
4248 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
4250 * coff-i386.c (coff_i386_reloc_type_lookup): New.
4251 * coffcode.h (coff_write_object_contents): If .bss is before
4252 .data us that as data_start.
4253 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
4255 * peicode.h (add_data_entry): Use _cooked_size of data directory.
4256 (coff_swap_outhdr_out): Hardwire in version number.
4258 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
4260 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
4261 major and minor to *_vno, since the former are also macros in
4262 SunOS header files. Cast result of bfd_alloc to appropriate
4265 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
4266 before assigning to sec_data.
4268 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
4270 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
4271 now relative to the section, not absolute.
4272 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
4273 get the file name when there is a N_SO directory name. When
4274 handling stabs, remember that section->vma was added to the
4277 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
4279 * sunos.c (struct sunos_link_hash_table): Add needed field.
4280 (sunos_link_hash_table_create): Call bfd_release, not free.
4281 (sunos_link_hash_table_create): Initialize needed field.
4282 (sunos_add_dynamic_symbols): Record needed objects.
4283 (bfd_sunos_get_needed_list): New function.
4284 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
4285 * bfd-in2.h: Rebuild.
4287 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
4289 * libcoff-in.h (pe_data_type.in_reloc_p): New.
4291 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
4293 * bfd-in.h (struct bfd_link_needed_list): Rename from
4294 bfd_elf_link_needed_list.
4295 * bfd-in2.h: Rebuild.
4296 * elf.c, elflink.h, libelf.h: Corresponding changes.
4298 Add start at AIX linker support; no shared libraries yet.
4299 * xcofflink.c: New file.
4300 * configure.in (rs600coff_vec): Use xcofflink.o.
4301 * configure: Rebuild.
4302 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
4304 (struct xcoff_section_tdata): Define.
4305 (xcoff_section_data): Define macro.
4306 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
4307 (_bfd_xcoff_bfd_link_add_symbols): Declare.
4308 (_bfd_xcoff_bfd_final_link): Declare.
4309 (_bfd_ppc_xcoff_relocate_section): Declare.
4310 * libcoff.h: Rebuild.
4311 * coff-rs6000.c: Clean up a bit.
4312 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
4313 cputype, csects, and debug_indices.
4314 (xcoff_copy_private_bfd_data): Copy cputype.
4315 (xcoff_howto_table): Rename from rs6000coff_howto_table.
4316 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
4317 (xcoff_reloc_type_lookup): Rename from
4318 rs6000coff_reloc_type_lookup.
4319 (coff_relocate_section): Define.
4320 (_bfd_xcoff_sizeof_headers): Define.
4321 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
4322 (_bfd_xcoff_bfd_relax_section): Define.
4323 (_bfd_xcoff_bfd_link_split_section): Define.
4324 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
4326 * coffcode.h (coff_compute_section_file_positions): If AIX,
4327 increment sofar by SMALL_AOUTSZ if not executable.
4328 (coff_write_object_contents): If AIX, always output an a.out
4329 header; if not executable, header size of SMALL_AOUTSZ.
4330 * hash.c (struct bfd_strtab_hash): Add xcoff field.
4331 (_bfd_stringtab_init): Initialize xcoff field.
4332 (_bfd_xcoff_stringtab_init): New function.
4333 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
4334 (_bfd_stringtab_emit): In XCOFF mode, write out length.
4335 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
4336 * libbfd.h: Rebuild.
4337 * Makefile.in: Rebuild dependencies.
4338 (BFD32_BACKENDS): Add xcofflink.o.
4339 (CFILES): Add xcofflink.c.
4341 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
4342 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
4343 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
4345 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4347 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
4349 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
4351 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
4352 * config.in: Regenerated.
4354 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
4355 (_bfd_chunksize): New variable.
4356 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
4357 for obstack chunk size.
4358 * configure.in: Check for getpagesize.
4359 * configure: Regenerated.
4361 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4363 * trad-core.c (rawptr): Make it a local variable of
4364 ptrace_unix_core_file_p.
4366 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
4368 * coff-arm.c (in_reloc_p): New.
4369 * coff-i386.c (in_reloc_p): New.
4370 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
4371 (coff_write_object_contents): Only set has_reloc_section
4373 * cofflink.c (_bfd_coff_generic_relocate_section): Call
4374 in_reloc_p to decide if reloc should be emitted.
4375 * libcoff.h (pe_data_type.in_reloc_p): New.
4376 * peicode.h (pe_mkobject): Initialize in_reloc_p.
4378 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
4380 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
4381 (_bfd_coff_read_internal_relocs): Likewise.
4382 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
4383 (_bfd_coff_read_internal_relocs): Likewise.
4385 * elflink.h (elf_link_add_object_symbols): Correct conditions
4386 under which type and size change warnings are issued.
4388 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
4390 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
4391 a symbol which is not in a real section.
4392 (coff_write_native_symbol): Corresponding change.
4394 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
4395 coff_link_hash_newfunc and make non-static.
4396 (_bfd_coff_link_hash_table_init): New function, broken out of
4397 _bfd_coff_link_hash_table_create.
4398 (_bfd_coff_link_hash_table_create): Use it.
4399 (process_embedded_commands): Make static.
4400 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
4401 (_bfd_coff_link_hash_table_init): Declare.
4402 * libcoff.h: Rebuild.
4404 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
4405 field in XCOFF tdata.
4406 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
4407 U802ROMAGIC, for clarity. Try to set arch and machine correctly
4408 based on cputype stored in a.out header, or in n_type of initial
4410 (coff_write_object_contents): Set cputype correctly in a.out
4412 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
4414 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
4415 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
4417 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
4418 * libcoff.h: Rebuild.
4420 * cpu-rs6000.c (rs6000_compatible): New static function.
4421 (bfd_rs6000_arch): Use it.
4422 * cpu-powerpc.c (powerpc_compatible): New static function.
4423 (arch_info_struct): Define various flavours of PowerPC.
4424 (bfd_powerpc_arch): Use powerpc_compatible. Point at
4427 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
4429 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
4431 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
4433 * elflink.h (elf_link_add_object_symbols): Don't warn about
4434 changing the size or type if the old definition was weak.
4436 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
4438 * coffcode.h (combined_entry_type): Add fix_line field.
4439 (coff_slurp_line_table): Warn if we try to set the lineno field of
4441 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
4442 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
4443 * coffgen.c (coff_mangle_symbols): Handle fix_line.
4444 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
4446 (coff_print_symbol): Print fix_value symbols in a useful fashion.
4447 * libcoff.h: Rebuild.
4449 * libcoff-in.h (struct xcoff_tdata): Define.
4450 (xcoff_data): Define.
4451 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
4452 * bfd-in2.h, libcoff.h: Rebuild.
4453 * coff-rs6000.c (xcoff_mkobject): New static function.
4454 (coff_mkobject): Define.
4455 (xcoff_copy_private_bfd_data): New static function.
4456 (coff_bfd_copy_private_bfd_data): Define.
4457 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
4459 (rs6000coff_vec): Add DYNAMIC to object_flags.
4460 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
4461 .loader sections specially.
4462 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
4463 section alignment from the XCOFF tdata information.
4464 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
4465 F_SHROBJ, and copy the extra a.out header information into the
4466 XCOFF tdata structure.
4467 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
4468 F_DYNLOAD and the extra a.out header information.
4469 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
4470 C_HIDEXT symbol with attached csect information.
4471 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
4472 in the o_maxdata field.
4473 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
4474 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
4475 end if BSF_NOT_AT_END is set.
4477 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
4478 _bfd_read_ar_hdr_fn.
4479 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
4480 * bfd-in2.h, libbfd.h: Rebuild.
4481 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
4483 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
4484 (bfd_slurp_bsd_armap_f2): Likewise.
4485 (_bfd_slurp_extended_name_table): Likewise.
4487 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
4489 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4491 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
4492 when the symbol table is empty.
4494 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
4495 space for section symbols, since we don't output them either.
4496 (elf_m68k_adjust_dynindx): Removed.
4498 * ptrace-core.c (rawptr): Make it a local variable of
4499 ptrace_unix_core_file_p.
4501 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4503 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
4506 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
4507 Mac object file formats.
4509 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
4511 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
4512 auxent if there isn't one.
4513 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
4514 rather than FILNMLEN as the maximum name length.
4516 * coffcode.h (bfd_coff_backend_data): Add new field
4517 _bfd_coff_print_aux.
4518 (bfd_coff_print_aux): New static function.
4519 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
4520 scnlen field of an XTY_LD csect aux entry.
4521 (coff_print_aux): New static function.
4522 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
4523 in coff_pointerize_aux_hook.
4524 (bfd_coff_std_swap_table): Initialize new field.
4525 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
4526 * libcoff.h: Rebuild.
4527 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4528 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4530 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
4531 if there are symbols, for native AIX ld compatibility.
4533 * coffcode.h (bfd_coff_backend_data): Add new field
4534 _bfd_coff_pointerize_aux_hook.
4535 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
4536 or I960, and as 0 otherwise.
4537 (bfd_coff_std_swap_table): Initialize new field.
4538 * libcoff.h: Rebuild.
4539 * coffgen.c (coff_pointerize_aux): Change parameters to take
4540 symbol pointer instead of type and class, and to take aux index.
4541 Call _bfd_coff_pointerize_aux_hook if it is defined.
4542 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
4543 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
4544 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4546 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
4547 read-only/host-only support.
4549 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
4551 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
4554 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
4555 BFD_JUMP_TABLE_ARCHIVE accordingly.
4556 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
4557 (_bfd_compute_and_write_armap): Declare.
4558 (_bfd_generic_read_ar_hdr): Declare.
4559 (_bfd_read_ar_hdr): Define.
4560 (_bfd_noarchive_read_ar_hdr): Define.
4561 (_bfd_archive_bsd_read_ar_hdr): Define.
4562 (_bfd_archive_coff_read_ar_hdr): Define.
4563 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
4564 _bfd_read_ar_hdr instead.
4565 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
4566 (_bfd_compute_and_write_armap): Rename from
4567 compute_and_write_armap. Make non-static. Change all callers.
4568 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
4569 than _bfd_snarf_ar_hdr.
4570 * aout-target.h (MY_read_ar_hdr): Define if not defined.
4571 * ieee.c (ieee_read_ar_hdr): Define.
4572 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
4573 * oasys.c (oasys_read_ar_hdr): Define.
4574 * som.c (som_read_ar_hdr): Define.
4575 * bfd-in2.h, libbfd.h: Rebuild.
4577 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
4579 * peicode.c (coff_swap_filehdr_in): If symptr is
4580 zero, there aren't any symbols, even if nsyms is set.
4582 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
4584 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
4586 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
4587 sections, and set styp correctly for them: .got, .hash, .dynamic,
4588 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
4589 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
4591 (ecoff_sort_hdrs): New static function.
4592 (ecoff_compute_section_file_positions): Return boolean, not void.
4593 Sort the sections by VMA before looking through them. Put the
4594 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
4595 section on an appropriate boundary within the page.
4596 (ecoff_compute_reloc_file_positions): Check return value of
4597 ecoff_compute_section_file_positions.
4598 (_bfd_ecoff_set_section_contents): Likewise.
4599 (_bfd_ecoff_write_object_contents): Check for various Alpha
4600 section types when incrementing text_size and data_size. Call
4601 adjust_headers backend function if it exists.
4602 * coff-alpha.c (alpha_adjust_headers): New static function.
4603 (alpha_ecoff_backend_data): Initialize adjust_headers field.
4604 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4606 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
4608 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
4610 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
4611 of ALTERNATE_AIX_CORE_FORMAT.
4612 * configure.in (aix4): No longer need CORE_FLAGS.
4613 * configure: Updated.
4615 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
4617 NS32k changes from Ian Dall:
4618 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
4620 (aout_link_input_section_std, aout_link_input_section_ext,
4621 aout_link_reloc_link_order): Call them instead of _bfd_*
4623 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
4625 (backend_data): Use it instead of hardcoded zero.
4627 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
4628 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
4630 * ns32knetbsd.c: Include bfd.h.
4631 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
4632 (MY_bfd_reloc_type_lookup): Declare function too.
4633 * pc532-mach.c (set_sizes): Don't declare.
4634 (MY_text_includes_header, MY_exec_header_not_counted): Define.
4635 (backend_data, MY_backend_data): Don't define.
4637 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
4638 ns32k-*-lites* like ns32k-*-netbsd*.
4640 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
4643 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
4645 * coffcode.h (coff_write_object_contents): Restore setting
4646 f_timdat to 0, deleted on August 22.
4648 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4650 * coffcode.h (coff_bfd_copy_private_symbol_data,
4651 coff_bfd_copy_private_section_data,
4652 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4653 * peicode.h (coff_bfd_copy_private_bfd_data): New
4654 (pe_bfd_copy_private_bfd_data): New.
4655 (coff_swap_scnhdr_in): Swap bss size into the right place.
4656 (pe_print_private_bfd_data): Add some newlines.
4658 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
4660 * som.c (setup_sections): Don't die if a space has no subspaces.
4662 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4664 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4665 dynamic symbol override a common symbol. Don't change the size or
4666 type if they have been set and the new symbol is not a definition.
4667 Warn if the size or type changes.
4669 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
4671 * som.c (som_begin_writing): Don't write the symbol table or
4673 (som_finish_writing): Write them here. Place them after the
4674 subspace data, but before the relocs.
4676 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4678 * sunos.c (sunos_add_one_symbol): Just pass false, not
4679 info->shared_library, to sunos_create_dynamic_sections.
4680 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4682 (sunos_check_dynamic_reloc): Remove .text section assertion.
4684 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4686 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4687 * configure, configure.in: Add pmac_xcoff_vec case.
4688 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4689 * coff-pmac.c: New file, PowerMac XCOFF support.
4690 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4691 * targets.c (pmac_xcoff_vec): Declare.
4693 * mpw-config.in: Various changes to be compatible with the
4694 autoconf-based configury.
4695 * mpw-make.sed: New file, sed commands to translate Unix
4696 makefile into MPW syntax.
4697 * mpw-make.in: Remove.
4698 * hosts/mpw.h: Remove.
4699 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4700 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4702 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4704 * binary.c (binary_get_symtab): Return an empty string on error.
4705 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4707 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4709 * coff-ppc.c: Reformatted according to gnu conventions
4710 Removed irrelevant "if 0" code
4712 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4714 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4715 symbols rather than as indirect symbols.
4716 (MY(slurp_symbol_table)): Don't do anything special about
4719 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4720 of .ctors and .dtors sections is no larger than 2.
4722 * sunos.c (sunos_add_one_symbol): Don't change
4723 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4725 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4726 dynamic symbols when creating a shared library.
4727 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4729 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4730 written even if it is not defined in a regular object.
4731 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4732 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4733 rather than the constant 22.
4734 (sunos_check_dynamic_reloc): Handle creating a shared library.
4735 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4736 zero when creating a shared library.
4737 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4738 write it out at the start of the symbol table.
4740 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4742 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4744 * config.bfd: Add arm-*-coff.
4745 * configure.in, configure: Add armcoff_{little,big}_vec.
4746 * targets.c (armcoff_{little,big}_vec): Declare.
4747 (bfd_target_vector): Add armcoff_{little,big}_vec.
4748 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4750 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4752 * targets.c (bfd_find_target): Remove debugging code.
4754 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4756 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4758 * Makefile.in: added *-ppc files
4759 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4760 allow pe based .o's to be shared with other tools on ppc/NT
4761 * config.bfd: added powerpc[le]-[pe|winnt] config support
4762 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4763 * peicode.h: Added more section flags for PE on ppc
4764 Added coff_swap_filehdr_out to allow peicode.h to be
4765 used for non-image PE files on ppc.
4766 Check for image, or not, before copying pe_opthdr
4767 * targets.c: Added new bfd's
4768 * targets.c: Removed two inactive bfds that shouldn't have made it this
4771 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4773 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4774 explicit values to initialize all relocs. Change all users.
4775 (ppc_elf_brtaken_inner): New function to handle branch predicition
4777 (ppc_elf_brtaken_reloc): Ditto.
4778 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4779 relocs use ppc_elf_unsupported_reloc.
4780 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4781 needs to be reported.
4782 (ppc_elf_relocate_section): Support branch prediction relocs.
4784 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4786 * bfd.c (bfd_assert): Remove \n from string passed to
4789 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4790 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4791 (bfd_coff_make_section_hook): Don't define.
4792 (coff_make_section_hook): Remove.
4793 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4794 (styp_to_sec_flags): Likewise.
4795 (coff_write_object_contents): Likewise.
4796 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4798 * libcoff.h: Rebuild.
4799 * coffgen.c (make_a_section_from_file): Just call
4800 bfd_make_section_anyway, not bfd_make_section or
4801 bfd_coff_make_section_hook.
4802 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4803 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4804 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4805 make_section_hook field.
4806 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4808 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4809 pointers into value field for warning and indirect symbols; just
4810 leave the value field alone.
4811 * linker.c (generic_link_add_symbol_list): Use next symbol for
4812 warning and indirect symbols, rather than looking in symbol value.
4813 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4814 parameter. Change all callers. Remove support for indirect
4815 symbols; it didn't work anyhow.
4816 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4817 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4818 * bfd-in2.h: Rebuild.
4820 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4822 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4823 go back to telling the tools this reloc operates on 32 bits.
4825 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4827 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4828 rather than a direct fprintf.
4829 * archive.c (_bfd_write_archive_contents): Likewise.
4830 * coffcode.h (coff_slurp_symbol_table): Likewise.
4831 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4832 (ppc_elf_unsupported_reloc): Likewise.
4833 (ppc_elf_relocate_section): Likewise.
4834 * i386linux.c (linux_tally_symbols): Likewise.
4835 (linux_finish_dynamic_link): Likewise.
4836 * osf-core.c (osf_core_core_file_p): Likewise.
4837 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4838 * som.c (som_sizeof_headers): Likewise.
4839 * srec.c (srec_bad_byte): Likewise.
4840 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4841 * libbfd-in.h (bfd_assert): Declare first parameter const.
4842 * libbfd.h: Rebuild.
4843 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4844 bfd_reloc_overflow is enough.
4845 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4846 * coff-h8500.c (rtype2howto): Likewise.
4847 * coff-z8k.c (rtype2howto): Likewise.
4848 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4849 * elf.c (_bfd_elf_get_lineno): Likewise.
4850 (_bfd_elf_no_info_to_howto): Likewise.
4851 (_bfd_elf_no_info_to_howto_rel): Likewise.
4852 * hp300hpux.c (convert_sym_type): Likewise.
4853 (MY(swap_std_reloc_in)): Likewise.
4854 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4856 * libaout.h (struct aoutdata): Add line_buf field.
4857 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4858 and filename_buffer. Instead, use a malloc buffer stored in the
4859 new line_buf field. Remove length restrictions.
4861 * coffgen.c (string_size): Remove static variable.
4862 (debug_string_size, debug_string_section): Likewise.
4863 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4864 and debug_string_size_p parameters. Use them instead of the
4865 global variables. Change all callers.
4866 (coff_write_symbol): Likewise.
4867 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4868 (coff_write_symbols): Add local variables to replace removed
4871 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4872 function, and line_base fields.
4873 * libcoff.h: Rebuild.
4874 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4875 information, rather than using static variables.
4877 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4878 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4880 * init.c (initialized): Remove static variable.
4881 (bfd_init): Don't bother setting initialized.
4882 (bfd_check_init): Remove.
4883 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4884 * libbfd.h: Rebuild.
4886 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4888 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4889 size for full core dumps. Copy core file header to private data.
4890 (rs6000coff_core_file_failing_command,
4891 rs6000coff_core_file_failing_signal): New functions to extract
4892 the file name and terminating signal from the core file.
4893 * coff-rs6000.c: Use them.
4895 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4897 Change arch info to be const, initialized at compile time.
4898 * archures.c: Reindent many functions. Change CONST to const.
4899 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4900 nothing set it anyhow. Make next const.
4901 (bfd_arch_info_list): Remove.
4902 (bfd_archures_list): Rename from archures_init_table. Change from
4903 a table of function pointers to a table of bfd_arch_info_type
4904 structure addresses.
4905 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4906 (bfd_lookup_arch): Likewise.
4907 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4909 (bfd_default_arch_struct): Make const.
4910 (bfd_arch_init, bfd_arch_linkin): Remove.
4911 (bfd_get_arch_info): Return a const pointer.
4912 * init.c (bfd_init): Don't call bfd_arch_init.
4913 * bfd.c (struct _bfd): Make arch_info const.
4914 * bfd-in2.h: Rebuild.
4915 * libbfd.h: Rebuild.
4916 * configure.in: Put & before everything in $selarchs.
4917 * configure: Rebuild.
4918 * cpu-*.c: Change bfd_*_arch from a function which calls
4919 bfd_arch_linkin to a const structure.
4920 * ieee.c (ieee_object_p): Make arch const.
4922 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4924 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4926 * bfd-in2.h: Regenerate.
4927 * libbfd.h: Regenerate.
4929 * elf32-ppc.c (reloc_type): Update names to match current draft.
4930 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4931 relative. Update names to current V.4 draft.
4932 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4933 (ppc_elf_relocate_section): Rename relocations to match draft.
4935 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4937 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4938 compiled with -mrelocatable-lib to be linked with either normal
4939 modules or -mrelocatable modules.
4941 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4943 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4944 in the a.out header.
4946 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4947 a reloc against a local symbol, even if it's not a section.
4949 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4951 * targets.c (bfd_target): Remove unused align_power_min field.
4952 * bfd-in2.h: Rebuild.
4953 * All backends: Remove initialization of align_power_min.
4955 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4957 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
4959 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4961 * config.bfd (mips-dec-netbsd*): New target.
4962 * configure.host (mips-dec-netbsd*): New host.
4963 * configure.in (mips-dec-netbsd*): New native.
4964 * configure: Rebuild.
4966 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4968 Make the COFF backend linker merge common types:
4969 * cofflink.c (struct coff_debug_merge_element): Define.
4970 (struct coff_debug_merge_type): Define.
4971 (struct coff_debug_merge_hash_entry): Define.
4972 (struct coff_debug_merge_hash_table): Define.
4973 (coff_debug_merge_hash_table_init): Define.
4974 (coff_debug_merge_hash_table_free): Define.
4975 (coff_debug_merge_hash_lookup): Define.
4976 (struct coff_final_link_info): Add debug_merge field.
4977 (coff_debug_merge_hash_newfunc): New static function.
4978 (_bfd_coff_final_link): Allocate and free debug_merge table.
4979 (coff_link_input_bfd): Merge identical enum, struct and union
4982 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
4984 Convert i960 COFF to use COFF backend linker.
4985 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
4986 structure to store the symbol being used.
4987 (coff_i960_start_final_link): New static function.
4988 (coff_i960_relocate_section): New static function.
4989 (coff_i960_adjust_symndx): New static function.
4990 (coff_start_final_link): Define.
4991 (coff_relocate_section): Define.
4992 (coff_adjust_symndx): Define.
4993 * coffcode.h (bfd_coff_backend_data): Add new callback function
4994 _bfd_coff_start_final_link.
4995 (bfd_coff_start_final_link): Define.
4996 (coff_start_final_link): Define if not defined.
4997 (bfd_coff_std_swap_table): Add coff_start_final_link.
4998 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
5000 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
5001 function callback is not NULL.
5002 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
5003 (_bfd_coff_internal_syment_name): Declare.
5004 * libcoff.h: Rebuild.
5005 * configure.in (icoff_big_vec): Add cofflink.o.
5006 (icoff_little_vec): Likewise.
5007 * configure: Rebuild.
5009 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
5011 * Makefile.in (clean-info): Remove extraneous tab from line
5014 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
5016 * cofflink.c (coff_link_input_bfd): Fail if a section with no
5017 contents has relocs.
5019 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
5021 * coffcode.h (coff_compute_section_file_positions): Keep the
5023 (coff_write_object_contents): Remember if it's a relocatable
5025 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
5026 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
5027 if relocatable file. Swap out saved raw size.
5029 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
5031 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
5032 (maintainer-clean): Rename from realclean, passing
5033 maintainer-clean down to subdirectories, but leave realclean as a
5036 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
5039 * dep-in.sed: Remove config.h from generated dependencies.
5041 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
5042 broken out of sunos_canonicalize_dynamic_symtab.
5043 (sunos_canonicalize_dynamic_symtab): Call new function
5044 sunos_slurp_dynamic_symtab.
5045 (sunos_add_dynamic_symbols): Add three new parameters. Return the
5046 dynamic symbol table to the caller.
5047 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
5048 callback to override the symbols being read.
5049 * libaout.h (struct aout_backend_data): Add three new parameters
5050 to add_dynamic_symbols callback.
5052 Extensive minor changes to avoid various gcc warnings. Also:
5053 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
5054 * archures.c (bfd_arch_info_type): Change mach field from long to
5056 (bfd_lookup_arch): Change machine parameter from long to unsigned
5059 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
5061 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
5062 a symbol with a non-zero plt_offset.
5064 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
5066 * elfcode.h (align_file_position): Remove; not used.
5068 * configure.in: Only check for <sys/procfs.h> on a native system,
5069 and make sure it defines prstatus_t.
5070 * configure: Rebuild.
5072 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
5074 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
5076 * config.in: Rename from config.h.in.
5077 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
5078 Check for config.h:config.in when creating stamp-h.
5079 * configure: Rebuild.
5080 * Makefile.in (stamp-h): Depend upon config.in rather than
5081 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
5082 calling config.status.
5084 * Makefile.in (do_distclean): Remove config.h and stamp-h.
5085 (Makefile): Just rebuild Makefile.
5086 (config.h, stamp-h): New targets.
5087 * configure.in: Create stamp-h when rebuilding config.h.
5088 * configure: Rebuild.
5090 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
5092 * configure.in: Call AC_CONFIG_HEADER. Substitute
5093 HOST_64BIT_LONG. Check that various header files exist. Check
5094 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
5095 and/or free need to be declared. Don't make a link to sysdep.h.
5096 Define TRAD_HEADER for various hosts.
5097 * configure: Rebuild.
5098 * configure.host: Don't set my_host. Add definitions taken from
5099 host header files for various entries. Remove entries which now
5101 * acconfig.h: New file.
5102 * config.h.in: New file, built by autoheader.
5103 * sysdep.h: New file.
5104 * Makefile.in (do_distclean): Don't remove sysdep.h.
5106 (LOCAL_H_DEPS): New variable.
5107 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
5109 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
5110 ($(OPTIONAL_BACKENDS)): Likewise.
5111 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
5112 looking through sysdep.h.
5113 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
5114 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
5115 (fprintf_vma, sprintf_vma): Likewise.
5116 (int64_type, uint64_type): Don't define.
5117 * bfd-in2.h: Rebuild.
5118 * archures.c, bfd.c, srec.c: Include <ctype.h>.
5119 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
5120 * lynx-core.c: Include stuff from old hosts/lynx.h.
5121 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
5122 rather than NO_FCNTL.
5123 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
5124 rather than NATIVE_HPPAHPUX_COMPILER.
5125 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
5127 * hosts/*.h: Remove all header files which merely include,
5128 declare, and define things. Leave header files which define
5129 information needed by trad-core.c.
5131 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
5132 (BFD_CC_FOR_BUILD): Define.
5133 * configure.in: Use BFD_CC_FOR_BUILD.
5134 * configure: Rebuild.
5136 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
5138 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
5139 * configure: Rebuild.
5141 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
5144 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
5146 * config.bfd: i386pe_ve -> i386pe_vec.
5148 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
5150 * configure.host: Incorporate host Makefile fragments by setting
5152 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
5153 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
5154 value based on whether the code is being compiled by a cross
5155 compiler. Don't substitute host_makefile_frag or frags.
5156 * aclocal.m4: New file to define local AC_PROG_CC.
5157 * configure: Rebuild.
5158 * Makefile.in (INSTALL): Set to @INSTALL@.
5159 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
5160 (INSTALL_DATA): Set to @INSTALL_DATA@.
5162 (CC): Define as @CC@.
5163 (CFLAGS): Set to @CFLAGS@.
5164 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
5165 (@host_makefile_frag@): Remove.
5166 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
5167 after other options.
5168 (config.status): Remove dependency upon @frags@.
5169 * config/*.mh, config/README: Remove.
5171 * config.bfd: Rewrite to incorporate the contents of the Makefile
5172 fragments by setting shell variables, rather than merely returning
5173 the name of a Makefile fragment.
5174 * configure.in: Use shell variables set by config.bfd rather than
5175 looking at the target Makefile fragment files. Don't substitute
5176 target_makefile_frag. Do substitute TDEFINES.
5177 * configure: Rebuild.
5178 * Makefile.in (@target_makefile_frag@): Remove.
5179 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
5180 * config/*.mt: Remove.
5182 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
5184 * configure.in: Put changequote lines around "i[345]86" patterns
5185 section of core file support.
5187 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
5189 * som.c (som_bfd_print_private_bfd_data): Define to use the
5192 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
5194 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
5195 entry, text_start and data_start.
5197 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
5199 * Makefile.in (OFILES): Remove $(TDEPFILES).
5200 * config/apollo.mt (TDEPFILES): Remove.
5201 * config/README: Update.
5203 * configure.in: For a native configuration, set COREFILE and
5204 COREFLAG based on the canonical host name.
5205 * configure: Rebuild.
5206 * Makefile.in: Rebuild dependencies.
5207 (ALL_CFLAGS): Add @COREFLAG@.
5208 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
5209 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
5210 support routines. Check LYNX_CORE rather than HOST_LYNX.
5211 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
5212 * i386lynx.c: Likewise.
5213 * m68klynx.c: Likewise.
5214 * sparclynx.c: Likewise.
5215 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
5216 * *-core.c: Comment changes.
5217 * config/decstation.mh (HDEPFILES): Remove.
5218 (HDEFINES): Remove -DTRAD_CORE.
5219 * config/irix3.mh (RANLIB): Remove.
5220 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
5221 (HDEFINES): Remove -DIRIX_CORE.
5222 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
5223 (HDEFINES): Remove -DTRAD_CORE.
5224 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
5225 * config/ultra3.mh (RANLIB): Remove.
5226 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
5227 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
5228 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
5229 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
5230 * config/hppahpux.mh, config/hppaosf.mh: Remove.
5231 * config/i386aix.mh, config/i386bsd.mh: Remove.
5232 * config/i386linux.mh, config/i386mach3.mh: Remove.
5233 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
5234 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
5235 * config/mipsmach3.mh, config/news-mips.mh: Remove.
5236 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
5237 * config/rs600.mh, config/rs6000lynx.mh: Remove.
5238 * config/solaris2.mh, config/stratus.mh: Remove.
5239 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
5240 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
5242 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
5244 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
5245 DT_FINI entry if the appropriate symbol is not in the hash table.
5247 * libelf.h (struct elf_backend_data): Add create_program_headers
5248 and want_hdr_in_seg fields.
5249 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
5251 (elf_backend_create_program_headers): Likewise.
5252 (elfNN_bed): Initialize create_program_headers and
5254 * elf.c (get_program_header_size): Call create_program_headers
5256 (map_program_segments): Check want_hdr_in_seg backend field. Call
5257 create_program_headers backend routine.
5259 * elf.c (assign_file_positions_except_relocs): Align non allocated
5260 sections when creating an executable.
5262 * elfcode.h (elf_swap_phdr_in): Make non static.
5263 (elf_swap_phdr_out): Make non static.
5264 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
5265 (bfd_elf32_swap_phdr_out): Declare.
5266 (bfd_elf64_swap_phdr_in): Declare.
5267 (bfd_elf64_swap_phdr_out): Declare.
5269 * ecofflink.c (ecoff_collect_shuffle): New static function.
5270 (_bfd_ecoff_get_accumulated_pdr): New function.
5271 (_bfd_ecoff_get_accumulated_sym): New function.
5272 (_bfd_ecoff_get_accumulated_ss): New function.
5273 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
5274 (_bfd_ecoff_get_accumulated_sym): Declare.
5275 (_bfd_ecoff_get_accumulated_ss): Declare.
5276 * libbfd.h: Rebuild.
5278 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
5280 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
5282 * elflink.h (elf_link_add_object_symbols): Handle indirect and
5283 warning symbols. If any section is named .gnu.warning.XXX, treat
5284 the contents as a warning to be issued if the symbol XXX is
5286 (elf_link_output_extsym): For an indirect or warning symbol, just
5287 output the symbol it points to.
5289 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
5290 if bfd_hash_allocate fails, since it will already be set.
5291 (generic_link_hash_newfunc): Likewise.
5292 (archive_hash_newfunc): Likewise.
5293 (hash_entry_bfd): New static function.
5294 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
5295 callback. Allocate a new warning using the hash table newfunc.
5296 Use bfd_hash_replace to update the entry in the hash table, rather
5297 than assuming we can copy the fields with structure assignment.
5299 * hash.c (bfd_hash_replace): New function.
5300 * bfd-in.h (bfd_hash_replace): Declare.
5301 * bfd-in2.h: Rebuild.
5303 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
5305 * config.bfd: Add mips*vr4300-*-elf* target.
5306 * config/mipsbvr4300.mt: Added.
5308 See file ChangeLog.2
5315 version-control: never