1 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
3 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
4 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
5 use_rld_obj_head and rld_value.
6 (mips_elf_link_hash_table_create): Initialize new fields.
7 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
9 (mips_elf_create_dynamic_sections): Create .rld_map section. If
10 __rld_obj_head symbol not seen, create an __rld_map symbol.
11 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
12 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
13 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
14 __rld_obj_head symbol.
15 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
17 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
19 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
21 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
22 ppc_elf_addr16_ha_reloc.
23 (ppc_elf_addr16_ha_reloc): New static function.
25 * coff-mips.c (struct mips_hi): Define.
26 (mips_refhi_list): New static variable.
27 (mips_refhi_addr, mips_refhi_addend): Remove.
28 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
29 (mips_reflo_reloc): Process mips_refhi_list.
30 (mips_relhi_list): New static variable.
31 (mips_relhi_addr, mips_relhi_addend): Remove.
32 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
33 (mips_rello_reloc): Process mips_relhi_list.
34 (mips_relocate_section): Permit an arbitrary number of REFHI or
35 RELHI relocs before the associated REFLO or RELLO reloc.
37 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
39 * aout-target.h (MY(callback)): Set reloc_count fields.
41 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
43 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
44 sections unless this is a SunOS link.
46 * VERSION: Set to 2.7.1.
48 * Released binutils 2.7.
50 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
52 * i386aout.c: Include "aout/aout64.h".
53 (i386aout_write_object_contents): New static function.
54 (MY_write_object_contents): Define.
56 * netbsd.h (MY(write_object_contents)): Make sure that
57 adjust_sizes_and_vmas is called before fiddling with the magic
60 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
62 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
64 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
66 * libbfd-in.h (itos, stoi): Don't define.
68 * i386lynx.c (KEEPIT): Define as udata.i.
69 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
70 (NAME(lynx,swap_ext_reloc_out)): Likewise.
71 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
72 flags. Don't use stoi.
74 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
76 * elf.c (map_sections_to_segments): Don't start a new segment for
77 a writable section if it's on the same page as the previous
78 segment. Reset the writable variable for a readonly section.
80 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
82 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
83 first_thunk_address, thunk_size, and import_table_size.
84 * peicode.h: Improved some diagnostics regarding edata sections.
86 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
88 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
89 (TARGET_LITTLE_SYM): Added missing D_PAGED.
91 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
93 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
94 with XCOFF_DEF_DYNAMIC set is really defined.
95 (xcoff_link_check_dynamic_ar_symbols): Likewise.
96 (xcoff_link_add_symbols): Only create special sections if using an
99 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
101 (bfd_install_relocation): Likewise.
103 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
105 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
107 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
108 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
109 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
110 (elf64_alpha_link_hash_newfunc): Initialize flags field.
111 (elf64_alpha_check_relocs): Record types of LITUSE entries that
112 are found for LITERAL relocs.
113 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
114 taken, we cannot generate a .plt entry for the symbol.
116 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
118 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
119 sysconf functions (for gprof).
120 * configure, config.in: Rebuild.
122 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
124 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
125 an archive if it has a map. If the object file has the wrong
128 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
129 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
131 (alpha_relocate_section): Likewise.
133 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
134 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
135 (coff_swap_sym_out): Use SYMESZ, not sizeof.
136 (coff_swap_aux_out): Use AUXESZ, not sizeof.
137 (coff_swap_lineno_out): Use LINESZ, not sizeof.
138 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
139 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
140 * peicode.h: Corresponding changes.
142 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
144 * elflink.h (elf_create_pointer_linker_section): Comment out code
145 dealing with making GOT pointers negative of the GOT symbol for
148 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
150 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
151 increment the .rela.plt size until after we're done creating the
153 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
154 .rela.plt offset directly rather than calculating it.
156 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
158 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
159 Use autoconf-set values.
160 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
161 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
164 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
165 * configure: Rebuilt.
167 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
169 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
170 handling code > 1k away.
172 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
174 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
175 defined, output whenever the symbol is updated.
177 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
179 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
180 section to 0 if user_set_vma is set.
181 * elflink.h (elf_bfd_final_link): Likewise.
183 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
185 Partially undo patch of Jun 20.
186 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
187 (coff_compute_section_file_positions): Likewise.
188 (coff_write_object_contents): Likewise. Re-add deleted code, but
189 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
190 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
192 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
194 * config.bfd: Add support for *-*-rtems* configurations.
196 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
198 * elf.c (prep_headers): Add bfd_arch_alpha case.
200 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
202 * elf64-alpha.c: New file.
203 * config.bfd (alpha-*-linuxecoff*): New target.
204 (alpha-*-linux*, alpha-*-elf*): New targets.
205 * configure.in (bfd_elf64_alpha_vec): New vector.
206 * configure: Rebuild.
207 * targets.c (bfd_elf64_alpha_vec): Declare.
208 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
209 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
210 * bfd-in2.h, libbfd.h: Rebuild.
211 * Makefile.in: Rebuild dependencies.
212 (BFD64_BACKENDS): Add elf64-alpha.o.
213 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
215 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
217 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
218 than relying on a right shift of 32.
220 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
222 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
223 ifdef to COFF_WITH_PE.
224 (coff_compute_section_file_positions): Likewise.
225 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
226 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
227 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
228 COFF_IMAGE_WITH_PE, always include.
230 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
232 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
234 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
235 approximate the correct answer if SIZEOF_HEADERS was not used.
237 * binary.c (binary_set_section_contents): Set section file
238 position based on LMA rather than VMA.
240 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
242 * linker.c (_bfd_generic_link_output_symbols): Don't output any
243 symbols if info->strip == strip_all.
245 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
247 * coff-h8300.c: Remove #if 0 code.
248 (compatable): Don't allow mixing/matching of different architectures.
250 * archures.c (bfd_mach_h8300s): Add.
251 * bfd-in2.h: Rebuilt.
252 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
254 (h8300_reloc16_estimate): Likewise.
255 (h8300_reloc16_extra_cases): Likewise.
256 (h8300_bfd_link_add_symbols): Likewise.
257 * coffcode.h (coff_set_arch_mach_hook): Likewise.
258 (coff_set_flags): Likewise.
259 * cpu-h8300.c (h8300_scan): Likewise.
260 Add H8/S to bfd_h8300_arch list.
262 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
264 Added support for Alpha OpenVMS:
265 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
266 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
267 * config.h-vms, makefile.vms: New files.
268 * config.bfd (alpha-*-*vms*): New target.
269 * configure.in (evax_alpha_vec): New target vector.
270 * configure: Rebuild.
271 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
272 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
273 * targets.c (bfd_target_evax_flavour): Define.
274 (evax_alpha_vec): Declare.
275 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
277 * bfd-in2.h, libbfd.h: Rebuild.
278 * Makefile.in: Rebuild dependencies.
279 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
280 evax-emh.o, and evax-misc.o.
281 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
282 evax-etir.c, evax-emh.c, and evax-misc.c.
283 (HFILES): Add evax.h.
285 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
287 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
289 (h8300_bfd_link_add_symbols): Likewise.
291 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
293 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
294 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
296 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
298 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
299 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
301 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
302 R_MIPS_32 relocs if creating a shared library.
304 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
306 * peicode.h (add_data_entry): Use pei_section_data rather than
307 _cooked_size. Corresponds to May 13 change in coffcode.h.
309 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
311 * cofflink.c (_bfd_coff_final_link): Handle long section names.
312 * coffcode.h (coff_write_object_contents): If there are long
313 section names, always set the f_symptr field, even if there are no
315 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
316 if there are no symbols.
318 * coffgen.c (make_a_section_from_file): Check return value of
319 _bfd_coff_read_string_table.
320 (coff_real_object_p): Check return value of
321 make_a_section_from_file.
322 (_bfd_coff_read_string_table): Check that there are some symbols
323 before trying to read the string table size.
325 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
327 * xcofflink.c (xcoff_link_add_symbols): When considering whether
328 to replace a symbol in a dynamic object with a symbol from another
329 dynamic object, do the replacement if the existing symbol is
332 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
333 for _ptrgl, and treat it as global linkage code.
335 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
336 filename or N_SO symbol past the offset, and use it to indicate
337 that there is no line number or function when appropriate.
339 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
341 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
342 common symbol defined by the linker. Don't export function code
343 even if export_defineds is set.
345 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
347 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
349 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
350 (h8300_symbol_address_p): New function.
351 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
354 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
356 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
358 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
359 correctly for the two variants. Allow relaxing if the target
360 is 128 bytes away since after relaxation it'll be 126 bytes away.
361 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
362 "dot" and "value". Allow relaxing if the target is 128 bytes
363 away since after relaxation it'll be 126 bytes away.
364 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
365 the given section until nothing changes.
367 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
369 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
370 alignment hack--we can get the lnnoptr info another way without
371 suddenly increasing the alignment requirements. Set the flags for
373 (ecoff_compute_section_file_positions): Do so.
375 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
377 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
378 to keep the HP emulator database happy.
380 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
381 From Kevin Buettner <kev@primenet.com>.
383 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
385 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
386 name of a NULL section.
388 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
390 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
391 set, always call the notice callback.
393 * VERSION: Increment for bfdlink.h change.
395 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
397 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
398 (sh_relax_delete_bytes): Correct handling of differently sized
399 trailing alignment reloc.
401 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
402 * bfd-in2.h: Rebuild.
403 * configure.in: Warn if there is no known 64 bit type.
404 * configure: Rebuild.
406 * Makefile.in: Rebuild dependencies.
407 (BFD32_BACKENDS): Add ppcboot.o.
408 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
410 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
411 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
413 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
415 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
416 (bfd_mips_elf64_swap_reginfo_out): Move from here...
417 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
418 (bfd_mips_elf64_swap_reginfo_out): ...to here.
420 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
422 * elf64-mips.c: Improve reloc special_functions and handling of
423 SHT_MIPS_OPTIONS section.
424 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
425 mips_elf_hi16_reloc and make globally visible.
426 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
427 make globally visible.
428 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
429 make globally visible.
430 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
431 and make globally visible.
432 (gprel16_with_gp): Check howto->src_mask before using value in
434 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
435 and make globally visible.
436 (gprel32_with_gp): Check howto->src_mask before fetching value.
437 (bfd_mips_elf_swap_options_in): New function.
438 (bfd_mips_elf_swap_options_out): New function.
439 (_bfd_mips_elf_set_private_flags): Rename from
440 mips_elf_set_private_flags and make globally visible.
441 (_bfd_mips_elf_copy_private_bfd_data): Rename from
442 mips_elf_copy_private_bfd_data and make globally visible.
443 (_bfd_mips_elf_merge_private_bfd_data): Rename from
444 mips_elf_merge_private_bfd_data and make globally visible.
445 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
446 for a SHT_MIPS_OPTIONS section.
447 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
448 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
449 name of a SHT_MIPS_OPTIONS section.
450 (_bfd_mips_elf_set_section_contents): New function.
451 (mips_elf32_section_processing): Set the GP value in a
452 SHT_MIPS_OPTIONS section.
453 (_bfd_mips_elf_find_nearest_line): Rename from
454 mips_elf_find_nearest_line and make globally visible.
455 (bfd_elf32_set_section_contents): Define.
456 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
457 (_bfd_mips_elf_lo16_reloc): Declare.
458 (_bfd_mips_elf_gprel16_reloc): Declare.
459 (_bfd_mips_elf_got16_reloc): Declare.
460 (_bfd_mips_elf_gprel32_reloc): Declare.
461 (_bfd_mips_elf_set_private_flags): Declare.
462 (_bfd_mips_elf_copy_private_bfd_data): Declare.
463 (_bfd_mips_elf_merge_private_bfd_data): Declare.
464 (_bfd_mips_elf_find_nearest_line): Declare.
465 (_bfd_mips_elf_set_section_contents): Declare.
467 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
469 (elf_info_to_howto): Define.
470 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
472 (elf_info_to_howto): Define.
473 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
475 (elf_info_to_howto): Define.
477 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
478 R_MOV16B[12], to match change in coff/internal.h.
480 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
482 * elf64-mips.c: Extensive additions to provide better support for
483 writing files and for gas.
484 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
485 of mips_elf_object_p.
486 (mips_elf32_object_p): Rename from mips_elf_object_p; call
487 _bfd_mips_elf_object_p.
488 (_bfd_mips_elf_final_write_processing): Rename from
489 mips_elf_final_write_processing and make globally visible.
490 (_bfd_mips_elf_fake_sections): Rename from
491 mips_elf_fake_sections and make globally visible.
492 (_bfd_mips_elf_section_from_bfd_section): Rename from
493 mips_elf_section_from_bfd_section and make globally visible.
494 (_bfd_mips_elf_section_processing): New function, broken out of
495 mips_elf_section_processing.
496 (mips_elf32_section_processing): Rename from
497 mips_elf_section_processing; call
498 _bfd_mips_elf_section_processing.
499 (_bfd_mips_elf_symbol_processing): Rename from
500 mips_elf_symbol_processing and make globally visible.
501 (_bfd_mips_elf_read_ecoff_info): Rename from
502 mips_elf_read_ecoff_info and make globally visible.
503 (mips_elf32_ecoff_debug_swap): Rename from
504 mips_elf_ecoff_debug_swap.
505 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
506 struct symbol_cache_entry.
507 (_bfd_elf_validate_reloc): New function, moved in from
508 elfcode.h:validate_reloc.
509 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
510 to _bfd_elf_validate_reloc. Change all callers.
511 * elf-bfd.h (bfd_section_from_shdr): Declare.
512 (_bfd_elf_symbol_from_bfd_symbol): Declare.
513 (_bfd_elf_validate_reloc): Declare.
514 (_bfd_mips_elf_object_p): Declare.
515 (_bfd_mips_elf_fake_sections): Declare.
516 (_bfd_mips_elf_section_from_bfd_section): Declare.
517 (_bfd_mips_elf_section_processing): Declare.
518 (_bfd_mips_elf_symbol_processing): Declare.
519 (_bfd_mips_elf_read_ecoff_info): Declare.
520 (_bfd_mips_elf_final_write_processing): Declare.
521 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
524 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
525 (mips_elf_final_write_processing): Likewise.
527 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
529 64-bit MIPS ELF ABI objdump support:
530 * elf64-mips.c: New file.
531 * Makefile.in: Rebuild dependencies.
532 (BFD64_BACKENDS): Add elf64-mips.o.
533 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
534 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
535 bfd_elf64_littlemips_vec to targ_selvecs.
536 (mips*-*-elf*): Likewise.
537 * confingure.in: Add bfd_elf64_bigmips_vec and
538 bfd_elf64_littlemips_vec to vector switch.
539 * configure: Rebuild.
540 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
541 broken out of mips_elf_section_from_shdr.
542 (mips_elf32_section_from_shdr): Rename from
543 mips_elf_section_from_shdr. Call new function.
544 (elf_backend_section_from_shdr): Update name of renamed function.
545 * elf-bfd.h (struct elf_size_info): Change second parameter of
546 write_out_phdrs to be const. Likewise for second parameter of
548 (struct bfd_elf_section_data): Add rel_hdr2 field.
549 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
550 (bfd_elf32_swap_symbol_out): Likewise.
551 (bfd_elf32_swap_reloc_in): Likewise.
552 (bfd_elf32_swap_reloc_out): Likewise.
553 (bfd_elf32_swap_reloca_in): Likewise.
554 (bfd_elf32_swap_reloca_out): Likewise.
555 (bfd_elf32_swap_phdr_in): Likewise.
556 (bfd_elf32_swap_phdr_out): Likewise.
557 (bfd_elf32_swap_dyn_in): Likewise.
558 (bfd_elf32_swap_dyn_out): Likewise.
559 (bfd_elf32_slurp_symbol_table): Declare.
560 (bfd_elf32_write_shdrs_and_ehdr): Declare.
561 (bfd_elf32_write_out_phdrs): Declare.
562 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
563 (bfd_elf64_swap_symbol_out): Likewise.
564 (bfd_elf64_swap_reloc_in): Likewise.
565 (bfd_elf64_swap_reloc_out): Likewise.
566 (bfd_elf64_swap_reloca_in): Likewise.
567 (bfd_elf64_swap_reloca_out): Likewise.
568 (bfd_elf64_swap_phdr_in): Likewise.
569 (bfd_elf64_swap_phdr_out): Likewise.
570 (bfd_elf64_swap_dyn_in): Likewise.
571 (bfd_elf64_swap_dyn_out): Likewise.
572 (bfd_elf64_slurp_symbol_table): Declare.
573 (bfd_elf64_write_shdrs_and_ehdr): Declare.
574 (bfd_elf64_write_out_phdrs): Declare.
575 (_bfd_mips_elf_section_from_shdr): Declare.
576 * elf.c (bfd_section_from_shdr): Remove assertion requiring
577 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
578 section for the section, add the new one to rel_hdr2. Increment
579 reloc_count rather than setting it.
580 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
581 Remove static declaration.
582 (elf_write_shdrs_and_ehdr): Define name as macro.
583 (elf_write_out_phdrs): Likewise.
584 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
585 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
586 (elf_swap_symbol_in): Change second parameter to be const.
587 (elf_swap_symbol_out): Likewise.
588 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
589 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
590 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
591 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
592 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
593 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
594 parameter to be const. Make non-static.
595 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
597 (elf_slurp_symbol_table): Make non-static.
598 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
599 * elfxx-target.h (elf_info_to_howto): Define if not defined.
600 (elf_backend_size_info): Likewise.
601 (elfNN_bed): Use elf_backend_size_info.
602 * targets.c (bfd_elf64_bigmips_vec): Declare.
603 (bfd_elf64_littlemips_vec): Declare.
604 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
605 bfd_elf64_littlemips_vec if BFD64 is defined.
607 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
609 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
611 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
612 zeroes, in alignment holes.
614 * configure: Rebuild with autoconf 2.10.
616 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
617 potential leading underscore in the allocated buffer.
619 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
621 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
622 symbols into .sbss if this is a relocatable link.
624 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
626 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
627 undefined symbols when creating a shared library.
629 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
631 * coff-sh.c: Add a bunch of new code and static const arrays to
632 support aligning loads and stores on four byte memory boundaries.
634 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
636 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
638 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
641 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
643 * cache.c (bfd_open_file): Unlink the file before opening it for
644 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
646 * opncls.c (bfd_fdopenr): Set opened_once.
648 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
650 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
653 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
654 the code unconditionally.
656 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
658 * libcoff-in.h (struct pei_section_tdata): Define structure.
659 (pei_section_data): Define macro.
660 * libcoff.h: Rebuild.
661 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
662 store s_paddr field in pei_section_data.
663 (coff_compute_section_file_positions): Use pei_section_data rather
664 than _cooked_size, and don't overwrite an existing value.
665 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
666 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
667 * peicode.h (coff_bfd_copy_private_section_data): Define if
669 (pe_bfd_copy_private_section_data): New static function if
672 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
674 * srec.c (srec_set_arch_mach): Write as a function rather than a
677 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
678 no map, just check each member in turn to see whether it is
681 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
683 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
684 table. Call BFD_ASSERT to validate header size, instead of
686 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
689 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
691 * ppcboot.c: New target for looking at PPCbug boot records.
693 * config{ure.in,.bfd}: Add support for ppcboot target.
695 * configure: Regenerate.
697 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
699 * coff-h8300.c (howto_table): Update names to match recent
700 changes to include/coff/internal.h. Fix minor errors in the
701 existing relocs. Add R_MOVL1 and R_MOVL2.
702 (rtype2howto): Similarly.
703 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
704 existing relaxing code and peform more relaxing.
705 (h8300_reloc16_extra_cases): Likewise.
707 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
709 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
712 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
714 * elfcode.h (elf_object_p): Reject generic ELF target if
715 e_machine matches an alternate machine code in a specific backend.
717 * netbsd-core.c (netbsd_core_vec): Remove initializer for
718 obsolete align_power_min field.
720 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
722 * coff-h8300.c (reloc_howto_type): Add howto entry for
724 (rtype2howto): Handle R_PCRWORD_B.
725 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
726 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
727 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
730 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
732 * aoutx.h (translate_from_native_sym_flags): Set the section for
733 BSF_CONSTRUCTOR symbols.
735 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
738 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
740 * coffcode.h (coff_write_object_contents): In comdat section lookup,
741 stop looking when section is found.
743 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
745 * coffcode.h (STRING_SIZE_SIZE): Define.
746 (styp_to_sec_flags): Handle long symbol names when looking for the
748 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
749 (bfd_coff_long_section_names): Define.
750 (coff_write_object_contents): Handle long section names.
751 (bfd_coff_std_swap_table): Initialize new field.
752 * libcoff.h: Rebuild.
753 * coffgen.c (make_a_section_from_file): Handle long section
755 (coff_write_symbols): Handle long section names.
756 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
757 * coff-mips.c (mips_ecoff_backend_data): Likewise.
758 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
759 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
760 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
761 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
762 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
763 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
765 * bout.c (b_out_callback): Set lma of sections.
766 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
767 parameter to output_bfd. Used input_bfd instead of output_bfd in
770 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
772 * aoutx.h (translate_from_native_sym_flags): Don't create
773 SEC_CONSTRUCTOR sections.
774 * ecoff.c (ecoff_set_symbol_info): Likewise.
776 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
777 From Don Bowman <bowman@waterloo.hp.com>.
779 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
781 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
782 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
784 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
786 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
787 mips_32_relocs field.
788 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
789 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
790 relocs against a global symbol which is not defined in a regular
792 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
793 against a global symbol, increment mips_32_relocs.
794 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
795 the symbol is not defined in a regular file, make room in the
798 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
800 * ecoff.c (ecoff_compute_section_file_positions): Track the real
801 file position and the virtual file position separately. Set
802 filepos information bsaed on the real file position.
803 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
804 Jan 23 change to coffcode.h.
806 * som.c (som_slurp_symbol_table): Set the symbol count to the
807 number of BFD symbols created.
809 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
811 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
812 output file if linking shared objects. Loop to check all relocs,
813 rather than returning false on first error.
815 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
817 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
818 (ppc_elf_additional_program_headers): If .interp section, bump #
819 of program headers by 1.
820 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
821 (ppc_elf_size_dynamic_sections): Add support for .plt section.
822 (ppc_elf_check_relocs): Print out filename in debug code. Enable
824 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
826 (ppc_elf_relocate_section): If the output section isn't defined,
827 don't abort, just give an error message.
829 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
830 being created is .sdata or .sdata2, don't make the symbol dynamic.
832 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
834 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
835 members of an archive for dynamic objects with no symbols, and
836 pass them directly to check_archive_element.
837 (xcoff_link_check_ar_symbols): Pass dynamic objects to
838 xcoff_link_check_dynamic_ar_symbols.
839 (xcoff_link_check_dynamic_ar_symbols): New static function.
841 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
842 from _bfd_nodynamic to _bfd_xcoff.
843 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
845 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
846 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
847 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
848 * libcoff.h: Rebuild.
849 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
850 (xcoff_get_section_contents): New static function.
851 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
852 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
853 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
854 (xcoff_dynamic_reloc): New static variable.
855 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
856 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
858 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
860 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
861 if reloc_entry->addend is not 0.
862 (CALC_ADDEND): Just set the addend to reloc.r_offset.
864 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
866 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
868 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
869 Add entries for R_SPARC_[56].
870 (sparc_reloc_map): Add entries for R_SPARC_[56].
872 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
874 Optimize linking of stabs in sections as used in ELF and COFF.
876 * libbfd-in.h (_bfd_link_section_stabs): Declare.
877 (_bfd_write_section_stabs): Declare.
878 (_bfd_write_stab_strings): Declare.
880 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
881 (struct coff_link_hash_table): Add stab_info field.
882 * libcoff.h: Rebuild.
883 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
885 (coff_link_add_symbols): Call _bfd_link_section_stabs if
887 (_bfd_coff_final_link): Write out stab strings hash table.
888 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
889 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
891 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
892 (struct bfd_elf_section_data): Add stab_info field.
893 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
895 * elflink.h (elf_link_add_object_symbols): If appropriate, call
896 _bfd_link_section_stabs.
897 (elf_bfd_final_link): Write out stab strings hash table.
898 (elf_link_input_bfd): Handle optimized stabs sections.
899 * reloc.c (_bfd_final_link_relocate): Check address against
900 _raw_size rather than _cooked_size.
901 * Makefile.in: Rebuild dependencies.
902 (BFD_LIBS): Add stabs.o
903 (BFD_LIBS_CFILES): Add stabs.c.
905 * VERSION: Increment for bfdlink.h change.
907 * coffgen.c (coff_renumber_symbols): Correct handling of
908 BSF_NOT_AT_END common symbols.
910 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
912 * coff-ppc.c (record_toc): Add cast to avoid warning.
913 (ppc_allocate_toc_section): Likewise.
914 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
915 (ppc_coff_reloc_type_lookup): Remove unreached code.
916 * coffcode.h (coff_write_object_contents): Don't take the address
918 * peicode.h (pe_print_idata): Add casts to avoid warning.
919 (pe_print_edata): Likewise.
920 (pe_print_reloc): Remove ANSI C string concatenation.
922 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
924 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
926 * libcoff.h: Rebuild.
927 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
929 (coff_swap_aux_out): Likewise.
930 * peicode.h (coff_swap_aux_in): Likewise.
931 (coff_swap_aux_out): Likewise.
932 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
934 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
936 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
937 Fix up .bf endndx link fields.
938 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
940 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
943 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
945 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
946 on Solaris PowerPC systems doesn't get confused.
948 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
951 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
952 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
953 update did_reg and did_reg2.
955 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
957 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
959 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
960 callback routines, pass h->root.string rather than name, in case
961 copy is true and name is transient.
963 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
965 * elfcore.h: Add support for core files with multiple threads.
966 (Primarily for Solaris.)
968 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
970 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
971 section->orelocation is NULL.
973 * coffgen.c (bfd_coff_get_syment): New function.
974 (bfd_coff_get_auxent): New function.
975 * bfd-in.h (bfd_coff_get_syment): Declare.
976 (bfd_coff_get_auxent): Declare.
977 * bfd-in2.h: Rebuild.
979 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
981 * elf32-mips.c (struct mips_hi16): Define.
982 (mips_hi16_addr, mips_hi16_addend): Remove.
983 (mips_hi16_list): New static variable.
984 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
985 (mips_elf_lo16_reloc): Process mips_hi16_list.
986 (mips_elf_relocate_section): Permit an arbitrary number of HI16
987 relocs before the associated LO16 reloc.
989 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
991 * versados.c (versados_scan): Check bfd_alloc return value.
992 (versados_object_p): Check all bfd_read return values. Require
993 that lang field be less than 10, to avoid confusion with Intel Hex
996 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
998 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
999 not 0, for an absolute symbol.
1000 (NAME(aout,swap_ext_reloc_out)): Likewise.
1002 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1003 (ihex_write_object_contents): For a large start address, output
1004 the full 32 bit address in record type 5.
1006 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1007 to int to avoid promotion problems in prototype.
1009 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1011 * configure.host: Use ${srcdir} when looking for picfrag.
1013 * configure.host: Switch on ${libdir}, not $(libdir). From
1014 alan@spri.levels.unisa.edu.au (Alan Modra).
1016 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1017 entry point, not just for DYNAMIC objects.
1018 * sunos.c (sunos_add_dynamic_symbols): Always call
1019 sunos_create_dynamic_sections. If called with a non DYNAMIC
1020 object, don't do anything else.
1021 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1023 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1025 * configure.in: Permit --enable-shared to specify a list of
1027 * configure: Rebuild.
1029 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1030 host when configuring with --enable-shard.
1032 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1034 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1037 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1038 to avoid crashing in bfd_hash_replace.
1040 * sysdep.h: Use #ifdef, not #if.
1042 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1044 * config.in: Rebuild.
1046 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1048 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1049 (AC_CHECK_HEADERS): Check for sys/time.h
1050 (AC_HEADER_TIME): Add macro.
1051 * configure: Rebuild.
1052 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1053 to control what combination of <time> and <sys/time.h>
1056 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1058 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1059 (aout_32_sunos4_write_object_contents): Likewise.
1060 * aoutx.h (NAME(aout,machine_type)): Handle
1061 bfd_mach_sparc_{sparclet,sparclite}.
1062 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1063 (bfd_mach_sparc_v9_p): Update.
1064 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1065 * libaout.h (enum machine_type): Add M_SPARCLET.
1066 * sunos.c (MACHTYPE_OK): Define.
1067 * bfd-in2.h: Regenerated.
1069 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1071 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1072 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1073 * elflink.c (_bfd_elf_create_got_section): Store the
1074 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1075 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1076 global offset table goes over 0x1000, set the value of
1077 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1078 (elf32_sparc_relocate_section): Subtract the offset of
1079 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1081 * elfcode.h: Don't include <string.h>.
1083 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1085 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1086 generic_link_hash_newfunc. All references changed.
1087 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1088 moved here from libbfd-in.h.
1089 * libbfd-in.h: Corresponding changes.
1090 * libbfd.h: Regenerated.
1092 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1094 * aoutx.h (aout_link_input_section_std): When reporting an
1095 overflow error, use the name of the symbol in the hash table if
1097 (aout_link_input_section_ext): Likewise.
1099 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1100 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1102 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1104 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1105 * coffcode.h (coff_compute_section_file_positions): Likewise.
1106 (coff_write_object_contents): Likewise.
1108 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1110 * section.c (SEC_LINK_ONCE): Define.
1111 (SEC_LINK_DUPLICATES): Define.
1112 (SEC_LINK_DUPLICATES_DISCARD): Define.
1113 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1114 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1115 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1116 * bfd-in2.h: Rebuild.
1117 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1118 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1119 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1120 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1121 SEC_LINK_ONCE, and look through the symbol table for the setting
1122 for SEC_LINK_DUPLICATES.
1123 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1124 set for a section, find the section symbol in the symbol table,
1125 and set the aux entry based on SEC_LINK_DUPLICATES.
1126 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1127 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1128 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1129 * coff-i386.c (i386coff_vec): Likewise.
1130 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1132 * VERSION: Bump to 2.6.1.
1133 * Makefile.in (stamp-h): Depend upon VERSION.
1135 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1137 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1138 * libbfd.h: Rebuilt.
1139 * linker.c (generic_link_hash_newfunc): No longer static.
1140 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1142 * coff-h8300.c: Add two derived hash tables and their associated
1143 funtions and #defines for use by the h8300 linker.
1144 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1145 the function vector as needed. Place the address of the function
1146 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1147 Rewrite the vectors section contents as necessary.
1148 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1149 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1150 (coff_bfd_link_hash_table_create): Likewise.
1152 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1154 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1155 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1157 (hppa_rebuild_insn): Pass pointer to correct type to
1158 low_sign_unext and dis_assemble_21.
1160 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1162 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1163 Stick with sparc-*-{sysv4*,solaris2*}.
1165 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1167 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1168 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1169 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1170 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1171 fields is non-zero, print them.
1173 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1174 ifdef. Remove unused variables.
1175 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1177 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1178 (get_symbol_value): Ifdef out.
1179 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1180 (coff_ppc_relocate_section): Remove unused variables. Make
1181 fprintf strings and argument types correspond. Put before_addr in
1183 (dump_toc): Make fprintf strings and argument types correspond.
1184 (ppc_process_before_allocation): Remove unused variables. Always
1186 (ppc_reflo_reloc): Ifdef out.
1187 (ppc_addr32nb_reloc): Ifdef out.
1188 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1190 (coff_ppc_rtype_to_howto): Likewise.
1191 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1193 * peicode.h (pe_print_idata): Move otherwise unused variables into
1194 the #ifdef where they are used. Always return a value.
1195 (pe_print_edata): Make fprintf strings and argument types
1196 correspond. Always return a value.
1197 (pe_print_pdata): Removed unused variable addr_value. Always
1199 (pe_print_reloc): Remove unused variable onaline. Make fprintf
1200 strings and argument types correspond. Always return a value.
1202 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1203 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1204 variable rela inside #if 0 section where it is used.
1206 * ns32k.h: New file.
1207 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1208 functions to start with _bfd_.
1209 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1210 functions in cpu-ns32k.h.
1211 * Makefile.in: Rebuild dependencies.
1212 (HFILES): Add ns32k.h.
1214 * section.c (struct sec): Add linker_mark field. Change
1215 user_set_vma and reloc_done to be single bit fields.
1216 (STD_SECTION): Update accordingly.
1217 * bfd-in2.h: Rebuild.
1218 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1220 (aout_link_input_bfd): Don't link unmarked sections.
1221 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1223 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1224 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1226 * elflink.h (elf_bfd_final_link): Mark sections included in the
1228 (elf_link_input_bfd): Don't link unmarked sections.
1229 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1231 (xcoff_link_input_bfd): Don't link unmarked sections.
1233 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1234 overflow error messages.
1236 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1238 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1239 is not set, print "BFD: " before the error message.
1241 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1242 Miles Bader <miles@gnu.ai.mit.edu>.
1243 * configure: Rebuild.
1245 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1247 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1250 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1251 m68k-aout, m68k-coff, and m68k-elf targets.
1253 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1255 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1256 (ieee_generic_stat_arch_elt): Restructured to prevent
1257 ieee_object_p from being called repeatedly.
1259 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1261 * coffcode.h (coff_write_object_contents): Allocate
1262 buffers large enough for any FILEHDR or AOUTHDR.
1264 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1266 * ecofflink.c (lookup_line): New static function, renamed and
1267 slighly changed from old _bfd_ecoff_locate_line.
1268 (_bfd_ecoff_locate_line): Cache line number information. Use
1269 lookup_line for actual lookup.
1271 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1273 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1274 multiple of 20 bytes.
1276 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1278 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1279 allocate ecoff_find_line, and don't initialize by hand.
1280 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1281 mips_elf_find_line, and don't call memset.
1283 * coffcode.h (coff_compute_section_file_positions): If not
1284 producing a final executable, don't consider sofar when aligning
1285 the section to the correct size.
1287 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1289 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1290 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1291 * coffgen.c (coff_section_symbol): Ifdef out.
1293 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1295 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1296 output_bfd is not NULL.
1298 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1300 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1301 of bfd_alloc (fixes fix_line not being initialized).
1302 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1304 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1306 * coffcode.h: Allow specific backends to override the
1307 bfd_link_add_symbols routine.
1309 * coff-h8300.c: Include genlink.h.
1310 (howto_table): Add R_MEM_INDIRECT.
1311 (rtype2howto): Support R_MEM_INDIRECT.
1312 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1315 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1317 * coff-alpha.c (alpha_relocate_section): Use
1318 info->callbacks_warning, rather than _bfd_error_handler, for
1319 "multiple gp" warning.
1321 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1323 * linker.c (bfd_wrapped_link_hash_lookup): New function.
1324 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
1325 table string. Use bfd_wrapped_link_hash_lookup.
1326 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
1328 * aoutx.h (aout_link_write_symbols): Use the name from the hash
1329 table, if any, when writing out symbols.
1330 (aout_link_input_section_std): Use the name from the hash table,
1331 if any, when reporting undefined symbols.
1332 (aout_link_input_section_ext): Likewise.
1333 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
1334 * bout.c (get_value): Likewise.
1335 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1336 * ecoff.c (ecoff_reloc_link_order): Likewise.
1337 * elflink.h (elf_link_add_object_symbols): Likewise.
1338 (elf_reloc_link_order): Likewise.
1339 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1340 (_bfd_generic_reloc_link_order): Likewise.
1341 (default_indirect_link_order): Likewise.
1342 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1343 * sunos.c (sunos_add_one_symbol): Likewise.
1344 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1345 (bfd_xcoff_link_count_reloc): Likewise.
1346 (xcoff_reloc_link_order): Likewise.
1348 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
1349 into -1 for intern->rss.
1351 * configure: Rebuild with autoconf 2.8.
1353 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
1355 * stab-syms.c (__define_stab_duplicate): Define.
1356 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
1358 * bfd-in.h (bfd_get_stab_name): Declare.
1359 * bfd-in2.h: Rebuild.
1360 * Makefile.in: Rebuild dependencies.
1361 (BFD_LIBS): Add stab-syms.o.
1362 (BFD_LIBS_CFILES): Add stab-syms.c.
1363 (BFD32_BACKENDS): Remove stab-syms.o.
1364 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
1365 * configure.in: Don't list stab-syms.o in bfd_backends.
1366 * configure: Rebuild.
1367 * libaout.h (aout_stab_name): Don't declare.
1368 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
1371 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
1373 * elf.c (assign_file_positions_for_segments): Adjust file offset
1374 for section alignment even if SEC_LOAD is not set.
1376 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
1378 * configure.in: Don't set SHLIB or SHLINK to an empty string,
1379 since they appear as targets in Makefile.in.
1380 * configure: Rebuild.
1382 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
1383 don't fiddle with a symbol which is not defined anywhere.
1385 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
1387 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
1388 though they are defined in a shared library.
1389 (xcoff_build_ldsyms): Likewise.
1391 * coffgen.c (coff_find_nearest_line): Don't look at the line
1392 numbers for the section if section->lineno is NULL.
1394 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
1395 message rather than calling BFD_ASSERT.
1396 * elfcode.h (write_relocs): Check return value of
1397 _bfd_elf_symbol_from_bfd_symbol.
1399 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1401 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
1404 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
1406 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
1408 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
1409 hppa_reloc_field_selector_type_alt.
1410 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
1411 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
1413 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
1415 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
1417 * elf.c (assign_file_positions_for_segments): Adjust the segment
1418 memory size for the alignment of a SEC_ALLOC section, not just a
1421 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1423 * m68klinux.c: New file.
1424 * hosts/m68klinux.h: New file.
1425 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
1426 * configure.in (m68*-*-linux*): New native host.
1427 (m68klinux_vec): New vector.
1428 * configure: Rebuild.
1429 * targets.c (m68klinux_vec): Declare.
1430 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
1431 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
1432 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
1433 declaration from bfd_linux_size_dynamic_sections.
1434 (bfd_m68klinux_size_dynamic_sections): Declare.
1435 * bfd-in2.h: Rebuild.
1436 * Makefile.in: Rebuild dependencies.
1437 (BFD32_BACKENDS): Add m68klinux.o.
1438 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
1440 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
1442 * libhppa.h (pa_arch): Add pa20.
1443 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
1444 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
1445 (hppa_field_adjust): Handle e_nsel.
1446 * som.c: Provide default definitions for many new relocs found only
1447 in hpux10 include files.
1448 (som_fixup_formats): Add several new relocs from hpux10.
1449 (som_hppa_howto_table): Add hpux10 relocs.
1450 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
1452 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
1454 * mpw-make.sed: Edit out recent shared library support, and
1455 rules to rebuild .h files using doc/chew.
1457 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
1459 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
1460 size even of sections with no contents.
1462 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
1464 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1465 starting with '$' the way we skip names starting with '.'. When
1466 updating x_endndx, don't be fooled by an index which has been
1469 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1470 struct/union/enum type with no elements.
1472 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
1474 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1476 * archive.c (bfd_generic_archive_p): If the first file in the
1477 archive can not be recognized as an object, don't assume that this
1478 is the wrong format.
1480 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1481 format is not bfd_object.
1482 (bfd_elf_get_dt_soname): Likewise.
1484 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
1486 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1489 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1491 * bfd.c (tdata): Add netbsd_core_data.
1492 * bfd-in2.h: Regenerated.
1494 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
1496 * sunos.c (SUNOS_CONSTRUCTOR): Define.
1497 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1498 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
1501 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1502 to get the symbol index, matching 14 Jul 95 change.
1504 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
1506 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1507 Remove duplicate definition of gp.
1509 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
1511 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1512 assume that we can set the GP value and then get the same value,
1513 since it won't be true if the output file is neither ELF nor
1515 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1516 _bfd_get_gp_value here.
1517 (mips_gprel_reloc): Don't assume we can set and get the GP value.
1518 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1520 (mips_elf_lo16_reloc): Likewise.
1521 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
1522 Don't require that the BFD be ELF.
1523 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1524 (mips_elf_gprel32_reloc): Likewise.
1525 (mips_elf_relocate_section): Don't assume we can set and get the
1527 (mips_elf_finish_dynamic_symbol): Don't bother to use
1528 _bfd_get_gp_value here.
1530 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1531 Don't change epdr between malloc and free. Be careful not to free
1532 NULL pointers. Zero out the first RPDR.
1534 * configure.host: On Linux, only pass -rpath option if $(libdir)
1535 is neither /lib nor /usr/lib. From Alan Modra
1536 <alan@mullet.Levels.UniSA.Edu.Au>.
1538 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1540 (elf_dt_name): Rename from elf_dt_needed_name.
1541 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1543 (bfd_elf_get_dt_soname): New function.
1544 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1545 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1546 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1547 * bfd-in2.h: Rebuild.
1549 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1551 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1552 _bfd_sparc_elf_reloc_type_lookup.
1553 (bfd_elf32_bfd_reloc_type_lookup): Update.
1554 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1555 (sparc64_elf_howto_table): Define.
1556 (sparc_reloc_map): Define.
1557 (sparc64_elf_reloc_type_lookup): New function.
1558 (sparc_elf_wdisp16_reloc): New function.
1559 (elf_info_to_howto): Use sparc64_elf_howto_table.
1560 (sparc64_elf_relocate_section): Likewise.
1561 (bfd_elf64_bfd_reloc_type_lookup): Update.
1563 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1565 * configure.host: Check for 'do not mix' from native linker before
1566 trying to use -rpath.
1568 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1570 * bfd.c (_bfd_get_gp_value): New function.
1571 (_bfd_set_gp_value): New function.
1572 * libbfd-in.h (_bfd_get_gp_value): Declare.
1573 (_bfd_set_gp_value): Declare.
1574 * libbfd.h: Rebuild.
1575 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1576 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1577 directly to the fields in the tdata information.
1578 (alpha_relocate_section): Likewise.
1579 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1580 (mips_gprel_reloc): Likewise.
1581 (mips_relocate_section): Likewise.
1582 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1583 (mips_elf_lo16_reloc): Likewise.
1584 (mips_elf_final_gp): Likewise.
1585 (mips_elf_gprel16_reloc): Likewise.
1586 (mips_elf_gprel32_reloc): Likewise.
1587 (mips_elf_relocate_section): Likewise.
1588 (mips_elf_finish_dynamic_symbol): Likewise.
1590 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1592 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1594 * configure.in: Call AC_PROG_CC before configure.host.
1595 * configure: Rebuild.
1596 * configure.host: Don't set information which autoconf should
1597 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1599 * configure.host: Remove go32 and win32 host information, since it
1600 should no longer be needed.
1602 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1603 then start a new segment rather than put a writable section in a
1606 * configure.host: Set RPATH_ENVVAR.
1608 * Makefile.in: Rebuild dependencies.
1610 * elflink.c (_bfd_elf_create_linker_section): Remove unused
1611 zero_section variable.
1613 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
1615 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1616 ($(srcdir)/libbfd.h): Rename from libbfd.h.
1617 ($(srcdir)/libcoff.h): Rename from libcoff.h.
1619 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
1621 * ieee.c (ieee_write_expression): Only use an R variable for a
1622 local symbol. Don't output a zero offset. Handle a zero address.
1623 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1624 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1626 (parse_expression): Don't try to handle multiple occurrences of a
1627 P variable. Handle I variables differently from X variables. Fix
1628 the order of minus expressions.
1629 (ieee_slurp_external_symbols): Generate an I variable for an NN
1630 record. Fix handling of ATI and ATX records.
1631 (ieee_slurp_sections): Only set minimal section attributes.
1632 Adjust them later, based on the section contents.
1633 (ieee_object_p): Read in the file until just after the ME record.
1634 Call ieee_slurp_section_data to set the section flags.
1635 (do_one): Add iterations parameter. Only repeat the first load
1636 item. Set the section and file reloc flags.
1637 (ieee_slurp_section_data): Set section flags. Pass iterations to
1639 (ieee_canonicalize_reloc): Handle I variables.
1640 (do_with_relocs): Only emit relocation size when necessary.
1641 Increase MAXRUN to 127. Change ov to be assigned, and take
1642 src_mask and pcrel_offset into account.
1643 (ieee_write_data_part): Skip sections that are not loaded.
1644 (ieee_write_external_part): Don't output optional last entry of WX
1646 (ieee_write_me_part): Make setting of me_record neater.
1647 (ieee_generic_stat_arch_elt): Get the size of an archive element.
1649 * syms.c (stt): Add entries for zerovars, vars, and code.
1651 * elfcode.h (validate_reloc): New static function.
1652 (write_relocs): Call validate_reloc for non ELF relocs.
1654 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1655 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1656 (TARGET_LITTLE_SYM): Likewise.
1658 * config.bfd (m68*-*-psos*): New target.
1660 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
1662 * i386msdos.c: Remove some #if 0 code.
1663 (msdos_write_object_contents): Don't include empty sections in the
1664 size computation, regardless of their address.
1666 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1668 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1669 is NULL, ie, the -r switch is used.
1671 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
1673 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1674 (BFD_RELOC_MIPS_GOT_LO16): Define.
1675 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1676 * bfd-in2.h, libbfd.h: Rebuild.
1677 * elf32-mips.c (mips_reloc_map): Map new relocs.
1679 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1681 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1684 * ieee.c (get_symbol): Set the section to bfd_abs_section.
1685 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1686 simple number for the section address, rather than an expression.
1687 Limit the number of bytes between relocs to MAXRUN.
1688 (ieee_write_me_part): Set me_record to the file offset after the
1690 (ieee_write_processor): New static function.
1691 (ieee_write_object_contents): Use ieee_write_processor.
1693 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
1695 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1697 * coff-aux.c: Change include of aux.h to aux-coff.h.
1699 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1701 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1702 relocation put the addend both in the reloc entry and the data.
1703 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
1706 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1707 a R_68K_PCxx reloc against a defined global symbol directly.
1708 (elf_m68k_check_relocs): Don't count such a reloc.
1710 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1711 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
1712 symbol for now, otherwise always record the symbol as dynamic.
1713 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1714 is not referenced by a dynamic object, and we are not making a
1715 shared object, then don't make a PLT entry. If we do make a PLT
1716 entry, make sure the symbol has been recorded as dynamic.
1718 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
1720 * configure.host: When making a shared library, set HLDFLAGS to
1721 pass an appropriate -rpath option. Use the make variable SONAME
1722 as the shared library soname, rather than computing it here. On
1723 SunOS, build stamp-tshlink in place of $(SHLINK).
1724 * Makefile.in (SONAME): New variable.
1725 ($(SHLINK)): Make a link to the transformed name, as well.
1726 (stamp-tshlink): New target.
1727 (install): Skip stamp-tshlink during install.
1729 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1731 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1732 linker sections have been set up yet.
1734 * elf.c (make_mapping): Add an additional argument to suppress
1735 making the first section include the program headers.
1736 (map_sections_to_segments): If the user used -Ttext such that the
1737 program headers are on a different page, do not set the flags
1738 saying that this section includes the program headers.
1740 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1742 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1743 don't define TRAD_HEADER.
1744 * configure: Rebuild.
1746 * netbsd-core.c: New file, support for NetBSD core files.
1747 * hosts/*nbsd.h: Removed.
1749 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
1751 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1752 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1753 * libbfd.h, bfd-in2.h: Regenerated.
1754 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1755 bfd_elf32_bfd_reloc_type_lookup.
1756 (reloc_type{,_names}): Deleted.
1757 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1759 (sparc_reloc_map): Add sparc64 relocs.
1760 (sparc_elf_notsupported_reloc): New static function.
1761 (sparc_elf_wdisp16_reloc): New static function.
1762 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1763 (elf32_sparc_relocate_section): Likewise.
1764 (bfd_elf32_bfd_reloc_type_lookup): Define.
1765 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1766 (reloc_type{,_names}): Deleted.
1767 (elf_sparc_howto_table): Deleted.
1768 (sparc_reloc_map): Deleted.
1769 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1770 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1772 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
1774 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1777 * Makefile.in (program_transform_name): New variable.
1778 (install): Transform library name before installing it.
1780 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
1782 * archures.c (bfd_mach_i960_hx): Define.
1783 * bfd-in2.h: Rebuild.
1784 * cpu-i960.c (scan_960_mach): Accept machine "hx".
1785 (MATRIX): Expand entries for HX.
1786 (arch_info_struct): Add i960:hx entry.
1787 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1788 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1789 (coff_set_flags): Handle bfd_mach_i960_hx.
1791 Support for building as a shared library, based on patches from
1792 Alan Modra <alan@spri.levels.unisa.edu.au>:
1793 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1794 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1795 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1796 * configure: Rebuild.
1797 * configure.host: If --enable-shared, adjust shared library stuff
1798 based on the host. If the host is SunOS, and the linker supports
1799 -rpath, set HLDFLAGS to use it.
1800 * Makefile.in (ALLLIBS): New variable.
1801 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1802 (COMMON_SHLIB, SHLINK): New variables.
1803 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1804 (STAGESTUFF): Remove variable.
1805 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1807 (stamp-ofiles): New target, like old ofiles target, but build
1808 using a temporary file and move-if-change, and touch stamp-ofiles
1810 (ofiles): Just depend upon stamp-ofiles.
1811 (stamp-piclist, piclist): New targets.
1812 ($(SHLIB), $(SHLINK)): New targets.
1813 (targets.o, archures.o): Build twice if PICFLAG is set.
1814 (do_mostlyclean): Remove pic/*.o.
1815 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1817 (do_distclean): Remove pic and stamp-picdir.
1818 (install): Install shared libraries.
1819 ($(OFILES)): Depend upon stamp-picdir.
1820 (stamp-picdir): New target.
1822 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1824 * libcoff.h: Rebuild.
1826 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1827 flavour of a section with no owner.
1829 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1830 ELF_LINK_NON_ELF flag.
1831 (mips_elf_create_got_section): Likewise.
1833 * elf.c: Revert last change, since it breaks dynamic linking.
1834 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1836 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1837 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1838 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1840 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1842 * elf.c (assign_file_positions_for_segments): If the backend does
1843 not want the elf header or the program headers in the address
1844 space, do not include them in the calculations.
1846 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1847 function to determine if we need additional program headers.
1848 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1849 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1851 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1853 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1855 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1857 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1858 back into one line. Some compilers (sunos 4.1.3 for example)
1859 won't accept args split across more than one line.
1861 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1863 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1864 * configure: Regenerate.
1866 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1868 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1869 try to do arithmetic on a void *, cast it to a unsigned char * first.
1871 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1873 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1874 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1876 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1877 flag for a newly defined symbol.
1878 (NAME(bfd_elf,record_link_assignment)): Likewise.
1879 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1880 set the DEF or REF_REGULAR flags correctly.
1882 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1883 (libbfd.h, libcoff.h): Corresponding change.
1885 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1886 a PLT32 reloc as dynamic.
1887 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1888 is not referenced by a dynamic object, and we are not making a
1889 shared object, then don't make a PLT entry. If we do make a PLT
1890 entry, make sure the symbol has been recorded as dynamic.
1892 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1894 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1895 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1896 (powerpcle-*-cygwin32): New.
1897 * peicode.h (add_data_entry): Get address from vma.
1899 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1901 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1902 attached to the section has already been created as an undefined
1903 symbol, treat it as if it hasn't been created yet.
1905 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1907 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1908 symbol or section symbols if stripping all symbols and this is not
1909 a relocateable link. Don't output the symbol string table if
1910 there are no symbols.
1911 (elf_link_flush_output_syms): Don't do anything if there are no
1914 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1916 * coff-aux.c: New file.
1917 * hosts/m68kaux.h: New file.
1918 * config.bfd (m68*-apple-aux*): New target.
1919 * configure.in (m68*-apple-aux*): New native host.
1920 (m68kaux_coff_vec): New vector.
1921 * configure: Rebuild.
1922 * targets.c (m68kaux_coff_vec): Declare.
1923 * coffcode.h (bfd_coff_backend_data): Add field
1924 _bfd_coff_link_add_one_symbol.
1925 (bfd_coff_link_add_one_symbol): Define.
1926 (compare_arelent_ptr): New static function if TARG_AUX.
1927 (coff_write_relocs): If TARG_AUX, sort the relocs.
1928 (coff_write_object_contents): Set A/UX aouthdr magic number.
1929 (coff_link_add_one_symbol): Define if not defined.
1930 (bfd_coff_std_swap_table): Initialize new field.
1931 * libcoff.h: Rebuild.
1932 * cofflink.c (coff_link_add_symbols): Call
1933 bfd_coff_link_add_one_symbol rather than
1934 _bfd_generic_link_add_one_symbol.
1935 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1936 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1937 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1938 * Makefile.in: Rebuild dependencies.
1939 (BFD32_BACKENDS): Add coff-aux.o.
1940 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1942 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1944 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1945 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1947 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1949 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1950 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1951 (maintainer-clean): Warn about deleting special files.
1952 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1954 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1955 warning symbols correctly.
1956 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1957 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1958 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1959 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1960 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1961 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1963 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1966 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
1968 * libcoff-in.h: aligned newly exported names with bfd naming
1969 conventions. Removed an erroneous define of POWERPC_LE_PE.
1970 * libcoff.h: Rebuild.
1971 * cofflink.c, coff-ppc.c: the above function name changes
1973 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
1975 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1976 * ecoff.c (struct extsym_info): Define.
1977 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1978 to ecoff_link_write_external.
1979 (ecoff_link_write_external): Accept a struct extsym_info pointer.
1980 Strip symbols when appropriate.
1982 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1983 * syms.c (BSF_OBJECT): Define.
1984 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1985 * bfd-in2.h: Rebuild.
1986 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1988 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1991 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1992 copying relocs into a shared object, treat a defined global symbol
1994 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1995 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1996 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1998 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1999 real defined symbol, not to a weak defined symbol.
2001 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2003 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2004 and made a few static functions externs.
2006 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2007 POWERPC_LE_PE hack in cofflink.
2009 * libcoff-in.h: promoted the following from cofflink.c to allow
2010 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2011 coff_debug_merge_element, struct coff_debug_merge_type,
2012 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2013 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2014 coff_debug_merge_hash_lookup, coff_link_section_info,
2015 coff_final_link_info, coff_debug_merge_hash_newfunc,
2016 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2018 * libcoff.h: re-gen'd
2020 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2022 * syms.c: Include "bfdlink.h".
2023 (struct stab_find_info): Define.
2024 (_bfd_stab_section_find_nearest_line): New function.
2025 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2026 * libbfd.h: Rebuild.
2027 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2028 * elf.c (_bfd_elf_find_nearest_line): Try calling
2029 _bfd_stab_section_find_nearest_line before searching the ELF
2030 symbol table. Find the closest STT_FUNC symbol, not the last one.
2031 * libcoff-in.h (coff_data_type): Add line_info field.
2032 * libcoff.h: Rebuild.
2033 * coffgen.c (coff_find_nearest_line): Try calling
2034 _bfd_stab_section_find_nearest_line before searching the COFF
2036 * Makefile.in: Rebuild dependencies.
2038 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2040 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2041 4 bytes, so we get the correct value when updating the register
2042 field in little endian mode.
2044 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2046 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2047 entry_section fields. Add sntoc and snentry fields.
2048 * libcoff.h: Rebuild.
2049 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2050 not toc_section and entry_section (the COFF file does not have any
2051 sections at this point).
2052 (coff_write_object_contents): Set o_snentry and o_sntoc from
2053 snentry and sntoc rather than entry_section and toc_section.
2054 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2055 snentry, not toc_section and entry_section.
2056 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2057 entry_section from hentry.
2058 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
2060 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2061 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2062 than using toc_section directly.
2064 * archures.c: Add missing `.' in enum bfd_architecture.
2065 * bfd-in2.h: Rebuild.
2067 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2068 Robert Lipe <robertl@arnet.com>.
2070 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2072 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2073 to sections we allocate. Use bfd_zalloc to allocate initialial
2074 sections, not bfd_alloc.
2075 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2076 SDA{,2}I16 relocations.
2077 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2078 whether to put something in .sbss or not.
2079 (ppc_elf_relocate_section): Add support for more relocations. Add
2080 in sec->output_offset where appropriate. Make error messages
2081 include the symbol name.
2083 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2084 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2085 doesn't get redefined messages if -shared.
2087 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2088 section if the rel_section field has been set up.
2090 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2092 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2095 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2097 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2098 of flags, only flags used are controlled by mach number. Bump up
2099 output file mach number to highest of input file mach numbers.
2100 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2101 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2103 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2104 bfd_elf64_sparc_vec support.
2106 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2108 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2109 the embedded bit is set on some objects and not on others. Just
2111 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2114 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2116 * coffcode.h (coff_new_section_hook): Don't try to align the
2119 * coffcode.h (coff_set_section_contents): Fix the handling of the
2120 .lib section to work even if the entire section contents are
2121 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2122 Robert Lipe <robertl@arnet.com>.
2124 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2126 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2127 memory here for contents.
2129 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2130 _SDA2_BASE_ by 32768.
2131 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2132 started using. Allocate contents for .sdata and .sdata2 sections
2134 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2136 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2137 size _SDA{,2}_BASE_.
2138 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2141 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2143 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2145 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
2146 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
2147 (bfd_mach_sparc_v9a): Define.
2148 (bfd_mach_sparc_v9_p): Define.
2149 * bfd-in2.h: Regenerated.
2150 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2152 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
2153 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2154 to bfd_elf32_sparc_vec.
2155 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
2156 Add v8plus{,a} support.
2158 (sparc_compatible): New function.
2159 * elf32-sparc.h: #include "elf/sparc.h".
2160 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
2161 elf32_sparc_final_write_processing): New functions.
2162 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
2163 elf_backend_final_write_processing): Define.
2165 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2167 * elf-bfd.h (struct elf_link_hash_entry): Add
2168 linker_section_pointer field.
2169 (enum elf_linker_section_enum): Enumeration for new way of
2170 creating linker dynamic sections and symbols.
2171 (elf_linker_section{,_pointers}): New structures for creating
2172 dynamic sections and symbols.
2173 (elf_obj_tdata): Add linker_section_pointers and linker_section
2175 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2176 (_bfd_elf_create_linker_section): New declarations.
2177 (_bfd_elf_find_pointer_linker_section): Ditto.
2178 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2179 (_bfd_elf_make_linker_section_rela): Ditto.
2181 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2183 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2184 (ppc_elf_create_linker_section): New function to create the
2185 sections .got, .sdata, and .sdata2.
2186 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2188 (ppc_elf_check_relocs): Support more of the eabi relocations.
2189 (ppc_elf_relocate_section): Ditto.
2190 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2191 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2193 * elflink.h (elf_create_pointer_linker_section): New function to
2194 create initialized pointers in dynamic linker sections.
2195 (elf_finish_pointer_linker_section): Actually intialize the
2196 pointers created above.
2198 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2199 macros to provide both 32 and 64 bit versions of
2200 elf_create_pointer_linker_section.
2201 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2202 provide both 32 and 64 bit versions of
2203 elf_finish_pointer_linker_section.
2205 * elflink.c (_bfd_elf_create_linker_section): New function to
2206 create a linker section.
2207 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2208 given address in the linker pointer offsets created for a given
2210 (_bfd_elf_make_linker_section_rela): Make a RELA section
2211 corresponding to the generated linker section.
2213 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2215 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2217 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2219 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2220 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2221 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2222 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2223 toc entry in an objdump) for now.
2224 (ppc_do_last, ppc_get_last): New function - needed to save processing
2225 the toc owner to the end.
2226 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2229 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2230 toc owner from being done till last. Must define POWERPC_LE_PC
2233 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2235 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2237 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2238 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2240 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2242 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2244 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2246 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2248 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2250 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2252 * elf.c (assign_file_positions_for_segments): Don't increment file
2253 offset for a segment which contains no loadable sections.
2255 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2257 * reloc.c: Add new PowerPC relocations.
2258 * {bfd-in2,libbfd}.h: Regenerate.
2260 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2261 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2263 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2265 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2268 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2271 * coffgen.c (coff_find_nearest_line): Don't try to cache
2272 information in sections that are not owned by a BFD. From Richard
2273 Henderson <richard@atheist.tamu.edu>.
2275 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2276 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2277 * elflink.h (elf_link_output_extsym): Remove special check for
2280 * ecoffswap.h: Add prototypes for static functions.
2282 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2284 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2285 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2287 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2288 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2289 support. Begin support for R_PPC_SDA{2,}REL.
2291 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2293 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2294 create the .got and .got.neg sections.
2295 (ppc_elf_size_dynamic_sections): Call it.
2296 (ppc_elf_check_relocs): Call it.
2297 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2298 (ppc_elf_check_relocs): Add error messages for relocations we
2299 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2302 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2304 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2305 section flags for V.4 and eabi.
2307 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2309 * elf.c (assign_file_positions_for_segments): If a segment
2310 contains no sections, don't mark it as readable.
2312 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2313 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2315 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2316 dynamic section, if there is one.
2317 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2318 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2319 (bfd_elf64_swap_dyn_in): Likewise.
2320 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2322 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2324 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
2325 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
2326 <pirker@eiunix.tuwien.ac.at>.
2328 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2330 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
2331 PowerPC V.4 and eabi.
2332 * bfd-in2.h: Regenerate.
2333 * libfd.h: Regenerate.
2335 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
2337 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
2338 section type and SHF_EXCLUDE section flag, turning them into the
2339 appropriate bfd section flag.
2341 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2343 * xcofflink.c (xcoff_link_add_symbols): Create the special
2344 sections if we see a DYNAMIC object, in case that is the only
2345 XCOFF input object we see.
2347 * elf32-mips.c: Extensive changes for a start at dynamic linking
2348 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2350 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
2351 (struct elf_backend_data): Remove
2352 elf_backend_create_program_headers field. Add
2353 elf_backend_additional_program_headers and
2354 elf_backend_modify_segment_map fields.
2355 * elfxx-target.h (elf_backend_type_change_ok): Define if not
2357 (elf_backend_additional_program_headers): Likewise.
2358 (elf_backend_modify_segment_map): Likewise.
2359 (elf_backend_create_program_headers): Don't define.
2360 (elfNN_bed): Change to account for field changes.
2361 * elf.c (assign_file_positions_for_segments): Call new
2362 modify_segment_map backend function. Don't call old
2363 create_program_headers backend function.
2364 (get_program_header_size): Call additional_program_headers rather
2365 than create_program_headers.
2366 * elflink.h (elf_link_add_object_symbols): Initialize
2367 type_change_ok from new backend field.
2368 (elf_link_output_extsym): Don't warn if _rld_new_interface is
2370 (elf_reloc_link_order): Treat a reloc against a defined symbol as
2371 a reloc against the appropriate section.
2373 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
2374 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
2375 (elf_flags_init): Rename from elf_ppc_flags_init.
2376 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
2378 (ppc_elf_copy_private_bfd_data): Likewise.
2379 (ppc_elf_merge_private_bfd_data): Likewise.
2381 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
2384 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
2386 * coff-alpha.c (alpha_relocate_section): During final link, allow
2387 output .lita section to be bigger than 64k by adjusting gp value
2388 on a per-input section basis.
2389 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
2391 (struct ecoff_section_tdata): Add gp field.
2393 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
2395 Handle Alpha ECOFF changes in OSF/1 3.2.
2396 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
2398 * coff-alpha.c: Include "aout/ar.h".
2399 (alpha_ecoff_get_relocated_section_contents): Don't require an
2400 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
2401 3.2 doesn't generate one.
2402 (alpha_relocate_section): Likewise.
2403 (alpha_ecoff_slurp_armap): Define.
2404 (alpha_ecoff_slurp_extended_name_table): Define.
2405 (alpha_ecoff_construct_extended_name_table): Define.
2406 (alpha_ecoff_truncate_arname): Define.
2407 (alpha_ecoff_write_armap): Define.
2408 (alpha_ecoff_generic_stat_arch_elt): Define.
2409 (alpha_ecoff_update_armap_timestamp): Define.
2411 (alpha_ecoff_read_ar_hdr): New static function.
2412 (alpha_ecoff_get_elt_at_filepos): New static function.
2413 (alpha_ecoff_openr_next_archived_file): New static function.
2414 (alpha_ecoff_get_elt_at_index): New static function.
2415 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
2416 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
2417 _bfd_ecoff to alpha_ecoff.
2418 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
2419 field from backend structure, rather than always calling
2420 _bfd_get_elt_at_filepos.
2421 * coff-mips.c (mips_ecoff_backend_data): Initialize
2422 get_elt_at_filepos field.
2423 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
2424 from _bfd_generic_read_ar_hdr with minor changes.
2425 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
2426 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
2427 * libbfd.h: Rebuild.
2429 * bfd-in.h (BFD_IN_MEMORY): Define.
2430 * libbfd-in.h (struct bfd_in_memory): Define.
2431 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
2432 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
2433 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
2434 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
2435 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
2436 (bfd_get_size): Handle BFD_IN_MEMORY flag.
2437 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
2438 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
2439 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
2440 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
2442 (bfd_openstreamr): Likewise.
2443 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
2444 BFD_IN_MEMORY is not set.
2445 * riscix.c (riscix_some_aout_object_p): Likewise.
2446 * bfd-in2.h, libbfd.h: Rebuild.
2448 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
2449 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
2450 (bfd_get_elt_at_index): Define.
2451 * archive.c (_bfd_generic_get_elt_at_index): Rename from
2452 bfd_get_elt_at_index. Change index parameter from int to
2454 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
2455 (_bfd_noarchive_get_elt_at_index): Define.
2456 (_bfd_archive_bsd_get_elt_at_index): Define.
2457 (_bfd_archive_coff_get_elt_at_index): Define.
2458 * bfd-in2.h, libbfd.h: Rebuild.
2459 * aout-target.h (MY_get_elt_at_index): Define if not defined.
2460 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
2461 * ieee.c (ieee_get_elt_at_index): Define.
2462 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
2463 * oasys.c (oasys_get_elt_at_index): Define.
2464 * som.c (som_get_elt_at_index): Define.
2466 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2467 numbers to the .text section.
2469 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
2471 * ieee.c (ieee_write_debug_part): Change return type to boolean.
2472 If there is a SEC_DEBUGGING section, get the contents of the debug
2473 information part from it.
2474 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2476 (ieee_write_object_contents): Check ieee_write_debug_part return.
2478 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
2480 * config.bfd (i[345]86-*-freebsd*): Add target.
2481 * configure.in (i386freebsd_vec): Add vec.
2482 * configure: Regenerate.
2483 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2484 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2485 Rebuild dependencies..
2486 * freebsd.h: New file.
2487 * i386freebsd.c: New file.
2488 * targets.c (i386freebsd_vec): Declare.
2489 (bfd_target_vector): Add i386freebsd_vec.
2490 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2491 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2493 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
2495 * ieee.c (ieee_slurp_debug): New static function.
2496 (ieee_object_p): Call it.
2497 (ieee_slurp_section_data): Skip debugging sections.
2498 (ieee_get_reloc_upper_bound): Likewise.
2499 (ieee_get_section_contents): Likewise.
2500 (ieee_canonicalize_reloc): Likewise.
2501 (ieee_write_section_part): Likewise.
2502 (ieee_write_debug_part): Likewise.
2503 (ieee_write_data_part): Likewise.
2504 (init_for_output): Likewise.
2506 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
2508 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2510 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2511 relocs, since ppc_elf_relocate_section handles the linker case.
2512 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2514 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2515 ppc_elf_relocate_section since that is now the only caller.
2516 (ppc_elf_relocate_section): Ditto.
2518 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
2520 * coffcode.h (coff_write_object_contents): If we don't know the
2521 section of the entry point for an XCOFF executable, always set the
2522 entry address to -1.
2524 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2526 * elf.c (bfd_section_from_shdr): Add support for note sections.
2528 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2530 * bfd-in.h (struct _symbol_info): Add stab_type field.
2531 * bfd-in2.h: Rebuild.
2532 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2534 * elf32-ppc.c: Remove trailing newline from calls to
2536 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2537 difference if target endianness is known.
2539 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2541 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2542 old style TOC16 references without using R_PPC_GOT.
2543 (ppc_reloc_type): Ditto.
2544 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2545 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2546 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2547 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2548 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2550 (ppc_elf_adjust_dynamic_symbol): Ditto.
2551 (ppc_elf_adjust_dynindx): Ditto.
2552 (ppc_elf_size_dynamic_sections): Ditto.
2553 (ppc_elf_finish_dynamic_symbol): Ditto.
2554 (ppc_elf_finish_dynamic_sections): Ditto.
2555 (ELF_DYNAMIC_INTERPRETER): Define.
2557 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2559 * elf.c (copy_private_bfd_data): When attaching sections to
2560 segments ignore sections that won't be allocated. Patch from
2563 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2565 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2568 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2570 * coff-i960.c (CALC_ADDEND): Define.
2571 (coff_i960_relocate_section): Add the input section VMA to the
2572 addend for PC relative relocs.
2574 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2576 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2577 to correctly terminate.
2579 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2581 * targets.c (enum bfd_endian): Define.
2582 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2583 from boolean to enum bfd_endian. Change header_byteorder_big_p
2585 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2586 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2587 * bfd-in2.h: Rebuild.
2588 * All targets: Change initialization of byteorder and
2589 header_byteorder to use enum bfd_endian values rather than
2591 * All files: Change all references to byteorder_big_p and
2592 header_byteorder_big_p to use new bfd_*_endian macros.
2594 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2596 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2598 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2600 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2602 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2604 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
2606 * ieee.c: Lots of minor cleanups. Make many functions return
2607 errors rather than calling abort. Also:
2608 (ieee_write_twobyte): Remove; change callers to call existing
2609 ieee_write_2bytes function.
2610 (ieee_write_expression): Don't output the section twice when
2611 outputting a local symbol. Don't emit an extraneous zero if there
2613 (ieee_slurp_sections): Set the lma as well as the vma.
2614 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2616 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2617 a recognized one or bfd_arch_unknown.
2618 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2620 (ihex_get_symtab): Likewise.
2622 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
2624 * aoutx.h: Include <ctype.h>.
2625 (struct aout_link_includes_table): Define.
2626 (struct aout_link_includes_totals): Define.
2627 (struct aout_link_includes_entry): Define.
2628 (aout_link_includes_lookup): Define macro.
2629 (struct aout_final_link_info): Add includes field.
2630 (aout_link_includes_newfunc): New static function.
2631 (NAME(aout,final_link)): Initialize includes hash table.
2632 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2634 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
2636 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2638 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
2640 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2642 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
2644 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2645 (pe_print_private_bfd_data): call pe_print_reloc.
2646 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2647 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2648 up some debugging as well.
2650 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
2652 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
2655 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
2657 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2658 when setting sections to NULL.
2660 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
2662 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2664 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2665 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2667 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2668 * bfd-in2.h: Rebuild.
2670 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
2672 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2674 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
2676 * ihex.c (ihex_scan): Handle record types 4 and 5.
2677 (ihex_object_p): Permit types 4 and 5.
2678 (ihex_set_section_contents): Remove check for out of range
2680 (ihex_write_object_contents): Generate types 4 and 5.
2682 * elflink.h (elf_link_output_extsym): Just ignore warning and
2683 indirect references to symbols which don't really exist.
2685 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
2687 * peicode.h (pe_print_idata): Minor format fixes
2688 (pe_print_edata): New function. Under private printing, this formats
2689 the edata section of a PE file.
2690 (pe_print_private_bfd_data): Added call to pe_print_edata.
2692 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2694 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2695 index, don't call stoi.
2697 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
2699 * srec.c (srec_scan): Set lma as well as vma.
2701 * ihex.c: New file; support for Intel Hex format.
2702 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2703 (ihex_vec): Declare.
2704 (bfd_target_vector): Always include ihex_vec.
2705 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2706 * Makefile.in: Rebuild dependencies.
2707 (BFD_LIBS): Add ihex.o
2708 (BFD_LIBS_CFILES): Add ihex.c.
2709 * bfd-in2.h: Rebuild.
2711 * elf.c (assign_file_positions_for_segments): Sort the sections in
2713 (get_program_header_size): Return the right size if segment_map is
2715 (copy_private_bfd_data): Don't bother to sort the sections.
2717 * bfd.c (bfd_record_phdr): New function.
2718 * bfd-in.h (bfd_record_phdr): Declare.
2719 * bfd_in2.h: Rebuild.
2721 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2724 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2725 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
2727 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2728 (bfd_zmalloc): Change declaration.
2729 * libbfd.h: Rebuild.
2730 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2731 and realloc. Don't set bfd_error_no_memory if they fail.
2733 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
2735 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2736 uses as well. Added a new howto to deal with TOCREL16 relocs that
2737 are TOCDEFN as well.
2738 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2739 to handle RVA relocs from dlltool.
2740 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2741 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2742 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2744 * coffcode.h (coff_set_alignment_hook): check idata$X sections
2745 to get the right section alignment.
2747 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
2749 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2750 p_paddr if p_paddr is zero.
2751 (make_mapping): Set includes_filehdr and includes_phdrs for first
2753 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2755 (assign_file_positions_for_segments): Handle includes_filehdr and
2756 includes_phdrs. Remove special handling of PT_PHDR and first
2758 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2759 when appropriate. Remove special handling of PT_PHDR segment.
2760 Use a more complex condition for when a section is included in a
2761 segment to handle Solaris linker oddities.
2763 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2765 * coff-m88k.c (howto_table): Reformatted for easier reading;
2766 special_function now points to new function m88k_special_reloc.
2767 (howto_hvrt16): Function previously used for handling HVRT16 relocs
2769 (rtype2howto): Do not add reloc's r_offset to the addend, this will
2770 be done correctly by m88k_special_reloc.
2771 (reloc_processing): New function to be used by RELOC_PROCESSING.
2772 (RELOC_PROCESSING): Define to call reloc_processing.
2774 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
2776 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2777 (pe_print_pdata): Likewise.
2779 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2780 obstack_alloc fails.
2781 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2783 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2784 * Many files: don't set bfd_error_no_memory if one of the above
2787 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2788 if p_paddr_valid is set.
2789 (copy_private_bfd_data): New static function.
2790 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2792 * elf.c (assign_file_positions_for_segments): Fix case where extra
2793 program headers were allocated.
2795 * elf.c (_bfd_elf_print_private_bfd_data): New function.
2796 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2797 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2798 _bfd_elf_print_private_bfd_data.
2800 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2801 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2802 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2803 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2804 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2805 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2806 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2808 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2810 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2811 * elf.c (make_mapping): New static function.
2812 (map_sections_to_segments): New static function.
2813 (elf_sort_sections): New static function.
2814 (assign_file_positions_for_segments): New static function.
2815 (map_program_segments): Remove.
2816 (get_program_header_size): Remove sorted_hdrs, count, and
2817 maxpagesize parameters. Simplify.
2818 (assign_file_positions_except_relocs): When generating an
2819 executable, use assign_file_positions_for_segments.
2820 (elf_sort_hdrs): Remove.
2821 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2822 to get_program_header_size.
2824 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2826 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2828 * configure, config.in: Regenerate with autoconf 2.7.
2830 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2831 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2833 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2835 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2836 (ecoff_sec_to_styp_flags): Likewise.
2837 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2838 (ecoff_set_symbol_info): Handle scRConst.
2839 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2840 (ecoff_compute_section_file_positions): Handle .rconst section.
2841 (_bfd_ecoff_write_object_contents): Likewise.
2842 (ecoff_link_check_archive_element): Handle scRConst.
2843 (ecoff_link_add_externals): Likewise.
2844 (ecoff_link_write_external): Handle .rconst section.
2845 (ecoff_reloc_link_order): Likewise.
2846 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2847 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2849 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2851 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2852 DEF_DYNAMIC flag is set.
2854 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2856 * host-aout.c: If TRAD_HEADER is defined, include it.
2858 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2860 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2861 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2862 (BFD_NEED_DECLARATION): New function.
2863 * configure.in: Use BFD_NEED_DECLARATION.
2864 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2865 * configure, config.in: Rebuild with autoconf 2.6.
2867 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2868 special_sections before returning when called with a non XCOFF
2871 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2874 * coffcode.h (coff_compute_section_file_positions): Only pad the
2875 previous section to force file alignment when creating an
2878 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2880 * coffcode.h (coff_compute_section_file_positions): If
2881 RS6000COFF_C, set up the .debug section.
2883 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2884 if it is not large enough to accomodate the entire TOC area with
2885 signed 16 bit offsets.
2886 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2888 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2889 TOC anchor to use the TOC value used in the output file.
2891 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2893 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2894 (_bfd_coff_read_string_table): Likewise.
2896 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2898 * pe-arm.c: Fix typos.
2899 * coff-arm.c: Likewise.
2901 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2903 * coff-ppc.c (list_ele): Added "cat"egory member.
2904 (record_toc): New category parameter (priv or pub).
2905 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2906 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2907 the mainline. It addes extra toc cells in error.
2908 (ppc_coff_swap_sym_in_hook): Added some documentation.
2909 (dump_toc): Can now diagnose "virtual toc" chicanery.
2911 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2913 * elf-bfd.h (struct elf_link_hash_table): Change type of
2914 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2916 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2918 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2919 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2921 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2922 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2923 defined or mentioned in a regular file.
2925 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2927 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2928 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2929 (coff_ppc_relocate_section): Correct REL24 handling
2930 (ppc_process_before_allocation): Correct TOCDEFN handling
2932 * peicode.h (dir_names): Added name descriptions
2934 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2936 * VERSION: Updated to cygnus-2.6.
2938 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2940 * targets.c (m68k4knetbsd_vec): Declare.
2942 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2944 * targets.c (bfd_target): Change type of second argument to
2945 _bfd_print_private_bfd_data from void * to PTR.
2946 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2947 using PTR rather than void *.
2948 * bfd-in2, libbfd.h: Rebuild.
2949 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2951 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2952 _bfd_generic_bfd_print_private_bfd_data rather than casting
2955 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
2957 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
2958 "DO NOT DELETE" lines or blank lines that mkdep writes on some
2960 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2961 BFD64_BACKENDS_CFILES): New variables.
2964 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
2966 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2967 not at the file position of the first section.
2968 * coffcode.h (coff_compute_section_file_positions): Avoid using
2970 (coff_write_object_contents): When generating a PPC PE executable
2971 with no symbols, round up the file size to a COFF_PAGE_SIZE
2973 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2974 don't write out a string table.
2976 * elf.c (bfd_section_from_shdr): When using a different section
2977 header, pass the new one to _bfd_elf_make_section_from_shdr.
2978 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2979 (elf_map_symbols): Add section VMA to symbol value when comparing
2981 (_bfd_elf_compute_section_file_positions): Only build symbol table
2982 if there are some symbols. Set file offset of symtab and strtab
2984 (assign_file_positions_except_relocs): Remove dosyms parameter.
2985 Change all callers. Never set file offset of symtab and strtab
2987 (_bfd_elf_copy_private_section_data): New function.
2988 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2989 (_bfd_elf_copy_private_symbol_data): New function.
2990 (swap_out_syms): Check for special mapping of st_shndx created by
2991 copy_private_symbol_data.
2992 * elfxx-target.h: Use new copy routines.
2993 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2994 (_bfd_elf_copy_private_section_data): Declare.
2996 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2998 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3001 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3002 _bfd_dummy_target, matching the recent change to archive
3005 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3007 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3008 arithmetic on PTR types.
3010 * aout-target.h (MY(callback)): Set the lma of the sections.
3012 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3013 symbol into a reloc against the section.
3015 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3017 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3018 glue for the relocs: IMGLUE and IFGLUE.
3019 (record_toc): new function - tracks toc contents
3020 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3021 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3022 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3023 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
3024 (ppc_record_toc_entry): Removed a debug define (duh)
3026 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3027 (pe_print_idata): New function - formats the idata section data
3028 (pe_print_pdata): New function - formats the pdata section data
3029 (pe_print_private_bfd_data): calls to above
3031 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3033 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3034 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3035 TARGET_SYM and TARGET_NAME for vector and BFD name.
3036 * coff-pmac.c (pmac_xcoff_vec): Remove.
3037 (TARGET_SYM, TARGET_NAME): Define.
3038 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3039 machine to 0, not all PowerMacs are 601s.
3041 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3043 * elfcode.h (elf_object_p): Read in any program headers.
3044 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3045 based on the program headers, if any.
3046 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3047 (map_program_segments): Set p_paddr of program headers based on
3050 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3052 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3055 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3056 trying to do a relocateable link with a non-a.out object file.
3058 * archive.c (bfd_generic_archive_p): Check the first object file
3059 in an archive even if target_defaulted is set. If the object file
3060 has the wrong xvec, reject it.
3062 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3063 be represented, report the name via _bfd_error_handler.
3064 (translate_to_native_sym_flags): Likewise.
3065 * elf32-mips.c (mips_elf_final_link): Likewise.
3066 * oasys.c (oasys_write_sections): Likewise.
3068 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3069 which checks for STYP_OVRFLO sections.
3070 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3071 reloc and lineno count overflows.
3072 (coff_write_object_contents): Call coff_count_linenumbers before
3073 coff_compute_section_file_positions. If RS6000COFF_C, handle
3074 reloc and lineno count overflows.
3075 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3076 relocs before dealing with .pad sections. Count overflow section
3077 headers when handling .pad sections.
3079 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3082 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3083 (struct xcoff_link_hash_table): Add descriptor_section and
3084 special_sections fields.
3085 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3086 (xcoff_link_add_symbols): Set linkage section alignment. Create
3087 descriptor section. Check for magic symbol names (_text, etc.),
3088 and record them in special_sections if found. Set
3089 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3090 descriptor field to point back to the function code symbol.
3091 (xcoff_sweep): Always mark the special descriptor_section.
3092 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3093 function descriptor, and mark it if it is.
3094 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3095 parameter, and fill it in. Allocate space for the descriptor
3097 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3098 global linkage code. If an undefined function descriptor is
3099 exported, arrange to define it. Warn about any other undefined
3101 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3102 (xcoff_write_global_symbol): Create a function descriptor when
3104 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3105 * bfd-in2.h: Rebuild.
3107 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3109 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3110 (ppc_coff_link_hash_table): new types for hashing
3111 (ppc_coff_link_hash_newfunc): hash entry constructor
3112 (ppc_coff_link_hash_table_init): hash table initializer
3113 (ppc_coff_link_hash_table_create): hash table constructor
3114 (ppc_record_toc_entry): changed references to hash table
3115 (coff_ppc_relocate_section): changed references to hash table
3117 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3118 * libcoff.h: Rebuild
3120 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3121 (coff_link_add_symbols): removed toc_offset init
3123 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3125 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3128 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3129 if it is given and mmep is available.
3130 * acconfig.h: Undef USE_MMAP.
3131 * configure, config.in: Regenerated.
3132 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3133 table handling the old way.
3134 (aout_get_external_symbols): Don't complain if last byte of string
3136 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3137 (bfd_free_window) [! USE_MMAP]: Don't define.
3138 (bfd_get_file_window,
3139 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3141 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3143 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3146 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3148 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3149 compatible with AMD generated COFF files. Try to support both AMD
3150 and GNU formats simultaneously.
3151 (coff_a29k_relocate_section): Likewise.
3153 * libbfd.c (bfd_get_file_window): Change writable parameter from
3154 int to boolean; update all callers. Pass MAP_SHARED if not
3155 writable--it's required on Solaris. Cast fprintf argument to
3157 * bfd-in.h (bfd_get_file_window): Update declaration.
3158 * bfd-in2.h: Rebuild.
3159 * aoutx.h: Update calls to bfd_get_file_window.
3161 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3163 (xcoff_swap_ldhdr_in): New static function.
3164 (xcoff_swap_ldsym_in): New static function.
3165 (xcoff_find_reloc): Handle the case of a single reloc correctly.
3166 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3167 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
3168 Handle XTY_ER/XMC_XO symbols correctly.
3169 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3170 rather than normal symbol table.
3171 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3172 already defined with the same absolute value.
3173 (xcoff_mark): When considering called symbols, check whether the
3174 descriptor is from a dynamic object, rather than the symbol
3176 (xcoff_build_ldsyms): Likewise.
3178 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3179 Cast realloc and malloc return values. If malloc or realloc fail,
3180 set bfd_error_no_memory.
3181 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3182 * bfd-in2.h: Rebuild.
3184 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3186 * coff-ppc.c (ppc_record_toc_entry): new function.
3187 (in_reloc_p): changed return value.
3188 (coff_ppc_relocate_section): much rework.
3189 (ppc_allocate_toc_section): new function.
3190 (ppc_process_before_allocation): new function.
3191 (ppc_coff_swap_sym_in_hook): new function.
3193 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3194 (coff_link_add_symbols): initialize toc_offset.
3196 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3197 (coff_swap_aouthdr_out): Added more sections to the data
3198 dictionary for the pe file header. Also changed linker version
3199 number on the ppc side.
3200 (dir_names): small improvements to the dictionary printing.
3201 (pe_mkobject_hook): save the file level flags.
3203 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3204 (pe_tdata): added real_flags field
3205 (coff_tdata): added local_toc_sym_map and access macro
3207 * libcoff.h (coff_link_hash_entry): added toc_offset field
3208 (pe_tdata): added real_flags field
3209 (coff_tdata): added local_toc_sym_map and access macro
3211 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3212 (coff_mkobject): init for local_toc_sym_map
3213 (coff_write_object_contents): set the internal_a.magic to
3214 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3217 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3219 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3220 entries until both the line number address and the function name
3221 address are too large.
3223 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3224 * configure: Rebuilt.
3226 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3227 is defined in the environment.
3229 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3231 * som.c (som_get_section_contents_in_window): Define to use
3234 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3236 * coff-i860.c: New file, based on coff-i386.c.
3237 * cpu-i860.c: New file, based on cpu-i386.c.
3238 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3239 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3240 targets, using i860coff_vec.
3241 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3242 trad-core.o and hosts/i860mach3.h.
3243 (i860coff_vec): Use coff-i860.o and cofflink.o.
3244 * configure: Rebuild.
3245 * Makefile.in: Rebuild dependencies.
3246 (ALL_MACHINES): Add cpu-i860.o.
3247 (BFD32_BACKENDS): Add coff-i860.o.
3248 (CFILES): Add cpu-i860.c and coff-i860.c.
3249 * targets.c (i860coff_vec): Declare.
3250 (bfd_target_vector): Add &i860coff_vec.
3251 * archures.c (bfd_i860_arch): Declare.
3252 (bfd_archures_list): Add &bfd_i860_arch.
3253 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3254 (coff_set_flags): Handle bfd_arch_i860.
3255 (coff_write_object_contents): Handle I860 a.out magic number.
3257 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3259 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3260 the created .tc section to 2.
3261 (xcoff_mark): Don't keep a .loader reloc for a call to an
3262 undefined symbol when creating a shared library.
3263 (xcoff_build_ldsyms): When creating a shared library, generate
3264 global linkage code for a call to an undefined symbol.
3266 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3268 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3269 BFD32_BACKENDS, BFD64_BACKENDS.
3270 (.dep1): Put mkdep output in a separate file.
3271 Rebuilt dependencies.
3273 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3276 Permit use of mmap when available:
3278 * configure.in: Check for mmap, madvise, mprotect.
3279 * config.in, configure: Regenerated.
3281 * libbfd.c (struct _bfd_window_internal): Define type.
3282 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3284 (ok_to_map): New static variable for debugging.
3285 (_bfd_generic_get_section_contents_in_window): New function.
3286 * bfd-in.h (bfd_window_internal): Declare type.
3287 (bfd_window): Define type.
3288 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3289 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3292 * libaout.h (struct aoutdata): Add two window fields.
3293 (obj_aout_sym_window, obj_aout_string_window): New macros.
3294 * aoutx.h (some_aout_object_p): Initialize windows.
3295 (aout_get_external_symbols): Get symbol data and strings in
3296 windows instead of explicitly allocated buffers.
3297 (slurp_symbol_table): Free window instead of memory.
3298 (bfd_free_cached_info): Release windows instead of freeing storage
3300 (aout_link_free_symbols): Ditto.
3302 * targets.c (bfd_target): Add new field for
3303 get_section_contents_in_window.
3304 (BFD_JUMP_TABLE_GENERIC): Updated.
3305 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3306 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3307 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3308 macros for get_section_contents_in_window field.
3310 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3312 * core.c: Renamed to corefile.c
3313 * makefile.dos (OBJS): Change core.o to corefile.o
3314 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3317 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3319 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3320 targ_selvecs to allow debugging under Irix-5 native.
3323 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
3325 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
3326 to o. Clobber and restore the list of new csects around the call
3327 to _bfd_generic_link_add_one_symbol, in case it wants to report a
3328 linker error and the linker wants to read the symbol table. Reset
3329 the line number count of a real section even if it has no relocs.
3330 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
3332 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
3335 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
3337 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
3338 an undefined symbol in a shared link.
3340 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
3341 oldtype from bfd_link_order_type to bfd_link_hash_type. From
3342 phdm@info.ucl.ac.be (Philippe De Muyter).
3344 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3346 * coff-m88k.c (rtype2howto): New static function.
3347 (RTYPE2HOWTO): Use it rather than a macro definition.
3349 * coffcode.h (coff_write_object_contents): set internal_a.magic
3350 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
3352 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
3353 define TRAD_HEADER to new file hosts/delta68.h.
3354 m88*-motorola-sysv*, however, does use ptrace-core.o.
3355 * hosts/delta68.h: New file.
3357 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
3358 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
3360 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
3362 * i386linux.c (MY(vec)): Declare before use.
3364 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
3366 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
3367 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
3369 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3370 BFD is not of the right type.
3371 (bfd_elf_get_needed_list): Likewise.
3372 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
3373 * sunos.c (bfd_sunos_get_needed_list): Likewise.
3374 * xcofflink.c (XCOFF_XVECP): Define.
3375 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
3377 (bfd_xcoff_import_symbol): Likewise.
3378 (bfd_xcoff_export_symbol): Likewise.
3379 (bfd_xcoff_link_count_reloc): Likewise.
3380 (bfd_xcoff_record_link_assignment): Likewise.
3381 (bfd_xcoff_size_dynamic_sections): Likewise.
3383 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
3384 table index against the number of symbols for a base relative
3387 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
3389 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
3390 full_aouthdr flag here...
3391 (_bfd_xcoff_bfd_final_link): ...not here.
3393 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
3395 * libelf.h: Rename to elf-bfd.h to avoid conflict with
3396 systems that have a system <libelf.h>.
3397 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
3398 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
3399 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
3400 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
3401 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
3402 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
3403 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
3405 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
3407 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
3408 set, set BSF_WEAK in symbol. Change all callers.
3409 (ecoff_get_extr): Set weakext based on BSF_WEAK.
3410 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
3411 _bfd_generic_link_add_one_symbol.
3412 (ecoff_indirect_link_order): Check that the section tdata relocs
3413 are not NULL before using them.
3415 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
3416 define TRAD_HEADER as hosts/alphalinux.h.
3417 * configure: Rebuild.
3418 * hosts/alphalinux.h: New file.
3419 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
3422 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
3424 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
3425 C_ECOMM storage classes.
3427 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
3429 (xcoff_mark): Call xcoff_mark_symbol.
3430 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
3431 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
3433 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
3435 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
3437 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
3439 (xcoff_find_reloc): New static function.
3440 (xcoff_link_add_symbols): Use it.
3441 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
3442 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
3443 relocate the value of C_DECL.
3445 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
3447 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
3449 * cofflink.c (_bfd_coff_generic_relocate_section): Make
3450 callback decide what goes in .relocs.
3451 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
3452 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
3455 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
3457 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
3460 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
3462 * xcofflink.c: More improvements, mostly to fix handling of
3463 constructors and a few other special cases.
3464 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3465 zero, reverting yesterday's change.
3466 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3467 (bfd_xcoff_link_count_reloc): Declare.
3468 (bfd_xcoff_record_link_assignment): Declare.
3469 * bfd-in2.h: Rebuild.
3471 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
3473 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
3474 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3475 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3476 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3477 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3478 Change PAGE_SIZE to TARGET_PAGE_SIZE.
3480 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3483 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
3484 segments includes the a.out header. See to that the magic number
3485 *always* is big-endian.
3487 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
3488 m68k4k NetBSD configurations.
3490 * configure.in, configure: Separate i386 & mips NetBSD
3491 configurations from other BSD ones. Don't assume DEC is the only
3492 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
3493 configurations. Add support for m68k4k NetBSD object format.
3495 * libaout.h: Added M_68K4K_NETBSD magic.
3497 * m68k4knetbsd.c: New file.
3499 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3501 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3504 * hosts/mipsnbsd.h: New file.
3507 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
3509 * config.bfd: Add config stuff for mips*-*-magic* to set
3510 targ_defvec to ecoff_big_vec.
3513 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
3515 * xcofflink.c: Numerous changes to get closer to a working XCOFF
3517 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3518 toc_section, and entry_section fields.
3519 (struct xcoff_section_tdata): Remove ldrel_count field.
3520 * libcoff.h: Rebuild.
3521 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3523 (coff_compute_section_file_positions): If RS6000COFF_C, generate
3524 full a.out header if full_aouthdr is set in xcoff_data.
3525 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3526 based on sections stored in xcoff_data.
3527 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3529 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3530 (rs6000coff_vec): Set symbol_leading_char to '.'.
3531 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3532 value stored in ret rather than returning a pointer value.
3534 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3536 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3539 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3541 * som.c (som_slurp_string_table): Allocate the strings with malloc
3542 since they're free'd by free_cached_info.
3543 (som_slurp_symbol_table): Similarly for the symbol table.
3545 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3547 * Makefile.in (diststuff): Don't make headers.
3549 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3551 * Makefile.in: Rebuild dependencies.
3553 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3554 output_bfd is not SunOS.
3555 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3556 non-SunOS input files.
3558 * xcofflink.c: Extensive changes to support linking shared objects
3559 and generating a .loader section.
3560 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3561 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3562 last_symndx, and ldrel_count fields.
3563 * libcoff.h: Rebuild.
3564 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3565 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3567 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3568 (bfd_xcoff_export_symbol): Declare.
3569 (bfd_xcoff_size_dynamic_sections): Declare.
3570 * bfd-in2.h: Rebuild.
3572 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3574 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3575 * configure: Rebuild.
3576 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3577 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3579 (pmac_xcoff_vec): Update to use new xcoff support.
3580 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3581 (xcoff_write_armap): Declare buf as unsigned char.
3582 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3584 * mpw-make.sed: Generalize subdir_do edit.
3586 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3588 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3589 correctly. Don't initialize asect->vma.
3591 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3593 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3594 something a little less than the page size.
3596 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3598 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3600 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3602 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3603 * coffcode.h (coff_write_object_contents): If .bss is before
3604 .data us that as data_start.
3605 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3607 * peicode.h (add_data_entry): Use _cooked_size of data directory.
3608 (coff_swap_outhdr_out): Hardwire in version number.
3610 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
3612 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3613 major and minor to *_vno, since the former are also macros in
3614 SunOS header files. Cast result of bfd_alloc to appropriate
3617 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3618 before assigning to sec_data.
3620 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
3622 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3623 now relative to the section, not absolute.
3624 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3625 get the file name when there is a N_SO directory name. When
3626 handling stabs, remember that section->vma was added to the
3629 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
3631 * sunos.c (struct sunos_link_hash_table): Add needed field.
3632 (sunos_link_hash_table_create): Call bfd_release, not free.
3633 (sunos_link_hash_table_create): Initialize needed field.
3634 (sunos_add_dynamic_symbols): Record needed objects.
3635 (bfd_sunos_get_needed_list): New function.
3636 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3637 * bfd-in2.h: Rebuild.
3639 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
3641 * libcoff-in.h (pe_data_type.in_reloc_p): New.
3643 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
3645 * bfd-in.h (struct bfd_link_needed_list): Rename from
3646 bfd_elf_link_needed_list.
3647 * bfd-in2.h: Rebuild.
3648 * elf.c, elflink.h, libelf.h: Corresponding changes.
3650 Add start at AIX linker support; no shared libraries yet.
3651 * xcofflink.c: New file.
3652 * configure.in (rs600coff_vec): Use xcofflink.o.
3653 * configure: Rebuild.
3654 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3656 (struct xcoff_section_tdata): Define.
3657 (xcoff_section_data): Define macro.
3658 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3659 (_bfd_xcoff_bfd_link_add_symbols): Declare.
3660 (_bfd_xcoff_bfd_final_link): Declare.
3661 (_bfd_ppc_xcoff_relocate_section): Declare.
3662 * libcoff.h: Rebuild.
3663 * coff-rs6000.c: Clean up a bit.
3664 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
3665 cputype, csects, and debug_indices.
3666 (xcoff_copy_private_bfd_data): Copy cputype.
3667 (xcoff_howto_table): Rename from rs6000coff_howto_table.
3668 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3669 (xcoff_reloc_type_lookup): Rename from
3670 rs6000coff_reloc_type_lookup.
3671 (coff_relocate_section): Define.
3672 (_bfd_xcoff_sizeof_headers): Define.
3673 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3674 (_bfd_xcoff_bfd_relax_section): Define.
3675 (_bfd_xcoff_bfd_link_split_section): Define.
3676 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3678 * coffcode.h (coff_compute_section_file_positions): If AIX,
3679 increment sofar by SMALL_AOUTSZ if not executable.
3680 (coff_write_object_contents): If AIX, always output an a.out
3681 header; if not executable, header size of SMALL_AOUTSZ.
3682 * hash.c (struct bfd_strtab_hash): Add xcoff field.
3683 (_bfd_stringtab_init): Initialize xcoff field.
3684 (_bfd_xcoff_stringtab_init): New function.
3685 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3686 (_bfd_stringtab_emit): In XCOFF mode, write out length.
3687 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3688 * libbfd.h: Rebuild.
3689 * Makefile.in: Rebuild dependencies.
3690 (BFD32_BACKENDS): Add xcofflink.o.
3691 (CFILES): Add xcofflink.c.
3693 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3694 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
3695 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3697 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3699 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3701 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
3703 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3704 * config.in: Regenerated.
3706 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3707 (_bfd_chunksize): New variable.
3708 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3709 for obstack chunk size.
3710 * configure.in: Check for getpagesize.
3711 * configure: Regenerated.
3713 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3715 * trad-core.c (rawptr): Make it a local variable of
3716 ptrace_unix_core_file_p.
3718 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
3720 * coff-arm.c (in_reloc_p): New.
3721 * coff-i386.c (in_reloc_p): New.
3722 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3723 (coff_write_object_contents): Only set has_reloc_section
3725 * cofflink.c (_bfd_coff_generic_relocate_section): Call
3726 in_reloc_p to decide if reloc should be emitted.
3727 * libcoff.h (pe_data_type.in_reloc_p): New.
3728 * peicode.h (pe_mkobject): Initialize in_reloc_p.
3730 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
3732 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3733 (_bfd_coff_read_internal_relocs): Likewise.
3734 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3735 (_bfd_coff_read_internal_relocs): Likewise.
3737 * elflink.h (elf_link_add_object_symbols): Correct conditions
3738 under which type and size change warnings are issued.
3740 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
3742 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3743 a symbol which is not in a real section.
3744 (coff_write_native_symbol): Corresponding change.
3746 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3747 coff_link_hash_newfunc and make non-static.
3748 (_bfd_coff_link_hash_table_init): New function, broken out of
3749 _bfd_coff_link_hash_table_create.
3750 (_bfd_coff_link_hash_table_create): Use it.
3751 (process_embedded_commands): Make static.
3752 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3753 (_bfd_coff_link_hash_table_init): Declare.
3754 * libcoff.h: Rebuild.
3756 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3757 field in XCOFF tdata.
3758 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3759 U802ROMAGIC, for clarity. Try to set arch and machine correctly
3760 based on cputype stored in a.out header, or in n_type of initial
3762 (coff_write_object_contents): Set cputype correctly in a.out
3764 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3766 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3767 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
3769 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3770 * libcoff.h: Rebuild.
3772 * cpu-rs6000.c (rs6000_compatible): New static function.
3773 (bfd_rs6000_arch): Use it.
3774 * cpu-powerpc.c (powerpc_compatible): New static function.
3775 (arch_info_struct): Define various flavours of PowerPC.
3776 (bfd_powerpc_arch): Use powerpc_compatible. Point at
3779 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
3781 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
3783 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
3785 * elflink.h (elf_link_add_object_symbols): Don't warn about
3786 changing the size or type if the old definition was weak.
3788 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
3790 * coffcode.h (combined_entry_type): Add fix_line field.
3791 (coff_slurp_line_table): Warn if we try to set the lineno field of
3793 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3794 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
3795 * coffgen.c (coff_mangle_symbols): Handle fix_line.
3796 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3798 (coff_print_symbol): Print fix_value symbols in a useful fashion.
3799 * libcoff.h: Rebuild.
3801 * libcoff-in.h (struct xcoff_tdata): Define.
3802 (xcoff_data): Define.
3803 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3804 * bfd-in2.h, libcoff.h: Rebuild.
3805 * coff-rs6000.c (xcoff_mkobject): New static function.
3806 (coff_mkobject): Define.
3807 (xcoff_copy_private_bfd_data): New static function.
3808 (coff_bfd_copy_private_bfd_data): Define.
3809 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3811 (rs6000coff_vec): Add DYNAMIC to object_flags.
3812 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3813 .loader sections specially.
3814 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3815 section alignment from the XCOFF tdata information.
3816 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3817 F_SHROBJ, and copy the extra a.out header information into the
3818 XCOFF tdata structure.
3819 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3820 F_DYNLOAD and the extra a.out header information.
3821 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3822 C_HIDEXT symbol with attached csect information.
3823 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3824 in the o_maxdata field.
3825 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3826 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3827 end if BSF_NOT_AT_END is set.
3829 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3830 _bfd_read_ar_hdr_fn.
3831 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3832 * bfd-in2.h, libbfd.h: Rebuild.
3833 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3835 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3836 (bfd_slurp_bsd_armap_f2): Likewise.
3837 (_bfd_slurp_extended_name_table): Likewise.
3839 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3841 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3843 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3844 when the symbol table is empty.
3846 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3847 space for section symbols, since we don't output them either.
3848 (elf_m68k_adjust_dynindx): Removed.
3850 * ptrace-core.c (rawptr): Make it a local variable of
3851 ptrace_unix_core_file_p.
3853 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3855 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3858 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3859 Mac object file formats.
3861 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3863 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3864 auxent if there isn't one.
3865 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3866 rather than FILNMLEN as the maximum name length.
3868 * coffcode.h (bfd_coff_backend_data): Add new field
3869 _bfd_coff_print_aux.
3870 (bfd_coff_print_aux): New static function.
3871 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3872 scnlen field of an XTY_LD csect aux entry.
3873 (coff_print_aux): New static function.
3874 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3875 in coff_pointerize_aux_hook.
3876 (bfd_coff_std_swap_table): Initialize new field.
3877 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3878 * libcoff.h: Rebuild.
3879 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3880 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3882 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3883 if there are symbols, for native AIX ld compatibility.
3885 * coffcode.h (bfd_coff_backend_data): Add new field
3886 _bfd_coff_pointerize_aux_hook.
3887 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3888 or I960, and as 0 otherwise.
3889 (bfd_coff_std_swap_table): Initialize new field.
3890 * libcoff.h: Rebuild.
3891 * coffgen.c (coff_pointerize_aux): Change parameters to take
3892 symbol pointer instead of type and class, and to take aux index.
3893 Call _bfd_coff_pointerize_aux_hook if it is defined.
3894 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3895 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3896 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3898 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3899 read-only/host-only support.
3901 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3903 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3906 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3907 BFD_JUMP_TABLE_ARCHIVE accordingly.
3908 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3909 (_bfd_compute_and_write_armap): Declare.
3910 (_bfd_generic_read_ar_hdr): Declare.
3911 (_bfd_read_ar_hdr): Define.
3912 (_bfd_noarchive_read_ar_hdr): Define.
3913 (_bfd_archive_bsd_read_ar_hdr): Define.
3914 (_bfd_archive_coff_read_ar_hdr): Define.
3915 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3916 _bfd_read_ar_hdr instead.
3917 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3918 (_bfd_compute_and_write_armap): Rename from
3919 compute_and_write_armap. Make non-static. Change all callers.
3920 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3921 than _bfd_snarf_ar_hdr.
3922 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3923 * ieee.c (ieee_read_ar_hdr): Define.
3924 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3925 * oasys.c (oasys_read_ar_hdr): Define.
3926 * som.c (som_read_ar_hdr): Define.
3927 * bfd-in2.h, libbfd.h: Rebuild.
3929 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3931 * peicode.c (coff_swap_filehdr_in): If symptr is
3932 zero, there aren't any symbols, even if nsyms is set.
3934 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3936 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3938 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3939 sections, and set styp correctly for them: .got, .hash, .dynamic,
3940 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3941 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3943 (ecoff_sort_hdrs): New static function.
3944 (ecoff_compute_section_file_positions): Return boolean, not void.
3945 Sort the sections by VMA before looking through them. Put the
3946 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3947 section on an appropriate boundary within the page.
3948 (ecoff_compute_reloc_file_positions): Check return value of
3949 ecoff_compute_section_file_positions.
3950 (_bfd_ecoff_set_section_contents): Likewise.
3951 (_bfd_ecoff_write_object_contents): Check for various Alpha
3952 section types when incrementing text_size and data_size. Call
3953 adjust_headers backend function if it exists.
3954 * coff-alpha.c (alpha_adjust_headers): New static function.
3955 (alpha_ecoff_backend_data): Initialize adjust_headers field.
3956 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3958 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3960 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
3962 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3963 of ALTERNATE_AIX_CORE_FORMAT.
3964 * configure.in (aix4): No longer need CORE_FLAGS.
3965 * configure: Updated.
3967 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
3969 NS32k changes from Ian Dall:
3970 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3972 (aout_link_input_section_std, aout_link_input_section_ext,
3973 aout_link_reloc_link_order): Call them instead of _bfd_*
3975 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3977 (backend_data): Use it instead of hardcoded zero.
3979 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3980 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3982 * ns32knetbsd.c: Include bfd.h.
3983 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3984 (MY_bfd_reloc_type_lookup): Declare function too.
3985 * pc532-mach.c (set_sizes): Don't declare.
3986 (MY_text_includes_header, MY_exec_header_not_counted): Define.
3987 (backend_data, MY_backend_data): Don't define.
3989 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3990 ns32k-*-lites* like ns32k-*-netbsd*.
3992 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3995 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
3997 * coffcode.h (coff_write_object_contents): Restore setting
3998 f_timdat to 0, deleted on August 22.
4000 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4002 * coffcode.h (coff_bfd_copy_private_symbol_data,
4003 coff_bfd_copy_private_section_data,
4004 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4005 * peicode.h (coff_bfd_copy_private_bfd_data): New
4006 (pe_bfd_copy_private_bfd_data): New.
4007 (coff_swap_scnhdr_in): Swap bss size into the right place.
4008 (pe_print_private_bfd_data): Add some newlines.
4010 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
4012 * som.c (setup_sections): Don't die if a space has no subspaces.
4014 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4016 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4017 dynamic symbol override a common symbol. Don't change the size or
4018 type if they have been set and the new symbol is not a definition.
4019 Warn if the size or type changes.
4021 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
4023 * som.c (som_begin_writing): Don't write the symbol table or
4025 (som_finish_writing): Write them here. Place them after the
4026 subspace data, but before the relocs.
4028 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4030 * sunos.c (sunos_add_one_symbol): Just pass false, not
4031 info->shared_library, to sunos_create_dynamic_sections.
4032 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4034 (sunos_check_dynamic_reloc): Remove .text section assertion.
4036 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4038 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4039 * configure, configure.in: Add pmac_xcoff_vec case.
4040 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4041 * coff-pmac.c: New file, PowerMac XCOFF support.
4042 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4043 * targets.c (pmac_xcoff_vec): Declare.
4045 * mpw-config.in: Various changes to be compatible with the
4046 autoconf-based configury.
4047 * mpw-make.sed: New file, sed commands to translate Unix
4048 makefile into MPW syntax.
4049 * mpw-make.in: Remove.
4050 * hosts/mpw.h: Remove.
4051 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4052 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4054 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4056 * binary.c (binary_get_symtab): Return an empty string on error.
4057 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4059 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4061 * coff-ppc.c: Reformatted according to gnu conventions
4062 Removed irrelevant "if 0" code
4064 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4066 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4067 symbols rather than as indirect symbols.
4068 (MY(slurp_symbol_table)): Don't do anything special about
4071 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4072 of .ctors and .dtors sections is no larger than 2.
4074 * sunos.c (sunos_add_one_symbol): Don't change
4075 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4077 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4078 dynamic symbols when creating a shared library.
4079 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4081 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4082 written even if it is not defined in a regular object.
4083 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4084 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4085 rather than the constant 22.
4086 (sunos_check_dynamic_reloc): Handle creating a shared library.
4087 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4088 zero when creating a shared library.
4089 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4090 write it out at the start of the symbol table.
4092 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4094 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4096 * config.bfd: Add arm-*-coff.
4097 * configure.in, configure: Add armcoff_{little,big}_vec.
4098 * targets.c (armcoff_{little,big}_vec): Declare.
4099 (bfd_target_vector): Add armcoff_{little,big}_vec.
4100 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4102 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4104 * targets.c (bfd_find_target): Remove debugging code.
4106 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4108 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4110 * Makefile.in: added *-ppc files
4111 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4112 allow pe based .o's to be shared with other tools on ppc/NT
4113 * config.bfd: added powerpc[le]-[pe|winnt] config support
4114 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4115 * peicode.h: Added more section flags for PE on ppc
4116 Added coff_swap_filehdr_out to allow peicode.h to be
4117 used for non-image PE files on ppc.
4118 Check for image, or not, before copying pe_opthdr
4119 * targets.c: Added new bfd's
4120 * targets.c: Removed two inactive bfds that shouldn't have made it this
4123 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4125 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4126 explicit values to initialize all relocs. Change all users.
4127 (ppc_elf_brtaken_inner): New function to handle branch predicition
4129 (ppc_elf_brtaken_reloc): Ditto.
4130 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4131 relocs use ppc_elf_unsupported_reloc.
4132 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4133 needs to be reported.
4134 (ppc_elf_relocate_section): Support branch prediction relocs.
4136 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4138 * bfd.c (bfd_assert): Remove \n from string passed to
4141 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4142 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4143 (bfd_coff_make_section_hook): Don't define.
4144 (coff_make_section_hook): Remove.
4145 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4146 (styp_to_sec_flags): Likewise.
4147 (coff_write_object_contents): Likewise.
4148 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4150 * libcoff.h: Rebuild.
4151 * coffgen.c (make_a_section_from_file): Just call
4152 bfd_make_section_anyway, not bfd_make_section or
4153 bfd_coff_make_section_hook.
4154 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4155 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4156 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4157 make_section_hook field.
4158 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4160 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4161 pointers into value field for warning and indirect symbols; just
4162 leave the value field alone.
4163 * linker.c (generic_link_add_symbol_list): Use next symbol for
4164 warning and indirect symbols, rather than looking in symbol value.
4165 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4166 parameter. Change all callers. Remove support for indirect
4167 symbols; it didn't work anyhow.
4168 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4169 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4170 * bfd-in2.h: Rebuild.
4172 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4174 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4175 go back to telling the tools this reloc operates on 32 bits.
4177 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4179 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4180 rather than a direct fprintf.
4181 * archive.c (_bfd_write_archive_contents): Likewise.
4182 * coffcode.h (coff_slurp_symbol_table): Likewise.
4183 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4184 (ppc_elf_unsupported_reloc): Likewise.
4185 (ppc_elf_relocate_section): Likewise.
4186 * i386linux.c (linux_tally_symbols): Likewise.
4187 (linux_finish_dynamic_link): Likewise.
4188 * osf-core.c (osf_core_core_file_p): Likewise.
4189 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4190 * som.c (som_sizeof_headers): Likewise.
4191 * srec.c (srec_bad_byte): Likewise.
4192 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4193 * libbfd-in.h (bfd_assert): Declare first parameter const.
4194 * libbfd.h: Rebuild.
4195 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4196 bfd_reloc_overflow is enough.
4197 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4198 * coff-h8500.c (rtype2howto): Likewise.
4199 * coff-z8k.c (rtype2howto): Likewise.
4200 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4201 * elf.c (_bfd_elf_get_lineno): Likewise.
4202 (_bfd_elf_no_info_to_howto): Likewise.
4203 (_bfd_elf_no_info_to_howto_rel): Likewise.
4204 * hp300hpux.c (convert_sym_type): Likewise.
4205 (MY(swap_std_reloc_in)): Likewise.
4206 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4208 * libaout.h (struct aoutdata): Add line_buf field.
4209 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4210 and filename_buffer. Instead, use a malloc buffer stored in the
4211 new line_buf field. Remove length restrictions.
4213 * coffgen.c (string_size): Remove static variable.
4214 (debug_string_size, debug_string_section): Likewise.
4215 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4216 and debug_string_size_p parameters. Use them instead of the
4217 global variables. Change all callers.
4218 (coff_write_symbol): Likewise.
4219 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4220 (coff_write_symbols): Add local variables to replace removed
4223 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4224 function, and line_base fields.
4225 * libcoff.h: Rebuild.
4226 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4227 information, rather than using static variables.
4229 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4230 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4232 * init.c (initialized): Remove static variable.
4233 (bfd_init): Don't bother setting initialized.
4234 (bfd_check_init): Remove.
4235 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4236 * libbfd.h: Rebuild.
4238 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4240 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4241 size for full core dumps. Copy core file header to private data.
4242 (rs6000coff_core_file_failing_command,
4243 rs6000coff_core_file_failing_signal): New functions to extract
4244 the file name and terminating signal from the core file.
4245 * coff-rs6000.c: Use them.
4247 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4249 Change arch info to be const, initialized at compile time.
4250 * archures.c: Reindent many functions. Change CONST to const.
4251 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4252 nothing set it anyhow. Make next const.
4253 (bfd_arch_info_list): Remove.
4254 (bfd_archures_list): Rename from archures_init_table. Change from
4255 a table of function pointers to a table of bfd_arch_info_type
4256 structure addresses.
4257 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4258 (bfd_lookup_arch): Likewise.
4259 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4261 (bfd_default_arch_struct): Make const.
4262 (bfd_arch_init, bfd_arch_linkin): Remove.
4263 (bfd_get_arch_info): Return a const pointer.
4264 * init.c (bfd_init): Don't call bfd_arch_init.
4265 * bfd.c (struct _bfd): Make arch_info const.
4266 * bfd-in2.h: Rebuild.
4267 * libbfd.h: Rebuild.
4268 * configure.in: Put & before everything in $selarchs.
4269 * configure: Rebuild.
4270 * cpu-*.c: Change bfd_*_arch from a function which calls
4271 bfd_arch_linkin to a const structure.
4272 * ieee.c (ieee_object_p): Make arch const.
4274 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4276 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4278 * bfd-in2.h: Regenerate.
4279 * libbfd.h: Regenerate.
4281 * elf32-ppc.c (reloc_type): Update names to match current draft.
4282 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4283 relative. Update names to current V.4 draft.
4284 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4285 (ppc_elf_relocate_section): Rename relocations to match draft.
4287 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4289 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4290 compiled with -mrelocatable-lib to be linked with either normal
4291 modules or -mrelocatable modules.
4293 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4295 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4296 in the a.out header.
4298 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4299 a reloc against a local symbol, even if it's not a section.
4301 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4303 * targets.c (bfd_target): Remove unused align_power_min field.
4304 * bfd-in2.h: Rebuild.
4305 * All backends: Remove initialization of align_power_min.
4307 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4309 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
4311 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4313 * config.bfd (mips-dec-netbsd*): New target.
4314 * configure.host (mips-dec-netbsd*): New host.
4315 * configure.in (mips-dec-netbsd*): New native.
4316 * configure: Rebuild.
4318 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4320 Make the COFF backend linker merge common types:
4321 * cofflink.c (struct coff_debug_merge_element): Define.
4322 (struct coff_debug_merge_type): Define.
4323 (struct coff_debug_merge_hash_entry): Define.
4324 (struct coff_debug_merge_hash_table): Define.
4325 (coff_debug_merge_hash_table_init): Define.
4326 (coff_debug_merge_hash_table_free): Define.
4327 (coff_debug_merge_hash_lookup): Define.
4328 (struct coff_final_link_info): Add debug_merge field.
4329 (coff_debug_merge_hash_newfunc): New static function.
4330 (_bfd_coff_final_link): Allocate and free debug_merge table.
4331 (coff_link_input_bfd): Merge identical enum, struct and union
4334 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
4336 Convert i960 COFF to use COFF backend linker.
4337 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
4338 structure to store the symbol being used.
4339 (coff_i960_start_final_link): New static function.
4340 (coff_i960_relocate_section): New static function.
4341 (coff_i960_adjust_symndx): New static function.
4342 (coff_start_final_link): Define.
4343 (coff_relocate_section): Define.
4344 (coff_adjust_symndx): Define.
4345 * coffcode.h (bfd_coff_backend_data): Add new callback function
4346 _bfd_coff_start_final_link.
4347 (bfd_coff_start_final_link): Define.
4348 (coff_start_final_link): Define if not defined.
4349 (bfd_coff_std_swap_table): Add coff_start_final_link.
4350 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
4352 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
4353 function callback is not NULL.
4354 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
4355 (_bfd_coff_internal_syment_name): Declare.
4356 * libcoff.h: Rebuild.
4357 * configure.in (icoff_big_vec): Add cofflink.o.
4358 (icoff_little_vec): Likewise.
4359 * configure: Rebuild.
4361 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
4363 * Makefile.in (clean-info): Remove extraneous tab from line
4366 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
4368 * cofflink.c (coff_link_input_bfd): Fail if a section with no
4369 contents has relocs.
4371 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
4373 * coffcode.h (coff_compute_section_file_positions): Keep the
4375 (coff_write_object_contents): Remember if it's a relocatable
4377 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
4378 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
4379 if relocatable file. Swap out saved raw size.
4381 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
4383 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
4384 (maintainer-clean): Rename from realclean, passing
4385 maintainer-clean down to subdirectories, but leave realclean as a
4388 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
4391 * dep-in.sed: Remove config.h from generated dependencies.
4393 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
4394 broken out of sunos_canonicalize_dynamic_symtab.
4395 (sunos_canonicalize_dynamic_symtab): Call new function
4396 sunos_slurp_dynamic_symtab.
4397 (sunos_add_dynamic_symbols): Add three new parameters. Return the
4398 dynamic symbol table to the caller.
4399 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
4400 callback to override the symbols being read.
4401 * libaout.h (struct aout_backend_data): Add three new parameters
4402 to add_dynamic_symbols callback.
4404 Extensive minor changes to avoid various gcc warnings. Also:
4405 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
4406 * archures.c (bfd_arch_info_type): Change mach field from long to
4408 (bfd_lookup_arch): Change machine parameter from long to unsigned
4411 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
4413 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
4414 a symbol with a non-zero plt_offset.
4416 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
4418 * elfcode.h (align_file_position): Remove; not used.
4420 * configure.in: Only check for <sys/procfs.h> on a native system,
4421 and make sure it defines prstatus_t.
4422 * configure: Rebuild.
4424 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
4426 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
4428 * config.in: Rename from config.h.in.
4429 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
4430 Check for config.h:config.in when creating stamp-h.
4431 * configure: Rebuild.
4432 * Makefile.in (stamp-h): Depend upon config.in rather than
4433 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
4434 calling config.status.
4436 * Makefile.in (do_distclean): Remove config.h and stamp-h.
4437 (Makefile): Just rebuild Makefile.
4438 (config.h, stamp-h): New targets.
4439 * configure.in: Create stamp-h when rebuilding config.h.
4440 * configure: Rebuild.
4442 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
4444 * configure.in: Call AC_CONFIG_HEADER. Substitute
4445 HOST_64BIT_LONG. Check that various header files exist. Check
4446 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
4447 and/or free need to be declared. Don't make a link to sysdep.h.
4448 Define TRAD_HEADER for various hosts.
4449 * configure: Rebuild.
4450 * configure.host: Don't set my_host. Add definitions taken from
4451 host header files for various entries. Remove entries which now
4453 * acconfig.h: New file.
4454 * config.h.in: New file, built by autoheader.
4455 * sysdep.h: New file.
4456 * Makefile.in (do_distclean): Don't remove sysdep.h.
4458 (LOCAL_H_DEPS): New variable.
4459 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
4461 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
4462 ($(OPTIONAL_BACKENDS)): Likewise.
4463 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4464 looking through sysdep.h.
4465 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4466 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4467 (fprintf_vma, sprintf_vma): Likewise.
4468 (int64_type, uint64_type): Don't define.
4469 * bfd-in2.h: Rebuild.
4470 * archures.c, bfd.c, srec.c: Include <ctype.h>.
4471 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4472 * lynx-core.c: Include stuff from old hosts/lynx.h.
4473 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4474 rather than NO_FCNTL.
4475 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4476 rather than NATIVE_HPPAHPUX_COMPILER.
4477 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
4479 * hosts/*.h: Remove all header files which merely include,
4480 declare, and define things. Leave header files which define
4481 information needed by trad-core.c.
4483 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4484 (BFD_CC_FOR_BUILD): Define.
4485 * configure.in: Use BFD_CC_FOR_BUILD.
4486 * configure: Rebuild.
4488 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
4490 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4491 * configure: Rebuild.
4493 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4496 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
4498 * config.bfd: i386pe_ve -> i386pe_vec.
4500 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
4502 * configure.host: Incorporate host Makefile fragments by setting
4504 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
4505 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
4506 value based on whether the code is being compiled by a cross
4507 compiler. Don't substitute host_makefile_frag or frags.
4508 * aclocal.m4: New file to define local AC_PROG_CC.
4509 * configure: Rebuild.
4510 * Makefile.in (INSTALL): Set to @INSTALL@.
4511 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4512 (INSTALL_DATA): Set to @INSTALL_DATA@.
4514 (CC): Define as @CC@.
4515 (CFLAGS): Set to @CFLAGS@.
4516 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4517 (@host_makefile_frag@): Remove.
4518 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
4519 after other options.
4520 (config.status): Remove dependency upon @frags@.
4521 * config/*.mh, config/README: Remove.
4523 * config.bfd: Rewrite to incorporate the contents of the Makefile
4524 fragments by setting shell variables, rather than merely returning
4525 the name of a Makefile fragment.
4526 * configure.in: Use shell variables set by config.bfd rather than
4527 looking at the target Makefile fragment files. Don't substitute
4528 target_makefile_frag. Do substitute TDEFINES.
4529 * configure: Rebuild.
4530 * Makefile.in (@target_makefile_frag@): Remove.
4531 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4532 * config/*.mt: Remove.
4534 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4536 * configure.in: Put changequote lines around "i[345]86" patterns
4537 section of core file support.
4539 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4541 * som.c (som_bfd_print_private_bfd_data): Define to use the
4544 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4546 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4547 entry, text_start and data_start.
4549 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4551 * Makefile.in (OFILES): Remove $(TDEPFILES).
4552 * config/apollo.mt (TDEPFILES): Remove.
4553 * config/README: Update.
4555 * configure.in: For a native configuration, set COREFILE and
4556 COREFLAG based on the canonical host name.
4557 * configure: Rebuild.
4558 * Makefile.in: Rebuild dependencies.
4559 (ALL_CFLAGS): Add @COREFLAG@.
4560 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4561 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4562 support routines. Check LYNX_CORE rather than HOST_LYNX.
4563 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4564 * i386lynx.c: Likewise.
4565 * m68klynx.c: Likewise.
4566 * sparclynx.c: Likewise.
4567 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4568 * *-core.c: Comment changes.
4569 * config/decstation.mh (HDEPFILES): Remove.
4570 (HDEFINES): Remove -DTRAD_CORE.
4571 * config/irix3.mh (RANLIB): Remove.
4572 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4573 (HDEFINES): Remove -DIRIX_CORE.
4574 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4575 (HDEFINES): Remove -DTRAD_CORE.
4576 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4577 * config/ultra3.mh (RANLIB): Remove.
4578 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4579 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4580 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4581 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4582 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4583 * config/i386aix.mh, config/i386bsd.mh: Remove.
4584 * config/i386linux.mh, config/i386mach3.mh: Remove.
4585 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4586 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4587 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4588 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4589 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4590 * config/solaris2.mh, config/stratus.mh: Remove.
4591 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4592 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4594 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4596 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4597 DT_FINI entry if the appropriate symbol is not in the hash table.
4599 * libelf.h (struct elf_backend_data): Add create_program_headers
4600 and want_hdr_in_seg fields.
4601 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4603 (elf_backend_create_program_headers): Likewise.
4604 (elfNN_bed): Initialize create_program_headers and
4606 * elf.c (get_program_header_size): Call create_program_headers
4608 (map_program_segments): Check want_hdr_in_seg backend field. Call
4609 create_program_headers backend routine.
4611 * elf.c (assign_file_positions_except_relocs): Align non allocated
4612 sections when creating an executable.
4614 * elfcode.h (elf_swap_phdr_in): Make non static.
4615 (elf_swap_phdr_out): Make non static.
4616 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4617 (bfd_elf32_swap_phdr_out): Declare.
4618 (bfd_elf64_swap_phdr_in): Declare.
4619 (bfd_elf64_swap_phdr_out): Declare.
4621 * ecofflink.c (ecoff_collect_shuffle): New static function.
4622 (_bfd_ecoff_get_accumulated_pdr): New function.
4623 (_bfd_ecoff_get_accumulated_sym): New function.
4624 (_bfd_ecoff_get_accumulated_ss): New function.
4625 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4626 (_bfd_ecoff_get_accumulated_sym): Declare.
4627 (_bfd_ecoff_get_accumulated_ss): Declare.
4628 * libbfd.h: Rebuild.
4630 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
4632 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4634 * elflink.h (elf_link_add_object_symbols): Handle indirect and
4635 warning symbols. If any section is named .gnu.warning.XXX, treat
4636 the contents as a warning to be issued if the symbol XXX is
4638 (elf_link_output_extsym): For an indirect or warning symbol, just
4639 output the symbol it points to.
4641 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4642 if bfd_hash_allocate fails, since it will already be set.
4643 (generic_link_hash_newfunc): Likewise.
4644 (archive_hash_newfunc): Likewise.
4645 (hash_entry_bfd): New static function.
4646 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4647 callback. Allocate a new warning using the hash table newfunc.
4648 Use bfd_hash_replace to update the entry in the hash table, rather
4649 than assuming we can copy the fields with structure assignment.
4651 * hash.c (bfd_hash_replace): New function.
4652 * bfd-in.h (bfd_hash_replace): Declare.
4653 * bfd-in2.h: Rebuild.
4655 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
4657 * config.bfd: Add mips*vr4300-*-elf* target.
4658 * config/mipsbvr4300.mt: Added.
4660 See file ChangeLog.2
4667 version-control: never