1 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
3 64-bit MIPS ELF ABI objdump support:
4 * elf64-mips.c: New file.
5 * Makefile.in: Rebuild dependencies.
6 (BFD64_BACKENDS): Add elf64-mips.o.
7 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
8 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
9 bfd_elf64_littlemips_vec to targ_selvecs.
10 (mips*-*-elf*): Likewise.
11 * confingure.in: Add bfd_elf64_bigmips_vec and
12 bfd_elf64_littlemips_vec to vector switch.
14 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
15 broken out of mips_elf_section_from_shdr.
16 (mips_elf32_section_from_shdr): Rename from
17 mips_elf_section_from_shdr. Call new function.
18 (elf_backend_section_from_shdr): Update name of renamed function.
19 * elf-bfd.h (struct elf_size_info): Change second parameter of
20 write_out_phdrs to be const. Likewise for second parameter of
22 (struct bfd_elf_section_data): Add rel_hdr2 field.
23 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
24 (bfd_elf32_swap_symbol_out): Likewise.
25 (bfd_elf32_swap_reloc_in): Likewise.
26 (bfd_elf32_swap_reloc_out): Likewise.
27 (bfd_elf32_swap_reloca_in): Likewise.
28 (bfd_elf32_swap_reloca_out): Likewise.
29 (bfd_elf32_swap_phdr_in): Likewise.
30 (bfd_elf32_swap_phdr_out): Likewise.
31 (bfd_elf32_swap_dyn_in): Likewise.
32 (bfd_elf32_swap_dyn_out): Likewise.
33 (bfd_elf32_slurp_symbol_table): Declare.
34 (bfd_elf32_write_shdrs_and_ehdr): Declare.
35 (bfd_elf32_write_out_phdrs): Declare.
36 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
37 (bfd_elf64_swap_symbol_out): Likewise.
38 (bfd_elf64_swap_reloc_in): Likewise.
39 (bfd_elf64_swap_reloc_out): Likewise.
40 (bfd_elf64_swap_reloca_in): Likewise.
41 (bfd_elf64_swap_reloca_out): Likewise.
42 (bfd_elf64_swap_phdr_in): Likewise.
43 (bfd_elf64_swap_phdr_out): Likewise.
44 (bfd_elf64_swap_dyn_in): Likewise.
45 (bfd_elf64_swap_dyn_out): Likewise.
46 (bfd_elf64_slurp_symbol_table): Declare.
47 (bfd_elf64_write_shdrs_and_ehdr): Declare.
48 (bfd_elf64_write_out_phdrs): Declare.
49 (_bfd_mips_elf_section_from_shdr): Declare.
50 * elf.c (bfd_section_from_shdr): Remove assertion requiring
51 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
52 section for the section, add the new one to rel_hdr2. Increment
53 reloc_count rather than setting it.
54 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
55 Remove static declaration.
56 (elf_write_shdrs_and_ehdr): Define name as macro.
57 (elf_write_out_phdrs): Likewise.
58 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
59 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
60 (elf_swap_symbol_in): Change second parameter to be const.
61 (elf_swap_symbol_out): Likewise.
62 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
63 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
64 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
65 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
66 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
67 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
68 parameter to be const. Make non-static.
69 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
71 (elf_slurp_symbol_table): Make non-static.
72 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
73 * elfxx-target.h (elf_info_to_howto): Define if not defined.
74 (elf_backend_size_info): Likewise.
75 (elfNN_bed): Use elf_backend_size_info.
76 * targets.c (bfd_elf64_bigmips_vec): Declare.
77 (bfd_elf64_littlemips_vec): Declare.
78 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
79 bfd_elf64_littlemips_vec if BFD64 is defined.
81 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
83 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
85 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
86 zeroes, in alignment holes.
88 * configure: Rebuild with autoconf 2.10.
90 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
91 potential leading underscore in the allocated buffer.
93 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
95 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
96 symbols into .sbss if this is a relocatable link.
98 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
100 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
101 undefined symbols when creating a shared library.
103 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
105 * coff-sh.c: Add a bunch of new code and static const arrays to
106 support aligning loads and stores on four byte memory boundaries.
108 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
110 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
112 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
115 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
117 * cache.c (bfd_open_file): Unlink the file before opening it for
118 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
120 * opncls.c (bfd_fdopenr): Set opened_once.
122 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
124 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
127 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
128 the code unconditionally.
130 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
132 * libcoff-in.h (struct pei_section_tdata): Define structure.
133 (pei_section_data): Define macro.
134 * libcoff.h: Rebuild.
135 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
136 store s_paddr field in pei_section_data.
137 (coff_compute_section_file_positions): Use pei_section_data rather
138 than _cooked_size, and don't overwrite an existing value.
139 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
140 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
141 * peicode.h (coff_bfd_copy_private_section_data): Define if
143 (pe_bfd_copy_private_section_data): New static function if
146 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
148 * srec.c (srec_set_arch_mach): Write as a function rather than a
151 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
152 no map, just check each member in turn to see whether it is
155 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
157 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
158 table. Call BFD_ASSERT to validate header size, instead of
160 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
163 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
165 * ppcboot.c: New target for looking at PPCbug boot records.
167 * config{ure.in,.bfd}: Add support for ppcboot target.
169 * configure: Regenerate.
171 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
173 * coff-h8300.c (howto_table): Update names to match recent
174 changes to include/coff/internal.h. Fix minor errors in the
175 existing relocs. Add R_MOVL1 and R_MOVL2.
176 (rtype2howto): Similarly.
177 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
178 existing relaxing code and peform more relaxing.
179 (h8300_reloc16_extra_cases): Likewise.
181 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
183 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
186 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
188 * elfcode.h (elf_object_p): Reject generic ELF target if
189 e_machine matches an alternate machine code in a specific backend.
191 * netbsd-core.c (netbsd_core_vec): Remove initializer for
192 obsolete align_power_min field.
194 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
196 * coff-h8300.c (reloc_howto_type): Add howto entry for
198 (rtype2howto): Handle R_PCRWORD_B.
199 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
200 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
201 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
204 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
206 * aoutx.h (translate_from_native_sym_flags): Set the section for
207 BSF_CONSTRUCTOR symbols.
209 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
212 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
214 * coffcode.h (coff_write_object_contents): In comdat section lookup,
215 stop looking when section is found.
217 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
219 * coffcode.h (STRING_SIZE_SIZE): Define.
220 (styp_to_sec_flags): Handle long symbol names when looking for the
222 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
223 (bfd_coff_long_section_names): Define.
224 (coff_write_object_contents): Handle long section names.
225 (bfd_coff_std_swap_table): Initialize new field.
226 * libcoff.h: Rebuild.
227 * coffgen.c (make_a_section_from_file): Handle long section
229 (coff_write_symbols): Handle long section names.
230 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
231 * coff-mips.c (mips_ecoff_backend_data): Likewise.
232 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
233 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
234 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
235 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
236 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
237 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
239 * bout.c (b_out_callback): Set lma of sections.
240 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
241 parameter to output_bfd. Used input_bfd instead of output_bfd in
244 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
246 * aoutx.h (translate_from_native_sym_flags): Don't create
247 SEC_CONSTRUCTOR sections.
248 * ecoff.c (ecoff_set_symbol_info): Likewise.
250 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
251 From Don Bowman <bowman@waterloo.hp.com>.
253 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
255 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
256 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
258 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
260 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
261 mips_32_relocs field.
262 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
263 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
264 relocs against a global symbol which is not defined in a regular
266 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
267 against a global symbol, increment mips_32_relocs.
268 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
269 the symbol is not defined in a regular file, make room in the
272 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
274 * ecoff.c (ecoff_compute_section_file_positions): Track the real
275 file position and the virtual file position separately. Set
276 filepos information bsaed on the real file position.
277 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
278 Jan 23 change to coffcode.h.
280 * som.c (som_slurp_symbol_table): Set the symbol count to the
281 number of BFD symbols created.
283 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
285 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
286 output file if linking shared objects. Loop to check all relocs,
287 rather than returning false on first error.
289 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
291 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
292 (ppc_elf_additional_program_headers): If .interp section, bump #
293 of program headers by 1.
294 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
295 (ppc_elf_size_dynamic_sections): Add support for .plt section.
296 (ppc_elf_check_relocs): Print out filename in debug code. Enable
298 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
300 (ppc_elf_relocate_section): If the output section isn't defined,
301 don't abort, just give an error message.
303 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
304 being created is .sdata or .sdata2, don't make the symbol dynamic.
306 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
308 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
309 members of an archive for dynamic objects with no symbols, and
310 pass them directly to check_archive_element.
311 (xcoff_link_check_ar_symbols): Pass dynamic objects to
312 xcoff_link_check_dynamic_ar_symbols.
313 (xcoff_link_check_dynamic_ar_symbols): New static function.
315 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
316 from _bfd_nodynamic to _bfd_xcoff.
317 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
319 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
320 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
321 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
322 * libcoff.h: Rebuild.
323 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
324 (xcoff_get_section_contents): New static function.
325 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
326 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
327 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
328 (xcoff_dynamic_reloc): New static variable.
329 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
330 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
332 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
334 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
335 if reloc_entry->addend is not 0.
336 (CALC_ADDEND): Just set the addend to reloc.r_offset.
338 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
340 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
342 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
343 Add entries for R_SPARC_[56].
344 (sparc_reloc_map): Add entries for R_SPARC_[56].
346 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
348 Optimize linking of stabs in sections as used in ELF and COFF.
350 * libbfd-in.h (_bfd_link_section_stabs): Declare.
351 (_bfd_write_section_stabs): Declare.
352 (_bfd_write_stab_strings): Declare.
354 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
355 (struct coff_link_hash_table): Add stab_info field.
356 * libcoff.h: Rebuild.
357 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
359 (coff_link_add_symbols): Call _bfd_link_section_stabs if
361 (_bfd_coff_final_link): Write out stab strings hash table.
362 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
363 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
365 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
366 (struct bfd_elf_section_data): Add stab_info field.
367 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
369 * elflink.h (elf_link_add_object_symbols): If appropriate, call
370 _bfd_link_section_stabs.
371 (elf_bfd_final_link): Write out stab strings hash table.
372 (elf_link_input_bfd): Handle optimized stabs sections.
373 * reloc.c (_bfd_final_link_relocate): Check address against
374 _raw_size rather than _cooked_size.
375 * Makefile.in: Rebuild dependencies.
376 (BFD_LIBS): Add stabs.o
377 (BFD_LIBS_CFILES): Add stabs.c.
379 * VERSION: Increment for bfdlink.h change.
381 * coffgen.c (coff_renumber_symbols): Correct handling of
382 BSF_NOT_AT_END common symbols.
384 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
386 * coff-ppc.c (record_toc): Add cast to avoid warning.
387 (ppc_allocate_toc_section): Likewise.
388 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
389 (ppc_coff_reloc_type_lookup): Remove unreached code.
390 * coffcode.h (coff_write_object_contents): Don't take the address
392 * peicode.h (pe_print_idata): Add casts to avoid warning.
393 (pe_print_edata): Likewise.
394 (pe_print_reloc): Remove ANSI C string concatenation.
396 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
398 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
400 * libcoff.h: Rebuild.
401 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
403 (coff_swap_aux_out): Likewise.
404 * peicode.h (coff_swap_aux_in): Likewise.
405 (coff_swap_aux_out): Likewise.
406 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
408 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
410 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
411 Fix up .bf endndx link fields.
412 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
414 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
417 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
419 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
420 on Solaris PowerPC systems doesn't get confused.
422 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
425 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
426 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
427 update did_reg and did_reg2.
429 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
431 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
433 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
434 callback routines, pass h->root.string rather than name, in case
435 copy is true and name is transient.
437 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
439 * elfcore.h: Add support for core files with multiple threads.
440 (Primarily for Solaris.)
442 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
444 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
445 section->orelocation is NULL.
447 * coffgen.c (bfd_coff_get_syment): New function.
448 (bfd_coff_get_auxent): New function.
449 * bfd-in.h (bfd_coff_get_syment): Declare.
450 (bfd_coff_get_auxent): Declare.
451 * bfd-in2.h: Rebuild.
453 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
455 * elf32-mips.c (struct mips_hi16): Define.
456 (mips_hi16_addr, mips_hi16_addend): Remove.
457 (mips_hi16_list): New static variable.
458 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
459 (mips_elf_lo16_reloc): Process mips_hi16_list.
460 (mips_elf_relocate_section): Permit an arbitrary number of HI16
461 relocs before the associated LO16 reloc.
463 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
465 * versados.c (versados_scan): Check bfd_alloc return value.
466 (versados_object_p): Check all bfd_read return values. Require
467 that lang field be less than 10, to avoid confusion with Intel Hex
470 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
472 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
473 not 0, for an absolute symbol.
474 (NAME(aout,swap_ext_reloc_out)): Likewise.
476 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
477 (ihex_write_object_contents): For a large start address, output
478 the full 32 bit address in record type 5.
480 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
481 to int to avoid promotion problems in prototype.
483 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
485 * configure.host: Use ${srcdir} when looking for picfrag.
487 * configure.host: Switch on ${libdir}, not $(libdir). From
488 alan@spri.levels.unisa.edu.au (Alan Modra).
490 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
491 entry point, not just for DYNAMIC objects.
492 * sunos.c (sunos_add_dynamic_symbols): Always call
493 sunos_create_dynamic_sections. If called with a non DYNAMIC
494 object, don't do anything else.
495 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
497 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
499 * configure.in: Permit --enable-shared to specify a list of
501 * configure: Rebuild.
503 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
504 host when configuring with --enable-shard.
506 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
508 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
511 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
512 to avoid crashing in bfd_hash_replace.
514 * sysdep.h: Use #ifdef, not #if.
516 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
518 * config.in: Rebuild.
520 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
522 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
523 (AC_CHECK_HEADERS): Check for sys/time.h
524 (AC_HEADER_TIME): Add macro.
525 * configure: Rebuild.
526 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
527 to control what combination of <time> and <sys/time.h>
530 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
532 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
533 (aout_32_sunos4_write_object_contents): Likewise.
534 * aoutx.h (NAME(aout,machine_type)): Handle
535 bfd_mach_sparc_{sparclet,sparclite}.
536 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
537 (bfd_mach_sparc_v9_p): Update.
538 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
539 * libaout.h (enum machine_type): Add M_SPARCLET.
540 * sunos.c (MACHTYPE_OK): Define.
541 * bfd-in2.h: Regenerated.
543 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
545 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
546 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
547 * elflink.c (_bfd_elf_create_got_section): Store the
548 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
549 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
550 global offset table goes over 0x1000, set the value of
551 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
552 (elf32_sparc_relocate_section): Subtract the offset of
553 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
555 * elfcode.h: Don't include <string.h>.
557 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
559 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
560 generic_link_hash_newfunc. All references changed.
561 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
562 moved here from libbfd-in.h.
563 * libbfd-in.h: Corresponding changes.
564 * libbfd.h: Regenerated.
566 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
568 * aoutx.h (aout_link_input_section_std): When reporting an
569 overflow error, use the name of the symbol in the hash table if
571 (aout_link_input_section_ext): Likewise.
573 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
574 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
576 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
578 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
579 * coffcode.h (coff_compute_section_file_positions): Likewise.
580 (coff_write_object_contents): Likewise.
582 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
584 * section.c (SEC_LINK_ONCE): Define.
585 (SEC_LINK_DUPLICATES): Define.
586 (SEC_LINK_DUPLICATES_DISCARD): Define.
587 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
588 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
589 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
590 * bfd-in2.h: Rebuild.
591 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
592 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
593 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
594 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
595 SEC_LINK_ONCE, and look through the symbol table for the setting
596 for SEC_LINK_DUPLICATES.
597 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
598 set for a section, find the section symbol in the symbol table,
599 and set the aux entry based on SEC_LINK_DUPLICATES.
600 * coffgen.c (coff_print_symbol): Add a space before "checksum".
601 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
602 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
603 * coff-i386.c (i386coff_vec): Likewise.
604 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
606 * VERSION: Bump to 2.6.1.
607 * Makefile.in (stamp-h): Depend upon VERSION.
609 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
611 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
613 * linker.c (generic_link_hash_newfunc): No longer static.
614 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
616 * coff-h8300.c: Add two derived hash tables and their associated
617 funtions and #defines for use by the h8300 linker.
618 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
619 the function vector as needed. Place the address of the function
620 vector entry in the location specified by the R_MEM_INDIRECT reloc.
621 Rewrite the vectors section contents as necessary.
622 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
623 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
624 (coff_bfd_link_hash_table_create): Likewise.
626 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
628 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
629 __attribute__ ((__unused__)) so that -Wall doesn't warn about
631 (hppa_rebuild_insn): Pass pointer to correct type to
632 low_sign_unext and dis_assemble_21.
634 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
636 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
637 Stick with sparc-*-{sysv4*,solaris2*}.
639 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
641 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
642 (coff_swap_aux_out): Swap out extra PE x_scn fields.
643 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
644 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
645 fields is non-zero, print them.
647 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
648 ifdef. Remove unused variables.
649 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
651 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
652 (get_symbol_value): Ifdef out.
653 (pe_ppc_reloc): Ifdef out. Remove unused variables.
654 (coff_ppc_relocate_section): Remove unused variables. Make
655 fprintf strings and argument types correspond. Put before_addr in
657 (dump_toc): Make fprintf strings and argument types correspond.
658 (ppc_process_before_allocation): Remove unused variables. Always
660 (ppc_reflo_reloc): Ifdef out.
661 (ppc_addr32nb_reloc): Ifdef out.
662 (ppc_coff_rtype2howto): Make fprintf strings and argument types
664 (coff_ppc_rtype_to_howto): Likewise.
665 (ppc_coff_swap_sym_in_hook): Remove unused variables.
667 * peicode.h (pe_print_idata): Move otherwise unused variables into
668 the #ifdef where they are used. Always return a value.
669 (pe_print_edata): Make fprintf strings and argument types
670 correspond. Always return a value.
671 (pe_print_pdata): Removed unused variable addr_value. Always
673 (pe_print_reloc): Remove unused variable onaline. Make fprintf
674 strings and argument types correspond. Always return a value.
676 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
677 (ppc_elf_finish_dynamic_symbol): Move definition of unused
678 variable rela inside #if 0 section where it is used.
681 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
682 functions to start with _bfd_.
683 * aout-ns32k.c: Include ns32k.h. Change references to renamed
684 functions in cpu-ns32k.h.
685 * Makefile.in: Rebuild dependencies.
686 (HFILES): Add ns32k.h.
688 * section.c (struct sec): Add linker_mark field. Change
689 user_set_vma and reloc_done to be single bit fields.
690 (STD_SECTION): Update accordingly.
691 * bfd-in2.h: Rebuild.
692 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
694 (aout_link_input_bfd): Don't link unmarked sections.
695 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
697 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
698 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
700 * elflink.h (elf_bfd_final_link): Mark sections included in the
702 (elf_link_input_bfd): Don't link unmarked sections.
703 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
705 (xcoff_link_input_bfd): Don't link unmarked sections.
707 * coffswap.h (coff_swap_scnhdr_out): Include section name in
708 overflow error messages.
710 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
712 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
713 is not set, print "BFD: " before the error message.
715 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
716 Miles Bader <miles@gnu.ai.mit.edu>.
717 * configure: Rebuild.
719 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
721 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
724 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
725 m68k-aout, m68k-coff, and m68k-elf targets.
727 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
729 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
730 (ieee_generic_stat_arch_elt): Restructured to prevent
731 ieee_object_p from being called repeatedly.
733 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
735 * coffcode.h (coff_write_object_contents): Allocate
736 buffers large enough for any FILEHDR or AOUTHDR.
738 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
740 * ecofflink.c (lookup_line): New static function, renamed and
741 slighly changed from old _bfd_ecoff_locate_line.
742 (_bfd_ecoff_locate_line): Cache line number information. Use
743 lookup_line for actual lookup.
745 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
747 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
748 multiple of 20 bytes.
750 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
752 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
753 allocate ecoff_find_line, and don't initialize by hand.
754 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
755 mips_elf_find_line, and don't call memset.
757 * coffcode.h (coff_compute_section_file_positions): If not
758 producing a final executable, don't consider sofar when aligning
759 the section to the correct size.
761 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
763 * coffcode.h (coff_add_missing_symbols): Ifdef out.
764 (coff_write_object_contents): Don't call coff_add_missing_symbols.
765 * coffgen.c (coff_section_symbol): Ifdef out.
767 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
769 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
770 output_bfd is not NULL.
772 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
774 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
775 of bfd_alloc (fixes fix_line not being initialized).
776 Delete zeroing of fix_{value,tag,end,scnlen} fields.
778 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
780 * coffcode.h: Allow specific backends to override the
781 bfd_link_add_symbols routine.
783 * coff-h8300.c: Include genlink.h.
784 (howto_table): Add R_MEM_INDIRECT.
785 (rtype2howto): Support R_MEM_INDIRECT.
786 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
789 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
791 * coff-alpha.c (alpha_relocate_section): Use
792 info->callbacks_warning, rather than _bfd_error_handler, for
793 "multiple gp" warning.
795 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
797 * linker.c (bfd_wrapped_link_hash_lookup): New function.
798 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
799 table string. Use bfd_wrapped_link_hash_lookup.
800 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
802 * aoutx.h (aout_link_write_symbols): Use the name from the hash
803 table, if any, when writing out symbols.
804 (aout_link_input_section_std): Use the name from the hash table,
805 if any, when reporting undefined symbols.
806 (aout_link_input_section_ext): Likewise.
807 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
808 * bout.c (get_value): Likewise.
809 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
810 * ecoff.c (ecoff_reloc_link_order): Likewise.
811 * elflink.h (elf_link_add_object_symbols): Likewise.
812 (elf_reloc_link_order): Likewise.
813 * linker.c (_bfd_generic_link_output_symbols): Likewise.
814 (_bfd_generic_reloc_link_order): Likewise.
815 (default_indirect_link_order): Likewise.
816 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
817 * sunos.c (sunos_add_one_symbol): Likewise.
818 * xcofflink.c (xcoff_link_add_symbols): Likewise.
819 (bfd_xcoff_link_count_reloc): Likewise.
820 (xcoff_reloc_link_order): Likewise.
822 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
823 into -1 for intern->rss.
825 * configure: Rebuild with autoconf 2.8.
827 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
829 * stab-syms.c (__define_stab_duplicate): Define.
830 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
832 * bfd-in.h (bfd_get_stab_name): Declare.
833 * bfd-in2.h: Rebuild.
834 * Makefile.in: Rebuild dependencies.
835 (BFD_LIBS): Add stab-syms.o.
836 (BFD_LIBS_CFILES): Add stab-syms.c.
837 (BFD32_BACKENDS): Remove stab-syms.o.
838 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
839 * configure.in: Don't list stab-syms.o in bfd_backends.
840 * configure: Rebuild.
841 * libaout.h (aout_stab_name): Don't declare.
842 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
845 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
847 * elf.c (assign_file_positions_for_segments): Adjust file offset
848 for section alignment even if SEC_LOAD is not set.
850 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
852 * configure.in: Don't set SHLIB or SHLINK to an empty string,
853 since they appear as targets in Makefile.in.
854 * configure: Rebuild.
856 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
857 don't fiddle with a symbol which is not defined anywhere.
859 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
861 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
862 though they are defined in a shared library.
863 (xcoff_build_ldsyms): Likewise.
865 * coffgen.c (coff_find_nearest_line): Don't look at the line
866 numbers for the section if section->lineno is NULL.
868 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
869 message rather than calling BFD_ASSERT.
870 * elfcode.h (write_relocs): Check return value of
871 _bfd_elf_symbol_from_bfd_symbol.
873 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
875 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
878 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
880 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
882 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
883 hppa_reloc_field_selector_type_alt.
884 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
885 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
887 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
889 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
891 * elf.c (assign_file_positions_for_segments): Adjust the segment
892 memory size for the alignment of a SEC_ALLOC section, not just a
895 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
897 * m68klinux.c: New file.
898 * hosts/m68klinux.h: New file.
899 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
900 * configure.in (m68*-*-linux*): New native host.
901 (m68klinux_vec): New vector.
902 * configure: Rebuild.
903 * targets.c (m68klinux_vec): Declare.
904 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
905 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
906 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
907 declaration from bfd_linux_size_dynamic_sections.
908 (bfd_m68klinux_size_dynamic_sections): Declare.
909 * bfd-in2.h: Rebuild.
910 * Makefile.in: Rebuild dependencies.
911 (BFD32_BACKENDS): Add m68klinux.o.
912 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
914 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
916 * libhppa.h (pa_arch): Add pa20.
917 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
918 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
919 (hppa_field_adjust): Handle e_nsel.
920 * som.c: Provide default definitions for many new relocs found only
921 in hpux10 include files.
922 (som_fixup_formats): Add several new relocs from hpux10.
923 (som_hppa_howto_table): Add hpux10 relocs.
924 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
926 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
928 * mpw-make.sed: Edit out recent shared library support, and
929 rules to rebuild .h files using doc/chew.
931 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
933 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
934 size even of sections with no contents.
936 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
938 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
939 starting with '$' the way we skip names starting with '.'. When
940 updating x_endndx, don't be fooled by an index which has been
943 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
944 struct/union/enum type with no elements.
946 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
948 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
950 * archive.c (bfd_generic_archive_p): If the first file in the
951 archive can not be recognized as an object, don't assume that this
954 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
955 format is not bfd_object.
956 (bfd_elf_get_dt_soname): Likewise.
958 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
960 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
963 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
965 * bfd.c (tdata): Add netbsd_core_data.
966 * bfd-in2.h: Regenerated.
968 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
970 * sunos.c (SUNOS_CONSTRUCTOR): Define.
971 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
972 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
975 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
976 to get the symbol index, matching 14 Jul 95 change.
978 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
980 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
981 Remove duplicate definition of gp.
983 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
985 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
986 assume that we can set the GP value and then get the same value,
987 since it won't be true if the output file is neither ELF nor
989 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
990 _bfd_get_gp_value here.
991 (mips_gprel_reloc): Don't assume we can set and get the GP value.
992 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
994 (mips_elf_lo16_reloc): Likewise.
995 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
996 Don't require that the BFD be ELF.
997 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
998 (mips_elf_gprel32_reloc): Likewise.
999 (mips_elf_relocate_section): Don't assume we can set and get the
1001 (mips_elf_finish_dynamic_symbol): Don't bother to use
1002 _bfd_get_gp_value here.
1004 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1005 Don't change epdr between malloc and free. Be careful not to free
1006 NULL pointers. Zero out the first RPDR.
1008 * configure.host: On Linux, only pass -rpath option if $(libdir)
1009 is neither /lib nor /usr/lib. From Alan Modra
1010 <alan@mullet.Levels.UniSA.Edu.Au>.
1012 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1014 (elf_dt_name): Rename from elf_dt_needed_name.
1015 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1017 (bfd_elf_get_dt_soname): New function.
1018 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1019 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1020 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1021 * bfd-in2.h: Rebuild.
1023 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1025 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1026 _bfd_sparc_elf_reloc_type_lookup.
1027 (bfd_elf32_bfd_reloc_type_lookup): Update.
1028 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1029 (sparc64_elf_howto_table): Define.
1030 (sparc_reloc_map): Define.
1031 (sparc64_elf_reloc_type_lookup): New function.
1032 (sparc_elf_wdisp16_reloc): New function.
1033 (elf_info_to_howto): Use sparc64_elf_howto_table.
1034 (sparc64_elf_relocate_section): Likewise.
1035 (bfd_elf64_bfd_reloc_type_lookup): Update.
1037 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1039 * configure.host: Check for 'do not mix' from native linker before
1040 trying to use -rpath.
1042 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1044 * bfd.c (_bfd_get_gp_value): New function.
1045 (_bfd_set_gp_value): New function.
1046 * libbfd-in.h (_bfd_get_gp_value): Declare.
1047 (_bfd_set_gp_value): Declare.
1048 * libbfd.h: Rebuild.
1049 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1050 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1051 directly to the fields in the tdata information.
1052 (alpha_relocate_section): Likewise.
1053 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1054 (mips_gprel_reloc): Likewise.
1055 (mips_relocate_section): Likewise.
1056 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1057 (mips_elf_lo16_reloc): Likewise.
1058 (mips_elf_final_gp): Likewise.
1059 (mips_elf_gprel16_reloc): Likewise.
1060 (mips_elf_gprel32_reloc): Likewise.
1061 (mips_elf_relocate_section): Likewise.
1062 (mips_elf_finish_dynamic_symbol): Likewise.
1064 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1066 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1068 * configure.in: Call AC_PROG_CC before configure.host.
1069 * configure: Rebuild.
1070 * configure.host: Don't set information which autoconf should
1071 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1073 * configure.host: Remove go32 and win32 host information, since it
1074 should no longer be needed.
1076 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1077 then start a new segment rather than put a writable section in a
1080 * configure.host: Set RPATH_ENVVAR.
1082 * Makefile.in: Rebuild dependencies.
1084 * elflink.c (_bfd_elf_create_linker_section): Remove unused
1085 zero_section variable.
1087 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
1089 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1090 ($(srcdir)/libbfd.h): Rename from libbfd.h.
1091 ($(srcdir)/libcoff.h): Rename from libcoff.h.
1093 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
1095 * ieee.c (ieee_write_expression): Only use an R variable for a
1096 local symbol. Don't output a zero offset. Handle a zero address.
1097 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1098 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1100 (parse_expression): Don't try to handle multiple occurrences of a
1101 P variable. Handle I variables differently from X variables. Fix
1102 the order of minus expressions.
1103 (ieee_slurp_external_symbols): Generate an I variable for an NN
1104 record. Fix handling of ATI and ATX records.
1105 (ieee_slurp_sections): Only set minimal section attributes.
1106 Adjust them later, based on the section contents.
1107 (ieee_object_p): Read in the file until just after the ME record.
1108 Call ieee_slurp_section_data to set the section flags.
1109 (do_one): Add iterations parameter. Only repeat the first load
1110 item. Set the section and file reloc flags.
1111 (ieee_slurp_section_data): Set section flags. Pass iterations to
1113 (ieee_canonicalize_reloc): Handle I variables.
1114 (do_with_relocs): Only emit relocation size when necessary.
1115 Increase MAXRUN to 127. Change ov to be assigned, and take
1116 src_mask and pcrel_offset into account.
1117 (ieee_write_data_part): Skip sections that are not loaded.
1118 (ieee_write_external_part): Don't output optional last entry of WX
1120 (ieee_write_me_part): Make setting of me_record neater.
1121 (ieee_generic_stat_arch_elt): Get the size of an archive element.
1123 * syms.c (stt): Add entries for zerovars, vars, and code.
1125 * elfcode.h (validate_reloc): New static function.
1126 (write_relocs): Call validate_reloc for non ELF relocs.
1128 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1129 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1130 (TARGET_LITTLE_SYM): Likewise.
1132 * config.bfd (m68*-*-psos*): New target.
1134 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
1136 * i386msdos.c: Remove some #if 0 code.
1137 (msdos_write_object_contents): Don't include empty sections in the
1138 size computation, regardless of their address.
1140 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1142 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1143 is NULL, ie, the -r switch is used.
1145 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
1147 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1148 (BFD_RELOC_MIPS_GOT_LO16): Define.
1149 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1150 * bfd-in2.h, libbfd.h: Rebuild.
1151 * elf32-mips.c (mips_reloc_map): Map new relocs.
1153 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1155 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1158 * ieee.c (get_symbol): Set the section to bfd_abs_section.
1159 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1160 simple number for the section address, rather than an expression.
1161 Limit the number of bytes between relocs to MAXRUN.
1162 (ieee_write_me_part): Set me_record to the file offset after the
1164 (ieee_write_processor): New static function.
1165 (ieee_write_object_contents): Use ieee_write_processor.
1167 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
1169 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1171 * coff-aux.c: Change include of aux.h to aux-coff.h.
1173 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1175 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1176 relocation put the addend both in the reloc entry and the data.
1177 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
1180 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1181 a R_68K_PCxx reloc against a defined global symbol directly.
1182 (elf_m68k_check_relocs): Don't count such a reloc.
1184 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1185 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
1186 symbol for now, otherwise always record the symbol as dynamic.
1187 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1188 is not referenced by a dynamic object, and we are not making a
1189 shared object, then don't make a PLT entry. If we do make a PLT
1190 entry, make sure the symbol has been recorded as dynamic.
1192 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
1194 * configure.host: When making a shared library, set HLDFLAGS to
1195 pass an appropriate -rpath option. Use the make variable SONAME
1196 as the shared library soname, rather than computing it here. On
1197 SunOS, build stamp-tshlink in place of $(SHLINK).
1198 * Makefile.in (SONAME): New variable.
1199 ($(SHLINK)): Make a link to the transformed name, as well.
1200 (stamp-tshlink): New target.
1201 (install): Skip stamp-tshlink during install.
1203 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1205 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1206 linker sections have been set up yet.
1208 * elf.c (make_mapping): Add an additional argument to suppress
1209 making the first section include the program headers.
1210 (map_sections_to_segments): If the user used -Ttext such that the
1211 program headers are on a different page, do not set the flags
1212 saying that this section includes the program headers.
1214 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1216 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1217 don't define TRAD_HEADER.
1218 * configure: Rebuild.
1220 * netbsd-core.c: New file, support for NetBSD core files.
1221 * hosts/*nbsd.h: Removed.
1223 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
1225 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1226 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1227 * libbfd.h, bfd-in2.h: Regenerated.
1228 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1229 bfd_elf32_bfd_reloc_type_lookup.
1230 (reloc_type{,_names}): Deleted.
1231 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1233 (sparc_reloc_map): Add sparc64 relocs.
1234 (sparc_elf_notsupported_reloc): New static function.
1235 (sparc_elf_wdisp16_reloc): New static function.
1236 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1237 (elf32_sparc_relocate_section): Likewise.
1238 (bfd_elf32_bfd_reloc_type_lookup): Define.
1239 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1240 (reloc_type{,_names}): Deleted.
1241 (elf_sparc_howto_table): Deleted.
1242 (sparc_reloc_map): Deleted.
1243 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1244 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1246 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
1248 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1251 * Makefile.in (program_transform_name): New variable.
1252 (install): Transform library name before installing it.
1254 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
1256 * archures.c (bfd_mach_i960_hx): Define.
1257 * bfd-in2.h: Rebuild.
1258 * cpu-i960.c (scan_960_mach): Accept machine "hx".
1259 (MATRIX): Expand entries for HX.
1260 (arch_info_struct): Add i960:hx entry.
1261 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1262 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1263 (coff_set_flags): Handle bfd_mach_i960_hx.
1265 Support for building as a shared library, based on patches from
1266 Alan Modra <alan@spri.levels.unisa.edu.au>:
1267 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1268 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1269 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1270 * configure: Rebuild.
1271 * configure.host: If --enable-shared, adjust shared library stuff
1272 based on the host. If the host is SunOS, and the linker supports
1273 -rpath, set HLDFLAGS to use it.
1274 * Makefile.in (ALLLIBS): New variable.
1275 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1276 (COMMON_SHLIB, SHLINK): New variables.
1277 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1278 (STAGESTUFF): Remove variable.
1279 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1281 (stamp-ofiles): New target, like old ofiles target, but build
1282 using a temporary file and move-if-change, and touch stamp-ofiles
1284 (ofiles): Just depend upon stamp-ofiles.
1285 (stamp-piclist, piclist): New targets.
1286 ($(SHLIB), $(SHLINK)): New targets.
1287 (targets.o, archures.o): Build twice if PICFLAG is set.
1288 (do_mostlyclean): Remove pic/*.o.
1289 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1291 (do_distclean): Remove pic and stamp-picdir.
1292 (install): Install shared libraries.
1293 ($(OFILES)): Depend upon stamp-picdir.
1294 (stamp-picdir): New target.
1296 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1298 * libcoff.h: Rebuild.
1300 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1301 flavour of a section with no owner.
1303 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1304 ELF_LINK_NON_ELF flag.
1305 (mips_elf_create_got_section): Likewise.
1307 * elf.c: Revert last change, since it breaks dynamic linking.
1308 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1310 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1311 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1312 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1314 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1316 * elf.c (assign_file_positions_for_segments): If the backend does
1317 not want the elf header or the program headers in the address
1318 space, do not include them in the calculations.
1320 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1321 function to determine if we need additional program headers.
1322 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1323 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1325 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1327 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1329 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1331 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1332 back into one line. Some compilers (sunos 4.1.3 for example)
1333 won't accept args split across more than one line.
1335 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1337 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1338 * configure: Regenerate.
1340 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1342 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1343 try to do arithmetic on a void *, cast it to a unsigned char * first.
1345 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1347 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1348 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1350 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1351 flag for a newly defined symbol.
1352 (NAME(bfd_elf,record_link_assignment)): Likewise.
1353 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1354 set the DEF or REF_REGULAR flags correctly.
1356 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1357 (libbfd.h, libcoff.h): Corresponding change.
1359 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1360 a PLT32 reloc as dynamic.
1361 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1362 is not referenced by a dynamic object, and we are not making a
1363 shared object, then don't make a PLT entry. If we do make a PLT
1364 entry, make sure the symbol has been recorded as dynamic.
1366 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1368 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1369 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1370 (powerpcle-*-cygwin32): New.
1371 * peicode.h (add_data_entry): Get address from vma.
1373 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1375 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1376 attached to the section has already been created as an undefined
1377 symbol, treat it as if it hasn't been created yet.
1379 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1381 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1382 symbol or section symbols if stripping all symbols and this is not
1383 a relocateable link. Don't output the symbol string table if
1384 there are no symbols.
1385 (elf_link_flush_output_syms): Don't do anything if there are no
1388 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1390 * coff-aux.c: New file.
1391 * hosts/m68kaux.h: New file.
1392 * config.bfd (m68*-apple-aux*): New target.
1393 * configure.in (m68*-apple-aux*): New native host.
1394 (m68kaux_coff_vec): New vector.
1395 * configure: Rebuild.
1396 * targets.c (m68kaux_coff_vec): Declare.
1397 * coffcode.h (bfd_coff_backend_data): Add field
1398 _bfd_coff_link_add_one_symbol.
1399 (bfd_coff_link_add_one_symbol): Define.
1400 (compare_arelent_ptr): New static function if TARG_AUX.
1401 (coff_write_relocs): If TARG_AUX, sort the relocs.
1402 (coff_write_object_contents): Set A/UX aouthdr magic number.
1403 (coff_link_add_one_symbol): Define if not defined.
1404 (bfd_coff_std_swap_table): Initialize new field.
1405 * libcoff.h: Rebuild.
1406 * cofflink.c (coff_link_add_symbols): Call
1407 bfd_coff_link_add_one_symbol rather than
1408 _bfd_generic_link_add_one_symbol.
1409 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1410 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1411 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1412 * Makefile.in: Rebuild dependencies.
1413 (BFD32_BACKENDS): Add coff-aux.o.
1414 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1416 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1418 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1419 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1421 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1423 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1424 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1425 (maintainer-clean): Warn about deleting special files.
1426 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1428 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1429 warning symbols correctly.
1430 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1431 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1432 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1433 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1434 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1435 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1437 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1440 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
1442 * libcoff-in.h: aligned newly exported names with bfd naming
1443 conventions. Removed an erroneous define of POWERPC_LE_PE.
1444 * libcoff.h: Rebuild.
1445 * cofflink.c, coff-ppc.c: the above function name changes
1447 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
1449 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1450 * ecoff.c (struct extsym_info): Define.
1451 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1452 to ecoff_link_write_external.
1453 (ecoff_link_write_external): Accept a struct extsym_info pointer.
1454 Strip symbols when appropriate.
1456 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1457 * syms.c (BSF_OBJECT): Define.
1458 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1459 * bfd-in2.h: Rebuild.
1460 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1462 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1465 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1466 copying relocs into a shared object, treat a defined global symbol
1468 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1469 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1470 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1472 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1473 real defined symbol, not to a weak defined symbol.
1475 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
1477 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
1478 and made a few static functions externs.
1480 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
1481 POWERPC_LE_PE hack in cofflink.
1483 * libcoff-in.h: promoted the following from cofflink.c to allow
1484 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
1485 coff_debug_merge_element, struct coff_debug_merge_type,
1486 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
1487 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
1488 coff_debug_merge_hash_lookup, coff_link_section_info,
1489 coff_final_link_info, coff_debug_merge_hash_newfunc,
1490 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
1492 * libcoff.h: re-gen'd
1494 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
1496 * syms.c: Include "bfdlink.h".
1497 (struct stab_find_info): Define.
1498 (_bfd_stab_section_find_nearest_line): New function.
1499 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
1500 * libbfd.h: Rebuild.
1501 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
1502 * elf.c (_bfd_elf_find_nearest_line): Try calling
1503 _bfd_stab_section_find_nearest_line before searching the ELF
1504 symbol table. Find the closest STT_FUNC symbol, not the last one.
1505 * libcoff-in.h (coff_data_type): Add line_info field.
1506 * libcoff.h: Rebuild.
1507 * coffgen.c (coff_find_nearest_line): Try calling
1508 _bfd_stab_section_find_nearest_line before searching the COFF
1510 * Makefile.in: Rebuild dependencies.
1512 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1514 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
1515 4 bytes, so we get the correct value when updating the register
1516 field in little endian mode.
1518 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
1520 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
1521 entry_section fields. Add sntoc and snentry fields.
1522 * libcoff.h: Rebuild.
1523 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
1524 not toc_section and entry_section (the COFF file does not have any
1525 sections at this point).
1526 (coff_write_object_contents): Set o_snentry and o_sntoc from
1527 snentry and sntoc rather than entry_section and toc_section.
1528 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
1529 snentry, not toc_section and entry_section.
1530 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
1531 entry_section from hentry.
1532 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
1534 (xcoff_link_input_bfd): Set sntoc, not toc_section.
1535 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
1536 than using toc_section directly.
1538 * archures.c: Add missing `.' in enum bfd_architecture.
1539 * bfd-in2.h: Rebuild.
1541 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
1542 Robert Lipe <robertl@arnet.com>.
1544 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1546 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
1547 to sections we allocate. Use bfd_zalloc to allocate initialial
1548 sections, not bfd_alloc.
1549 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
1550 SDA{,2}I16 relocations.
1551 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
1552 whether to put something in .sbss or not.
1553 (ppc_elf_relocate_section): Add support for more relocations. Add
1554 in sec->output_offset where appropriate. Make error messages
1555 include the symbol name.
1557 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
1558 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
1559 doesn't get redefined messages if -shared.
1561 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
1562 section if the rel_section field has been set up.
1564 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1566 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
1569 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
1571 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
1572 of flags, only flags used are controlled by mach number. Bump up
1573 output file mach number to highest of input file mach numbers.
1574 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
1575 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
1577 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
1578 bfd_elf64_sparc_vec support.
1580 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1582 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
1583 the embedded bit is set on some objects and not on others. Just
1585 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
1588 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
1590 * coffcode.h (coff_new_section_hook): Don't try to align the
1593 * coffcode.h (coff_set_section_contents): Fix the handling of the
1594 .lib section to work even if the entire section contents are
1595 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
1596 Robert Lipe <robertl@arnet.com>.
1598 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1600 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
1601 memory here for contents.
1603 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
1604 _SDA2_BASE_ by 32768.
1605 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
1606 started using. Allocate contents for .sdata and .sdata2 sections
1608 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
1610 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
1611 size _SDA{,2}_BASE_.
1612 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
1615 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
1617 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
1619 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
1620 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
1621 (bfd_mach_sparc_v9a): Define.
1622 (bfd_mach_sparc_v9_p): Define.
1623 * bfd-in2.h: Regenerated.
1624 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
1626 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
1627 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
1628 to bfd_elf32_sparc_vec.
1629 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
1630 Add v8plus{,a} support.
1632 (sparc_compatible): New function.
1633 * elf32-sparc.h: #include "elf/sparc.h".
1634 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
1635 elf32_sparc_final_write_processing): New functions.
1636 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
1637 elf_backend_final_write_processing): Define.
1639 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1641 * elf-bfd.h (struct elf_link_hash_entry): Add
1642 linker_section_pointer field.
1643 (enum elf_linker_section_enum): Enumeration for new way of
1644 creating linker dynamic sections and symbols.
1645 (elf_linker_section{,_pointers}): New structures for creating
1646 dynamic sections and symbols.
1647 (elf_obj_tdata): Add linker_section_pointers and linker_section
1649 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
1650 (_bfd_elf_create_linker_section): New declarations.
1651 (_bfd_elf_find_pointer_linker_section): Ditto.
1652 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
1653 (_bfd_elf_make_linker_section_rela): Ditto.
1655 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
1657 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
1658 (ppc_elf_create_linker_section): New function to create the
1659 sections .got, .sdata, and .sdata2.
1660 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
1662 (ppc_elf_check_relocs): Support more of the eabi relocations.
1663 (ppc_elf_relocate_section): Ditto.
1664 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
1665 if the .sdata{,2} + .sbss{,2} section size is > 32k.
1667 * elflink.h (elf_create_pointer_linker_section): New function to
1668 create initialized pointers in dynamic linker sections.
1669 (elf_finish_pointer_linker_section): Actually intialize the
1670 pointers created above.
1672 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
1673 macros to provide both 32 and 64 bit versions of
1674 elf_create_pointer_linker_section.
1675 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
1676 provide both 32 and 64 bit versions of
1677 elf_finish_pointer_linker_section.
1679 * elflink.c (_bfd_elf_create_linker_section): New function to
1680 create a linker section.
1681 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
1682 given address in the linker pointer offsets created for a given
1684 (_bfd_elf_make_linker_section_rela): Make a RELA section
1685 corresponding to the generated linker section.
1687 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
1689 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
1691 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
1693 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
1694 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
1695 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
1696 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
1697 toc entry in an objdump) for now.
1698 (ppc_do_last, ppc_get_last): New function - needed to save processing
1699 the toc owner to the end.
1700 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
1703 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
1704 toc owner from being done till last. Must define POWERPC_LE_PC
1707 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
1709 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
1711 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
1712 SizeOfImage for PowerPC. Ignore the size of the .junk section.
1714 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
1716 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
1718 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
1720 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
1722 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
1724 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
1726 * elf.c (assign_file_positions_for_segments): Don't increment file
1727 offset for a segment which contains no loadable sections.
1729 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1731 * reloc.c: Add new PowerPC relocations.
1732 * {bfd-in2,libbfd}.h: Regenerate.
1734 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
1735 (ppc_elf_reloc_type_lookup): Lookup new relocations.
1737 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
1739 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
1742 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
1745 * coffgen.c (coff_find_nearest_line): Don't try to cache
1746 information in sections that are not owned by a BFD. From Richard
1747 Henderson <richard@atheist.tamu.edu>.
1749 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
1750 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1751 * elflink.h (elf_link_output_extsym): Remove special check for
1754 * ecoffswap.h: Add prototypes for static functions.
1756 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1758 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
1759 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
1761 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
1762 to satisfy a TOC16 relocation. Rewrite unsupported relocation
1763 support. Begin support for R_PPC_SDA{2,}REL.
1765 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1767 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
1768 create the .got and .got.neg sections.
1769 (ppc_elf_size_dynamic_sections): Call it.
1770 (ppc_elf_check_relocs): Call it.
1771 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
1772 (ppc_elf_check_relocs): Add error messages for relocations we
1773 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
1776 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1778 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
1779 section flags for V.4 and eabi.
1781 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
1783 * elf.c (assign_file_positions_for_segments): If a segment
1784 contains no sections, don't mark it as readable.
1786 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
1787 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
1789 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
1790 dynamic section, if there is one.
1791 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
1792 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
1793 (bfd_elf64_swap_dyn_in): Likewise.
1794 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
1796 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1798 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
1799 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
1800 <pirker@eiunix.tuwien.ac.at>.
1802 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1804 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
1805 PowerPC V.4 and eabi.
1806 * bfd-in2.h: Regenerate.
1807 * libfd.h: Regenerate.
1809 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
1811 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
1812 section type and SHF_EXCLUDE section flag, turning them into the
1813 appropriate bfd section flag.
1815 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
1817 * xcofflink.c (xcoff_link_add_symbols): Create the special
1818 sections if we see a DYNAMIC object, in case that is the only
1819 XCOFF input object we see.
1821 * elf32-mips.c: Extensive changes for a start at dynamic linking
1822 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1824 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
1825 (struct elf_backend_data): Remove
1826 elf_backend_create_program_headers field. Add
1827 elf_backend_additional_program_headers and
1828 elf_backend_modify_segment_map fields.
1829 * elfxx-target.h (elf_backend_type_change_ok): Define if not
1831 (elf_backend_additional_program_headers): Likewise.
1832 (elf_backend_modify_segment_map): Likewise.
1833 (elf_backend_create_program_headers): Don't define.
1834 (elfNN_bed): Change to account for field changes.
1835 * elf.c (assign_file_positions_for_segments): Call new
1836 modify_segment_map backend function. Don't call old
1837 create_program_headers backend function.
1838 (get_program_header_size): Call additional_program_headers rather
1839 than create_program_headers.
1840 * elflink.h (elf_link_add_object_symbols): Initialize
1841 type_change_ok from new backend field.
1842 (elf_link_output_extsym): Don't warn if _rld_new_interface is
1844 (elf_reloc_link_order): Treat a reloc against a defined symbol as
1845 a reloc against the appropriate section.
1847 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
1848 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
1849 (elf_flags_init): Rename from elf_ppc_flags_init.
1850 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
1852 (ppc_elf_copy_private_bfd_data): Likewise.
1853 (ppc_elf_merge_private_bfd_data): Likewise.
1855 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
1858 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
1860 * coff-alpha.c (alpha_relocate_section): During final link, allow
1861 output .lita section to be bigger than 64k by adjusting gp value
1862 on a per-input section basis.
1863 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
1865 (struct ecoff_section_tdata): Add gp field.
1867 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
1869 Handle Alpha ECOFF changes in OSF/1 3.2.
1870 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
1872 * coff-alpha.c: Include "aout/ar.h".
1873 (alpha_ecoff_get_relocated_section_contents): Don't require an
1874 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
1875 3.2 doesn't generate one.
1876 (alpha_relocate_section): Likewise.
1877 (alpha_ecoff_slurp_armap): Define.
1878 (alpha_ecoff_slurp_extended_name_table): Define.
1879 (alpha_ecoff_construct_extended_name_table): Define.
1880 (alpha_ecoff_truncate_arname): Define.
1881 (alpha_ecoff_write_armap): Define.
1882 (alpha_ecoff_generic_stat_arch_elt): Define.
1883 (alpha_ecoff_update_armap_timestamp): Define.
1885 (alpha_ecoff_read_ar_hdr): New static function.
1886 (alpha_ecoff_get_elt_at_filepos): New static function.
1887 (alpha_ecoff_openr_next_archived_file): New static function.
1888 (alpha_ecoff_get_elt_at_index): New static function.
1889 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
1890 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
1891 _bfd_ecoff to alpha_ecoff.
1892 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
1893 field from backend structure, rather than always calling
1894 _bfd_get_elt_at_filepos.
1895 * coff-mips.c (mips_ecoff_backend_data): Initialize
1896 get_elt_at_filepos field.
1897 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
1898 from _bfd_generic_read_ar_hdr with minor changes.
1899 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
1900 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
1901 * libbfd.h: Rebuild.
1903 * bfd-in.h (BFD_IN_MEMORY): Define.
1904 * libbfd-in.h (struct bfd_in_memory): Define.
1905 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
1906 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
1907 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
1908 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
1909 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
1910 (bfd_get_size): Handle BFD_IN_MEMORY flag.
1911 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
1912 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
1913 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
1914 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
1916 (bfd_openstreamr): Likewise.
1917 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
1918 BFD_IN_MEMORY is not set.
1919 * riscix.c (riscix_some_aout_object_p): Likewise.
1920 * bfd-in2.h, libbfd.h: Rebuild.
1922 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
1923 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
1924 (bfd_get_elt_at_index): Define.
1925 * archive.c (_bfd_generic_get_elt_at_index): Rename from
1926 bfd_get_elt_at_index. Change index parameter from int to
1928 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
1929 (_bfd_noarchive_get_elt_at_index): Define.
1930 (_bfd_archive_bsd_get_elt_at_index): Define.
1931 (_bfd_archive_coff_get_elt_at_index): Define.
1932 * bfd-in2.h, libbfd.h: Rebuild.
1933 * aout-target.h (MY_get_elt_at_index): Define if not defined.
1934 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
1935 * ieee.c (ieee_get_elt_at_index): Define.
1936 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
1937 * oasys.c (oasys_get_elt_at_index): Define.
1938 * som.c (som_get_elt_at_index): Define.
1940 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
1941 numbers to the .text section.
1943 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
1945 * ieee.c (ieee_write_debug_part): Change return type to boolean.
1946 If there is a SEC_DEBUGGING section, get the contents of the debug
1947 information part from it.
1948 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
1950 (ieee_write_object_contents): Check ieee_write_debug_part return.
1952 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
1954 * config.bfd (i[345]86-*-freebsd*): Add target.
1955 * configure.in (i386freebsd_vec): Add vec.
1956 * configure: Regenerate.
1957 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
1958 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
1959 Rebuild dependencies..
1960 * freebsd.h: New file.
1961 * i386freebsd.c: New file.
1962 * targets.c (i386freebsd_vec): Declare.
1963 (bfd_target_vector): Add i386freebsd_vec.
1964 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1965 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1967 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
1969 * ieee.c (ieee_slurp_debug): New static function.
1970 (ieee_object_p): Call it.
1971 (ieee_slurp_section_data): Skip debugging sections.
1972 (ieee_get_reloc_upper_bound): Likewise.
1973 (ieee_get_section_contents): Likewise.
1974 (ieee_canonicalize_reloc): Likewise.
1975 (ieee_write_section_part): Likewise.
1976 (ieee_write_debug_part): Likewise.
1977 (ieee_write_data_part): Likewise.
1978 (init_for_output): Likewise.
1980 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
1982 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
1984 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
1985 relocs, since ppc_elf_relocate_section handles the linker case.
1986 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
1988 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
1989 ppc_elf_relocate_section since that is now the only caller.
1990 (ppc_elf_relocate_section): Ditto.
1992 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
1994 * coffcode.h (coff_write_object_contents): If we don't know the
1995 section of the entry point for an XCOFF executable, always set the
1996 entry address to -1.
1998 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2000 * elf.c (bfd_section_from_shdr): Add support for note sections.
2002 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2004 * bfd-in.h (struct _symbol_info): Add stab_type field.
2005 * bfd-in2.h: Rebuild.
2006 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2008 * elf32-ppc.c: Remove trailing newline from calls to
2010 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2011 difference if target endianness is known.
2013 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2015 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2016 old style TOC16 references without using R_PPC_GOT.
2017 (ppc_reloc_type): Ditto.
2018 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2019 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2020 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2021 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2022 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2024 (ppc_elf_adjust_dynamic_symbol): Ditto.
2025 (ppc_elf_adjust_dynindx): Ditto.
2026 (ppc_elf_size_dynamic_sections): Ditto.
2027 (ppc_elf_finish_dynamic_symbol): Ditto.
2028 (ppc_elf_finish_dynamic_sections): Ditto.
2029 (ELF_DYNAMIC_INTERPRETER): Define.
2031 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2033 * elf.c (copy_private_bfd_data): When attaching sections to
2034 segments ignore sections that won't be allocated. Patch from
2037 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2039 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2042 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2044 * coff-i960.c (CALC_ADDEND): Define.
2045 (coff_i960_relocate_section): Add the input section VMA to the
2046 addend for PC relative relocs.
2048 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2050 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2051 to correctly terminate.
2053 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2055 * targets.c (enum bfd_endian): Define.
2056 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2057 from boolean to enum bfd_endian. Change header_byteorder_big_p
2059 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2060 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2061 * bfd-in2.h: Rebuild.
2062 * All targets: Change initialization of byteorder and
2063 header_byteorder to use enum bfd_endian values rather than
2065 * All files: Change all references to byteorder_big_p and
2066 header_byteorder_big_p to use new bfd_*_endian macros.
2068 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2070 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2072 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2074 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2076 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2078 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
2080 * ieee.c: Lots of minor cleanups. Make many functions return
2081 errors rather than calling abort. Also:
2082 (ieee_write_twobyte): Remove; change callers to call existing
2083 ieee_write_2bytes function.
2084 (ieee_write_expression): Don't output the section twice when
2085 outputting a local symbol. Don't emit an extraneous zero if there
2087 (ieee_slurp_sections): Set the lma as well as the vma.
2088 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2090 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2091 a recognized one or bfd_arch_unknown.
2092 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2094 (ihex_get_symtab): Likewise.
2096 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
2098 * aoutx.h: Include <ctype.h>.
2099 (struct aout_link_includes_table): Define.
2100 (struct aout_link_includes_totals): Define.
2101 (struct aout_link_includes_entry): Define.
2102 (aout_link_includes_lookup): Define macro.
2103 (struct aout_final_link_info): Add includes field.
2104 (aout_link_includes_newfunc): New static function.
2105 (NAME(aout,final_link)): Initialize includes hash table.
2106 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2108 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
2110 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2112 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
2114 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2116 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
2118 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2119 (pe_print_private_bfd_data): call pe_print_reloc.
2120 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2121 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2122 up some debugging as well.
2124 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
2126 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
2129 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
2131 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2132 when setting sections to NULL.
2134 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
2136 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2138 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2139 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2141 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2142 * bfd-in2.h: Rebuild.
2144 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
2146 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2148 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
2150 * ihex.c (ihex_scan): Handle record types 4 and 5.
2151 (ihex_object_p): Permit types 4 and 5.
2152 (ihex_set_section_contents): Remove check for out of range
2154 (ihex_write_object_contents): Generate types 4 and 5.
2156 * elflink.h (elf_link_output_extsym): Just ignore warning and
2157 indirect references to symbols which don't really exist.
2159 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
2161 * peicode.h (pe_print_idata): Minor format fixes
2162 (pe_print_edata): New function. Under private printing, this formats
2163 the edata section of a PE file.
2164 (pe_print_private_bfd_data): Added call to pe_print_edata.
2166 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2168 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2169 index, don't call stoi.
2171 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
2173 * srec.c (srec_scan): Set lma as well as vma.
2175 * ihex.c: New file; support for Intel Hex format.
2176 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2177 (ihex_vec): Declare.
2178 (bfd_target_vector): Always include ihex_vec.
2179 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2180 * Makefile.in: Rebuild dependencies.
2181 (BFD_LIBS): Add ihex.o
2182 (BFD_LIBS_CFILES): Add ihex.c.
2183 * bfd-in2.h: Rebuild.
2185 * elf.c (assign_file_positions_for_segments): Sort the sections in
2187 (get_program_header_size): Return the right size if segment_map is
2189 (copy_private_bfd_data): Don't bother to sort the sections.
2191 * bfd.c (bfd_record_phdr): New function.
2192 * bfd-in.h (bfd_record_phdr): Declare.
2193 * bfd_in2.h: Rebuild.
2195 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2198 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2199 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
2201 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2202 (bfd_zmalloc): Change declaration.
2203 * libbfd.h: Rebuild.
2204 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2205 and realloc. Don't set bfd_error_no_memory if they fail.
2207 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
2209 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2210 uses as well. Added a new howto to deal with TOCREL16 relocs that
2211 are TOCDEFN as well.
2212 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2213 to handle RVA relocs from dlltool.
2214 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2215 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2216 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2218 * coffcode.h (coff_set_alignment_hook): check idata$X sections
2219 to get the right section alignment.
2221 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
2223 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2224 p_paddr if p_paddr is zero.
2225 (make_mapping): Set includes_filehdr and includes_phdrs for first
2227 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2229 (assign_file_positions_for_segments): Handle includes_filehdr and
2230 includes_phdrs. Remove special handling of PT_PHDR and first
2232 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2233 when appropriate. Remove special handling of PT_PHDR segment.
2234 Use a more complex condition for when a section is included in a
2235 segment to handle Solaris linker oddities.
2237 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2239 * coff-m88k.c (howto_table): Reformatted for easier reading;
2240 special_function now points to new function m88k_special_reloc.
2241 (howto_hvrt16): Function previously used for handling HVRT16 relocs
2243 (rtype2howto): Do not add reloc's r_offset to the addend, this will
2244 be done correctly by m88k_special_reloc.
2245 (reloc_processing): New function to be used by RELOC_PROCESSING.
2246 (RELOC_PROCESSING): Define to call reloc_processing.
2248 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
2250 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2251 (pe_print_pdata): Likewise.
2253 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2254 obstack_alloc fails.
2255 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2257 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2258 * Many files: don't set bfd_error_no_memory if one of the above
2261 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2262 if p_paddr_valid is set.
2263 (copy_private_bfd_data): New static function.
2264 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2266 * elf.c (assign_file_positions_for_segments): Fix case where extra
2267 program headers were allocated.
2269 * elf.c (_bfd_elf_print_private_bfd_data): New function.
2270 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2271 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2272 _bfd_elf_print_private_bfd_data.
2274 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2275 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2276 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2277 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2278 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2279 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2280 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2282 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2284 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2285 * elf.c (make_mapping): New static function.
2286 (map_sections_to_segments): New static function.
2287 (elf_sort_sections): New static function.
2288 (assign_file_positions_for_segments): New static function.
2289 (map_program_segments): Remove.
2290 (get_program_header_size): Remove sorted_hdrs, count, and
2291 maxpagesize parameters. Simplify.
2292 (assign_file_positions_except_relocs): When generating an
2293 executable, use assign_file_positions_for_segments.
2294 (elf_sort_hdrs): Remove.
2295 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2296 to get_program_header_size.
2298 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2300 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2302 * configure, config.in: Regenerate with autoconf 2.7.
2304 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2305 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2307 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2309 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2310 (ecoff_sec_to_styp_flags): Likewise.
2311 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2312 (ecoff_set_symbol_info): Handle scRConst.
2313 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2314 (ecoff_compute_section_file_positions): Handle .rconst section.
2315 (_bfd_ecoff_write_object_contents): Likewise.
2316 (ecoff_link_check_archive_element): Handle scRConst.
2317 (ecoff_link_add_externals): Likewise.
2318 (ecoff_link_write_external): Handle .rconst section.
2319 (ecoff_reloc_link_order): Likewise.
2320 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2321 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2323 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2325 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2326 DEF_DYNAMIC flag is set.
2328 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2330 * host-aout.c: If TRAD_HEADER is defined, include it.
2332 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2334 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2335 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2336 (BFD_NEED_DECLARATION): New function.
2337 * configure.in: Use BFD_NEED_DECLARATION.
2338 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2339 * configure, config.in: Rebuild with autoconf 2.6.
2341 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2342 special_sections before returning when called with a non XCOFF
2345 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2348 * coffcode.h (coff_compute_section_file_positions): Only pad the
2349 previous section to force file alignment when creating an
2352 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2354 * coffcode.h (coff_compute_section_file_positions): If
2355 RS6000COFF_C, set up the .debug section.
2357 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2358 if it is not large enough to accomodate the entire TOC area with
2359 signed 16 bit offsets.
2360 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2362 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2363 TOC anchor to use the TOC value used in the output file.
2365 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2367 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2368 (_bfd_coff_read_string_table): Likewise.
2370 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2372 * pe-arm.c: Fix typos.
2373 * coff-arm.c: Likewise.
2375 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2377 * coff-ppc.c (list_ele): Added "cat"egory member.
2378 (record_toc): New category parameter (priv or pub).
2379 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2380 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2381 the mainline. It addes extra toc cells in error.
2382 (ppc_coff_swap_sym_in_hook): Added some documentation.
2383 (dump_toc): Can now diagnose "virtual toc" chicanery.
2385 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2387 * elf-bfd.h (struct elf_link_hash_table): Change type of
2388 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2390 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2392 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2393 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2395 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2396 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2397 defined or mentioned in a regular file.
2399 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2401 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2402 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2403 (coff_ppc_relocate_section): Correct REL24 handling
2404 (ppc_process_before_allocation): Correct TOCDEFN handling
2406 * peicode.h (dir_names): Added name descriptions
2408 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2410 * VERSION: Updated to cygnus-2.6.
2412 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2414 * targets.c (m68k4knetbsd_vec): Declare.
2416 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2418 * targets.c (bfd_target): Change type of second argument to
2419 _bfd_print_private_bfd_data from void * to PTR.
2420 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2421 using PTR rather than void *.
2422 * bfd-in2, libbfd.h: Rebuild.
2423 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2425 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2426 _bfd_generic_bfd_print_private_bfd_data rather than casting
2429 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
2431 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
2432 "DO NOT DELETE" lines or blank lines that mkdep writes on some
2434 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2435 BFD64_BACKENDS_CFILES): New variables.
2438 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
2440 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2441 not at the file position of the first section.
2442 * coffcode.h (coff_compute_section_file_positions): Avoid using
2444 (coff_write_object_contents): When generating a PPC PE executable
2445 with no symbols, round up the file size to a COFF_PAGE_SIZE
2447 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2448 don't write out a string table.
2450 * elf.c (bfd_section_from_shdr): When using a different section
2451 header, pass the new one to _bfd_elf_make_section_from_shdr.
2452 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2453 (elf_map_symbols): Add section VMA to symbol value when comparing
2455 (_bfd_elf_compute_section_file_positions): Only build symbol table
2456 if there are some symbols. Set file offset of symtab and strtab
2458 (assign_file_positions_except_relocs): Remove dosyms parameter.
2459 Change all callers. Never set file offset of symtab and strtab
2461 (_bfd_elf_copy_private_section_data): New function.
2462 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2463 (_bfd_elf_copy_private_symbol_data): New function.
2464 (swap_out_syms): Check for special mapping of st_shndx created by
2465 copy_private_symbol_data.
2466 * elfxx-target.h: Use new copy routines.
2467 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2468 (_bfd_elf_copy_private_section_data): Declare.
2470 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2472 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
2475 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
2476 _bfd_dummy_target, matching the recent change to archive
2479 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
2481 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
2482 arithmetic on PTR types.
2484 * aout-target.h (MY(callback)): Set the lma of the sections.
2486 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
2487 symbol into a reloc against the section.
2489 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
2491 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
2492 glue for the relocs: IMGLUE and IFGLUE.
2493 (record_toc): new function - tracks toc contents
2494 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
2495 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
2496 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
2497 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
2498 (ppc_record_toc_entry): Removed a debug define (duh)
2500 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
2501 (pe_print_idata): New function - formats the idata section data
2502 (pe_print_pdata): New function - formats the pdata section data
2503 (pe_print_private_bfd_data): calls to above
2505 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
2507 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
2508 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
2509 TARGET_SYM and TARGET_NAME for vector and BFD name.
2510 * coff-pmac.c (pmac_xcoff_vec): Remove.
2511 (TARGET_SYM, TARGET_NAME): Define.
2512 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
2513 machine to 0, not all PowerMacs are 601s.
2515 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
2517 * elfcode.h (elf_object_p): Read in any program headers.
2518 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
2519 based on the program headers, if any.
2520 (elf_fake_sections): Set sh_addr from the vma, not the lma.
2521 (map_program_segments): Set p_paddr of program headers based on
2524 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
2526 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
2529 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
2530 trying to do a relocateable link with a non-a.out object file.
2532 * archive.c (bfd_generic_archive_p): Check the first object file
2533 in an archive even if target_defaulted is set. If the object file
2534 has the wrong xvec, reject it.
2536 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
2537 be represented, report the name via _bfd_error_handler.
2538 (translate_to_native_sym_flags): Likewise.
2539 * elf32-mips.c (mips_elf_final_link): Likewise.
2540 * oasys.c (oasys_write_sections): Likewise.
2542 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
2543 which checks for STYP_OVRFLO sections.
2544 (coff_compute_section_file_positions): If RS6000COFF_C, handle
2545 reloc and lineno count overflows.
2546 (coff_write_object_contents): Call coff_count_linenumbers before
2547 coff_compute_section_file_positions. If RS6000COFF_C, handle
2548 reloc and lineno count overflows.
2549 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
2550 relocs before dealing with .pad sections. Count overflow section
2551 headers when handling .pad sections.
2553 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
2556 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
2557 (struct xcoff_link_hash_table): Add descriptor_section and
2558 special_sections fields.
2559 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
2560 (xcoff_link_add_symbols): Set linkage section alignment. Create
2561 descriptor section. Check for magic symbol names (_text, etc.),
2562 and record them in special_sections if found. Set
2563 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
2564 descriptor field to point back to the function code symbol.
2565 (xcoff_sweep): Always mark the special descriptor_section.
2566 (bfd_xcoff_export_symbol): Check whether the symbol might be a
2567 function descriptor, and mark it if it is.
2568 (bfd_xcoff_size_dynamic_sections): Add new special_sections
2569 parameter, and fill it in. Allocate space for the descriptor
2571 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
2572 global linkage code. If an undefined function descriptor is
2573 exported, arrange to define it. Warn about any other undefined
2575 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
2576 (xcoff_write_global_symbol): Create a function descriptor when
2578 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2579 * bfd-in2.h: Rebuild.
2581 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
2583 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
2584 (ppc_coff_link_hash_table): new types for hashing
2585 (ppc_coff_link_hash_newfunc): hash entry constructor
2586 (ppc_coff_link_hash_table_init): hash table initializer
2587 (ppc_coff_link_hash_table_create): hash table constructor
2588 (ppc_record_toc_entry): changed references to hash table
2589 (coff_ppc_relocate_section): changed references to hash table
2591 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
2592 * libcoff.h: Rebuild
2594 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
2595 (coff_link_add_symbols): removed toc_offset init
2597 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
2599 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
2602 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
2603 if it is given and mmep is available.
2604 * acconfig.h: Undef USE_MMAP.
2605 * configure, config.in: Regenerated.
2606 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
2607 table handling the old way.
2608 (aout_get_external_symbols): Don't complain if last byte of string
2610 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
2611 (bfd_free_window) [! USE_MMAP]: Don't define.
2612 (bfd_get_file_window,
2613 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
2615 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
2617 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
2620 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
2622 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
2623 compatible with AMD generated COFF files. Try to support both AMD
2624 and GNU formats simultaneously.
2625 (coff_a29k_relocate_section): Likewise.
2627 * libbfd.c (bfd_get_file_window): Change writable parameter from
2628 int to boolean; update all callers. Pass MAP_SHARED if not
2629 writable--it's required on Solaris. Cast fprintf argument to
2631 * bfd-in.h (bfd_get_file_window): Update declaration.
2632 * bfd-in2.h: Rebuild.
2633 * aoutx.h: Update calls to bfd_get_file_window.
2635 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
2637 (xcoff_swap_ldhdr_in): New static function.
2638 (xcoff_swap_ldsym_in): New static function.
2639 (xcoff_find_reloc): Handle the case of a single reloc correctly.
2640 (xcoff_link_add_symbols): If we just created a descriptor, pass it
2641 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
2642 Handle XTY_ER/XMC_XO symbols correctly.
2643 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
2644 rather than normal symbol table.
2645 (bfd_xcoff_import_symbol): It's not an error if the symbol is
2646 already defined with the same absolute value.
2647 (xcoff_mark): When considering called symbols, check whether the
2648 descriptor is from a dynamic object, rather than the symbol
2650 (xcoff_build_ldsyms): Likewise.
2652 * libbfd.c (bfd_get_file_window): Change return type to boolean.
2653 Cast realloc and malloc return values. If malloc or realloc fail,
2654 set bfd_error_no_memory.
2655 * bfd-in.h (bfd_get_file_window): Change type to boolean.
2656 * bfd-in2.h: Rebuild.
2658 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
2660 * coff-ppc.c (ppc_record_toc_entry): new function.
2661 (in_reloc_p): changed return value.
2662 (coff_ppc_relocate_section): much rework.
2663 (ppc_allocate_toc_section): new function.
2664 (ppc_process_before_allocation): new function.
2665 (ppc_coff_swap_sym_in_hook): new function.
2667 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
2668 (coff_link_add_symbols): initialize toc_offset.
2670 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
2671 (coff_swap_aouthdr_out): Added more sections to the data
2672 dictionary for the pe file header. Also changed linker version
2673 number on the ppc side.
2674 (dir_names): small improvements to the dictionary printing.
2675 (pe_mkobject_hook): save the file level flags.
2677 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
2678 (pe_tdata): added real_flags field
2679 (coff_tdata): added local_toc_sym_map and access macro
2681 * libcoff.h (coff_link_hash_entry): added toc_offset field
2682 (pe_tdata): added real_flags field
2683 (coff_tdata): added local_toc_sym_map and access macro
2685 * coffcode.h (coff_set_alignment_hook): added hook for PE.
2686 (coff_mkobject): init for local_toc_sym_map
2687 (coff_write_object_contents): set the internal_a.magic to
2688 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
2691 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
2693 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
2694 entries until both the line number address and the function name
2695 address are too large.
2697 * configure.in: Call AC_CHECK_PROG to find and cache AR.
2698 * configure: Rebuilt.
2700 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
2701 is defined in the environment.
2703 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
2705 * som.c (som_get_section_contents_in_window): Define to use
2708 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
2710 * coff-i860.c: New file, based on coff-i386.c.
2711 * cpu-i860.c: New file, based on cpu-i386.c.
2712 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
2713 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
2714 targets, using i860coff_vec.
2715 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
2716 trad-core.o and hosts/i860mach3.h.
2717 (i860coff_vec): Use coff-i860.o and cofflink.o.
2718 * configure: Rebuild.
2719 * Makefile.in: Rebuild dependencies.
2720 (ALL_MACHINES): Add cpu-i860.o.
2721 (BFD32_BACKENDS): Add coff-i860.o.
2722 (CFILES): Add cpu-i860.c and coff-i860.c.
2723 * targets.c (i860coff_vec): Declare.
2724 (bfd_target_vector): Add &i860coff_vec.
2725 * archures.c (bfd_i860_arch): Declare.
2726 (bfd_archures_list): Add &bfd_i860_arch.
2727 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
2728 (coff_set_flags): Handle bfd_arch_i860.
2729 (coff_write_object_contents): Handle I860 a.out magic number.
2731 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
2733 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
2734 the created .tc section to 2.
2735 (xcoff_mark): Don't keep a .loader reloc for a call to an
2736 undefined symbol when creating a shared library.
2737 (xcoff_build_ldsyms): When creating a shared library, generate
2738 global linkage code for a call to an undefined symbol.
2740 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
2742 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
2743 BFD32_BACKENDS, BFD64_BACKENDS.
2744 (.dep1): Put mkdep output in a separate file.
2745 Rebuilt dependencies.
2747 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
2750 Permit use of mmap when available:
2752 * configure.in: Check for mmap, madvise, mprotect.
2753 * config.in, configure: Regenerated.
2755 * libbfd.c (struct _bfd_window_internal): Define type.
2756 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
2758 (ok_to_map): New static variable for debugging.
2759 (_bfd_generic_get_section_contents_in_window): New function.
2760 * bfd-in.h (bfd_window_internal): Declare type.
2761 (bfd_window): Define type.
2762 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
2763 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
2766 * libaout.h (struct aoutdata): Add two window fields.
2767 (obj_aout_sym_window, obj_aout_string_window): New macros.
2768 * aoutx.h (some_aout_object_p): Initialize windows.
2769 (aout_get_external_symbols): Get symbol data and strings in
2770 windows instead of explicitly allocated buffers.
2771 (slurp_symbol_table): Free window instead of memory.
2772 (bfd_free_cached_info): Release windows instead of freeing storage
2774 (aout_link_free_symbols): Ditto.
2776 * targets.c (bfd_target): Add new field for
2777 get_section_contents_in_window.
2778 (BFD_JUMP_TABLE_GENERIC): Updated.
2779 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
2780 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
2781 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
2782 macros for get_section_contents_in_window field.
2784 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
2786 * core.c: Renamed to corefile.c
2787 * makefile.dos (OBJS): Change core.o to corefile.o
2788 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
2791 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
2793 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
2794 targ_selvecs to allow debugging under Irix-5 native.
2797 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
2799 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
2800 to o. Clobber and restore the list of new csects around the call
2801 to _bfd_generic_link_add_one_symbol, in case it wants to report a
2802 linker error and the linker wants to read the symbol table. Reset
2803 the line number count of a real section even if it has no relocs.
2804 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
2806 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
2809 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
2811 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
2812 an undefined symbol in a shared link.
2814 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
2815 oldtype from bfd_link_order_type to bfd_link_hash_type. From
2816 phdm@info.ucl.ac.be (Philippe De Muyter).
2818 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2820 * coff-m88k.c (rtype2howto): New static function.
2821 (RTYPE2HOWTO): Use it rather than a macro definition.
2823 * coffcode.h (coff_write_object_contents): set internal_a.magic
2824 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
2826 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
2827 define TRAD_HEADER to new file hosts/delta68.h.
2828 m88*-motorola-sysv*, however, does use ptrace-core.o.
2829 * hosts/delta68.h: New file.
2831 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
2832 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
2834 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
2836 * i386linux.c (MY(vec)): Declare before use.
2838 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
2840 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
2841 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
2843 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2844 BFD is not of the right type.
2845 (bfd_elf_get_needed_list): Likewise.
2846 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2847 * sunos.c (bfd_sunos_get_needed_list): Likewise.
2848 * xcofflink.c (XCOFF_XVECP): Define.
2849 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
2851 (bfd_xcoff_import_symbol): Likewise.
2852 (bfd_xcoff_export_symbol): Likewise.
2853 (bfd_xcoff_link_count_reloc): Likewise.
2854 (bfd_xcoff_record_link_assignment): Likewise.
2855 (bfd_xcoff_size_dynamic_sections): Likewise.
2857 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
2858 table index against the number of symbols for a base relative
2861 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
2863 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
2864 full_aouthdr flag here...
2865 (_bfd_xcoff_bfd_final_link): ...not here.
2867 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
2869 * libelf.h: Rename to elf-bfd.h to avoid conflict with
2870 systems that have a system <libelf.h>.
2871 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
2872 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
2873 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
2874 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
2875 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
2876 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
2877 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
2879 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
2881 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
2882 set, set BSF_WEAK in symbol. Change all callers.
2883 (ecoff_get_extr): Set weakext based on BSF_WEAK.
2884 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
2885 _bfd_generic_link_add_one_symbol.
2886 (ecoff_indirect_link_order): Check that the section tdata relocs
2887 are not NULL before using them.
2889 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
2890 define TRAD_HEADER as hosts/alphalinux.h.
2891 * configure: Rebuild.
2892 * hosts/alphalinux.h: New file.
2893 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
2896 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
2898 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
2899 C_ECOMM storage classes.
2901 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
2903 (xcoff_mark): Call xcoff_mark_symbol.
2904 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
2905 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
2907 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
2909 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
2911 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
2913 (xcoff_find_reloc): New static function.
2914 (xcoff_link_add_symbols): Use it.
2915 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
2916 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
2917 relocate the value of C_DECL.
2919 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
2921 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
2923 * cofflink.c (_bfd_coff_generic_relocate_section): Make
2924 callback decide what goes in .relocs.
2925 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
2926 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
2929 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
2931 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
2934 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
2936 * xcofflink.c: More improvements, mostly to fix handling of
2937 constructors and a few other special cases.
2938 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
2939 zero, reverting yesterday's change.
2940 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
2941 (bfd_xcoff_link_count_reloc): Declare.
2942 (bfd_xcoff_record_link_assignment): Declare.
2943 * bfd-in2.h: Rebuild.
2945 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
2947 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
2948 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
2949 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
2950 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
2951 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
2952 Change PAGE_SIZE to TARGET_PAGE_SIZE.
2954 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
2957 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
2958 segments includes the a.out header. See to that the magic number
2959 *always* is big-endian.
2961 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
2962 m68k4k NetBSD configurations.
2964 * configure.in, configure: Separate i386 & mips NetBSD
2965 configurations from other BSD ones. Don't assume DEC is the only
2966 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
2967 configurations. Add support for m68k4k NetBSD object format.
2969 * libaout.h: Added M_68K4K_NETBSD magic.
2971 * m68k4knetbsd.c: New file.
2973 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
2975 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
2978 * hosts/mipsnbsd.h: New file.
2981 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
2983 * config.bfd: Add config stuff for mips*-*-magic* to set
2984 targ_defvec to ecoff_big_vec.
2987 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
2989 * xcofflink.c: Numerous changes to get closer to a working XCOFF
2991 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
2992 toc_section, and entry_section fields.
2993 (struct xcoff_section_tdata): Remove ldrel_count field.
2994 * libcoff.h: Rebuild.
2995 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
2997 (coff_compute_section_file_positions): If RS6000COFF_C, generate
2998 full a.out header if full_aouthdr is set in xcoff_data.
2999 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3000 based on sections stored in xcoff_data.
3001 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3003 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3004 (rs6000coff_vec): Set symbol_leading_char to '.'.
3005 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3006 value stored in ret rather than returning a pointer value.
3008 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3010 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3013 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3015 * som.c (som_slurp_string_table): Allocate the strings with malloc
3016 since they're free'd by free_cached_info.
3017 (som_slurp_symbol_table): Similarly for the symbol table.
3019 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3021 * Makefile.in (diststuff): Don't make headers.
3023 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3025 * Makefile.in: Rebuild dependencies.
3027 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3028 output_bfd is not SunOS.
3029 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3030 non-SunOS input files.
3032 * xcofflink.c: Extensive changes to support linking shared objects
3033 and generating a .loader section.
3034 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3035 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3036 last_symndx, and ldrel_count fields.
3037 * libcoff.h: Rebuild.
3038 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3039 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3041 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3042 (bfd_xcoff_export_symbol): Declare.
3043 (bfd_xcoff_size_dynamic_sections): Declare.
3044 * bfd-in2.h: Rebuild.
3046 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3048 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3049 * configure: Rebuild.
3050 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3051 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3053 (pmac_xcoff_vec): Update to use new xcoff support.
3054 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3055 (xcoff_write_armap): Declare buf as unsigned char.
3056 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3058 * mpw-make.sed: Generalize subdir_do edit.
3060 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3062 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3063 correctly. Don't initialize asect->vma.
3065 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3067 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3068 something a little less than the page size.
3070 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3072 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3074 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3076 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3077 * coffcode.h (coff_write_object_contents): If .bss is before
3078 .data us that as data_start.
3079 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3081 * peicode.h (add_data_entry): Use _cooked_size of data directory.
3082 (coff_swap_outhdr_out): Hardwire in version number.
3084 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
3086 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3087 major and minor to *_vno, since the former are also macros in
3088 SunOS header files. Cast result of bfd_alloc to appropriate
3091 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3092 before assigning to sec_data.
3094 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
3096 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3097 now relative to the section, not absolute.
3098 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3099 get the file name when there is a N_SO directory name. When
3100 handling stabs, remember that section->vma was added to the
3103 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
3105 * sunos.c (struct sunos_link_hash_table): Add needed field.
3106 (sunos_link_hash_table_create): Call bfd_release, not free.
3107 (sunos_link_hash_table_create): Initialize needed field.
3108 (sunos_add_dynamic_symbols): Record needed objects.
3109 (bfd_sunos_get_needed_list): New function.
3110 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3111 * bfd-in2.h: Rebuild.
3113 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
3115 * libcoff-in.h (pe_data_type.in_reloc_p): New.
3117 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
3119 * bfd-in.h (struct bfd_link_needed_list): Rename from
3120 bfd_elf_link_needed_list.
3121 * bfd-in2.h: Rebuild.
3122 * elf.c, elflink.h, libelf.h: Corresponding changes.
3124 Add start at AIX linker support; no shared libraries yet.
3125 * xcofflink.c: New file.
3126 * configure.in (rs600coff_vec): Use xcofflink.o.
3127 * configure: Rebuild.
3128 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3130 (struct xcoff_section_tdata): Define.
3131 (xcoff_section_data): Define macro.
3132 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3133 (_bfd_xcoff_bfd_link_add_symbols): Declare.
3134 (_bfd_xcoff_bfd_final_link): Declare.
3135 (_bfd_ppc_xcoff_relocate_section): Declare.
3136 * libcoff.h: Rebuild.
3137 * coff-rs6000.c: Clean up a bit.
3138 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
3139 cputype, csects, and debug_indices.
3140 (xcoff_copy_private_bfd_data): Copy cputype.
3141 (xcoff_howto_table): Rename from rs6000coff_howto_table.
3142 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3143 (xcoff_reloc_type_lookup): Rename from
3144 rs6000coff_reloc_type_lookup.
3145 (coff_relocate_section): Define.
3146 (_bfd_xcoff_sizeof_headers): Define.
3147 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3148 (_bfd_xcoff_bfd_relax_section): Define.
3149 (_bfd_xcoff_bfd_link_split_section): Define.
3150 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3152 * coffcode.h (coff_compute_section_file_positions): If AIX,
3153 increment sofar by SMALL_AOUTSZ if not executable.
3154 (coff_write_object_contents): If AIX, always output an a.out
3155 header; if not executable, header size of SMALL_AOUTSZ.
3156 * hash.c (struct bfd_strtab_hash): Add xcoff field.
3157 (_bfd_stringtab_init): Initialize xcoff field.
3158 (_bfd_xcoff_stringtab_init): New function.
3159 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3160 (_bfd_stringtab_emit): In XCOFF mode, write out length.
3161 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3162 * libbfd.h: Rebuild.
3163 * Makefile.in: Rebuild dependencies.
3164 (BFD32_BACKENDS): Add xcofflink.o.
3165 (CFILES): Add xcofflink.c.
3167 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3168 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
3169 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3171 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3173 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3175 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
3177 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3178 * config.in: Regenerated.
3180 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3181 (_bfd_chunksize): New variable.
3182 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3183 for obstack chunk size.
3184 * configure.in: Check for getpagesize.
3185 * configure: Regenerated.
3187 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3189 * trad-core.c (rawptr): Make it a local variable of
3190 ptrace_unix_core_file_p.
3192 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
3194 * coff-arm.c (in_reloc_p): New.
3195 * coff-i386.c (in_reloc_p): New.
3196 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3197 (coff_write_object_contents): Only set has_reloc_section
3199 * cofflink.c (_bfd_coff_generic_relocate_section): Call
3200 in_reloc_p to decide if reloc should be emitted.
3201 * libcoff.h (pe_data_type.in_reloc_p): New.
3202 * peicode.h (pe_mkobject): Initialize in_reloc_p.
3204 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
3206 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3207 (_bfd_coff_read_internal_relocs): Likewise.
3208 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3209 (_bfd_coff_read_internal_relocs): Likewise.
3211 * elflink.h (elf_link_add_object_symbols): Correct conditions
3212 under which type and size change warnings are issued.
3214 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
3216 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3217 a symbol which is not in a real section.
3218 (coff_write_native_symbol): Corresponding change.
3220 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3221 coff_link_hash_newfunc and make non-static.
3222 (_bfd_coff_link_hash_table_init): New function, broken out of
3223 _bfd_coff_link_hash_table_create.
3224 (_bfd_coff_link_hash_table_create): Use it.
3225 (process_embedded_commands): Make static.
3226 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3227 (_bfd_coff_link_hash_table_init): Declare.
3228 * libcoff.h: Rebuild.
3230 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3231 field in XCOFF tdata.
3232 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3233 U802ROMAGIC, for clarity. Try to set arch and machine correctly
3234 based on cputype stored in a.out header, or in n_type of initial
3236 (coff_write_object_contents): Set cputype correctly in a.out
3238 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3240 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3241 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
3243 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3244 * libcoff.h: Rebuild.
3246 * cpu-rs6000.c (rs6000_compatible): New static function.
3247 (bfd_rs6000_arch): Use it.
3248 * cpu-powerpc.c (powerpc_compatible): New static function.
3249 (arch_info_struct): Define various flavours of PowerPC.
3250 (bfd_powerpc_arch): Use powerpc_compatible. Point at
3253 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
3255 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
3257 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
3259 * elflink.h (elf_link_add_object_symbols): Don't warn about
3260 changing the size or type if the old definition was weak.
3262 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
3264 * coffcode.h (combined_entry_type): Add fix_line field.
3265 (coff_slurp_line_table): Warn if we try to set the lineno field of
3267 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3268 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
3269 * coffgen.c (coff_mangle_symbols): Handle fix_line.
3270 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3272 (coff_print_symbol): Print fix_value symbols in a useful fashion.
3273 * libcoff.h: Rebuild.
3275 * libcoff-in.h (struct xcoff_tdata): Define.
3276 (xcoff_data): Define.
3277 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3278 * bfd-in2.h, libcoff.h: Rebuild.
3279 * coff-rs6000.c (xcoff_mkobject): New static function.
3280 (coff_mkobject): Define.
3281 (xcoff_copy_private_bfd_data): New static function.
3282 (coff_bfd_copy_private_bfd_data): Define.
3283 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3285 (rs6000coff_vec): Add DYNAMIC to object_flags.
3286 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3287 .loader sections specially.
3288 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3289 section alignment from the XCOFF tdata information.
3290 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3291 F_SHROBJ, and copy the extra a.out header information into the
3292 XCOFF tdata structure.
3293 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3294 F_DYNLOAD and the extra a.out header information.
3295 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3296 C_HIDEXT symbol with attached csect information.
3297 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3298 in the o_maxdata field.
3299 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3300 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3301 end if BSF_NOT_AT_END is set.
3303 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3304 _bfd_read_ar_hdr_fn.
3305 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3306 * bfd-in2.h, libbfd.h: Rebuild.
3307 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3309 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3310 (bfd_slurp_bsd_armap_f2): Likewise.
3311 (_bfd_slurp_extended_name_table): Likewise.
3313 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3315 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3317 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3318 when the symbol table is empty.
3320 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3321 space for section symbols, since we don't output them either.
3322 (elf_m68k_adjust_dynindx): Removed.
3324 * ptrace-core.c (rawptr): Make it a local variable of
3325 ptrace_unix_core_file_p.
3327 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3329 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3332 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3333 Mac object file formats.
3335 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3337 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3338 auxent if there isn't one.
3339 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3340 rather than FILNMLEN as the maximum name length.
3342 * coffcode.h (bfd_coff_backend_data): Add new field
3343 _bfd_coff_print_aux.
3344 (bfd_coff_print_aux): New static function.
3345 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3346 scnlen field of an XTY_LD csect aux entry.
3347 (coff_print_aux): New static function.
3348 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3349 in coff_pointerize_aux_hook.
3350 (bfd_coff_std_swap_table): Initialize new field.
3351 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3352 * libcoff.h: Rebuild.
3353 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3354 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3356 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3357 if there are symbols, for native AIX ld compatibility.
3359 * coffcode.h (bfd_coff_backend_data): Add new field
3360 _bfd_coff_pointerize_aux_hook.
3361 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3362 or I960, and as 0 otherwise.
3363 (bfd_coff_std_swap_table): Initialize new field.
3364 * libcoff.h: Rebuild.
3365 * coffgen.c (coff_pointerize_aux): Change parameters to take
3366 symbol pointer instead of type and class, and to take aux index.
3367 Call _bfd_coff_pointerize_aux_hook if it is defined.
3368 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3369 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3370 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3372 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3373 read-only/host-only support.
3375 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3377 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3380 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3381 BFD_JUMP_TABLE_ARCHIVE accordingly.
3382 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3383 (_bfd_compute_and_write_armap): Declare.
3384 (_bfd_generic_read_ar_hdr): Declare.
3385 (_bfd_read_ar_hdr): Define.
3386 (_bfd_noarchive_read_ar_hdr): Define.
3387 (_bfd_archive_bsd_read_ar_hdr): Define.
3388 (_bfd_archive_coff_read_ar_hdr): Define.
3389 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3390 _bfd_read_ar_hdr instead.
3391 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3392 (_bfd_compute_and_write_armap): Rename from
3393 compute_and_write_armap. Make non-static. Change all callers.
3394 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3395 than _bfd_snarf_ar_hdr.
3396 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3397 * ieee.c (ieee_read_ar_hdr): Define.
3398 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3399 * oasys.c (oasys_read_ar_hdr): Define.
3400 * som.c (som_read_ar_hdr): Define.
3401 * bfd-in2.h, libbfd.h: Rebuild.
3403 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3405 * peicode.c (coff_swap_filehdr_in): If symptr is
3406 zero, there aren't any symbols, even if nsyms is set.
3408 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3410 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3412 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3413 sections, and set styp correctly for them: .got, .hash, .dynamic,
3414 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3415 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3417 (ecoff_sort_hdrs): New static function.
3418 (ecoff_compute_section_file_positions): Return boolean, not void.
3419 Sort the sections by VMA before looking through them. Put the
3420 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3421 section on an appropriate boundary within the page.
3422 (ecoff_compute_reloc_file_positions): Check return value of
3423 ecoff_compute_section_file_positions.
3424 (_bfd_ecoff_set_section_contents): Likewise.
3425 (_bfd_ecoff_write_object_contents): Check for various Alpha
3426 section types when incrementing text_size and data_size. Call
3427 adjust_headers backend function if it exists.
3428 * coff-alpha.c (alpha_adjust_headers): New static function.
3429 (alpha_ecoff_backend_data): Initialize adjust_headers field.
3430 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3432 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3434 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
3436 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3437 of ALTERNATE_AIX_CORE_FORMAT.
3438 * configure.in (aix4): No longer need CORE_FLAGS.
3439 * configure: Updated.
3441 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
3443 NS32k changes from Ian Dall:
3444 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3446 (aout_link_input_section_std, aout_link_input_section_ext,
3447 aout_link_reloc_link_order): Call them instead of _bfd_*
3449 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3451 (backend_data): Use it instead of hardcoded zero.
3453 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3454 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3456 * ns32knetbsd.c: Include bfd.h.
3457 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3458 (MY_bfd_reloc_type_lookup): Declare function too.
3459 * pc532-mach.c (set_sizes): Don't declare.
3460 (MY_text_includes_header, MY_exec_header_not_counted): Define.
3461 (backend_data, MY_backend_data): Don't define.
3463 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3464 ns32k-*-lites* like ns32k-*-netbsd*.
3466 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3469 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
3471 * coffcode.h (coff_write_object_contents): Restore setting
3472 f_timdat to 0, deleted on August 22.
3474 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
3476 * coffcode.h (coff_bfd_copy_private_symbol_data,
3477 coff_bfd_copy_private_section_data,
3478 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
3479 * peicode.h (coff_bfd_copy_private_bfd_data): New
3480 (pe_bfd_copy_private_bfd_data): New.
3481 (coff_swap_scnhdr_in): Swap bss size into the right place.
3482 (pe_print_private_bfd_data): Add some newlines.
3484 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
3486 * som.c (setup_sections): Don't die if a space has no subspaces.
3488 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
3490 * elflink.h (elf_link_add_object_symbols): Don't let a weak
3491 dynamic symbol override a common symbol. Don't change the size or
3492 type if they have been set and the new symbol is not a definition.
3493 Warn if the size or type changes.
3495 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
3497 * som.c (som_begin_writing): Don't write the symbol table or
3499 (som_finish_writing): Write them here. Place them after the
3500 subspace data, but before the relocs.
3502 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
3504 * sunos.c (sunos_add_one_symbol): Just pass false, not
3505 info->shared_library, to sunos_create_dynamic_sections.
3506 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
3508 (sunos_check_dynamic_reloc): Remove .text section assertion.
3510 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
3512 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
3513 * configure, configure.in: Add pmac_xcoff_vec case.
3514 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
3515 * coff-pmac.c: New file, PowerMac XCOFF support.
3516 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
3517 * targets.c (pmac_xcoff_vec): Declare.
3519 * mpw-config.in: Various changes to be compatible with the
3520 autoconf-based configury.
3521 * mpw-make.sed: New file, sed commands to translate Unix
3522 makefile into MPW syntax.
3523 * mpw-make.in: Remove.
3524 * hosts/mpw.h: Remove.
3525 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
3526 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
3528 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
3530 * binary.c (binary_get_symtab): Return an empty string on error.
3531 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
3533 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
3535 * coff-ppc.c: Reformatted according to gnu conventions
3536 Removed irrelevant "if 0" code
3538 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
3540 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
3541 symbols rather than as indirect symbols.
3542 (MY(slurp_symbol_table)): Don't do anything special about
3545 * coffcode.h (coff_new_section_hook): Make sure that the alignment
3546 of .ctors and .dtors sections is no larger than 2.
3548 * sunos.c (sunos_add_one_symbol): Don't change
3549 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
3551 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
3552 dynamic symbols when creating a shared library.
3553 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
3555 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
3556 written even if it is not defined in a regular object.
3557 (sunos_write_dynamic_symbol): Use plt_offset for the address of
3558 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
3559 rather than the constant 22.
3560 (sunos_check_dynamic_reloc): Handle creating a shared library.
3561 (sunos_finish_dynamic_link): Set the first entry in the GOT to
3562 zero when creating a shared library.
3563 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
3564 write it out at the start of the symbol table.
3566 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
3568 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
3570 * config.bfd: Add arm-*-coff.
3571 * configure.in, configure: Add armcoff_{little,big}_vec.
3572 * targets.c (armcoff_{little,big}_vec): Declare.
3573 (bfd_target_vector): Add armcoff_{little,big}_vec.
3574 * coff-arm.c (armcoff_{little,big}_vec): Always define.
3576 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
3578 * targets.c (bfd_find_target): Remove debugging code.
3580 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
3582 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
3584 * Makefile.in: added *-ppc files
3585 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
3586 allow pe based .o's to be shared with other tools on ppc/NT
3587 * config.bfd: added powerpc[le]-[pe|winnt] config support
3588 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
3589 * peicode.h: Added more section flags for PE on ppc
3590 Added coff_swap_filehdr_out to allow peicode.h to be
3591 used for non-image PE files on ppc.
3592 Check for image, or not, before copying pe_opthdr
3593 * targets.c: Added new bfd's
3594 * targets.c: Removed two inactive bfds that shouldn't have made it this
3597 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3599 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
3600 explicit values to initialize all relocs. Change all users.
3601 (ppc_elf_brtaken_inner): New function to handle branch predicition
3603 (ppc_elf_brtaken_reloc): Ditto.
3604 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
3605 relocs use ppc_elf_unsupported_reloc.
3606 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
3607 needs to be reported.
3608 (ppc_elf_relocate_section): Support branch prediction relocs.
3610 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
3612 * bfd.c (bfd_assert): Remove \n from string passed to
3615 * coff-i386.c: (TWO_DATA_SECS): Don't define.
3616 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
3617 (bfd_coff_make_section_hook): Don't define.
3618 (coff_make_section_hook): Remove.
3619 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
3620 (styp_to_sec_flags): Likewise.
3621 (coff_write_object_contents): Likewise.
3622 (bfd_coff_std_swap_table): Don't initialize make_section_hook
3624 * libcoff.h: Rebuild.
3625 * coffgen.c (make_a_section_from_file): Just call
3626 bfd_make_section_anyway, not bfd_make_section or
3627 bfd_coff_make_section_hook.
3628 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
3629 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
3630 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
3631 make_section_hook field.
3632 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3634 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
3635 pointers into value field for warning and indirect symbols; just
3636 leave the value field alone.
3637 * linker.c (generic_link_add_symbol_list): Use next symbol for
3638 warning and indirect symbols, rather than looking in symbol value.
3639 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
3640 parameter. Change all callers. Remove support for indirect
3641 symbols; it didn't work anyhow.
3642 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
3643 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
3644 * bfd-in2.h: Rebuild.
3646 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3648 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
3649 go back to telling the tools this reloc operates on 32 bits.
3651 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
3653 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
3654 rather than a direct fprintf.
3655 * archive.c (_bfd_write_archive_contents): Likewise.
3656 * coffcode.h (coff_slurp_symbol_table): Likewise.
3657 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
3658 (ppc_elf_unsupported_reloc): Likewise.
3659 (ppc_elf_relocate_section): Likewise.
3660 * i386linux.c (linux_tally_symbols): Likewise.
3661 (linux_finish_dynamic_link): Likewise.
3662 * osf-core.c (osf_core_core_file_p): Likewise.
3663 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
3664 * som.c (som_sizeof_headers): Likewise.
3665 * srec.c (srec_bad_byte): Likewise.
3666 * bfd.c (bfd_assert): Likewise. Also change file to be const.
3667 * libbfd-in.h (bfd_assert): Declare first parameter const.
3668 * libbfd.h: Rebuild.
3669 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
3670 bfd_reloc_overflow is enough.
3671 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
3672 * coff-h8500.c (rtype2howto): Likewise.
3673 * coff-z8k.c (rtype2howto): Likewise.
3674 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
3675 * elf.c (_bfd_elf_get_lineno): Likewise.
3676 (_bfd_elf_no_info_to_howto): Likewise.
3677 (_bfd_elf_no_info_to_howto_rel): Likewise.
3678 * hp300hpux.c (convert_sym_type): Likewise.
3679 (MY(swap_std_reloc_in)): Likewise.
3680 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
3682 * libaout.h (struct aoutdata): Add line_buf field.
3683 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
3684 and filename_buffer. Instead, use a malloc buffer stored in the
3685 new line_buf field. Remove length restrictions.
3687 * coffgen.c (string_size): Remove static variable.
3688 (debug_string_size, debug_string_section): Likewise.
3689 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
3690 and debug_string_size_p parameters. Use them instead of the
3691 global variables. Change all callers.
3692 (coff_write_symbol): Likewise.
3693 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
3694 (coff_write_symbols): Add local variables to replace removed
3697 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
3698 function, and line_base fields.
3699 * libcoff.h: Rebuild.
3700 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
3701 information, rather than using static variables.
3703 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
3704 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
3706 * init.c (initialized): Remove static variable.
3707 (bfd_init): Don't bother setting initialized.
3708 (bfd_check_init): Remove.
3709 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
3710 * libbfd.h: Rebuild.
3712 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3714 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
3715 size for full core dumps. Copy core file header to private data.
3716 (rs6000coff_core_file_failing_command,
3717 rs6000coff_core_file_failing_signal): New functions to extract
3718 the file name and terminating signal from the core file.
3719 * coff-rs6000.c: Use them.
3721 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
3723 Change arch info to be const, initialized at compile time.
3724 * archures.c: Reindent many functions. Change CONST to const.
3725 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
3726 nothing set it anyhow. Make next const.
3727 (bfd_arch_info_list): Remove.
3728 (bfd_archures_list): Rename from archures_init_table. Change from
3729 a table of function pointers to a table of bfd_arch_info_type
3730 structure addresses.
3731 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
3732 (bfd_lookup_arch): Likewise.
3733 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
3735 (bfd_default_arch_struct): Make const.
3736 (bfd_arch_init, bfd_arch_linkin): Remove.
3737 (bfd_get_arch_info): Return a const pointer.
3738 * init.c (bfd_init): Don't call bfd_arch_init.
3739 * bfd.c (struct _bfd): Make arch_info const.
3740 * bfd-in2.h: Rebuild.
3741 * libbfd.h: Rebuild.
3742 * configure.in: Put & before everything in $selarchs.
3743 * configure: Rebuild.
3744 * cpu-*.c: Change bfd_*_arch from a function which calls
3745 bfd_arch_linkin to a const structure.
3746 * ieee.c (ieee_object_p): Make arch const.
3748 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3750 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
3752 * bfd-in2.h: Regenerate.
3753 * libbfd.h: Regenerate.
3755 * elf32-ppc.c (reloc_type): Update names to match current draft.
3756 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
3757 relative. Update names to current V.4 draft.
3758 (ppc_elf_reloc_type_lookup): Add support for more relocations.
3759 (ppc_elf_relocate_section): Rename relocations to match draft.
3761 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
3763 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
3764 compiled with -mrelocatable-lib to be linked with either normal
3765 modules or -mrelocatable modules.
3767 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
3769 * coffcode.h (coff_write_object_contents): Clear the vstamp field
3770 in the a.out header.
3772 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
3773 a reloc against a local symbol, even if it's not a section.
3775 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
3777 * targets.c (bfd_target): Remove unused align_power_min field.
3778 * bfd-in2.h: Rebuild.
3779 * All backends: Remove initialization of align_power_min.
3781 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
3783 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
3785 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
3787 * config.bfd (mips-dec-netbsd*): New target.
3788 * configure.host (mips-dec-netbsd*): New host.
3789 * configure.in (mips-dec-netbsd*): New native.
3790 * configure: Rebuild.
3792 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
3794 Make the COFF backend linker merge common types:
3795 * cofflink.c (struct coff_debug_merge_element): Define.
3796 (struct coff_debug_merge_type): Define.
3797 (struct coff_debug_merge_hash_entry): Define.
3798 (struct coff_debug_merge_hash_table): Define.
3799 (coff_debug_merge_hash_table_init): Define.
3800 (coff_debug_merge_hash_table_free): Define.
3801 (coff_debug_merge_hash_lookup): Define.
3802 (struct coff_final_link_info): Add debug_merge field.
3803 (coff_debug_merge_hash_newfunc): New static function.
3804 (_bfd_coff_final_link): Allocate and free debug_merge table.
3805 (coff_link_input_bfd): Merge identical enum, struct and union
3808 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
3810 Convert i960 COFF to use COFF backend linker.
3811 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
3812 structure to store the symbol being used.
3813 (coff_i960_start_final_link): New static function.
3814 (coff_i960_relocate_section): New static function.
3815 (coff_i960_adjust_symndx): New static function.
3816 (coff_start_final_link): Define.
3817 (coff_relocate_section): Define.
3818 (coff_adjust_symndx): Define.
3819 * coffcode.h (bfd_coff_backend_data): Add new callback function
3820 _bfd_coff_start_final_link.
3821 (bfd_coff_start_final_link): Define.
3822 (coff_start_final_link): Define if not defined.
3823 (bfd_coff_std_swap_table): Add coff_start_final_link.
3824 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
3826 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
3827 function callback is not NULL.
3828 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
3829 (_bfd_coff_internal_syment_name): Declare.
3830 * libcoff.h: Rebuild.
3831 * configure.in (icoff_big_vec): Add cofflink.o.
3832 (icoff_little_vec): Likewise.
3833 * configure: Rebuild.
3835 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
3837 * Makefile.in (clean-info): Remove extraneous tab from line
3840 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
3842 * cofflink.c (coff_link_input_bfd): Fail if a section with no
3843 contents has relocs.
3845 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
3847 * coffcode.h (coff_compute_section_file_positions): Keep the
3849 (coff_write_object_contents): Remember if it's a relocatable
3851 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
3852 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
3853 if relocatable file. Swap out saved raw size.
3855 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
3857 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
3858 (maintainer-clean): Rename from realclean, passing
3859 maintainer-clean down to subdirectories, but leave realclean as a
3862 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
3865 * dep-in.sed: Remove config.h from generated dependencies.
3867 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
3868 broken out of sunos_canonicalize_dynamic_symtab.
3869 (sunos_canonicalize_dynamic_symtab): Call new function
3870 sunos_slurp_dynamic_symtab.
3871 (sunos_add_dynamic_symbols): Add three new parameters. Return the
3872 dynamic symbol table to the caller.
3873 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
3874 callback to override the symbols being read.
3875 * libaout.h (struct aout_backend_data): Add three new parameters
3876 to add_dynamic_symbols callback.
3878 Extensive minor changes to avoid various gcc warnings. Also:
3879 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
3880 * archures.c (bfd_arch_info_type): Change mach field from long to
3882 (bfd_lookup_arch): Change machine parameter from long to unsigned
3885 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
3887 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
3888 a symbol with a non-zero plt_offset.
3890 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
3892 * elfcode.h (align_file_position): Remove; not used.
3894 * configure.in: Only check for <sys/procfs.h> on a native system,
3895 and make sure it defines prstatus_t.
3896 * configure: Rebuild.
3898 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
3900 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
3902 * config.in: Rename from config.h.in.
3903 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
3904 Check for config.h:config.in when creating stamp-h.
3905 * configure: Rebuild.
3906 * Makefile.in (stamp-h): Depend upon config.in rather than
3907 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
3908 calling config.status.
3910 * Makefile.in (do_distclean): Remove config.h and stamp-h.
3911 (Makefile): Just rebuild Makefile.
3912 (config.h, stamp-h): New targets.
3913 * configure.in: Create stamp-h when rebuilding config.h.
3914 * configure: Rebuild.
3916 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
3918 * configure.in: Call AC_CONFIG_HEADER. Substitute
3919 HOST_64BIT_LONG. Check that various header files exist. Check
3920 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
3921 and/or free need to be declared. Don't make a link to sysdep.h.
3922 Define TRAD_HEADER for various hosts.
3923 * configure: Rebuild.
3924 * configure.host: Don't set my_host. Add definitions taken from
3925 host header files for various entries. Remove entries which now
3927 * acconfig.h: New file.
3928 * config.h.in: New file, built by autoheader.
3929 * sysdep.h: New file.
3930 * Makefile.in (do_distclean): Don't remove sysdep.h.
3932 (LOCAL_H_DEPS): New variable.
3933 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
3935 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
3936 ($(OPTIONAL_BACKENDS)): Likewise.
3937 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
3938 looking through sysdep.h.
3939 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
3940 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
3941 (fprintf_vma, sprintf_vma): Likewise.
3942 (int64_type, uint64_type): Don't define.
3943 * bfd-in2.h: Rebuild.
3944 * archures.c, bfd.c, srec.c: Include <ctype.h>.
3945 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
3946 * lynx-core.c: Include stuff from old hosts/lynx.h.
3947 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
3948 rather than NO_FCNTL.
3949 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
3950 rather than NATIVE_HPPAHPUX_COMPILER.
3951 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
3953 * hosts/*.h: Remove all header files which merely include,
3954 declare, and define things. Leave header files which define
3955 information needed by trad-core.c.
3957 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
3958 (BFD_CC_FOR_BUILD): Define.
3959 * configure.in: Use BFD_CC_FOR_BUILD.
3960 * configure: Rebuild.
3962 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
3964 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
3965 * configure: Rebuild.
3967 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
3970 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
3972 * config.bfd: i386pe_ve -> i386pe_vec.
3974 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
3976 * configure.host: Incorporate host Makefile fragments by setting
3978 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
3979 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
3980 value based on whether the code is being compiled by a cross
3981 compiler. Don't substitute host_makefile_frag or frags.
3982 * aclocal.m4: New file to define local AC_PROG_CC.
3983 * configure: Rebuild.
3984 * Makefile.in (INSTALL): Set to @INSTALL@.
3985 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
3986 (INSTALL_DATA): Set to @INSTALL_DATA@.
3988 (CC): Define as @CC@.
3989 (CFLAGS): Set to @CFLAGS@.
3990 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
3991 (@host_makefile_frag@): Remove.
3992 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
3993 after other options.
3994 (config.status): Remove dependency upon @frags@.
3995 * config/*.mh, config/README: Remove.
3997 * config.bfd: Rewrite to incorporate the contents of the Makefile
3998 fragments by setting shell variables, rather than merely returning
3999 the name of a Makefile fragment.
4000 * configure.in: Use shell variables set by config.bfd rather than
4001 looking at the target Makefile fragment files. Don't substitute
4002 target_makefile_frag. Do substitute TDEFINES.
4003 * configure: Rebuild.
4004 * Makefile.in (@target_makefile_frag@): Remove.
4005 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4006 * config/*.mt: Remove.
4008 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4010 * configure.in: Put changequote lines around "i[345]86" patterns
4011 section of core file support.
4013 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4015 * som.c (som_bfd_print_private_bfd_data): Define to use the
4018 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4020 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4021 entry, text_start and data_start.
4023 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4025 * Makefile.in (OFILES): Remove $(TDEPFILES).
4026 * config/apollo.mt (TDEPFILES): Remove.
4027 * config/README: Update.
4029 * configure.in: For a native configuration, set COREFILE and
4030 COREFLAG based on the canonical host name.
4031 * configure: Rebuild.
4032 * Makefile.in: Rebuild dependencies.
4033 (ALL_CFLAGS): Add @COREFLAG@.
4034 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4035 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4036 support routines. Check LYNX_CORE rather than HOST_LYNX.
4037 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4038 * i386lynx.c: Likewise.
4039 * m68klynx.c: Likewise.
4040 * sparclynx.c: Likewise.
4041 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4042 * *-core.c: Comment changes.
4043 * config/decstation.mh (HDEPFILES): Remove.
4044 (HDEFINES): Remove -DTRAD_CORE.
4045 * config/irix3.mh (RANLIB): Remove.
4046 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4047 (HDEFINES): Remove -DIRIX_CORE.
4048 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4049 (HDEFINES): Remove -DTRAD_CORE.
4050 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4051 * config/ultra3.mh (RANLIB): Remove.
4052 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4053 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4054 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4055 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4056 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4057 * config/i386aix.mh, config/i386bsd.mh: Remove.
4058 * config/i386linux.mh, config/i386mach3.mh: Remove.
4059 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4060 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4061 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4062 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4063 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4064 * config/solaris2.mh, config/stratus.mh: Remove.
4065 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4066 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4068 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4070 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4071 DT_FINI entry if the appropriate symbol is not in the hash table.
4073 * libelf.h (struct elf_backend_data): Add create_program_headers
4074 and want_hdr_in_seg fields.
4075 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4077 (elf_backend_create_program_headers): Likewise.
4078 (elfNN_bed): Initialize create_program_headers and
4080 * elf.c (get_program_header_size): Call create_program_headers
4082 (map_program_segments): Check want_hdr_in_seg backend field. Call
4083 create_program_headers backend routine.
4085 * elf.c (assign_file_positions_except_relocs): Align non allocated
4086 sections when creating an executable.
4088 * elfcode.h (elf_swap_phdr_in): Make non static.
4089 (elf_swap_phdr_out): Make non static.
4090 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4091 (bfd_elf32_swap_phdr_out): Declare.
4092 (bfd_elf64_swap_phdr_in): Declare.
4093 (bfd_elf64_swap_phdr_out): Declare.
4095 * ecofflink.c (ecoff_collect_shuffle): New static function.
4096 (_bfd_ecoff_get_accumulated_pdr): New function.
4097 (_bfd_ecoff_get_accumulated_sym): New function.
4098 (_bfd_ecoff_get_accumulated_ss): New function.
4099 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4100 (_bfd_ecoff_get_accumulated_sym): Declare.
4101 (_bfd_ecoff_get_accumulated_ss): Declare.
4102 * libbfd.h: Rebuild.
4104 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
4106 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4108 * elflink.h (elf_link_add_object_symbols): Handle indirect and
4109 warning symbols. If any section is named .gnu.warning.XXX, treat
4110 the contents as a warning to be issued if the symbol XXX is
4112 (elf_link_output_extsym): For an indirect or warning symbol, just
4113 output the symbol it points to.
4115 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4116 if bfd_hash_allocate fails, since it will already be set.
4117 (generic_link_hash_newfunc): Likewise.
4118 (archive_hash_newfunc): Likewise.
4119 (hash_entry_bfd): New static function.
4120 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4121 callback. Allocate a new warning using the hash table newfunc.
4122 Use bfd_hash_replace to update the entry in the hash table, rather
4123 than assuming we can copy the fields with structure assignment.
4125 * hash.c (bfd_hash_replace): New function.
4126 * bfd-in.h (bfd_hash_replace): Declare.
4127 * bfd-in2.h: Rebuild.
4129 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
4131 * config.bfd: Add mips*vr4300-*-elf* target.
4132 * config/mipsbvr4300.mt: Added.
4134 See file ChangeLog.2
4141 version-control: never