1 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
3 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
5 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
6 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
7 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
8 (elf64_alpha_link_hash_newfunc): Initialize flags field.
9 (elf64_alpha_check_relocs): Record types of LITUSE entries that
10 are found for LITERAL relocs.
11 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
12 taken, we cannot generate a .plt entry for the symbol.
14 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
16 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
17 sysconf functions (for gprof).
18 * configure, config.in: Rebuild.
20 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
22 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
23 an archive if it has a map. If the object file has the wrong
26 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
27 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
29 (alpha_relocate_section): Likewise.
31 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
32 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
33 (coff_swap_sym_out): Use SYMESZ, not sizeof.
34 (coff_swap_aux_out): Use AUXESZ, not sizeof.
35 (coff_swap_lineno_out): Use LINESZ, not sizeof.
36 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
37 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
38 * peicode.h: Corresponding changes.
40 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
42 * elflink.h (elf_create_pointer_linker_section): Comment out code
43 dealing with making GOT pointers negative of the GOT symbol for
46 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
48 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
49 increment the .rela.plt size until after we're done creating the
51 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
52 .rela.plt offset directly rather than calculating it.
54 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
56 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
57 Use autoconf-set values.
58 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
59 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
62 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
65 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
67 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
68 handling code > 1k away.
70 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
72 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
73 defined, output whenever the symbol is updated.
75 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
77 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
78 section to 0 if user_set_vma is set.
79 * elflink.h (elf_bfd_final_link): Likewise.
81 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
83 Partially undo patch of Jun 20.
84 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
85 (coff_compute_section_file_positions): Likewise.
86 (coff_write_object_contents): Likewise. Re-add deleted code, but
87 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
88 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
90 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
92 * config.bfd: Add support for *-*-rtems* configurations.
94 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
96 * elf.c (prep_headers): Add bfd_arch_alpha case.
98 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
100 * elf64-alpha.c: New file.
101 * config.bfd (alpha-*-linuxecoff*): New target.
102 (alpha-*-linux*, alpha-*-elf*): New targets.
103 * configure.in (bfd_elf64_alpha_vec): New vector.
104 * configure: Rebuild.
105 * targets.c (bfd_elf64_alpha_vec): Declare.
106 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
107 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
108 * bfd-in2.h, libbfd.h: Rebuild.
109 * Makefile.in: Rebuild dependencies.
110 (BFD64_BACKENDS): Add elf64-alpha.o.
111 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
113 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
115 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
116 than relying on a right shift of 32.
118 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
120 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
121 ifdef to COFF_WITH_PE.
122 (coff_compute_section_file_positions): Likewise.
123 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
124 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
125 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
126 COFF_IMAGE_WITH_PE, always include.
128 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
130 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
132 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
133 approximate the correct answer if SIZEOF_HEADERS was not used.
135 * binary.c (binary_set_section_contents): Set section file
136 position based on LMA rather than VMA.
138 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
140 * linker.c (_bfd_generic_link_output_symbols): Don't output any
141 symbols if info->strip == strip_all.
143 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
145 * coff-h8300.c: Remove #if 0 code.
146 (compatable): Don't allow mixing/matching of different architectures.
149 * archures.c (bfd_mach_h8300s): Add.
150 * bfd-in2.h: Rebuilt.
151 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
153 (h8300_reloc16_estimate): Likewise.
154 (h8300_reloc16_extra_cases): Likewise.
155 (h8300_bfd_link_add_symbols): Likewise.
156 * coffcode.h (coff_set_arch_mach_hook): Likewise.
157 (coff_set_flags): Likewise.
158 * cpu-h8300.c (h8300_scan): Likewise.
159 Add H8/S to bfd_h8300_arch list.
162 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
164 Added support for Alpha OpenVMS:
165 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
166 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
167 * config.h-vms, makefile.vms: New files.
168 * config.bfd (alpha-*-*vms*): New target.
169 * configure.in (evax_alpha_vec): New target vector.
170 * configure: Rebuild.
171 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
172 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
173 * targets.c (bfd_target_evax_flavour): Define.
174 (evax_alpha_vec): Declare.
175 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
177 * bfd-in2.h, libbfd.h: Rebuild.
178 * Makefile.in: Rebuild dependencies.
179 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
180 evax-emh.o, and evax-misc.o.
181 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
182 evax-etir.c, evax-emh.c, and evax-misc.c.
183 (HFILES): Add evax.h.
185 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
187 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
189 (h8300_bfd_link_add_symbols): Likewise.
191 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
193 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
194 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
196 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
198 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
199 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
201 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
202 R_MIPS_32 relocs if creating a shared library.
204 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
206 * peicode.h (add_data_entry): Use pei_section_data rather than
207 _cooked_size. Corresponds to May 13 change in coffcode.h.
209 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
211 * cofflink.c (_bfd_coff_final_link): Handle long section names.
212 * coffcode.h (coff_write_object_contents): If there are long
213 section names, always set the f_symptr field, even if there are no
215 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
216 if there are no symbols.
218 * coffgen.c (make_a_section_from_file): Check return value of
219 _bfd_coff_read_string_table.
220 (coff_real_object_p): Check return value of
221 make_a_section_from_file.
222 (_bfd_coff_read_string_table): Check that there are some symbols
223 before trying to read the string table size.
225 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
227 * xcofflink.c (xcoff_link_add_symbols): When considering whether
228 to replace a symbol in a dynamic object with a symbol from another
229 dynamic object, do the replacement if the existing symbol is
232 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
233 for _ptrgl, and treat it as global linkage code.
235 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
236 filename or N_SO symbol past the offset, and use it to indicate
237 that there is no line number or function when appropriate.
239 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
241 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
242 common symbol defined by the linker. Don't export function code
243 even if export_defineds is set.
245 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
247 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
249 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
250 (h8300_symbol_address_p): New function.
251 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
254 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
256 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
258 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
259 correctly for the two variants. Allow relaxing if the target
260 is 128 bytes away since after relaxation it'll be 126 bytes away.
261 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
262 "dot" and "value". Allow relaxing if the target is 128 bytes
263 away since after relaxation it'll be 126 bytes away.
264 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
265 the given section until nothing changes.
267 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
269 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
270 alignment hack--we can get the lnnoptr info another way without
271 suddenly increasing the alignment requirements. Set the flags for
273 (ecoff_compute_section_file_positions): Do so.
275 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
277 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
278 to keep the HP emulator database happy.
280 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
281 From Kevin Buettner <kev@primenet.com>.
283 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
285 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
286 name of a NULL section.
288 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
290 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
291 set, always call the notice callback.
293 * VERSION: Increment for bfdlink.h change.
295 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
297 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
298 (sh_relax_delete_bytes): Correct handling of differently sized
299 trailing alignment reloc.
301 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
302 * bfd-in2.h: Rebuild.
303 * configure.in: Warn if there is no known 64 bit type.
304 * configure: Rebuild.
306 * Makefile.in: Rebuild dependencies.
307 (BFD32_BACKENDS): Add ppcboot.o.
308 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
310 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
311 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
313 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
315 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
316 (bfd_mips_elf64_swap_reginfo_out): Move from here...
317 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
318 (bfd_mips_elf64_swap_reginfo_out): ...to here.
320 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
322 * elf64-mips.c: Improve reloc special_functions and handling of
323 SHT_MIPS_OPTIONS section.
324 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
325 mips_elf_hi16_reloc and make globally visible.
326 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
327 make globally visible.
328 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
329 make globally visible.
330 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
331 and make globally visible.
332 (gprel16_with_gp): Check howto->src_mask before using value in
334 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
335 and make globally visible.
336 (gprel32_with_gp): Check howto->src_mask before fetching value.
337 (bfd_mips_elf_swap_options_in): New function.
338 (bfd_mips_elf_swap_options_out): New function.
339 (_bfd_mips_elf_set_private_flags): Rename from
340 mips_elf_set_private_flags and make globally visible.
341 (_bfd_mips_elf_copy_private_bfd_data): Rename from
342 mips_elf_copy_private_bfd_data and make globally visible.
343 (_bfd_mips_elf_merge_private_bfd_data): Rename from
344 mips_elf_merge_private_bfd_data and make globally visible.
345 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
346 for a SHT_MIPS_OPTIONS section.
347 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
348 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
349 name of a SHT_MIPS_OPTIONS section.
350 (_bfd_mips_elf_set_section_contents): New function.
351 (mips_elf32_section_processing): Set the GP value in a
352 SHT_MIPS_OPTIONS section.
353 (_bfd_mips_elf_find_nearest_line): Rename from
354 mips_elf_find_nearest_line and make globally visible.
355 (bfd_elf32_set_section_contents): Define.
356 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
357 (_bfd_mips_elf_lo16_reloc): Declare.
358 (_bfd_mips_elf_gprel16_reloc): Declare.
359 (_bfd_mips_elf_got16_reloc): Declare.
360 (_bfd_mips_elf_gprel32_reloc): Declare.
361 (_bfd_mips_elf_set_private_flags): Declare.
362 (_bfd_mips_elf_copy_private_bfd_data): Declare.
363 (_bfd_mips_elf_merge_private_bfd_data): Declare.
364 (_bfd_mips_elf_find_nearest_line): Declare.
365 (_bfd_mips_elf_set_section_contents): Declare.
367 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
369 (elf_info_to_howto): Define.
370 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
372 (elf_info_to_howto): Define.
373 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
375 (elf_info_to_howto): Define.
377 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
378 R_MOV16B[12], to match change in coff/internal.h.
380 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
382 * elf64-mips.c: Extensive additions to provide better support for
383 writing files and for gas.
384 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
385 of mips_elf_object_p.
386 (mips_elf32_object_p): Rename from mips_elf_object_p; call
387 _bfd_mips_elf_object_p.
388 (_bfd_mips_elf_final_write_processing): Rename from
389 mips_elf_final_write_processing and make globally visible.
390 (_bfd_mips_elf_fake_sections): Rename from
391 mips_elf_fake_sections and make globally visible.
392 (_bfd_mips_elf_section_from_bfd_section): Rename from
393 mips_elf_section_from_bfd_section and make globally visible.
394 (_bfd_mips_elf_section_processing): New function, broken out of
395 mips_elf_section_processing.
396 (mips_elf32_section_processing): Rename from
397 mips_elf_section_processing; call
398 _bfd_mips_elf_section_processing.
399 (_bfd_mips_elf_symbol_processing): Rename from
400 mips_elf_symbol_processing and make globally visible.
401 (_bfd_mips_elf_read_ecoff_info): Rename from
402 mips_elf_read_ecoff_info and make globally visible.
403 (mips_elf32_ecoff_debug_swap): Rename from
404 mips_elf_ecoff_debug_swap.
405 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
406 struct symbol_cache_entry.
407 (_bfd_elf_validate_reloc): New function, moved in from
408 elfcode.h:validate_reloc.
409 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
410 to _bfd_elf_validate_reloc. Change all callers.
411 * elf-bfd.h (bfd_section_from_shdr): Declare.
412 (_bfd_elf_symbol_from_bfd_symbol): Declare.
413 (_bfd_elf_validate_reloc): Declare.
414 (_bfd_mips_elf_object_p): Declare.
415 (_bfd_mips_elf_fake_sections): Declare.
416 (_bfd_mips_elf_section_from_bfd_section): Declare.
417 (_bfd_mips_elf_section_processing): Declare.
418 (_bfd_mips_elf_symbol_processing): Declare.
419 (_bfd_mips_elf_read_ecoff_info): Declare.
420 (_bfd_mips_elf_final_write_processing): Declare.
421 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
424 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
425 (mips_elf_final_write_processing): Likewise.
427 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
429 64-bit MIPS ELF ABI objdump support:
430 * elf64-mips.c: New file.
431 * Makefile.in: Rebuild dependencies.
432 (BFD64_BACKENDS): Add elf64-mips.o.
433 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
434 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
435 bfd_elf64_littlemips_vec to targ_selvecs.
436 (mips*-*-elf*): Likewise.
437 * confingure.in: Add bfd_elf64_bigmips_vec and
438 bfd_elf64_littlemips_vec to vector switch.
439 * configure: Rebuild.
440 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
441 broken out of mips_elf_section_from_shdr.
442 (mips_elf32_section_from_shdr): Rename from
443 mips_elf_section_from_shdr. Call new function.
444 (elf_backend_section_from_shdr): Update name of renamed function.
445 * elf-bfd.h (struct elf_size_info): Change second parameter of
446 write_out_phdrs to be const. Likewise for second parameter of
448 (struct bfd_elf_section_data): Add rel_hdr2 field.
449 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
450 (bfd_elf32_swap_symbol_out): Likewise.
451 (bfd_elf32_swap_reloc_in): Likewise.
452 (bfd_elf32_swap_reloc_out): Likewise.
453 (bfd_elf32_swap_reloca_in): Likewise.
454 (bfd_elf32_swap_reloca_out): Likewise.
455 (bfd_elf32_swap_phdr_in): Likewise.
456 (bfd_elf32_swap_phdr_out): Likewise.
457 (bfd_elf32_swap_dyn_in): Likewise.
458 (bfd_elf32_swap_dyn_out): Likewise.
459 (bfd_elf32_slurp_symbol_table): Declare.
460 (bfd_elf32_write_shdrs_and_ehdr): Declare.
461 (bfd_elf32_write_out_phdrs): Declare.
462 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
463 (bfd_elf64_swap_symbol_out): Likewise.
464 (bfd_elf64_swap_reloc_in): Likewise.
465 (bfd_elf64_swap_reloc_out): Likewise.
466 (bfd_elf64_swap_reloca_in): Likewise.
467 (bfd_elf64_swap_reloca_out): Likewise.
468 (bfd_elf64_swap_phdr_in): Likewise.
469 (bfd_elf64_swap_phdr_out): Likewise.
470 (bfd_elf64_swap_dyn_in): Likewise.
471 (bfd_elf64_swap_dyn_out): Likewise.
472 (bfd_elf64_slurp_symbol_table): Declare.
473 (bfd_elf64_write_shdrs_and_ehdr): Declare.
474 (bfd_elf64_write_out_phdrs): Declare.
475 (_bfd_mips_elf_section_from_shdr): Declare.
476 * elf.c (bfd_section_from_shdr): Remove assertion requiring
477 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
478 section for the section, add the new one to rel_hdr2. Increment
479 reloc_count rather than setting it.
480 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
481 Remove static declaration.
482 (elf_write_shdrs_and_ehdr): Define name as macro.
483 (elf_write_out_phdrs): Likewise.
484 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
485 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
486 (elf_swap_symbol_in): Change second parameter to be const.
487 (elf_swap_symbol_out): Likewise.
488 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
489 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
490 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
491 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
492 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
493 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
494 parameter to be const. Make non-static.
495 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
497 (elf_slurp_symbol_table): Make non-static.
498 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
499 * elfxx-target.h (elf_info_to_howto): Define if not defined.
500 (elf_backend_size_info): Likewise.
501 (elfNN_bed): Use elf_backend_size_info.
502 * targets.c (bfd_elf64_bigmips_vec): Declare.
503 (bfd_elf64_littlemips_vec): Declare.
504 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
505 bfd_elf64_littlemips_vec if BFD64 is defined.
507 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
509 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
511 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
512 zeroes, in alignment holes.
514 * configure: Rebuild with autoconf 2.10.
516 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
517 potential leading underscore in the allocated buffer.
519 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
521 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
522 symbols into .sbss if this is a relocatable link.
524 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
526 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
527 undefined symbols when creating a shared library.
529 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
531 * coff-sh.c: Add a bunch of new code and static const arrays to
532 support aligning loads and stores on four byte memory boundaries.
534 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
536 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
538 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
541 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
543 * cache.c (bfd_open_file): Unlink the file before opening it for
544 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
546 * opncls.c (bfd_fdopenr): Set opened_once.
548 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
550 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
553 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
554 the code unconditionally.
556 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
558 * libcoff-in.h (struct pei_section_tdata): Define structure.
559 (pei_section_data): Define macro.
560 * libcoff.h: Rebuild.
561 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
562 store s_paddr field in pei_section_data.
563 (coff_compute_section_file_positions): Use pei_section_data rather
564 than _cooked_size, and don't overwrite an existing value.
565 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
566 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
567 * peicode.h (coff_bfd_copy_private_section_data): Define if
569 (pe_bfd_copy_private_section_data): New static function if
572 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
574 * srec.c (srec_set_arch_mach): Write as a function rather than a
577 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
578 no map, just check each member in turn to see whether it is
581 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
583 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
584 table. Call BFD_ASSERT to validate header size, instead of
586 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
589 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
591 * ppcboot.c: New target for looking at PPCbug boot records.
593 * config{ure.in,.bfd}: Add support for ppcboot target.
595 * configure: Regenerate.
597 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
599 * coff-h8300.c (howto_table): Update names to match recent
600 changes to include/coff/internal.h. Fix minor errors in the
601 existing relocs. Add R_MOVL1 and R_MOVL2.
602 (rtype2howto): Similarly.
603 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
604 existing relaxing code and peform more relaxing.
605 (h8300_reloc16_extra_cases): Likewise.
607 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
609 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
612 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
614 * elfcode.h (elf_object_p): Reject generic ELF target if
615 e_machine matches an alternate machine code in a specific backend.
617 * netbsd-core.c (netbsd_core_vec): Remove initializer for
618 obsolete align_power_min field.
620 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
622 * coff-h8300.c (reloc_howto_type): Add howto entry for
624 (rtype2howto): Handle R_PCRWORD_B.
625 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
626 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
627 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
630 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
632 * aoutx.h (translate_from_native_sym_flags): Set the section for
633 BSF_CONSTRUCTOR symbols.
635 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
638 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
640 * coffcode.h (coff_write_object_contents): In comdat section lookup,
641 stop looking when section is found.
643 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
645 * coffcode.h (STRING_SIZE_SIZE): Define.
646 (styp_to_sec_flags): Handle long symbol names when looking for the
648 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
649 (bfd_coff_long_section_names): Define.
650 (coff_write_object_contents): Handle long section names.
651 (bfd_coff_std_swap_table): Initialize new field.
652 * libcoff.h: Rebuild.
653 * coffgen.c (make_a_section_from_file): Handle long section
655 (coff_write_symbols): Handle long section names.
656 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
657 * coff-mips.c (mips_ecoff_backend_data): Likewise.
658 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
659 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
660 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
661 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
662 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
663 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
665 * bout.c (b_out_callback): Set lma of sections.
666 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
667 parameter to output_bfd. Used input_bfd instead of output_bfd in
670 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
672 * aoutx.h (translate_from_native_sym_flags): Don't create
673 SEC_CONSTRUCTOR sections.
674 * ecoff.c (ecoff_set_symbol_info): Likewise.
676 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
677 From Don Bowman <bowman@waterloo.hp.com>.
679 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
681 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
682 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
684 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
686 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
687 mips_32_relocs field.
688 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
689 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
690 relocs against a global symbol which is not defined in a regular
692 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
693 against a global symbol, increment mips_32_relocs.
694 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
695 the symbol is not defined in a regular file, make room in the
698 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
700 * ecoff.c (ecoff_compute_section_file_positions): Track the real
701 file position and the virtual file position separately. Set
702 filepos information bsaed on the real file position.
703 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
704 Jan 23 change to coffcode.h.
706 * som.c (som_slurp_symbol_table): Set the symbol count to the
707 number of BFD symbols created.
709 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
711 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
712 output file if linking shared objects. Loop to check all relocs,
713 rather than returning false on first error.
715 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
717 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
718 (ppc_elf_additional_program_headers): If .interp section, bump #
719 of program headers by 1.
720 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
721 (ppc_elf_size_dynamic_sections): Add support for .plt section.
722 (ppc_elf_check_relocs): Print out filename in debug code. Enable
724 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
726 (ppc_elf_relocate_section): If the output section isn't defined,
727 don't abort, just give an error message.
729 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
730 being created is .sdata or .sdata2, don't make the symbol dynamic.
732 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
734 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
735 members of an archive for dynamic objects with no symbols, and
736 pass them directly to check_archive_element.
737 (xcoff_link_check_ar_symbols): Pass dynamic objects to
738 xcoff_link_check_dynamic_ar_symbols.
739 (xcoff_link_check_dynamic_ar_symbols): New static function.
741 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
742 from _bfd_nodynamic to _bfd_xcoff.
743 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
745 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
746 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
747 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
748 * libcoff.h: Rebuild.
749 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
750 (xcoff_get_section_contents): New static function.
751 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
752 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
753 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
754 (xcoff_dynamic_reloc): New static variable.
755 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
756 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
758 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
760 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
761 if reloc_entry->addend is not 0.
762 (CALC_ADDEND): Just set the addend to reloc.r_offset.
764 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
766 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
768 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
769 Add entries for R_SPARC_[56].
770 (sparc_reloc_map): Add entries for R_SPARC_[56].
772 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
774 Optimize linking of stabs in sections as used in ELF and COFF.
776 * libbfd-in.h (_bfd_link_section_stabs): Declare.
777 (_bfd_write_section_stabs): Declare.
778 (_bfd_write_stab_strings): Declare.
780 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
781 (struct coff_link_hash_table): Add stab_info field.
782 * libcoff.h: Rebuild.
783 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
785 (coff_link_add_symbols): Call _bfd_link_section_stabs if
787 (_bfd_coff_final_link): Write out stab strings hash table.
788 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
789 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
791 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
792 (struct bfd_elf_section_data): Add stab_info field.
793 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
795 * elflink.h (elf_link_add_object_symbols): If appropriate, call
796 _bfd_link_section_stabs.
797 (elf_bfd_final_link): Write out stab strings hash table.
798 (elf_link_input_bfd): Handle optimized stabs sections.
799 * reloc.c (_bfd_final_link_relocate): Check address against
800 _raw_size rather than _cooked_size.
801 * Makefile.in: Rebuild dependencies.
802 (BFD_LIBS): Add stabs.o
803 (BFD_LIBS_CFILES): Add stabs.c.
805 * VERSION: Increment for bfdlink.h change.
807 * coffgen.c (coff_renumber_symbols): Correct handling of
808 BSF_NOT_AT_END common symbols.
810 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
812 * coff-ppc.c (record_toc): Add cast to avoid warning.
813 (ppc_allocate_toc_section): Likewise.
814 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
815 (ppc_coff_reloc_type_lookup): Remove unreached code.
816 * coffcode.h (coff_write_object_contents): Don't take the address
818 * peicode.h (pe_print_idata): Add casts to avoid warning.
819 (pe_print_edata): Likewise.
820 (pe_print_reloc): Remove ANSI C string concatenation.
822 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
824 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
826 * libcoff.h: Rebuild.
827 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
829 (coff_swap_aux_out): Likewise.
830 * peicode.h (coff_swap_aux_in): Likewise.
831 (coff_swap_aux_out): Likewise.
832 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
834 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
836 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
837 Fix up .bf endndx link fields.
838 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
840 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
843 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
845 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
846 on Solaris PowerPC systems doesn't get confused.
848 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
851 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
852 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
853 update did_reg and did_reg2.
855 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
857 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
859 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
860 callback routines, pass h->root.string rather than name, in case
861 copy is true and name is transient.
863 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
865 * elfcore.h: Add support for core files with multiple threads.
866 (Primarily for Solaris.)
868 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
870 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
871 section->orelocation is NULL.
873 * coffgen.c (bfd_coff_get_syment): New function.
874 (bfd_coff_get_auxent): New function.
875 * bfd-in.h (bfd_coff_get_syment): Declare.
876 (bfd_coff_get_auxent): Declare.
877 * bfd-in2.h: Rebuild.
879 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
881 * elf32-mips.c (struct mips_hi16): Define.
882 (mips_hi16_addr, mips_hi16_addend): Remove.
883 (mips_hi16_list): New static variable.
884 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
885 (mips_elf_lo16_reloc): Process mips_hi16_list.
886 (mips_elf_relocate_section): Permit an arbitrary number of HI16
887 relocs before the associated LO16 reloc.
889 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
891 * versados.c (versados_scan): Check bfd_alloc return value.
892 (versados_object_p): Check all bfd_read return values. Require
893 that lang field be less than 10, to avoid confusion with Intel Hex
896 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
898 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
899 not 0, for an absolute symbol.
900 (NAME(aout,swap_ext_reloc_out)): Likewise.
902 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
903 (ihex_write_object_contents): For a large start address, output
904 the full 32 bit address in record type 5.
906 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
907 to int to avoid promotion problems in prototype.
909 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
911 * configure.host: Use ${srcdir} when looking for picfrag.
913 * configure.host: Switch on ${libdir}, not $(libdir). From
914 alan@spri.levels.unisa.edu.au (Alan Modra).
916 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
917 entry point, not just for DYNAMIC objects.
918 * sunos.c (sunos_add_dynamic_symbols): Always call
919 sunos_create_dynamic_sections. If called with a non DYNAMIC
920 object, don't do anything else.
921 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
923 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
925 * configure.in: Permit --enable-shared to specify a list of
927 * configure: Rebuild.
929 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
930 host when configuring with --enable-shard.
932 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
934 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
937 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
938 to avoid crashing in bfd_hash_replace.
940 * sysdep.h: Use #ifdef, not #if.
942 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
944 * config.in: Rebuild.
946 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
948 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
949 (AC_CHECK_HEADERS): Check for sys/time.h
950 (AC_HEADER_TIME): Add macro.
951 * configure: Rebuild.
952 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
953 to control what combination of <time> and <sys/time.h>
956 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
958 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
959 (aout_32_sunos4_write_object_contents): Likewise.
960 * aoutx.h (NAME(aout,machine_type)): Handle
961 bfd_mach_sparc_{sparclet,sparclite}.
962 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
963 (bfd_mach_sparc_v9_p): Update.
964 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
965 * libaout.h (enum machine_type): Add M_SPARCLET.
966 * sunos.c (MACHTYPE_OK): Define.
967 * bfd-in2.h: Regenerated.
969 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
971 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
972 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
973 * elflink.c (_bfd_elf_create_got_section): Store the
974 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
975 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
976 global offset table goes over 0x1000, set the value of
977 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
978 (elf32_sparc_relocate_section): Subtract the offset of
979 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
981 * elfcode.h: Don't include <string.h>.
983 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
985 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
986 generic_link_hash_newfunc. All references changed.
987 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
988 moved here from libbfd-in.h.
989 * libbfd-in.h: Corresponding changes.
990 * libbfd.h: Regenerated.
992 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
994 * aoutx.h (aout_link_input_section_std): When reporting an
995 overflow error, use the name of the symbol in the hash table if
997 (aout_link_input_section_ext): Likewise.
999 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1000 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1002 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1004 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1005 * coffcode.h (coff_compute_section_file_positions): Likewise.
1006 (coff_write_object_contents): Likewise.
1008 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1010 * section.c (SEC_LINK_ONCE): Define.
1011 (SEC_LINK_DUPLICATES): Define.
1012 (SEC_LINK_DUPLICATES_DISCARD): Define.
1013 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1014 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1015 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1016 * bfd-in2.h: Rebuild.
1017 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1018 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1019 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1020 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1021 SEC_LINK_ONCE, and look through the symbol table for the setting
1022 for SEC_LINK_DUPLICATES.
1023 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1024 set for a section, find the section symbol in the symbol table,
1025 and set the aux entry based on SEC_LINK_DUPLICATES.
1026 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1027 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1028 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1029 * coff-i386.c (i386coff_vec): Likewise.
1030 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1032 * VERSION: Bump to 2.6.1.
1033 * Makefile.in (stamp-h): Depend upon VERSION.
1035 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1037 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1038 * libbfd.h: Rebuilt.
1039 * linker.c (generic_link_hash_newfunc): No longer static.
1040 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1042 * coff-h8300.c: Add two derived hash tables and their associated
1043 funtions and #defines for use by the h8300 linker.
1044 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1045 the function vector as needed. Place the address of the function
1046 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1047 Rewrite the vectors section contents as necessary.
1048 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1049 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1050 (coff_bfd_link_hash_table_create): Likewise.
1052 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1054 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1055 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1057 (hppa_rebuild_insn): Pass pointer to correct type to
1058 low_sign_unext and dis_assemble_21.
1060 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1062 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1063 Stick with sparc-*-{sysv4*,solaris2*}.
1065 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1067 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1068 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1069 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1070 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1071 fields is non-zero, print them.
1073 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1074 ifdef. Remove unused variables.
1075 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1077 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1078 (get_symbol_value): Ifdef out.
1079 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1080 (coff_ppc_relocate_section): Remove unused variables. Make
1081 fprintf strings and argument types correspond. Put before_addr in
1083 (dump_toc): Make fprintf strings and argument types correspond.
1084 (ppc_process_before_allocation): Remove unused variables. Always
1086 (ppc_reflo_reloc): Ifdef out.
1087 (ppc_addr32nb_reloc): Ifdef out.
1088 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1090 (coff_ppc_rtype_to_howto): Likewise.
1091 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1093 * peicode.h (pe_print_idata): Move otherwise unused variables into
1094 the #ifdef where they are used. Always return a value.
1095 (pe_print_edata): Make fprintf strings and argument types
1096 correspond. Always return a value.
1097 (pe_print_pdata): Removed unused variable addr_value. Always
1099 (pe_print_reloc): Remove unused variable onaline. Make fprintf
1100 strings and argument types correspond. Always return a value.
1102 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1103 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1104 variable rela inside #if 0 section where it is used.
1106 * ns32k.h: New file.
1107 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1108 functions to start with _bfd_.
1109 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1110 functions in cpu-ns32k.h.
1111 * Makefile.in: Rebuild dependencies.
1112 (HFILES): Add ns32k.h.
1114 * section.c (struct sec): Add linker_mark field. Change
1115 user_set_vma and reloc_done to be single bit fields.
1116 (STD_SECTION): Update accordingly.
1117 * bfd-in2.h: Rebuild.
1118 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1120 (aout_link_input_bfd): Don't link unmarked sections.
1121 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1123 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1124 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1126 * elflink.h (elf_bfd_final_link): Mark sections included in the
1128 (elf_link_input_bfd): Don't link unmarked sections.
1129 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1131 (xcoff_link_input_bfd): Don't link unmarked sections.
1133 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1134 overflow error messages.
1136 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1138 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1139 is not set, print "BFD: " before the error message.
1141 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1142 Miles Bader <miles@gnu.ai.mit.edu>.
1143 * configure: Rebuild.
1145 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1147 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1150 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1151 m68k-aout, m68k-coff, and m68k-elf targets.
1153 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1155 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1156 (ieee_generic_stat_arch_elt): Restructured to prevent
1157 ieee_object_p from being called repeatedly.
1159 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1161 * coffcode.h (coff_write_object_contents): Allocate
1162 buffers large enough for any FILEHDR or AOUTHDR.
1164 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1166 * ecofflink.c (lookup_line): New static function, renamed and
1167 slighly changed from old _bfd_ecoff_locate_line.
1168 (_bfd_ecoff_locate_line): Cache line number information. Use
1169 lookup_line for actual lookup.
1171 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1173 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1174 multiple of 20 bytes.
1176 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1178 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1179 allocate ecoff_find_line, and don't initialize by hand.
1180 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1181 mips_elf_find_line, and don't call memset.
1183 * coffcode.h (coff_compute_section_file_positions): If not
1184 producing a final executable, don't consider sofar when aligning
1185 the section to the correct size.
1187 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1189 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1190 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1191 * coffgen.c (coff_section_symbol): Ifdef out.
1193 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1195 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1196 output_bfd is not NULL.
1198 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1200 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1201 of bfd_alloc (fixes fix_line not being initialized).
1202 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1204 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1206 * coffcode.h: Allow specific backends to override the
1207 bfd_link_add_symbols routine.
1209 * coff-h8300.c: Include genlink.h.
1210 (howto_table): Add R_MEM_INDIRECT.
1211 (rtype2howto): Support R_MEM_INDIRECT.
1212 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1215 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1217 * coff-alpha.c (alpha_relocate_section): Use
1218 info->callbacks_warning, rather than _bfd_error_handler, for
1219 "multiple gp" warning.
1221 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1223 * linker.c (bfd_wrapped_link_hash_lookup): New function.
1224 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
1225 table string. Use bfd_wrapped_link_hash_lookup.
1226 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
1228 * aoutx.h (aout_link_write_symbols): Use the name from the hash
1229 table, if any, when writing out symbols.
1230 (aout_link_input_section_std): Use the name from the hash table,
1231 if any, when reporting undefined symbols.
1232 (aout_link_input_section_ext): Likewise.
1233 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
1234 * bout.c (get_value): Likewise.
1235 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1236 * ecoff.c (ecoff_reloc_link_order): Likewise.
1237 * elflink.h (elf_link_add_object_symbols): Likewise.
1238 (elf_reloc_link_order): Likewise.
1239 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1240 (_bfd_generic_reloc_link_order): Likewise.
1241 (default_indirect_link_order): Likewise.
1242 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1243 * sunos.c (sunos_add_one_symbol): Likewise.
1244 * xcofflink.c (xcoff_link_add_symbols): Likewise.
1245 (bfd_xcoff_link_count_reloc): Likewise.
1246 (xcoff_reloc_link_order): Likewise.
1248 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
1249 into -1 for intern->rss.
1251 * configure: Rebuild with autoconf 2.8.
1253 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
1255 * stab-syms.c (__define_stab_duplicate): Define.
1256 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
1258 * bfd-in.h (bfd_get_stab_name): Declare.
1259 * bfd-in2.h: Rebuild.
1260 * Makefile.in: Rebuild dependencies.
1261 (BFD_LIBS): Add stab-syms.o.
1262 (BFD_LIBS_CFILES): Add stab-syms.c.
1263 (BFD32_BACKENDS): Remove stab-syms.o.
1264 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
1265 * configure.in: Don't list stab-syms.o in bfd_backends.
1266 * configure: Rebuild.
1267 * libaout.h (aout_stab_name): Don't declare.
1268 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
1271 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
1273 * elf.c (assign_file_positions_for_segments): Adjust file offset
1274 for section alignment even if SEC_LOAD is not set.
1276 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
1278 * configure.in: Don't set SHLIB or SHLINK to an empty string,
1279 since they appear as targets in Makefile.in.
1280 * configure: Rebuild.
1282 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
1283 don't fiddle with a symbol which is not defined anywhere.
1285 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
1287 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
1288 though they are defined in a shared library.
1289 (xcoff_build_ldsyms): Likewise.
1291 * coffgen.c (coff_find_nearest_line): Don't look at the line
1292 numbers for the section if section->lineno is NULL.
1294 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
1295 message rather than calling BFD_ASSERT.
1296 * elfcode.h (write_relocs): Check return value of
1297 _bfd_elf_symbol_from_bfd_symbol.
1299 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1301 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
1304 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
1306 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
1308 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
1309 hppa_reloc_field_selector_type_alt.
1310 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
1311 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
1313 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
1315 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
1317 * elf.c (assign_file_positions_for_segments): Adjust the segment
1318 memory size for the alignment of a SEC_ALLOC section, not just a
1321 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1323 * m68klinux.c: New file.
1324 * hosts/m68klinux.h: New file.
1325 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
1326 * configure.in (m68*-*-linux*): New native host.
1327 (m68klinux_vec): New vector.
1328 * configure: Rebuild.
1329 * targets.c (m68klinux_vec): Declare.
1330 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
1331 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
1332 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
1333 declaration from bfd_linux_size_dynamic_sections.
1334 (bfd_m68klinux_size_dynamic_sections): Declare.
1335 * bfd-in2.h: Rebuild.
1336 * Makefile.in: Rebuild dependencies.
1337 (BFD32_BACKENDS): Add m68klinux.o.
1338 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
1340 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
1342 * libhppa.h (pa_arch): Add pa20.
1343 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
1344 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
1345 (hppa_field_adjust): Handle e_nsel.
1346 * som.c: Provide default definitions for many new relocs found only
1347 in hpux10 include files.
1348 (som_fixup_formats): Add several new relocs from hpux10.
1349 (som_hppa_howto_table): Add hpux10 relocs.
1350 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
1352 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
1354 * mpw-make.sed: Edit out recent shared library support, and
1355 rules to rebuild .h files using doc/chew.
1357 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
1359 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
1360 size even of sections with no contents.
1362 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
1364 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1365 starting with '$' the way we skip names starting with '.'. When
1366 updating x_endndx, don't be fooled by an index which has been
1369 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1370 struct/union/enum type with no elements.
1372 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
1374 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1376 * archive.c (bfd_generic_archive_p): If the first file in the
1377 archive can not be recognized as an object, don't assume that this
1378 is the wrong format.
1380 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1381 format is not bfd_object.
1382 (bfd_elf_get_dt_soname): Likewise.
1384 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
1386 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1389 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1391 * bfd.c (tdata): Add netbsd_core_data.
1392 * bfd-in2.h: Regenerated.
1394 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
1396 * sunos.c (SUNOS_CONSTRUCTOR): Define.
1397 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1398 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
1401 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1402 to get the symbol index, matching 14 Jul 95 change.
1404 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
1406 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1407 Remove duplicate definition of gp.
1409 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
1411 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1412 assume that we can set the GP value and then get the same value,
1413 since it won't be true if the output file is neither ELF nor
1415 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1416 _bfd_get_gp_value here.
1417 (mips_gprel_reloc): Don't assume we can set and get the GP value.
1418 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1420 (mips_elf_lo16_reloc): Likewise.
1421 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
1422 Don't require that the BFD be ELF.
1423 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1424 (mips_elf_gprel32_reloc): Likewise.
1425 (mips_elf_relocate_section): Don't assume we can set and get the
1427 (mips_elf_finish_dynamic_symbol): Don't bother to use
1428 _bfd_get_gp_value here.
1430 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1431 Don't change epdr between malloc and free. Be careful not to free
1432 NULL pointers. Zero out the first RPDR.
1434 * configure.host: On Linux, only pass -rpath option if $(libdir)
1435 is neither /lib nor /usr/lib. From Alan Modra
1436 <alan@mullet.Levels.UniSA.Edu.Au>.
1438 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1440 (elf_dt_name): Rename from elf_dt_needed_name.
1441 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1443 (bfd_elf_get_dt_soname): New function.
1444 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1445 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1446 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1447 * bfd-in2.h: Rebuild.
1449 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1451 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1452 _bfd_sparc_elf_reloc_type_lookup.
1453 (bfd_elf32_bfd_reloc_type_lookup): Update.
1454 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1455 (sparc64_elf_howto_table): Define.
1456 (sparc_reloc_map): Define.
1457 (sparc64_elf_reloc_type_lookup): New function.
1458 (sparc_elf_wdisp16_reloc): New function.
1459 (elf_info_to_howto): Use sparc64_elf_howto_table.
1460 (sparc64_elf_relocate_section): Likewise.
1461 (bfd_elf64_bfd_reloc_type_lookup): Update.
1463 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1465 * configure.host: Check for 'do not mix' from native linker before
1466 trying to use -rpath.
1468 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1470 * bfd.c (_bfd_get_gp_value): New function.
1471 (_bfd_set_gp_value): New function.
1472 * libbfd-in.h (_bfd_get_gp_value): Declare.
1473 (_bfd_set_gp_value): Declare.
1474 * libbfd.h: Rebuild.
1475 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1476 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1477 directly to the fields in the tdata information.
1478 (alpha_relocate_section): Likewise.
1479 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1480 (mips_gprel_reloc): Likewise.
1481 (mips_relocate_section): Likewise.
1482 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1483 (mips_elf_lo16_reloc): Likewise.
1484 (mips_elf_final_gp): Likewise.
1485 (mips_elf_gprel16_reloc): Likewise.
1486 (mips_elf_gprel32_reloc): Likewise.
1487 (mips_elf_relocate_section): Likewise.
1488 (mips_elf_finish_dynamic_symbol): Likewise.
1490 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1492 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1494 * configure.in: Call AC_PROG_CC before configure.host.
1495 * configure: Rebuild.
1496 * configure.host: Don't set information which autoconf should
1497 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1499 * configure.host: Remove go32 and win32 host information, since it
1500 should no longer be needed.
1502 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1503 then start a new segment rather than put a writable section in a
1506 * configure.host: Set RPATH_ENVVAR.
1508 * Makefile.in: Rebuild dependencies.
1510 * elflink.c (_bfd_elf_create_linker_section): Remove unused
1511 zero_section variable.
1513 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
1515 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1516 ($(srcdir)/libbfd.h): Rename from libbfd.h.
1517 ($(srcdir)/libcoff.h): Rename from libcoff.h.
1519 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
1521 * ieee.c (ieee_write_expression): Only use an R variable for a
1522 local symbol. Don't output a zero offset. Handle a zero address.
1523 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1524 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1526 (parse_expression): Don't try to handle multiple occurrences of a
1527 P variable. Handle I variables differently from X variables. Fix
1528 the order of minus expressions.
1529 (ieee_slurp_external_symbols): Generate an I variable for an NN
1530 record. Fix handling of ATI and ATX records.
1531 (ieee_slurp_sections): Only set minimal section attributes.
1532 Adjust them later, based on the section contents.
1533 (ieee_object_p): Read in the file until just after the ME record.
1534 Call ieee_slurp_section_data to set the section flags.
1535 (do_one): Add iterations parameter. Only repeat the first load
1536 item. Set the section and file reloc flags.
1537 (ieee_slurp_section_data): Set section flags. Pass iterations to
1539 (ieee_canonicalize_reloc): Handle I variables.
1540 (do_with_relocs): Only emit relocation size when necessary.
1541 Increase MAXRUN to 127. Change ov to be assigned, and take
1542 src_mask and pcrel_offset into account.
1543 (ieee_write_data_part): Skip sections that are not loaded.
1544 (ieee_write_external_part): Don't output optional last entry of WX
1546 (ieee_write_me_part): Make setting of me_record neater.
1547 (ieee_generic_stat_arch_elt): Get the size of an archive element.
1549 * syms.c (stt): Add entries for zerovars, vars, and code.
1551 * elfcode.h (validate_reloc): New static function.
1552 (write_relocs): Call validate_reloc for non ELF relocs.
1554 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1555 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1556 (TARGET_LITTLE_SYM): Likewise.
1558 * config.bfd (m68*-*-psos*): New target.
1560 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
1562 * i386msdos.c: Remove some #if 0 code.
1563 (msdos_write_object_contents): Don't include empty sections in the
1564 size computation, regardless of their address.
1566 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1568 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1569 is NULL, ie, the -r switch is used.
1571 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
1573 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1574 (BFD_RELOC_MIPS_GOT_LO16): Define.
1575 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1576 * bfd-in2.h, libbfd.h: Rebuild.
1577 * elf32-mips.c (mips_reloc_map): Map new relocs.
1579 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1581 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1584 * ieee.c (get_symbol): Set the section to bfd_abs_section.
1585 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1586 simple number for the section address, rather than an expression.
1587 Limit the number of bytes between relocs to MAXRUN.
1588 (ieee_write_me_part): Set me_record to the file offset after the
1590 (ieee_write_processor): New static function.
1591 (ieee_write_object_contents): Use ieee_write_processor.
1593 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
1595 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1597 * coff-aux.c: Change include of aux.h to aux-coff.h.
1599 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1601 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1602 relocation put the addend both in the reloc entry and the data.
1603 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
1606 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1607 a R_68K_PCxx reloc against a defined global symbol directly.
1608 (elf_m68k_check_relocs): Don't count such a reloc.
1610 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1611 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
1612 symbol for now, otherwise always record the symbol as dynamic.
1613 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1614 is not referenced by a dynamic object, and we are not making a
1615 shared object, then don't make a PLT entry. If we do make a PLT
1616 entry, make sure the symbol has been recorded as dynamic.
1618 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
1620 * configure.host: When making a shared library, set HLDFLAGS to
1621 pass an appropriate -rpath option. Use the make variable SONAME
1622 as the shared library soname, rather than computing it here. On
1623 SunOS, build stamp-tshlink in place of $(SHLINK).
1624 * Makefile.in (SONAME): New variable.
1625 ($(SHLINK)): Make a link to the transformed name, as well.
1626 (stamp-tshlink): New target.
1627 (install): Skip stamp-tshlink during install.
1629 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1631 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1632 linker sections have been set up yet.
1634 * elf.c (make_mapping): Add an additional argument to suppress
1635 making the first section include the program headers.
1636 (map_sections_to_segments): If the user used -Ttext such that the
1637 program headers are on a different page, do not set the flags
1638 saying that this section includes the program headers.
1640 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1642 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1643 don't define TRAD_HEADER.
1644 * configure: Rebuild.
1646 * netbsd-core.c: New file, support for NetBSD core files.
1647 * hosts/*nbsd.h: Removed.
1649 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
1651 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1652 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1653 * libbfd.h, bfd-in2.h: Regenerated.
1654 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1655 bfd_elf32_bfd_reloc_type_lookup.
1656 (reloc_type{,_names}): Deleted.
1657 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1659 (sparc_reloc_map): Add sparc64 relocs.
1660 (sparc_elf_notsupported_reloc): New static function.
1661 (sparc_elf_wdisp16_reloc): New static function.
1662 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1663 (elf32_sparc_relocate_section): Likewise.
1664 (bfd_elf32_bfd_reloc_type_lookup): Define.
1665 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1666 (reloc_type{,_names}): Deleted.
1667 (elf_sparc_howto_table): Deleted.
1668 (sparc_reloc_map): Deleted.
1669 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1670 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1672 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
1674 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1677 * Makefile.in (program_transform_name): New variable.
1678 (install): Transform library name before installing it.
1680 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
1682 * archures.c (bfd_mach_i960_hx): Define.
1683 * bfd-in2.h: Rebuild.
1684 * cpu-i960.c (scan_960_mach): Accept machine "hx".
1685 (MATRIX): Expand entries for HX.
1686 (arch_info_struct): Add i960:hx entry.
1687 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1688 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1689 (coff_set_flags): Handle bfd_mach_i960_hx.
1691 Support for building as a shared library, based on patches from
1692 Alan Modra <alan@spri.levels.unisa.edu.au>:
1693 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1694 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1695 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1696 * configure: Rebuild.
1697 * configure.host: If --enable-shared, adjust shared library stuff
1698 based on the host. If the host is SunOS, and the linker supports
1699 -rpath, set HLDFLAGS to use it.
1700 * Makefile.in (ALLLIBS): New variable.
1701 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1702 (COMMON_SHLIB, SHLINK): New variables.
1703 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1704 (STAGESTUFF): Remove variable.
1705 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1707 (stamp-ofiles): New target, like old ofiles target, but build
1708 using a temporary file and move-if-change, and touch stamp-ofiles
1710 (ofiles): Just depend upon stamp-ofiles.
1711 (stamp-piclist, piclist): New targets.
1712 ($(SHLIB), $(SHLINK)): New targets.
1713 (targets.o, archures.o): Build twice if PICFLAG is set.
1714 (do_mostlyclean): Remove pic/*.o.
1715 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1717 (do_distclean): Remove pic and stamp-picdir.
1718 (install): Install shared libraries.
1719 ($(OFILES)): Depend upon stamp-picdir.
1720 (stamp-picdir): New target.
1722 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1724 * libcoff.h: Rebuild.
1726 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1727 flavour of a section with no owner.
1729 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1730 ELF_LINK_NON_ELF flag.
1731 (mips_elf_create_got_section): Likewise.
1733 * elf.c: Revert last change, since it breaks dynamic linking.
1734 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1736 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1737 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1738 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1740 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1742 * elf.c (assign_file_positions_for_segments): If the backend does
1743 not want the elf header or the program headers in the address
1744 space, do not include them in the calculations.
1746 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1747 function to determine if we need additional program headers.
1748 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1749 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1751 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1753 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1755 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1757 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1758 back into one line. Some compilers (sunos 4.1.3 for example)
1759 won't accept args split across more than one line.
1761 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1763 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1764 * configure: Regenerate.
1766 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1768 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1769 try to do arithmetic on a void *, cast it to a unsigned char * first.
1771 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1773 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1774 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1776 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1777 flag for a newly defined symbol.
1778 (NAME(bfd_elf,record_link_assignment)): Likewise.
1779 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1780 set the DEF or REF_REGULAR flags correctly.
1782 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1783 (libbfd.h, libcoff.h): Corresponding change.
1785 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1786 a PLT32 reloc as dynamic.
1787 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1788 is not referenced by a dynamic object, and we are not making a
1789 shared object, then don't make a PLT entry. If we do make a PLT
1790 entry, make sure the symbol has been recorded as dynamic.
1792 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1794 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1795 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1796 (powerpcle-*-cygwin32): New.
1797 * peicode.h (add_data_entry): Get address from vma.
1799 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1801 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1802 attached to the section has already been created as an undefined
1803 symbol, treat it as if it hasn't been created yet.
1805 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1807 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1808 symbol or section symbols if stripping all symbols and this is not
1809 a relocateable link. Don't output the symbol string table if
1810 there are no symbols.
1811 (elf_link_flush_output_syms): Don't do anything if there are no
1814 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1816 * coff-aux.c: New file.
1817 * hosts/m68kaux.h: New file.
1818 * config.bfd (m68*-apple-aux*): New target.
1819 * configure.in (m68*-apple-aux*): New native host.
1820 (m68kaux_coff_vec): New vector.
1821 * configure: Rebuild.
1822 * targets.c (m68kaux_coff_vec): Declare.
1823 * coffcode.h (bfd_coff_backend_data): Add field
1824 _bfd_coff_link_add_one_symbol.
1825 (bfd_coff_link_add_one_symbol): Define.
1826 (compare_arelent_ptr): New static function if TARG_AUX.
1827 (coff_write_relocs): If TARG_AUX, sort the relocs.
1828 (coff_write_object_contents): Set A/UX aouthdr magic number.
1829 (coff_link_add_one_symbol): Define if not defined.
1830 (bfd_coff_std_swap_table): Initialize new field.
1831 * libcoff.h: Rebuild.
1832 * cofflink.c (coff_link_add_symbols): Call
1833 bfd_coff_link_add_one_symbol rather than
1834 _bfd_generic_link_add_one_symbol.
1835 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1836 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1837 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1838 * Makefile.in: Rebuild dependencies.
1839 (BFD32_BACKENDS): Add coff-aux.o.
1840 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1842 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1844 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1845 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1847 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1849 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1850 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1851 (maintainer-clean): Warn about deleting special files.
1852 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1854 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1855 warning symbols correctly.
1856 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1857 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1858 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1859 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1860 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1861 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1863 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1866 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
1868 * libcoff-in.h: aligned newly exported names with bfd naming
1869 conventions. Removed an erroneous define of POWERPC_LE_PE.
1870 * libcoff.h: Rebuild.
1871 * cofflink.c, coff-ppc.c: the above function name changes
1873 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
1875 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1876 * ecoff.c (struct extsym_info): Define.
1877 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1878 to ecoff_link_write_external.
1879 (ecoff_link_write_external): Accept a struct extsym_info pointer.
1880 Strip symbols when appropriate.
1882 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1883 * syms.c (BSF_OBJECT): Define.
1884 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1885 * bfd-in2.h: Rebuild.
1886 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1888 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1891 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1892 copying relocs into a shared object, treat a defined global symbol
1894 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1895 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1896 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1898 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1899 real defined symbol, not to a weak defined symbol.
1901 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
1903 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
1904 and made a few static functions externs.
1906 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
1907 POWERPC_LE_PE hack in cofflink.
1909 * libcoff-in.h: promoted the following from cofflink.c to allow
1910 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
1911 coff_debug_merge_element, struct coff_debug_merge_type,
1912 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
1913 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
1914 coff_debug_merge_hash_lookup, coff_link_section_info,
1915 coff_final_link_info, coff_debug_merge_hash_newfunc,
1916 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
1918 * libcoff.h: re-gen'd
1920 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
1922 * syms.c: Include "bfdlink.h".
1923 (struct stab_find_info): Define.
1924 (_bfd_stab_section_find_nearest_line): New function.
1925 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
1926 * libbfd.h: Rebuild.
1927 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
1928 * elf.c (_bfd_elf_find_nearest_line): Try calling
1929 _bfd_stab_section_find_nearest_line before searching the ELF
1930 symbol table. Find the closest STT_FUNC symbol, not the last one.
1931 * libcoff-in.h (coff_data_type): Add line_info field.
1932 * libcoff.h: Rebuild.
1933 * coffgen.c (coff_find_nearest_line): Try calling
1934 _bfd_stab_section_find_nearest_line before searching the COFF
1936 * Makefile.in: Rebuild dependencies.
1938 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1940 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
1941 4 bytes, so we get the correct value when updating the register
1942 field in little endian mode.
1944 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
1946 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
1947 entry_section fields. Add sntoc and snentry fields.
1948 * libcoff.h: Rebuild.
1949 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
1950 not toc_section and entry_section (the COFF file does not have any
1951 sections at this point).
1952 (coff_write_object_contents): Set o_snentry and o_sntoc from
1953 snentry and sntoc rather than entry_section and toc_section.
1954 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
1955 snentry, not toc_section and entry_section.
1956 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
1957 entry_section from hentry.
1958 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
1960 (xcoff_link_input_bfd): Set sntoc, not toc_section.
1961 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
1962 than using toc_section directly.
1964 * archures.c: Add missing `.' in enum bfd_architecture.
1965 * bfd-in2.h: Rebuild.
1967 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
1968 Robert Lipe <robertl@arnet.com>.
1970 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1972 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
1973 to sections we allocate. Use bfd_zalloc to allocate initialial
1974 sections, not bfd_alloc.
1975 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
1976 SDA{,2}I16 relocations.
1977 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
1978 whether to put something in .sbss or not.
1979 (ppc_elf_relocate_section): Add support for more relocations. Add
1980 in sec->output_offset where appropriate. Make error messages
1981 include the symbol name.
1983 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
1984 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
1985 doesn't get redefined messages if -shared.
1987 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
1988 section if the rel_section field has been set up.
1990 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1992 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
1995 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
1997 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
1998 of flags, only flags used are controlled by mach number. Bump up
1999 output file mach number to highest of input file mach numbers.
2000 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2001 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2003 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2004 bfd_elf64_sparc_vec support.
2006 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2008 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2009 the embedded bit is set on some objects and not on others. Just
2011 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2014 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2016 * coffcode.h (coff_new_section_hook): Don't try to align the
2019 * coffcode.h (coff_set_section_contents): Fix the handling of the
2020 .lib section to work even if the entire section contents are
2021 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2022 Robert Lipe <robertl@arnet.com>.
2024 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2026 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2027 memory here for contents.
2029 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2030 _SDA2_BASE_ by 32768.
2031 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2032 started using. Allocate contents for .sdata and .sdata2 sections
2034 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2036 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2037 size _SDA{,2}_BASE_.
2038 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2041 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2043 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2045 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
2046 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
2047 (bfd_mach_sparc_v9a): Define.
2048 (bfd_mach_sparc_v9_p): Define.
2049 * bfd-in2.h: Regenerated.
2050 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2052 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
2053 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2054 to bfd_elf32_sparc_vec.
2055 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
2056 Add v8plus{,a} support.
2058 (sparc_compatible): New function.
2059 * elf32-sparc.h: #include "elf/sparc.h".
2060 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
2061 elf32_sparc_final_write_processing): New functions.
2062 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
2063 elf_backend_final_write_processing): Define.
2065 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2067 * elf-bfd.h (struct elf_link_hash_entry): Add
2068 linker_section_pointer field.
2069 (enum elf_linker_section_enum): Enumeration for new way of
2070 creating linker dynamic sections and symbols.
2071 (elf_linker_section{,_pointers}): New structures for creating
2072 dynamic sections and symbols.
2073 (elf_obj_tdata): Add linker_section_pointers and linker_section
2075 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2076 (_bfd_elf_create_linker_section): New declarations.
2077 (_bfd_elf_find_pointer_linker_section): Ditto.
2078 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2079 (_bfd_elf_make_linker_section_rela): Ditto.
2081 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2083 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2084 (ppc_elf_create_linker_section): New function to create the
2085 sections .got, .sdata, and .sdata2.
2086 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2088 (ppc_elf_check_relocs): Support more of the eabi relocations.
2089 (ppc_elf_relocate_section): Ditto.
2090 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2091 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2093 * elflink.h (elf_create_pointer_linker_section): New function to
2094 create initialized pointers in dynamic linker sections.
2095 (elf_finish_pointer_linker_section): Actually intialize the
2096 pointers created above.
2098 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2099 macros to provide both 32 and 64 bit versions of
2100 elf_create_pointer_linker_section.
2101 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2102 provide both 32 and 64 bit versions of
2103 elf_finish_pointer_linker_section.
2105 * elflink.c (_bfd_elf_create_linker_section): New function to
2106 create a linker section.
2107 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2108 given address in the linker pointer offsets created for a given
2110 (_bfd_elf_make_linker_section_rela): Make a RELA section
2111 corresponding to the generated linker section.
2113 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2115 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2117 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2119 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2120 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2121 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2122 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2123 toc entry in an objdump) for now.
2124 (ppc_do_last, ppc_get_last): New function - needed to save processing
2125 the toc owner to the end.
2126 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2129 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2130 toc owner from being done till last. Must define POWERPC_LE_PC
2133 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2135 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2137 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2138 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2140 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2142 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2144 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2146 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2148 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2150 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2152 * elf.c (assign_file_positions_for_segments): Don't increment file
2153 offset for a segment which contains no loadable sections.
2155 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2157 * reloc.c: Add new PowerPC relocations.
2158 * {bfd-in2,libbfd}.h: Regenerate.
2160 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2161 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2163 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2165 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2168 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2171 * coffgen.c (coff_find_nearest_line): Don't try to cache
2172 information in sections that are not owned by a BFD. From Richard
2173 Henderson <richard@atheist.tamu.edu>.
2175 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2176 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2177 * elflink.h (elf_link_output_extsym): Remove special check for
2180 * ecoffswap.h: Add prototypes for static functions.
2182 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2184 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2185 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2187 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2188 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2189 support. Begin support for R_PPC_SDA{2,}REL.
2191 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2193 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2194 create the .got and .got.neg sections.
2195 (ppc_elf_size_dynamic_sections): Call it.
2196 (ppc_elf_check_relocs): Call it.
2197 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2198 (ppc_elf_check_relocs): Add error messages for relocations we
2199 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2202 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2204 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2205 section flags for V.4 and eabi.
2207 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2209 * elf.c (assign_file_positions_for_segments): If a segment
2210 contains no sections, don't mark it as readable.
2212 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2213 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2215 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2216 dynamic section, if there is one.
2217 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2218 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2219 (bfd_elf64_swap_dyn_in): Likewise.
2220 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2222 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2224 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
2225 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
2226 <pirker@eiunix.tuwien.ac.at>.
2228 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2230 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
2231 PowerPC V.4 and eabi.
2232 * bfd-in2.h: Regenerate.
2233 * libfd.h: Regenerate.
2235 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
2237 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
2238 section type and SHF_EXCLUDE section flag, turning them into the
2239 appropriate bfd section flag.
2241 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2243 * xcofflink.c (xcoff_link_add_symbols): Create the special
2244 sections if we see a DYNAMIC object, in case that is the only
2245 XCOFF input object we see.
2247 * elf32-mips.c: Extensive changes for a start at dynamic linking
2248 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2250 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
2251 (struct elf_backend_data): Remove
2252 elf_backend_create_program_headers field. Add
2253 elf_backend_additional_program_headers and
2254 elf_backend_modify_segment_map fields.
2255 * elfxx-target.h (elf_backend_type_change_ok): Define if not
2257 (elf_backend_additional_program_headers): Likewise.
2258 (elf_backend_modify_segment_map): Likewise.
2259 (elf_backend_create_program_headers): Don't define.
2260 (elfNN_bed): Change to account for field changes.
2261 * elf.c (assign_file_positions_for_segments): Call new
2262 modify_segment_map backend function. Don't call old
2263 create_program_headers backend function.
2264 (get_program_header_size): Call additional_program_headers rather
2265 than create_program_headers.
2266 * elflink.h (elf_link_add_object_symbols): Initialize
2267 type_change_ok from new backend field.
2268 (elf_link_output_extsym): Don't warn if _rld_new_interface is
2270 (elf_reloc_link_order): Treat a reloc against a defined symbol as
2271 a reloc against the appropriate section.
2273 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
2274 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
2275 (elf_flags_init): Rename from elf_ppc_flags_init.
2276 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
2278 (ppc_elf_copy_private_bfd_data): Likewise.
2279 (ppc_elf_merge_private_bfd_data): Likewise.
2281 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
2284 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
2286 * coff-alpha.c (alpha_relocate_section): During final link, allow
2287 output .lita section to be bigger than 64k by adjusting gp value
2288 on a per-input section basis.
2289 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
2291 (struct ecoff_section_tdata): Add gp field.
2293 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
2295 Handle Alpha ECOFF changes in OSF/1 3.2.
2296 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
2298 * coff-alpha.c: Include "aout/ar.h".
2299 (alpha_ecoff_get_relocated_section_contents): Don't require an
2300 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
2301 3.2 doesn't generate one.
2302 (alpha_relocate_section): Likewise.
2303 (alpha_ecoff_slurp_armap): Define.
2304 (alpha_ecoff_slurp_extended_name_table): Define.
2305 (alpha_ecoff_construct_extended_name_table): Define.
2306 (alpha_ecoff_truncate_arname): Define.
2307 (alpha_ecoff_write_armap): Define.
2308 (alpha_ecoff_generic_stat_arch_elt): Define.
2309 (alpha_ecoff_update_armap_timestamp): Define.
2311 (alpha_ecoff_read_ar_hdr): New static function.
2312 (alpha_ecoff_get_elt_at_filepos): New static function.
2313 (alpha_ecoff_openr_next_archived_file): New static function.
2314 (alpha_ecoff_get_elt_at_index): New static function.
2315 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
2316 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
2317 _bfd_ecoff to alpha_ecoff.
2318 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
2319 field from backend structure, rather than always calling
2320 _bfd_get_elt_at_filepos.
2321 * coff-mips.c (mips_ecoff_backend_data): Initialize
2322 get_elt_at_filepos field.
2323 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
2324 from _bfd_generic_read_ar_hdr with minor changes.
2325 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
2326 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
2327 * libbfd.h: Rebuild.
2329 * bfd-in.h (BFD_IN_MEMORY): Define.
2330 * libbfd-in.h (struct bfd_in_memory): Define.
2331 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
2332 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
2333 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
2334 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
2335 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
2336 (bfd_get_size): Handle BFD_IN_MEMORY flag.
2337 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
2338 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
2339 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
2340 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
2342 (bfd_openstreamr): Likewise.
2343 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
2344 BFD_IN_MEMORY is not set.
2345 * riscix.c (riscix_some_aout_object_p): Likewise.
2346 * bfd-in2.h, libbfd.h: Rebuild.
2348 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
2349 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
2350 (bfd_get_elt_at_index): Define.
2351 * archive.c (_bfd_generic_get_elt_at_index): Rename from
2352 bfd_get_elt_at_index. Change index parameter from int to
2354 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
2355 (_bfd_noarchive_get_elt_at_index): Define.
2356 (_bfd_archive_bsd_get_elt_at_index): Define.
2357 (_bfd_archive_coff_get_elt_at_index): Define.
2358 * bfd-in2.h, libbfd.h: Rebuild.
2359 * aout-target.h (MY_get_elt_at_index): Define if not defined.
2360 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
2361 * ieee.c (ieee_get_elt_at_index): Define.
2362 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
2363 * oasys.c (oasys_get_elt_at_index): Define.
2364 * som.c (som_get_elt_at_index): Define.
2366 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2367 numbers to the .text section.
2369 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
2371 * ieee.c (ieee_write_debug_part): Change return type to boolean.
2372 If there is a SEC_DEBUGGING section, get the contents of the debug
2373 information part from it.
2374 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2376 (ieee_write_object_contents): Check ieee_write_debug_part return.
2378 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
2380 * config.bfd (i[345]86-*-freebsd*): Add target.
2381 * configure.in (i386freebsd_vec): Add vec.
2382 * configure: Regenerate.
2383 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2384 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2385 Rebuild dependencies..
2386 * freebsd.h: New file.
2387 * i386freebsd.c: New file.
2388 * targets.c (i386freebsd_vec): Declare.
2389 (bfd_target_vector): Add i386freebsd_vec.
2390 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2391 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2393 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
2395 * ieee.c (ieee_slurp_debug): New static function.
2396 (ieee_object_p): Call it.
2397 (ieee_slurp_section_data): Skip debugging sections.
2398 (ieee_get_reloc_upper_bound): Likewise.
2399 (ieee_get_section_contents): Likewise.
2400 (ieee_canonicalize_reloc): Likewise.
2401 (ieee_write_section_part): Likewise.
2402 (ieee_write_debug_part): Likewise.
2403 (ieee_write_data_part): Likewise.
2404 (init_for_output): Likewise.
2406 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
2408 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2410 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2411 relocs, since ppc_elf_relocate_section handles the linker case.
2412 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2414 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2415 ppc_elf_relocate_section since that is now the only caller.
2416 (ppc_elf_relocate_section): Ditto.
2418 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
2420 * coffcode.h (coff_write_object_contents): If we don't know the
2421 section of the entry point for an XCOFF executable, always set the
2422 entry address to -1.
2424 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2426 * elf.c (bfd_section_from_shdr): Add support for note sections.
2428 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2430 * bfd-in.h (struct _symbol_info): Add stab_type field.
2431 * bfd-in2.h: Rebuild.
2432 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2434 * elf32-ppc.c: Remove trailing newline from calls to
2436 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2437 difference if target endianness is known.
2439 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2441 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2442 old style TOC16 references without using R_PPC_GOT.
2443 (ppc_reloc_type): Ditto.
2444 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2445 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2446 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2447 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2448 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2450 (ppc_elf_adjust_dynamic_symbol): Ditto.
2451 (ppc_elf_adjust_dynindx): Ditto.
2452 (ppc_elf_size_dynamic_sections): Ditto.
2453 (ppc_elf_finish_dynamic_symbol): Ditto.
2454 (ppc_elf_finish_dynamic_sections): Ditto.
2455 (ELF_DYNAMIC_INTERPRETER): Define.
2457 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2459 * elf.c (copy_private_bfd_data): When attaching sections to
2460 segments ignore sections that won't be allocated. Patch from
2463 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2465 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2468 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2470 * coff-i960.c (CALC_ADDEND): Define.
2471 (coff_i960_relocate_section): Add the input section VMA to the
2472 addend for PC relative relocs.
2474 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2476 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2477 to correctly terminate.
2479 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2481 * targets.c (enum bfd_endian): Define.
2482 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2483 from boolean to enum bfd_endian. Change header_byteorder_big_p
2485 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2486 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2487 * bfd-in2.h: Rebuild.
2488 * All targets: Change initialization of byteorder and
2489 header_byteorder to use enum bfd_endian values rather than
2491 * All files: Change all references to byteorder_big_p and
2492 header_byteorder_big_p to use new bfd_*_endian macros.
2494 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2496 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2498 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2500 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2502 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2504 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
2506 * ieee.c: Lots of minor cleanups. Make many functions return
2507 errors rather than calling abort. Also:
2508 (ieee_write_twobyte): Remove; change callers to call existing
2509 ieee_write_2bytes function.
2510 (ieee_write_expression): Don't output the section twice when
2511 outputting a local symbol. Don't emit an extraneous zero if there
2513 (ieee_slurp_sections): Set the lma as well as the vma.
2514 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2516 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2517 a recognized one or bfd_arch_unknown.
2518 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2520 (ihex_get_symtab): Likewise.
2522 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
2524 * aoutx.h: Include <ctype.h>.
2525 (struct aout_link_includes_table): Define.
2526 (struct aout_link_includes_totals): Define.
2527 (struct aout_link_includes_entry): Define.
2528 (aout_link_includes_lookup): Define macro.
2529 (struct aout_final_link_info): Add includes field.
2530 (aout_link_includes_newfunc): New static function.
2531 (NAME(aout,final_link)): Initialize includes hash table.
2532 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2534 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
2536 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2538 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
2540 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2542 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
2544 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2545 (pe_print_private_bfd_data): call pe_print_reloc.
2546 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2547 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2548 up some debugging as well.
2550 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
2552 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
2555 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
2557 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2558 when setting sections to NULL.
2560 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
2562 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2564 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2565 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2567 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2568 * bfd-in2.h: Rebuild.
2570 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
2572 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2574 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
2576 * ihex.c (ihex_scan): Handle record types 4 and 5.
2577 (ihex_object_p): Permit types 4 and 5.
2578 (ihex_set_section_contents): Remove check for out of range
2580 (ihex_write_object_contents): Generate types 4 and 5.
2582 * elflink.h (elf_link_output_extsym): Just ignore warning and
2583 indirect references to symbols which don't really exist.
2585 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
2587 * peicode.h (pe_print_idata): Minor format fixes
2588 (pe_print_edata): New function. Under private printing, this formats
2589 the edata section of a PE file.
2590 (pe_print_private_bfd_data): Added call to pe_print_edata.
2592 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2594 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2595 index, don't call stoi.
2597 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
2599 * srec.c (srec_scan): Set lma as well as vma.
2601 * ihex.c: New file; support for Intel Hex format.
2602 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2603 (ihex_vec): Declare.
2604 (bfd_target_vector): Always include ihex_vec.
2605 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2606 * Makefile.in: Rebuild dependencies.
2607 (BFD_LIBS): Add ihex.o
2608 (BFD_LIBS_CFILES): Add ihex.c.
2609 * bfd-in2.h: Rebuild.
2611 * elf.c (assign_file_positions_for_segments): Sort the sections in
2613 (get_program_header_size): Return the right size if segment_map is
2615 (copy_private_bfd_data): Don't bother to sort the sections.
2617 * bfd.c (bfd_record_phdr): New function.
2618 * bfd-in.h (bfd_record_phdr): Declare.
2619 * bfd_in2.h: Rebuild.
2621 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2624 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2625 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
2627 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2628 (bfd_zmalloc): Change declaration.
2629 * libbfd.h: Rebuild.
2630 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2631 and realloc. Don't set bfd_error_no_memory if they fail.
2633 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
2635 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2636 uses as well. Added a new howto to deal with TOCREL16 relocs that
2637 are TOCDEFN as well.
2638 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2639 to handle RVA relocs from dlltool.
2640 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2641 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2642 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2644 * coffcode.h (coff_set_alignment_hook): check idata$X sections
2645 to get the right section alignment.
2647 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
2649 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2650 p_paddr if p_paddr is zero.
2651 (make_mapping): Set includes_filehdr and includes_phdrs for first
2653 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2655 (assign_file_positions_for_segments): Handle includes_filehdr and
2656 includes_phdrs. Remove special handling of PT_PHDR and first
2658 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2659 when appropriate. Remove special handling of PT_PHDR segment.
2660 Use a more complex condition for when a section is included in a
2661 segment to handle Solaris linker oddities.
2663 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2665 * coff-m88k.c (howto_table): Reformatted for easier reading;
2666 special_function now points to new function m88k_special_reloc.
2667 (howto_hvrt16): Function previously used for handling HVRT16 relocs
2669 (rtype2howto): Do not add reloc's r_offset to the addend, this will
2670 be done correctly by m88k_special_reloc.
2671 (reloc_processing): New function to be used by RELOC_PROCESSING.
2672 (RELOC_PROCESSING): Define to call reloc_processing.
2674 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
2676 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2677 (pe_print_pdata): Likewise.
2679 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2680 obstack_alloc fails.
2681 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2683 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2684 * Many files: don't set bfd_error_no_memory if one of the above
2687 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2688 if p_paddr_valid is set.
2689 (copy_private_bfd_data): New static function.
2690 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2692 * elf.c (assign_file_positions_for_segments): Fix case where extra
2693 program headers were allocated.
2695 * elf.c (_bfd_elf_print_private_bfd_data): New function.
2696 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2697 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2698 _bfd_elf_print_private_bfd_data.
2700 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2701 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2702 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2703 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2704 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2705 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2706 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2708 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2710 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2711 * elf.c (make_mapping): New static function.
2712 (map_sections_to_segments): New static function.
2713 (elf_sort_sections): New static function.
2714 (assign_file_positions_for_segments): New static function.
2715 (map_program_segments): Remove.
2716 (get_program_header_size): Remove sorted_hdrs, count, and
2717 maxpagesize parameters. Simplify.
2718 (assign_file_positions_except_relocs): When generating an
2719 executable, use assign_file_positions_for_segments.
2720 (elf_sort_hdrs): Remove.
2721 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2722 to get_program_header_size.
2724 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2726 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2728 * configure, config.in: Regenerate with autoconf 2.7.
2730 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2731 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2733 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2735 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2736 (ecoff_sec_to_styp_flags): Likewise.
2737 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2738 (ecoff_set_symbol_info): Handle scRConst.
2739 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2740 (ecoff_compute_section_file_positions): Handle .rconst section.
2741 (_bfd_ecoff_write_object_contents): Likewise.
2742 (ecoff_link_check_archive_element): Handle scRConst.
2743 (ecoff_link_add_externals): Likewise.
2744 (ecoff_link_write_external): Handle .rconst section.
2745 (ecoff_reloc_link_order): Likewise.
2746 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2747 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2749 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2751 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2752 DEF_DYNAMIC flag is set.
2754 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2756 * host-aout.c: If TRAD_HEADER is defined, include it.
2758 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2760 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2761 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2762 (BFD_NEED_DECLARATION): New function.
2763 * configure.in: Use BFD_NEED_DECLARATION.
2764 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2765 * configure, config.in: Rebuild with autoconf 2.6.
2767 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2768 special_sections before returning when called with a non XCOFF
2771 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2774 * coffcode.h (coff_compute_section_file_positions): Only pad the
2775 previous section to force file alignment when creating an
2778 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2780 * coffcode.h (coff_compute_section_file_positions): If
2781 RS6000COFF_C, set up the .debug section.
2783 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2784 if it is not large enough to accomodate the entire TOC area with
2785 signed 16 bit offsets.
2786 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2788 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2789 TOC anchor to use the TOC value used in the output file.
2791 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2793 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2794 (_bfd_coff_read_string_table): Likewise.
2796 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2798 * pe-arm.c: Fix typos.
2799 * coff-arm.c: Likewise.
2801 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2803 * coff-ppc.c (list_ele): Added "cat"egory member.
2804 (record_toc): New category parameter (priv or pub).
2805 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2806 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2807 the mainline. It addes extra toc cells in error.
2808 (ppc_coff_swap_sym_in_hook): Added some documentation.
2809 (dump_toc): Can now diagnose "virtual toc" chicanery.
2811 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2813 * elf-bfd.h (struct elf_link_hash_table): Change type of
2814 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2816 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2818 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2819 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2821 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2822 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2823 defined or mentioned in a regular file.
2825 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2827 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2828 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2829 (coff_ppc_relocate_section): Correct REL24 handling
2830 (ppc_process_before_allocation): Correct TOCDEFN handling
2832 * peicode.h (dir_names): Added name descriptions
2834 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2836 * VERSION: Updated to cygnus-2.6.
2838 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2840 * targets.c (m68k4knetbsd_vec): Declare.
2842 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2844 * targets.c (bfd_target): Change type of second argument to
2845 _bfd_print_private_bfd_data from void * to PTR.
2846 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2847 using PTR rather than void *.
2848 * bfd-in2, libbfd.h: Rebuild.
2849 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2851 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2852 _bfd_generic_bfd_print_private_bfd_data rather than casting
2855 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
2857 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
2858 "DO NOT DELETE" lines or blank lines that mkdep writes on some
2860 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2861 BFD64_BACKENDS_CFILES): New variables.
2864 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
2866 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2867 not at the file position of the first section.
2868 * coffcode.h (coff_compute_section_file_positions): Avoid using
2870 (coff_write_object_contents): When generating a PPC PE executable
2871 with no symbols, round up the file size to a COFF_PAGE_SIZE
2873 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2874 don't write out a string table.
2876 * elf.c (bfd_section_from_shdr): When using a different section
2877 header, pass the new one to _bfd_elf_make_section_from_shdr.
2878 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2879 (elf_map_symbols): Add section VMA to symbol value when comparing
2881 (_bfd_elf_compute_section_file_positions): Only build symbol table
2882 if there are some symbols. Set file offset of symtab and strtab
2884 (assign_file_positions_except_relocs): Remove dosyms parameter.
2885 Change all callers. Never set file offset of symtab and strtab
2887 (_bfd_elf_copy_private_section_data): New function.
2888 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2889 (_bfd_elf_copy_private_symbol_data): New function.
2890 (swap_out_syms): Check for special mapping of st_shndx created by
2891 copy_private_symbol_data.
2892 * elfxx-target.h: Use new copy routines.
2893 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2894 (_bfd_elf_copy_private_section_data): Declare.
2896 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2898 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
2901 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
2902 _bfd_dummy_target, matching the recent change to archive
2905 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
2907 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
2908 arithmetic on PTR types.
2910 * aout-target.h (MY(callback)): Set the lma of the sections.
2912 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
2913 symbol into a reloc against the section.
2915 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
2917 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
2918 glue for the relocs: IMGLUE and IFGLUE.
2919 (record_toc): new function - tracks toc contents
2920 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
2921 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
2922 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
2923 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
2924 (ppc_record_toc_entry): Removed a debug define (duh)
2926 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
2927 (pe_print_idata): New function - formats the idata section data
2928 (pe_print_pdata): New function - formats the pdata section data
2929 (pe_print_private_bfd_data): calls to above
2931 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
2933 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
2934 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
2935 TARGET_SYM and TARGET_NAME for vector and BFD name.
2936 * coff-pmac.c (pmac_xcoff_vec): Remove.
2937 (TARGET_SYM, TARGET_NAME): Define.
2938 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
2939 machine to 0, not all PowerMacs are 601s.
2941 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
2943 * elfcode.h (elf_object_p): Read in any program headers.
2944 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
2945 based on the program headers, if any.
2946 (elf_fake_sections): Set sh_addr from the vma, not the lma.
2947 (map_program_segments): Set p_paddr of program headers based on
2950 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
2952 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
2955 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
2956 trying to do a relocateable link with a non-a.out object file.
2958 * archive.c (bfd_generic_archive_p): Check the first object file
2959 in an archive even if target_defaulted is set. If the object file
2960 has the wrong xvec, reject it.
2962 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
2963 be represented, report the name via _bfd_error_handler.
2964 (translate_to_native_sym_flags): Likewise.
2965 * elf32-mips.c (mips_elf_final_link): Likewise.
2966 * oasys.c (oasys_write_sections): Likewise.
2968 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
2969 which checks for STYP_OVRFLO sections.
2970 (coff_compute_section_file_positions): If RS6000COFF_C, handle
2971 reloc and lineno count overflows.
2972 (coff_write_object_contents): Call coff_count_linenumbers before
2973 coff_compute_section_file_positions. If RS6000COFF_C, handle
2974 reloc and lineno count overflows.
2975 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
2976 relocs before dealing with .pad sections. Count overflow section
2977 headers when handling .pad sections.
2979 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
2982 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
2983 (struct xcoff_link_hash_table): Add descriptor_section and
2984 special_sections fields.
2985 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
2986 (xcoff_link_add_symbols): Set linkage section alignment. Create
2987 descriptor section. Check for magic symbol names (_text, etc.),
2988 and record them in special_sections if found. Set
2989 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
2990 descriptor field to point back to the function code symbol.
2991 (xcoff_sweep): Always mark the special descriptor_section.
2992 (bfd_xcoff_export_symbol): Check whether the symbol might be a
2993 function descriptor, and mark it if it is.
2994 (bfd_xcoff_size_dynamic_sections): Add new special_sections
2995 parameter, and fill it in. Allocate space for the descriptor
2997 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
2998 global linkage code. If an undefined function descriptor is
2999 exported, arrange to define it. Warn about any other undefined
3001 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3002 (xcoff_write_global_symbol): Create a function descriptor when
3004 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3005 * bfd-in2.h: Rebuild.
3007 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3009 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3010 (ppc_coff_link_hash_table): new types for hashing
3011 (ppc_coff_link_hash_newfunc): hash entry constructor
3012 (ppc_coff_link_hash_table_init): hash table initializer
3013 (ppc_coff_link_hash_table_create): hash table constructor
3014 (ppc_record_toc_entry): changed references to hash table
3015 (coff_ppc_relocate_section): changed references to hash table
3017 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3018 * libcoff.h: Rebuild
3020 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3021 (coff_link_add_symbols): removed toc_offset init
3023 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3025 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3028 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3029 if it is given and mmep is available.
3030 * acconfig.h: Undef USE_MMAP.
3031 * configure, config.in: Regenerated.
3032 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3033 table handling the old way.
3034 (aout_get_external_symbols): Don't complain if last byte of string
3036 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3037 (bfd_free_window) [! USE_MMAP]: Don't define.
3038 (bfd_get_file_window,
3039 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3041 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3043 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3046 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3048 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3049 compatible with AMD generated COFF files. Try to support both AMD
3050 and GNU formats simultaneously.
3051 (coff_a29k_relocate_section): Likewise.
3053 * libbfd.c (bfd_get_file_window): Change writable parameter from
3054 int to boolean; update all callers. Pass MAP_SHARED if not
3055 writable--it's required on Solaris. Cast fprintf argument to
3057 * bfd-in.h (bfd_get_file_window): Update declaration.
3058 * bfd-in2.h: Rebuild.
3059 * aoutx.h: Update calls to bfd_get_file_window.
3061 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3063 (xcoff_swap_ldhdr_in): New static function.
3064 (xcoff_swap_ldsym_in): New static function.
3065 (xcoff_find_reloc): Handle the case of a single reloc correctly.
3066 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3067 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
3068 Handle XTY_ER/XMC_XO symbols correctly.
3069 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3070 rather than normal symbol table.
3071 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3072 already defined with the same absolute value.
3073 (xcoff_mark): When considering called symbols, check whether the
3074 descriptor is from a dynamic object, rather than the symbol
3076 (xcoff_build_ldsyms): Likewise.
3078 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3079 Cast realloc and malloc return values. If malloc or realloc fail,
3080 set bfd_error_no_memory.
3081 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3082 * bfd-in2.h: Rebuild.
3084 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3086 * coff-ppc.c (ppc_record_toc_entry): new function.
3087 (in_reloc_p): changed return value.
3088 (coff_ppc_relocate_section): much rework.
3089 (ppc_allocate_toc_section): new function.
3090 (ppc_process_before_allocation): new function.
3091 (ppc_coff_swap_sym_in_hook): new function.
3093 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3094 (coff_link_add_symbols): initialize toc_offset.
3096 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3097 (coff_swap_aouthdr_out): Added more sections to the data
3098 dictionary for the pe file header. Also changed linker version
3099 number on the ppc side.
3100 (dir_names): small improvements to the dictionary printing.
3101 (pe_mkobject_hook): save the file level flags.
3103 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3104 (pe_tdata): added real_flags field
3105 (coff_tdata): added local_toc_sym_map and access macro
3107 * libcoff.h (coff_link_hash_entry): added toc_offset field
3108 (pe_tdata): added real_flags field
3109 (coff_tdata): added local_toc_sym_map and access macro
3111 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3112 (coff_mkobject): init for local_toc_sym_map
3113 (coff_write_object_contents): set the internal_a.magic to
3114 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3117 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3119 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3120 entries until both the line number address and the function name
3121 address are too large.
3123 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3124 * configure: Rebuilt.
3126 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3127 is defined in the environment.
3129 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3131 * som.c (som_get_section_contents_in_window): Define to use
3134 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3136 * coff-i860.c: New file, based on coff-i386.c.
3137 * cpu-i860.c: New file, based on cpu-i386.c.
3138 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3139 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3140 targets, using i860coff_vec.
3141 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3142 trad-core.o and hosts/i860mach3.h.
3143 (i860coff_vec): Use coff-i860.o and cofflink.o.
3144 * configure: Rebuild.
3145 * Makefile.in: Rebuild dependencies.
3146 (ALL_MACHINES): Add cpu-i860.o.
3147 (BFD32_BACKENDS): Add coff-i860.o.
3148 (CFILES): Add cpu-i860.c and coff-i860.c.
3149 * targets.c (i860coff_vec): Declare.
3150 (bfd_target_vector): Add &i860coff_vec.
3151 * archures.c (bfd_i860_arch): Declare.
3152 (bfd_archures_list): Add &bfd_i860_arch.
3153 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3154 (coff_set_flags): Handle bfd_arch_i860.
3155 (coff_write_object_contents): Handle I860 a.out magic number.
3157 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3159 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3160 the created .tc section to 2.
3161 (xcoff_mark): Don't keep a .loader reloc for a call to an
3162 undefined symbol when creating a shared library.
3163 (xcoff_build_ldsyms): When creating a shared library, generate
3164 global linkage code for a call to an undefined symbol.
3166 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3168 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3169 BFD32_BACKENDS, BFD64_BACKENDS.
3170 (.dep1): Put mkdep output in a separate file.
3171 Rebuilt dependencies.
3173 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3176 Permit use of mmap when available:
3178 * configure.in: Check for mmap, madvise, mprotect.
3179 * config.in, configure: Regenerated.
3181 * libbfd.c (struct _bfd_window_internal): Define type.
3182 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3184 (ok_to_map): New static variable for debugging.
3185 (_bfd_generic_get_section_contents_in_window): New function.
3186 * bfd-in.h (bfd_window_internal): Declare type.
3187 (bfd_window): Define type.
3188 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3189 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3192 * libaout.h (struct aoutdata): Add two window fields.
3193 (obj_aout_sym_window, obj_aout_string_window): New macros.
3194 * aoutx.h (some_aout_object_p): Initialize windows.
3195 (aout_get_external_symbols): Get symbol data and strings in
3196 windows instead of explicitly allocated buffers.
3197 (slurp_symbol_table): Free window instead of memory.
3198 (bfd_free_cached_info): Release windows instead of freeing storage
3200 (aout_link_free_symbols): Ditto.
3202 * targets.c (bfd_target): Add new field for
3203 get_section_contents_in_window.
3204 (BFD_JUMP_TABLE_GENERIC): Updated.
3205 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3206 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3207 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3208 macros for get_section_contents_in_window field.
3210 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3212 * core.c: Renamed to corefile.c
3213 * makefile.dos (OBJS): Change core.o to corefile.o
3214 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3217 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3219 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3220 targ_selvecs to allow debugging under Irix-5 native.
3223 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
3225 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
3226 to o. Clobber and restore the list of new csects around the call
3227 to _bfd_generic_link_add_one_symbol, in case it wants to report a
3228 linker error and the linker wants to read the symbol table. Reset
3229 the line number count of a real section even if it has no relocs.
3230 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
3232 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
3235 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
3237 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
3238 an undefined symbol in a shared link.
3240 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
3241 oldtype from bfd_link_order_type to bfd_link_hash_type. From
3242 phdm@info.ucl.ac.be (Philippe De Muyter).
3244 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3246 * coff-m88k.c (rtype2howto): New static function.
3247 (RTYPE2HOWTO): Use it rather than a macro definition.
3249 * coffcode.h (coff_write_object_contents): set internal_a.magic
3250 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
3252 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
3253 define TRAD_HEADER to new file hosts/delta68.h.
3254 m88*-motorola-sysv*, however, does use ptrace-core.o.
3255 * hosts/delta68.h: New file.
3257 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
3258 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
3260 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
3262 * i386linux.c (MY(vec)): Declare before use.
3264 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
3266 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
3267 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
3269 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3270 BFD is not of the right type.
3271 (bfd_elf_get_needed_list): Likewise.
3272 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
3273 * sunos.c (bfd_sunos_get_needed_list): Likewise.
3274 * xcofflink.c (XCOFF_XVECP): Define.
3275 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
3277 (bfd_xcoff_import_symbol): Likewise.
3278 (bfd_xcoff_export_symbol): Likewise.
3279 (bfd_xcoff_link_count_reloc): Likewise.
3280 (bfd_xcoff_record_link_assignment): Likewise.
3281 (bfd_xcoff_size_dynamic_sections): Likewise.
3283 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
3284 table index against the number of symbols for a base relative
3287 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
3289 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
3290 full_aouthdr flag here...
3291 (_bfd_xcoff_bfd_final_link): ...not here.
3293 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
3295 * libelf.h: Rename to elf-bfd.h to avoid conflict with
3296 systems that have a system <libelf.h>.
3297 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
3298 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
3299 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
3300 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
3301 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
3302 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
3303 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
3305 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
3307 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
3308 set, set BSF_WEAK in symbol. Change all callers.
3309 (ecoff_get_extr): Set weakext based on BSF_WEAK.
3310 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
3311 _bfd_generic_link_add_one_symbol.
3312 (ecoff_indirect_link_order): Check that the section tdata relocs
3313 are not NULL before using them.
3315 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
3316 define TRAD_HEADER as hosts/alphalinux.h.
3317 * configure: Rebuild.
3318 * hosts/alphalinux.h: New file.
3319 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
3322 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
3324 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
3325 C_ECOMM storage classes.
3327 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
3329 (xcoff_mark): Call xcoff_mark_symbol.
3330 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
3331 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
3333 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
3335 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
3337 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
3339 (xcoff_find_reloc): New static function.
3340 (xcoff_link_add_symbols): Use it.
3341 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
3342 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
3343 relocate the value of C_DECL.
3345 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
3347 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
3349 * cofflink.c (_bfd_coff_generic_relocate_section): Make
3350 callback decide what goes in .relocs.
3351 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
3352 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
3355 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
3357 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
3360 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
3362 * xcofflink.c: More improvements, mostly to fix handling of
3363 constructors and a few other special cases.
3364 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3365 zero, reverting yesterday's change.
3366 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3367 (bfd_xcoff_link_count_reloc): Declare.
3368 (bfd_xcoff_record_link_assignment): Declare.
3369 * bfd-in2.h: Rebuild.
3371 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
3373 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
3374 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3375 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3376 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3377 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3378 Change PAGE_SIZE to TARGET_PAGE_SIZE.
3380 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3383 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
3384 segments includes the a.out header. See to that the magic number
3385 *always* is big-endian.
3387 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
3388 m68k4k NetBSD configurations.
3390 * configure.in, configure: Separate i386 & mips NetBSD
3391 configurations from other BSD ones. Don't assume DEC is the only
3392 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
3393 configurations. Add support for m68k4k NetBSD object format.
3395 * libaout.h: Added M_68K4K_NETBSD magic.
3397 * m68k4knetbsd.c: New file.
3399 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3401 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3404 * hosts/mipsnbsd.h: New file.
3407 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
3409 * config.bfd: Add config stuff for mips*-*-magic* to set
3410 targ_defvec to ecoff_big_vec.
3413 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
3415 * xcofflink.c: Numerous changes to get closer to a working XCOFF
3417 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3418 toc_section, and entry_section fields.
3419 (struct xcoff_section_tdata): Remove ldrel_count field.
3420 * libcoff.h: Rebuild.
3421 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3423 (coff_compute_section_file_positions): If RS6000COFF_C, generate
3424 full a.out header if full_aouthdr is set in xcoff_data.
3425 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3426 based on sections stored in xcoff_data.
3427 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3429 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3430 (rs6000coff_vec): Set symbol_leading_char to '.'.
3431 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3432 value stored in ret rather than returning a pointer value.
3434 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3436 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3439 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3441 * som.c (som_slurp_string_table): Allocate the strings with malloc
3442 since they're free'd by free_cached_info.
3443 (som_slurp_symbol_table): Similarly for the symbol table.
3445 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3447 * Makefile.in (diststuff): Don't make headers.
3449 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3451 * Makefile.in: Rebuild dependencies.
3453 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3454 output_bfd is not SunOS.
3455 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3456 non-SunOS input files.
3458 * xcofflink.c: Extensive changes to support linking shared objects
3459 and generating a .loader section.
3460 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3461 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3462 last_symndx, and ldrel_count fields.
3463 * libcoff.h: Rebuild.
3464 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3465 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3467 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3468 (bfd_xcoff_export_symbol): Declare.
3469 (bfd_xcoff_size_dynamic_sections): Declare.
3470 * bfd-in2.h: Rebuild.
3472 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3474 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3475 * configure: Rebuild.
3476 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3477 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3479 (pmac_xcoff_vec): Update to use new xcoff support.
3480 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3481 (xcoff_write_armap): Declare buf as unsigned char.
3482 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3484 * mpw-make.sed: Generalize subdir_do edit.
3486 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3488 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3489 correctly. Don't initialize asect->vma.
3491 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3493 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3494 something a little less than the page size.
3496 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3498 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3500 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3502 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3503 * coffcode.h (coff_write_object_contents): If .bss is before
3504 .data us that as data_start.
3505 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3507 * peicode.h (add_data_entry): Use _cooked_size of data directory.
3508 (coff_swap_outhdr_out): Hardwire in version number.
3510 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
3512 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3513 major and minor to *_vno, since the former are also macros in
3514 SunOS header files. Cast result of bfd_alloc to appropriate
3517 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3518 before assigning to sec_data.
3520 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
3522 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3523 now relative to the section, not absolute.
3524 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3525 get the file name when there is a N_SO directory name. When
3526 handling stabs, remember that section->vma was added to the
3529 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
3531 * sunos.c (struct sunos_link_hash_table): Add needed field.
3532 (sunos_link_hash_table_create): Call bfd_release, not free.
3533 (sunos_link_hash_table_create): Initialize needed field.
3534 (sunos_add_dynamic_symbols): Record needed objects.
3535 (bfd_sunos_get_needed_list): New function.
3536 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3537 * bfd-in2.h: Rebuild.
3539 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
3541 * libcoff-in.h (pe_data_type.in_reloc_p): New.
3543 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
3545 * bfd-in.h (struct bfd_link_needed_list): Rename from
3546 bfd_elf_link_needed_list.
3547 * bfd-in2.h: Rebuild.
3548 * elf.c, elflink.h, libelf.h: Corresponding changes.
3550 Add start at AIX linker support; no shared libraries yet.
3551 * xcofflink.c: New file.
3552 * configure.in (rs600coff_vec): Use xcofflink.o.
3553 * configure: Rebuild.
3554 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3556 (struct xcoff_section_tdata): Define.
3557 (xcoff_section_data): Define macro.
3558 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3559 (_bfd_xcoff_bfd_link_add_symbols): Declare.
3560 (_bfd_xcoff_bfd_final_link): Declare.
3561 (_bfd_ppc_xcoff_relocate_section): Declare.
3562 * libcoff.h: Rebuild.
3563 * coff-rs6000.c: Clean up a bit.
3564 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
3565 cputype, csects, and debug_indices.
3566 (xcoff_copy_private_bfd_data): Copy cputype.
3567 (xcoff_howto_table): Rename from rs6000coff_howto_table.
3568 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3569 (xcoff_reloc_type_lookup): Rename from
3570 rs6000coff_reloc_type_lookup.
3571 (coff_relocate_section): Define.
3572 (_bfd_xcoff_sizeof_headers): Define.
3573 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3574 (_bfd_xcoff_bfd_relax_section): Define.
3575 (_bfd_xcoff_bfd_link_split_section): Define.
3576 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3578 * coffcode.h (coff_compute_section_file_positions): If AIX,
3579 increment sofar by SMALL_AOUTSZ if not executable.
3580 (coff_write_object_contents): If AIX, always output an a.out
3581 header; if not executable, header size of SMALL_AOUTSZ.
3582 * hash.c (struct bfd_strtab_hash): Add xcoff field.
3583 (_bfd_stringtab_init): Initialize xcoff field.
3584 (_bfd_xcoff_stringtab_init): New function.
3585 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3586 (_bfd_stringtab_emit): In XCOFF mode, write out length.
3587 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3588 * libbfd.h: Rebuild.
3589 * Makefile.in: Rebuild dependencies.
3590 (BFD32_BACKENDS): Add xcofflink.o.
3591 (CFILES): Add xcofflink.c.
3593 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3594 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
3595 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3597 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3599 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3601 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
3603 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3604 * config.in: Regenerated.
3606 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3607 (_bfd_chunksize): New variable.
3608 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3609 for obstack chunk size.
3610 * configure.in: Check for getpagesize.
3611 * configure: Regenerated.
3613 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3615 * trad-core.c (rawptr): Make it a local variable of
3616 ptrace_unix_core_file_p.
3618 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
3620 * coff-arm.c (in_reloc_p): New.
3621 * coff-i386.c (in_reloc_p): New.
3622 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3623 (coff_write_object_contents): Only set has_reloc_section
3625 * cofflink.c (_bfd_coff_generic_relocate_section): Call
3626 in_reloc_p to decide if reloc should be emitted.
3627 * libcoff.h (pe_data_type.in_reloc_p): New.
3628 * peicode.h (pe_mkobject): Initialize in_reloc_p.
3630 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
3632 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3633 (_bfd_coff_read_internal_relocs): Likewise.
3634 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3635 (_bfd_coff_read_internal_relocs): Likewise.
3637 * elflink.h (elf_link_add_object_symbols): Correct conditions
3638 under which type and size change warnings are issued.
3640 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
3642 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3643 a symbol which is not in a real section.
3644 (coff_write_native_symbol): Corresponding change.
3646 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3647 coff_link_hash_newfunc and make non-static.
3648 (_bfd_coff_link_hash_table_init): New function, broken out of
3649 _bfd_coff_link_hash_table_create.
3650 (_bfd_coff_link_hash_table_create): Use it.
3651 (process_embedded_commands): Make static.
3652 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3653 (_bfd_coff_link_hash_table_init): Declare.
3654 * libcoff.h: Rebuild.
3656 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3657 field in XCOFF tdata.
3658 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3659 U802ROMAGIC, for clarity. Try to set arch and machine correctly
3660 based on cputype stored in a.out header, or in n_type of initial
3662 (coff_write_object_contents): Set cputype correctly in a.out
3664 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3666 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3667 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
3669 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3670 * libcoff.h: Rebuild.
3672 * cpu-rs6000.c (rs6000_compatible): New static function.
3673 (bfd_rs6000_arch): Use it.
3674 * cpu-powerpc.c (powerpc_compatible): New static function.
3675 (arch_info_struct): Define various flavours of PowerPC.
3676 (bfd_powerpc_arch): Use powerpc_compatible. Point at
3679 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
3681 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
3683 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
3685 * elflink.h (elf_link_add_object_symbols): Don't warn about
3686 changing the size or type if the old definition was weak.
3688 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
3690 * coffcode.h (combined_entry_type): Add fix_line field.
3691 (coff_slurp_line_table): Warn if we try to set the lineno field of
3693 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3694 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
3695 * coffgen.c (coff_mangle_symbols): Handle fix_line.
3696 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3698 (coff_print_symbol): Print fix_value symbols in a useful fashion.
3699 * libcoff.h: Rebuild.
3701 * libcoff-in.h (struct xcoff_tdata): Define.
3702 (xcoff_data): Define.
3703 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3704 * bfd-in2.h, libcoff.h: Rebuild.
3705 * coff-rs6000.c (xcoff_mkobject): New static function.
3706 (coff_mkobject): Define.
3707 (xcoff_copy_private_bfd_data): New static function.
3708 (coff_bfd_copy_private_bfd_data): Define.
3709 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3711 (rs6000coff_vec): Add DYNAMIC to object_flags.
3712 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3713 .loader sections specially.
3714 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3715 section alignment from the XCOFF tdata information.
3716 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3717 F_SHROBJ, and copy the extra a.out header information into the
3718 XCOFF tdata structure.
3719 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3720 F_DYNLOAD and the extra a.out header information.
3721 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3722 C_HIDEXT symbol with attached csect information.
3723 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3724 in the o_maxdata field.
3725 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3726 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3727 end if BSF_NOT_AT_END is set.
3729 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3730 _bfd_read_ar_hdr_fn.
3731 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3732 * bfd-in2.h, libbfd.h: Rebuild.
3733 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3735 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3736 (bfd_slurp_bsd_armap_f2): Likewise.
3737 (_bfd_slurp_extended_name_table): Likewise.
3739 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3741 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3743 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3744 when the symbol table is empty.
3746 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3747 space for section symbols, since we don't output them either.
3748 (elf_m68k_adjust_dynindx): Removed.
3750 * ptrace-core.c (rawptr): Make it a local variable of
3751 ptrace_unix_core_file_p.
3753 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3755 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3758 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3759 Mac object file formats.
3761 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3763 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3764 auxent if there isn't one.
3765 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3766 rather than FILNMLEN as the maximum name length.
3768 * coffcode.h (bfd_coff_backend_data): Add new field
3769 _bfd_coff_print_aux.
3770 (bfd_coff_print_aux): New static function.
3771 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3772 scnlen field of an XTY_LD csect aux entry.
3773 (coff_print_aux): New static function.
3774 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3775 in coff_pointerize_aux_hook.
3776 (bfd_coff_std_swap_table): Initialize new field.
3777 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3778 * libcoff.h: Rebuild.
3779 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3780 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3782 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3783 if there are symbols, for native AIX ld compatibility.
3785 * coffcode.h (bfd_coff_backend_data): Add new field
3786 _bfd_coff_pointerize_aux_hook.
3787 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3788 or I960, and as 0 otherwise.
3789 (bfd_coff_std_swap_table): Initialize new field.
3790 * libcoff.h: Rebuild.
3791 * coffgen.c (coff_pointerize_aux): Change parameters to take
3792 symbol pointer instead of type and class, and to take aux index.
3793 Call _bfd_coff_pointerize_aux_hook if it is defined.
3794 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3795 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3796 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3798 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3799 read-only/host-only support.
3801 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3803 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3806 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3807 BFD_JUMP_TABLE_ARCHIVE accordingly.
3808 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3809 (_bfd_compute_and_write_armap): Declare.
3810 (_bfd_generic_read_ar_hdr): Declare.
3811 (_bfd_read_ar_hdr): Define.
3812 (_bfd_noarchive_read_ar_hdr): Define.
3813 (_bfd_archive_bsd_read_ar_hdr): Define.
3814 (_bfd_archive_coff_read_ar_hdr): Define.
3815 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3816 _bfd_read_ar_hdr instead.
3817 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3818 (_bfd_compute_and_write_armap): Rename from
3819 compute_and_write_armap. Make non-static. Change all callers.
3820 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3821 than _bfd_snarf_ar_hdr.
3822 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3823 * ieee.c (ieee_read_ar_hdr): Define.
3824 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3825 * oasys.c (oasys_read_ar_hdr): Define.
3826 * som.c (som_read_ar_hdr): Define.
3827 * bfd-in2.h, libbfd.h: Rebuild.
3829 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3831 * peicode.c (coff_swap_filehdr_in): If symptr is
3832 zero, there aren't any symbols, even if nsyms is set.
3834 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3836 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3838 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3839 sections, and set styp correctly for them: .got, .hash, .dynamic,
3840 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3841 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3843 (ecoff_sort_hdrs): New static function.
3844 (ecoff_compute_section_file_positions): Return boolean, not void.
3845 Sort the sections by VMA before looking through them. Put the
3846 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3847 section on an appropriate boundary within the page.
3848 (ecoff_compute_reloc_file_positions): Check return value of
3849 ecoff_compute_section_file_positions.
3850 (_bfd_ecoff_set_section_contents): Likewise.
3851 (_bfd_ecoff_write_object_contents): Check for various Alpha
3852 section types when incrementing text_size and data_size. Call
3853 adjust_headers backend function if it exists.
3854 * coff-alpha.c (alpha_adjust_headers): New static function.
3855 (alpha_ecoff_backend_data): Initialize adjust_headers field.
3856 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3858 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3860 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
3862 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3863 of ALTERNATE_AIX_CORE_FORMAT.
3864 * configure.in (aix4): No longer need CORE_FLAGS.
3865 * configure: Updated.
3867 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
3869 NS32k changes from Ian Dall:
3870 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3872 (aout_link_input_section_std, aout_link_input_section_ext,
3873 aout_link_reloc_link_order): Call them instead of _bfd_*
3875 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3877 (backend_data): Use it instead of hardcoded zero.
3879 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3880 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3882 * ns32knetbsd.c: Include bfd.h.
3883 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3884 (MY_bfd_reloc_type_lookup): Declare function too.
3885 * pc532-mach.c (set_sizes): Don't declare.
3886 (MY_text_includes_header, MY_exec_header_not_counted): Define.
3887 (backend_data, MY_backend_data): Don't define.
3889 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3890 ns32k-*-lites* like ns32k-*-netbsd*.
3892 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3895 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
3897 * coffcode.h (coff_write_object_contents): Restore setting
3898 f_timdat to 0, deleted on August 22.
3900 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
3902 * coffcode.h (coff_bfd_copy_private_symbol_data,
3903 coff_bfd_copy_private_section_data,
3904 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
3905 * peicode.h (coff_bfd_copy_private_bfd_data): New
3906 (pe_bfd_copy_private_bfd_data): New.
3907 (coff_swap_scnhdr_in): Swap bss size into the right place.
3908 (pe_print_private_bfd_data): Add some newlines.
3910 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
3912 * som.c (setup_sections): Don't die if a space has no subspaces.
3914 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
3916 * elflink.h (elf_link_add_object_symbols): Don't let a weak
3917 dynamic symbol override a common symbol. Don't change the size or
3918 type if they have been set and the new symbol is not a definition.
3919 Warn if the size or type changes.
3921 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
3923 * som.c (som_begin_writing): Don't write the symbol table or
3925 (som_finish_writing): Write them here. Place them after the
3926 subspace data, but before the relocs.
3928 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
3930 * sunos.c (sunos_add_one_symbol): Just pass false, not
3931 info->shared_library, to sunos_create_dynamic_sections.
3932 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
3934 (sunos_check_dynamic_reloc): Remove .text section assertion.
3936 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
3938 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
3939 * configure, configure.in: Add pmac_xcoff_vec case.
3940 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
3941 * coff-pmac.c: New file, PowerMac XCOFF support.
3942 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
3943 * targets.c (pmac_xcoff_vec): Declare.
3945 * mpw-config.in: Various changes to be compatible with the
3946 autoconf-based configury.
3947 * mpw-make.sed: New file, sed commands to translate Unix
3948 makefile into MPW syntax.
3949 * mpw-make.in: Remove.
3950 * hosts/mpw.h: Remove.
3951 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
3952 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
3954 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
3956 * binary.c (binary_get_symtab): Return an empty string on error.
3957 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
3959 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
3961 * coff-ppc.c: Reformatted according to gnu conventions
3962 Removed irrelevant "if 0" code
3964 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
3966 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
3967 symbols rather than as indirect symbols.
3968 (MY(slurp_symbol_table)): Don't do anything special about
3971 * coffcode.h (coff_new_section_hook): Make sure that the alignment
3972 of .ctors and .dtors sections is no larger than 2.
3974 * sunos.c (sunos_add_one_symbol): Don't change
3975 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
3977 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
3978 dynamic symbols when creating a shared library.
3979 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
3981 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
3982 written even if it is not defined in a regular object.
3983 (sunos_write_dynamic_symbol): Use plt_offset for the address of
3984 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
3985 rather than the constant 22.
3986 (sunos_check_dynamic_reloc): Handle creating a shared library.
3987 (sunos_finish_dynamic_link): Set the first entry in the GOT to
3988 zero when creating a shared library.
3989 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
3990 write it out at the start of the symbol table.
3992 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
3994 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
3996 * config.bfd: Add arm-*-coff.
3997 * configure.in, configure: Add armcoff_{little,big}_vec.
3998 * targets.c (armcoff_{little,big}_vec): Declare.
3999 (bfd_target_vector): Add armcoff_{little,big}_vec.
4000 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4002 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4004 * targets.c (bfd_find_target): Remove debugging code.
4006 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4008 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4010 * Makefile.in: added *-ppc files
4011 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4012 allow pe based .o's to be shared with other tools on ppc/NT
4013 * config.bfd: added powerpc[le]-[pe|winnt] config support
4014 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4015 * peicode.h: Added more section flags for PE on ppc
4016 Added coff_swap_filehdr_out to allow peicode.h to be
4017 used for non-image PE files on ppc.
4018 Check for image, or not, before copying pe_opthdr
4019 * targets.c: Added new bfd's
4020 * targets.c: Removed two inactive bfds that shouldn't have made it this
4023 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4025 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4026 explicit values to initialize all relocs. Change all users.
4027 (ppc_elf_brtaken_inner): New function to handle branch predicition
4029 (ppc_elf_brtaken_reloc): Ditto.
4030 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4031 relocs use ppc_elf_unsupported_reloc.
4032 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4033 needs to be reported.
4034 (ppc_elf_relocate_section): Support branch prediction relocs.
4036 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4038 * bfd.c (bfd_assert): Remove \n from string passed to
4041 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4042 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4043 (bfd_coff_make_section_hook): Don't define.
4044 (coff_make_section_hook): Remove.
4045 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4046 (styp_to_sec_flags): Likewise.
4047 (coff_write_object_contents): Likewise.
4048 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4050 * libcoff.h: Rebuild.
4051 * coffgen.c (make_a_section_from_file): Just call
4052 bfd_make_section_anyway, not bfd_make_section or
4053 bfd_coff_make_section_hook.
4054 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4055 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4056 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4057 make_section_hook field.
4058 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4060 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4061 pointers into value field for warning and indirect symbols; just
4062 leave the value field alone.
4063 * linker.c (generic_link_add_symbol_list): Use next symbol for
4064 warning and indirect symbols, rather than looking in symbol value.
4065 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4066 parameter. Change all callers. Remove support for indirect
4067 symbols; it didn't work anyhow.
4068 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4069 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4070 * bfd-in2.h: Rebuild.
4072 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4074 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4075 go back to telling the tools this reloc operates on 32 bits.
4077 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4079 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4080 rather than a direct fprintf.
4081 * archive.c (_bfd_write_archive_contents): Likewise.
4082 * coffcode.h (coff_slurp_symbol_table): Likewise.
4083 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4084 (ppc_elf_unsupported_reloc): Likewise.
4085 (ppc_elf_relocate_section): Likewise.
4086 * i386linux.c (linux_tally_symbols): Likewise.
4087 (linux_finish_dynamic_link): Likewise.
4088 * osf-core.c (osf_core_core_file_p): Likewise.
4089 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4090 * som.c (som_sizeof_headers): Likewise.
4091 * srec.c (srec_bad_byte): Likewise.
4092 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4093 * libbfd-in.h (bfd_assert): Declare first parameter const.
4094 * libbfd.h: Rebuild.
4095 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4096 bfd_reloc_overflow is enough.
4097 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4098 * coff-h8500.c (rtype2howto): Likewise.
4099 * coff-z8k.c (rtype2howto): Likewise.
4100 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4101 * elf.c (_bfd_elf_get_lineno): Likewise.
4102 (_bfd_elf_no_info_to_howto): Likewise.
4103 (_bfd_elf_no_info_to_howto_rel): Likewise.
4104 * hp300hpux.c (convert_sym_type): Likewise.
4105 (MY(swap_std_reloc_in)): Likewise.
4106 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4108 * libaout.h (struct aoutdata): Add line_buf field.
4109 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4110 and filename_buffer. Instead, use a malloc buffer stored in the
4111 new line_buf field. Remove length restrictions.
4113 * coffgen.c (string_size): Remove static variable.
4114 (debug_string_size, debug_string_section): Likewise.
4115 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4116 and debug_string_size_p parameters. Use them instead of the
4117 global variables. Change all callers.
4118 (coff_write_symbol): Likewise.
4119 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4120 (coff_write_symbols): Add local variables to replace removed
4123 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4124 function, and line_base fields.
4125 * libcoff.h: Rebuild.
4126 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4127 information, rather than using static variables.
4129 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4130 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4132 * init.c (initialized): Remove static variable.
4133 (bfd_init): Don't bother setting initialized.
4134 (bfd_check_init): Remove.
4135 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4136 * libbfd.h: Rebuild.
4138 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4140 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4141 size for full core dumps. Copy core file header to private data.
4142 (rs6000coff_core_file_failing_command,
4143 rs6000coff_core_file_failing_signal): New functions to extract
4144 the file name and terminating signal from the core file.
4145 * coff-rs6000.c: Use them.
4147 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4149 Change arch info to be const, initialized at compile time.
4150 * archures.c: Reindent many functions. Change CONST to const.
4151 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4152 nothing set it anyhow. Make next const.
4153 (bfd_arch_info_list): Remove.
4154 (bfd_archures_list): Rename from archures_init_table. Change from
4155 a table of function pointers to a table of bfd_arch_info_type
4156 structure addresses.
4157 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4158 (bfd_lookup_arch): Likewise.
4159 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4161 (bfd_default_arch_struct): Make const.
4162 (bfd_arch_init, bfd_arch_linkin): Remove.
4163 (bfd_get_arch_info): Return a const pointer.
4164 * init.c (bfd_init): Don't call bfd_arch_init.
4165 * bfd.c (struct _bfd): Make arch_info const.
4166 * bfd-in2.h: Rebuild.
4167 * libbfd.h: Rebuild.
4168 * configure.in: Put & before everything in $selarchs.
4169 * configure: Rebuild.
4170 * cpu-*.c: Change bfd_*_arch from a function which calls
4171 bfd_arch_linkin to a const structure.
4172 * ieee.c (ieee_object_p): Make arch const.
4174 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4176 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4178 * bfd-in2.h: Regenerate.
4179 * libbfd.h: Regenerate.
4181 * elf32-ppc.c (reloc_type): Update names to match current draft.
4182 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4183 relative. Update names to current V.4 draft.
4184 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4185 (ppc_elf_relocate_section): Rename relocations to match draft.
4187 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4189 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4190 compiled with -mrelocatable-lib to be linked with either normal
4191 modules or -mrelocatable modules.
4193 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4195 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4196 in the a.out header.
4198 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4199 a reloc against a local symbol, even if it's not a section.
4201 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4203 * targets.c (bfd_target): Remove unused align_power_min field.
4204 * bfd-in2.h: Rebuild.
4205 * All backends: Remove initialization of align_power_min.
4207 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4209 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
4211 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4213 * config.bfd (mips-dec-netbsd*): New target.
4214 * configure.host (mips-dec-netbsd*): New host.
4215 * configure.in (mips-dec-netbsd*): New native.
4216 * configure: Rebuild.
4218 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4220 Make the COFF backend linker merge common types:
4221 * cofflink.c (struct coff_debug_merge_element): Define.
4222 (struct coff_debug_merge_type): Define.
4223 (struct coff_debug_merge_hash_entry): Define.
4224 (struct coff_debug_merge_hash_table): Define.
4225 (coff_debug_merge_hash_table_init): Define.
4226 (coff_debug_merge_hash_table_free): Define.
4227 (coff_debug_merge_hash_lookup): Define.
4228 (struct coff_final_link_info): Add debug_merge field.
4229 (coff_debug_merge_hash_newfunc): New static function.
4230 (_bfd_coff_final_link): Allocate and free debug_merge table.
4231 (coff_link_input_bfd): Merge identical enum, struct and union
4234 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
4236 Convert i960 COFF to use COFF backend linker.
4237 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
4238 structure to store the symbol being used.
4239 (coff_i960_start_final_link): New static function.
4240 (coff_i960_relocate_section): New static function.
4241 (coff_i960_adjust_symndx): New static function.
4242 (coff_start_final_link): Define.
4243 (coff_relocate_section): Define.
4244 (coff_adjust_symndx): Define.
4245 * coffcode.h (bfd_coff_backend_data): Add new callback function
4246 _bfd_coff_start_final_link.
4247 (bfd_coff_start_final_link): Define.
4248 (coff_start_final_link): Define if not defined.
4249 (bfd_coff_std_swap_table): Add coff_start_final_link.
4250 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
4252 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
4253 function callback is not NULL.
4254 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
4255 (_bfd_coff_internal_syment_name): Declare.
4256 * libcoff.h: Rebuild.
4257 * configure.in (icoff_big_vec): Add cofflink.o.
4258 (icoff_little_vec): Likewise.
4259 * configure: Rebuild.
4261 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
4263 * Makefile.in (clean-info): Remove extraneous tab from line
4266 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
4268 * cofflink.c (coff_link_input_bfd): Fail if a section with no
4269 contents has relocs.
4271 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
4273 * coffcode.h (coff_compute_section_file_positions): Keep the
4275 (coff_write_object_contents): Remember if it's a relocatable
4277 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
4278 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
4279 if relocatable file. Swap out saved raw size.
4281 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
4283 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
4284 (maintainer-clean): Rename from realclean, passing
4285 maintainer-clean down to subdirectories, but leave realclean as a
4288 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
4291 * dep-in.sed: Remove config.h from generated dependencies.
4293 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
4294 broken out of sunos_canonicalize_dynamic_symtab.
4295 (sunos_canonicalize_dynamic_symtab): Call new function
4296 sunos_slurp_dynamic_symtab.
4297 (sunos_add_dynamic_symbols): Add three new parameters. Return the
4298 dynamic symbol table to the caller.
4299 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
4300 callback to override the symbols being read.
4301 * libaout.h (struct aout_backend_data): Add three new parameters
4302 to add_dynamic_symbols callback.
4304 Extensive minor changes to avoid various gcc warnings. Also:
4305 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
4306 * archures.c (bfd_arch_info_type): Change mach field from long to
4308 (bfd_lookup_arch): Change machine parameter from long to unsigned
4311 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
4313 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
4314 a symbol with a non-zero plt_offset.
4316 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
4318 * elfcode.h (align_file_position): Remove; not used.
4320 * configure.in: Only check for <sys/procfs.h> on a native system,
4321 and make sure it defines prstatus_t.
4322 * configure: Rebuild.
4324 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
4326 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
4328 * config.in: Rename from config.h.in.
4329 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
4330 Check for config.h:config.in when creating stamp-h.
4331 * configure: Rebuild.
4332 * Makefile.in (stamp-h): Depend upon config.in rather than
4333 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
4334 calling config.status.
4336 * Makefile.in (do_distclean): Remove config.h and stamp-h.
4337 (Makefile): Just rebuild Makefile.
4338 (config.h, stamp-h): New targets.
4339 * configure.in: Create stamp-h when rebuilding config.h.
4340 * configure: Rebuild.
4342 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
4344 * configure.in: Call AC_CONFIG_HEADER. Substitute
4345 HOST_64BIT_LONG. Check that various header files exist. Check
4346 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
4347 and/or free need to be declared. Don't make a link to sysdep.h.
4348 Define TRAD_HEADER for various hosts.
4349 * configure: Rebuild.
4350 * configure.host: Don't set my_host. Add definitions taken from
4351 host header files for various entries. Remove entries which now
4353 * acconfig.h: New file.
4354 * config.h.in: New file, built by autoheader.
4355 * sysdep.h: New file.
4356 * Makefile.in (do_distclean): Don't remove sysdep.h.
4358 (LOCAL_H_DEPS): New variable.
4359 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
4361 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
4362 ($(OPTIONAL_BACKENDS)): Likewise.
4363 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4364 looking through sysdep.h.
4365 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4366 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4367 (fprintf_vma, sprintf_vma): Likewise.
4368 (int64_type, uint64_type): Don't define.
4369 * bfd-in2.h: Rebuild.
4370 * archures.c, bfd.c, srec.c: Include <ctype.h>.
4371 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4372 * lynx-core.c: Include stuff from old hosts/lynx.h.
4373 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4374 rather than NO_FCNTL.
4375 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4376 rather than NATIVE_HPPAHPUX_COMPILER.
4377 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
4379 * hosts/*.h: Remove all header files which merely include,
4380 declare, and define things. Leave header files which define
4381 information needed by trad-core.c.
4383 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4384 (BFD_CC_FOR_BUILD): Define.
4385 * configure.in: Use BFD_CC_FOR_BUILD.
4386 * configure: Rebuild.
4388 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
4390 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4391 * configure: Rebuild.
4393 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4396 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
4398 * config.bfd: i386pe_ve -> i386pe_vec.
4400 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
4402 * configure.host: Incorporate host Makefile fragments by setting
4404 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
4405 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
4406 value based on whether the code is being compiled by a cross
4407 compiler. Don't substitute host_makefile_frag or frags.
4408 * aclocal.m4: New file to define local AC_PROG_CC.
4409 * configure: Rebuild.
4410 * Makefile.in (INSTALL): Set to @INSTALL@.
4411 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4412 (INSTALL_DATA): Set to @INSTALL_DATA@.
4414 (CC): Define as @CC@.
4415 (CFLAGS): Set to @CFLAGS@.
4416 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4417 (@host_makefile_frag@): Remove.
4418 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
4419 after other options.
4420 (config.status): Remove dependency upon @frags@.
4421 * config/*.mh, config/README: Remove.
4423 * config.bfd: Rewrite to incorporate the contents of the Makefile
4424 fragments by setting shell variables, rather than merely returning
4425 the name of a Makefile fragment.
4426 * configure.in: Use shell variables set by config.bfd rather than
4427 looking at the target Makefile fragment files. Don't substitute
4428 target_makefile_frag. Do substitute TDEFINES.
4429 * configure: Rebuild.
4430 * Makefile.in (@target_makefile_frag@): Remove.
4431 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4432 * config/*.mt: Remove.
4434 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4436 * configure.in: Put changequote lines around "i[345]86" patterns
4437 section of core file support.
4439 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4441 * som.c (som_bfd_print_private_bfd_data): Define to use the
4444 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4446 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4447 entry, text_start and data_start.
4449 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4451 * Makefile.in (OFILES): Remove $(TDEPFILES).
4452 * config/apollo.mt (TDEPFILES): Remove.
4453 * config/README: Update.
4455 * configure.in: For a native configuration, set COREFILE and
4456 COREFLAG based on the canonical host name.
4457 * configure: Rebuild.
4458 * Makefile.in: Rebuild dependencies.
4459 (ALL_CFLAGS): Add @COREFLAG@.
4460 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4461 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4462 support routines. Check LYNX_CORE rather than HOST_LYNX.
4463 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4464 * i386lynx.c: Likewise.
4465 * m68klynx.c: Likewise.
4466 * sparclynx.c: Likewise.
4467 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4468 * *-core.c: Comment changes.
4469 * config/decstation.mh (HDEPFILES): Remove.
4470 (HDEFINES): Remove -DTRAD_CORE.
4471 * config/irix3.mh (RANLIB): Remove.
4472 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4473 (HDEFINES): Remove -DIRIX_CORE.
4474 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4475 (HDEFINES): Remove -DTRAD_CORE.
4476 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4477 * config/ultra3.mh (RANLIB): Remove.
4478 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4479 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4480 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4481 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4482 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4483 * config/i386aix.mh, config/i386bsd.mh: Remove.
4484 * config/i386linux.mh, config/i386mach3.mh: Remove.
4485 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4486 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4487 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4488 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4489 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4490 * config/solaris2.mh, config/stratus.mh: Remove.
4491 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4492 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4494 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4496 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4497 DT_FINI entry if the appropriate symbol is not in the hash table.
4499 * libelf.h (struct elf_backend_data): Add create_program_headers
4500 and want_hdr_in_seg fields.
4501 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4503 (elf_backend_create_program_headers): Likewise.
4504 (elfNN_bed): Initialize create_program_headers and
4506 * elf.c (get_program_header_size): Call create_program_headers
4508 (map_program_segments): Check want_hdr_in_seg backend field. Call
4509 create_program_headers backend routine.
4511 * elf.c (assign_file_positions_except_relocs): Align non allocated
4512 sections when creating an executable.
4514 * elfcode.h (elf_swap_phdr_in): Make non static.
4515 (elf_swap_phdr_out): Make non static.
4516 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4517 (bfd_elf32_swap_phdr_out): Declare.
4518 (bfd_elf64_swap_phdr_in): Declare.
4519 (bfd_elf64_swap_phdr_out): Declare.
4521 * ecofflink.c (ecoff_collect_shuffle): New static function.
4522 (_bfd_ecoff_get_accumulated_pdr): New function.
4523 (_bfd_ecoff_get_accumulated_sym): New function.
4524 (_bfd_ecoff_get_accumulated_ss): New function.
4525 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4526 (_bfd_ecoff_get_accumulated_sym): Declare.
4527 (_bfd_ecoff_get_accumulated_ss): Declare.
4528 * libbfd.h: Rebuild.
4530 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
4532 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4534 * elflink.h (elf_link_add_object_symbols): Handle indirect and
4535 warning symbols. If any section is named .gnu.warning.XXX, treat
4536 the contents as a warning to be issued if the symbol XXX is
4538 (elf_link_output_extsym): For an indirect or warning symbol, just
4539 output the symbol it points to.
4541 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4542 if bfd_hash_allocate fails, since it will already be set.
4543 (generic_link_hash_newfunc): Likewise.
4544 (archive_hash_newfunc): Likewise.
4545 (hash_entry_bfd): New static function.
4546 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4547 callback. Allocate a new warning using the hash table newfunc.
4548 Use bfd_hash_replace to update the entry in the hash table, rather
4549 than assuming we can copy the fields with structure assignment.
4551 * hash.c (bfd_hash_replace): New function.
4552 * bfd-in.h (bfd_hash_replace): Declare.
4553 * bfd-in2.h: Rebuild.
4555 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
4557 * config.bfd: Add mips*vr4300-*-elf* target.
4558 * config/mipsbvr4300.mt: Added.
4560 See file ChangeLog.2
4567 version-control: never