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