* elf32-m68k.c (howto_table): Change src_mask to 0 for all
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
4 relocation entries.
5
6 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
7
8 * coff-alpha.c (alpha_relocate_section): During final link, allow
9 output .lita section to be bigger than 64k by adjusting gp value
10 on a per-input section basis.
11 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
12 field.
13 (struct ecoff_section_tdata): Add gp field.
14
15 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
16
17 Handle Alpha ECOFF changes in OSF/1 3.2.
18 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
19 field.
20 * coff-alpha.c: Include "aout/ar.h".
21 (alpha_ecoff_get_relocated_section_contents): Don't require an
22 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
23 3.2 doesn't generate one.
24 (alpha_relocate_section): Likewise.
25 (alpha_ecoff_slurp_armap): Define.
26 (alpha_ecoff_slurp_extended_name_table): Define.
27 (alpha_ecoff_construct_extended_name_table): Define.
28 (alpha_ecoff_truncate_arname): Define.
29 (alpha_ecoff_write_armap): Define.
30 (alpha_ecoff_generic_stat_arch_elt): Define.
31 (alpha_ecoff_update_armap_timestamp): Define.
32 (ARFZMAG): Define.
33 (alpha_ecoff_read_ar_hdr): New static function.
34 (alpha_ecoff_get_elt_at_filepos): New static function.
35 (alpha_ecoff_openr_next_archived_file): New static function.
36 (alpha_ecoff_get_elt_at_index): New static function.
37 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
38 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
39 _bfd_ecoff to alpha_ecoff.
40 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
41 field from backend structure, rather than always calling
42 _bfd_get_elt_at_filepos.
43 * coff-mips.c (mips_ecoff_backend_data): Initialize
44 get_elt_at_filepos field.
45 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
46 from _bfd_generic_read_ar_hdr with minor changes.
47 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
48 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
49 * libbfd.h: Rebuild.
50
51 * bfd-in.h (BFD_IN_MEMORY): Define.
52 * libbfd-in.h (struct bfd_in_memory): Define.
53 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
54 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
55 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
56 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
57 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
58 (bfd_get_size): Handle BFD_IN_MEMORY flag.
59 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
60 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
61 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
62 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
63 iostream.
64 (bfd_openstreamr): Likewise.
65 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
66 BFD_IN_MEMORY is not set.
67 * riscix.c (riscix_some_aout_object_p): Likewise.
68 * bfd-in2.h, libbfd.h: Rebuild.
69
70 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
71 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
72 (bfd_get_elt_at_index): Define.
73 * archive.c (_bfd_generic_get_elt_at_index): Rename from
74 bfd_get_elt_at_index. Change index parameter from int to
75 symindex.
76 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
77 (_bfd_noarchive_get_elt_at_index): Define.
78 (_bfd_archive_bsd_get_elt_at_index): Define.
79 (_bfd_archive_coff_get_elt_at_index): Define.
80 * bfd-in2.h, libbfd.h: Rebuild.
81 * aout-target.h (MY_get_elt_at_index): Define if not defined.
82 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
83 * ieee.c (ieee_get_elt_at_index): Define.
84 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
85 * oasys.c (oasys_get_elt_at_index): Define.
86 * som.c (som_get_elt_at_index): Define.
87
88 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
89 numbers to the .text section.
90
91 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
92
93 * ieee.c (ieee_write_debug_part): Change return type to boolean.
94 If there is a SEC_DEBUGGING section, get the contents of the debug
95 information part from it.
96 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
97 section in memory.
98 (ieee_write_object_contents): Check ieee_write_debug_part return.
99
100 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
101
102 * config.bfd (i[345]86-*-freebsd*): Add target.
103 * configure.in (i386freebsd_vec): Add vec.
104 * configure: Regenerate.
105 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
106 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
107 Rebuild dependencies..
108 * freebsd.h: New file.
109 * i386freebsd.c: New file.
110 * targets.c (i386freebsd_vec): Declare.
111 (bfd_target_vector): Add i386freebsd_vec.
112 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
113 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
114
115 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
116
117 * ieee.c (ieee_slurp_debug): New static function.
118 (ieee_object_p): Call it.
119 (ieee_slurp_section_data): Skip debugging sections.
120 (ieee_get_reloc_upper_bound): Likewise.
121 (ieee_get_section_contents): Likewise.
122 (ieee_canonicalize_reloc): Likewise.
123 (ieee_write_section_part): Likewise.
124 (ieee_write_debug_part): Likewise.
125 (ieee_write_data_part): Likewise.
126 (init_for_output): Likewise.
127
128 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
129
130 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
131 work.
132 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
133 relocs, since ppc_elf_relocate_section handles the linker case.
134 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
135 used.
136 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
137 ppc_elf_relocate_section since that is now the only caller.
138 (ppc_elf_relocate_section): Ditto.
139
140 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
141
142 * coffcode.h (coff_write_object_contents): If we don't know the
143 section of the entry point for an XCOFF executable, always set the
144 entry address to -1.
145
146 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
147
148 * elf.c (bfd_section_from_shdr): Add support for note sections.
149
150 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
151
152 * bfd-in.h (struct _symbol_info): Add stab_type field.
153 * bfd-in2.h: Rebuild.
154 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
155
156 * elf32-ppc.c: Remove trailing newline from calls to
157 _bfd_error_handler.
158 (ppc_elf_merge_private_bfd_data): Only warn about endianness
159 difference if target endianness is known.
160
161 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
162
163 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
164 old style TOC16 references without using R_PPC_GOT.
165 (ppc_reloc_type): Ditto.
166 (ppc_elf_reloc_type_lookup): Add support for TOC16.
167 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
168 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
169 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
170 (ppc_elf_check_relocs): New function for GOT/PLT support that is
171 work in progress.
172 (ppc_elf_adjust_dynamic_symbol): Ditto.
173 (ppc_elf_adjust_dynindx): Ditto.
174 (ppc_elf_size_dynamic_sections): Ditto.
175 (ppc_elf_finish_dynamic_symbol): Ditto.
176 (ppc_elf_finish_dynamic_sections): Ditto.
177 (ELF_DYNAMIC_INTERPRETER): Define.
178
179 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
180
181 * elf.c (copy_private_bfd_data): When attaching sections to
182 segments ignore sections that won't be allocated. Patch from
183 Andreas Schwab.
184
185 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
186
187 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
188 anything else.
189
190 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
191
192 * coff-i960.c (CALC_ADDEND): Define.
193 (coff_i960_relocate_section): Add the input section VMA to the
194 addend for PC relative relocs.
195
196 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
197
198 * peicode.h (pe_print_pdata): Must test the entire entry for zero
199 to correctly terminate.
200
201 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
202
203 * targets.c (enum bfd_endian): Define.
204 (bfd_target): Rename byteorder_big_p to byteorder, and change it
205 from boolean to enum bfd_endian. Change header_byteorder_big_p
206 correspondingly.
207 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
208 (bfd_header_big_endian, bfd_header_little_endian): New macros.
209 * bfd-in2.h: Rebuild.
210 * All targets: Change initialization of byteorder and
211 header_byteorder to use enum bfd_endian values rather than
212 booleans.
213 * All files: Change all references to byteorder_big_p and
214 header_byteorder_big_p to use new bfd_*_endian macros.
215
216 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
217 s_vaddr.
218 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
219 vma.
220 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
221
222 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
223
224 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
225
226 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
227
228 * ieee.c: Lots of minor cleanups. Make many functions return
229 errors rather than calling abort. Also:
230 (ieee_write_twobyte): Remove; change callers to call existing
231 ieee_write_2bytes function.
232 (ieee_write_expression): Don't output the section twice when
233 outputting a local symbol. Don't emit an extraneous zero if there
234 is only one term.
235 (ieee_slurp_sections): Set the lma as well as the vma.
236 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
237
238 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
239 a recognized one or bfd_arch_unknown.
240 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
241 to succeed.
242 (ihex_get_symtab): Likewise.
243
244 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
245
246 * aoutx.h: Include <ctype.h>.
247 (struct aout_link_includes_table): Define.
248 (struct aout_link_includes_totals): Define.
249 (struct aout_link_includes_entry): Define.
250 (aout_link_includes_lookup): Define macro.
251 (struct aout_final_link_info): Add includes field.
252 (aout_link_includes_newfunc): New static function.
253 (NAME(aout,final_link)): Initialize includes hash table.
254 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
255
256 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
257
258 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
259
260 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
261
262 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
263
264 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
265
266 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
267 (pe_print_private_bfd_data): call pe_print_reloc.
268 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
269 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
270 up some debugging as well.
271
272 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
273
274 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
275 <rfg@monkeys.com>.
276
277 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
278
279 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
280 when setting sections to NULL.
281
282 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
283
284 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
285 field.
286 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
287 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
288 for all symbols.
289 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
290 * bfd-in2.h: Rebuild.
291
292 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
293
294 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
295
296 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
297
298 * ihex.c (ihex_scan): Handle record types 4 and 5.
299 (ihex_object_p): Permit types 4 and 5.
300 (ihex_set_section_contents): Remove check for out of range
301 addresses.
302 (ihex_write_object_contents): Generate types 4 and 5.
303
304 * elflink.h (elf_link_output_extsym): Just ignore warning and
305 indirect references to symbols which don't really exist.
306
307 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
308
309 * peicode.h (pe_print_idata): Minor format fixes
310 (pe_print_edata): New function. Under private printing, this formats
311 the edata section of a PE file.
312 (pe_print_private_bfd_data): Added call to pe_print_edata.
313
314 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
315
316 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
317 index, don't call stoi.
318
319 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
320
321 * srec.c (srec_scan): Set lma as well as vma.
322
323 * ihex.c: New file; support for Intel Hex format.
324 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
325 (ihex_vec): Declare.
326 (bfd_target_vector): Always include ihex_vec.
327 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
328 * Makefile.in: Rebuild dependencies.
329 (BFD_LIBS): Add ihex.o
330 (BFD_LIBS_CFILES): Add ihex.c.
331 * bfd-in2.h: Rebuild.
332
333 * elf.c (assign_file_positions_for_segments): Sort the sections in
334 each segment.
335 (get_program_header_size): Return the right size if segment_map is
336 not NULL.
337 (copy_private_bfd_data): Don't bother to sort the sections.
338
339 * bfd.c (bfd_record_phdr): New function.
340 * bfd-in.h (bfd_record_phdr): Declare.
341 * bfd_in2.h: Rebuild.
342
343 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
344 BFD_ASSERT.
345
346 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
347 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
348 bfd_size_type.
349 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
350 (bfd_zmalloc): Change declaration.
351 * libbfd.h: Rebuild.
352 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
353 and realloc. Don't set bfd_error_no_memory if they fail.
354
355 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
356
357 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
358 uses as well. Added a new howto to deal with TOCREL16 relocs that
359 are TOCDEFN as well.
360 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
361 to handle RVA relocs from dlltool.
362 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
363 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
364 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
365
366 * coffcode.h (coff_set_alignment_hook): check idata$X sections
367 to get the right section alignment.
368
369 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
370
371 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
372 p_paddr if p_paddr is zero.
373 (make_mapping): Set includes_filehdr and includes_phdrs for first
374 PT_LOAD segment.
375 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
376 segment.
377 (assign_file_positions_for_segments): Handle includes_filehdr and
378 includes_phdrs. Remove special handling of PT_PHDR and first
379 PT_LOAD segments.
380 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
381 when appropriate. Remove special handling of PT_PHDR segment.
382 Use a more complex condition for when a section is included in a
383 segment to handle Solaris linker oddities.
384
385 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
386
387 * coff-m88k.c (howto_table): Reformatted for easier reading;
388 special_function now points to new function m88k_special_reloc.
389 (howto_hvrt16): Function previously used for handling HVRT16 relocs
390 removed.
391 (rtype2howto): Do not add reloc's r_offset to the addend, this will
392 be done correctly by m88k_special_reloc.
393 (reloc_processing): New function to be used by RELOC_PROCESSING.
394 (RELOC_PROCESSING): Define to call reloc_processing.
395
396 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
397
398 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
399 (pe_print_pdata): Likewise.
400
401 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
402 obstack_alloc fails.
403 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
404 fails.
405 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
406 * Many files: don't set bfd_error_no_memory if one of the above
407 routines fails.
408
409 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
410 if p_paddr_valid is set.
411 (copy_private_bfd_data): New static function.
412 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
413
414 * elf.c (assign_file_positions_for_segments): Fix case where extra
415 program headers were allocated.
416
417 * elf.c (_bfd_elf_print_private_bfd_data): New function.
418 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
419 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
420 _bfd_elf_print_private_bfd_data.
421
422 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
423 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
424 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
425 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
426 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
427 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
428 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
429
430 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
431
432 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
433 * elf.c (make_mapping): New static function.
434 (map_sections_to_segments): New static function.
435 (elf_sort_sections): New static function.
436 (assign_file_positions_for_segments): New static function.
437 (map_program_segments): Remove.
438 (get_program_header_size): Remove sorted_hdrs, count, and
439 maxpagesize parameters. Simplify.
440 (assign_file_positions_except_relocs): When generating an
441 executable, use assign_file_positions_for_segments.
442 (elf_sort_hdrs): Remove.
443 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
444 to get_program_header_size.
445
446 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
447
448 * hp300hpux.c (MY(callback)): Set lma as well as vma.
449
450 * configure, config.in: Regenerate with autoconf 2.7.
451
452 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
453 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
454
455 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
456
457 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
458 (ecoff_sec_to_styp_flags): Likewise.
459 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
460 (ecoff_set_symbol_info): Handle scRConst.
461 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
462 (ecoff_compute_section_file_positions): Handle .rconst section.
463 (_bfd_ecoff_write_object_contents): Likewise.
464 (ecoff_link_check_archive_element): Handle scRConst.
465 (ecoff_link_add_externals): Likewise.
466 (ecoff_link_write_external): Handle .rconst section.
467 (ecoff_reloc_link_order): Likewise.
468 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
469 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
470 section.
471 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
472
473 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
474 DEF_DYNAMIC flag is set.
475
476 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
477
478 * host-aout.c: If TRAD_HEADER is defined, include it.
479
480 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
481
482 * aclocal.m4 (AC_PROG_CC): Remove local definition.
483 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
484 (BFD_NEED_DECLARATION): New function.
485 * configure.in: Use BFD_NEED_DECLARATION.
486 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
487 * configure, config.in: Rebuild with autoconf 2.6.
488
489 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
490 special_sections before returning when called with a non XCOFF
491 BFD.
492
493 * coffgen.c (coff_renumber_symbols): Sort common symbols with
494 global symbols.
495
496 * coffcode.h (coff_compute_section_file_positions): Only pad the
497 previous section to force file alignment when creating an
498 executable.
499
500 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
501
502 * coffcode.h (coff_compute_section_file_positions): If
503 RS6000COFF_C, set up the .debug section.
504
505 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
506 if it is not large enough to accomodate the entire TOC area with
507 signed 16 bit offsets.
508 (xcoff_write_global_symbol): Handle negative TOC offsets in global
509 linkage code.
510 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
511 TOC anchor to use the TOC value used in the output file.
512
513 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
514
515 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
516 (_bfd_coff_read_string_table): Likewise.
517
518 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
519
520 * pe-arm.c: Fix typos.
521 * coff-arm.c: Likewise.
522
523 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
524
525 * coff-ppc.c (list_ele): Added "cat"egory member.
526 (record_toc): New category parameter (priv or pub).
527 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
528 (ppc_process_before_allocation): Removed embrionic data-in-toc from
529 the mainline. It addes extra toc cells in error.
530 (ppc_coff_swap_sym_in_hook): Added some documentation.
531 (dump_toc): Can now diagnose "virtual toc" chicanery.
532
533 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
534
535 * elf-bfd.h (struct elf_link_hash_table): Change type of
536 dynsymcount and bucketcount fields from size_t to bfd_size_type.
537
538 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
539
540 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
541 pointerize C_LEAFSTAT or C_LEAFEXT entries.
542
543 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
544 DT_INIT and DT_FINI entries if the _init or _fini symbol is
545 defined or mentioned in a regular file.
546
547 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
548
549 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
550 (coff_ppc_relocate_section): Handle TOCDEFN attribute
551 (coff_ppc_relocate_section): Correct REL24 handling
552 (ppc_process_before_allocation): Correct TOCDEFN handling
553
554 * peicode.h (dir_names): Added name descriptions
555
556 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
557
558 * VERSION: Updated to cygnus-2.6.
559
560 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
561
562 * targets.c (m68k4knetbsd_vec): Declare.
563
564 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
565
566 * targets.c (bfd_target): Change type of second argument to
567 _bfd_print_private_bfd_data from void * to PTR.
568 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
569 using PTR rather than void *.
570 * bfd-in2, libbfd.h: Rebuild.
571 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
572 to PTR.
573 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
574 _bfd_generic_bfd_print_private_bfd_data rather than casting
575 bfd_true.
576
577 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
578
579 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
580 "DO NOT DELETE" lines or blank lines that mkdep writes on some
581 systems.
582 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
583 BFD64_BACKENDS_CFILES): New variables.
584 (CFILES): Use them.
585
586 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
587
588 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
589 not at the file position of the first section.
590 * coffcode.h (coff_compute_section_file_positions): Avoid using
591 unportable #elif.
592 (coff_write_object_contents): When generating a PPC PE executable
593 with no symbols, round up the file size to a COFF_PAGE_SIZE
594 boundary.
595 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
596 don't write out a string table.
597
598 * elf.c (bfd_section_from_shdr): When using a different section
599 header, pass the new one to _bfd_elf_make_section_from_shdr.
600 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
601 (elf_map_symbols): Add section VMA to symbol value when comparing
602 against 0.
603 (_bfd_elf_compute_section_file_positions): Only build symbol table
604 if there are some symbols. Set file offset of symtab and strtab
605 sections.
606 (assign_file_positions_except_relocs): Remove dosyms parameter.
607 Change all callers. Never set file offset of symtab and strtab
608 sections.
609 (_bfd_elf_copy_private_section_data): New function.
610 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
611 (_bfd_elf_copy_private_symbol_data): New function.
612 (swap_out_syms): Check for special mapping of st_shndx created by
613 copy_private_symbol_data.
614 * elfxx-target.h: Use new copy routines.
615 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
616 (_bfd_elf_copy_private_section_data): Declare.
617
618 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
619
620 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
621 C_NT_WEAK.
622
623 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
624 _bfd_dummy_target, matching the recent change to archive
625 recognition.
626
627 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
628
629 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
630 arithmetic on PTR types.
631
632 * aout-target.h (MY(callback)): Set the lma of the sections.
633
634 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
635 symbol into a reloc against the section.
636
637 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
638
639 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
640 glue for the relocs: IMGLUE and IFGLUE.
641 (record_toc): new function - tracks toc contents
642 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
643 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
644 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
645 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
646 (ppc_record_toc_entry): Removed a debug define (duh)
647
648 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
649 (pe_print_idata): New function - formats the idata section data
650 (pe_print_pdata): New function - formats the pdata section data
651 (pe_print_private_bfd_data): calls to above
652
653 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
654
655 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
656 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
657 TARGET_SYM and TARGET_NAME for vector and BFD name.
658 * coff-pmac.c (pmac_xcoff_vec): Remove.
659 (TARGET_SYM, TARGET_NAME): Define.
660 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
661 machine to 0, not all PowerMacs are 601s.
662
663 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
664
665 * elfcode.h (elf_object_p): Read in any program headers.
666 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
667 based on the program headers, if any.
668 (elf_fake_sections): Set sh_addr from the vma, not the lma.
669 (map_program_segments): Set p_paddr of program headers based on
670 the lma.
671
672 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
673
674 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
675 failure.
676
677 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
678 trying to do a relocateable link with a non-a.out object file.
679
680 * archive.c (bfd_generic_archive_p): Check the first object file
681 in an archive even if target_defaulted is set. If the object file
682 has the wrong xvec, reject it.
683
684 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
685 be represented, report the name via _bfd_error_handler.
686 (translate_to_native_sym_flags): Likewise.
687 * elf32-mips.c (mips_elf_final_link): Likewise.
688 * oasys.c (oasys_write_sections): Likewise.
689
690 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
691 which checks for STYP_OVRFLO sections.
692 (coff_compute_section_file_positions): If RS6000COFF_C, handle
693 reloc and lineno count overflows.
694 (coff_write_object_contents): Call coff_count_linenumbers before
695 coff_compute_section_file_positions. If RS6000COFF_C, handle
696 reloc and lineno count overflows.
697 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
698 relocs before dealing with .pad sections. Count overflow section
699 headers when handling .pad sections.
700
701 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
702 if RS6000COFF_C.
703
704 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
705 (struct xcoff_link_hash_table): Add descriptor_section and
706 special_sections fields.
707 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
708 (xcoff_link_add_symbols): Set linkage section alignment. Create
709 descriptor section. Check for magic symbol names (_text, etc.),
710 and record them in special_sections if found. Set
711 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
712 descriptor field to point back to the function code symbol.
713 (xcoff_sweep): Always mark the special descriptor_section.
714 (bfd_xcoff_export_symbol): Check whether the symbol might be a
715 function descriptor, and mark it if it is.
716 (bfd_xcoff_size_dynamic_sections): Add new special_sections
717 parameter, and fill it in. Allocate space for the descriptor
718 section.
719 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
720 global linkage code. If an undefined function descriptor is
721 exported, arrange to define it. Warn about any other undefined
722 exported symbol.
723 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
724 (xcoff_write_global_symbol): Create a function descriptor when
725 necessary.
726 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
727 * bfd-in2.h: Rebuild.
728
729 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
730
731 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
732 (ppc_coff_link_hash_table): new types for hashing
733 (ppc_coff_link_hash_newfunc): hash entry constructor
734 (ppc_coff_link_hash_table_init): hash table initializer
735 (ppc_coff_link_hash_table_create): hash table constructor
736 (ppc_record_toc_entry): changed references to hash table
737 (coff_ppc_relocate_section): changed references to hash table
738
739 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
740 * libcoff.h: Rebuild
741
742 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
743 (coff_link_add_symbols): removed toc_offset init
744
745 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
746
747 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
748 first.
749
750 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
751 if it is given and mmep is available.
752 * acconfig.h: Undef USE_MMAP.
753 * configure, config.in: Regenerated.
754 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
755 table handling the old way.
756 (aout_get_external_symbols): Don't complain if last byte of string
757 table is nonzero.
758 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
759 (bfd_free_window) [! USE_MMAP]: Don't define.
760 (bfd_get_file_window,
761 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
762
763 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
764
765 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
766 0xffff0000.
767
768 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
769
770 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
771 compatible with AMD generated COFF files. Try to support both AMD
772 and GNU formats simultaneously.
773 (coff_a29k_relocate_section): Likewise.
774
775 * libbfd.c (bfd_get_file_window): Change writable parameter from
776 int to boolean; update all callers. Pass MAP_SHARED if not
777 writable--it's required on Solaris. Cast fprintf argument to
778 avoid warning.
779 * bfd-in.h (bfd_get_file_window): Update declaration.
780 * bfd-in2.h: Rebuild.
781 * aoutx.h: Update calls to bfd_get_file_window.
782
783 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
784 Change all uses.
785 (xcoff_swap_ldhdr_in): New static function.
786 (xcoff_swap_ldsym_in): New static function.
787 (xcoff_find_reloc): Handle the case of a single reloc correctly.
788 (xcoff_link_add_symbols): If we just created a descriptor, pass it
789 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
790 Handle XTY_ER/XMC_XO symbols correctly.
791 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
792 rather than normal symbol table.
793 (bfd_xcoff_import_symbol): It's not an error if the symbol is
794 already defined with the same absolute value.
795 (xcoff_mark): When considering called symbols, check whether the
796 descriptor is from a dynamic object, rather than the symbol
797 itself.
798 (xcoff_build_ldsyms): Likewise.
799
800 * libbfd.c (bfd_get_file_window): Change return type to boolean.
801 Cast realloc and malloc return values. If malloc or realloc fail,
802 set bfd_error_no_memory.
803 * bfd-in.h (bfd_get_file_window): Change type to boolean.
804 * bfd-in2.h: Rebuild.
805
806 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
807
808 * coff-ppc.c (ppc_record_toc_entry): new function.
809 (in_reloc_p): changed return value.
810 (coff_ppc_relocate_section): much rework.
811 (ppc_allocate_toc_section): new function.
812 (ppc_process_before_allocation): new function.
813 (ppc_coff_swap_sym_in_hook): new function.
814
815 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
816 (coff_link_add_symbols): initialize toc_offset.
817
818 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
819 (coff_swap_aouthdr_out): Added more sections to the data
820 dictionary for the pe file header. Also changed linker version
821 number on the ppc side.
822 (dir_names): small improvements to the dictionary printing.
823 (pe_mkobject_hook): save the file level flags.
824
825 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
826 (pe_tdata): added real_flags field
827 (coff_tdata): added local_toc_sym_map and access macro
828
829 * libcoff.h (coff_link_hash_entry): added toc_offset field
830 (pe_tdata): added real_flags field
831 (coff_tdata): added local_toc_sym_map and access macro
832
833 * coffcode.h (coff_set_alignment_hook): added hook for PE.
834 (coff_mkobject): init for local_toc_sym_map
835 (coff_write_object_contents): set the internal_a.magic to
836 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
837 ppc compilers use.
838
839 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
840
841 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
842 entries until both the line number address and the function name
843 address are too large.
844
845 * configure.in: Call AC_CHECK_PROG to find and cache AR.
846 * configure: Rebuilt.
847
848 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
849 is defined in the environment.
850
851 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
852
853 * som.c (som_get_section_contents_in_window): Define to use
854 generic version.
855
856 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
857
858 * coff-i860.c: New file, based on coff-i386.c.
859 * cpu-i860.c: New file, based on cpu-i386.c.
860 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
861 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
862 targets, using i860coff_vec.
863 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
864 trad-core.o and hosts/i860mach3.h.
865 (i860coff_vec): Use coff-i860.o and cofflink.o.
866 * configure: Rebuild.
867 * Makefile.in: Rebuild dependencies.
868 (ALL_MACHINES): Add cpu-i860.o.
869 (BFD32_BACKENDS): Add coff-i860.o.
870 (CFILES): Add cpu-i860.c and coff-i860.c.
871 * targets.c (i860coff_vec): Declare.
872 (bfd_target_vector): Add &i860coff_vec.
873 * archures.c (bfd_i860_arch): Declare.
874 (bfd_archures_list): Add &bfd_i860_arch.
875 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
876 (coff_set_flags): Handle bfd_arch_i860.
877 (coff_write_object_contents): Handle I860 a.out magic number.
878
879 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
880
881 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
882 the created .tc section to 2.
883 (xcoff_mark): Don't keep a .loader reloc for a call to an
884 undefined symbol when creating a shared library.
885 (xcoff_build_ldsyms): When creating a shared library, generate
886 global linkage code for a call to an undefined symbol.
887
888 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
889
890 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
891 BFD32_BACKENDS, BFD64_BACKENDS.
892 (.dep1): Put mkdep output in a separate file.
893 Rebuilt dependencies.
894
895 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
896 value.
897
898 Permit use of mmap when available:
899
900 * configure.in: Check for mmap, madvise, mprotect.
901 * config.in, configure: Regenerated.
902
903 * libbfd.c (struct _bfd_window_internal): Define type.
904 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
905 functions.
906 (ok_to_map): New static variable for debugging.
907 (_bfd_generic_get_section_contents_in_window): New function.
908 * bfd-in.h (bfd_window_internal): Declare type.
909 (bfd_window): Define type.
910 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
911 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
912 Declare.
913
914 * libaout.h (struct aoutdata): Add two window fields.
915 (obj_aout_sym_window, obj_aout_string_window): New macros.
916 * aoutx.h (some_aout_object_p): Initialize windows.
917 (aout_get_external_symbols): Get symbol data and strings in
918 windows instead of explicitly allocated buffers.
919 (slurp_symbol_table): Free window instead of memory.
920 (bfd_free_cached_info): Release windows instead of freeing storage
921 directly.
922 (aout_link_free_symbols): Ditto.
923
924 * targets.c (bfd_target): Add new field for
925 get_section_contents_in_window.
926 (BFD_JUMP_TABLE_GENERIC): Updated.
927 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
928 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
929 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
930 macros for get_section_contents_in_window field.
931
932 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
933
934 * core.c: Renamed to corefile.c
935 * makefile.dos (OBJS): Change core.o to corefile.o
936 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
937
938 start-sanitize-gm
939 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
940
941 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
942 targ_selvecs to allow debugging under Irix-5 native.
943
944 end-sanitize-gm
945 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
946
947 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
948 to o. Clobber and restore the list of new csects around the call
949 to _bfd_generic_link_add_one_symbol, in case it wants to report a
950 linker error and the linker wants to read the symbol table. Reset
951 the line number count of a real section even if it has no relocs.
952 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
953
954 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
955 is too small.
956
957 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
958
959 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
960 an undefined symbol in a shared link.
961
962 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
963 oldtype from bfd_link_order_type to bfd_link_hash_type. From
964 phdm@info.ucl.ac.be (Philippe De Muyter).
965
966 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
967
968 * coff-m88k.c (rtype2howto): New static function.
969 (RTYPE2HOWTO): Use it rather than a macro definition.
970
971 * coffcode.h (coff_write_object_contents): set internal_a.magic
972 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
973
974 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
975 define TRAD_HEADER to new file hosts/delta68.h.
976 m88*-motorola-sysv*, however, does use ptrace-core.o.
977 * hosts/delta68.h: New file.
978
979 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
980 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
981
982 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
983
984 * i386linux.c (MY(vec)): Declare before use.
985
986 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
987
988 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
989 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
990
991 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
992 BFD is not of the right type.
993 (bfd_elf_get_needed_list): Likewise.
994 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
995 * sunos.c (bfd_sunos_get_needed_list): Likewise.
996 * xcofflink.c (XCOFF_XVECP): Define.
997 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
998 of the right type.
999 (bfd_xcoff_import_symbol): Likewise.
1000 (bfd_xcoff_export_symbol): Likewise.
1001 (bfd_xcoff_link_count_reloc): Likewise.
1002 (bfd_xcoff_record_link_assignment): Likewise.
1003 (bfd_xcoff_size_dynamic_sections): Likewise.
1004
1005 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
1006 table index against the number of symbols for a base relative
1007 reloc.
1008
1009 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
1010 static function.
1011 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
1012 full_aouthdr flag here...
1013 (_bfd_xcoff_bfd_final_link): ...not here.
1014
1015 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
1016
1017 * libelf.h: Rename to elf-bfd.h to avoid conflict with
1018 systems that have a system <libelf.h>.
1019 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
1020 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
1021 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
1022 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
1023 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
1024 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
1025 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
1026
1027 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
1028
1029 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
1030 set, set BSF_WEAK in symbol. Change all callers.
1031 (ecoff_get_extr): Set weakext based on BSF_WEAK.
1032 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
1033 _bfd_generic_link_add_one_symbol.
1034 (ecoff_indirect_link_order): Check that the section tdata relocs
1035 are not NULL before using them.
1036
1037 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
1038 define TRAD_HEADER as hosts/alphalinux.h.
1039 * configure: Rebuild.
1040 * hosts/alphalinux.h: New file.
1041 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
1042 not int.
1043
1044 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
1045
1046 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
1047 C_ECOMM storage classes.
1048
1049 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
1050 of xcoff_mark.
1051 (xcoff_mark): Call xcoff_mark_symbol.
1052 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
1053 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
1054 doing it by hand.
1055 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
1056
1057 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
1058
1059 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
1060 field.
1061 (xcoff_find_reloc): New static function.
1062 (xcoff_link_add_symbols): Use it.
1063 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
1064 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
1065 relocate the value of C_DECL.
1066
1067 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
1068
1069 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
1070
1071 * cofflink.c (_bfd_coff_generic_relocate_section): Make
1072 callback decide what goes in .relocs.
1073 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
1074 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
1075 there is one.
1076
1077 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
1078
1079 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
1080 absolute section.
1081
1082 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
1083
1084 * xcofflink.c: More improvements, mostly to fix handling of
1085 constructors and a few other special cases.
1086 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
1087 zero, reverting yesterday's change.
1088 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
1089 (bfd_xcoff_link_count_reloc): Declare.
1090 (bfd_xcoff_record_link_assignment): Declare.
1091 * bfd-in2.h: Rebuild.
1092
1093 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
1094
1095 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
1096 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
1097 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
1098 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
1099 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
1100 Change PAGE_SIZE to TARGET_PAGE_SIZE.
1101
1102 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
1103 format.
1104
1105 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
1106 segments includes the a.out header. See to that the magic number
1107 *always* is big-endian.
1108
1109 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
1110 m68k4k NetBSD configurations.
1111
1112 * configure.in, configure: Separate i386 & mips NetBSD
1113 configurations from other BSD ones. Don't assume DEC is the only
1114 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
1115 configurations. Add support for m68k4k NetBSD object format.
1116
1117 * libaout.h: Added M_68K4K_NETBSD magic.
1118
1119 * m68k4knetbsd.c: New file.
1120
1121 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
1122
1123 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
1124 <machine/endian.h>.
1125
1126 * hosts/mipsnbsd.h: New file.
1127
1128 start-sanitize-gm
1129 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
1130
1131 * config.bfd: Add config stuff for mips*-*-magic* to set
1132 targ_defvec to ecoff_big_vec.
1133
1134 end-sanitize-gm
1135 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
1136
1137 * xcofflink.c: Numerous changes to get closer to a working XCOFF
1138 linker.
1139 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
1140 toc_section, and entry_section fields.
1141 (struct xcoff_section_tdata): Remove ldrel_count field.
1142 * libcoff.h: Rebuild.
1143 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
1144 fields.
1145 (coff_compute_section_file_positions): If RS6000COFF_C, generate
1146 full a.out header if full_aouthdr is set in xcoff_data.
1147 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
1148 based on sections stored in xcoff_data.
1149 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
1150 fields.
1151 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
1152 (rs6000coff_vec): Set symbol_leading_char to '.'.
1153 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
1154 value stored in ret rather than returning a pointer value.
1155
1156 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1157
1158 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
1159 format for now.
1160
1161 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
1162
1163 * som.c (som_slurp_string_table): Allocate the strings with malloc
1164 since they're free'd by free_cached_info.
1165 (som_slurp_symbol_table): Similarly for the symbol table.
1166
1167 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
1168
1169 * Makefile.in (diststuff): Don't make headers.
1170
1171 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
1172
1173 * Makefile.in: Rebuild dependencies.
1174
1175 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
1176 output_bfd is not SunOS.
1177 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
1178 non-SunOS input files.
1179
1180 * xcofflink.c: Extensive changes to support linking shared objects
1181 and generating a .loader section.
1182 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
1183 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
1184 last_symndx, and ldrel_count fields.
1185 * libcoff.h: Rebuild.
1186 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
1187 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
1188 is set.
1189 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
1190 (bfd_xcoff_export_symbol): Declare.
1191 (bfd_xcoff_size_dynamic_sections): Declare.
1192 * bfd-in2.h: Rebuild.
1193
1194 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
1195
1196 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
1197 * configure: Rebuild.
1198 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
1199 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
1200 contents.
1201 (pmac_xcoff_vec): Update to use new xcoff support.
1202 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
1203 (xcoff_write_armap): Declare buf as unsigned char.
1204 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
1205
1206 * mpw-make.sed: Generalize subdir_do edit.
1207
1208 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
1209
1210 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
1211 correctly. Don't initialize asect->vma.
1212
1213 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
1214
1215 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
1216 something a little less than the page size.
1217
1218 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
1219
1220 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
1221
1222 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
1223
1224 * coff-i386.c (coff_i386_reloc_type_lookup): New.
1225 * coffcode.h (coff_write_object_contents): If .bss is before
1226 .data us that as data_start.
1227 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
1228 calc correct.
1229 * peicode.h (add_data_entry): Use _cooked_size of data directory.
1230 (coff_swap_outhdr_out): Hardwire in version number.
1231
1232 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
1233
1234 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
1235 major and minor to *_vno, since the former are also macros in
1236 SunOS header files. Cast result of bfd_alloc to appropriate
1237 type.
1238
1239 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
1240 before assigning to sec_data.
1241
1242 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
1243
1244 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
1245 now relative to the section, not absolute.
1246 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
1247 get the file name when there is a N_SO directory name. When
1248 handling stabs, remember that section->vma was added to the
1249 offset.
1250
1251 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
1252
1253 * sunos.c (struct sunos_link_hash_table): Add needed field.
1254 (sunos_link_hash_table_create): Call bfd_release, not free.
1255 (sunos_link_hash_table_create): Initialize needed field.
1256 (sunos_add_dynamic_symbols): Record needed objects.
1257 (bfd_sunos_get_needed_list): New function.
1258 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
1259 * bfd-in2.h: Rebuild.
1260
1261 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
1262
1263 * libcoff-in.h (pe_data_type.in_reloc_p): New.
1264
1265 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
1266
1267 * bfd-in.h (struct bfd_link_needed_list): Rename from
1268 bfd_elf_link_needed_list.
1269 * bfd-in2.h: Rebuild.
1270 * elf.c, elflink.h, libelf.h: Corresponding changes.
1271
1272 Add start at AIX linker support; no shared libraries yet.
1273 * xcofflink.c: New file.
1274 * configure.in (rs600coff_vec): Use xcofflink.o.
1275 * configure: Rebuild.
1276 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
1277 fields.
1278 (struct xcoff_section_tdata): Define.
1279 (xcoff_section_data): Define macro.
1280 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
1281 (_bfd_xcoff_bfd_link_add_symbols): Declare.
1282 (_bfd_xcoff_bfd_final_link): Declare.
1283 (_bfd_ppc_xcoff_relocate_section): Declare.
1284 * libcoff.h: Rebuild.
1285 * coff-rs6000.c: Clean up a bit.
1286 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
1287 cputype, csects, and debug_indices.
1288 (xcoff_copy_private_bfd_data): Copy cputype.
1289 (xcoff_howto_table): Rename from rs6000coff_howto_table.
1290 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
1291 (xcoff_reloc_type_lookup): Rename from
1292 rs6000coff_reloc_type_lookup.
1293 (coff_relocate_section): Define.
1294 (_bfd_xcoff_sizeof_headers): Define.
1295 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
1296 (_bfd_xcoff_bfd_relax_section): Define.
1297 (_bfd_xcoff_bfd_link_split_section): Define.
1298 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
1299 coff.
1300 * coffcode.h (coff_compute_section_file_positions): If AIX,
1301 increment sofar by SMALL_AOUTSZ if not executable.
1302 (coff_write_object_contents): If AIX, always output an a.out
1303 header; if not executable, header size of SMALL_AOUTSZ.
1304 * hash.c (struct bfd_strtab_hash): Add xcoff field.
1305 (_bfd_stringtab_init): Initialize xcoff field.
1306 (_bfd_xcoff_stringtab_init): New function.
1307 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
1308 (_bfd_stringtab_emit): In XCOFF mode, write out length.
1309 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
1310 * libbfd.h: Rebuild.
1311 * Makefile.in: Rebuild dependencies.
1312 (BFD32_BACKENDS): Add xcofflink.o.
1313 (CFILES): Add xcofflink.c.
1314
1315 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
1316 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
1317 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
1318
1319 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1320
1321 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
1322
1323 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
1324
1325 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
1326 * config.in: Regenerated.
1327
1328 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
1329 (_bfd_chunksize): New variable.
1330 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
1331 for obstack chunk size.
1332 * configure.in: Check for getpagesize.
1333 * configure: Regenerated.
1334
1335 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1336
1337 * trad-core.c (rawptr): Make it a local variable of
1338 ptrace_unix_core_file_p.
1339
1340 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
1341
1342 * coff-arm.c (in_reloc_p): New.
1343 * coff-i386.c (in_reloc_p): New.
1344 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
1345 (coff_write_object_contents): Only set has_reloc_section
1346 if PE_IMAGE.
1347 * cofflink.c (_bfd_coff_generic_relocate_section): Call
1348 in_reloc_p to decide if reloc should be emitted.
1349 * libcoff.h (pe_data_type.in_reloc_p): New.
1350 * peicode.h (pe_mkobject): Initialize in_reloc_p.
1351
1352 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
1353
1354 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
1355 (_bfd_coff_read_internal_relocs): Likewise.
1356 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
1357 (_bfd_coff_read_internal_relocs): Likewise.
1358
1359 * elflink.h (elf_link_add_object_symbols): Correct conditions
1360 under which type and size change warnings are issued.
1361
1362 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
1363
1364 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
1365 a symbol which is not in a real section.
1366 (coff_write_native_symbol): Corresponding change.
1367
1368 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
1369 coff_link_hash_newfunc and make non-static.
1370 (_bfd_coff_link_hash_table_init): New function, broken out of
1371 _bfd_coff_link_hash_table_create.
1372 (_bfd_coff_link_hash_table_create): Use it.
1373 (process_embedded_commands): Make static.
1374 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
1375 (_bfd_coff_link_hash_table_init): Declare.
1376 * libcoff.h: Rebuild.
1377
1378 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
1379 field in XCOFF tdata.
1380 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
1381 U802ROMAGIC, for clarity. Try to set arch and machine correctly
1382 based on cputype stored in a.out header, or in n_type of initial
1383 .file symbol.
1384 (coff_write_object_contents): Set cputype correctly in a.out
1385 header.
1386 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
1387 warnings.
1388 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
1389 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
1390 old resv1 field.
1391 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
1392 * libcoff.h: Rebuild.
1393
1394 * cpu-rs6000.c (rs6000_compatible): New static function.
1395 (bfd_rs6000_arch): Use it.
1396 * cpu-powerpc.c (powerpc_compatible): New static function.
1397 (arch_info_struct): Define various flavours of PowerPC.
1398 (bfd_powerpc_arch): Use powerpc_compatible. Point at
1399 arch_info_struct.
1400
1401 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
1402
1403 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
1404
1405 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
1406
1407 * elflink.h (elf_link_add_object_symbols): Don't warn about
1408 changing the size or type if the old definition was weak.
1409
1410 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
1411
1412 * coffcode.h (combined_entry_type): Add fix_line field.
1413 (coff_slurp_line_table): Warn if we try to set the lineno field of
1414 a symbol twice.
1415 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
1416 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
1417 * coffgen.c (coff_mangle_symbols): Handle fix_line.
1418 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
1419 absolute section.
1420 (coff_print_symbol): Print fix_value symbols in a useful fashion.
1421 * libcoff.h: Rebuild.
1422
1423 * libcoff-in.h (struct xcoff_tdata): Define.
1424 (xcoff_data): Define.
1425 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
1426 * bfd-in2.h, libcoff.h: Rebuild.
1427 * coff-rs6000.c (xcoff_mkobject): New static function.
1428 (coff_mkobject): Define.
1429 (xcoff_copy_private_bfd_data): New static function.
1430 (coff_bfd_copy_private_bfd_data): Define.
1431 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
1432 signed to bitfield.
1433 (rs6000coff_vec): Add DYNAMIC to object_flags.
1434 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
1435 .loader sections specially.
1436 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
1437 section alignment from the XCOFF tdata information.
1438 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
1439 F_SHROBJ, and copy the extra a.out header information into the
1440 XCOFF tdata structure.
1441 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
1442 F_DYNLOAD and the extra a.out header information.
1443 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
1444 C_HIDEXT symbol with attached csect information.
1445 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
1446 in the o_maxdata field.
1447 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
1448 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
1449 end if BSF_NOT_AT_END is set.
1450
1451 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
1452 _bfd_read_ar_hdr_fn.
1453 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
1454 * bfd-in2.h, libbfd.h: Rebuild.
1455 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
1456 return value.
1457 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
1458 (bfd_slurp_bsd_armap_f2): Likewise.
1459 (_bfd_slurp_extended_name_table): Likewise.
1460
1461 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
1462
1463 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1464
1465 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
1466 when the symbol table is empty.
1467
1468 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
1469 space for section symbols, since we don't output them either.
1470 (elf_m68k_adjust_dynindx): Removed.
1471
1472 * ptrace-core.c (rawptr): Make it a local variable of
1473 ptrace_unix_core_file_p.
1474
1475 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1476
1477 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
1478 NULL.
1479
1480 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
1481 Mac object file formats.
1482
1483 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
1484
1485 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
1486 auxent if there isn't one.
1487 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
1488 rather than FILNMLEN as the maximum name length.
1489
1490 * coffcode.h (bfd_coff_backend_data): Add new field
1491 _bfd_coff_print_aux.
1492 (bfd_coff_print_aux): New static function.
1493 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
1494 scnlen field of an XTY_LD csect aux entry.
1495 (coff_print_aux): New static function.
1496 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
1497 in coff_pointerize_aux_hook.
1498 (bfd_coff_std_swap_table): Initialize new field.
1499 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
1500 * libcoff.h: Rebuild.
1501 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1502 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1503
1504 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
1505 if there are symbols, for native AIX ld compatibility.
1506
1507 * coffcode.h (bfd_coff_backend_data): Add new field
1508 _bfd_coff_pointerize_aux_hook.
1509 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
1510 or I960, and as 0 otherwise.
1511 (bfd_coff_std_swap_table): Initialize new field.
1512 * libcoff.h: Rebuild.
1513 * coffgen.c (coff_pointerize_aux): Change parameters to take
1514 symbol pointer instead of type and class, and to take aux index.
1515 Call _bfd_coff_pointerize_aux_hook if it is defined.
1516 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
1517 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
1518 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1519
1520 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
1521 read-only/host-only support.
1522
1523 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
1524 BSF_LOCAL.
1525 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
1526 RS6000COFF_C.
1527
1528 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
1529 BFD_JUMP_TABLE_ARCHIVE accordingly.
1530 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
1531 (_bfd_compute_and_write_armap): Declare.
1532 (_bfd_generic_read_ar_hdr): Declare.
1533 (_bfd_read_ar_hdr): Define.
1534 (_bfd_noarchive_read_ar_hdr): Define.
1535 (_bfd_archive_bsd_read_ar_hdr): Define.
1536 (_bfd_archive_coff_read_ar_hdr): Define.
1537 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
1538 _bfd_read_ar_hdr instead.
1539 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
1540 (_bfd_compute_and_write_armap): Rename from
1541 compute_and_write_armap. Make non-static. Change all callers.
1542 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
1543 than _bfd_snarf_ar_hdr.
1544 * aout-target.h (MY_read_ar_hdr): Define if not defined.
1545 * ieee.c (ieee_read_ar_hdr): Define.
1546 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
1547 * oasys.c (oasys_read_ar_hdr): Define.
1548 * som.c (som_read_ar_hdr): Define.
1549 * bfd-in2.h, libbfd.h: Rebuild.
1550
1551 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
1552
1553 * peicode.c (coff_swap_filehdr_in): If symptr is
1554 zero, there aren't any symbols, even if nsyms is set.
1555
1556 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
1557
1558 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
1559 field.
1560 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
1561 sections, and set styp correctly for them: .got, .hash, .dynamic,
1562 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
1563 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
1564 types.
1565 (ecoff_sort_hdrs): New static function.
1566 (ecoff_compute_section_file_positions): Return boolean, not void.
1567 Sort the sections by VMA before looking through them. Put the
1568 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
1569 section on an appropriate boundary within the page.
1570 (ecoff_compute_reloc_file_positions): Check return value of
1571 ecoff_compute_section_file_positions.
1572 (_bfd_ecoff_set_section_contents): Likewise.
1573 (_bfd_ecoff_write_object_contents): Check for various Alpha
1574 section types when incrementing text_size and data_size. Call
1575 adjust_headers backend function if it exists.
1576 * coff-alpha.c (alpha_adjust_headers): New static function.
1577 (alpha_ecoff_backend_data): Initialize adjust_headers field.
1578 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1579
1580 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
1581
1582 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
1583
1584 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
1585 of ALTERNATE_AIX_CORE_FORMAT.
1586 * configure.in (aix4): No longer need CORE_FLAGS.
1587 * configure: Updated.
1588
1589 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
1590
1591 NS32k changes from Ian Dall:
1592 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
1593 macros.
1594 (aout_link_input_section_std, aout_link_input_section_ext,
1595 aout_link_reloc_link_order): Call them instead of _bfd_*
1596 versions.
1597 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
1598 to zero.
1599 (backend_data): Use it instead of hardcoded zero.
1600
1601 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
1602 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
1603
1604 * ns32knetbsd.c: Include bfd.h.
1605 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
1606 (MY_bfd_reloc_type_lookup): Declare function too.
1607 * pc532-mach.c (set_sizes): Don't declare.
1608 (MY_text_includes_header, MY_exec_header_not_counted): Define.
1609 (backend_data, MY_backend_data): Don't define.
1610
1611 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
1612 ns32k-*-lites* like ns32k-*-netbsd*.
1613
1614 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
1615 compile on lites.
1616
1617 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
1618
1619 * coffcode.h (coff_write_object_contents): Restore setting
1620 f_timdat to 0, deleted on August 22.
1621
1622 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
1623
1624 * coffcode.h (coff_bfd_copy_private_symbol_data,
1625 coff_bfd_copy_private_section_data,
1626 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
1627 * peicode.h (coff_bfd_copy_private_bfd_data): New
1628 (pe_bfd_copy_private_bfd_data): New.
1629 (coff_swap_scnhdr_in): Swap bss size into the right place.
1630 (pe_print_private_bfd_data): Add some newlines.
1631
1632 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
1633
1634 * som.c (setup_sections): Don't die if a space has no subspaces.
1635
1636 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
1637
1638 * elflink.h (elf_link_add_object_symbols): Don't let a weak
1639 dynamic symbol override a common symbol. Don't change the size or
1640 type if they have been set and the new symbol is not a definition.
1641 Warn if the size or type changes.
1642
1643 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
1644
1645 * som.c (som_begin_writing): Don't write the symbol table or
1646 symbol strings.
1647 (som_finish_writing): Write them here. Place them after the
1648 subspace data, but before the relocs.
1649
1650 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
1651
1652 * sunos.c (sunos_add_one_symbol): Just pass false, not
1653 info->shared_library, to sunos_create_dynamic_sections.
1654 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
1655 section.
1656 (sunos_check_dynamic_reloc): Remove .text section assertion.
1657
1658 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
1659
1660 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
1661 * configure, configure.in: Add pmac_xcoff_vec case.
1662 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
1663 * coff-pmac.c: New file, PowerMac XCOFF support.
1664 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
1665 * targets.c (pmac_xcoff_vec): Declare.
1666
1667 * mpw-config.in: Various changes to be compatible with the
1668 autoconf-based configury.
1669 * mpw-make.sed: New file, sed commands to translate Unix
1670 makefile into MPW syntax.
1671 * mpw-make.in: Remove.
1672 * hosts/mpw.h: Remove.
1673 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
1674 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
1675
1676 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
1677
1678 * binary.c (binary_get_symtab): Return an empty string on error.
1679 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
1680
1681 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
1682
1683 * coff-ppc.c: Reformatted according to gnu conventions
1684 Removed irrelevant "if 0" code
1685
1686 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
1687
1688 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
1689 symbols rather than as indirect symbols.
1690 (MY(slurp_symbol_table)): Don't do anything special about
1691 secondary symbols.
1692
1693 * coffcode.h (coff_new_section_hook): Make sure that the alignment
1694 of .ctors and .dtors sections is no larger than 2.
1695
1696 * sunos.c (sunos_add_one_symbol): Don't change
1697 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
1698 undef list.
1699 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
1700 dynamic symbols when creating a shared library.
1701 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
1702 shared library.
1703 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
1704 written even if it is not defined in a regular object.
1705 (sunos_write_dynamic_symbol): Use plt_offset for the address of
1706 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
1707 rather than the constant 22.
1708 (sunos_check_dynamic_reloc): Handle creating a shared library.
1709 (sunos_finish_dynamic_link): Set the first entry in the GOT to
1710 zero when creating a shared library.
1711 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
1712 write it out at the start of the symbol table.
1713
1714 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
1715
1716 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
1717
1718 * config.bfd: Add arm-*-coff.
1719 * configure.in, configure: Add armcoff_{little,big}_vec.
1720 * targets.c (armcoff_{little,big}_vec): Declare.
1721 (bfd_target_vector): Add armcoff_{little,big}_vec.
1722 * coff-arm.c (armcoff_{little,big}_vec): Always define.
1723
1724 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
1725
1726 * targets.c (bfd_find_target): Remove debugging code.
1727
1728 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
1729
1730 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
1731 support on powerpc.
1732 * Makefile.in: added *-ppc files
1733 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
1734 allow pe based .o's to be shared with other tools on ppc/NT
1735 * config.bfd: added powerpc[le]-[pe|winnt] config support
1736 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
1737 * peicode.h: Added more section flags for PE on ppc
1738 Added coff_swap_filehdr_out to allow peicode.h to be
1739 used for non-image PE files on ppc.
1740 Check for image, or not, before copying pe_opthdr
1741 * targets.c: Added new bfd's
1742 * targets.c: Removed two inactive bfds that shouldn't have made it this
1743 far.
1744
1745 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1746
1747 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
1748 explicit values to initialize all relocs. Change all users.
1749 (ppc_elf_brtaken_inner): New function to handle branch predicition
1750 relocs.
1751 (ppc_elf_brtaken_reloc): Ditto.
1752 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
1753 relocs use ppc_elf_unsupported_reloc.
1754 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
1755 needs to be reported.
1756 (ppc_elf_relocate_section): Support branch prediction relocs.
1757
1758 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
1759
1760 * bfd.c (bfd_assert): Remove \n from string passed to
1761 _bfd_error_handler.
1762
1763 * coff-i386.c: (TWO_DATA_SECS): Don't define.
1764 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
1765 (bfd_coff_make_section_hook): Don't define.
1766 (coff_make_section_hook): Remove.
1767 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
1768 (styp_to_sec_flags): Likewise.
1769 (coff_write_object_contents): Likewise.
1770 (bfd_coff_std_swap_table): Don't initialize make_section_hook
1771 field.
1772 * libcoff.h: Rebuild.
1773 * coffgen.c (make_a_section_from_file): Just call
1774 bfd_make_section_anyway, not bfd_make_section or
1775 bfd_coff_make_section_hook.
1776 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
1777 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
1778 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
1779 make_section_hook field.
1780 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1781
1782 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
1783 pointers into value field for warning and indirect symbols; just
1784 leave the value field alone.
1785 * linker.c (generic_link_add_symbol_list): Use next symbol for
1786 warning and indirect symbols, rather than looking in symbol value.
1787 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
1788 parameter. Change all callers. Remove support for indirect
1789 symbols; it didn't work anyhow.
1790 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
1791 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
1792 * bfd-in2.h: Rebuild.
1793
1794 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1795
1796 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
1797 go back to telling the tools this reloc operates on 32 bits.
1798
1799 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
1800
1801 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
1802 rather than a direct fprintf.
1803 * archive.c (_bfd_write_archive_contents): Likewise.
1804 * coffcode.h (coff_slurp_symbol_table): Likewise.
1805 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
1806 (ppc_elf_unsupported_reloc): Likewise.
1807 (ppc_elf_relocate_section): Likewise.
1808 * i386linux.c (linux_tally_symbols): Likewise.
1809 (linux_finish_dynamic_link): Likewise.
1810 * osf-core.c (osf_core_core_file_p): Likewise.
1811 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
1812 * som.c (som_sizeof_headers): Likewise.
1813 * srec.c (srec_bad_byte): Likewise.
1814 * bfd.c (bfd_assert): Likewise. Also change file to be const.
1815 * libbfd-in.h (bfd_assert): Declare first parameter const.
1816 * libbfd.h: Rebuild.
1817 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
1818 bfd_reloc_overflow is enough.
1819 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
1820 * coff-h8500.c (rtype2howto): Likewise.
1821 * coff-z8k.c (rtype2howto): Likewise.
1822 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
1823 * elf.c (_bfd_elf_get_lineno): Likewise.
1824 (_bfd_elf_no_info_to_howto): Likewise.
1825 (_bfd_elf_no_info_to_howto_rel): Likewise.
1826 * hp300hpux.c (convert_sym_type): Likewise.
1827 (MY(swap_std_reloc_in)): Likewise.
1828 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
1829
1830 * libaout.h (struct aoutdata): Add line_buf field.
1831 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
1832 and filename_buffer. Instead, use a malloc buffer stored in the
1833 new line_buf field. Remove length restrictions.
1834
1835 * coffgen.c (string_size): Remove static variable.
1836 (debug_string_size, debug_string_section): Likewise.
1837 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
1838 and debug_string_size_p parameters. Use them instead of the
1839 global variables. Change all callers.
1840 (coff_write_symbol): Likewise.
1841 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
1842 (coff_write_symbols): Add local variables to replace removed
1843 global variables.
1844
1845 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
1846 function, and line_base fields.
1847 * libcoff.h: Rebuild.
1848 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
1849 information, rather than using static variables.
1850
1851 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
1852 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
1853
1854 * init.c (initialized): Remove static variable.
1855 (bfd_init): Don't bother setting initialized.
1856 (bfd_check_init): Remove.
1857 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
1858 * libbfd.h: Rebuild.
1859
1860 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1861
1862 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
1863 size for full core dumps. Copy core file header to private data.
1864 (rs6000coff_core_file_failing_command,
1865 rs6000coff_core_file_failing_signal): New functions to extract
1866 the file name and terminating signal from the core file.
1867 * coff-rs6000.c: Use them.
1868
1869 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
1870
1871 Change arch info to be const, initialized at compile time.
1872 * archures.c: Reindent many functions. Change CONST to const.
1873 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
1874 nothing set it anyhow. Make next const.
1875 (bfd_arch_info_list): Remove.
1876 (bfd_archures_list): Rename from archures_init_table. Change from
1877 a table of function pointers to a table of bfd_arch_info_type
1878 structure addresses.
1879 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
1880 (bfd_lookup_arch): Likewise.
1881 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
1882 const pointer.
1883 (bfd_default_arch_struct): Make const.
1884 (bfd_arch_init, bfd_arch_linkin): Remove.
1885 (bfd_get_arch_info): Return a const pointer.
1886 * init.c (bfd_init): Don't call bfd_arch_init.
1887 * bfd.c (struct _bfd): Make arch_info const.
1888 * bfd-in2.h: Rebuild.
1889 * libbfd.h: Rebuild.
1890 * configure.in: Put & before everything in $selarchs.
1891 * configure: Rebuild.
1892 * cpu-*.c: Change bfd_*_arch from a function which calls
1893 bfd_arch_linkin to a const structure.
1894 * ieee.c (ieee_object_p): Make arch const.
1895
1896 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1897
1898 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
1899 PowerPC V.4.
1900 * bfd-in2.h: Regenerate.
1901 * libbfd.h: Regenerate.
1902
1903 * elf32-ppc.c (reloc_type): Update names to match current draft.
1904 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
1905 relative. Update names to current V.4 draft.
1906 (ppc_elf_reloc_type_lookup): Add support for more relocations.
1907 (ppc_elf_relocate_section): Rename relocations to match draft.
1908
1909 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
1910
1911 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
1912 compiled with -mrelocatable-lib to be linked with either normal
1913 modules or -mrelocatable modules.
1914
1915 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
1916
1917 * coffcode.h (coff_write_object_contents): Clear the vstamp field
1918 in the a.out header.
1919
1920 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
1921 a reloc against a local symbol, even if it's not a section.
1922
1923 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
1924
1925 * targets.c (bfd_target): Remove unused align_power_min field.
1926 * bfd-in2.h: Rebuild.
1927 * All backends: Remove initialization of align_power_min.
1928
1929 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
1930
1931 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
1932
1933 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
1934
1935 * config.bfd (mips-dec-netbsd*): New target.
1936 * configure.host (mips-dec-netbsd*): New host.
1937 * configure.in (mips-dec-netbsd*): New native.
1938 * configure: Rebuild.
1939
1940 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
1941
1942 Make the COFF backend linker merge common types:
1943 * cofflink.c (struct coff_debug_merge_element): Define.
1944 (struct coff_debug_merge_type): Define.
1945 (struct coff_debug_merge_hash_entry): Define.
1946 (struct coff_debug_merge_hash_table): Define.
1947 (coff_debug_merge_hash_table_init): Define.
1948 (coff_debug_merge_hash_table_free): Define.
1949 (coff_debug_merge_hash_lookup): Define.
1950 (struct coff_final_link_info): Add debug_merge field.
1951 (coff_debug_merge_hash_newfunc): New static function.
1952 (_bfd_coff_final_link): Allocate and free debug_merge table.
1953 (coff_link_input_bfd): Merge identical enum, struct and union
1954 types.
1955
1956 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
1957
1958 Convert i960 COFF to use COFF backend linker.
1959 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
1960 structure to store the symbol being used.
1961 (coff_i960_start_final_link): New static function.
1962 (coff_i960_relocate_section): New static function.
1963 (coff_i960_adjust_symndx): New static function.
1964 (coff_start_final_link): Define.
1965 (coff_relocate_section): Define.
1966 (coff_adjust_symndx): Define.
1967 * coffcode.h (bfd_coff_backend_data): Add new callback function
1968 _bfd_coff_start_final_link.
1969 (bfd_coff_start_final_link): Define.
1970 (coff_start_final_link): Define if not defined.
1971 (bfd_coff_std_swap_table): Add coff_start_final_link.
1972 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
1973 visible.
1974 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
1975 function callback is not NULL.
1976 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
1977 (_bfd_coff_internal_syment_name): Declare.
1978 * libcoff.h: Rebuild.
1979 * configure.in (icoff_big_vec): Add cofflink.o.
1980 (icoff_little_vec): Likewise.
1981 * configure: Rebuild.
1982
1983 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
1984
1985 * Makefile.in (clean-info): Remove extraneous tab from line
1986 following action.
1987
1988 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
1989
1990 * cofflink.c (coff_link_input_bfd): Fail if a section with no
1991 contents has relocs.
1992
1993 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
1994
1995 * coffcode.h (coff_compute_section_file_positions): Keep the
1996 raw size safe.
1997 (coff_write_object_contents): Remember if it's a relocatable
1998 file.
1999 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
2000 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
2001 if relocatable file. Swap out saved raw size.
2002
2003 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
2004
2005 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
2006 (maintainer-clean): Rename from realclean, passing
2007 maintainer-clean down to subdirectories, but leave realclean as a
2008 synonym.
2009
2010 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
2011 warning callback.
2012
2013 * dep-in.sed: Remove config.h from generated dependencies.
2014
2015 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
2016 broken out of sunos_canonicalize_dynamic_symtab.
2017 (sunos_canonicalize_dynamic_symtab): Call new function
2018 sunos_slurp_dynamic_symtab.
2019 (sunos_add_dynamic_symbols): Add three new parameters. Return the
2020 dynamic symbol table to the caller.
2021 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
2022 callback to override the symbols being read.
2023 * libaout.h (struct aout_backend_data): Add three new parameters
2024 to add_dynamic_symbols callback.
2025
2026 Extensive minor changes to avoid various gcc warnings. Also:
2027 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
2028 * archures.c (bfd_arch_info_type): Change mach field from long to
2029 unsigned long.
2030 (bfd_lookup_arch): Change machine parameter from long to unsigned
2031 long.
2032
2033 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
2034
2035 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
2036 a symbol with a non-zero plt_offset.
2037
2038 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
2039
2040 * elfcode.h (align_file_position): Remove; not used.
2041
2042 * configure.in: Only check for <sys/procfs.h> on a native system,
2043 and make sure it defines prstatus_t.
2044 * configure: Rebuild.
2045
2046 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
2047
2048 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
2049
2050 * config.in: Rename from config.h.in.
2051 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
2052 Check for config.h:config.in when creating stamp-h.
2053 * configure: Rebuild.
2054 * Makefile.in (stamp-h): Depend upon config.in rather than
2055 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
2056 calling config.status.
2057
2058 * Makefile.in (do_distclean): Remove config.h and stamp-h.
2059 (Makefile): Just rebuild Makefile.
2060 (config.h, stamp-h): New targets.
2061 * configure.in: Create stamp-h when rebuilding config.h.
2062 * configure: Rebuild.
2063
2064 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
2065
2066 * configure.in: Call AC_CONFIG_HEADER. Substitute
2067 HOST_64BIT_LONG. Check that various header files exist. Check
2068 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
2069 and/or free need to be declared. Don't make a link to sysdep.h.
2070 Define TRAD_HEADER for various hosts.
2071 * configure: Rebuild.
2072 * configure.host: Don't set my_host. Add definitions taken from
2073 host header files for various entries. Remove entries which now
2074 do nothing.
2075 * acconfig.h: New file.
2076 * config.h.in: New file, built by autoheader.
2077 * sysdep.h: New file.
2078 * Makefile.in (do_distclean): Don't remove sysdep.h.
2079 (RECONFIG): Remove.
2080 (LOCAL_H_DEPS): New variable.
2081 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
2082 $(RECONFIG).
2083 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
2084 ($(OPTIONAL_BACKENDS)): Likewise.
2085 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
2086 looking through sysdep.h.
2087 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
2088 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
2089 (fprintf_vma, sprintf_vma): Likewise.
2090 (int64_type, uint64_type): Don't define.
2091 * bfd-in2.h: Rebuild.
2092 * archures.c, bfd.c, srec.c: Include <ctype.h>.
2093 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
2094 * lynx-core.c: Include stuff from old hosts/lynx.h.
2095 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
2096 rather than NO_FCNTL.
2097 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
2098 rather than NATIVE_HPPAHPUX_COMPILER.
2099 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
2100 is defined.
2101 * hosts/*.h: Remove all header files which merely include,
2102 declare, and define things. Leave header files which define
2103 information needed by trad-core.c.
2104
2105 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
2106 (BFD_CC_FOR_BUILD): Define.
2107 * configure.in: Use BFD_CC_FOR_BUILD.
2108 * configure: Rebuild.
2109
2110 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
2111
2112 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
2113 * configure: Rebuild.
2114
2115 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
2116 a global symbol.
2117
2118 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
2119
2120 * config.bfd: i386pe_ve -> i386pe_vec.
2121
2122 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
2123
2124 * configure.host: Incorporate host Makefile fragments by setting
2125 shell variables.
2126 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
2127 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
2128 value based on whether the code is being compiled by a cross
2129 compiler. Don't substitute host_makefile_frag or frags.
2130 * aclocal.m4: New file to define local AC_PROG_CC.
2131 * configure: Rebuild.
2132 * Makefile.in (INSTALL): Set to @INSTALL@.
2133 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
2134 (INSTALL_DATA): Set to @INSTALL_DATA@.
2135 (AR): Set to @AR@.
2136 (CC): Define as @CC@.
2137 (CFLAGS): Set to @CFLAGS@.
2138 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
2139 (@host_makefile_frag@): Remove.
2140 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
2141 after other options.
2142 (config.status): Remove dependency upon @frags@.
2143 * config/*.mh, config/README: Remove.
2144
2145 * config.bfd: Rewrite to incorporate the contents of the Makefile
2146 fragments by setting shell variables, rather than merely returning
2147 the name of a Makefile fragment.
2148 * configure.in: Use shell variables set by config.bfd rather than
2149 looking at the target Makefile fragment files. Don't substitute
2150 target_makefile_frag. Do substitute TDEFINES.
2151 * configure: Rebuild.
2152 * Makefile.in (@target_makefile_frag@): Remove.
2153 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
2154 * config/*.mt: Remove.
2155
2156 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
2157
2158 * configure.in: Put changequote lines around "i[345]86" patterns
2159 section of core file support.
2160
2161 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
2162
2163 * som.c (som_bfd_print_private_bfd_data): Define to use the
2164 generic version.
2165
2166 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
2167
2168 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
2169 entry, text_start and data_start.
2170
2171 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
2172
2173 * Makefile.in (OFILES): Remove $(TDEPFILES).
2174 * config/apollo.mt (TDEPFILES): Remove.
2175 * config/README: Update.
2176
2177 * configure.in: For a native configuration, set COREFILE and
2178 COREFLAG based on the canonical host name.
2179 * configure: Rebuild.
2180 * Makefile.in: Rebuild dependencies.
2181 (ALL_CFLAGS): Add @COREFLAG@.
2182 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
2183 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
2184 support routines. Check LYNX_CORE rather than HOST_LYNX.
2185 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
2186 * i386lynx.c: Likewise.
2187 * m68klynx.c: Likewise.
2188 * sparclynx.c: Likewise.
2189 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
2190 * *-core.c: Comment changes.
2191 * config/decstation.mh (HDEPFILES): Remove.
2192 (HDEFINES): Remove -DTRAD_CORE.
2193 * config/irix3.mh (RANLIB): Remove.
2194 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
2195 (HDEFINES): Remove -DIRIX_CORE.
2196 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
2197 (HDEFINES): Remove -DTRAD_CORE.
2198 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
2199 * config/ultra3.mh (RANLIB): Remove.
2200 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
2201 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
2202 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
2203 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
2204 * config/hppahpux.mh, config/hppaosf.mh: Remove.
2205 * config/i386aix.mh, config/i386bsd.mh: Remove.
2206 * config/i386linux.mh, config/i386mach3.mh: Remove.
2207 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
2208 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
2209 * config/mipsmach3.mh, config/news-mips.mh: Remove.
2210 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
2211 * config/rs600.mh, config/rs6000lynx.mh: Remove.
2212 * config/solaris2.mh, config/stratus.mh: Remove.
2213 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
2214 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
2215
2216 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
2217
2218 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
2219 DT_FINI entry if the appropriate symbol is not in the hash table.
2220
2221 * libelf.h (struct elf_backend_data): Add create_program_headers
2222 and want_hdr_in_seg fields.
2223 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
2224 defined.
2225 (elf_backend_create_program_headers): Likewise.
2226 (elfNN_bed): Initialize create_program_headers and
2227 want_hdr_in_seg.
2228 * elf.c (get_program_header_size): Call create_program_headers
2229 backend routine.
2230 (map_program_segments): Check want_hdr_in_seg backend field. Call
2231 create_program_headers backend routine.
2232
2233 * elf.c (assign_file_positions_except_relocs): Align non allocated
2234 sections when creating an executable.
2235
2236 * elfcode.h (elf_swap_phdr_in): Make non static.
2237 (elf_swap_phdr_out): Make non static.
2238 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
2239 (bfd_elf32_swap_phdr_out): Declare.
2240 (bfd_elf64_swap_phdr_in): Declare.
2241 (bfd_elf64_swap_phdr_out): Declare.
2242
2243 * ecofflink.c (ecoff_collect_shuffle): New static function.
2244 (_bfd_ecoff_get_accumulated_pdr): New function.
2245 (_bfd_ecoff_get_accumulated_sym): New function.
2246 (_bfd_ecoff_get_accumulated_ss): New function.
2247 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
2248 (_bfd_ecoff_get_accumulated_sym): Declare.
2249 (_bfd_ecoff_get_accumulated_ss): Declare.
2250 * libbfd.h: Rebuild.
2251
2252 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
2253
2254 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
2255
2256 * elflink.h (elf_link_add_object_symbols): Handle indirect and
2257 warning symbols. If any section is named .gnu.warning.XXX, treat
2258 the contents as a warning to be issued if the symbol XXX is
2259 referenced.
2260 (elf_link_output_extsym): For an indirect or warning symbol, just
2261 output the symbol it points to.
2262
2263 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
2264 if bfd_hash_allocate fails, since it will already be set.
2265 (generic_link_hash_newfunc): Likewise.
2266 (archive_hash_newfunc): Likewise.
2267 (hash_entry_bfd): New static function.
2268 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
2269 callback. Allocate a new warning using the hash table newfunc.
2270 Use bfd_hash_replace to update the entry in the hash table, rather
2271 than assuming we can copy the fields with structure assignment.
2272
2273 * hash.c (bfd_hash_replace): New function.
2274 * bfd-in.h (bfd_hash_replace): Declare.
2275 * bfd-in2.h: Rebuild.
2276
2277 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
2278
2279 * config.bfd: Add mips*vr4300-*-elf* target.
2280 * config/mipsbvr4300.mt: Added.
2281
2282 See file ChangeLog.2
2283
2284 \f
2285 Local Variables:
2286 mode: indented-text
2287 left-margin: 8
2288 fill-column: 74
2289 version-control: never
2290 End:
This page took 0.085041 seconds and 5 git commands to generate.