2 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
4 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o
5 (BFD32_BACKENDS) Add elf32-d10v.o
6 * archures.c: Add bfd_d10v_arch.
7 * bfd-in2.h: Add bfd_d10v_arch.
8 * config.bfd (d10v-*-*): New target.
9 * configure: (bfd_elf32_d10v_vec) New vector.
10 * configure.in: (bfd_elf32_d10v_vec) New vector.
11 * cpu-d10v.c: New file.
12 * elf.c (prep_headers): Added case bfd_arch_d10v.
13 * elf32-d10v.c: New file.
15 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L, BFD_RELOC_D10V_18,
16 BFD_RELOC_D10V_18_PCREL): Define.
17 * targets.c (bfd_elf32_d10v_vec): New vector.
20 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
22 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
24 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
26 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
27 bfd_mach_i386_i8086 machine types.
29 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
31 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
34 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
36 * coffcode.h (coff_set_section_contents): A/UX does not require
37 special handling of the _LIB section.
39 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
41 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
44 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
45 array if one was allocated.
47 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
49 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
50 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
51 use_rld_obj_head and rld_value.
52 (mips_elf_link_hash_table_create): Initialize new fields.
53 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
55 (mips_elf_create_dynamic_sections): Create .rld_map section. If
56 __rld_obj_head symbol not seen, create an __rld_map symbol.
57 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
58 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
59 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
60 __rld_obj_head symbol.
61 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
63 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
65 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
67 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
68 ppc_elf_addr16_ha_reloc.
69 (ppc_elf_addr16_ha_reloc): New static function.
71 * coff-mips.c (struct mips_hi): Define.
72 (mips_refhi_list): New static variable.
73 (mips_refhi_addr, mips_refhi_addend): Remove.
74 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
75 (mips_reflo_reloc): Process mips_refhi_list.
76 (mips_relhi_list): New static variable.
77 (mips_relhi_addr, mips_relhi_addend): Remove.
78 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
79 (mips_rello_reloc): Process mips_relhi_list.
80 (mips_relocate_section): Permit an arbitrary number of REFHI or
81 RELHI relocs before the associated REFLO or RELLO reloc.
83 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
85 * aout-target.h (MY(callback)): Set reloc_count fields.
87 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
89 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
90 sections unless this is a SunOS link.
92 * VERSION: Set to 2.7.1.
94 * Released binutils 2.7.
96 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
98 * i386aout.c: Include "aout/aout64.h".
99 (i386aout_write_object_contents): New static function.
100 (MY_write_object_contents): Define.
102 * netbsd.h (MY(write_object_contents)): Make sure that
103 adjust_sizes_and_vmas is called before fiddling with the magic
106 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
108 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
110 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
112 * libbfd-in.h (itos, stoi): Don't define.
114 * i386lynx.c (KEEPIT): Define as udata.i.
115 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
116 (NAME(lynx,swap_ext_reloc_out)): Likewise.
117 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
118 flags. Don't use stoi.
120 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
122 * elf.c (map_sections_to_segments): Don't start a new segment for
123 a writable section if it's on the same page as the previous
124 segment. Reset the writable variable for a readonly section.
126 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
128 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
129 first_thunk_address, thunk_size, and import_table_size.
130 * peicode.h: Improved some diagnostics regarding edata sections.
132 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
134 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
135 (TARGET_LITTLE_SYM): Added missing D_PAGED.
137 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
139 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
140 with XCOFF_DEF_DYNAMIC set is really defined.
141 (xcoff_link_check_dynamic_ar_symbols): Likewise.
142 (xcoff_link_add_symbols): Only create special sections if using an
145 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
147 (bfd_install_relocation): Likewise.
149 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
151 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
153 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
154 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
155 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
156 (elf64_alpha_link_hash_newfunc): Initialize flags field.
157 (elf64_alpha_check_relocs): Record types of LITUSE entries that
158 are found for LITERAL relocs.
159 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
160 taken, we cannot generate a .plt entry for the symbol.
162 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
164 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
165 sysconf functions (for gprof).
166 * configure, config.in: Rebuild.
168 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
170 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
171 an archive if it has a map. If the object file has the wrong
174 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
175 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
177 (alpha_relocate_section): Likewise.
179 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
180 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
181 (coff_swap_sym_out): Use SYMESZ, not sizeof.
182 (coff_swap_aux_out): Use AUXESZ, not sizeof.
183 (coff_swap_lineno_out): Use LINESZ, not sizeof.
184 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
185 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
186 * peicode.h: Corresponding changes.
188 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
190 * elflink.h (elf_create_pointer_linker_section): Comment out code
191 dealing with making GOT pointers negative of the GOT symbol for
194 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
196 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
197 increment the .rela.plt size until after we're done creating the
199 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
200 .rela.plt offset directly rather than calculating it.
202 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
204 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
205 Use autoconf-set values.
206 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
207 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
210 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
211 * configure: Rebuilt.
213 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
215 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
216 handling code > 1k away.
218 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
220 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
221 defined, output whenever the symbol is updated.
223 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
225 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
226 section to 0 if user_set_vma is set.
227 * elflink.h (elf_bfd_final_link): Likewise.
229 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
231 Partially undo patch of Jun 20.
232 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
233 (coff_compute_section_file_positions): Likewise.
234 (coff_write_object_contents): Likewise. Re-add deleted code, but
235 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
236 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
238 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
240 * config.bfd: Add support for *-*-rtems* configurations.
242 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
244 * elf.c (prep_headers): Add bfd_arch_alpha case.
246 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
248 * elf64-alpha.c: New file.
249 * config.bfd (alpha-*-linuxecoff*): New target.
250 (alpha-*-linux*, alpha-*-elf*): New targets.
251 * configure.in (bfd_elf64_alpha_vec): New vector.
252 * configure: Rebuild.
253 * targets.c (bfd_elf64_alpha_vec): Declare.
254 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
255 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
256 * bfd-in2.h, libbfd.h: Rebuild.
257 * Makefile.in: Rebuild dependencies.
258 (BFD64_BACKENDS): Add elf64-alpha.o.
259 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
261 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
263 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
264 than relying on a right shift of 32.
266 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
268 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
269 ifdef to COFF_WITH_PE.
270 (coff_compute_section_file_positions): Likewise.
271 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
272 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
273 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
274 COFF_IMAGE_WITH_PE, always include.
276 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
278 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
280 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
281 approximate the correct answer if SIZEOF_HEADERS was not used.
283 * binary.c (binary_set_section_contents): Set section file
284 position based on LMA rather than VMA.
286 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
288 * linker.c (_bfd_generic_link_output_symbols): Don't output any
289 symbols if info->strip == strip_all.
291 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
293 * coff-h8300.c: Remove #if 0 code.
294 (compatable): Don't allow mixing/matching of different architectures.
296 * archures.c (bfd_mach_h8300s): Add.
297 * bfd-in2.h: Rebuilt.
298 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
300 (h8300_reloc16_estimate): Likewise.
301 (h8300_reloc16_extra_cases): Likewise.
302 (h8300_bfd_link_add_symbols): Likewise.
303 * coffcode.h (coff_set_arch_mach_hook): Likewise.
304 (coff_set_flags): Likewise.
305 * cpu-h8300.c (h8300_scan): Likewise.
306 Add H8/S to bfd_h8300_arch list.
308 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
310 Added support for Alpha OpenVMS:
311 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
312 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
313 * config.h-vms, makefile.vms: New files.
314 * config.bfd (alpha-*-*vms*): New target.
315 * configure.in (evax_alpha_vec): New target vector.
316 * configure: Rebuild.
317 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
318 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
319 * targets.c (bfd_target_evax_flavour): Define.
320 (evax_alpha_vec): Declare.
321 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
323 * bfd-in2.h, libbfd.h: Rebuild.
324 * Makefile.in: Rebuild dependencies.
325 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
326 evax-emh.o, and evax-misc.o.
327 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
328 evax-etir.c, evax-emh.c, and evax-misc.c.
329 (HFILES): Add evax.h.
331 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
333 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
335 (h8300_bfd_link_add_symbols): Likewise.
337 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
339 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
340 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
342 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
344 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
345 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
347 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
348 R_MIPS_32 relocs if creating a shared library.
350 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
352 * peicode.h (add_data_entry): Use pei_section_data rather than
353 _cooked_size. Corresponds to May 13 change in coffcode.h.
355 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
357 * cofflink.c (_bfd_coff_final_link): Handle long section names.
358 * coffcode.h (coff_write_object_contents): If there are long
359 section names, always set the f_symptr field, even if there are no
361 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
362 if there are no symbols.
364 * coffgen.c (make_a_section_from_file): Check return value of
365 _bfd_coff_read_string_table.
366 (coff_real_object_p): Check return value of
367 make_a_section_from_file.
368 (_bfd_coff_read_string_table): Check that there are some symbols
369 before trying to read the string table size.
371 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
373 * xcofflink.c (xcoff_link_add_symbols): When considering whether
374 to replace a symbol in a dynamic object with a symbol from another
375 dynamic object, do the replacement if the existing symbol is
378 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
379 for _ptrgl, and treat it as global linkage code.
381 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
382 filename or N_SO symbol past the offset, and use it to indicate
383 that there is no line number or function when appropriate.
385 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
387 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
388 common symbol defined by the linker. Don't export function code
389 even if export_defineds is set.
391 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
393 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
395 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
396 (h8300_symbol_address_p): New function.
397 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
400 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
402 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
404 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
405 correctly for the two variants. Allow relaxing if the target
406 is 128 bytes away since after relaxation it'll be 126 bytes away.
407 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
408 "dot" and "value". Allow relaxing if the target is 128 bytes
409 away since after relaxation it'll be 126 bytes away.
410 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
411 the given section until nothing changes.
413 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
415 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
416 alignment hack--we can get the lnnoptr info another way without
417 suddenly increasing the alignment requirements. Set the flags for
419 (ecoff_compute_section_file_positions): Do so.
421 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
423 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
424 to keep the HP emulator database happy.
426 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
427 From Kevin Buettner <kev@primenet.com>.
429 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
431 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
432 name of a NULL section.
434 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
436 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
437 set, always call the notice callback.
439 * VERSION: Increment for bfdlink.h change.
441 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
443 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
444 (sh_relax_delete_bytes): Correct handling of differently sized
445 trailing alignment reloc.
447 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
448 * bfd-in2.h: Rebuild.
449 * configure.in: Warn if there is no known 64 bit type.
450 * configure: Rebuild.
452 * Makefile.in: Rebuild dependencies.
453 (BFD32_BACKENDS): Add ppcboot.o.
454 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
456 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
457 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
459 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
461 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
462 (bfd_mips_elf64_swap_reginfo_out): Move from here...
463 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
464 (bfd_mips_elf64_swap_reginfo_out): ...to here.
466 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
468 * elf64-mips.c: Improve reloc special_functions and handling of
469 SHT_MIPS_OPTIONS section.
470 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
471 mips_elf_hi16_reloc and make globally visible.
472 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
473 make globally visible.
474 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
475 make globally visible.
476 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
477 and make globally visible.
478 (gprel16_with_gp): Check howto->src_mask before using value in
480 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
481 and make globally visible.
482 (gprel32_with_gp): Check howto->src_mask before fetching value.
483 (bfd_mips_elf_swap_options_in): New function.
484 (bfd_mips_elf_swap_options_out): New function.
485 (_bfd_mips_elf_set_private_flags): Rename from
486 mips_elf_set_private_flags and make globally visible.
487 (_bfd_mips_elf_copy_private_bfd_data): Rename from
488 mips_elf_copy_private_bfd_data and make globally visible.
489 (_bfd_mips_elf_merge_private_bfd_data): Rename from
490 mips_elf_merge_private_bfd_data and make globally visible.
491 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
492 for a SHT_MIPS_OPTIONS section.
493 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
494 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
495 name of a SHT_MIPS_OPTIONS section.
496 (_bfd_mips_elf_set_section_contents): New function.
497 (mips_elf32_section_processing): Set the GP value in a
498 SHT_MIPS_OPTIONS section.
499 (_bfd_mips_elf_find_nearest_line): Rename from
500 mips_elf_find_nearest_line and make globally visible.
501 (bfd_elf32_set_section_contents): Define.
502 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
503 (_bfd_mips_elf_lo16_reloc): Declare.
504 (_bfd_mips_elf_gprel16_reloc): Declare.
505 (_bfd_mips_elf_got16_reloc): Declare.
506 (_bfd_mips_elf_gprel32_reloc): Declare.
507 (_bfd_mips_elf_set_private_flags): Declare.
508 (_bfd_mips_elf_copy_private_bfd_data): Declare.
509 (_bfd_mips_elf_merge_private_bfd_data): Declare.
510 (_bfd_mips_elf_find_nearest_line): Declare.
511 (_bfd_mips_elf_set_section_contents): Declare.
513 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
515 (elf_info_to_howto): Define.
516 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
518 (elf_info_to_howto): Define.
519 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
521 (elf_info_to_howto): Define.
523 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
524 R_MOV16B[12], to match change in coff/internal.h.
526 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
528 * elf64-mips.c: Extensive additions to provide better support for
529 writing files and for gas.
530 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
531 of mips_elf_object_p.
532 (mips_elf32_object_p): Rename from mips_elf_object_p; call
533 _bfd_mips_elf_object_p.
534 (_bfd_mips_elf_final_write_processing): Rename from
535 mips_elf_final_write_processing and make globally visible.
536 (_bfd_mips_elf_fake_sections): Rename from
537 mips_elf_fake_sections and make globally visible.
538 (_bfd_mips_elf_section_from_bfd_section): Rename from
539 mips_elf_section_from_bfd_section and make globally visible.
540 (_bfd_mips_elf_section_processing): New function, broken out of
541 mips_elf_section_processing.
542 (mips_elf32_section_processing): Rename from
543 mips_elf_section_processing; call
544 _bfd_mips_elf_section_processing.
545 (_bfd_mips_elf_symbol_processing): Rename from
546 mips_elf_symbol_processing and make globally visible.
547 (_bfd_mips_elf_read_ecoff_info): Rename from
548 mips_elf_read_ecoff_info and make globally visible.
549 (mips_elf32_ecoff_debug_swap): Rename from
550 mips_elf_ecoff_debug_swap.
551 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
552 struct symbol_cache_entry.
553 (_bfd_elf_validate_reloc): New function, moved in from
554 elfcode.h:validate_reloc.
555 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
556 to _bfd_elf_validate_reloc. Change all callers.
557 * elf-bfd.h (bfd_section_from_shdr): Declare.
558 (_bfd_elf_symbol_from_bfd_symbol): Declare.
559 (_bfd_elf_validate_reloc): Declare.
560 (_bfd_mips_elf_object_p): Declare.
561 (_bfd_mips_elf_fake_sections): Declare.
562 (_bfd_mips_elf_section_from_bfd_section): Declare.
563 (_bfd_mips_elf_section_processing): Declare.
564 (_bfd_mips_elf_symbol_processing): Declare.
565 (_bfd_mips_elf_read_ecoff_info): Declare.
566 (_bfd_mips_elf_final_write_processing): Declare.
567 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
570 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
571 (mips_elf_final_write_processing): Likewise.
573 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
575 64-bit MIPS ELF ABI objdump support:
576 * elf64-mips.c: New file.
577 * Makefile.in: Rebuild dependencies.
578 (BFD64_BACKENDS): Add elf64-mips.o.
579 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
580 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
581 bfd_elf64_littlemips_vec to targ_selvecs.
582 (mips*-*-elf*): Likewise.
583 * confingure.in: Add bfd_elf64_bigmips_vec and
584 bfd_elf64_littlemips_vec to vector switch.
585 * configure: Rebuild.
586 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
587 broken out of mips_elf_section_from_shdr.
588 (mips_elf32_section_from_shdr): Rename from
589 mips_elf_section_from_shdr. Call new function.
590 (elf_backend_section_from_shdr): Update name of renamed function.
591 * elf-bfd.h (struct elf_size_info): Change second parameter of
592 write_out_phdrs to be const. Likewise for second parameter of
594 (struct bfd_elf_section_data): Add rel_hdr2 field.
595 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
596 (bfd_elf32_swap_symbol_out): Likewise.
597 (bfd_elf32_swap_reloc_in): Likewise.
598 (bfd_elf32_swap_reloc_out): Likewise.
599 (bfd_elf32_swap_reloca_in): Likewise.
600 (bfd_elf32_swap_reloca_out): Likewise.
601 (bfd_elf32_swap_phdr_in): Likewise.
602 (bfd_elf32_swap_phdr_out): Likewise.
603 (bfd_elf32_swap_dyn_in): Likewise.
604 (bfd_elf32_swap_dyn_out): Likewise.
605 (bfd_elf32_slurp_symbol_table): Declare.
606 (bfd_elf32_write_shdrs_and_ehdr): Declare.
607 (bfd_elf32_write_out_phdrs): Declare.
608 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
609 (bfd_elf64_swap_symbol_out): Likewise.
610 (bfd_elf64_swap_reloc_in): Likewise.
611 (bfd_elf64_swap_reloc_out): Likewise.
612 (bfd_elf64_swap_reloca_in): Likewise.
613 (bfd_elf64_swap_reloca_out): Likewise.
614 (bfd_elf64_swap_phdr_in): Likewise.
615 (bfd_elf64_swap_phdr_out): Likewise.
616 (bfd_elf64_swap_dyn_in): Likewise.
617 (bfd_elf64_swap_dyn_out): Likewise.
618 (bfd_elf64_slurp_symbol_table): Declare.
619 (bfd_elf64_write_shdrs_and_ehdr): Declare.
620 (bfd_elf64_write_out_phdrs): Declare.
621 (_bfd_mips_elf_section_from_shdr): Declare.
622 * elf.c (bfd_section_from_shdr): Remove assertion requiring
623 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
624 section for the section, add the new one to rel_hdr2. Increment
625 reloc_count rather than setting it.
626 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
627 Remove static declaration.
628 (elf_write_shdrs_and_ehdr): Define name as macro.
629 (elf_write_out_phdrs): Likewise.
630 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
631 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
632 (elf_swap_symbol_in): Change second parameter to be const.
633 (elf_swap_symbol_out): Likewise.
634 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
635 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
636 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
637 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
638 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
639 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
640 parameter to be const. Make non-static.
641 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
643 (elf_slurp_symbol_table): Make non-static.
644 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
645 * elfxx-target.h (elf_info_to_howto): Define if not defined.
646 (elf_backend_size_info): Likewise.
647 (elfNN_bed): Use elf_backend_size_info.
648 * targets.c (bfd_elf64_bigmips_vec): Declare.
649 (bfd_elf64_littlemips_vec): Declare.
650 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
651 bfd_elf64_littlemips_vec if BFD64 is defined.
653 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
655 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
657 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
658 zeroes, in alignment holes.
660 * configure: Rebuild with autoconf 2.10.
662 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
663 potential leading underscore in the allocated buffer.
665 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
667 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
668 symbols into .sbss if this is a relocatable link.
670 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
672 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
673 undefined symbols when creating a shared library.
675 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
677 * coff-sh.c: Add a bunch of new code and static const arrays to
678 support aligning loads and stores on four byte memory boundaries.
680 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
682 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
684 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
687 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
689 * cache.c (bfd_open_file): Unlink the file before opening it for
690 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
692 * opncls.c (bfd_fdopenr): Set opened_once.
694 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
696 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
699 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
700 the code unconditionally.
702 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
704 * libcoff-in.h (struct pei_section_tdata): Define structure.
705 (pei_section_data): Define macro.
706 * libcoff.h: Rebuild.
707 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
708 store s_paddr field in pei_section_data.
709 (coff_compute_section_file_positions): Use pei_section_data rather
710 than _cooked_size, and don't overwrite an existing value.
711 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
712 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
713 * peicode.h (coff_bfd_copy_private_section_data): Define if
715 (pe_bfd_copy_private_section_data): New static function if
718 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
720 * srec.c (srec_set_arch_mach): Write as a function rather than a
723 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
724 no map, just check each member in turn to see whether it is
727 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
729 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
730 table. Call BFD_ASSERT to validate header size, instead of
732 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
735 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
737 * ppcboot.c: New target for looking at PPCbug boot records.
739 * config{ure.in,.bfd}: Add support for ppcboot target.
741 * configure: Regenerate.
743 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
745 * coff-h8300.c (howto_table): Update names to match recent
746 changes to include/coff/internal.h. Fix minor errors in the
747 existing relocs. Add R_MOVL1 and R_MOVL2.
748 (rtype2howto): Similarly.
749 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
750 existing relaxing code and peform more relaxing.
751 (h8300_reloc16_extra_cases): Likewise.
753 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
755 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
758 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
760 * elfcode.h (elf_object_p): Reject generic ELF target if
761 e_machine matches an alternate machine code in a specific backend.
763 * netbsd-core.c (netbsd_core_vec): Remove initializer for
764 obsolete align_power_min field.
766 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
768 * coff-h8300.c (reloc_howto_type): Add howto entry for
770 (rtype2howto): Handle R_PCRWORD_B.
771 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
772 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
773 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
776 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
778 * aoutx.h (translate_from_native_sym_flags): Set the section for
779 BSF_CONSTRUCTOR symbols.
781 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
784 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
786 * coffcode.h (coff_write_object_contents): In comdat section lookup,
787 stop looking when section is found.
789 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
791 * coffcode.h (STRING_SIZE_SIZE): Define.
792 (styp_to_sec_flags): Handle long symbol names when looking for the
794 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
795 (bfd_coff_long_section_names): Define.
796 (coff_write_object_contents): Handle long section names.
797 (bfd_coff_std_swap_table): Initialize new field.
798 * libcoff.h: Rebuild.
799 * coffgen.c (make_a_section_from_file): Handle long section
801 (coff_write_symbols): Handle long section names.
802 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
803 * coff-mips.c (mips_ecoff_backend_data): Likewise.
804 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
805 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
806 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
807 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
808 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
809 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
811 * bout.c (b_out_callback): Set lma of sections.
812 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
813 parameter to output_bfd. Used input_bfd instead of output_bfd in
816 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
818 * aoutx.h (translate_from_native_sym_flags): Don't create
819 SEC_CONSTRUCTOR sections.
820 * ecoff.c (ecoff_set_symbol_info): Likewise.
822 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
823 From Don Bowman <bowman@waterloo.hp.com>.
825 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
827 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
828 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
830 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
832 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
833 mips_32_relocs field.
834 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
835 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
836 relocs against a global symbol which is not defined in a regular
838 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
839 against a global symbol, increment mips_32_relocs.
840 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
841 the symbol is not defined in a regular file, make room in the
844 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
846 * ecoff.c (ecoff_compute_section_file_positions): Track the real
847 file position and the virtual file position separately. Set
848 filepos information bsaed on the real file position.
849 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
850 Jan 23 change to coffcode.h.
852 * som.c (som_slurp_symbol_table): Set the symbol count to the
853 number of BFD symbols created.
855 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
857 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
858 output file if linking shared objects. Loop to check all relocs,
859 rather than returning false on first error.
861 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
863 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
864 (ppc_elf_additional_program_headers): If .interp section, bump #
865 of program headers by 1.
866 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
867 (ppc_elf_size_dynamic_sections): Add support for .plt section.
868 (ppc_elf_check_relocs): Print out filename in debug code. Enable
870 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
872 (ppc_elf_relocate_section): If the output section isn't defined,
873 don't abort, just give an error message.
875 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
876 being created is .sdata or .sdata2, don't make the symbol dynamic.
878 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
880 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
881 members of an archive for dynamic objects with no symbols, and
882 pass them directly to check_archive_element.
883 (xcoff_link_check_ar_symbols): Pass dynamic objects to
884 xcoff_link_check_dynamic_ar_symbols.
885 (xcoff_link_check_dynamic_ar_symbols): New static function.
887 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
888 from _bfd_nodynamic to _bfd_xcoff.
889 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
891 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
892 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
893 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
894 * libcoff.h: Rebuild.
895 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
896 (xcoff_get_section_contents): New static function.
897 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
898 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
899 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
900 (xcoff_dynamic_reloc): New static variable.
901 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
902 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
904 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
906 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
907 if reloc_entry->addend is not 0.
908 (CALC_ADDEND): Just set the addend to reloc.r_offset.
910 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
912 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
914 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
915 Add entries for R_SPARC_[56].
916 (sparc_reloc_map): Add entries for R_SPARC_[56].
918 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
920 Optimize linking of stabs in sections as used in ELF and COFF.
922 * libbfd-in.h (_bfd_link_section_stabs): Declare.
923 (_bfd_write_section_stabs): Declare.
924 (_bfd_write_stab_strings): Declare.
926 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
927 (struct coff_link_hash_table): Add stab_info field.
928 * libcoff.h: Rebuild.
929 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
931 (coff_link_add_symbols): Call _bfd_link_section_stabs if
933 (_bfd_coff_final_link): Write out stab strings hash table.
934 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
935 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
937 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
938 (struct bfd_elf_section_data): Add stab_info field.
939 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
941 * elflink.h (elf_link_add_object_symbols): If appropriate, call
942 _bfd_link_section_stabs.
943 (elf_bfd_final_link): Write out stab strings hash table.
944 (elf_link_input_bfd): Handle optimized stabs sections.
945 * reloc.c (_bfd_final_link_relocate): Check address against
946 _raw_size rather than _cooked_size.
947 * Makefile.in: Rebuild dependencies.
948 (BFD_LIBS): Add stabs.o
949 (BFD_LIBS_CFILES): Add stabs.c.
951 * VERSION: Increment for bfdlink.h change.
953 * coffgen.c (coff_renumber_symbols): Correct handling of
954 BSF_NOT_AT_END common symbols.
956 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
958 * coff-ppc.c (record_toc): Add cast to avoid warning.
959 (ppc_allocate_toc_section): Likewise.
960 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
961 (ppc_coff_reloc_type_lookup): Remove unreached code.
962 * coffcode.h (coff_write_object_contents): Don't take the address
964 * peicode.h (pe_print_idata): Add casts to avoid warning.
965 (pe_print_edata): Likewise.
966 (pe_print_reloc): Remove ANSI C string concatenation.
968 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
970 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
972 * libcoff.h: Rebuild.
973 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
975 (coff_swap_aux_out): Likewise.
976 * peicode.h (coff_swap_aux_in): Likewise.
977 (coff_swap_aux_out): Likewise.
978 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
980 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
982 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
983 Fix up .bf endndx link fields.
984 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
986 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
989 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
991 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
992 on Solaris PowerPC systems doesn't get confused.
994 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
997 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
998 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
999 update did_reg and did_reg2.
1001 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
1003 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
1005 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
1006 callback routines, pass h->root.string rather than name, in case
1007 copy is true and name is transient.
1009 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
1011 * elfcore.h: Add support for core files with multiple threads.
1012 (Primarily for Solaris.)
1014 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1016 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
1017 section->orelocation is NULL.
1019 * coffgen.c (bfd_coff_get_syment): New function.
1020 (bfd_coff_get_auxent): New function.
1021 * bfd-in.h (bfd_coff_get_syment): Declare.
1022 (bfd_coff_get_auxent): Declare.
1023 * bfd-in2.h: Rebuild.
1025 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
1027 * elf32-mips.c (struct mips_hi16): Define.
1028 (mips_hi16_addr, mips_hi16_addend): Remove.
1029 (mips_hi16_list): New static variable.
1030 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
1031 (mips_elf_lo16_reloc): Process mips_hi16_list.
1032 (mips_elf_relocate_section): Permit an arbitrary number of HI16
1033 relocs before the associated LO16 reloc.
1035 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1037 * versados.c (versados_scan): Check bfd_alloc return value.
1038 (versados_object_p): Check all bfd_read return values. Require
1039 that lang field be less than 10, to avoid confusion with Intel Hex
1042 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
1044 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
1045 not 0, for an absolute symbol.
1046 (NAME(aout,swap_ext_reloc_out)): Likewise.
1048 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1049 (ihex_write_object_contents): For a large start address, output
1050 the full 32 bit address in record type 5.
1052 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1053 to int to avoid promotion problems in prototype.
1055 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1057 * configure.host: Use ${srcdir} when looking for picfrag.
1059 * configure.host: Switch on ${libdir}, not $(libdir). From
1060 alan@spri.levels.unisa.edu.au (Alan Modra).
1062 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1063 entry point, not just for DYNAMIC objects.
1064 * sunos.c (sunos_add_dynamic_symbols): Always call
1065 sunos_create_dynamic_sections. If called with a non DYNAMIC
1066 object, don't do anything else.
1067 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1069 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1071 * configure.in: Permit --enable-shared to specify a list of
1073 * configure: Rebuild.
1075 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1076 host when configuring with --enable-shard.
1078 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1080 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1083 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1084 to avoid crashing in bfd_hash_replace.
1086 * sysdep.h: Use #ifdef, not #if.
1088 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1090 * config.in: Rebuild.
1092 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1094 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1095 (AC_CHECK_HEADERS): Check for sys/time.h
1096 (AC_HEADER_TIME): Add macro.
1097 * configure: Rebuild.
1098 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1099 to control what combination of <time> and <sys/time.h>
1102 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1104 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1105 (aout_32_sunos4_write_object_contents): Likewise.
1106 * aoutx.h (NAME(aout,machine_type)): Handle
1107 bfd_mach_sparc_{sparclet,sparclite}.
1108 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1109 (bfd_mach_sparc_v9_p): Update.
1110 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1111 * libaout.h (enum machine_type): Add M_SPARCLET.
1112 * sunos.c (MACHTYPE_OK): Define.
1113 * bfd-in2.h: Regenerated.
1115 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1117 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1118 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1119 * elflink.c (_bfd_elf_create_got_section): Store the
1120 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1121 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1122 global offset table goes over 0x1000, set the value of
1123 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1124 (elf32_sparc_relocate_section): Subtract the offset of
1125 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1127 * elfcode.h: Don't include <string.h>.
1129 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1131 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1132 generic_link_hash_newfunc. All references changed.
1133 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1134 moved here from libbfd-in.h.
1135 * libbfd-in.h: Corresponding changes.
1136 * libbfd.h: Regenerated.
1138 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1140 * aoutx.h (aout_link_input_section_std): When reporting an
1141 overflow error, use the name of the symbol in the hash table if
1143 (aout_link_input_section_ext): Likewise.
1145 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1146 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1148 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1150 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1151 * coffcode.h (coff_compute_section_file_positions): Likewise.
1152 (coff_write_object_contents): Likewise.
1154 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1156 * section.c (SEC_LINK_ONCE): Define.
1157 (SEC_LINK_DUPLICATES): Define.
1158 (SEC_LINK_DUPLICATES_DISCARD): Define.
1159 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1160 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1161 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1162 * bfd-in2.h: Rebuild.
1163 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1164 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1165 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1166 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1167 SEC_LINK_ONCE, and look through the symbol table for the setting
1168 for SEC_LINK_DUPLICATES.
1169 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1170 set for a section, find the section symbol in the symbol table,
1171 and set the aux entry based on SEC_LINK_DUPLICATES.
1172 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1173 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1174 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1175 * coff-i386.c (i386coff_vec): Likewise.
1176 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1178 * VERSION: Bump to 2.6.1.
1179 * Makefile.in (stamp-h): Depend upon VERSION.
1181 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1183 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1184 * libbfd.h: Rebuilt.
1185 * linker.c (generic_link_hash_newfunc): No longer static.
1186 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1188 * coff-h8300.c: Add two derived hash tables and their associated
1189 funtions and #defines for use by the h8300 linker.
1190 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1191 the function vector as needed. Place the address of the function
1192 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1193 Rewrite the vectors section contents as necessary.
1194 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1195 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1196 (coff_bfd_link_hash_table_create): Likewise.
1198 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1200 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1201 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1203 (hppa_rebuild_insn): Pass pointer to correct type to
1204 low_sign_unext and dis_assemble_21.
1206 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1208 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1209 Stick with sparc-*-{sysv4*,solaris2*}.
1211 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1213 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1214 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1215 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1216 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1217 fields is non-zero, print them.
1219 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1220 ifdef. Remove unused variables.
1221 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1223 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1224 (get_symbol_value): Ifdef out.
1225 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1226 (coff_ppc_relocate_section): Remove unused variables. Make
1227 fprintf strings and argument types correspond. Put before_addr in
1229 (dump_toc): Make fprintf strings and argument types correspond.
1230 (ppc_process_before_allocation): Remove unused variables. Always
1232 (ppc_reflo_reloc): Ifdef out.
1233 (ppc_addr32nb_reloc): Ifdef out.
1234 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1236 (coff_ppc_rtype_to_howto): Likewise.
1237 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1239 * peicode.h (pe_print_idata): Move otherwise unused variables into
1240 the #ifdef where they are used. Always return a value.
1241 (pe_print_edata): Make fprintf strings and argument types
1242 correspond. Always return a value.
1243 (pe_print_pdata): Removed unused variable addr_value. Always
1245 (pe_print_reloc): Remove unused variable onaline. Make fprintf
1246 strings and argument types correspond. Always return a value.
1248 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1249 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1250 variable rela inside #if 0 section where it is used.
1252 * ns32k.h: New file.
1253 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1254 functions to start with _bfd_.
1255 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1256 functions in cpu-ns32k.h.
1257 * Makefile.in: Rebuild dependencies.
1258 (HFILES): Add ns32k.h.
1260 * section.c (struct sec): Add linker_mark field. Change
1261 user_set_vma and reloc_done to be single bit fields.
1262 (STD_SECTION): Update accordingly.
1263 * bfd-in2.h: Rebuild.
1264 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1266 (aout_link_input_bfd): Don't link unmarked sections.
1267 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1269 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1270 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1272 * elflink.h (elf_bfd_final_link): Mark sections included in the
1274 (elf_link_input_bfd): Don't link unmarked sections.
1275 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1277 (xcoff_link_input_bfd): Don't link unmarked sections.
1279 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1280 overflow error messages.
1282 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1284 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1285 is not set, print "BFD: " before the error message.
1287 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1288 Miles Bader <miles@gnu.ai.mit.edu>.
1289 * configure: Rebuild.
1291 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1293 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1296 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1297 m68k-aout, m68k-coff, and m68k-elf targets.
1299 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1301 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1302 (ieee_generic_stat_arch_elt): Restructured to prevent
1303 ieee_object_p from being called repeatedly.
1305 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1307 * coffcode.h (coff_write_object_contents): Allocate
1308 buffers large enough for any FILEHDR or AOUTHDR.
1310 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1312 * ecofflink.c (lookup_line): New static function, renamed and
1313 slighly changed from old _bfd_ecoff_locate_line.
1314 (_bfd_ecoff_locate_line): Cache line number information. Use
1315 lookup_line for actual lookup.
1317 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1319 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1320 multiple of 20 bytes.
1322 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1324 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1325 allocate ecoff_find_line, and don't initialize by hand.
1326 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1327 mips_elf_find_line, and don't call memset.
1329 * coffcode.h (coff_compute_section_file_positions): If not
1330 producing a final executable, don't consider sofar when aligning
1331 the section to the correct size.
1333 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1335 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1336 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1337 * coffgen.c (coff_section_symbol): Ifdef out.
1339 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1341 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1342 output_bfd is not NULL.
1344 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1346 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1347 of bfd_alloc (fixes fix_line not being initialized).
1348 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1350 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1352 * coffcode.h: Allow specific backends to override the
1353 bfd_link_add_symbols routine.
1355 * coff-h8300.c: Include genlink.h.
1356 (howto_table): Add R_MEM_INDIRECT.
1357 (rtype2howto): Support R_MEM_INDIRECT.
1358 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1361 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1363 * coff-alpha.c (alpha_relocate_section): Use
1364 info->callbacks_warning, rather than _bfd_error_handler, for
1365 "multiple gp" warning.
1367 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1369 * linker.c (bfd_wrapped_link_hash_lookup): New function.
1370 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
1371 table string. Use bfd_wrapped_link_hash_lookup.
1372 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
1374 * aoutx.h (aout_link_write_symbols): Use the name from the hash
1375 table, if any, when writing out symbols.
1376 (aout_link_input_section_std): Use the name from the hash table,
1377 if any, when reporting undefined symbols.
1378 (aout_link_input_section_ext): Likewise.
1379 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
1380 * bout.c (get_value): Likewise.
1381 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1382 * ecoff.c (ecoff_reloc_link_order): Likewise.
1383 * elflink.h (elf_link_add_object_symbols): Likewise.
1384 (elf_reloc_link_order): Likewise.
1385 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1386 (_bfd_generic_reloc_link_order): Likewise.
1387 (default_indirect_link_order): Likewise.
1388 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1389 * sunos.c (sunos_add_one_symbol): Likewise.
1390 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1391 (bfd_xcoff_link_count_reloc): Likewise.
1392 (xcoff_reloc_link_order): Likewise.
1394 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
1395 into -1 for intern->rss.
1397 * configure: Rebuild with autoconf 2.8.
1399 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
1401 * stab-syms.c (__define_stab_duplicate): Define.
1402 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
1404 * bfd-in.h (bfd_get_stab_name): Declare.
1405 * bfd-in2.h: Rebuild.
1406 * Makefile.in: Rebuild dependencies.
1407 (BFD_LIBS): Add stab-syms.o.
1408 (BFD_LIBS_CFILES): Add stab-syms.c.
1409 (BFD32_BACKENDS): Remove stab-syms.o.
1410 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
1411 * configure.in: Don't list stab-syms.o in bfd_backends.
1412 * configure: Rebuild.
1413 * libaout.h (aout_stab_name): Don't declare.
1414 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
1417 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
1419 * elf.c (assign_file_positions_for_segments): Adjust file offset
1420 for section alignment even if SEC_LOAD is not set.
1422 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
1424 * configure.in: Don't set SHLIB or SHLINK to an empty string,
1425 since they appear as targets in Makefile.in.
1426 * configure: Rebuild.
1428 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
1429 don't fiddle with a symbol which is not defined anywhere.
1431 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
1433 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
1434 though they are defined in a shared library.
1435 (xcoff_build_ldsyms): Likewise.
1437 * coffgen.c (coff_find_nearest_line): Don't look at the line
1438 numbers for the section if section->lineno is NULL.
1440 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
1441 message rather than calling BFD_ASSERT.
1442 * elfcode.h (write_relocs): Check return value of
1443 _bfd_elf_symbol_from_bfd_symbol.
1445 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1447 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
1450 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
1452 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
1454 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
1455 hppa_reloc_field_selector_type_alt.
1456 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
1457 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
1459 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
1461 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
1463 * elf.c (assign_file_positions_for_segments): Adjust the segment
1464 memory size for the alignment of a SEC_ALLOC section, not just a
1467 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1469 * m68klinux.c: New file.
1470 * hosts/m68klinux.h: New file.
1471 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
1472 * configure.in (m68*-*-linux*): New native host.
1473 (m68klinux_vec): New vector.
1474 * configure: Rebuild.
1475 * targets.c (m68klinux_vec): Declare.
1476 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
1477 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
1478 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
1479 declaration from bfd_linux_size_dynamic_sections.
1480 (bfd_m68klinux_size_dynamic_sections): Declare.
1481 * bfd-in2.h: Rebuild.
1482 * Makefile.in: Rebuild dependencies.
1483 (BFD32_BACKENDS): Add m68klinux.o.
1484 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
1486 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
1488 * libhppa.h (pa_arch): Add pa20.
1489 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
1490 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
1491 (hppa_field_adjust): Handle e_nsel.
1492 * som.c: Provide default definitions for many new relocs found only
1493 in hpux10 include files.
1494 (som_fixup_formats): Add several new relocs from hpux10.
1495 (som_hppa_howto_table): Add hpux10 relocs.
1496 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
1498 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
1500 * mpw-make.sed: Edit out recent shared library support, and
1501 rules to rebuild .h files using doc/chew.
1503 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
1505 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
1506 size even of sections with no contents.
1508 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
1510 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1511 starting with '$' the way we skip names starting with '.'. When
1512 updating x_endndx, don't be fooled by an index which has been
1515 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1516 struct/union/enum type with no elements.
1518 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
1520 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1522 * archive.c (bfd_generic_archive_p): If the first file in the
1523 archive can not be recognized as an object, don't assume that this
1524 is the wrong format.
1526 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1527 format is not bfd_object.
1528 (bfd_elf_get_dt_soname): Likewise.
1530 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
1532 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1535 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1537 * bfd.c (tdata): Add netbsd_core_data.
1538 * bfd-in2.h: Regenerated.
1540 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
1542 * sunos.c (SUNOS_CONSTRUCTOR): Define.
1543 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1544 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
1547 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1548 to get the symbol index, matching 14 Jul 95 change.
1550 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
1552 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1553 Remove duplicate definition of gp.
1555 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
1557 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1558 assume that we can set the GP value and then get the same value,
1559 since it won't be true if the output file is neither ELF nor
1561 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1562 _bfd_get_gp_value here.
1563 (mips_gprel_reloc): Don't assume we can set and get the GP value.
1564 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1566 (mips_elf_lo16_reloc): Likewise.
1567 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
1568 Don't require that the BFD be ELF.
1569 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1570 (mips_elf_gprel32_reloc): Likewise.
1571 (mips_elf_relocate_section): Don't assume we can set and get the
1573 (mips_elf_finish_dynamic_symbol): Don't bother to use
1574 _bfd_get_gp_value here.
1576 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1577 Don't change epdr between malloc and free. Be careful not to free
1578 NULL pointers. Zero out the first RPDR.
1580 * configure.host: On Linux, only pass -rpath option if $(libdir)
1581 is neither /lib nor /usr/lib. From Alan Modra
1582 <alan@mullet.Levels.UniSA.Edu.Au>.
1584 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1586 (elf_dt_name): Rename from elf_dt_needed_name.
1587 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1589 (bfd_elf_get_dt_soname): New function.
1590 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1591 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1592 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1593 * bfd-in2.h: Rebuild.
1595 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1597 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1598 _bfd_sparc_elf_reloc_type_lookup.
1599 (bfd_elf32_bfd_reloc_type_lookup): Update.
1600 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1601 (sparc64_elf_howto_table): Define.
1602 (sparc_reloc_map): Define.
1603 (sparc64_elf_reloc_type_lookup): New function.
1604 (sparc_elf_wdisp16_reloc): New function.
1605 (elf_info_to_howto): Use sparc64_elf_howto_table.
1606 (sparc64_elf_relocate_section): Likewise.
1607 (bfd_elf64_bfd_reloc_type_lookup): Update.
1609 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1611 * configure.host: Check for 'do not mix' from native linker before
1612 trying to use -rpath.
1614 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1616 * bfd.c (_bfd_get_gp_value): New function.
1617 (_bfd_set_gp_value): New function.
1618 * libbfd-in.h (_bfd_get_gp_value): Declare.
1619 (_bfd_set_gp_value): Declare.
1620 * libbfd.h: Rebuild.
1621 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1622 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1623 directly to the fields in the tdata information.
1624 (alpha_relocate_section): Likewise.
1625 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1626 (mips_gprel_reloc): Likewise.
1627 (mips_relocate_section): Likewise.
1628 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1629 (mips_elf_lo16_reloc): Likewise.
1630 (mips_elf_final_gp): Likewise.
1631 (mips_elf_gprel16_reloc): Likewise.
1632 (mips_elf_gprel32_reloc): Likewise.
1633 (mips_elf_relocate_section): Likewise.
1634 (mips_elf_finish_dynamic_symbol): Likewise.
1636 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1638 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1640 * configure.in: Call AC_PROG_CC before configure.host.
1641 * configure: Rebuild.
1642 * configure.host: Don't set information which autoconf should
1643 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1645 * configure.host: Remove go32 and win32 host information, since it
1646 should no longer be needed.
1648 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1649 then start a new segment rather than put a writable section in a
1652 * configure.host: Set RPATH_ENVVAR.
1654 * Makefile.in: Rebuild dependencies.
1656 * elflink.c (_bfd_elf_create_linker_section): Remove unused
1657 zero_section variable.
1659 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
1661 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1662 ($(srcdir)/libbfd.h): Rename from libbfd.h.
1663 ($(srcdir)/libcoff.h): Rename from libcoff.h.
1665 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
1667 * ieee.c (ieee_write_expression): Only use an R variable for a
1668 local symbol. Don't output a zero offset. Handle a zero address.
1669 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1670 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1672 (parse_expression): Don't try to handle multiple occurrences of a
1673 P variable. Handle I variables differently from X variables. Fix
1674 the order of minus expressions.
1675 (ieee_slurp_external_symbols): Generate an I variable for an NN
1676 record. Fix handling of ATI and ATX records.
1677 (ieee_slurp_sections): Only set minimal section attributes.
1678 Adjust them later, based on the section contents.
1679 (ieee_object_p): Read in the file until just after the ME record.
1680 Call ieee_slurp_section_data to set the section flags.
1681 (do_one): Add iterations parameter. Only repeat the first load
1682 item. Set the section and file reloc flags.
1683 (ieee_slurp_section_data): Set section flags. Pass iterations to
1685 (ieee_canonicalize_reloc): Handle I variables.
1686 (do_with_relocs): Only emit relocation size when necessary.
1687 Increase MAXRUN to 127. Change ov to be assigned, and take
1688 src_mask and pcrel_offset into account.
1689 (ieee_write_data_part): Skip sections that are not loaded.
1690 (ieee_write_external_part): Don't output optional last entry of WX
1692 (ieee_write_me_part): Make setting of me_record neater.
1693 (ieee_generic_stat_arch_elt): Get the size of an archive element.
1695 * syms.c (stt): Add entries for zerovars, vars, and code.
1697 * elfcode.h (validate_reloc): New static function.
1698 (write_relocs): Call validate_reloc for non ELF relocs.
1700 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1701 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1702 (TARGET_LITTLE_SYM): Likewise.
1704 * config.bfd (m68*-*-psos*): New target.
1706 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
1708 * i386msdos.c: Remove some #if 0 code.
1709 (msdos_write_object_contents): Don't include empty sections in the
1710 size computation, regardless of their address.
1712 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1714 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1715 is NULL, ie, the -r switch is used.
1717 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
1719 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1720 (BFD_RELOC_MIPS_GOT_LO16): Define.
1721 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1722 * bfd-in2.h, libbfd.h: Rebuild.
1723 * elf32-mips.c (mips_reloc_map): Map new relocs.
1725 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1727 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1730 * ieee.c (get_symbol): Set the section to bfd_abs_section.
1731 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1732 simple number for the section address, rather than an expression.
1733 Limit the number of bytes between relocs to MAXRUN.
1734 (ieee_write_me_part): Set me_record to the file offset after the
1736 (ieee_write_processor): New static function.
1737 (ieee_write_object_contents): Use ieee_write_processor.
1739 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
1741 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1743 * coff-aux.c: Change include of aux.h to aux-coff.h.
1745 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1747 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1748 relocation put the addend both in the reloc entry and the data.
1749 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
1752 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1753 a R_68K_PCxx reloc against a defined global symbol directly.
1754 (elf_m68k_check_relocs): Don't count such a reloc.
1756 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1757 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
1758 symbol for now, otherwise always record the symbol as dynamic.
1759 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1760 is not referenced by a dynamic object, and we are not making a
1761 shared object, then don't make a PLT entry. If we do make a PLT
1762 entry, make sure the symbol has been recorded as dynamic.
1764 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
1766 * configure.host: When making a shared library, set HLDFLAGS to
1767 pass an appropriate -rpath option. Use the make variable SONAME
1768 as the shared library soname, rather than computing it here. On
1769 SunOS, build stamp-tshlink in place of $(SHLINK).
1770 * Makefile.in (SONAME): New variable.
1771 ($(SHLINK)): Make a link to the transformed name, as well.
1772 (stamp-tshlink): New target.
1773 (install): Skip stamp-tshlink during install.
1775 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1777 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1778 linker sections have been set up yet.
1780 * elf.c (make_mapping): Add an additional argument to suppress
1781 making the first section include the program headers.
1782 (map_sections_to_segments): If the user used -Ttext such that the
1783 program headers are on a different page, do not set the flags
1784 saying that this section includes the program headers.
1786 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1788 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1789 don't define TRAD_HEADER.
1790 * configure: Rebuild.
1792 * netbsd-core.c: New file, support for NetBSD core files.
1793 * hosts/*nbsd.h: Removed.
1795 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
1797 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1798 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1799 * libbfd.h, bfd-in2.h: Regenerated.
1800 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1801 bfd_elf32_bfd_reloc_type_lookup.
1802 (reloc_type{,_names}): Deleted.
1803 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1805 (sparc_reloc_map): Add sparc64 relocs.
1806 (sparc_elf_notsupported_reloc): New static function.
1807 (sparc_elf_wdisp16_reloc): New static function.
1808 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1809 (elf32_sparc_relocate_section): Likewise.
1810 (bfd_elf32_bfd_reloc_type_lookup): Define.
1811 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1812 (reloc_type{,_names}): Deleted.
1813 (elf_sparc_howto_table): Deleted.
1814 (sparc_reloc_map): Deleted.
1815 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1816 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1818 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
1820 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1823 * Makefile.in (program_transform_name): New variable.
1824 (install): Transform library name before installing it.
1826 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
1828 * archures.c (bfd_mach_i960_hx): Define.
1829 * bfd-in2.h: Rebuild.
1830 * cpu-i960.c (scan_960_mach): Accept machine "hx".
1831 (MATRIX): Expand entries for HX.
1832 (arch_info_struct): Add i960:hx entry.
1833 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1834 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1835 (coff_set_flags): Handle bfd_mach_i960_hx.
1837 Support for building as a shared library, based on patches from
1838 Alan Modra <alan@spri.levels.unisa.edu.au>:
1839 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1840 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1841 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1842 * configure: Rebuild.
1843 * configure.host: If --enable-shared, adjust shared library stuff
1844 based on the host. If the host is SunOS, and the linker supports
1845 -rpath, set HLDFLAGS to use it.
1846 * Makefile.in (ALLLIBS): New variable.
1847 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1848 (COMMON_SHLIB, SHLINK): New variables.
1849 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1850 (STAGESTUFF): Remove variable.
1851 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1853 (stamp-ofiles): New target, like old ofiles target, but build
1854 using a temporary file and move-if-change, and touch stamp-ofiles
1856 (ofiles): Just depend upon stamp-ofiles.
1857 (stamp-piclist, piclist): New targets.
1858 ($(SHLIB), $(SHLINK)): New targets.
1859 (targets.o, archures.o): Build twice if PICFLAG is set.
1860 (do_mostlyclean): Remove pic/*.o.
1861 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1863 (do_distclean): Remove pic and stamp-picdir.
1864 (install): Install shared libraries.
1865 ($(OFILES)): Depend upon stamp-picdir.
1866 (stamp-picdir): New target.
1868 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1870 * libcoff.h: Rebuild.
1872 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1873 flavour of a section with no owner.
1875 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1876 ELF_LINK_NON_ELF flag.
1877 (mips_elf_create_got_section): Likewise.
1879 * elf.c: Revert last change, since it breaks dynamic linking.
1880 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1882 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1883 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1884 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1886 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1888 * elf.c (assign_file_positions_for_segments): If the backend does
1889 not want the elf header or the program headers in the address
1890 space, do not include them in the calculations.
1892 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1893 function to determine if we need additional program headers.
1894 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1895 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1897 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1899 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1901 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1903 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1904 back into one line. Some compilers (sunos 4.1.3 for example)
1905 won't accept args split across more than one line.
1907 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1909 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1910 * configure: Regenerate.
1912 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1914 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1915 try to do arithmetic on a void *, cast it to a unsigned char * first.
1917 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1919 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1920 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1922 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1923 flag for a newly defined symbol.
1924 (NAME(bfd_elf,record_link_assignment)): Likewise.
1925 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1926 set the DEF or REF_REGULAR flags correctly.
1928 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1929 (libbfd.h, libcoff.h): Corresponding change.
1931 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1932 a PLT32 reloc as dynamic.
1933 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1934 is not referenced by a dynamic object, and we are not making a
1935 shared object, then don't make a PLT entry. If we do make a PLT
1936 entry, make sure the symbol has been recorded as dynamic.
1938 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1940 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1941 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1942 (powerpcle-*-cygwin32): New.
1943 * peicode.h (add_data_entry): Get address from vma.
1945 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1947 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1948 attached to the section has already been created as an undefined
1949 symbol, treat it as if it hasn't been created yet.
1951 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1953 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1954 symbol or section symbols if stripping all symbols and this is not
1955 a relocateable link. Don't output the symbol string table if
1956 there are no symbols.
1957 (elf_link_flush_output_syms): Don't do anything if there are no
1960 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1962 * coff-aux.c: New file.
1963 * hosts/m68kaux.h: New file.
1964 * config.bfd (m68*-apple-aux*): New target.
1965 * configure.in (m68*-apple-aux*): New native host.
1966 (m68kaux_coff_vec): New vector.
1967 * configure: Rebuild.
1968 * targets.c (m68kaux_coff_vec): Declare.
1969 * coffcode.h (bfd_coff_backend_data): Add field
1970 _bfd_coff_link_add_one_symbol.
1971 (bfd_coff_link_add_one_symbol): Define.
1972 (compare_arelent_ptr): New static function if TARG_AUX.
1973 (coff_write_relocs): If TARG_AUX, sort the relocs.
1974 (coff_write_object_contents): Set A/UX aouthdr magic number.
1975 (coff_link_add_one_symbol): Define if not defined.
1976 (bfd_coff_std_swap_table): Initialize new field.
1977 * libcoff.h: Rebuild.
1978 * cofflink.c (coff_link_add_symbols): Call
1979 bfd_coff_link_add_one_symbol rather than
1980 _bfd_generic_link_add_one_symbol.
1981 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1982 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1983 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1984 * Makefile.in: Rebuild dependencies.
1985 (BFD32_BACKENDS): Add coff-aux.o.
1986 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1988 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1990 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1991 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1993 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1995 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1996 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1997 (maintainer-clean): Warn about deleting special files.
1998 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
2000 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
2001 warning symbols correctly.
2002 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2003 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2004 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2005 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2006 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2007 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2009 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
2012 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
2014 * libcoff-in.h: aligned newly exported names with bfd naming
2015 conventions. Removed an erroneous define of POWERPC_LE_PE.
2016 * libcoff.h: Rebuild.
2017 * cofflink.c, coff-ppc.c: the above function name changes
2019 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
2021 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
2022 * ecoff.c (struct extsym_info): Define.
2023 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
2024 to ecoff_link_write_external.
2025 (ecoff_link_write_external): Accept a struct extsym_info pointer.
2026 Strip symbols when appropriate.
2028 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
2029 * syms.c (BSF_OBJECT): Define.
2030 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
2031 * bfd-in2.h: Rebuild.
2032 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
2034 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
2037 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
2038 copying relocs into a shared object, treat a defined global symbol
2040 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2041 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2042 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2044 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
2045 real defined symbol, not to a weak defined symbol.
2047 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2049 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2050 and made a few static functions externs.
2052 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2053 POWERPC_LE_PE hack in cofflink.
2055 * libcoff-in.h: promoted the following from cofflink.c to allow
2056 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2057 coff_debug_merge_element, struct coff_debug_merge_type,
2058 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2059 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2060 coff_debug_merge_hash_lookup, coff_link_section_info,
2061 coff_final_link_info, coff_debug_merge_hash_newfunc,
2062 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2064 * libcoff.h: re-gen'd
2066 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2068 * syms.c: Include "bfdlink.h".
2069 (struct stab_find_info): Define.
2070 (_bfd_stab_section_find_nearest_line): New function.
2071 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2072 * libbfd.h: Rebuild.
2073 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2074 * elf.c (_bfd_elf_find_nearest_line): Try calling
2075 _bfd_stab_section_find_nearest_line before searching the ELF
2076 symbol table. Find the closest STT_FUNC symbol, not the last one.
2077 * libcoff-in.h (coff_data_type): Add line_info field.
2078 * libcoff.h: Rebuild.
2079 * coffgen.c (coff_find_nearest_line): Try calling
2080 _bfd_stab_section_find_nearest_line before searching the COFF
2082 * Makefile.in: Rebuild dependencies.
2084 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2086 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2087 4 bytes, so we get the correct value when updating the register
2088 field in little endian mode.
2090 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2092 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2093 entry_section fields. Add sntoc and snentry fields.
2094 * libcoff.h: Rebuild.
2095 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2096 not toc_section and entry_section (the COFF file does not have any
2097 sections at this point).
2098 (coff_write_object_contents): Set o_snentry and o_sntoc from
2099 snentry and sntoc rather than entry_section and toc_section.
2100 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2101 snentry, not toc_section and entry_section.
2102 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2103 entry_section from hentry.
2104 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
2106 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2107 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2108 than using toc_section directly.
2110 * archures.c: Add missing `.' in enum bfd_architecture.
2111 * bfd-in2.h: Rebuild.
2113 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2114 Robert Lipe <robertl@arnet.com>.
2116 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2118 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2119 to sections we allocate. Use bfd_zalloc to allocate initialial
2120 sections, not bfd_alloc.
2121 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2122 SDA{,2}I16 relocations.
2123 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2124 whether to put something in .sbss or not.
2125 (ppc_elf_relocate_section): Add support for more relocations. Add
2126 in sec->output_offset where appropriate. Make error messages
2127 include the symbol name.
2129 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2130 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2131 doesn't get redefined messages if -shared.
2133 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2134 section if the rel_section field has been set up.
2136 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2138 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2141 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2143 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2144 of flags, only flags used are controlled by mach number. Bump up
2145 output file mach number to highest of input file mach numbers.
2146 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2147 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2149 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2150 bfd_elf64_sparc_vec support.
2152 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2154 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2155 the embedded bit is set on some objects and not on others. Just
2157 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2160 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2162 * coffcode.h (coff_new_section_hook): Don't try to align the
2165 * coffcode.h (coff_set_section_contents): Fix the handling of the
2166 .lib section to work even if the entire section contents are
2167 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2168 Robert Lipe <robertl@arnet.com>.
2170 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2172 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2173 memory here for contents.
2175 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2176 _SDA2_BASE_ by 32768.
2177 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2178 started using. Allocate contents for .sdata and .sdata2 sections
2180 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2182 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2183 size _SDA{,2}_BASE_.
2184 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2187 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2189 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2191 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
2192 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
2193 (bfd_mach_sparc_v9a): Define.
2194 (bfd_mach_sparc_v9_p): Define.
2195 * bfd-in2.h: Regenerated.
2196 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2198 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
2199 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2200 to bfd_elf32_sparc_vec.
2201 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
2202 Add v8plus{,a} support.
2204 (sparc_compatible): New function.
2205 * elf32-sparc.h: #include "elf/sparc.h".
2206 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
2207 elf32_sparc_final_write_processing): New functions.
2208 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
2209 elf_backend_final_write_processing): Define.
2211 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2213 * elf-bfd.h (struct elf_link_hash_entry): Add
2214 linker_section_pointer field.
2215 (enum elf_linker_section_enum): Enumeration for new way of
2216 creating linker dynamic sections and symbols.
2217 (elf_linker_section{,_pointers}): New structures for creating
2218 dynamic sections and symbols.
2219 (elf_obj_tdata): Add linker_section_pointers and linker_section
2221 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2222 (_bfd_elf_create_linker_section): New declarations.
2223 (_bfd_elf_find_pointer_linker_section): Ditto.
2224 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2225 (_bfd_elf_make_linker_section_rela): Ditto.
2227 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2229 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2230 (ppc_elf_create_linker_section): New function to create the
2231 sections .got, .sdata, and .sdata2.
2232 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2234 (ppc_elf_check_relocs): Support more of the eabi relocations.
2235 (ppc_elf_relocate_section): Ditto.
2236 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2237 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2239 * elflink.h (elf_create_pointer_linker_section): New function to
2240 create initialized pointers in dynamic linker sections.
2241 (elf_finish_pointer_linker_section): Actually intialize the
2242 pointers created above.
2244 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2245 macros to provide both 32 and 64 bit versions of
2246 elf_create_pointer_linker_section.
2247 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2248 provide both 32 and 64 bit versions of
2249 elf_finish_pointer_linker_section.
2251 * elflink.c (_bfd_elf_create_linker_section): New function to
2252 create a linker section.
2253 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2254 given address in the linker pointer offsets created for a given
2256 (_bfd_elf_make_linker_section_rela): Make a RELA section
2257 corresponding to the generated linker section.
2259 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2261 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2263 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2265 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2266 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2267 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2268 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2269 toc entry in an objdump) for now.
2270 (ppc_do_last, ppc_get_last): New function - needed to save processing
2271 the toc owner to the end.
2272 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2275 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2276 toc owner from being done till last. Must define POWERPC_LE_PC
2279 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2281 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2283 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2284 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2286 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2288 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2290 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2292 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2294 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2296 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2298 * elf.c (assign_file_positions_for_segments): Don't increment file
2299 offset for a segment which contains no loadable sections.
2301 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2303 * reloc.c: Add new PowerPC relocations.
2304 * {bfd-in2,libbfd}.h: Regenerate.
2306 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2307 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2309 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2311 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2314 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2317 * coffgen.c (coff_find_nearest_line): Don't try to cache
2318 information in sections that are not owned by a BFD. From Richard
2319 Henderson <richard@atheist.tamu.edu>.
2321 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2322 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2323 * elflink.h (elf_link_output_extsym): Remove special check for
2326 * ecoffswap.h: Add prototypes for static functions.
2328 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2330 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2331 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2333 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2334 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2335 support. Begin support for R_PPC_SDA{2,}REL.
2337 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2339 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2340 create the .got and .got.neg sections.
2341 (ppc_elf_size_dynamic_sections): Call it.
2342 (ppc_elf_check_relocs): Call it.
2343 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2344 (ppc_elf_check_relocs): Add error messages for relocations we
2345 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2348 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2350 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2351 section flags for V.4 and eabi.
2353 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2355 * elf.c (assign_file_positions_for_segments): If a segment
2356 contains no sections, don't mark it as readable.
2358 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2359 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2361 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2362 dynamic section, if there is one.
2363 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2364 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2365 (bfd_elf64_swap_dyn_in): Likewise.
2366 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2368 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2370 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
2371 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
2372 <pirker@eiunix.tuwien.ac.at>.
2374 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2376 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
2377 PowerPC V.4 and eabi.
2378 * bfd-in2.h: Regenerate.
2379 * libfd.h: Regenerate.
2381 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
2383 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
2384 section type and SHF_EXCLUDE section flag, turning them into the
2385 appropriate bfd section flag.
2387 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2389 * xcofflink.c (xcoff_link_add_symbols): Create the special
2390 sections if we see a DYNAMIC object, in case that is the only
2391 XCOFF input object we see.
2393 * elf32-mips.c: Extensive changes for a start at dynamic linking
2394 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2396 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
2397 (struct elf_backend_data): Remove
2398 elf_backend_create_program_headers field. Add
2399 elf_backend_additional_program_headers and
2400 elf_backend_modify_segment_map fields.
2401 * elfxx-target.h (elf_backend_type_change_ok): Define if not
2403 (elf_backend_additional_program_headers): Likewise.
2404 (elf_backend_modify_segment_map): Likewise.
2405 (elf_backend_create_program_headers): Don't define.
2406 (elfNN_bed): Change to account for field changes.
2407 * elf.c (assign_file_positions_for_segments): Call new
2408 modify_segment_map backend function. Don't call old
2409 create_program_headers backend function.
2410 (get_program_header_size): Call additional_program_headers rather
2411 than create_program_headers.
2412 * elflink.h (elf_link_add_object_symbols): Initialize
2413 type_change_ok from new backend field.
2414 (elf_link_output_extsym): Don't warn if _rld_new_interface is
2416 (elf_reloc_link_order): Treat a reloc against a defined symbol as
2417 a reloc against the appropriate section.
2419 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
2420 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
2421 (elf_flags_init): Rename from elf_ppc_flags_init.
2422 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
2424 (ppc_elf_copy_private_bfd_data): Likewise.
2425 (ppc_elf_merge_private_bfd_data): Likewise.
2427 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
2430 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
2432 * coff-alpha.c (alpha_relocate_section): During final link, allow
2433 output .lita section to be bigger than 64k by adjusting gp value
2434 on a per-input section basis.
2435 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
2437 (struct ecoff_section_tdata): Add gp field.
2439 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
2441 Handle Alpha ECOFF changes in OSF/1 3.2.
2442 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
2444 * coff-alpha.c: Include "aout/ar.h".
2445 (alpha_ecoff_get_relocated_section_contents): Don't require an
2446 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
2447 3.2 doesn't generate one.
2448 (alpha_relocate_section): Likewise.
2449 (alpha_ecoff_slurp_armap): Define.
2450 (alpha_ecoff_slurp_extended_name_table): Define.
2451 (alpha_ecoff_construct_extended_name_table): Define.
2452 (alpha_ecoff_truncate_arname): Define.
2453 (alpha_ecoff_write_armap): Define.
2454 (alpha_ecoff_generic_stat_arch_elt): Define.
2455 (alpha_ecoff_update_armap_timestamp): Define.
2457 (alpha_ecoff_read_ar_hdr): New static function.
2458 (alpha_ecoff_get_elt_at_filepos): New static function.
2459 (alpha_ecoff_openr_next_archived_file): New static function.
2460 (alpha_ecoff_get_elt_at_index): New static function.
2461 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
2462 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
2463 _bfd_ecoff to alpha_ecoff.
2464 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
2465 field from backend structure, rather than always calling
2466 _bfd_get_elt_at_filepos.
2467 * coff-mips.c (mips_ecoff_backend_data): Initialize
2468 get_elt_at_filepos field.
2469 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
2470 from _bfd_generic_read_ar_hdr with minor changes.
2471 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
2472 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
2473 * libbfd.h: Rebuild.
2475 * bfd-in.h (BFD_IN_MEMORY): Define.
2476 * libbfd-in.h (struct bfd_in_memory): Define.
2477 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
2478 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
2479 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
2480 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
2481 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
2482 (bfd_get_size): Handle BFD_IN_MEMORY flag.
2483 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
2484 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
2485 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
2486 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
2488 (bfd_openstreamr): Likewise.
2489 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
2490 BFD_IN_MEMORY is not set.
2491 * riscix.c (riscix_some_aout_object_p): Likewise.
2492 * bfd-in2.h, libbfd.h: Rebuild.
2494 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
2495 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
2496 (bfd_get_elt_at_index): Define.
2497 * archive.c (_bfd_generic_get_elt_at_index): Rename from
2498 bfd_get_elt_at_index. Change index parameter from int to
2500 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
2501 (_bfd_noarchive_get_elt_at_index): Define.
2502 (_bfd_archive_bsd_get_elt_at_index): Define.
2503 (_bfd_archive_coff_get_elt_at_index): Define.
2504 * bfd-in2.h, libbfd.h: Rebuild.
2505 * aout-target.h (MY_get_elt_at_index): Define if not defined.
2506 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
2507 * ieee.c (ieee_get_elt_at_index): Define.
2508 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
2509 * oasys.c (oasys_get_elt_at_index): Define.
2510 * som.c (som_get_elt_at_index): Define.
2512 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2513 numbers to the .text section.
2515 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
2517 * ieee.c (ieee_write_debug_part): Change return type to boolean.
2518 If there is a SEC_DEBUGGING section, get the contents of the debug
2519 information part from it.
2520 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2522 (ieee_write_object_contents): Check ieee_write_debug_part return.
2524 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
2526 * config.bfd (i[345]86-*-freebsd*): Add target.
2527 * configure.in (i386freebsd_vec): Add vec.
2528 * configure: Regenerate.
2529 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2530 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2531 Rebuild dependencies..
2532 * freebsd.h: New file.
2533 * i386freebsd.c: New file.
2534 * targets.c (i386freebsd_vec): Declare.
2535 (bfd_target_vector): Add i386freebsd_vec.
2536 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2537 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2539 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
2541 * ieee.c (ieee_slurp_debug): New static function.
2542 (ieee_object_p): Call it.
2543 (ieee_slurp_section_data): Skip debugging sections.
2544 (ieee_get_reloc_upper_bound): Likewise.
2545 (ieee_get_section_contents): Likewise.
2546 (ieee_canonicalize_reloc): Likewise.
2547 (ieee_write_section_part): Likewise.
2548 (ieee_write_debug_part): Likewise.
2549 (ieee_write_data_part): Likewise.
2550 (init_for_output): Likewise.
2552 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
2554 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2556 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2557 relocs, since ppc_elf_relocate_section handles the linker case.
2558 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2560 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2561 ppc_elf_relocate_section since that is now the only caller.
2562 (ppc_elf_relocate_section): Ditto.
2564 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
2566 * coffcode.h (coff_write_object_contents): If we don't know the
2567 section of the entry point for an XCOFF executable, always set the
2568 entry address to -1.
2570 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2572 * elf.c (bfd_section_from_shdr): Add support for note sections.
2574 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2576 * bfd-in.h (struct _symbol_info): Add stab_type field.
2577 * bfd-in2.h: Rebuild.
2578 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2580 * elf32-ppc.c: Remove trailing newline from calls to
2582 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2583 difference if target endianness is known.
2585 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2587 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2588 old style TOC16 references without using R_PPC_GOT.
2589 (ppc_reloc_type): Ditto.
2590 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2591 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2592 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2593 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2594 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2596 (ppc_elf_adjust_dynamic_symbol): Ditto.
2597 (ppc_elf_adjust_dynindx): Ditto.
2598 (ppc_elf_size_dynamic_sections): Ditto.
2599 (ppc_elf_finish_dynamic_symbol): Ditto.
2600 (ppc_elf_finish_dynamic_sections): Ditto.
2601 (ELF_DYNAMIC_INTERPRETER): Define.
2603 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2605 * elf.c (copy_private_bfd_data): When attaching sections to
2606 segments ignore sections that won't be allocated. Patch from
2609 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2611 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2614 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2616 * coff-i960.c (CALC_ADDEND): Define.
2617 (coff_i960_relocate_section): Add the input section VMA to the
2618 addend for PC relative relocs.
2620 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2622 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2623 to correctly terminate.
2625 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2627 * targets.c (enum bfd_endian): Define.
2628 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2629 from boolean to enum bfd_endian. Change header_byteorder_big_p
2631 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2632 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2633 * bfd-in2.h: Rebuild.
2634 * All targets: Change initialization of byteorder and
2635 header_byteorder to use enum bfd_endian values rather than
2637 * All files: Change all references to byteorder_big_p and
2638 header_byteorder_big_p to use new bfd_*_endian macros.
2640 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2642 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2644 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2646 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2648 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2650 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
2652 * ieee.c: Lots of minor cleanups. Make many functions return
2653 errors rather than calling abort. Also:
2654 (ieee_write_twobyte): Remove; change callers to call existing
2655 ieee_write_2bytes function.
2656 (ieee_write_expression): Don't output the section twice when
2657 outputting a local symbol. Don't emit an extraneous zero if there
2659 (ieee_slurp_sections): Set the lma as well as the vma.
2660 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2662 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2663 a recognized one or bfd_arch_unknown.
2664 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2666 (ihex_get_symtab): Likewise.
2668 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
2670 * aoutx.h: Include <ctype.h>.
2671 (struct aout_link_includes_table): Define.
2672 (struct aout_link_includes_totals): Define.
2673 (struct aout_link_includes_entry): Define.
2674 (aout_link_includes_lookup): Define macro.
2675 (struct aout_final_link_info): Add includes field.
2676 (aout_link_includes_newfunc): New static function.
2677 (NAME(aout,final_link)): Initialize includes hash table.
2678 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2680 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
2682 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2684 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
2686 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2688 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
2690 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2691 (pe_print_private_bfd_data): call pe_print_reloc.
2692 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2693 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2694 up some debugging as well.
2696 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
2698 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
2701 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
2703 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2704 when setting sections to NULL.
2706 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
2708 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2710 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2711 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2713 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2714 * bfd-in2.h: Rebuild.
2716 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
2718 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2720 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
2722 * ihex.c (ihex_scan): Handle record types 4 and 5.
2723 (ihex_object_p): Permit types 4 and 5.
2724 (ihex_set_section_contents): Remove check for out of range
2726 (ihex_write_object_contents): Generate types 4 and 5.
2728 * elflink.h (elf_link_output_extsym): Just ignore warning and
2729 indirect references to symbols which don't really exist.
2731 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
2733 * peicode.h (pe_print_idata): Minor format fixes
2734 (pe_print_edata): New function. Under private printing, this formats
2735 the edata section of a PE file.
2736 (pe_print_private_bfd_data): Added call to pe_print_edata.
2738 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2740 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2741 index, don't call stoi.
2743 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
2745 * srec.c (srec_scan): Set lma as well as vma.
2747 * ihex.c: New file; support for Intel Hex format.
2748 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2749 (ihex_vec): Declare.
2750 (bfd_target_vector): Always include ihex_vec.
2751 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2752 * Makefile.in: Rebuild dependencies.
2753 (BFD_LIBS): Add ihex.o
2754 (BFD_LIBS_CFILES): Add ihex.c.
2755 * bfd-in2.h: Rebuild.
2757 * elf.c (assign_file_positions_for_segments): Sort the sections in
2759 (get_program_header_size): Return the right size if segment_map is
2761 (copy_private_bfd_data): Don't bother to sort the sections.
2763 * bfd.c (bfd_record_phdr): New function.
2764 * bfd-in.h (bfd_record_phdr): Declare.
2765 * bfd_in2.h: Rebuild.
2767 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2770 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2771 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
2773 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2774 (bfd_zmalloc): Change declaration.
2775 * libbfd.h: Rebuild.
2776 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2777 and realloc. Don't set bfd_error_no_memory if they fail.
2779 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
2781 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2782 uses as well. Added a new howto to deal with TOCREL16 relocs that
2783 are TOCDEFN as well.
2784 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2785 to handle RVA relocs from dlltool.
2786 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2787 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2788 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2790 * coffcode.h (coff_set_alignment_hook): check idata$X sections
2791 to get the right section alignment.
2793 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
2795 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2796 p_paddr if p_paddr is zero.
2797 (make_mapping): Set includes_filehdr and includes_phdrs for first
2799 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2801 (assign_file_positions_for_segments): Handle includes_filehdr and
2802 includes_phdrs. Remove special handling of PT_PHDR and first
2804 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2805 when appropriate. Remove special handling of PT_PHDR segment.
2806 Use a more complex condition for when a section is included in a
2807 segment to handle Solaris linker oddities.
2809 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2811 * coff-m88k.c (howto_table): Reformatted for easier reading;
2812 special_function now points to new function m88k_special_reloc.
2813 (howto_hvrt16): Function previously used for handling HVRT16 relocs
2815 (rtype2howto): Do not add reloc's r_offset to the addend, this will
2816 be done correctly by m88k_special_reloc.
2817 (reloc_processing): New function to be used by RELOC_PROCESSING.
2818 (RELOC_PROCESSING): Define to call reloc_processing.
2820 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
2822 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2823 (pe_print_pdata): Likewise.
2825 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2826 obstack_alloc fails.
2827 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2829 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2830 * Many files: don't set bfd_error_no_memory if one of the above
2833 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2834 if p_paddr_valid is set.
2835 (copy_private_bfd_data): New static function.
2836 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2838 * elf.c (assign_file_positions_for_segments): Fix case where extra
2839 program headers were allocated.
2841 * elf.c (_bfd_elf_print_private_bfd_data): New function.
2842 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2843 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2844 _bfd_elf_print_private_bfd_data.
2846 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2847 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2848 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2849 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2850 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2851 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2852 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2854 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2856 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2857 * elf.c (make_mapping): New static function.
2858 (map_sections_to_segments): New static function.
2859 (elf_sort_sections): New static function.
2860 (assign_file_positions_for_segments): New static function.
2861 (map_program_segments): Remove.
2862 (get_program_header_size): Remove sorted_hdrs, count, and
2863 maxpagesize parameters. Simplify.
2864 (assign_file_positions_except_relocs): When generating an
2865 executable, use assign_file_positions_for_segments.
2866 (elf_sort_hdrs): Remove.
2867 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2868 to get_program_header_size.
2870 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2872 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2874 * configure, config.in: Regenerate with autoconf 2.7.
2876 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2877 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2879 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2881 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2882 (ecoff_sec_to_styp_flags): Likewise.
2883 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2884 (ecoff_set_symbol_info): Handle scRConst.
2885 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2886 (ecoff_compute_section_file_positions): Handle .rconst section.
2887 (_bfd_ecoff_write_object_contents): Likewise.
2888 (ecoff_link_check_archive_element): Handle scRConst.
2889 (ecoff_link_add_externals): Likewise.
2890 (ecoff_link_write_external): Handle .rconst section.
2891 (ecoff_reloc_link_order): Likewise.
2892 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2893 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2895 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2897 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2898 DEF_DYNAMIC flag is set.
2900 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2902 * host-aout.c: If TRAD_HEADER is defined, include it.
2904 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2906 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2907 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2908 (BFD_NEED_DECLARATION): New function.
2909 * configure.in: Use BFD_NEED_DECLARATION.
2910 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2911 * configure, config.in: Rebuild with autoconf 2.6.
2913 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2914 special_sections before returning when called with a non XCOFF
2917 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2920 * coffcode.h (coff_compute_section_file_positions): Only pad the
2921 previous section to force file alignment when creating an
2924 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2926 * coffcode.h (coff_compute_section_file_positions): If
2927 RS6000COFF_C, set up the .debug section.
2929 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2930 if it is not large enough to accomodate the entire TOC area with
2931 signed 16 bit offsets.
2932 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2934 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2935 TOC anchor to use the TOC value used in the output file.
2937 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2939 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2940 (_bfd_coff_read_string_table): Likewise.
2942 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2944 * pe-arm.c: Fix typos.
2945 * coff-arm.c: Likewise.
2947 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2949 * coff-ppc.c (list_ele): Added "cat"egory member.
2950 (record_toc): New category parameter (priv or pub).
2951 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2952 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2953 the mainline. It addes extra toc cells in error.
2954 (ppc_coff_swap_sym_in_hook): Added some documentation.
2955 (dump_toc): Can now diagnose "virtual toc" chicanery.
2957 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2959 * elf-bfd.h (struct elf_link_hash_table): Change type of
2960 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2962 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2964 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2965 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2967 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2968 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2969 defined or mentioned in a regular file.
2971 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2973 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2974 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2975 (coff_ppc_relocate_section): Correct REL24 handling
2976 (ppc_process_before_allocation): Correct TOCDEFN handling
2978 * peicode.h (dir_names): Added name descriptions
2980 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2982 * VERSION: Updated to cygnus-2.6.
2984 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2986 * targets.c (m68k4knetbsd_vec): Declare.
2988 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2990 * targets.c (bfd_target): Change type of second argument to
2991 _bfd_print_private_bfd_data from void * to PTR.
2992 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2993 using PTR rather than void *.
2994 * bfd-in2, libbfd.h: Rebuild.
2995 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2997 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2998 _bfd_generic_bfd_print_private_bfd_data rather than casting
3001 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
3003 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
3004 "DO NOT DELETE" lines or blank lines that mkdep writes on some
3006 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
3007 BFD64_BACKENDS_CFILES): New variables.
3010 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
3012 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
3013 not at the file position of the first section.
3014 * coffcode.h (coff_compute_section_file_positions): Avoid using
3016 (coff_write_object_contents): When generating a PPC PE executable
3017 with no symbols, round up the file size to a COFF_PAGE_SIZE
3019 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
3020 don't write out a string table.
3022 * elf.c (bfd_section_from_shdr): When using a different section
3023 header, pass the new one to _bfd_elf_make_section_from_shdr.
3024 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
3025 (elf_map_symbols): Add section VMA to symbol value when comparing
3027 (_bfd_elf_compute_section_file_positions): Only build symbol table
3028 if there are some symbols. Set file offset of symtab and strtab
3030 (assign_file_positions_except_relocs): Remove dosyms parameter.
3031 Change all callers. Never set file offset of symtab and strtab
3033 (_bfd_elf_copy_private_section_data): New function.
3034 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
3035 (_bfd_elf_copy_private_symbol_data): New function.
3036 (swap_out_syms): Check for special mapping of st_shndx created by
3037 copy_private_symbol_data.
3038 * elfxx-target.h: Use new copy routines.
3039 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
3040 (_bfd_elf_copy_private_section_data): Declare.
3042 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
3044 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3047 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3048 _bfd_dummy_target, matching the recent change to archive
3051 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3053 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3054 arithmetic on PTR types.
3056 * aout-target.h (MY(callback)): Set the lma of the sections.
3058 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3059 symbol into a reloc against the section.
3061 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3063 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3064 glue for the relocs: IMGLUE and IFGLUE.
3065 (record_toc): new function - tracks toc contents
3066 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3067 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3068 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3069 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
3070 (ppc_record_toc_entry): Removed a debug define (duh)
3072 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3073 (pe_print_idata): New function - formats the idata section data
3074 (pe_print_pdata): New function - formats the pdata section data
3075 (pe_print_private_bfd_data): calls to above
3077 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3079 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3080 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3081 TARGET_SYM and TARGET_NAME for vector and BFD name.
3082 * coff-pmac.c (pmac_xcoff_vec): Remove.
3083 (TARGET_SYM, TARGET_NAME): Define.
3084 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3085 machine to 0, not all PowerMacs are 601s.
3087 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3089 * elfcode.h (elf_object_p): Read in any program headers.
3090 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3091 based on the program headers, if any.
3092 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3093 (map_program_segments): Set p_paddr of program headers based on
3096 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3098 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3101 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3102 trying to do a relocateable link with a non-a.out object file.
3104 * archive.c (bfd_generic_archive_p): Check the first object file
3105 in an archive even if target_defaulted is set. If the object file
3106 has the wrong xvec, reject it.
3108 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3109 be represented, report the name via _bfd_error_handler.
3110 (translate_to_native_sym_flags): Likewise.
3111 * elf32-mips.c (mips_elf_final_link): Likewise.
3112 * oasys.c (oasys_write_sections): Likewise.
3114 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3115 which checks for STYP_OVRFLO sections.
3116 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3117 reloc and lineno count overflows.
3118 (coff_write_object_contents): Call coff_count_linenumbers before
3119 coff_compute_section_file_positions. If RS6000COFF_C, handle
3120 reloc and lineno count overflows.
3121 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3122 relocs before dealing with .pad sections. Count overflow section
3123 headers when handling .pad sections.
3125 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3128 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3129 (struct xcoff_link_hash_table): Add descriptor_section and
3130 special_sections fields.
3131 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3132 (xcoff_link_add_symbols): Set linkage section alignment. Create
3133 descriptor section. Check for magic symbol names (_text, etc.),
3134 and record them in special_sections if found. Set
3135 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3136 descriptor field to point back to the function code symbol.
3137 (xcoff_sweep): Always mark the special descriptor_section.
3138 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3139 function descriptor, and mark it if it is.
3140 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3141 parameter, and fill it in. Allocate space for the descriptor
3143 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3144 global linkage code. If an undefined function descriptor is
3145 exported, arrange to define it. Warn about any other undefined
3147 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3148 (xcoff_write_global_symbol): Create a function descriptor when
3150 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3151 * bfd-in2.h: Rebuild.
3153 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3155 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3156 (ppc_coff_link_hash_table): new types for hashing
3157 (ppc_coff_link_hash_newfunc): hash entry constructor
3158 (ppc_coff_link_hash_table_init): hash table initializer
3159 (ppc_coff_link_hash_table_create): hash table constructor
3160 (ppc_record_toc_entry): changed references to hash table
3161 (coff_ppc_relocate_section): changed references to hash table
3163 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3164 * libcoff.h: Rebuild
3166 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3167 (coff_link_add_symbols): removed toc_offset init
3169 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3171 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3174 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3175 if it is given and mmep is available.
3176 * acconfig.h: Undef USE_MMAP.
3177 * configure, config.in: Regenerated.
3178 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3179 table handling the old way.
3180 (aout_get_external_symbols): Don't complain if last byte of string
3182 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3183 (bfd_free_window) [! USE_MMAP]: Don't define.
3184 (bfd_get_file_window,
3185 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3187 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3189 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3192 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3194 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3195 compatible with AMD generated COFF files. Try to support both AMD
3196 and GNU formats simultaneously.
3197 (coff_a29k_relocate_section): Likewise.
3199 * libbfd.c (bfd_get_file_window): Change writable parameter from
3200 int to boolean; update all callers. Pass MAP_SHARED if not
3201 writable--it's required on Solaris. Cast fprintf argument to
3203 * bfd-in.h (bfd_get_file_window): Update declaration.
3204 * bfd-in2.h: Rebuild.
3205 * aoutx.h: Update calls to bfd_get_file_window.
3207 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3209 (xcoff_swap_ldhdr_in): New static function.
3210 (xcoff_swap_ldsym_in): New static function.
3211 (xcoff_find_reloc): Handle the case of a single reloc correctly.
3212 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3213 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
3214 Handle XTY_ER/XMC_XO symbols correctly.
3215 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3216 rather than normal symbol table.
3217 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3218 already defined with the same absolute value.
3219 (xcoff_mark): When considering called symbols, check whether the
3220 descriptor is from a dynamic object, rather than the symbol
3222 (xcoff_build_ldsyms): Likewise.
3224 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3225 Cast realloc and malloc return values. If malloc or realloc fail,
3226 set bfd_error_no_memory.
3227 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3228 * bfd-in2.h: Rebuild.
3230 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3232 * coff-ppc.c (ppc_record_toc_entry): new function.
3233 (in_reloc_p): changed return value.
3234 (coff_ppc_relocate_section): much rework.
3235 (ppc_allocate_toc_section): new function.
3236 (ppc_process_before_allocation): new function.
3237 (ppc_coff_swap_sym_in_hook): new function.
3239 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3240 (coff_link_add_symbols): initialize toc_offset.
3242 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3243 (coff_swap_aouthdr_out): Added more sections to the data
3244 dictionary for the pe file header. Also changed linker version
3245 number on the ppc side.
3246 (dir_names): small improvements to the dictionary printing.
3247 (pe_mkobject_hook): save the file level flags.
3249 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3250 (pe_tdata): added real_flags field
3251 (coff_tdata): added local_toc_sym_map and access macro
3253 * libcoff.h (coff_link_hash_entry): added toc_offset field
3254 (pe_tdata): added real_flags field
3255 (coff_tdata): added local_toc_sym_map and access macro
3257 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3258 (coff_mkobject): init for local_toc_sym_map
3259 (coff_write_object_contents): set the internal_a.magic to
3260 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3263 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3265 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3266 entries until both the line number address and the function name
3267 address are too large.
3269 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3270 * configure: Rebuilt.
3272 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3273 is defined in the environment.
3275 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3277 * som.c (som_get_section_contents_in_window): Define to use
3280 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3282 * coff-i860.c: New file, based on coff-i386.c.
3283 * cpu-i860.c: New file, based on cpu-i386.c.
3284 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3285 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3286 targets, using i860coff_vec.
3287 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3288 trad-core.o and hosts/i860mach3.h.
3289 (i860coff_vec): Use coff-i860.o and cofflink.o.
3290 * configure: Rebuild.
3291 * Makefile.in: Rebuild dependencies.
3292 (ALL_MACHINES): Add cpu-i860.o.
3293 (BFD32_BACKENDS): Add coff-i860.o.
3294 (CFILES): Add cpu-i860.c and coff-i860.c.
3295 * targets.c (i860coff_vec): Declare.
3296 (bfd_target_vector): Add &i860coff_vec.
3297 * archures.c (bfd_i860_arch): Declare.
3298 (bfd_archures_list): Add &bfd_i860_arch.
3299 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3300 (coff_set_flags): Handle bfd_arch_i860.
3301 (coff_write_object_contents): Handle I860 a.out magic number.
3303 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3305 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3306 the created .tc section to 2.
3307 (xcoff_mark): Don't keep a .loader reloc for a call to an
3308 undefined symbol when creating a shared library.
3309 (xcoff_build_ldsyms): When creating a shared library, generate
3310 global linkage code for a call to an undefined symbol.
3312 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3314 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3315 BFD32_BACKENDS, BFD64_BACKENDS.
3316 (.dep1): Put mkdep output in a separate file.
3317 Rebuilt dependencies.
3319 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3322 Permit use of mmap when available:
3324 * configure.in: Check for mmap, madvise, mprotect.
3325 * config.in, configure: Regenerated.
3327 * libbfd.c (struct _bfd_window_internal): Define type.
3328 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3330 (ok_to_map): New static variable for debugging.
3331 (_bfd_generic_get_section_contents_in_window): New function.
3332 * bfd-in.h (bfd_window_internal): Declare type.
3333 (bfd_window): Define type.
3334 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3335 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3338 * libaout.h (struct aoutdata): Add two window fields.
3339 (obj_aout_sym_window, obj_aout_string_window): New macros.
3340 * aoutx.h (some_aout_object_p): Initialize windows.
3341 (aout_get_external_symbols): Get symbol data and strings in
3342 windows instead of explicitly allocated buffers.
3343 (slurp_symbol_table): Free window instead of memory.
3344 (bfd_free_cached_info): Release windows instead of freeing storage
3346 (aout_link_free_symbols): Ditto.
3348 * targets.c (bfd_target): Add new field for
3349 get_section_contents_in_window.
3350 (BFD_JUMP_TABLE_GENERIC): Updated.
3351 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3352 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3353 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3354 macros for get_section_contents_in_window field.
3356 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3358 * core.c: Renamed to corefile.c
3359 * makefile.dos (OBJS): Change core.o to corefile.o
3360 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3363 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3365 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3366 targ_selvecs to allow debugging under Irix-5 native.
3369 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
3371 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
3372 to o. Clobber and restore the list of new csects around the call
3373 to _bfd_generic_link_add_one_symbol, in case it wants to report a
3374 linker error and the linker wants to read the symbol table. Reset
3375 the line number count of a real section even if it has no relocs.
3376 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
3378 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
3381 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
3383 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
3384 an undefined symbol in a shared link.
3386 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
3387 oldtype from bfd_link_order_type to bfd_link_hash_type. From
3388 phdm@info.ucl.ac.be (Philippe De Muyter).
3390 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3392 * coff-m88k.c (rtype2howto): New static function.
3393 (RTYPE2HOWTO): Use it rather than a macro definition.
3395 * coffcode.h (coff_write_object_contents): set internal_a.magic
3396 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
3398 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
3399 define TRAD_HEADER to new file hosts/delta68.h.
3400 m88*-motorola-sysv*, however, does use ptrace-core.o.
3401 * hosts/delta68.h: New file.
3403 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
3404 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
3406 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
3408 * i386linux.c (MY(vec)): Declare before use.
3410 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
3412 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
3413 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
3415 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3416 BFD is not of the right type.
3417 (bfd_elf_get_needed_list): Likewise.
3418 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
3419 * sunos.c (bfd_sunos_get_needed_list): Likewise.
3420 * xcofflink.c (XCOFF_XVECP): Define.
3421 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
3423 (bfd_xcoff_import_symbol): Likewise.
3424 (bfd_xcoff_export_symbol): Likewise.
3425 (bfd_xcoff_link_count_reloc): Likewise.
3426 (bfd_xcoff_record_link_assignment): Likewise.
3427 (bfd_xcoff_size_dynamic_sections): Likewise.
3429 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
3430 table index against the number of symbols for a base relative
3433 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
3435 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
3436 full_aouthdr flag here...
3437 (_bfd_xcoff_bfd_final_link): ...not here.
3439 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
3441 * libelf.h: Rename to elf-bfd.h to avoid conflict with
3442 systems that have a system <libelf.h>.
3443 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
3444 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
3445 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
3446 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
3447 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
3448 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
3449 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
3451 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
3453 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
3454 set, set BSF_WEAK in symbol. Change all callers.
3455 (ecoff_get_extr): Set weakext based on BSF_WEAK.
3456 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
3457 _bfd_generic_link_add_one_symbol.
3458 (ecoff_indirect_link_order): Check that the section tdata relocs
3459 are not NULL before using them.
3461 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
3462 define TRAD_HEADER as hosts/alphalinux.h.
3463 * configure: Rebuild.
3464 * hosts/alphalinux.h: New file.
3465 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
3468 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
3470 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
3471 C_ECOMM storage classes.
3473 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
3475 (xcoff_mark): Call xcoff_mark_symbol.
3476 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
3477 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
3479 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
3481 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
3483 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
3485 (xcoff_find_reloc): New static function.
3486 (xcoff_link_add_symbols): Use it.
3487 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
3488 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
3489 relocate the value of C_DECL.
3491 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
3493 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
3495 * cofflink.c (_bfd_coff_generic_relocate_section): Make
3496 callback decide what goes in .relocs.
3497 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
3498 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
3501 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
3503 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
3506 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
3508 * xcofflink.c: More improvements, mostly to fix handling of
3509 constructors and a few other special cases.
3510 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3511 zero, reverting yesterday's change.
3512 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3513 (bfd_xcoff_link_count_reloc): Declare.
3514 (bfd_xcoff_record_link_assignment): Declare.
3515 * bfd-in2.h: Rebuild.
3517 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
3519 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
3520 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3521 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3522 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3523 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3524 Change PAGE_SIZE to TARGET_PAGE_SIZE.
3526 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3529 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
3530 segments includes the a.out header. See to that the magic number
3531 *always* is big-endian.
3533 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
3534 m68k4k NetBSD configurations.
3536 * configure.in, configure: Separate i386 & mips NetBSD
3537 configurations from other BSD ones. Don't assume DEC is the only
3538 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
3539 configurations. Add support for m68k4k NetBSD object format.
3541 * libaout.h: Added M_68K4K_NETBSD magic.
3543 * m68k4knetbsd.c: New file.
3545 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3547 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3550 * hosts/mipsnbsd.h: New file.
3553 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
3555 * config.bfd: Add config stuff for mips*-*-magic* to set
3556 targ_defvec to ecoff_big_vec.
3559 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
3561 * xcofflink.c: Numerous changes to get closer to a working XCOFF
3563 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3564 toc_section, and entry_section fields.
3565 (struct xcoff_section_tdata): Remove ldrel_count field.
3566 * libcoff.h: Rebuild.
3567 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3569 (coff_compute_section_file_positions): If RS6000COFF_C, generate
3570 full a.out header if full_aouthdr is set in xcoff_data.
3571 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3572 based on sections stored in xcoff_data.
3573 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3575 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3576 (rs6000coff_vec): Set symbol_leading_char to '.'.
3577 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3578 value stored in ret rather than returning a pointer value.
3580 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3582 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3585 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3587 * som.c (som_slurp_string_table): Allocate the strings with malloc
3588 since they're free'd by free_cached_info.
3589 (som_slurp_symbol_table): Similarly for the symbol table.
3591 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3593 * Makefile.in (diststuff): Don't make headers.
3595 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3597 * Makefile.in: Rebuild dependencies.
3599 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3600 output_bfd is not SunOS.
3601 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3602 non-SunOS input files.
3604 * xcofflink.c: Extensive changes to support linking shared objects
3605 and generating a .loader section.
3606 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3607 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3608 last_symndx, and ldrel_count fields.
3609 * libcoff.h: Rebuild.
3610 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3611 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3613 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3614 (bfd_xcoff_export_symbol): Declare.
3615 (bfd_xcoff_size_dynamic_sections): Declare.
3616 * bfd-in2.h: Rebuild.
3618 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3620 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3621 * configure: Rebuild.
3622 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3623 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3625 (pmac_xcoff_vec): Update to use new xcoff support.
3626 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3627 (xcoff_write_armap): Declare buf as unsigned char.
3628 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3630 * mpw-make.sed: Generalize subdir_do edit.
3632 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3634 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3635 correctly. Don't initialize asect->vma.
3637 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3639 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3640 something a little less than the page size.
3642 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3644 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3646 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3648 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3649 * coffcode.h (coff_write_object_contents): If .bss is before
3650 .data us that as data_start.
3651 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3653 * peicode.h (add_data_entry): Use _cooked_size of data directory.
3654 (coff_swap_outhdr_out): Hardwire in version number.
3656 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
3658 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3659 major and minor to *_vno, since the former are also macros in
3660 SunOS header files. Cast result of bfd_alloc to appropriate
3663 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3664 before assigning to sec_data.
3666 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
3668 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3669 now relative to the section, not absolute.
3670 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3671 get the file name when there is a N_SO directory name. When
3672 handling stabs, remember that section->vma was added to the
3675 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
3677 * sunos.c (struct sunos_link_hash_table): Add needed field.
3678 (sunos_link_hash_table_create): Call bfd_release, not free.
3679 (sunos_link_hash_table_create): Initialize needed field.
3680 (sunos_add_dynamic_symbols): Record needed objects.
3681 (bfd_sunos_get_needed_list): New function.
3682 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3683 * bfd-in2.h: Rebuild.
3685 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
3687 * libcoff-in.h (pe_data_type.in_reloc_p): New.
3689 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
3691 * bfd-in.h (struct bfd_link_needed_list): Rename from
3692 bfd_elf_link_needed_list.
3693 * bfd-in2.h: Rebuild.
3694 * elf.c, elflink.h, libelf.h: Corresponding changes.
3696 Add start at AIX linker support; no shared libraries yet.
3697 * xcofflink.c: New file.
3698 * configure.in (rs600coff_vec): Use xcofflink.o.
3699 * configure: Rebuild.
3700 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3702 (struct xcoff_section_tdata): Define.
3703 (xcoff_section_data): Define macro.
3704 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3705 (_bfd_xcoff_bfd_link_add_symbols): Declare.
3706 (_bfd_xcoff_bfd_final_link): Declare.
3707 (_bfd_ppc_xcoff_relocate_section): Declare.
3708 * libcoff.h: Rebuild.
3709 * coff-rs6000.c: Clean up a bit.
3710 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
3711 cputype, csects, and debug_indices.
3712 (xcoff_copy_private_bfd_data): Copy cputype.
3713 (xcoff_howto_table): Rename from rs6000coff_howto_table.
3714 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3715 (xcoff_reloc_type_lookup): Rename from
3716 rs6000coff_reloc_type_lookup.
3717 (coff_relocate_section): Define.
3718 (_bfd_xcoff_sizeof_headers): Define.
3719 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3720 (_bfd_xcoff_bfd_relax_section): Define.
3721 (_bfd_xcoff_bfd_link_split_section): Define.
3722 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3724 * coffcode.h (coff_compute_section_file_positions): If AIX,
3725 increment sofar by SMALL_AOUTSZ if not executable.
3726 (coff_write_object_contents): If AIX, always output an a.out
3727 header; if not executable, header size of SMALL_AOUTSZ.
3728 * hash.c (struct bfd_strtab_hash): Add xcoff field.
3729 (_bfd_stringtab_init): Initialize xcoff field.
3730 (_bfd_xcoff_stringtab_init): New function.
3731 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3732 (_bfd_stringtab_emit): In XCOFF mode, write out length.
3733 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3734 * libbfd.h: Rebuild.
3735 * Makefile.in: Rebuild dependencies.
3736 (BFD32_BACKENDS): Add xcofflink.o.
3737 (CFILES): Add xcofflink.c.
3739 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3740 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
3741 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3743 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3745 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3747 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
3749 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3750 * config.in: Regenerated.
3752 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3753 (_bfd_chunksize): New variable.
3754 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3755 for obstack chunk size.
3756 * configure.in: Check for getpagesize.
3757 * configure: Regenerated.
3759 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3761 * trad-core.c (rawptr): Make it a local variable of
3762 ptrace_unix_core_file_p.
3764 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
3766 * coff-arm.c (in_reloc_p): New.
3767 * coff-i386.c (in_reloc_p): New.
3768 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3769 (coff_write_object_contents): Only set has_reloc_section
3771 * cofflink.c (_bfd_coff_generic_relocate_section): Call
3772 in_reloc_p to decide if reloc should be emitted.
3773 * libcoff.h (pe_data_type.in_reloc_p): New.
3774 * peicode.h (pe_mkobject): Initialize in_reloc_p.
3776 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
3778 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3779 (_bfd_coff_read_internal_relocs): Likewise.
3780 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3781 (_bfd_coff_read_internal_relocs): Likewise.
3783 * elflink.h (elf_link_add_object_symbols): Correct conditions
3784 under which type and size change warnings are issued.
3786 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
3788 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3789 a symbol which is not in a real section.
3790 (coff_write_native_symbol): Corresponding change.
3792 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3793 coff_link_hash_newfunc and make non-static.
3794 (_bfd_coff_link_hash_table_init): New function, broken out of
3795 _bfd_coff_link_hash_table_create.
3796 (_bfd_coff_link_hash_table_create): Use it.
3797 (process_embedded_commands): Make static.
3798 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3799 (_bfd_coff_link_hash_table_init): Declare.
3800 * libcoff.h: Rebuild.
3802 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3803 field in XCOFF tdata.
3804 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3805 U802ROMAGIC, for clarity. Try to set arch and machine correctly
3806 based on cputype stored in a.out header, or in n_type of initial
3808 (coff_write_object_contents): Set cputype correctly in a.out
3810 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3812 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3813 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
3815 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3816 * libcoff.h: Rebuild.
3818 * cpu-rs6000.c (rs6000_compatible): New static function.
3819 (bfd_rs6000_arch): Use it.
3820 * cpu-powerpc.c (powerpc_compatible): New static function.
3821 (arch_info_struct): Define various flavours of PowerPC.
3822 (bfd_powerpc_arch): Use powerpc_compatible. Point at
3825 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
3827 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
3829 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
3831 * elflink.h (elf_link_add_object_symbols): Don't warn about
3832 changing the size or type if the old definition was weak.
3834 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
3836 * coffcode.h (combined_entry_type): Add fix_line field.
3837 (coff_slurp_line_table): Warn if we try to set the lineno field of
3839 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3840 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
3841 * coffgen.c (coff_mangle_symbols): Handle fix_line.
3842 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3844 (coff_print_symbol): Print fix_value symbols in a useful fashion.
3845 * libcoff.h: Rebuild.
3847 * libcoff-in.h (struct xcoff_tdata): Define.
3848 (xcoff_data): Define.
3849 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3850 * bfd-in2.h, libcoff.h: Rebuild.
3851 * coff-rs6000.c (xcoff_mkobject): New static function.
3852 (coff_mkobject): Define.
3853 (xcoff_copy_private_bfd_data): New static function.
3854 (coff_bfd_copy_private_bfd_data): Define.
3855 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3857 (rs6000coff_vec): Add DYNAMIC to object_flags.
3858 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3859 .loader sections specially.
3860 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3861 section alignment from the XCOFF tdata information.
3862 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3863 F_SHROBJ, and copy the extra a.out header information into the
3864 XCOFF tdata structure.
3865 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3866 F_DYNLOAD and the extra a.out header information.
3867 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3868 C_HIDEXT symbol with attached csect information.
3869 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3870 in the o_maxdata field.
3871 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3872 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3873 end if BSF_NOT_AT_END is set.
3875 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3876 _bfd_read_ar_hdr_fn.
3877 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3878 * bfd-in2.h, libbfd.h: Rebuild.
3879 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3881 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3882 (bfd_slurp_bsd_armap_f2): Likewise.
3883 (_bfd_slurp_extended_name_table): Likewise.
3885 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3887 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3889 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3890 when the symbol table is empty.
3892 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3893 space for section symbols, since we don't output them either.
3894 (elf_m68k_adjust_dynindx): Removed.
3896 * ptrace-core.c (rawptr): Make it a local variable of
3897 ptrace_unix_core_file_p.
3899 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3901 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3904 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3905 Mac object file formats.
3907 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3909 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3910 auxent if there isn't one.
3911 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3912 rather than FILNMLEN as the maximum name length.
3914 * coffcode.h (bfd_coff_backend_data): Add new field
3915 _bfd_coff_print_aux.
3916 (bfd_coff_print_aux): New static function.
3917 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3918 scnlen field of an XTY_LD csect aux entry.
3919 (coff_print_aux): New static function.
3920 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3921 in coff_pointerize_aux_hook.
3922 (bfd_coff_std_swap_table): Initialize new field.
3923 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3924 * libcoff.h: Rebuild.
3925 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3926 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3928 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3929 if there are symbols, for native AIX ld compatibility.
3931 * coffcode.h (bfd_coff_backend_data): Add new field
3932 _bfd_coff_pointerize_aux_hook.
3933 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3934 or I960, and as 0 otherwise.
3935 (bfd_coff_std_swap_table): Initialize new field.
3936 * libcoff.h: Rebuild.
3937 * coffgen.c (coff_pointerize_aux): Change parameters to take
3938 symbol pointer instead of type and class, and to take aux index.
3939 Call _bfd_coff_pointerize_aux_hook if it is defined.
3940 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3941 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3942 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3944 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3945 read-only/host-only support.
3947 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3949 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3952 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3953 BFD_JUMP_TABLE_ARCHIVE accordingly.
3954 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3955 (_bfd_compute_and_write_armap): Declare.
3956 (_bfd_generic_read_ar_hdr): Declare.
3957 (_bfd_read_ar_hdr): Define.
3958 (_bfd_noarchive_read_ar_hdr): Define.
3959 (_bfd_archive_bsd_read_ar_hdr): Define.
3960 (_bfd_archive_coff_read_ar_hdr): Define.
3961 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3962 _bfd_read_ar_hdr instead.
3963 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3964 (_bfd_compute_and_write_armap): Rename from
3965 compute_and_write_armap. Make non-static. Change all callers.
3966 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3967 than _bfd_snarf_ar_hdr.
3968 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3969 * ieee.c (ieee_read_ar_hdr): Define.
3970 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3971 * oasys.c (oasys_read_ar_hdr): Define.
3972 * som.c (som_read_ar_hdr): Define.
3973 * bfd-in2.h, libbfd.h: Rebuild.
3975 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3977 * peicode.c (coff_swap_filehdr_in): If symptr is
3978 zero, there aren't any symbols, even if nsyms is set.
3980 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3982 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3984 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3985 sections, and set styp correctly for them: .got, .hash, .dynamic,
3986 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3987 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3989 (ecoff_sort_hdrs): New static function.
3990 (ecoff_compute_section_file_positions): Return boolean, not void.
3991 Sort the sections by VMA before looking through them. Put the
3992 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3993 section on an appropriate boundary within the page.
3994 (ecoff_compute_reloc_file_positions): Check return value of
3995 ecoff_compute_section_file_positions.
3996 (_bfd_ecoff_set_section_contents): Likewise.
3997 (_bfd_ecoff_write_object_contents): Check for various Alpha
3998 section types when incrementing text_size and data_size. Call
3999 adjust_headers backend function if it exists.
4000 * coff-alpha.c (alpha_adjust_headers): New static function.
4001 (alpha_ecoff_backend_data): Initialize adjust_headers field.
4002 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4004 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
4006 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
4008 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
4009 of ALTERNATE_AIX_CORE_FORMAT.
4010 * configure.in (aix4): No longer need CORE_FLAGS.
4011 * configure: Updated.
4013 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
4015 NS32k changes from Ian Dall:
4016 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
4018 (aout_link_input_section_std, aout_link_input_section_ext,
4019 aout_link_reloc_link_order): Call them instead of _bfd_*
4021 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
4023 (backend_data): Use it instead of hardcoded zero.
4025 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
4026 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
4028 * ns32knetbsd.c: Include bfd.h.
4029 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
4030 (MY_bfd_reloc_type_lookup): Declare function too.
4031 * pc532-mach.c (set_sizes): Don't declare.
4032 (MY_text_includes_header, MY_exec_header_not_counted): Define.
4033 (backend_data, MY_backend_data): Don't define.
4035 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
4036 ns32k-*-lites* like ns32k-*-netbsd*.
4038 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
4041 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
4043 * coffcode.h (coff_write_object_contents): Restore setting
4044 f_timdat to 0, deleted on August 22.
4046 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4048 * coffcode.h (coff_bfd_copy_private_symbol_data,
4049 coff_bfd_copy_private_section_data,
4050 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4051 * peicode.h (coff_bfd_copy_private_bfd_data): New
4052 (pe_bfd_copy_private_bfd_data): New.
4053 (coff_swap_scnhdr_in): Swap bss size into the right place.
4054 (pe_print_private_bfd_data): Add some newlines.
4056 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
4058 * som.c (setup_sections): Don't die if a space has no subspaces.
4060 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4062 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4063 dynamic symbol override a common symbol. Don't change the size or
4064 type if they have been set and the new symbol is not a definition.
4065 Warn if the size or type changes.
4067 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
4069 * som.c (som_begin_writing): Don't write the symbol table or
4071 (som_finish_writing): Write them here. Place them after the
4072 subspace data, but before the relocs.
4074 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4076 * sunos.c (sunos_add_one_symbol): Just pass false, not
4077 info->shared_library, to sunos_create_dynamic_sections.
4078 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4080 (sunos_check_dynamic_reloc): Remove .text section assertion.
4082 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4084 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4085 * configure, configure.in: Add pmac_xcoff_vec case.
4086 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4087 * coff-pmac.c: New file, PowerMac XCOFF support.
4088 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4089 * targets.c (pmac_xcoff_vec): Declare.
4091 * mpw-config.in: Various changes to be compatible with the
4092 autoconf-based configury.
4093 * mpw-make.sed: New file, sed commands to translate Unix
4094 makefile into MPW syntax.
4095 * mpw-make.in: Remove.
4096 * hosts/mpw.h: Remove.
4097 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4098 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4100 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4102 * binary.c (binary_get_symtab): Return an empty string on error.
4103 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4105 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4107 * coff-ppc.c: Reformatted according to gnu conventions
4108 Removed irrelevant "if 0" code
4110 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4112 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4113 symbols rather than as indirect symbols.
4114 (MY(slurp_symbol_table)): Don't do anything special about
4117 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4118 of .ctors and .dtors sections is no larger than 2.
4120 * sunos.c (sunos_add_one_symbol): Don't change
4121 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4123 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4124 dynamic symbols when creating a shared library.
4125 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4127 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4128 written even if it is not defined in a regular object.
4129 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4130 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4131 rather than the constant 22.
4132 (sunos_check_dynamic_reloc): Handle creating a shared library.
4133 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4134 zero when creating a shared library.
4135 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4136 write it out at the start of the symbol table.
4138 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4140 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4142 * config.bfd: Add arm-*-coff.
4143 * configure.in, configure: Add armcoff_{little,big}_vec.
4144 * targets.c (armcoff_{little,big}_vec): Declare.
4145 (bfd_target_vector): Add armcoff_{little,big}_vec.
4146 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4148 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4150 * targets.c (bfd_find_target): Remove debugging code.
4152 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4154 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4156 * Makefile.in: added *-ppc files
4157 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4158 allow pe based .o's to be shared with other tools on ppc/NT
4159 * config.bfd: added powerpc[le]-[pe|winnt] config support
4160 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4161 * peicode.h: Added more section flags for PE on ppc
4162 Added coff_swap_filehdr_out to allow peicode.h to be
4163 used for non-image PE files on ppc.
4164 Check for image, or not, before copying pe_opthdr
4165 * targets.c: Added new bfd's
4166 * targets.c: Removed two inactive bfds that shouldn't have made it this
4169 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4171 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4172 explicit values to initialize all relocs. Change all users.
4173 (ppc_elf_brtaken_inner): New function to handle branch predicition
4175 (ppc_elf_brtaken_reloc): Ditto.
4176 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4177 relocs use ppc_elf_unsupported_reloc.
4178 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4179 needs to be reported.
4180 (ppc_elf_relocate_section): Support branch prediction relocs.
4182 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4184 * bfd.c (bfd_assert): Remove \n from string passed to
4187 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4188 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4189 (bfd_coff_make_section_hook): Don't define.
4190 (coff_make_section_hook): Remove.
4191 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4192 (styp_to_sec_flags): Likewise.
4193 (coff_write_object_contents): Likewise.
4194 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4196 * libcoff.h: Rebuild.
4197 * coffgen.c (make_a_section_from_file): Just call
4198 bfd_make_section_anyway, not bfd_make_section or
4199 bfd_coff_make_section_hook.
4200 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4201 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4202 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4203 make_section_hook field.
4204 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4206 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4207 pointers into value field for warning and indirect symbols; just
4208 leave the value field alone.
4209 * linker.c (generic_link_add_symbol_list): Use next symbol for
4210 warning and indirect symbols, rather than looking in symbol value.
4211 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4212 parameter. Change all callers. Remove support for indirect
4213 symbols; it didn't work anyhow.
4214 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4215 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4216 * bfd-in2.h: Rebuild.
4218 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4220 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4221 go back to telling the tools this reloc operates on 32 bits.
4223 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4225 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4226 rather than a direct fprintf.
4227 * archive.c (_bfd_write_archive_contents): Likewise.
4228 * coffcode.h (coff_slurp_symbol_table): Likewise.
4229 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4230 (ppc_elf_unsupported_reloc): Likewise.
4231 (ppc_elf_relocate_section): Likewise.
4232 * i386linux.c (linux_tally_symbols): Likewise.
4233 (linux_finish_dynamic_link): Likewise.
4234 * osf-core.c (osf_core_core_file_p): Likewise.
4235 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4236 * som.c (som_sizeof_headers): Likewise.
4237 * srec.c (srec_bad_byte): Likewise.
4238 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4239 * libbfd-in.h (bfd_assert): Declare first parameter const.
4240 * libbfd.h: Rebuild.
4241 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4242 bfd_reloc_overflow is enough.
4243 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4244 * coff-h8500.c (rtype2howto): Likewise.
4245 * coff-z8k.c (rtype2howto): Likewise.
4246 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4247 * elf.c (_bfd_elf_get_lineno): Likewise.
4248 (_bfd_elf_no_info_to_howto): Likewise.
4249 (_bfd_elf_no_info_to_howto_rel): Likewise.
4250 * hp300hpux.c (convert_sym_type): Likewise.
4251 (MY(swap_std_reloc_in)): Likewise.
4252 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4254 * libaout.h (struct aoutdata): Add line_buf field.
4255 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4256 and filename_buffer. Instead, use a malloc buffer stored in the
4257 new line_buf field. Remove length restrictions.
4259 * coffgen.c (string_size): Remove static variable.
4260 (debug_string_size, debug_string_section): Likewise.
4261 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4262 and debug_string_size_p parameters. Use them instead of the
4263 global variables. Change all callers.
4264 (coff_write_symbol): Likewise.
4265 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4266 (coff_write_symbols): Add local variables to replace removed
4269 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4270 function, and line_base fields.
4271 * libcoff.h: Rebuild.
4272 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4273 information, rather than using static variables.
4275 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4276 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4278 * init.c (initialized): Remove static variable.
4279 (bfd_init): Don't bother setting initialized.
4280 (bfd_check_init): Remove.
4281 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4282 * libbfd.h: Rebuild.
4284 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4286 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4287 size for full core dumps. Copy core file header to private data.
4288 (rs6000coff_core_file_failing_command,
4289 rs6000coff_core_file_failing_signal): New functions to extract
4290 the file name and terminating signal from the core file.
4291 * coff-rs6000.c: Use them.
4293 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4295 Change arch info to be const, initialized at compile time.
4296 * archures.c: Reindent many functions. Change CONST to const.
4297 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4298 nothing set it anyhow. Make next const.
4299 (bfd_arch_info_list): Remove.
4300 (bfd_archures_list): Rename from archures_init_table. Change from
4301 a table of function pointers to a table of bfd_arch_info_type
4302 structure addresses.
4303 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4304 (bfd_lookup_arch): Likewise.
4305 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4307 (bfd_default_arch_struct): Make const.
4308 (bfd_arch_init, bfd_arch_linkin): Remove.
4309 (bfd_get_arch_info): Return a const pointer.
4310 * init.c (bfd_init): Don't call bfd_arch_init.
4311 * bfd.c (struct _bfd): Make arch_info const.
4312 * bfd-in2.h: Rebuild.
4313 * libbfd.h: Rebuild.
4314 * configure.in: Put & before everything in $selarchs.
4315 * configure: Rebuild.
4316 * cpu-*.c: Change bfd_*_arch from a function which calls
4317 bfd_arch_linkin to a const structure.
4318 * ieee.c (ieee_object_p): Make arch const.
4320 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4322 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4324 * bfd-in2.h: Regenerate.
4325 * libbfd.h: Regenerate.
4327 * elf32-ppc.c (reloc_type): Update names to match current draft.
4328 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4329 relative. Update names to current V.4 draft.
4330 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4331 (ppc_elf_relocate_section): Rename relocations to match draft.
4333 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4335 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4336 compiled with -mrelocatable-lib to be linked with either normal
4337 modules or -mrelocatable modules.
4339 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4341 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4342 in the a.out header.
4344 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4345 a reloc against a local symbol, even if it's not a section.
4347 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4349 * targets.c (bfd_target): Remove unused align_power_min field.
4350 * bfd-in2.h: Rebuild.
4351 * All backends: Remove initialization of align_power_min.
4353 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4355 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
4357 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4359 * config.bfd (mips-dec-netbsd*): New target.
4360 * configure.host (mips-dec-netbsd*): New host.
4361 * configure.in (mips-dec-netbsd*): New native.
4362 * configure: Rebuild.
4364 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4366 Make the COFF backend linker merge common types:
4367 * cofflink.c (struct coff_debug_merge_element): Define.
4368 (struct coff_debug_merge_type): Define.
4369 (struct coff_debug_merge_hash_entry): Define.
4370 (struct coff_debug_merge_hash_table): Define.
4371 (coff_debug_merge_hash_table_init): Define.
4372 (coff_debug_merge_hash_table_free): Define.
4373 (coff_debug_merge_hash_lookup): Define.
4374 (struct coff_final_link_info): Add debug_merge field.
4375 (coff_debug_merge_hash_newfunc): New static function.
4376 (_bfd_coff_final_link): Allocate and free debug_merge table.
4377 (coff_link_input_bfd): Merge identical enum, struct and union
4380 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
4382 Convert i960 COFF to use COFF backend linker.
4383 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
4384 structure to store the symbol being used.
4385 (coff_i960_start_final_link): New static function.
4386 (coff_i960_relocate_section): New static function.
4387 (coff_i960_adjust_symndx): New static function.
4388 (coff_start_final_link): Define.
4389 (coff_relocate_section): Define.
4390 (coff_adjust_symndx): Define.
4391 * coffcode.h (bfd_coff_backend_data): Add new callback function
4392 _bfd_coff_start_final_link.
4393 (bfd_coff_start_final_link): Define.
4394 (coff_start_final_link): Define if not defined.
4395 (bfd_coff_std_swap_table): Add coff_start_final_link.
4396 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
4398 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
4399 function callback is not NULL.
4400 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
4401 (_bfd_coff_internal_syment_name): Declare.
4402 * libcoff.h: Rebuild.
4403 * configure.in (icoff_big_vec): Add cofflink.o.
4404 (icoff_little_vec): Likewise.
4405 * configure: Rebuild.
4407 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
4409 * Makefile.in (clean-info): Remove extraneous tab from line
4412 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
4414 * cofflink.c (coff_link_input_bfd): Fail if a section with no
4415 contents has relocs.
4417 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
4419 * coffcode.h (coff_compute_section_file_positions): Keep the
4421 (coff_write_object_contents): Remember if it's a relocatable
4423 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
4424 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
4425 if relocatable file. Swap out saved raw size.
4427 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
4429 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
4430 (maintainer-clean): Rename from realclean, passing
4431 maintainer-clean down to subdirectories, but leave realclean as a
4434 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
4437 * dep-in.sed: Remove config.h from generated dependencies.
4439 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
4440 broken out of sunos_canonicalize_dynamic_symtab.
4441 (sunos_canonicalize_dynamic_symtab): Call new function
4442 sunos_slurp_dynamic_symtab.
4443 (sunos_add_dynamic_symbols): Add three new parameters. Return the
4444 dynamic symbol table to the caller.
4445 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
4446 callback to override the symbols being read.
4447 * libaout.h (struct aout_backend_data): Add three new parameters
4448 to add_dynamic_symbols callback.
4450 Extensive minor changes to avoid various gcc warnings. Also:
4451 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
4452 * archures.c (bfd_arch_info_type): Change mach field from long to
4454 (bfd_lookup_arch): Change machine parameter from long to unsigned
4457 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
4459 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
4460 a symbol with a non-zero plt_offset.
4462 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
4464 * elfcode.h (align_file_position): Remove; not used.
4466 * configure.in: Only check for <sys/procfs.h> on a native system,
4467 and make sure it defines prstatus_t.
4468 * configure: Rebuild.
4470 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
4472 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
4474 * config.in: Rename from config.h.in.
4475 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
4476 Check for config.h:config.in when creating stamp-h.
4477 * configure: Rebuild.
4478 * Makefile.in (stamp-h): Depend upon config.in rather than
4479 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
4480 calling config.status.
4482 * Makefile.in (do_distclean): Remove config.h and stamp-h.
4483 (Makefile): Just rebuild Makefile.
4484 (config.h, stamp-h): New targets.
4485 * configure.in: Create stamp-h when rebuilding config.h.
4486 * configure: Rebuild.
4488 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
4490 * configure.in: Call AC_CONFIG_HEADER. Substitute
4491 HOST_64BIT_LONG. Check that various header files exist. Check
4492 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
4493 and/or free need to be declared. Don't make a link to sysdep.h.
4494 Define TRAD_HEADER for various hosts.
4495 * configure: Rebuild.
4496 * configure.host: Don't set my_host. Add definitions taken from
4497 host header files for various entries. Remove entries which now
4499 * acconfig.h: New file.
4500 * config.h.in: New file, built by autoheader.
4501 * sysdep.h: New file.
4502 * Makefile.in (do_distclean): Don't remove sysdep.h.
4504 (LOCAL_H_DEPS): New variable.
4505 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
4507 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
4508 ($(OPTIONAL_BACKENDS)): Likewise.
4509 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4510 looking through sysdep.h.
4511 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4512 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4513 (fprintf_vma, sprintf_vma): Likewise.
4514 (int64_type, uint64_type): Don't define.
4515 * bfd-in2.h: Rebuild.
4516 * archures.c, bfd.c, srec.c: Include <ctype.h>.
4517 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4518 * lynx-core.c: Include stuff from old hosts/lynx.h.
4519 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4520 rather than NO_FCNTL.
4521 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4522 rather than NATIVE_HPPAHPUX_COMPILER.
4523 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
4525 * hosts/*.h: Remove all header files which merely include,
4526 declare, and define things. Leave header files which define
4527 information needed by trad-core.c.
4529 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4530 (BFD_CC_FOR_BUILD): Define.
4531 * configure.in: Use BFD_CC_FOR_BUILD.
4532 * configure: Rebuild.
4534 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
4536 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4537 * configure: Rebuild.
4539 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4542 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
4544 * config.bfd: i386pe_ve -> i386pe_vec.
4546 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
4548 * configure.host: Incorporate host Makefile fragments by setting
4550 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
4551 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
4552 value based on whether the code is being compiled by a cross
4553 compiler. Don't substitute host_makefile_frag or frags.
4554 * aclocal.m4: New file to define local AC_PROG_CC.
4555 * configure: Rebuild.
4556 * Makefile.in (INSTALL): Set to @INSTALL@.
4557 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4558 (INSTALL_DATA): Set to @INSTALL_DATA@.
4560 (CC): Define as @CC@.
4561 (CFLAGS): Set to @CFLAGS@.
4562 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4563 (@host_makefile_frag@): Remove.
4564 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
4565 after other options.
4566 (config.status): Remove dependency upon @frags@.
4567 * config/*.mh, config/README: Remove.
4569 * config.bfd: Rewrite to incorporate the contents of the Makefile
4570 fragments by setting shell variables, rather than merely returning
4571 the name of a Makefile fragment.
4572 * configure.in: Use shell variables set by config.bfd rather than
4573 looking at the target Makefile fragment files. Don't substitute
4574 target_makefile_frag. Do substitute TDEFINES.
4575 * configure: Rebuild.
4576 * Makefile.in (@target_makefile_frag@): Remove.
4577 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4578 * config/*.mt: Remove.
4580 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4582 * configure.in: Put changequote lines around "i[345]86" patterns
4583 section of core file support.
4585 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4587 * som.c (som_bfd_print_private_bfd_data): Define to use the
4590 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4592 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4593 entry, text_start and data_start.
4595 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4597 * Makefile.in (OFILES): Remove $(TDEPFILES).
4598 * config/apollo.mt (TDEPFILES): Remove.
4599 * config/README: Update.
4601 * configure.in: For a native configuration, set COREFILE and
4602 COREFLAG based on the canonical host name.
4603 * configure: Rebuild.
4604 * Makefile.in: Rebuild dependencies.
4605 (ALL_CFLAGS): Add @COREFLAG@.
4606 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4607 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4608 support routines. Check LYNX_CORE rather than HOST_LYNX.
4609 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4610 * i386lynx.c: Likewise.
4611 * m68klynx.c: Likewise.
4612 * sparclynx.c: Likewise.
4613 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4614 * *-core.c: Comment changes.
4615 * config/decstation.mh (HDEPFILES): Remove.
4616 (HDEFINES): Remove -DTRAD_CORE.
4617 * config/irix3.mh (RANLIB): Remove.
4618 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4619 (HDEFINES): Remove -DIRIX_CORE.
4620 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4621 (HDEFINES): Remove -DTRAD_CORE.
4622 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4623 * config/ultra3.mh (RANLIB): Remove.
4624 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4625 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4626 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4627 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4628 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4629 * config/i386aix.mh, config/i386bsd.mh: Remove.
4630 * config/i386linux.mh, config/i386mach3.mh: Remove.
4631 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4632 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4633 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4634 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4635 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4636 * config/solaris2.mh, config/stratus.mh: Remove.
4637 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4638 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4640 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4642 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4643 DT_FINI entry if the appropriate symbol is not in the hash table.
4645 * libelf.h (struct elf_backend_data): Add create_program_headers
4646 and want_hdr_in_seg fields.
4647 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4649 (elf_backend_create_program_headers): Likewise.
4650 (elfNN_bed): Initialize create_program_headers and
4652 * elf.c (get_program_header_size): Call create_program_headers
4654 (map_program_segments): Check want_hdr_in_seg backend field. Call
4655 create_program_headers backend routine.
4657 * elf.c (assign_file_positions_except_relocs): Align non allocated
4658 sections when creating an executable.
4660 * elfcode.h (elf_swap_phdr_in): Make non static.
4661 (elf_swap_phdr_out): Make non static.
4662 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4663 (bfd_elf32_swap_phdr_out): Declare.
4664 (bfd_elf64_swap_phdr_in): Declare.
4665 (bfd_elf64_swap_phdr_out): Declare.
4667 * ecofflink.c (ecoff_collect_shuffle): New static function.
4668 (_bfd_ecoff_get_accumulated_pdr): New function.
4669 (_bfd_ecoff_get_accumulated_sym): New function.
4670 (_bfd_ecoff_get_accumulated_ss): New function.
4671 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4672 (_bfd_ecoff_get_accumulated_sym): Declare.
4673 (_bfd_ecoff_get_accumulated_ss): Declare.
4674 * libbfd.h: Rebuild.
4676 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
4678 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4680 * elflink.h (elf_link_add_object_symbols): Handle indirect and
4681 warning symbols. If any section is named .gnu.warning.XXX, treat
4682 the contents as a warning to be issued if the symbol XXX is
4684 (elf_link_output_extsym): For an indirect or warning symbol, just
4685 output the symbol it points to.
4687 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4688 if bfd_hash_allocate fails, since it will already be set.
4689 (generic_link_hash_newfunc): Likewise.
4690 (archive_hash_newfunc): Likewise.
4691 (hash_entry_bfd): New static function.
4692 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4693 callback. Allocate a new warning using the hash table newfunc.
4694 Use bfd_hash_replace to update the entry in the hash table, rather
4695 than assuming we can copy the fields with structure assignment.
4697 * hash.c (bfd_hash_replace): New function.
4698 * bfd-in.h (bfd_hash_replace): Declare.
4699 * bfd-in2.h: Rebuild.
4701 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
4703 * config.bfd: Add mips*vr4300-*-elf* target.
4704 * config/mipsbvr4300.mt: Added.
4706 See file ChangeLog.2
4713 version-control: never