* config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
[platform/upstream/binutils.git] / bfd / ChangeLog
1 Fri Apr 11 11:57:15 1997  Niklas Hallqvist  <niklas@appli.se>
2
3         * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
4         mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
5         powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
6         * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
7         m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
8         sparc-*-openbsd*): New targets.
9         * configure: Rebuild.
10
11 Tue Apr  8 18:09:29 1997  Jamie Lokier  <jamie@rebellion.co.uk>
12
13         * stabs.c (struct stab_section_info): New field
14         `cumulative_skips'.
15         (_bfd_link_section_stabs): Fill the above array.
16         (_bfd_stab_section_offset): Use `cumulative_skips' to
17         speed up offset calculation.
18
19 Tue Apr  8 00:01:31 1997  Jeffrey A Law  (law@cygnus.com)
20
21         * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
22         addend for non pc-relative relocations.
23
24         * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
25         for non-existent function.
26
27         * elf-m10300.c (mn10300_elf_relax_section): New function.
28         (mn10300_elf_relax_delete_bytes): Likewise.
29         (mn10300_elf_symbol_address_p): Likewise.
30         (mn10300_elf_get_relocated_section_contents): Likewise.
31         (bfd_elf32_bfd_relax_section): Define.
32         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
33
34 Mon Apr  7 16:47:09 1997  Ian Lance Taylor  <ian@cygnus.com>
35
36         * configure.host: Set SHLIB_LIBS.
37         * configure.in: Substitute SHLIB_LIBS.
38         * configure: Rebuild.
39         * Makefile.in (SHLIB_LIBS): New variable.
40         ($(SHLIB)): Use $(SHLIB_LIBS).
41
42 Mon Apr  7 10:53:52 1997  Michael Snyder  <msnyder@cleaver.cygnus.com>
43
44         * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
45         with bfd_section_vma.
46
47 Fri Apr  4 11:37:15 1997  Ian Lance Taylor  <ian@cygnus.com>
48
49         * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
50         Correct CPU file names for mn10[23]00.
51         * configure: Rebuild.
52
53         * bfd.c (bfd_record_phdr): Cast count to size_t before
54         subtraction.
55
56         * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
57         * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
58         (xcoff_write_archive_contents): LIkewise.
59         * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
60         (mips_elf_create_procedure_table): Likewise.
61         * peicode.h (pe_print_idata): Likewise.
62         (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
63         * xcofflink.c (xcoff_get_section_contents): Likewise.
64         (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
65         (xcoff_link_add_symbols): Likewise.
66         (xcoff_link_add_symbols): Likewise.
67
68         * ppcboot.c (ppcboot_set_arch_mach): Make static.
69         (ppcboot_bfd_print_private_bfd_data): Likewise.
70
71         * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
72         to complain_overflow_signed.
73
74 Thu Apr  3 11:51:54 1997  Ian Lance Taylor  <ian@cygnus.com>
75
76         * VERSION: Set to 2.8.1.
77
78         * Branched binutils 2.8.
79
80         * elf32-ppc.c (ppc_elf_check_relocs):  Don't check SEC_ALLOC when
81         deciding whether to copy a reloc into a shared object.
82         (ppc_elf_relocate_section): Likewise.  Relocate R_PPC_RELATIVE
83         relocs in unallocated sections.
84         * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
85         R_SPARC_RELATIVE relocs in unallocated sections.
86
87 Wed Apr  2 16:19:41 1997  Mike Meissner  <meissner@cygnus.com>
88
89         * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
90         always create got section so that the _GLOBAL_OFFSET_TABLE_ label
91         is always created.
92
93 Wed Apr  2 10:49:07 1997  Ian Lance Taylor  <ian@cygnus.com>
94
95         * elflink.h (elf_link_add_object_symbols): Let a common symbol
96         override an uninitialized symbol from a shared library with a
97         smaller size.
98
99         * elf-m10200.c: Rename from elf32-mn10200.c.
100         * elf-m10300.c: Rename from elf32-mn10300.c.
101         * cpu-m10200.c: Rename from cpu-mn10200.c
102         * cpu-m10300.c: Rename from cpu-mn10300.c
103         * Makefile.in: Update accordingly.
104
105         * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
106         (elf_mips_isa): Move to earlier in file.
107         (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
108         (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
109         specially.
110
111         * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
112         calling abort.
113
114 Tue Apr  1 16:18:05 1997  Klaus Kaempf  <kkaempf@progis.de>
115
116         * configure.com: New file.
117         * config.h-vms: Remove file.
118         * makefile.vms: Update for new configure scheme.
119
120 Mon Mar 31 23:28:39 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
121
122         * libcoff-in.h (ppc_allocate_toc_section): Declare.
123         (ppc_process_before_allocation): Declare.
124         * libcoff.h: Rebuild.
125
126         * coffcode.h (coff_mkobject_hook): Declare if not a macro.
127
128 Mon Mar 31 16:29:50 1997  Joel Sherrill  <joel@oarcorp.com>
129
130         * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
131
132 Mon Mar 31 16:11:35 1997  Ian Lance Taylor  <ian@cygnus.com>
133
134         * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
135         symbol index for a R_IHCONST reloc.
136
137 Mon Mar 31 15:40:59 1997  Philippe De Muyter  <phdm@info.ucl.ac.be>
138
139         * targmatch.sed: Do not use \(\) recursively.
140
141 Fri Mar 28 14:44:08 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
142
143         * m68klinux.c (MACHTYPE_OK): Define.
144         * i386linux.c (MACHTYPE_OK): Define.
145
146 Fri Mar 28 11:56:15 1997  Ian Lance Taylor  <ian@cygnus.com>
147
148         From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
149         <hjl@gnu.ai.mit.edu>:
150         * sparclinux.c: New file.
151         * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
152         * bfd-in2.h: Rebuild.
153         * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
154         * configure.in (sparclinux_vec): Add to list of vectors.
155         * configure: Rebuild.
156         * targets.c (sparclinux_vec): Declare.
157         (bfd_target_vector): Add sparclinux_vec.
158         * Makefile.in: Rebuild dependencies.
159         (BFD32_BACKENDS): Add sparclinux.o.
160         (BFD32_BACKENDS_CFILES): Add sparclinux.c.
161
162         * coff-mips.c (mips_ecoff_backend_data): Initialize new
163         bfd_coff_backend_data field.
164         * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
165
166         * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
167         for mips*el*-*-linux* and mips*-*-linux*.  From H.J. Lu
168         <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
169
170         * bfd.c: Include "libiberty.h".
171         (strerror): Don't declare.
172         (bfd_errmsg): Call xstrerror rather than strerror.
173
174 Thu Mar 27 12:55:42 1997  Ian Lance Taylor  <ian@cygnus.com>
175
176         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
177         reloc even if the symbol is in the .bss section.
178         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
179         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
180         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
181
182         * coffcode.h (bfd_coff_backend_data): Add new field
183         _bfd_coff_default_section_alignment_power.
184         (bfd_coff_default_section_alignment_power): Define.
185         (bfd_coff_std_swap_table): Initialize new field.
186         * libcoff.h: Rebuild.
187         * cofflink.c (coff_link_add_symbols): Limit alignment of a common
188         symbol to the default section alignment.
189
190         * COPYING: Update FSF address.
191
192 start-sanitize-d30v
193 Thu Mar 27 00:45:57 1997  Martin M. Hunt  <hunt@pizza.cygnus.com>
194
195         * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the 
196         21-bit absolute that made it act as a relative. 
197
198 end-sanitize-d30v       
199 Wed Mar 26 14:50:20 1997  Ian Lance Taylor  <ian@cygnus.com>
200
201         * elflink.c (_bfd_elf_create_linker_section): Don't set
202         bss_section and rel_section from existing sections.
203
204         * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
205         if it is needed.
206
207 Tue Mar 25 22:26:56 1997  Stu Grossman  (grossman@critters.cygnus.com)
208
209         * aoutx.h (some_aout_object_p):  Change executable test to fix
210         problems with embedded a.out systems.
211
212 Tue Mar 25 14:35:37 1997  Ian Lance Taylor  <ian@cygnus.com>
213
214         * stabs.c (_bfd_stab_section_offset): New function.
215         * libbfd-in.h (_bfd_stab_section_offset): Declare.
216         * libbfd.h: Rebuild.
217         * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
218         stab reloc.
219         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
220         * elf32-mips.c (mips_elf_relocate_section): Likewise.
221         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
222         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
223         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
224
225         * stabs.c (_bfd_link_section_stabs): Copy over the first header
226         symbol.  Check for memory allocation failure of *psinfo.
227         (_bfd_write_section_stabs): Add psinfo parameter.  Change all
228         callers.  Set the value of the header symbol.
229         * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
230         * libbfd.h: Rebuild.
231
232 start-sanitize-tic80
233 Mon Mar 24 20:07:29 1997  Fred Fish  <fnf@cygnus.com>
234
235         * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
236         (rtype2howto): Handle R_ABS reloc type.  Also abort on unhandled
237         reloc types, rather than silently failing to generate an output file.
238
239 end-sanitize-tic80
240 Mon Mar 24 13:41:00 1997  Ian Lance Taylor  <ian@cygnus.com>
241
242         * targmatch.sed: Use the hold space to put the #ifdef around the
243         the string constant.
244         * targets.c (UNSUPPORTED_TARGET): Don't define.
245         (find_target): Don't check for UNSUPPORTED_TARGET.
246         (bfd_set_default_target): Don't try to optimize by checking for
247         default.
248
249         * Makefile.in: Rebuild dependencies.
250         (ALL_MACHINES_CFILES): Add cpu-m32r.c.
251         (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
252         (elf32-m32r.o): Remove explicit target.
253
254         * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
255         i[3456]86-*-linux*.
256
257         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
258         count section symbols for sections that were created by the
259         linker, or are not allocatable or not loadable.
260         (elf32_sparc_finish_dynamic_sections): Output output section
261         symbols for section for which we made space for them.
262
263 Fri Mar 21 13:08:26 1997  Ian Lance Taylor  <ian@cygnus.com>
264
265         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
266         no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
267
268 Fri Mar 21 12:36:46 1997  Doug Evans  <dje@canuck.cygnus.com>
269
270         * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
271         (m32r_hi16_list): New static local.
272         (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
273         (m32r_elf_do_hi16_reloc): Delete.
274         (m32r_elf_relocate_hi16): New function.
275         (m32r_elf_lo16_reloc): New function.
276         (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
277         LO16 reloc.
278
279         Mon Mar 10 16:03:31 1997  Doug Evans  <dje@seba.cygnus.com>
280
281         * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
282         (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
283         (m32r_elf_final_sda_base): New function.
284         (m32r_elf_relocate_section): Rewrite sdata support.
285         (m32r_elf_finish_dynamic_sections): Delete.
286
287 Thu Mar 20 12:39:02 1997  Ian Lance Taylor  <ian@cygnus.com>
288
289         Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
290         * coff-svm68k.c: New file.  Just defines some macros and includes
291         coff-m68k.c.
292         * coff-m68k.c: Add functions to handle common addends, moved in
293         from cf-m68klynx.c.  Control them using COFF_COMMON_ADDEND macro.
294         Control whether relocs are visible using STATIC_RELOCS.
295         * cf-m68klynx.c: Simplify greatly: just define macros to control
296         coff-m68k.c.
297         * coff-aux.c: Likewise.  Just leave add_one_symbol routine.
298         * targets. (m68ksysvcoff_vec): Declare.
299         (bfd_target_vector): Add m68ksysvcoff_vec.
300         * config.bfd (m68*-motorola-sysv*): New target.
301         * configure.in (m68ksysvcoff_vec): New vector.
302         * configure: Rebuild.
303         * Makefile.in: Rebuild dependencies.
304         (BFD32_BACKENDS): Add coff-svm68k.o.
305         (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
306
307         * binary.c (binary_set_section_contents): Don't get misled if the
308         first section is not loadable.  From Matthew L. Martin
309         <mlm@xedia.com>.
310
311         * elflink.h (elf_bfd_final_link): Set the value of a section
312         symbol to the section address unless doing a relocateable link.
313
314 Tue Mar 18 23:03:17 1997  Richard Henderson  <rth@tamu.edu>
315
316         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
317         .plt entry if we've taken the function's address.
318         (elf64_alpha_merge_gots): Merge collected flags info as well.
319
320 Tue Mar 18 22:40:09 1997  H.J. Lu  <hjl@lucon.org>
321
322         * Many files: Add function prototypes.
323         * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
324         * ecofflink.c: Include "libcoff.h" and "libecoff.h".
325         * elf32-ppc.c (ppc_elf_fake_sections): Make static.
326         * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
327         * peicode.h: Change several void * parameters to PTR.
328         * srec.c (srec_get_symbol_info): Make static.
329         * syms.c (bfd_symbol_is_absolute): Remove.
330         * Makefile.in: Rebuild dependencies.
331
332 Tue Mar 18 12:58:08 1997  Ian Lance Taylor  <ian@cygnus.com>
333
334         * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
335         (bfd_elf32_bfd_is_local_label): Don't define.
336
337         * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
338         than malloc.
339
340 Mon Mar 17 11:32:53 1997  Ian Lance Taylor  <ian@cygnus.com>
341
342         * bfd-in.h: Don't include obstack.h.
343         (struct bfd_hash_table): Change memory field to PTR.
344         * bfd.c (struct _bfd): Change memory field to PTR.
345         * bfd-in2.h: Rebuild.
346         * libbfd-in.h (bfd_release): Declare as function, don't define as
347         macro.
348         * libbfd.h: Rebuild.
349         * opncls.c: Include "objalloc.h" rather than "obstack.h".  Use
350         objalloc routines rather than obstack routines.
351         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
352         (getpagesize): Don't define.
353         (_bfd_new_bfd): Don't set _bfd_chunksize.
354         (bfd_openr): Free new bfd and objalloc on failure.
355         (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
356         (bfd_alloc_size): Remove.
357         (bfd_release): New function.
358         * hash.c: Include "objalloc.h" rather than "obstack.h".  Use
359         objalloc routines rather than obstack routines.
360         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
361         * ecofflink.c: Include "objalloc.h" rather than "obstack.h".  Use
362         objalloc routines rather than obstack routines.
363         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
364         (struct accumulate): Change memory to struct objalloc *.
365         * liboasys.h (oasys_data_type): Remove oasys_obstack field.
366         * dep-in.sed: Don't remove obstack.h from dependency list.
367         * Makefile.in: Rebuild dependencies.
368         (BFD_H_DEPS): Remove obstack.h.
369         (install): Don't install obstack.h.
370         * Many files: Don't include "obstack.h".
371         * VERSION: Bump.
372
373         * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
374         * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
375         * libbfd.h: Rebuild.
376         * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
377         * sunos.c (sunos_add_dynamic_symbols): Likewise.
378         * srec.c (srec_scan): Rewrite to not use obstack_1grow.
379
380         * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t.  Remove
381         old version of bfd_alloc.
382         * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
383         * libbfd.h: Rebuild.
384         * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
385
386 Sat Mar 15 15:24:18 1997  Ian Lance Taylor  <ian@cygnus.com>
387
388         * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
389         ELF local label syntax as well.
390
391 Sat Mar 15 10:16:42 1997  Fred Fish  <fnf@cygnus.com>
392
393         * config.bfd (powerpc-*-beos*): New target.
394         * configure.in (powerpc-*-beos*): Add case that explicitly
395         does not set COREFILE for now.  A future BeOS version is
396         expected to support core files.
397         * configure: Regenerate with autoconf.
398
399 Fri Mar 14 16:43:22 1997  Ian Lance Taylor  <ian@cygnus.com>
400
401         * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
402         seen with a local symbol, rather than crashing.
403
404         * elfcode.h (elf_slurp_symbol_table): Don't try to read the
405         version symbols if there aren't any.
406
407 start-sanitize-tic80
408 Thu Mar 13 16:38:30 1997  Fred Fish  <fnf@cygnus.com>
409
410         * coff-tic80.c (coff_rtype_to_howto): Define
411         (coff_tic80_rtype_to_howto): Clone generic coff version and
412         add code to handle the funky TI "internal relocations".
413
414 end-sanitize-tic80
415 Thu Mar 13 14:08:53 1997  Ian Lance Taylor  <ian@cygnus.com>
416
417         * elflink.h (elf_link_add_object_symbols): Don't warn about type
418         or size changes because of a weak symbol.
419
420         * cisco-core.c (SIGEMT): Define if not defined.
421
422 Wed Mar 12 21:36:05 1997  Ian Lance Taylor  <ian@cygnus.com>
423
424         * elflink.h (elf_link_add_object_symbols): Use extsymoff when
425         setting ever.  Sanity check the version number.  Sort out copying
426         flags and other information when adding an indirect symbol.
427         (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
428         symbols added by the backend.  Clear the entire contents of the
429         versym section.
430         (elf_export_symbol): Ignore indirect symbols.
431         (elf_link_output_extsym): Accept a section without an owner in an
432         assert.
433         * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
434         version count.  Correct the allocation of x_versymp.
435
436         * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
437         the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
438         Don't return bfd_und_section_ptr when info->shared.
439         (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
440         (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
441         (mips_elf_check_relocs): Resolve an indirect symbol in
442         sym_hashes.
443         (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
444         SHN_MIPS_TEXT or SHN_MIPS_DATA.
445
446         * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
447
448 Tue Mar 11 01:38:36 1997  Ian Lance Taylor  <ian@cygnus.com>
449
450         From Eric Youngdale <eric@andante.jic.com>:
451         * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
452         * elf.c (bfd_elf_print_symbol): Correct errors in last change.
453         * elflink.h (elf_link_add_object_symbols): Handle cases in which a
454         versioned symbol appears in both a regular and a shared object.
455         (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
456         appropriate.  Improve error message.
457         (struct elf_outext_info): Rename from elf_finfo_failed.  Change
458         all uses.  Add localsyms field.
459         (elf_bfd_final_link): When generating a shared library, call
460         elf_link_output_extsym to output all local symbols.
461         (elf_link_output_extsym): Handle symbols which were forced to
462         become local.
463
464 Sun Mar  9 23:08:49 1997  Ian Lance Taylor  <ian@cygnus.com>
465
466         From Eric Youngdale <eric@andante.jic.com>:
467         * elf-bfd.h (elf_symbol_type): Add version field.
468         * elfcode.h (elf_slurp_symbol_table): Set version field.
469         * elflink.h (elf_link_add_object_symbols): When creating an
470         indirect symbol for a default version symbol, set DEF_DYNAMIC if
471         appropriate.  Set up an indirection from the nondefault version of
472         the symbol as well.
473         (NAME(bfd_elf,size_dynamic_sections)): Call
474         elf_link_assign_sym_version before checking whether there are any
475         versions.  Always record the version name as a dynamic symbol.
476         Initialize counters.
477         (elf_link_assign_sym_version): After finding a version, see if a
478         symbol should be forced to local scope.  Create a new version
479         definition if appropriate.
480         (elf_link_output_extsym): Correct indirect symbol handling.
481         * elf.c (bfd_elf_print_symbol): Print version information.
482         (bfd_section_from_shdr): Turn version sections into BFD sections.
483         (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
484         if sh_info is not already set.
485         (_bfd_elf_copy_private_section_data): Copy sh_info for version
486         sections.
487         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
488         _bfd_stringtab_add to copy the name into permanent memory if
489         appropriate.
490
491 Fri Mar  7 11:55:31 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
492
493         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
494
495 Fri Mar  7 10:37:30 1997  Ian Lance Taylor  <ian@cygnus.com>
496
497         * coffcode.h (bfd_coff_backend_data): Change
498         _bfd_coff_compute_section_file_positions to return a boolean
499         value.  Change all callers.
500         (coff_compute_section_file_positions): Change return type to
501         boolean.  If the size of the last section changed, then output a
502         zero byte at the end of the file.
503         * libcoff.h: Rebuild.
504
505         * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
506         for at least 6 output symbols.
507         (xcoff_write_global_symbol): When emitting TOC entry relocs, also
508         emit a TC csect to represent the space they take up.  For an XO
509         symbol, just emit a reference, not a csect.
510
511         * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
512         Solaris doesn't like the combined options, and the -f is
513         unnecessary.
514         (stamp-tshlink, install): Likewise.
515
516         * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
517         handling when little endian.
518
519 Thu Mar  6 13:51:51 1997  Jeffrey A Law  (law@cygnus.com)
520
521         * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
522         (mn10300_elf_relocate_section): Likewise.
523         (elf_backend_relocate_section): Define.
524
525         * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
526         relocs.  Replace them with generic PCREL_{8,16,32} relocs.
527         (elf32_mn10300_howto_table): Likewise.
528         (elf32_mn10300_reloc_map): Likewise.
529         (bfd_elf32_mn10300_reloc): Delete unused function.
530
531 Thu Mar  6 12:19:59 1997  Fred Fish  <fnf@cygnus.com>
532
533 start-sanitize-tic80
534         * coff-tic80.c (rtype2howto): If passed a relocation type we don't
535         understand, just set the howto field to NULL, and the caller will
536         print an appropriate error message.
537 end-sanitize-tic80
538         * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
539         code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
540         block.  Use NULL for initializations of "ptr" rather than bare 0.
541         * coff-h8300.c: Fix typo in comment.
542         * coff-h8500.c: Ditto.
543         * coff-w65.c: Ditto
544         * coff-z8k.c: Ditto.
545         
546 Wed Mar  5 13:59:09 1997  Doug Evans  <dje@seba.cygnus.com>
547
548         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
549         (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
550         m32r_elf_get_relocated_section_contents): First pass at relax support.
551
552 Mon Mar  3 13:27:09 1997  Ulrich Drepper  <drepper@rtl.cygnus.com>
553
554         * elflink.h (elf_link_add_object_symbols): Use correct sh_size
555         entry for reading verdef records.
556         Use correct braces for computing increments of extverdaux and
557         exteverdef record pointers.
558
559 start-sanitize-tic80
560 Sun Mar  2 22:47:54 1997  Fred Fish  <fnf@cygnus.com>
561
562         * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
563         instead of 4.
564
565 end-sanitize-tic80
566 Sun Mar  2 16:25:35 1997  Ian Lance Taylor  <ian@cygnus.com>
567
568         * elflink.h (elf_link_find_version_dependencies): Check that
569         DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
570         set.
571
572 start-sanitize-tic80
573 Fri Feb 28 16:52:40 1997  Fred Fish  <fnf@cygnus.com>
574
575         * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
576
577 end-sanitize-tic80
578 Fri Feb 28 15:06:45 1997  Ian Lance Taylor  <ian@cygnus.com>
579
580         * targets.c (bfd_default_vector): Make non-const.
581         (find_target): New static function, broken out of
582         bfd_find_target.
583         (bfd_set_default_target): New function.
584         (bfd_find_target): Call find_target.  When defaulting, use
585         bfd_default_vector[0] if it is not NULL.
586         * libbfd-in.h (bfd_default_vector): Adjust declaration.
587         * bfd-in2.h, libbfd.h: Rebuild.
588
589         * syms.c (bfd_is_local_label): Return false if the symbol has no
590         name.
591         * coff-i960.c (coff_i960_is_local_label_name): New function.
592         (coff_bfd_is_local_label_name): Define.
593         * coff-m68k.c (m68k_coff_is_local_label_name): New function.
594         (coff_bfd_is_local_label_name): Define.
595         * coff-rs6000.c (xcoff_is_local_label_name): New function.
596         (coff_bfd_is_local_label_name): Define.
597         * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
598         with .. or _.L_ as local.
599         * elf32-i386.c (elf_i386_is_local_label_name): New function.
600         (bfd_elf32_bfd_is_local_label_name): Define.
601         * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
602         beginning with $ as local.
603
604 Thu Feb 27 18:36:23 1997  Ian Lance Taylor  <ian@cygnus.com>
605
606         * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
607         rather than comparing against info->lprefix.
608         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
609         * elflink.h (elf_link_input_bfd): Likewise.
610         * linker.c (_bfd_generic_link_output_symbols): Likewise.
611         * xcofflink.c (xcoff_link_input_bfd): Likewise.
612
613         * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
614         _bfd_elf_is_local_label_name if not already defined.
615         * elf.c (_bfd_elf_is_local_label_name): New function.
616         * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
617
618         * coff-m88k.c (coff_bfd_is_local_label_name): Define.
619         (m88k_is_local_label_name): New static function.
620
621         * coffcode.h (coff_bfd_is_local_label_name): Define as
622         _bfd_coff_is_local_label_name if not already defined.
623         * coffgen.c (_bfd_coff_is_local_label_name): New function.
624         * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
625         * libcoff.h: Rebuild.
626         
627         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
628         to _bfd_is_local_label_name.
629         (bfd_target): Likewise.
630         * syms.c (bfd_is_local_label): Define as function, not macro.
631         (bfd_is_local_name): Define.
632         * libbfd.c (bfd_generic_is_local_label_name): Rename from
633         bfd_generic_is_local_label, and take a string rather than a
634         symbol.
635         * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
636         (_bfd_nosymbols_bfd_is_local_label_name): Define.
637         (bfd_generic_is_local_label): Don't declare.
638         (bfd_generic_is_local_label_name): Declare.
639         * bfd-in2.h, libbfd.h: Rebuild.
640         * All backends: Change local_label to local_label_name.
641
642         * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
643         (mips_elf_relocate_got_local): Change return type to boolean.
644         Don't assume that the first zero entry is unassigned; instead, use
645         assigned_gotno.
646         (mips_elf_relocate_section): Check return value of
647         mips_elf_relocate_got_local.
648         (mips_elf_create_got_section): Initialize assigned_gotno field.
649
650 start-sanitize-d30v
651 Wed Feb 26 15:19:51 1997  Martin M. Hunt  <hunt@pizza.cygnus.com>
652
653         * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
654         relocations.
655
656 end-sanitize-d30v       
657 Wed Feb 26 13:33:03 1997  Ian Lance Taylor  <ian@cygnus.com>
658
659         * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
660         that have no contents merely because linker_mark is not set.
661
662 Tue Feb 25 18:51:35 1997  Stan Shebs  <shebs@andros.cygnus.com>
663
664         * config.bfd (mips*-*-lnews*): New target.
665         * coff-mips.c (mips_relocate_section): Make assert compare
666         content byteorder instead of header byteorder.
667         (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
668         data.
669         * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
670         * configure.in (ecoff_biglittle_vec): Add case.
671         * configure: Update.
672
673 Tue Feb 25 00:32:49 1997  Ian Lance Taylor  <ian@cygnus.com>
674
675         * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
676         name begins with ".note".
677         (map_sections_to_segments): Add a PT_NOTE segment for any loadable
678         section whose name begins with ".note".
679         (get_program_header_size): Corresponding change.
680
681         * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
682         jal and for jal overflow.
683
684 Mon Feb 24 17:53:14 1997  Ian Lance Taylor  <ian@cygnus.com>
685
686         From Eric Youngdale <eric@andante.jic.com>:
687         * elflink.h (elf_link_add_archive_symbols): If a default symbol is
688         not found, try looking it up again without the version name.
689         (elf_link_add_object_symbols): Always link against the dynamic
690         symbol table of a dynamic object.  When linking against a dynamic
691         object, include version strings in symbol names, and set up
692         version information.  Add indirect symbols for default versions.
693         (elf_link_create_dynamic_sections): Add special version sections.
694         (struct elf_assign_sym_version_info): Define.
695         (struct elf_find_verdep_info): Define.
696         (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter.  Set
697         up version sections.
698         (elf_adjust_dynamic_symbol): Ignore indirect symbols.
699         (elf_link_find_version_dependencies): New static function.
700         (elf_link_assign_sym_version): New static function.
701         (elf_link_renumber_dynsyms): New static function.
702         (struct elf_final_link_info): Add symver_sec field.
703         (elf_bfd_final_link): Initialize finfo.symver_sec.  Don't count
704         local symbols of a dynamic object.  Handle DT_VER* constants.
705         (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
706         dynamic object.  Skip indirect symbols from ELF objects.  Remove
707         the version name before choosing a hash bucket.  Write out the
708         version information if appropriate.
709         (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
710         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
711         (bfd_elf64_size_dynamic_sections): Likewise.
712         * bfd-in2.h: Rebuild.
713         * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
714         Change elf_link_hash_flags to unsigned short.
715         (ELF_LINK_HIDDEN): Define.
716         (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
717         dynverdef_hdr, dynversym_section, dynverdef_section,
718         dynverref_section, cverdefs, cverrefs, verdef, verref.
719         (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
720         (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
721         (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
722         (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
723         (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
724         (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
725         (_bfd_elf_slurp_version_tables): Declare.
726         * elf.c (_bfd_elf_swap_verdef_in): New function.
727         (_bfd_elf_swap_verdef_out): Likewise.
728         (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
729         (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
730         (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
731         (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
732         (_bfd_elf_print_private_bfd_data): Add DT_VER* constants.  Print
733         version information if there is any.
734         (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
735         (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
736         (elf_fake_sections): Handle .gnu.version* section names.
737         (assign_section_numbers): Handle SHT_GNU_ver* section types.
738         (_bfd_elf_slurp_version_tables): New function.
739         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
740         version name in string entered in dynamic hash table.
741         * elfcode.h: Include fnmatch.h.
742         * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
743         symbol which was forced to become local.
744         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
745         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
746         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
747         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
748
749 Fri Feb 21 16:15:18 1997  Jeffrey A Law  (law@cygnus.com)
750
751         * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
752         somewhat.
753         (mn10200_elf_relax_section): Correctly compute a symbol's value
754         when the symbol is local, but not in the same section as we are
755         relaxing.  Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
756         relaxing.
757
758 Fri Feb 21 13:55:14 1997  Doug Evans  <dje@seba.cygnus.com>
759
760         * elf32-m32r.c: Rewrite to use ELF backend linker.
761         Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
762         Add small data area support (R_M32R_SDA16).
763         * reloc.c: Document BFD_RELOC_M32R_SDA16.
764         * bfd-in2.h,libbfd.h: Regenerated.
765
766 Thu Feb 20 23:50:31 1997  Jeffrey A Law  (law@cygnus.com)
767
768         * elf32-mn10200.c (mn10200_elf_relax_section): New function.
769         (mn10200_elf_relax_delete_bytes): Likewise.
770         (mn10200_elf_symbol_address_p): Likewise.
771         (mn10200_elf_get_relocated_section_contents): Likewise.
772         (bfd_elf32_bfd_relax_section): Define.
773         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
774
775         * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
776         (mn10200_elf_relocate_section): Likewise.
777         (elf_backend_relocate_section): Define.
778
779 start-sanitize-d30v
780 Tue Feb 18 17:22:59 1997  Martin M. Hunt  <hunt@pizza.cygnus.com>
781
782         * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
783         reloc.c, targets.c: New target, elf-*-D30V. 
784
785         * bfd-in2.h, configure, libbfd.h: Rebuilt.
786
787         * cpu-d30v.c, elf32-d30v.c: New files.
788         
789 end-sanitize-d30v       
790 Tue Feb 18 15:31:48 1997  Fred Fish  <fnf@cygnus.com>
791
792         * reloc.c (struct reloc_howto_struct): Fix typo in comment.
793         * bfd-in2.h: Regenerated.
794 start-sanitize-tic80
795         * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
796         (rtype2howto): Add function.
797         (tic80_howto_table): Add.
798 end-sanitize-tic80
799         
800 Tue Feb 18 11:41:00 1996  Dawn Perchik  <dawn@cygnus.com>
801
802         * sysdep.h: Don't define errno in MSVC if error.h is included.
803
804 start-sanitize-v850
805 Tue Feb 18 10:04:13 1997  Jeffrey A Law  (law@cygnus.com)
806
807         * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
808         is initialized before it is used.
809
810 end-sanitize-v850
811 Mon Feb 17 11:28:40 1997  Ian Lance Taylor  <ian@cygnus.com>
812
813         * hp300hpux.c (convert_sym_type): Don't convert a secondary common
814         symbol into a weak undefined symbol; leave it as a common symbol.
815
816 Fri Feb 14 19:08:03 1997  Ian Lance Taylor  <ian@cygnus.com>
817
818         * elflink.h (elf_link_add_object_symbols): Don't issue a warning
819         about a symbol defined in a dynamic object if it has already been
820         defined in a regular object.
821
822 Thu Feb 13 20:53:22 1997  Klaus Kaempf  (kkaempf@progis.de)
823
824         * makefile.vms: Add gcc flags to allow compiling with current gcc
825         snapshot
826         (targmatch.h): New dependency.
827
828         * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
829         openVMS/Alpha.
830         * evax.h (ALPHA_R_CODEADDR): New relocation.
831         * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
832         openVMS/Alpha.
833         * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
834         relocation.
835         * bfd-in2.h, libbfd.h: Rebuild.
836
837         Restrict symbol length to 64 bytes, case preserving:
838         * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
839         * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
840         (_bfd_evax_length_hash_symbol): Added.
841         * evax-etir.c (_bfd_evax_write_etir): Call
842         _bfd_evax_length_hash_symbol before output of symbol.
843         * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
844         * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
845
846         * evax-emh.c: Output filename to object file without path.
847
848         * evax-egsd.c: New sections for local and global commons.
849
850         * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
851         evax-misc.c, evax.h: Remove 8 bit characters from copyright
852         notices.  Replace AXP with Alpha.
853
854 Wed Feb 12 18:10:30 1997  Ian Lance Taylor  <ian@cygnus.com>
855
856         * sunos.c (sunos_create_dynamic_sections): We need the dynamic
857         sections if we are creating a shared library.
858
859 Tue Feb 11 15:45:43 1997  Doug Evans  <dje@canuck.cygnus.com>
860
861         * configure.host (i386-windows): Don't set host64=true.
862
863 Tue Feb 11 15:27:32 1997  Ian Lance Taylor  <ian@cygnus.com>
864
865         * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
866         (elf_mips16_gprel_howto): New static variable.
867         (mips16_gprel_reloc): New static function.
868         (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
869         (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
870         (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
871         * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
872         * bfd-in2.h, libbfd.h: Rebuild.
873
874 Mon Feb 10 23:25:00 1997  Doug Evans  <dje@seba.ricochet.net>
875
876         * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
877         for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
878
879 start-sanitize-r5900
880         Fri Feb  7 16:20:17 1997  Gavin Koch   <gavin@cygnus.com>
881         
882         * config.bfd: add r5900
883         
884 end-sanitize-r5900        
885 Fri Feb  7 12:39:11 1997  Ian Lance Taylor  <ian@cygnus.com>
886
887         * elflink.h (elf_link_input_bfd): If we've discarded a section,
888         the output section will be the absolute section; don't print an
889         assertion message for that case when doing a relocateable link.
890
891 Thu Feb  6 16:55:43 1997  Ian Lance Taylor  <ian@cygnus.com>
892
893         * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
894         (struct mips_elf_link_hash_entry): Add new fields fn_stub,
895         need_fn_sub, call_stub, and call_fp_stub.
896         (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
897         (mips_elf_link_hash_newfunc): Initialize new fields.
898         (mips_elf_link_hash_table_create): Likewise.
899         (mips_elf_relocate_section): Redirect relocations to use mips16
900         stubs when appropriate.
901         (mips_elf_check_relocs): Attach stub sections to the appropriate
902         symbol.  Set need_fn_stub when appropriate.
903         (mips_elf_always_size_sections): New static function.
904         (mips_elf_check_mips16_stubs): New static function.
905         (elf_backend_always_size_sections): Define.
906         * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
907
908         * elflink.h (elf_link_input_bfd): Discard local symbols that are
909         attached to sections which are not being included in the link.
910
911 Wed Feb  5 13:20:17 1997  Ian Lance Taylor  <ian@cygnus.com>
912
913         * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
914         symbol value when computing the addend for a pc_relative
915         pcrel_offset reloc.
916
917 Mon Feb  3 11:54:06 1997  Ian Lance Taylor  <ian@cygnus.com>
918
919         * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
920         relocateable link, just skip pc_relative pcrel_offset relocs.
921         * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
922         structure for an ARM26 reloc which can be resolved.
923         (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
924         reloc can be resolved.
925
926         * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
927         error in overflow check for R_RELBYTE.
928
929 Fri Jan 31 14:07:27 1997  Ian Lance Taylor  <ian@cygnus.com>
930
931         * ieee.c (ieee_slurp_section_data): Pick up the start address.
932         From Mark Rasin <mark.rasin@telrad.co.il>.
933
934         * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
935         debugging symbols.
936
937 Wed Jan 29 00:00:49 1997  Jeffrey A Law  (law@cygnus.com)
938
939         * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
940         (elf_mn10200_howto_table): Likewise.
941         (mn10200_reloc_map): Likewise.
942
943 Mon Jan 27 12:07:35 1997  Doug Evans  <dje@seba.cygnus.com>
944
945         * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
946         * bfd-in2.h, libbfd.h: Regenerated.
947         * elf32-m32r.c: Add support for them.
948
949 Mon Jan 27 12:25:02 1997  Ian Lance Taylor  <ian@cygnus.com>
950
951         * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
952         * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
953 start-sanitize-v850
954         * elf32-v850.c (v850_elf_final_link_relocate): Remove used
955         r_format and r_pcrel.  Always return a value.
956 end-sanitize-v850
957         * riscix.c (MY_final_link_callback): Define to dummy value.
958
959         * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
960         relocations against the text segment, look up the output name of
961         the reloc section.
962         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
963         * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
964         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
965         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
966         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
967
968 start-sanitize-tic80
969 Wed Jan 22 15:40:28 1997  Fred Fish  <fnf@cygnus.com>
970
971         * coff-tic80.c (tic80coff_vec): Use correct data put/get
972         routines for little endian data.
973         * coffcode.h (coff_write_object_contents): Set magic to
974         TIC80_ARCH_MAGIC for TIc80.
975
976 Tue Jan 21 12:32:43 1997  Fred Fish  <fnf@cygnus.com>
977
978         * coff-tic80.c (tic80coff_vec): Change to little endian data
979         as the default.
980
981 end-sanitize-tic80
982 Thu Jan 16 17:45:57 1997  Ian Lance Taylor  <ian@cygnus.com>
983
984         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
985         auxiliary_filters parameter to be const char * const *.  Accept a
986         NULL terminated array.
987         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
988         (bfd_elf32_size_dynamic_sections): Update declaration.
989         * bfd-in2.h: Rebuild.
990
991 Wed Jan 15 11:21:32 1997  Ian Lance Taylor  <ian@cygnus.com>
992
993         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
994         NOTYPE symbol in a text section as a FUNC symbol.
995
996         * coffcode.h (coff_compute_section_file_positions): Force
997         relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
998
999 Tue Jan 14 08:46:33 1997  Doug Evans  <dje@canuck.cygnus.com>
1000
1001         * libaout.h (machine_type): Reserve several values for sparclet.
1002
1003 start-sanitize-tic80
1004 Mon Jan 13 22:39:08 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
1005
1006         * config.bfd (tic80-*-*): Don't require 'coff'.
1007
1008 end-sanitize-tic80
1009 start-sanitize-v850
1010 Mon Jan 13 19:36:25 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
1011
1012         * elf32-v850.c (v850_elf_howto_table): Set the special_function
1013         table to v850_elf_reloc for all non-standard relocations.
1014         (v850_elf_check_relocs): Add check for h being non-null.
1015         (v850_elf_reloc): Add  R_V850_ZDA_OFFSET support.  Use switch
1016         statement instead of multiple ifs.
1017         (v850_elf_relocate_section): Fix up error message, don't just call
1018         abort.
1019
1020 end-sanitize-v850
1021 Mon Jan  6 13:28:35 1997  Jeffrey A Law  (law@cygnus.com)
1022
1023         * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
1024         Use bfd_elf_generic_reloc as special function for all relocs.
1025         (bfd_elf32_mn10200_reloc): Remove unnecessary function.
1026
1027         * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
1028         24bit pc-relative reloc.
1029
1030 start-sanitize-tic80
1031 Fri Jan  3 16:33:00 1997  Fred Fish  <fnf@cygnus.com>
1032
1033         * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
1034         * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
1035         header byte order is little endian.  Use correct bfd_get and
1036         bfd_put routines for little endian headers.
1037         * coffcode.h (coff_set_arch_mach_hook): Set arch to
1038         bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
1039
1040 end-sanitize-tic80
1041 Fri Jan  3 16:54:08 1997  Jeffrey A Law  (law@cygnus.com)
1042
1043         * reloc.c: Add BFD_RELOC_24.
1044         * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
1045         (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
1046         * bfd-in2.h, libbfd.h: Rebuilt.
1047
1048 Fri Jan  3 16:58:31 1997  Richard Henderson  <rth@tamu.edu>
1049
1050         elf64-alpha multiple .got rewrite:
1051
1052         * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
1053         (bfd_elf*_mkobject): Don't define here ...
1054         * elfxx-target.h: ... but rather here.  Default always_size_sections
1055         hook to NULL.
1056         * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was 
1057         what the #defines in elf-bfd.h transmuted it to anyway.
1058
1059         * section.c: Add SEC_LINKER_CREATED flag.
1060         * bfd-in2.h: Rebuild.
1061         * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
1062         relocation section flags.
1063         (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
1064         SEC_IN_MEMORY to recognize generated bits.
1065         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
1066         Likewise.
1067         * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
1068         mips_elf_create_compact_rel_section, mips_elf_create_got_section,
1069         mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
1070         * elf32-ppc.c (ppc_elf_create_linker_section,
1071         ppc_elf_size_dynamic_sections): Likewise.
1072         * elf32-sparc.c (elf32_sparc_check_relocs,
1073         elf32_sparc_size_dynamic_sections): Likewise.
1074         * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to 
1075         section flags.
1076         (_bfd_elf_create_dynamic_sections): Likewise.
1077         (_bfd_elf_make_linker_section_rela): Likewise.
1078         * elflink.h (elf_link_create_dynamic_sections): Likewise.
1079         (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
1080         (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
1081         to identify generated bits.
1082         (elf_link_input_bfd): Likewise.
1083
1084         * elf64-alpha.c: Rewrite everything touching relocations.
1085
1086 start-sanitize-v850
1087 Fri Jan  3 11:42:53 1997  Michael Meissner  <meissner@tiktok.cygnus.com>
1088
1089         * elf32-v850.c (all functions and static variables): Go through
1090         and regularize names to be of the form v850_elf_<xxx>.
1091         (toplevel): Include <elf/v850.h>.
1092         (enum reloc_type): Move to include/elf/v850.h.
1093         (v850_elf_check_relocs): For common variables, if the variable is
1094         referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
1095         into the appropriate section.
1096         (elf_backend_check_relocs): Define.
1097
1098 Tue Dec 31 15:15:28 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1099
1100         * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
1101
1102 end-sanitize-v850
1103 Tue Dec 31 14:44:50 1996  Ian Lance Taylor  <ian@cygnus.com>
1104
1105         * config.bfd (mips*el-*-linux*): New target.
1106         (mips*-*-linux*): New target.
1107
1108         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
1109         Return a useful value.
1110
1111         * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
1112
1113         * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
1114         ac_cv_func_mmap.
1115         * configure: Rebuild.
1116         * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
1117         ac_cv_func_mmap in bfd/configure.host.
1118
1119         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
1120         filter_shlib and auxiliary_filter_shlib parameters.
1121         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
1122         DT_FILTER.
1123         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1124         (bfd_elf64_size_dynamic_sections): Likewise.
1125         * bfd-in2.h: Rebuild.
1126
1127 Mon Dec 30 18:48:52 1996  Ian Lance Taylor  <ian@cygnus.com>
1128
1129         * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
1130         symbols, don't export a symbol which is defined by an object in an
1131         archive which contains shared objects.
1132
1133 start-sanitize-tic80
1134 Mon Dec 30 16:12:58 1996  Fred Fish  <fnf@cygnus.com>
1135
1136         * archures.c (enum bfd_architecture): Add bfd_arch_tic80
1137         for TI TMS320c80 (MVP).
1138         (bfd_archures_list): Add bfd_tic80_arch.
1139         * bfd-in2.h: Regenerate by running "make headers".
1140
1141 Sun Dec 29 16:18:52 1996  Fred Fish  <fnf@cygnus.com>
1142
1143         * cpu-tic80.c (bfd_tic80_arch): Add struct.
1144         * configure.in (case $vec): Correct typo, "tb" not "tp".
1145         Also add cofflink.o for tic80coff_vec.
1146         * configure: Regenerate with autoconf.
1147
1148 end-sanitize-tic80
1149 Mon Dec 30 11:54:56 1996  Ian Lance Taylor  <ian@cygnus.com>
1150
1151         * libbfd.c: Patch up the mmap code so that it is only built if BFD
1152         is configured with --with-mmap.
1153
1154 start-sanitize-tic80
1155 Sun Dec 29 10:48:57 1996  Fred Fish  <fnf@cygnus.com>
1156
1157         * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
1158         (ALL_MACHINES): Add cpu-tic80.o
1159         (cpu-tic80.o, coff-tic80.o): Add dependencies.
1160         * coff-tic80.c: Add skeleton, cloned from another coff config.
1161         * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
1162         for TIc80.
1163
1164 end-sanitize-tic80
1165 Fri Dec 27 20:56:41 1996  Fred Fish  <fnf@cygnus.com>
1166
1167         * TODO: Correct a misspelling.
1168 start-sanitize-tic80
1169         * coff-tic80.c: New file for TI TMS320C80 (MVP).
1170         * cpu-tic80.c: New file for TI TMS320C80 (MVP).
1171         * configure.in (case $vec): Add tic80coff_vec entry.
1172         * configure: Regenerate with autoconf.
1173         * archures.c (bfd_tic80_arch): Declare.
1174         * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
1175         * config.bfd (case ${targ}): Add tic80*-*-coff* target.
1176         * targets.c (tic80coff_vec): Add decl as extern bfd_target.
1177         (bfd_target_vector): Add tic80coff_vec entry.
1178 end-sanitize-tic80
1179
1180 Fri Dec 27 11:48:12 1996  H.J. Lu  <hjl@lucon.org>
1181
1182         * elflink.h (elf_buckets): Add some more values for larger
1183         binaries.
1184
1185 Thu Dec 26 18:36:54 1996  Ian Lance Taylor  <ian@cygnus.com>
1186
1187         * Makefile.in (install): Move subdir_do out of conditional. From
1188         Fred Fish <fnf@cygnus.com>.
1189
1190 Wed Dec 18 10:04:30 1996  Jeffrey A Law  (law@cygnus.com)
1191
1192         * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
1193         32 bit relocs.
1194         (elf_mn10200_howto_table): Likewise.
1195         (mn10200_reloc_map): Likewise.
1196
1197 Tue Dec 17 11:09:36 1996  Ian Lance Taylor  <ian@cygnus.com>
1198
1199         * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
1200         mips16 symbol during the link.
1201         (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
1202         mips16 symbol.
1203         (mips_elf_link_output_symbol_hook): New static function.
1204         (elf_backend_link_output_symbol_hook): Define.
1205
1206         * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
1207         not zero.
1208
1209 Mon Dec 16 14:38:39 1996  Ian Lance Taylor  <ian@cygnus.com>
1210
1211         * elf.c (bfd_section_from_shdr): Don't check for reloc sections
1212         against SEC_DEBUGGING sections here (revert patch of December 5).
1213         * elfcode.h (elf_object_p): Check for them here, instead.
1214
1215 Sun Dec 15 14:46:06 1996  Ian Lance Taylor  <ian@cygnus.com>
1216
1217         * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
1218         * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
1219         slurp_reloc_table.
1220         (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
1221         (_bfd_elf_canonicalize_dynamic_reloc): New function.
1222         * elf-bfd.h (struct elf_size_info): Update declaration of
1223         slurp_reloc_table.
1224         (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
1225         (_bfd_elf_canonicalize_dynamic_reloc): Declare.
1226         * elfxx-target.h: Use new dynamic reloc routines by default.
1227         * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
1228         parameter.
1229
1230 Fri Dec 13 13:18:49 1996  Dan Wilder  <dan@gasboy.com>
1231
1232         * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
1233         if NAMES_HAVE_UNDERSCORE is defined.
1234
1235 Fri Dec 13 11:13:23 1996  Doug Evans  <dje@canuck.cygnus.com>
1236
1237         * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
1238
1239 Thu Dec 12 15:07:20 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1240
1241         * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
1242         supported relocs.
1243
1244 Thu Dec 12 14:55:41 1996  Ian Lance Taylor  <ian@cygnus.com>
1245
1246         * elflink.h (elf_link_add_object_symbols): Only add a weak
1247         symbol if the real definition is in the dynamic symbol table.
1248         After finding the real definition, then, if it is dynamic, add the
1249         weak symbol to the dynamic symbol table.
1250
1251         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
1252
1253         * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
1254         function.
1255         (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
1256         array.
1257
1258 Tue Dec 10 23:23:52 1996  Jeffrey A Law  (law@cygnus.com)
1259
1260         * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
1261         variants.
1262         (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
1263         (bfd_elf32_mn10300_reloc): Write data in little endian format.
1264         * reloc.c: Remove mn10300 big endian relocs.
1265         * bfd-in2.h, libbfd.h: Rebuilt.
1266
1267         * elf32-mn10200.c: Update from elf32-mn10300.c.
1268  
1269 Fri Dec  6 15:18:05 1996  Jeffrey A Law  (law@cygnus.com)
1270
1271         * elf32-mn10300.c (elf_symbol_leading_char): Define.
1272
1273         * elf32-mn10300.c: Add some comments.
1274
1275 Fri Dec  6 17:16:43 1996  Ian Lance Taylor  <ian@cygnus.com>
1276
1277         * ihex.c (ihex_scan): Always initialize buf before jumping to
1278         error_return.
1279         (ihex_read_section): Likewise.
1280
1281 Thu Dec  5 22:29:18 1996  Jeffrey A Law  (law@cygnus.com)
1282
1283         * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
1284         inplace for most relocs.
1285
1286 Thu Dec  5 13:24:46 1996  Ian Lance Taylor  <ian@cygnus.com>
1287
1288         * elflink.h (elf_link_add_object_symbols): Calling check_relocs
1289         even if SEC_ALLOC is not set.
1290         * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
1291         when deciding whether to copy a reloc into a shared object.
1292         (elf_i386_relocate_section): Likewise.
1293         * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1294         (elf32_sparc_relocate_section): Likewise.
1295         * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
1296         reloc section if it is not set in the source section.
1297         * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1298         * elf.c (bfd_section_from_shdr): Mark a reloc section associated
1299         with a SEC_DEBUGGING section as SEC_DEBUGGING.
1300
1301 Wed Dec  4 14:18:13 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1302
1303         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
1304         expects a .got.plt until we actually create it.
1305
1306 Mon Dec  2 12:13:51 1996  Ian Lance Taylor  <ian@cygnus.com>
1307
1308         * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
1309         message for bfd_reloc_outofrange, rather than aborting.  From
1310         Philippe De Muyter <phdm@info.ucl.ac.be>.
1311
1312         * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
1313         a relocateable link, don't try to process them.  From Heinz Wrobel
1314         <wrobel@lpr.e-technik.tu-muenchen.de>.
1315
1316 Mon Dec  2 00:39:24 1996  Jeffrey A Law  (law@cygnus.com)
1317
1318         * elf32-mn10300.c (mn10300_info_howto): Renamed from
1319         mn10300_info_howto_rel.  Tweak reloc argument to be an
1320         Elf32_Internal_Rela.
1321         (USE_RELA): Define instead of USE_REL.
1322         (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
1323
1324 Sun Dec  1 00:18:59 1996  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
1325
1326         * configure.in, configure:  Handle mips*-sgi-irix6*.
1327         * irix-core.c (irix_core_core_file_p):  Accept CORE_MAGICN32
1328         core files.
1329
1330 Wed Nov 27 12:10:25 1996  Ian Lance Taylor  <ian@cygnus.com>
1331
1332         * elf32-i386.c (elf_i386_relocate_section): Warn about a
1333         relocation against a symbol defined in a section with no output
1334         section.
1335
1336 Tue Nov 26 11:07:31 1996  Ian Lance Taylor  <ian@cygnus.com>
1337
1338         * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
1339         * configure, config.in: Rebuild with autoconf 2.12.
1340
1341         * elf-bfd.h (struct elf_link_hash_entry): Add other field.
1342         * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
1343         (swap_out_syms): Set st_other from existing st_other field.
1344         * elflink.h (elf_link_add_object_symbols): Store st_other in hash
1345         table other field.
1346         (elf_link_output_extsym): Set the other field from the global hash
1347         table entry.
1348         * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
1349         (elf_mips16_jump_howto): New static variable.
1350         (mips16_jump_reloc): New static function.
1351         (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
1352         (mips_info_to_howto_rel): Handle R_MIPS16_26.
1353         (mips_elf_relocate_section): Handle R_MIPS16_26.  Handle R_MIPS_26
1354         to a mips16 symbol.
1355         * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
1356         * bfd-in2.h, libbfd.h: Rebuild.
1357         * cpu-mips.c (arch_info_struct): Add mips:16 entry.
1358
1359 Mon Nov 25 11:23:32 1996  Ian Lance Taylor  <ian@cygnus.com>
1360
1361         * configure.host: Use long long for mips-sgi-irix6*.
1362
1363         * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
1364         only a warning.  From Philippe De Muyter <phdemuyt@ulb.ac.be>.
1365
1366 Mon Nov 25 08:52:29 1996  Jeffrey A Law  (law@cygnus.com)
1367
1368         * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
1369         (enum reloc_type): Add more reloc types.
1370         (elf32_mn10300_howto_table): Update for new reloc types.
1371         (elf32_mn10300_reloc_map): Update for new reloc types.
1372         * reloc.c: Add some new relocs for the mn10300 series.
1373         * bfd-in2.h, libbfd.h: Rebuilt.
1374         
1375 Sat Nov 23 13:26:18 1996  Jeffrey A Law  (law@cygnus.com)
1376
1377         * som.c (setup_sections): Don't lose for a space which has
1378         no data, but some symbols.
1379
1380 Fri Nov 22 11:32:13 1996  Ian Lance Taylor  <ian@cygnus.com>
1381
1382         * sunos.c (struct sunos_link_hash_table): Add got_needed field.
1383         (sunos_link_hash_table_create): Initialize got_needed.
1384         (sunos_create_dynamic_sections): Only set .got section size if it
1385         is not already set.  Set got_needed.
1386         (bfd_sunos_size_dynamic_sections): Check got_needed.  Only set
1387         sdynptr, and only handle dynamic sections, if dynamic sections are
1388         needed.
1389         (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
1390         Initialize .got section.
1391         (sunos_scan_ext_relocs): Likewise.
1392         (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
1393         a dynamic symbol.
1394         (sunos_finish_dynamic_link): Check got_needed.  Only set up
1395         dynamic linking information if needed.
1396
1397 Thu Nov 21 10:31:31 1996  Rob Savoye  (rob@cygnus.com)
1398         
1399         * config.bfd: Added VersaDOS format to the Ericsson configuration.
1400
1401 Wed Nov 20 16:31:31 1996  Jeffrey A Law  (law@cygnus.com)
1402
1403         * elf32-mn10300.c: Rough cut at relocs for the mn10300.
1404
1405 Wed Nov 13 08:12:38 1996  Jeffrey A Law  (law@cygnus.com)
1406
1407         * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
1408         anymore.
1409
1410 Tue Nov 12 13:30:00 1996  Dawn Perchik  <dawn@cygnus.com>
1411
1412         * filemode.c: Include sysdep.h.
1413         * ihex.c: Add casts to eliminate compiler warnings.
1414         * sunos.c: Add casts to eliminate compiler warnings.
1415
1416 Mon Nov 11 10:37:02 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1417
1418         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
1419         section.
1420         (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC.  Make
1421         appropriate relocations in the .so file if shared.
1422         (ppc_elf_relocate_section): Ditto.
1423
1424 Tue Oct 29 15:03:02 1996  Doug Evans  <dje@canuck.cygnus.com>
1425
1426         * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
1427         complain_overflow_unsigned.
1428
1429 Tue Oct 29 12:53:46 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1430
1431         * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
1432         overflows for R_D10V_16 and R_D10V_18.
1433
1434 Tue Oct 29 13:23:53 1996  Ian Lance Taylor  <ian@cygnus.com>
1435
1436         * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
1437         (do_with_relocs): Likewise.
1438         (do_as_repeat): Likewise.
1439         (copy_expression): Likewise.
1440
1441 Fri Oct 25 16:56:40 1996  Ian Lance Taylor  <ian@cygnus.com>
1442
1443         * ieee.c (ieee_write_external_part): Correctly record whether
1444         there is an external part.
1445
1446 start-sanitize-v850
1447 Thu Oct 24 14:32:52 1996  Jeffrey A Law  (law@cygnus.com)
1448
1449         * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
1450         handle tda offsets for sld.w and sst.w instructions.
1451         Fix alignment check in sld.w and sst.w tda reloc handling.
1452
1453 end-sanitize-v850
1454 Thu Oct 24 09:08:47 1996  Stu Grossman  (grossman@critters.cygnus.com)
1455
1456         * aclocal.m4, configure:  Set USE_BINARY_FOPEN for *-*-windows.
1457
1458 start-sanitize-v850
1459 Wed Oct 23 00:53:16 1996  Jeffrey A Law  (law@cygnus.com)
1460
1461         * elf32-v850.c: Add comments about assumptions about
1462         char, short & long sizes.
1463         (elf32_v850_bfd_final_link_relocate): Fix sign extension
1464         problems for several relocs.
1465
1466         * elf32-v850.c (elf32_v850_howto_table): Fix typo in
1467         R_V850_SDA_OFFSET entry.
1468
1469 end-sanitize-v850
1470 Wed Oct 23 00:20:34 1996  Ian Lance Taylor  <ian@cygnus.com>
1471
1472         * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
1473         Store import file index in ldindx.
1474         (xcoff_build_ldsyms): Assume that ldsym was not previously
1475         allocated.  For an imported symbol, copy ldindx into l_ifile.
1476
1477 start-sanitize-v850
1478 Tue Oct 22 19:20:38 1996  Jeffrey A Law  (law@cygnus.com)
1479
1480         * elf32-v850.c (elf_v850_howto_table): Fix ordering of
1481         R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET.  Fix various
1482         fields in R_V850_TDA_OFFSET.
1483         (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
1484         relocs to work more like other relocs.  Handle R_V850_TDA_OFFSET
1485         relocations.
1486
1487         * elf32-v850.c: Include bfdlink.h.
1488         (bfd_elf32_v850_reloc): Return an error if we get a reloc
1489         we can't handle.
1490         (elf32_v850_bfd_final_link_relocate): New function.
1491         (v850_elf_relocation_section): Likewise.
1492         (elf_backend_relocate_section): Define.
1493
1494 end-sanitize-v850
1495 Tue Oct 22 17:22:43 1996  Ian Lance Taylor  <ian@cygnus.com>
1496
1497         * binary.c (binary_set_section_contents): Ignore sections which
1498         don't have SEC_LOAD and SEC_ALLOC set.
1499
1500 Mon Oct 21 12:13:05 1996  Jeffrey A Law  (law@cygnus.com)
1501
1502         * linker.c (_bfd_generic_final_link): Avoid losing static
1503         symbols in the .bss section.
1504
1505 Mon Oct 21 10:54:58 1996  Ian Lance Taylor  <ian@cygnus.com>
1506
1507         * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
1508         (mips32_64bit_reloc): New static function.
1509         (mips_reloc_map): Add entry for BFD_RELOC_64.
1510         (mips_elf_relocate_section): Handle R_MIPS_64.
1511
1512         * linker.c (default_indirect_link_order): Print an error message
1513         when attempting to do a relocateable link with different object
1514         file formats, rather than calling abort.
1515
1516 Thu Oct 17 10:43:29 1996  Doug Evans  <dje@canuck.cygnus.com>
1517
1518         * reloc.c (m32r relocs): Rename them.
1519         * bfd-in2.h, libbfd.h: Regenerated.
1520         * elf32-m32r.c: Update.
1521         (m32r_elf_10_pcrel_reloc): New function.
1522         (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
1523         (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
1524
1525 Wed Oct 16 11:24:35 1996  Jeffrey A Law  (law@cygnus.com)
1526
1527         * linker.c (_bfd_generic_final_link): Set "linker_mark" for
1528         all sections that will be included in the output file.
1529         (_bfd_generic_link_output_symbols): Discard symbols in sections
1530         which are being discarded.
1531
1532 start-sanitize-v850
1533
1534         * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
1535         R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
1536         (elf_v850_howto_table): Corresponding changes.
1537         (elf_v850_reloc_map): Corresponding changes.
1538         * reloc.c: Add additional V850 relocations.
1539         * bfd-in2.h, libbfd.h: Rebuilt.
1540
1541         * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
1542         no longer want in pc-relative relocs.
1543
1544 Tue Oct 15 22:17:37 1996  Jeffrey A Law  (law@cygnus.com)
1545
1546         * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
1547         accept a reloc against an undefined sybmol!
1548
1549 Tue Oct 15 16:17:28 1996  Stu Grossman  (grossman@critters.cygnus.com)
1550
1551         * elf32-v850.c:  Define elf_symbol_leading_char to be '_'.
1552
1553 end-sanitize-v850
1554 Tue Oct 15 12:40:41 1996  Ian Lance Taylor  <ian@cygnus.com>
1555
1556         * VERSION: Bump for new relocation.
1557
1558         * hosts/i386bsd.h: If NBPG is not defined, define it as
1559         PAGE_SIZE, for recent versions of FreeBSD.
1560
1561 Mon Oct 14 12:37:26 1996  Ian Lance Taylor  <ian@cygnus.com>
1562
1563         * configure.host: Use `long long' as the 64 bit type on a Solaris
1564         host, since both gcc and the SunPRO compilers support it.
1565
1566 Mon Oct 14 11:17:24 1996  Richard Henderson  <rth@tamu.edu>
1567
1568         * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL.  It was a 
1569         mistake to have reused the ECOFF LITERAL for ELF since they have
1570         different semantics.
1571         * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
1572         * bfd-in2.h, libbfd.h: Rebuild.
1573
1574         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
1575         section overflow.
1576
1577         * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
1578         dynamic relocation for an undefweak symbol when we are building
1579         a static executable.
1580
1581 Thu Oct 10 11:15:06 1996  Stan Shebs  <shebs@andros.cygnus.com>
1582
1583         * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
1584         point explicitly to srcdir.
1585         (targmatch.h): Edit references to point explicitly to objdir.
1586
1587 Thu Oct 10 14:14:23 1996  Ian Lance Taylor  <ian@cygnus.com>
1588
1589         * config.bfd: When setting targ_cpu, don't get confused by
1590         linux-gnu.
1591
1592 Tue Oct  8 08:51:19 1996  Stu Grossman  (grossman@critters.cygnus.com)
1593
1594         * configure.host:  Add support for windows host (a build done
1595         under the Microsoft build environment).
1596
1597 Tue Oct  8 11:40:16 1996  Ian Lance Taylor  <ian@cygnus.com>
1598
1599         * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
1600         definition in a dynamic object, add it to the dynamic symbol table
1601         if any dynamic object mentions it.  Reverts part of last patch.
1602
1603         * sunos.c (struct sunos_link_hash_table): Add got_base field.
1604         (sunos_link_hash_table_create): Initialize got_base.
1605         (bfd_sunos_size_dynamic_sections): If the .got section is more
1606         than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
1607         0x1000.
1608         (sunos_check_dynamic_reloc): Subtract got_base from a base
1609         relative relocation.
1610
1611         * elf32-mips.c (elf_mips_isa): New static function.
1612         (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
1613         -mips1 and -mips2 code together, or -mips3 and -mips4 code.
1614
1615 Mon Oct  7 11:44:17 1996  Ian Lance Taylor  <ian@cygnus.com>
1616
1617         * archive.c (do_slurp_coff_armap): Only treat archive as little
1618         endian for i960 COFF.
1619
1620 Fri Oct  4 13:49:01 1996  Ian Lance Taylor  <ian@cygnus.com>
1621
1622         * coffcode.h (coff_compute_section_file_positions): Adjust sofar
1623         by the change in size of the section when EXEC_P is not set.
1624
1625         * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
1626         (m68kcoff_rtype_to_howto): New static function.
1627         * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
1628         VMA to the addend for a PC relative reloc.
1629
1630         * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
1631         HP/UX 10.20.
1632         * Makefile.in: Rebuild dependencies.
1633
1634         * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
1635         som.h is included.
1636
1637 Fri Oct  4 11:41:39 1996  Jeffrey A Law  (law@cygnus.com)
1638
1639         * Makefile.in: Remove explicit dependencies for mn10200 and
1640         mn10300 files.
1641         (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
1642         (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
1643         (dependencies): Rebuilt.
1644
1645 Thu Oct  3 16:57:51 1996  Ian Lance Taylor  <ian@cygnus.com>
1646
1647         * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
1648         during this function.
1649
1650         * elflink.c (_bfd_elf_create_linker_section): Only use an existing
1651         section if the flags are compatible.
1652
1653         * configure.in: Add havevecs, and put it in tdefaults.
1654         * mpw-config.in: Likewise.
1655         * configure: Rebuild.
1656         * targmatch.sed: New file; a sed script to build targmatch.h from
1657         config.bfd.
1658         * config.bfd: Add #if, #endif, and comments for targmatch.h.
1659         * targets.c: Include "fnmatch.h".
1660         (struct targmatch): Define.
1661         (bfd_target_match): Define by including targmatch.h.
1662         (bfd_find_target): If the target is not found by name, search for
1663         it as a configuration triplet.
1664         * Makefile.in: Rebuild dependencies.
1665         (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
1666         i386dynix.o, m68k4knetbsd.o, and riscix.o.
1667         (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
1668         hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
1669         (HFILES): Add targmatch.h.  Also, alphabetize and reindent.
1670         (CFILES): Remove i386dynix.c and hp300bsd.c.
1671         (targmatch.h): New target.
1672         (do_clean): Remove targmatch.h.
1673
1674         * configure.in: Add BFD_NEED_DECLARATION(getenv).
1675         * acconfig.h: Add NEED_DECLARATION_GETENV.
1676         * configure, config.in: Rebuild.
1677         * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
1678         * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
1679
1680 Thu Oct  3 09:29:09 1996  Jeffrey A Law  (law@cygnus.com)
1681
1682         * cpu-mn10x00.c, elf32-mn10x00: Removed.
1683         * cpu-mn10200.c, cpu-mn10300.c: New files.
1684         * elf32-mn10200.c, elf32-mn10300.c: New files.
1685         * Makefile.in: Break mn10x00 support into two separate
1686         configurations, mn10200 and mn10300.
1687         * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
1688         * bfd-in2.h, configure: Rebuilt.
1689
1690 Thu Oct  3 15:38:19 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
1691
1692         * Makefile.in (do_clean): Move config.log to do_distclean.
1693
1694 Wed Oct  2 21:40:55 1996  Jeffrey A Law  (law@cygnus.com)
1695
1696         * cpu-mn10x00.c, elf32-mn10x00.c: New files.
1697         * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
1698         (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
1699         (elf32-mn10x00.o): Add dependencies.
1700         * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
1701         (bfd_mn10x00_arch): Declare.
1702         (bfd_archures_list): Add bfd_mn10x00_arch.
1703         * config.bfd: Add mn10x00-*-*.
1704         * configure.in: Add bfd_elf32_mn10x00_vec.
1705         * elf.c (prep_headers): Handle bfd_arch_mn10x00.
1706         * targets.c (bfd_elf32_mn10x00_vec): Declare.
1707         (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
1708         * bfd-in2.h, configure: Rebuilt.
1709         
1710 Wed Oct  2 15:46:45 1996  Klaus Kaempf  <kkaempf@progis.de>
1711
1712         openVMS/Alpha: Provide filename and case_hack flags via
1713         symbol table from gas.
1714         Add case_hack code for symbol output from vax/vms.
1715         * evax-alpha.c (evax_initialize): Remove filename handling,
1716         filename is provided via symbol table.
1717         (evax_get_symtab): Use local symbol count when setting up table.
1718         * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
1719         debugging.
1720         (_bfd_evax_write_egsd): Skip file name symbol.
1721         * evax-emh.c (get_vms_time_string): Local function now.
1722         (_bfd_evax_write_emh): Extract source filename and case_hack flags
1723         from symbol table.
1724         * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
1725         through _bfd_evax_case_hack_symbol.
1726         * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
1727         functions.
1728         (_bfd_evax_basename): Removed.
1729         (_bfd_get_vms_time_string): Moved to evax-emh.c.
1730         * evax.h (evax_private_data_struct): Remove filename.
1731         (flag_hash_long_names, flag_show_after_trunc,
1732         flag_no_hash_mixed_case, vms_name_mapping): New flags for
1733         vms_case_hack.
1734
1735 Wed Oct  2 12:02:02 1996  Ian Lance Taylor  <ian@cygnus.com>
1736
1737         * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
1738         (N_GETMID_NET, N_GETFLAG_NET): Likewise.
1739         (NO_SWAP_MAGIC): Don't define.
1740         (SWAP_MAGIC): Define.
1741
1742         * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
1743         no hash table entry for a global symbol.
1744
1745 Tue Oct  1 16:14:22 1996  Joel Sherrill  <joel@oarcorp.com>
1746
1747         * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
1748
1749 Tue Oct  1 12:31:39 1996  Ian Lance Taylor  <ian@cygnus.com>
1750
1751         * cofflink.c (coff_link_add_symbols): Don't override a meaningful
1752         symbol type with T_NULL.  Warn if symbol type changes.  Based on
1753         patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
1754
1755         * elflink.h (elf_link_add_object_symbols): Only put a symbol from
1756         a dynamic object in the dynamic symbol table if it is referenced
1757         or defined by a regular object.
1758
1759 start-sanitize-v850
1760 Fri Sep 27 18:41:07 1996  Stu Grossman  (grossman@critters.cygnus.com)
1761
1762         * elf32-v850.c (bfd_elf32_v850_is_local_label):  New function to
1763         remove dwarf local labels.  Shrinks binaries by a factor of 3!
1764
1765 end-sanitize-v850
1766 Mon Sep 23 13:33:00 1996  Ian Lance Taylor  <ian@cygnus.com>
1767
1768         * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
1769         by hand, rather than by calling bfd_make_section.
1770
1771 Mon Sep 23 09:23:41 1996  Doug Evans  <dje@seba.cygnus.com>
1772
1773         * reloc.c: Rename m32r relocs.
1774         * bfd-in2.h, libbfd.h: Rebuilt.
1775         * elf32-m32r.c: Update.
1776
1777 Fri Sep 20 11:43:43 1996  Ian Lance Taylor  <ian@cygnus.com>
1778
1779         * aoutx.h (aout_link_input_section_ext): When doing a relocateable
1780         link, adjust the symbol index of a base relative reloc.  Don't
1781         change the addend of a PC relative reloc if pcrel_offset is set.
1782         * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
1783         a relocateable link.
1784
1785         * reloc.c (bfd_perform_relocation): Apply the relocation even if
1786         it is zero, in case src_mask matters.
1787         (bfd_install_relocation): Likewise.
1788
1789 Thu Sep 19 11:03:06 1996  Ian Lance Taylor  <ian@cygnus.com>
1790
1791         * xcofflink.c (xcoff_link_add_symbols): Always initialize
1792         keep_syms.
1793         (_bfd_xcoff_bfd_final_link): Don't set target_index
1794         to an uninitialized value.
1795
1796 Tue Sep 17 14:18:31 1996  Ian Lance Taylor  <ian@cygnus.com>
1797
1798         * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
1799         indices, rather than crashing.
1800         (coff_slurp_reloc_table): Likewise.  Check whether the howto field
1801         is NULL.
1802         * coff-sh.c (sh_relocate_section): Check for an illegal symbol
1803         index.
1804
1805 Mon Sep 16 12:39:36 1996  Ian Lance Taylor  <ian@cygnus.com>
1806
1807         * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
1808         reloc to 0.
1809         (coff_arm_adjust_symndx): New static function.
1810         (coff_adjust_symndx): Define.
1811
1812         * srec.c (srec_scan): Accept multiple symbols on a single line.
1813         From Pascal Martin <pmartin@alsys.com>.
1814
1815         * README: New file.
1816
1817 Fri Sep 13 14:32:42 1996  Doug Evans  <dje@canuck.cygnus.com>
1818
1819         * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
1820         (sunos_merge_private_bfd_data): New function.
1821
1822 Fri Sep 13 15:50:57 1996  Ian Lance Taylor  <ian@cygnus.com>
1823
1824         * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
1825         than input BFD.
1826         (bfd_merge_private_bfd_data): Likewise.
1827         * section.c (bfd_copy_private_section_data): Likewise.
1828         * syms.c (bfd_copy_private_symbol_data): Likewise.
1829         * bfd-in2.h: Rebuild.
1830         * aout-target.h (MY_bfd_copy_private_section_data): Check that
1831         both BFD's are the right flavour.
1832         * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
1833         * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
1834         * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
1835         (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1836         * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
1837         (ppc_elf_merge_private_bfd_data): Likewise.
1838         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
1839         * peicode.h (pe_bfd_copy_private_section_data): Likewise.
1840
1841         * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
1842         R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
1843         its sanity check.
1844
1845 Thu Sep 12 11:45:57 1996  Doug Evans  <dje@seba.cygnus.com>
1846
1847         * reloc.c: Add m32r relocs.
1848         * bfd-in2.h, libbfd.h: Rebuilt.
1849         * cpu-m32r.c,elf32-m32r.c: New files.
1850
1851 Thu Sep 12 11:10:05 1996  Ian Lance Taylor  <ian@cygnus.com>
1852
1853         * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
1854
1855 Wed Sep 11 11:57:56 1996  Ian Lance Taylor  <ian@cygnus.com>
1856
1857         * tekhex.c (first_phase): Change type parameter from char to int.
1858         (out): Likewise.
1859         (pass_over): Change func to expect int, not char.
1860
1861         * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
1862         rather than SEC_LOAD when aligning the file offset for the first
1863         section in a segment.
1864
1865 Tue Sep 10 16:18:30 1996  Fred Fish  <fnf@cygnus.com>
1866
1867         * syms.c (coff_section_type): Make arg const.
1868         * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
1869         to make_bfd_asection().
1870         * elf-bfd.h (bfd_section_from_phdr): Add prototype.
1871         * elfcode.h (bfd_section_from_phdr): Remove prototype.
1872         (_bfd_elf_stringtab_init): Remove prototype.
1873
1874         * netbsd-core.c (swap_abort): Add prototype.
1875         * aix386-core.c (swap_abort): Ditto & make static
1876         * hpux-core.c (swap_abort): Ditto & make static.
1877         * irix-core.c (swap_abort): Ditto & make static.
1878         * ptrace-core.c (swap_abort): Ditto & make static.
1879         * trad-core.c (swap_abort): Ditto & make static.
1880         * coffswap.h (coff_swap_reloc_in): Ditto.
1881         (coff_swap_reloc_out): Ditto.
1882         (coff_swap_filehdr_in): Ditto.
1883         (coff_swap_filehdr_out): Ditto.
1884         (coff_swap_sym_in): Ditto.
1885         (coff_swap_sym_out): Ditto.
1886         (coff_swap_aux_in): Ditto.
1887         (coff_swap_aux_out): Ditto.
1888         (coff_swap_lineno_in): Ditto.
1889         (coff_swap_lineno_out): Ditto.
1890         (coff_swap_aouthdr_in): Ditto.
1891         (coff_swap_aouthdr_out): Ditto.
1892         (coff_swap_scnhdr_in): Ditto.
1893         (coff_swap_scnhdr_out): Ditto.
1894         * ihex.c (ihex_sizeof_headers): Ditto.
1895         * tekhex.c (getsym): Ditto.
1896         (find_chunk): Ditto & make static.
1897         (insert_byte): Ditto.
1898         (first_phase): Ditto.
1899         (pass_over): Ditto.
1900         (tekhex_get_symtab): Ditto & make static.
1901         (tekhex_get_symtab_upper_bound): Ditto & make static.
1902         (tekhex_mkobject): Ditto.
1903         (tekhex_object_p): Ditto.
1904         (move_section_contents): Ditto.
1905         (tekhex_get_section_contents): Ditto.
1906         (tekhex_set_arch_mach): Ditto & make static.
1907         (tekhex_set_section_contents): Ditto.
1908         (writevalue): Ditto.
1909         (writesym): Ditto.
1910         (out): Ditto.
1911         (tekhex_write_object_contents): Ditto.
1912         (tekhex_sizeof_headers): Ditto.
1913         (tekhex_make_empty_symbol): Ditto.
1914         (tekhex_get_symbol_info): Ditto.
1915         (tekhex_print_symbol): Ditto.
1916         * irix-core.c (make_bfd_asection): Ditto.
1917         (irix_core_core_file_p): Ditto.
1918         (irix_core_core_file_failing_command): Ditto.
1919         (irix_core_core_file_failing_signal): Ditto.
1920         (irix_core_core_file_matches_executable_p): Ditto.
1921         (irix_core_make_empty_symbol): Ditto.
1922         * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
1923         * srec.c (srec_new_symbol): Ditto.
1924         (srec_get_section_contents): Ditto.
1925         (srec_set_arch_mach): Ditto.
1926         (srec_set_section_contents): Ditto.
1927         (internal_srec_write_object_contents): Ditto.
1928         (srec_write_object_contents): Ditto.
1929         (symbolsrec_write_object_contents): Ditto.
1930         (srec_sizeof_headers): Ditto.
1931         (srec_make_empty_symbol): Ditto.
1932         (srec_get_symtab_upper_bound): Ditto.
1933         (srec_get_symtab): Ditto.
1934         (srec_print_symbol): Ditto and make static.
1935         * elf.c (elf_read): Ditto
1936         (assign_section_numbers): Ditto.
1937         (elf_fake_sections): Ditto.
1938         (sym_is_global): Ditto.
1939         (elf_map_symbols): Ditto.
1940         (get_program_header_size): Ditto.
1941         * coffgen.c (make_a_section_from_file): Ditto.
1942         (coff_real_object_p): Ditto.
1943         (fixup_symbol_value): Ditto.
1944         (build_debug_section): Ditto.
1945         (copy_name): Ditto.
1946         * syms.c (coff_section_type): Ditto.
1947         
1948 Mon Sep  9 22:36:01 1996  Jeffrey A Law  (law@cygnus.com)
1949
1950         * bfd-in2.h: Rebuilt after m32r changes.
1951
1952 Mon Sep  9 12:31:22 1996  Doug Evans  <dje@canuck.cygnus.com>
1953
1954         * config.bfd,configure.in,configure: Add m32r support.
1955         * Makefile.in,archures.c,elf.c,targets.c: Likewise.
1956         * config.bfd: Keep target list alphabetically sorted.
1957
1958 start-sanitize-v850
1959 Mon Sep  9 11:48:41 1996  Jeffrey A Law  (law@cygnus.com)
1960
1961         * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
1962         to add in the constant part found in the instruction itself.
1963         (case R_V850_HI16_S): Likewise.
1964
1965 end-sanitize-v850 
1966 Fri Sep  6 17:04:39 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
1967
1968         * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
1969         and R_D10V_18 to be 1 (word).
1970
1971 Thu Sep  5 15:23:08 1996  Ian Lance Taylor  <ian@cygnus.com>
1972
1973         * stabs.c (_bfd_link_section_stabs): If the output_section field
1974         of either section is bfd_abs_section, then the linker is
1975         discarding the section and we should not optimize it.
1976
1977 Tue Sep  3 12:16:20 1996  Doug Evans  <dje@canuck.cygnus.com>
1978
1979         * Makefile.in (aout-sparcle.o): New target.
1980         * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
1981         * config.bfd (sparclet-*-aout*): Add case.
1982         * configure.in (sparcle_aout_vec): Add case.
1983         * configure: Regenerated.
1984         * targets.c (sparcle_aout_vec): Declare.
1985         (bfd_target_vector): Add sparcle_aout_vec.
1986         * aout-sparcle.c: New file.
1987
1988 start-sanitize-v850
1989 Tue Sep  3 00:57:02 1996  Jeffrey A Law  (law@cygnus.com)
1990
1991         * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
1992         low order sign bit propogation for R_V850_HI16_S.
1993
1994         * elf32-v850.c (bfd_elf32_v850_reloc): New function for
1995         handling V850 specific relocs.
1996         (elf_v850_howto_table): Use the new function for some
1997         relocations.  Twiddle masks & shifts for some relocs.
1998         Set partial_inplace where needed.
1999
2000 end-sanitize-v850
2001 Mon Sep  2 12:12:34 1996  Ian Lance Taylor  <ian@cygnus.com>
2002
2003         * cpu-mips.c: Add an explicit mips:3000 entry, and change the
2004         default architecture to a machine number of 0.
2005         * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
2006         for E_MIPS_ARCH_1.
2007         (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
2008         the output BFD is the default, set it from the first input BFD.
2009
2010 start-sanitize-v850
2011 Sun Sep  1 18:38:01 1996  Jeffrey A Law  (law@cygnus.com)
2012
2013         * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
2014         insert at bitpos zero.  The HI16 relocs are shifted right
2015         by 16 bits.  Fix src_mask for all relocs.
2016         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define.  The V850 is
2017         little endian!
2018         (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove.  The V850 is little
2019         endian!
2020
2021 end-sanitize-v850
2022 Sun Sep  1 15:41:08 1996  Ian Lance Taylor  <ian@cygnus.com>
2023
2024         * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
2025         Rewrite to use BFD file read routines and to avoid using a fixed
2026         length for the file name.
2027
2028 start-sanitize-v850
2029 Sat Aug 31 10:22:25 1996  Jeffrey A Law  (law@cygnus.com)
2030
2031         * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
2032         (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
2033         (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
2034         to R_V850_{32,16,8}.
2035
2036 Fri Aug 30 18:06:04 1996  J.T. Conklin  <jtc@hippo.cygnus.com>
2037
2038         * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
2039         (elf_v850_howto_table): Add info for HI16_S reloc.
2040         (v850_reloc_map): Add HI_16_S reloc.
2041         * reloc.c: Define BFD_RELOC_V850_* relocs.
2042
2043 end-sanitize-v850
2044 Fri Aug 30 11:49:19 1996  Ian Lance Taylor  <ian@cygnus.com>
2045
2046         Add SH ELF support.
2047         * elf32-sh.c: New file.
2048         * elf.c (prep_headers): Handle bfd_arch_sh.
2049         * elfcode.h (write_relocs): Handle absolute symbol.
2050         * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
2051         (_bfd_elf64_link_read_relocs): Declare.
2052         * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
2053         elf_link_read_relocs.  Make globally visible.  Change all
2054         callers.
2055         (elf_link_input_bfd): Get external symbols from cache in
2056         symtab_hdr->contents.  Get contents from cache in
2057         elf_section_data.
2058         * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
2059         already defined.
2060         * reloc.c: Define BFD_RELOC_SH_* relocs.
2061         * libbfd-in.h (_bfd_sh_align_load_span): Declare.
2062         * coff-sh.c (sh_insns_conflict): Fix a return value.
2063         (_bfd_sh_align_load_span): New globally visible function, broken
2064         out of sh_align_load.
2065         (sh_align_load): Call _bfd_sh_align_load_span.
2066         (sh_swap_insns): Change relocs parameter to PTR.
2067         * bfd-in2.h, libbfd.h: Rebuild.
2068         * targets.c (bfd_elf32_sh_vec): Declare.
2069         (bfd_elf32_shl_vec): Declare.
2070         * config.bfd (sh-*-elf*): New target.
2071         * configure.in (bfd_elf32_sh_vec): New target vector.
2072         (bfd_elf32_shl_vec): New target vector.
2073         * configure: Rebuild.
2074         * Makefile.in: Rebuild dependencies.
2075         (BFD32_BACKENDS): Add elf32-sh.o.
2076         (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
2077
2078         * elf.c (map_sections_to_segments): Check that LMA does not skip a
2079         page before checking D_PAGED.
2080
2081         * ihex.c (ihex_scan): Removed unnecessary extbase variable.
2082         (ihex_write_object_contents): Remove extbase; always use segbase
2083         instead.
2084
2085 Thu Aug 29 16:52:17 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2086
2087         * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
2088         * configure.host (i[345]86-*-*): Ditto.
2089         * config.bfd (i[345]86-*-*): Ditto.
2090         * configure: Regenerate.
2091
2092         * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
2093         elf.
2094
2095 Tue Aug 27 09:18:18 1996  Jeffrey A Law  (law@cygnus.com)
2096
2097         * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
2098         * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
2099         * som.c (hppa_som_gen_reloc_type): Add new argument.  If
2100         we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
2101         will have an ST_CODE type, change the symbol's type to ST_DATA.
2102         * som.c (hppa_som_gen_reloc_type): Update prototype.
2103
2104 Tue Aug 27 00:12:22 1996  Ian Lance Taylor  <ian@cygnus.com>
2105
2106         * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
2107         R_MIPS_32 and R_MIPS_REL32.  Set sgot and g as soon as possible.
2108         (mips_elf_size_dynamic_sections): Don't require .got to exist.
2109         (mips_elf_finish_dynamic_sections): Likewise.
2110
2111 Thu Aug 22 10:54:38 1996  Ian Lance Taylor  <ian@cygnus.com>
2112
2113         * configure.host (HLDENV): New variable to set.  Set it for
2114         *-*-sysv4*, since those linkers may not support -R but they always
2115         support LD_RUN_PATH.
2116
2117         * libieee.h (NSECTIONS): Don't define.
2118         (ieee_data_struct): Change section_table to asection **.  Add
2119         section_table_size.
2120         * ieee.c (get_section_entry): If the table isn't big enough, make
2121         it bigger.
2122         (ieee_slurp_sections): Remove assertion about number of sections.
2123         (ieee_object_p): Adjust initialization of ieee to match changes to
2124         the structure.
2125
2126         * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
2127         symbols merely because we are generating a shared library.
2128         (xcoff_build_ldsyms): Don't set up global linkage code for an
2129         undefined symbol merely because we are generating a shared
2130         library.
2131
2132 start-sanitize-v850
2133 Tue Aug 20 15:06:05 1996  J.T. Conklin  <jtc@hippo.cygnus.com>
2134         
2135         * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
2136         (BFD32_BACKENDS) Add elf32-v850.o.
2137         * archures.c: Add bfd_v850_arch.
2138         * bfd-in2.h: Add bfd_v850_arch.
2139         * config.bfd (v850-*-*): New target.
2140         * configure: (bfd_elf32_v850_vec) New vector.
2141         * configure.in: (bfd_elf32_v850_vec) New vector.
2142         * cpu-v850.c: New file.
2143         * elf.c (prep_headers): Added case bfd_arch_v850.
2144         * elf32-v850.c: New file.
2145         * targets.c (bfd_elf32_v850_vec): New vector.
2146         
2147 end-sanitize-v850
2148 Fri Aug 16 16:25:35 1996  Ian Lance Taylor  <ian@cygnus.com>
2149
2150         * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
2151         a function code symbol for an XMC_XO symbol.
2152
2153 Thu Aug 15 12:33:29 1996  Stan Shebs  <shebs@andros.cygnus.com>
2154
2155         * mpw-config.in: Update editing of autoconf vars to reflect
2156         Jul 18 configure.in change.
2157         * mpw-make.sed: Update editing of include pathnames to be
2158         more general, add @DASH_C_FLAG@ to explicit compile rule edit.
2159
2160 Thu Aug 15 10:35:13 1996  Richard Henderson  <rth@tamu.edu>
2161
2162         * elf64-alpha.c (elf64_alpha_output_extsym): The section from
2163         which to offset to get the .plt entry address is ".plt".
2164
2165 Thu Aug 15 16:40:30 1996  James G. Smith  <jsmith@cygnus.co.uk>
2166
2167         * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
2168         BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
2169         Added, for internal use by the ARM gas.
2170         * libbfd.h: Rebuilt
2171         * bfd-in2.h: Rebuilt
2172
2173 Wed Aug 14 17:02:09 1996  Richard Henderson  <rth@tamu.edu>
2174
2175         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
2176         in section dynidx start.
2177
2178 Tue Aug 13 14:35:38 1996  Ian Lance Taylor  <ian@cygnus.com>
2179
2180         * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
2181         name begins with .gnu.linkonce as SEC_LINK_ONCE.  This is an
2182         optimization for g++.
2183
2184 Tue Aug 13 17:04:40 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2185
2186         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
2187         the -mrelocatable-lib bit set and the other doesn't, clear the
2188         -mrelocatable-lib bit in the header.
2189
2190 Sat Aug 10 22:59:17 1996  Ian Lance Taylor  <ian@cygnus.com>
2191
2192         * elflink.h (elf_link_add_object_symbols): Do not resolve a common
2193         symbol against a STT_FUNC symbol in a shared library.
2194
2195 Fri Aug  9 12:44:57 1996  Ian Lance Taylor  <ian@cygnus.com>
2196
2197         * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
2198         symbol is found, automatically define the corresponding function
2199         code.
2200
2201         * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
2202         if sym.n_numaux is not zero.
2203         (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
2204         entry to disagree about the number of aux entries if the symbol
2205         has zero.
2206
2207         * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
2208         section if it might be needed, not just if info->shared.
2209         (mips_elf_adjust_dynamic_symbol): Make room for a null element at
2210         the start of .rel.dyn if we are going to use it.
2211         (mips_elf_finish_dynamic_sections): Only clear the first element
2212         of .rel.dyn if the size is greater than zero.
2213
2214 Thu Aug  8 16:24:55 1996  Ian Lance Taylor  <ian@cygnus.com>
2215
2216         * xcofflink.c (xcoff_link_input_bfd): If we already called the
2217         undefined_symbol callback for a symbol, then don't issue any more
2218         warnings about loader relocs.
2219         (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
2220         after calling the undefined_symbol callback.
2221
2222         * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
2223         (xcoff_link_add_symbols): Permit multiple definitions of a symbol
2224         as the AIX linker seems to do.
2225
2226 Thu Aug  8 12:21:56 1996  Klaus Kaempf  <kkaempf@progis.de>
2227
2228         * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
2229         (evax_initialize): Remove evax_reloc_table.
2230         (evax_close_and_cleanup): Ditto.
2231         (reloc_nil): Ditto.
2232         (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
2233         entries.
2234         (evax_bfd_reloc_type_lookup): Ditto.
2235         * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
2236         cooked_size == raw_size.
2237         * evax-emh.c (_bfd_evax_register_filename): Remove.
2238         * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
2239         * evax-misc.c (add_new_contents): Malloc section at full size.
2240         (_bfd_save_evax_section): Memcpy section contents directly.
2241         * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
2242         (evax_reloc_table): Remove.
2243
2244         * hosts/alphavms.h (O_ACCMODE): Define if needed.
2245
2246         * makefile.vms: Add better support for DEC C compilation
2247         Add evax.h dependencies
2248
2249         * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
2250         (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
2251         (BFD_RELOC_ALPHA_BASEREG): Remove.
2252         * bfd-in2.h, libbfd.h: Rebuild.
2253
2254 Thu Aug  8 08:17:32 1996  Stu Grossman  (grossman@critters.cygnus.com)
2255
2256         * archive.c (bsd_write_armap):  Ifdef around calls to getuid and
2257         getgid if _WIN32 is defined.
2258         * opncls.c (bfd_fdopenr):  Remove unnecessary WINGDB ifdef.
2259
2260 Wed Aug  7 23:19:00 1996  Stu Grossman  (grossman@critters.cygnus.com)
2261
2262         * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
2263         Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
2264         include file.
2265         * libbfd.c:  Create dummy getpagesize() macro if HAVE_GETPAGESIZE
2266         isn't defined.
2267
2268 Wed Aug  7 14:11:44 1996  Philippe De Muyter  <phdm@info.ucl.ac.be>
2269
2270         * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
2271         realloc.
2272         * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
2273         (NEED_DECLARATION_REALLOC): New macro.
2274         * configure, config.in: Rebuild.
2275         * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
2276         (realloc): Declare if NEED_DECLARATION_REALLOC.
2277
2278         * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
2279         <strings.h> if they exist.
2280
2281         * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
2282
2283 Wed Aug  7 12:12:03 1996  Ian Lance Taylor  <ian@cygnus.com>
2284
2285         * cpu-i386.c (i8086_arch): Architecture info for the i8086.
2286
2287         Based on patches from Eric Valette <valette@crf.canon.fr>:
2288         * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
2289         LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
2290         (elf_howto_table): Add entries for new relocs.
2291         (elf_i386_reloc_type_lookup): Handle new relocs.
2292         (elf_i386_info_to_howto): Just call abort.
2293         (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
2294         (elf_i386_relocate_section): Likewise.
2295
2296 Tue Aug  6 12:54:56 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
2297
2298         * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
2299
2300 Mon Aug  5 13:42:41 1996  Ian Lance Taylor  <ian@cygnus.com>
2301
2302         * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
2303         only get the LMA from the phdr if they are in the same part of the
2304         file.
2305
2306         * elf.c (map_sections_to_segments): Rewrite tests for starting a
2307         new segment to make them more comprehensible.  If the relationship
2308         between the LMA and the VMA changed, start a new segment.  Don't
2309         check dynsec when deciding whether to start a new segment for a
2310         writeable section; -N will now handle this.
2311
2312 Thu Aug  1 22:43:08 1996  Jeffrey A Law  (law@cygnus.com)
2313
2314         * libhppa.h: Remove "esel" changes.  Not the right approach.
2315         * som.c: Corresponding changes.
2316         (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
2317         which don't have a SOM symbol type associated with them.
2318         Reverses a 1994 change.
2319
2320 Wed Jul 31 15:50:55 1996  Ian Lance Taylor  <ian@cygnus.com>
2321
2322         Make ld -N more reasonable for ELF:
2323         * elf.c (map_sections_to_segments): If D_PAGED is not set, set
2324         phdr_in_section to false, and always use a single load segment.
2325         (elf_sort_sections): Sort sections by LMA after VMA.
2326         (assign_file_positions_for_segments): If D_PAGED is not set, don't
2327         align to maxpagesize.
2328         (assign_file_positions_except_relocs): Likewise.
2329         * elfcode.h (elf_object_p): If a section is loaded but not page
2330         aligned, clear D_PAGED.
2331
2332 Wed Jul 31 15:00:12 1996  James G. Smith  <jsmith@cygnus.co.uk>
2333
2334         * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
2335         Added, for internal use by the ARM gas.
2336         * libbfd.h: Rebuilt
2337         * bfd-in2.h: Rebuilt
2338
2339 Tue Jul 30 14:14:57 1996  Jeffrey A Law  (law@cygnus.com)
2340
2341         * libhppa.h (R_HPPA_ESEL): New field selector.
2342         (e_esel): Similarly.
2343         * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
2344         then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
2345         (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
2346
2347 Tue Jul 30 13:31:27 1996  Ian Lance Taylor  <ian@cygnus.com>
2348
2349         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
2350         archive search before looking for stripped dynamic objects.
2351
2352 Fri Jul 26 17:51:39 1996  Ian Lance Taylor  <ian@cygnus.com>
2353
2354         * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
2355         symbol a warning rather than an error.
2356
2357 Wed Jul 24 12:02:53 1996  Ian Lance Taylor  <ian@cygnus.com>
2358
2359         * elf.c (assign_file_positions_for_segments): Track the virtual
2360         memory position separately from the file position, and use it to
2361         compute the alignment adjustment.
2362
2363 Tue Jul 23 10:43:31 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
2364
2365         * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
2366         and fixed mask on R_D10V_10_PCREL_L.
2367
2368 Mon Jul 22 15:30:30 1996  Ian Lance Taylor  <ian@cygnus.com>
2369
2370         * elf64-mips.c: Include "aout/ar.h".
2371         (mips_elf64_slurp_armap): New static function.
2372         (mips_elf64_write_armap): New static function.
2373         (bfd_elf64_archive_*): Define.
2374         * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
2375         Use instead of bfd_generic_archive_p.
2376         (bfd_elfNN_write_archive_contents): Define if not defined.  Use
2377         instead of _bfd_write_archive_contents.
2378         (bfd_elfNN_mkdarchive): Define if not defined.  Use instead of
2379         _bfd_generic_mkarchive.
2380         (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
2381         bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
2382         _bfd_archive_coff.
2383         (TARGET_LITTLE_SYM): Likewise.
2384         * archive.c (bfd_slurp_armap): Check for and reject an archive map
2385         name of /SYM64/.
2386         * Makefile.in: Rebuild dependencies.
2387
2388         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
2389         SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
2390         SHT_MIPS_EVENTS sections.
2391         (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
2392         SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
2393         sections.
2394         (_bfd_mips_elf_fake_sections): Likewise.
2395
2396         * libecoff.h (ecoff_data_type): Add rdata_in_text field.
2397         * ecoff.c (ecoff_compute_section_file_positions): Copy
2398         rdata_in_text from backend info to tdata.  Clear it if any data
2399         section comes before .rdata.
2400         (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
2401         tdata rather than backend info.
2402
2403 Fri Jul 19 18:15:51 1996  Ian Lance Taylor  <ian@cygnus.com>
2404
2405         * configure.in: Fix test for whether a compiler has a 64 bit
2406         type.  From Jim Wilson <wilson@cygnus.com>.
2407
2408 Thu Jul 18 15:39:10 1996  Ian Lance Taylor  <ian@cygnus.com>
2409
2410         * configure.host (mips-sgi-irix6*): New host.
2411
2412         * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
2413         (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
2414         BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT.  Add bfd-in2.h:bfd-in2.h
2415         to AC_OUTPUT call.
2416         * configure: Rebuild.
2417         * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
2418         (BFD_HOST_64_BIT): Define conditionally.
2419         (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
2420         (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
2421         (symvalue, bfd_size_type): Likewise.
2422         * bfd-in2.h: Rebuild.
2423         * Makefile.in (do_clean): Remove bfd-tmp.h.
2424         (do_distclean): Remove bfd-in3.h.
2425         (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
2426         (bfd-in3.h): New target.
2427
2428         * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec.  From
2429         Andrew Gierth <ANDREWG@microlise.co.uk>.
2430
2431         * configure.host: Set INSTALL_SHLIB.
2432         * configure.in: Call AC_SUBST (INSTALL_SHLIB).
2433         * configure: Rebuild.
2434         * Makefile.in (install): Use @INSTALL_SHLIB@.
2435
2436         * config.bfd (mips*-*-irix6*): New target.
2437         * configure.host: Handle Irix 6 shared library like Irix 5.
2438
2439         * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
2440         symbol for a magic name.
2441         (xcoff_link_input_bfd): Don't change the reloc symbol for an
2442         XMC_TD symbol.
2443         (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
2444         XMC_TD symbol.
2445
2446 Thu Jul 18 11:36:31 1996  Stan Shebs  <shebs@andros.cygnus.com>
2447
2448         * mpw-config.in: Add ELF support to mips config, create the
2449         elf32-target.h file in the object dir.
2450         * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
2451
2452 Wed Jul 17 18:02:32 1996  Kim Knuttila  <krk@cygnus.com>
2453
2454         * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
2455         Also removed most abort calls, in favor of using bfd reporting.
2456
2457 Wed Jul 17 14:51:52 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
2458
2459         * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
2460         (BFD32_BACKENDS) Add elf32-d10v.o.
2461         * archures.c: Add bfd_d10v_arch.
2462         * bfd-in2.h: Add bfd_d10v_arch.
2463         * config.bfd (d10v-*-*): New target.
2464         * configure: (bfd_elf32_d10v_vec) New vector.
2465         * configure.in: (bfd_elf32_d10v_vec) New vector.
2466         * cpu-d10v.c: New file.
2467         * elf.c (prep_headers): Added case bfd_arch_d10v.
2468         * elf32-d10v.c: New file.
2469         * libbfd.h: Rebuild.
2470         * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
2471         BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
2472         * targets.c (bfd_elf32_d10v_vec): New vector.
2473         
2474 Wed Jul 17 10:58:55 1996  Kim Knuttila  <krk@cygnus.com>
2475
2476         * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
2477
2478 Tue Jul 16 23:49:02 1996  Stu Grossman  (grossman@critters.cygnus.com)
2479
2480         * archures.c bfd-in2.h:  Add bfd_mach_i386_i386 and
2481         bfd_mach_i386_i8086 machine types.
2482
2483 Wed Jul 10 12:42:56 1996  Ian Lance Taylor  <ian@cygnus.com>
2484
2485         * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
2486         and _FINI sections.
2487
2488 Wed Jul 10 11:18:21 1996  Richard Henderson  <rth@tamu.edu>
2489
2490         * coffcode.h (coff_set_section_contents): A/UX does not require
2491         special handling of the _LIB section.
2492
2493 Tue Jul  9 15:52:20 1996  Jeffrey A Law  (law@cygnus.com)
2494
2495         * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
2496         value for R_RELBYTE.
2497
2498         * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
2499         array if one was allocated.
2500
2501 Tue Jul  9 12:21:54 1996  Ian Lance Taylor  <ian@cygnus.com>
2502
2503         From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
2504         * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
2505         use_rld_obj_head and rld_value.
2506         (mips_elf_link_hash_table_create): Initialize new fields.
2507         (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
2508         dynamic.
2509         (mips_elf_create_dynamic_sections): Create .rld_map section.  If
2510         __rld_obj_head symbol not seen, create an __rld_map symbol.
2511         (mips_elf_size_dynamic_sections): Make space in .rld_map section.
2512         Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
2513         (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
2514         __rld_obj_head symbol.
2515         (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
2516
2517 Mon Jul  8 16:18:03 1996  Ian Lance Taylor  <ian@cygnus.com>
2518
2519         * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
2520
2521         * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
2522         ppc_elf_addr16_ha_reloc.
2523         (ppc_elf_addr16_ha_reloc): New static function.
2524
2525         * coff-mips.c (struct mips_hi): Define.
2526         (mips_refhi_list): New static variable.
2527         (mips_refhi_addr, mips_refhi_addend): Remove.
2528         (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
2529         (mips_reflo_reloc): Process mips_refhi_list.
2530         (mips_relhi_list): New static variable.
2531         (mips_relhi_addr, mips_relhi_addend): Remove.
2532         (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
2533         (mips_rello_reloc): Process mips_relhi_list.
2534         (mips_relocate_section): Permit an arbitrary number of REFHI or
2535         RELHI relocs before the associated REFLO or RELLO reloc.
2536
2537 Fri Jul  5 19:27:49 1996  Ian Lance Taylor  <ian@cygnus.com>
2538
2539         * aout-target.h (MY(callback)): Set reloc_count fields.
2540
2541 Thu Jul  4 12:00:37 1996  Ian Lance Taylor  <ian@cygnus.com>
2542
2543         * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
2544         sections unless this is a SunOS link.
2545
2546         * VERSION: Set to 2.7.1.
2547
2548         * Released binutils 2.7.
2549
2550 Wed Jul  3 14:59:47 1996  Ian Lance Taylor  <ian@cygnus.com>
2551
2552         * i386aout.c: Include "aout/aout64.h".
2553         (i386aout_write_object_contents): New static function.
2554         (MY_write_object_contents): Define.
2555
2556         * netbsd.h (MY(write_object_contents)): Make sure that
2557         adjust_sizes_and_vmas is called before fiddling with the magic
2558         number.
2559
2560 Tue Jul  2 23:30:39 1996  Ian Lance Taylor  <ian@cygnus.com>
2561
2562         * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
2563
2564 Sun Jun 30 13:34:33 1996  Ian Lance Taylor  <ian@cygnus.com>
2565
2566         * libbfd-in.h (itos, stoi): Don't define.
2567         * libbfd.h: Rebuild.
2568         * i386lynx.c (KEEPIT): Define as udata.i.
2569         (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
2570         (NAME(lynx,swap_ext_reloc_out)): Likewise.
2571         * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
2572         flags.  Don't use stoi.
2573
2574         * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
2575
2576         * elf.c (map_sections_to_segments): Don't start a new segment for
2577         a writable section if it's on the same page as the previous
2578         segment.  Reset the writable variable for a readonly section.
2579
2580 Sat Jun 29 16:18:51 1996  Kim Knuttila  <krk@cygnus.com>
2581
2582         * peicode.h (coff_swap_aouthdr_in): Missing initializations of
2583         first_thunk_address, thunk_size, and import_table_size.
2584         * peicode.h: Improved some diagnostics regarding edata sections.
2585
2586         * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
2587         on IMGLUE relocs.
2588         (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
2589         (TARGET_LITTLE_SYM): Added missing D_PAGED.
2590
2591 Fri Jun 28 13:48:45 1996  Ian Lance Taylor  <ian@cygnus.com>
2592
2593         * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
2594         with XCOFF_DEF_DYNAMIC set is really defined.
2595         (xcoff_link_check_dynamic_ar_symbols): Likewise.
2596         (xcoff_link_add_symbols): Only create special sections if using an
2597         XCOFF hash table.
2598
2599         * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
2600         aixcoff-rs6000.
2601         (bfd_install_relocation): Likewise.
2602
2603 Fri Jun 28 11:17:00 1996  Richard Henderson  <rth@tamu.edu>
2604
2605         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
2606         field.
2607         (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
2608         (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
2609         (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
2610         (elf64_alpha_link_hash_newfunc): Initialize flags field.
2611         (elf64_alpha_check_relocs): Record types of LITUSE entries that
2612         are found for LITERAL relocs.
2613         (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
2614         taken, we cannot generate a .plt entry for the symbol.
2615
2616 Thu Jun 27 11:24:29 1996  Ian Lance Taylor  <ian@cygnus.com>
2617
2618         * configure.in: Add AC_ISC_POSIX, and check for setitimer and
2619         sysconf functions (for gprof).
2620         * configure, config.in: Rebuild.
2621
2622 Wed Jun 26 16:29:02 1996  Ian Lance Taylor  <ian@cygnus.com>
2623
2624         * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
2625         an archive if it has a map.  If the object file has the wrong
2626         xvec, reject it.
2627
2628         * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
2629         BRADDR, SREL16, SREL32, or SREL64 reloc against an external
2630         symbol.
2631         (alpha_relocate_section): Likewise.
2632
2633         * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
2634         (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
2635         (coff_swap_sym_out): Use SYMESZ, not sizeof.
2636         (coff_swap_aux_out): Use AUXESZ, not sizeof.
2637         (coff_swap_lineno_out): Use LINESZ, not sizeof.
2638         (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
2639         (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
2640         * peicode.h: Corresponding changes.
2641
2642 Tue Jun 25 15:28:34 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2643
2644         * elflink.h (elf_create_pointer_linker_section): Comment out code
2645         dealing with making GOT pointers negative of the GOT symbol for
2646         now.
2647
2648 Tue Jun 25 11:41:24 1996  Richard Henderson  <rth@tamu.edu>
2649
2650         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
2651         increment the .rela.plt size until after we're done creating the
2652         .plt entry.
2653         (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
2654         .rela.plt offset directly rather than calculating it.
2655
2656 Mon Jun 24 17:15:10 1996  Jason Molenda  (crash@godzilla.cygnus.co.jp)
2657  
2658         * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir): 
2659         Use autoconf-set values.
2660         * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir, 
2661         includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set 
2662         values.
2663         (docdir): Deleted.
2664         * configure.in (AC_PREREQ): autoconf v2.5 or higher.
2665         * configure: Rebuilt.
2666  
2667 Mon Jun 24 22:50:35 1996  Jeffrey A Law  (law@cygnus.com)
2668
2669         * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
2670         handling code > 1k away.
2671
2672 Mon Jun 24 18:41:06 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2673
2674         * elflink.h (elf_create_pointer_linker_section): If DEBUG is
2675         defined, output whenever the symbol is updated.
2676
2677 Mon Jun 24 17:58:12 1996  Jouke Numan  <jnuman@bazis.nl>
2678
2679         * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
2680         section to 0 if user_set_vma is set.
2681         * elflink.h (elf_bfd_final_link): Likewise.
2682
2683 Sun Jun 23 20:42:51 1996  Doug Evans  <dje@canuck.cygnus.com>
2684
2685         Partially undo patch of Jun 20.
2686         * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
2687         (coff_compute_section_file_positions): Likewise.
2688         (coff_write_object_contents): Likewise.  Re-add deleted code, but
2689         use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
2690         * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
2691
2692 Fri Jun 21 17:38:15 1996  Joel Sherrill  <joel@merlin.gcs.redstone.army.mil>
2693
2694         * config.bfd: Add support for *-*-rtems* configurations.
2695         
2696 Fri Jun 21 15:19:59 1996  Ian Lance Taylor  <ian@cygnus.com>
2697
2698         * elf.c (prep_headers): Add bfd_arch_alpha case.
2699
2700 Fri Jun 21 12:35:27 1996  Richard Henderson  <rth@tamu.edu>
2701
2702         * elf64-alpha.c: New file.
2703         * config.bfd (alpha-*-linuxecoff*): New target.
2704         (alpha-*-linux*, alpha-*-elf*): New targets.
2705         * configure.in (bfd_elf64_alpha_vec): New vector.
2706         * configure: Rebuild.
2707         * targets.c (bfd_elf64_alpha_vec): Declare.
2708         (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
2709         * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
2710         * bfd-in2.h, libbfd.h: Rebuild.
2711         * Makefile.in: Rebuild dependencies.
2712         (BFD64_BACKENDS): Add elf64-alpha.o.
2713         (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
2714
2715 Thu Jun 20 18:14:25 1996  Ian Lance Taylor  <ian@cygnus.com>
2716
2717         * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
2718         than relying on a right shift of 32.
2719
2720 Thu Jun 20 11:00:57 1996  Doug Evans  <dje@canuck.cygnus.com>
2721
2722         * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
2723         ifdef to COFF_WITH_PE.
2724         (coff_compute_section_file_positions): Likewise.
2725         (coff_write_object_contents): Likewise.  Delete COFF_OBJ_WITH_PE.
2726         * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
2727         * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
2728         COFF_IMAGE_WITH_PE, always include.
2729
2730         * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
2731
2732 Wed Jun 19 11:37:52 1996  Ian Lance Taylor  <ian@cygnus.com>
2733
2734         * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
2735         approximate the correct answer if SIZEOF_HEADERS was not used.
2736
2737         * binary.c (binary_set_section_contents): Set section file
2738         position based on LMA rather than VMA.
2739
2740 Wed Jun 19 11:19:25 1996  Manfred Hollstein KS/EIC5 60/3/142 #40283  <manfred@lts.sel.alcatel.de>
2741
2742         * linker.c (_bfd_generic_link_output_symbols): Don't output any
2743         symbols if info->strip == strip_all.
2744
2745 Tue Jun 18 15:17:36 1996  Jeffrey A. Law  <law@rtl.cygnus.com>
2746
2747         * coff-h8300.c: Remove #if 0 code.
2748         (compatable): Don't allow mixing/matching of different architectures.
2749         
2750         * archures.c (bfd_mach_h8300s): Add.
2751         * bfd-in2.h: Rebuilt.
2752         * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
2753         (BADMAG): Likewise.
2754         (h8300_reloc16_estimate): Likewise.
2755         (h8300_reloc16_extra_cases): Likewise.
2756         (h8300_bfd_link_add_symbols): Likewise.
2757         * coffcode.h (coff_set_arch_mach_hook): Likewise.
2758         (coff_set_flags): Likewise.
2759         * cpu-h8300.c (h8300_scan): Likewise.
2760         Add H8/S to bfd_h8300_arch list.
2761
2762 Tue Jun 18 14:42:58 1996  Klaus Kaempf  <kkaempf@progis.de>
2763
2764         Added support for Alpha OpenVMS:
2765         * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
2766         * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
2767         * config.h-vms, makefile.vms: New files.
2768         * config.bfd (alpha-*-*vms*): New target.
2769         * configure.in (evax_alpha_vec): New target vector.
2770         * configure: Rebuild.
2771         * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
2772         (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
2773         * targets.c (bfd_target_evax_flavour): Define.
2774         (evax_alpha_vec): Declare.
2775         (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
2776         if BFD64 is defined.
2777         * bfd-in2.h, libbfd.h: Rebuild.
2778         * Makefile.in: Rebuild dependencies.
2779         (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
2780         evax-emh.o, and evax-misc.o.
2781         (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
2782         evax-etir.c, evax-emh.c, and evax-misc.c.
2783         (HFILES): Add evax.h.
2784
2785 Tue Jun 18 13:54:18 1996  Ian Lance Taylor  <ian@cygnus.com>
2786
2787         * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
2788         pointer.
2789         (h8300_bfd_link_add_symbols): Likewise.
2790
2791 Mon Jun 17 10:06:50 1996  Jeffrey A. Law  <law@rtl.cygnus.com>
2792
2793         * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
2794         * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
2795
2796 Mon Jun 17 12:49:11 1996  Ian Lance Taylor  <ian@cygnus.com>
2797
2798         * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
2799         for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
2800         created.
2801         (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
2802         R_MIPS_32 relocs if creating a shared library.
2803
2804 Thu Jun 13 20:14:51 1996  Doug Evans  <dje@canuck.cygnus.com>
2805
2806         * peicode.h (add_data_entry): Use pei_section_data rather than
2807         _cooked_size.  Corresponds to May 13 change in coffcode.h.
2808
2809 Thu Jun 13 10:23:40 1996  Ian Lance Taylor  <ian@cygnus.com>
2810
2811         * cofflink.c (_bfd_coff_final_link): Handle long section names.
2812         * coffcode.h (coff_write_object_contents): If there are long
2813         section names, always set the f_symptr field, even if there are no
2814         symbols.
2815         * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
2816         if there are no symbols.
2817
2818         * coffgen.c (make_a_section_from_file): Check return value of
2819         _bfd_coff_read_string_table.
2820         (coff_real_object_p): Check return value of
2821         make_a_section_from_file.
2822         (_bfd_coff_read_string_table): Check that there are some symbols
2823         before trying to read the string table size.
2824
2825 Wed Jun 12 11:16:37 1996  Ian Lance Taylor  <ian@cygnus.com>
2826
2827         * xcofflink.c (xcoff_link_add_symbols): When considering whether
2828         to replace a symbol in a dynamic object with a symbol from another
2829         dynamic object, do the replacement if the existing symbol is
2830         global linkage code.
2831
2832         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
2833         for _ptrgl, and treat it as global linkage code.
2834
2835         * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
2836         filename or N_SO symbol past the offset, and use it to indicate
2837         that there is no line number or function when appropriate.
2838
2839 Tue Jun 11 15:24:48 1996  Ian Lance Taylor  <ian@cygnus.com>
2840
2841         * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
2842         common symbol defined by the linker.  Don't export function code
2843         even if export_defineds is set.
2844
2845 Mon Jun 10 11:57:27 1996  Jeffrey A Law  (law@cygnus.com)
2846
2847         * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
2848         and R_JMP_DEL.
2849         (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
2850         (h8300_symbol_address_p): New function.
2851         (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
2852         relaxing.
2853
2854 Sun Jun  9 16:30:20 1996  Jeffrey A Law  (law@cygnus.com)
2855
2856         * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
2857         problems.
2858         (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
2859         correctly for the two variants.  Allow relaxing if the target
2860         is 128 bytes away since after relaxation it'll be 126 bytes away.
2861         (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
2862         "dot" and "value".  Allow relaxing if the target is 128 bytes
2863         away since after relaxation it'll be 126 bytes away.
2864         * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
2865         the given section until nothing changes.
2866
2867 Thu Jun  6 15:24:45 1996  Richard Henderson  <rth@tamu.edu>
2868
2869         * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
2870         alignment hack--we can get the lnnoptr info another way without
2871         suddenly increasing the alignment requirements.  Set the flags for
2872         the _PDATA section.
2873         (ecoff_compute_section_file_positions): Do so.
2874
2875 Thu Jun  6 11:24:37 1996  Ian Lance Taylor  <ian@cygnus.com>
2876
2877         * ieee.c (ieee_write_object_contents): Put a timestamp in the file
2878         to keep the HP emulator database happy.
2879
2880         * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
2881         From Kevin Buettner <kev@primenet.com>.
2882
2883 Wed Jun  5 15:16:04 1996  Ian Lance Taylor  <ian@cygnus.com>
2884
2885         * aoutx.h (translate_to_native_sym_flags): Don't try to print the
2886         name of a NULL section.
2887
2888 Tue Jun  4 18:53:58 1996  Ian Lance Taylor  <ian@cygnus.com>
2889
2890         * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
2891         set, always call the notice callback.
2892
2893         * VERSION: Increment for bfdlink.h change.
2894
2895 Mon Jun  3 11:01:53 1996  Ian Lance Taylor  <ian@cygnus.com>
2896
2897         * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
2898         (sh_relax_delete_bytes): Correct handling of differently sized
2899         trailing alignment reloc.
2900
2901         * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
2902         * bfd-in2.h: Rebuild.
2903         * configure.in: Warn if there is no known 64 bit type.
2904         * configure: Rebuild.
2905
2906         * Makefile.in: Rebuild dependencies.
2907         (BFD32_BACKENDS): Add ppcboot.o.
2908         (BFD32_BACKENDS_CFILES): Add ppcboot.c.
2909
2910         * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
2911         From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
2912
2913 Sat Jun  1 21:49:58 1996  Ian Lance Taylor  <ian@cygnus.com>
2914
2915         * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
2916         (bfd_mips_elf64_swap_reginfo_out): Move from here...
2917         * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
2918         (bfd_mips_elf64_swap_reginfo_out): ...to here.
2919
2920 Fri May 31 13:51:28 1996  Ian Lance Taylor  <ian@cygnus.com>
2921
2922         * elf64-mips.c: Improve reloc special_functions and handling of
2923         SHT_MIPS_OPTIONS section.
2924         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
2925         mips_elf_hi16_reloc and make globally visible.
2926         (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
2927         make globally visible.
2928         (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
2929         make globally visible.
2930         (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
2931         and make globally visible.
2932         (gprel16_with_gp): Check howto->src_mask before using value in
2933         insn.
2934         (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
2935         and make globally visible.
2936         (gprel32_with_gp): Check howto->src_mask before fetching value.
2937         (bfd_mips_elf_swap_options_in): New function.
2938         (bfd_mips_elf_swap_options_out): New function.
2939         (_bfd_mips_elf_set_private_flags): Rename from
2940         mips_elf_set_private_flags and make globally visible.
2941         (_bfd_mips_elf_copy_private_bfd_data): Rename from
2942         mips_elf_copy_private_bfd_data and make globally visible.
2943         (_bfd_mips_elf_merge_private_bfd_data): Rename from
2944         mips_elf_merge_private_bfd_data and make globally visible.
2945         (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
2946         for a SHT_MIPS_OPTIONS section.
2947         (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
2948         (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
2949         name of a SHT_MIPS_OPTIONS section.
2950         (_bfd_mips_elf_set_section_contents): New function.
2951         (mips_elf32_section_processing): Set the GP value in a
2952         SHT_MIPS_OPTIONS section.
2953         (_bfd_mips_elf_find_nearest_line): Rename from
2954         mips_elf_find_nearest_line and make globally visible.
2955         (bfd_elf32_set_section_contents): Define.
2956         * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
2957         (_bfd_mips_elf_lo16_reloc): Declare.
2958         (_bfd_mips_elf_gprel16_reloc): Declare.
2959         (_bfd_mips_elf_got16_reloc): Declare.
2960         (_bfd_mips_elf_gprel32_reloc): Declare.
2961         (_bfd_mips_elf_set_private_flags): Declare.
2962         (_bfd_mips_elf_copy_private_bfd_data): Declare.
2963         (_bfd_mips_elf_merge_private_bfd_data): Declare.
2964         (_bfd_mips_elf_find_nearest_line): Declare.
2965         (_bfd_mips_elf_set_section_contents): Declare.
2966
2967         * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
2968         elf_info_to_howto.
2969         (elf_info_to_howto): Define.
2970         * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
2971         elf_info_to_howto.
2972         (elf_info_to_howto): Define.
2973         * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
2974         elf_info_to_howto.
2975         (elf_info_to_howto): Define.
2976
2977         * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
2978         R_MOV16B[12], to match change in coff/internal.h.
2979
2980 Thu May 30 12:38:49 1996  Ian Lance Taylor  <ian@cygnus.com>
2981
2982         * elf64-mips.c: Extensive additions to provide better support for
2983         writing files and for gas.
2984         * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
2985         of mips_elf_object_p.
2986         (mips_elf32_object_p): Rename from mips_elf_object_p; call
2987         _bfd_mips_elf_object_p.
2988         (_bfd_mips_elf_final_write_processing): Rename from
2989         mips_elf_final_write_processing and make globally visible.
2990         (_bfd_mips_elf_fake_sections): Rename from
2991         mips_elf_fake_sections and make globally visible.
2992         (_bfd_mips_elf_section_from_bfd_section): Rename from
2993         mips_elf_section_from_bfd_section and make globally visible.
2994         (_bfd_mips_elf_section_processing): New function, broken out of
2995         mips_elf_section_processing.
2996         (mips_elf32_section_processing): Rename from
2997         mips_elf_section_processing; call
2998         _bfd_mips_elf_section_processing.
2999         (_bfd_mips_elf_symbol_processing): Rename from
3000         mips_elf_symbol_processing and make globally visible.
3001         (_bfd_mips_elf_read_ecoff_info): Rename from
3002         mips_elf_read_ecoff_info and make globally visible.
3003         (mips_elf32_ecoff_debug_swap): Rename from
3004         mips_elf_ecoff_debug_swap.
3005         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
3006         struct symbol_cache_entry.
3007         (_bfd_elf_validate_reloc): New function, moved in from
3008         elfcode.h:validate_reloc.
3009         * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
3010         to _bfd_elf_validate_reloc.  Change all callers.
3011         * elf-bfd.h (bfd_section_from_shdr): Declare.
3012         (_bfd_elf_symbol_from_bfd_symbol): Declare.
3013         (_bfd_elf_validate_reloc): Declare.
3014         (_bfd_mips_elf_object_p): Declare.
3015         (_bfd_mips_elf_fake_sections): Declare.
3016         (_bfd_mips_elf_section_from_bfd_section): Declare.
3017         (_bfd_mips_elf_section_processing): Declare.
3018         (_bfd_mips_elf_symbol_processing): Declare.
3019         (_bfd_mips_elf_read_ecoff_info): Declare.
3020         (_bfd_mips_elf_final_write_processing): Declare.
3021         * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
3022         if already defined.
3023
3024         * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
3025         (mips_elf_final_write_processing): Likewise.
3026
3027 Wed May 29 16:15:29 1996  Ian Lance Taylor  <ian@cygnus.com>
3028
3029         64-bit MIPS ELF ABI objdump support:
3030         * elf64-mips.c: New file.
3031         * Makefile.in: Rebuild dependencies.
3032         (BFD64_BACKENDS): Add elf64-mips.o.
3033         (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
3034         * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
3035         bfd_elf64_littlemips_vec to targ_selvecs.
3036         (mips*-*-elf*): Likewise.
3037         * confingure.in: Add bfd_elf64_bigmips_vec and
3038         bfd_elf64_littlemips_vec to vector switch.
3039         * configure: Rebuild.
3040         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
3041         broken out of mips_elf_section_from_shdr.
3042         (mips_elf32_section_from_shdr): Rename from
3043         mips_elf_section_from_shdr.  Call new function.
3044         (elf_backend_section_from_shdr): Update name of renamed function.
3045         * elf-bfd.h (struct elf_size_info): Change second parameter of
3046         write_out_phdrs to be const.  Likewise for second parameter of
3047         swap_symbol_out.
3048         (struct bfd_elf_section_data): Add rel_hdr2 field.
3049         (bfd_elf32_swap_symbol_in): Change second parameter to be const.
3050         (bfd_elf32_swap_symbol_out): Likewise.
3051         (bfd_elf32_swap_reloc_in): Likewise.
3052         (bfd_elf32_swap_reloc_out): Likewise.
3053         (bfd_elf32_swap_reloca_in): Likewise.
3054         (bfd_elf32_swap_reloca_out): Likewise.
3055         (bfd_elf32_swap_phdr_in): Likewise.
3056         (bfd_elf32_swap_phdr_out): Likewise.
3057         (bfd_elf32_swap_dyn_in): Likewise.
3058         (bfd_elf32_swap_dyn_out): Likewise.
3059         (bfd_elf32_slurp_symbol_table): Declare.
3060         (bfd_elf32_write_shdrs_and_ehdr): Declare.
3061         (bfd_elf32_write_out_phdrs): Declare.
3062         (bfd_elf64_swap_symbol_in): Change second parameter to be const.
3063         (bfd_elf64_swap_symbol_out): Likewise.
3064         (bfd_elf64_swap_reloc_in): Likewise.
3065         (bfd_elf64_swap_reloc_out): Likewise.
3066         (bfd_elf64_swap_reloca_in): Likewise.
3067         (bfd_elf64_swap_reloca_out): Likewise.
3068         (bfd_elf64_swap_phdr_in): Likewise.
3069         (bfd_elf64_swap_phdr_out): Likewise.
3070         (bfd_elf64_swap_dyn_in): Likewise.
3071         (bfd_elf64_swap_dyn_out): Likewise.
3072         (bfd_elf64_slurp_symbol_table): Declare.
3073         (bfd_elf64_write_shdrs_and_ehdr): Declare.
3074         (bfd_elf64_write_out_phdrs): Declare.
3075         (_bfd_mips_elf_section_from_shdr): Declare.
3076         * elf.c (bfd_section_from_shdr): Remove assertion requiring
3077         SHT_REL/SHT_RELA to match use_rela_p.  If there is already a reloc
3078         section for the section, add the new one to rel_hdr2.  Increment
3079         reloc_count rather than setting it.
3080         * elfcode.h (elf_slurp_symbol_table): Define name as macro.
3081         Remove static declaration.
3082         (elf_write_shdrs_and_ehdr): Define name as macro.
3083         (elf_write_out_phdrs): Likewise.
3084         (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
3085         (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
3086         (elf_swap_symbol_in): Change second parameter to be const.
3087         (elf_swap_symbol_out): Likewise.
3088         (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
3089         (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
3090         (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
3091         (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
3092         (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
3093         (elf_write_out_phdrs): Rename from write_out_phdrs.  Change second
3094         parameter to be const.  Make non-static.
3095         (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
3096         Make non-static.
3097         (elf_slurp_symbol_table): Make non-static.
3098         (NAME(_bfd_elf,size_info)): Update names of renamed functions.
3099         * elfxx-target.h (elf_info_to_howto): Define if not defined.
3100         (elf_backend_size_info): Likewise.
3101         (elfNN_bed): Use elf_backend_size_info.
3102         * targets.c (bfd_elf64_bigmips_vec): Declare.
3103         (bfd_elf64_littlemips_vec): Declare.
3104         (bfd_target_vector): Add bfd_elf64_bigmips_vec and
3105         bfd_elf64_littlemips_vec if BFD64 is defined.
3106         
3107         * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
3108
3109 Tue May 28 11:42:08 1996  Ian Lance Taylor  <ian@cygnus.com>
3110
3111         * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
3112         zeroes, in alignment holes.
3113
3114         * configure: Rebuild with autoconf 2.10.
3115
3116         * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
3117         potential leading underscore in the allocated buffer.
3118
3119 Fri May 24 14:28:38 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3120
3121         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
3122         symbols into .sbss if this is a relocatable link.
3123
3124 Thu May 23 12:26:24 1996  Ian Lance Taylor  <ian@cygnus.com>
3125
3126         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
3127         undefined symbols when creating a shared library.
3128
3129 Fri May 17 13:54:15 1996  Ian Lance Taylor  <ian@cygnus.com>
3130
3131         * coff-sh.c: Add a bunch of new code and static const arrays to
3132         support aligning loads and stores on four byte memory boundaries.
3133         Also:
3134         (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
3135         R_SH_LABEL.
3136         (sh_relax_section): Look for R_SH_CODE relocs.  If we find one,
3137         call sh_align_loads.
3138         (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
3139         as unused.
3140
3141 Thu May 16 16:34:13 1996  Ian Lance Taylor  <ian@cygnus.com>
3142
3143         * cache.c (bfd_open_file): Unlink the file before opening it for
3144         write.  From Marty Leisner <leisner@sdsp.mc.xerox.com>.
3145
3146         * opncls.c (bfd_fdopenr): Set opened_once.
3147
3148 Tue May 14 12:35:32 1996  Ian Lance Taylor  <ian@cygnus.com>
3149
3150         * som.c (som_slurp_reloc_table): Clear external_relocs cache after
3151         freeing it.
3152
3153         * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
3154         the code unconditionally.
3155
3156 Mon May 13 19:51:37 1996  Ian Lance Taylor  <ian@cygnus.com>
3157
3158         * libcoff-in.h (struct pei_section_tdata): Define structure.
3159         (pei_section_data): Define macro.
3160         * libcoff.h: Rebuild.
3161         * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
3162         store s_paddr field in pei_section_data.
3163         (coff_compute_section_file_positions): Use pei_section_data rather
3164         than _cooked_size, and don't overwrite an existing value.
3165         (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
3166         0.  If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
3167         * peicode.h (coff_bfd_copy_private_section_data): Define if
3168         COFF_IMAGE_WITH_PE.
3169         (pe_bfd_copy_private_section_data): New static function if
3170         COFF_IMAGE_WITH_PE.
3171
3172 Wed May  8 16:10:38 1996  Ian Lance Taylor  <ian@cygnus.com>
3173
3174         * srec.c (srec_set_arch_mach): Write as a function rather than a
3175         macro definition.
3176
3177         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
3178         no map, just check each member in turn to see whether it is
3179         required.
3180
3181 Wed May  8 09:17:34 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3182
3183         * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
3184         table.  Call BFD_ASSERT to validate header size, instead of
3185         calling fatal.
3186         (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
3187         name.
3188
3189 Tue May  7 16:10:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3190
3191         * ppcboot.c: New target for looking at PPCbug boot records.
3192
3193         * config{ure.in,.bfd}: Add support for ppcboot target.
3194         * targets.c: Ditto.
3195         * configure: Regenerate.
3196                 
3197 Tue May  7 11:15:19 1996  Jeffrey A Law  (law@cygnus.com)
3198
3199         * coff-h8300.c (howto_table): Update names to match recent
3200         changes to include/coff/internal.h.  Fix minor errors in the
3201         existing relocs.  Add R_MOVL1 and R_MOVL2.
3202         (rtype2howto): Similarly.
3203         (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
3204         existing relaxing code  and peform more relaxing.
3205         (h8300_reloc16_extra_cases): Likewise.
3206
3207 Mon May  6 18:24:09 1996  Jeffrey A Law  (law@cygnus.com)
3208
3209         * reloc16.c (bfd_coff_reloc16_get_value): Handle common
3210         symbols correctly.
3211
3212 Sat May  4 05:08:45 1996  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3213
3214         * elfcode.h (elf_object_p):  Reject generic ELF target if
3215         e_machine matches an alternate machine code in a specific backend.
3216
3217         * netbsd-core.c (netbsd_core_vec):  Remove initializer for
3218         obsolete align_power_min field.
3219
3220 Fri May  3 13:07:35 1996  Jeffrey A Law  (law@cygnus.com)
3221
3222         * coff-h8300.c (reloc_howto_type): Add howto entry for
3223         R_PCRWORD_B.
3224         (rtype2howto): Handle R_PCRWORD_B.
3225         (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
3226         (h8300_reloc_16_estimate): Likewise.  Try to turn a 16bit
3227         pc-relative branch (R_PCRWORD) into an 8bit pc-relative
3228         branch (R_PCWORD_B).
3229
3230 Fri May  3 10:47:41 1996  Ian Lance Taylor  <ian@cygnus.com>
3231
3232         * aoutx.h (translate_from_native_sym_flags): Set the section for
3233         BSF_CONSTRUCTOR symbols.
3234
3235         * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
3236         last_bf_index.
3237
3238 Wed May  1 18:39:32 1996  Doug Evans  <dje@canuck.cygnus.com>
3239
3240         * coffcode.h (coff_write_object_contents): In comdat section lookup,
3241         stop looking when section is found.
3242
3243 Wed May  1 14:17:57 1996  Ian Lance Taylor  <ian@cygnus.com>
3244
3245         * coffcode.h (STRING_SIZE_SIZE): Define.
3246         (styp_to_sec_flags): Handle long symbol names when looking for the
3247         section symbol.
3248         (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
3249         (bfd_coff_long_section_names): Define.
3250         (coff_write_object_contents): Handle long section names.
3251         (bfd_coff_std_swap_table): Initialize new field.
3252         * libcoff.h: Rebuild.
3253         * coffgen.c (make_a_section_from_file): Handle long section
3254         names.
3255         (coff_write_symbols): Handle long section names.
3256         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3257         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3258         * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
3259         * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
3260         * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
3261         * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
3262         * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
3263         * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
3264
3265         * bout.c (b_out_callback): Set lma of sections.
3266         (b_out_bfd_get_relocated_section_contents): Rename in_abfd
3267         parameter to output_bfd.  Used input_bfd instead of output_bfd in
3268         several places.
3269
3270 Tue Apr 30 17:56:39 1996  Ian Lance Taylor  <ian@cygnus.com>
3271
3272         * aoutx.h (translate_from_native_sym_flags): Don't create
3273         SEC_CONSTRUCTOR sections.
3274         * ecoff.c (ecoff_set_symbol_info): Likewise.
3275
3276         * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
3277         From Don Bowman <bowman@waterloo.hp.com>.
3278
3279 Tue Apr 30 17:06:32 1996  Doug Evans  <dje@canuck.cygnus.com>
3280
3281         * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
3282         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3283
3284 Mon Apr 29 13:15:17 1996  Ian Lance Taylor  <ian@cygnus.com>
3285
3286         * elf32-mips.c (struct mips_elf_link_hash_entry): Add
3287         mips_32_relocs field.
3288         (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
3289         (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
3290         relocs against a global symbol which is not defined in a regular
3291         file.
3292         (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
3293         against a global symbol, increment mips_32_relocs.
3294         (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
3295         the symbol is not defined in a regular file, make room in the
3296         .rel.dyn section.
3297
3298 Fri Apr 26 18:00:37 1996  Ian Lance Taylor  <ian@cygnus.com>
3299
3300         * ecoff.c (ecoff_compute_section_file_positions): Track the real
3301         file position and the virtual file position separately.  Set
3302         filepos information bsaed on the real file position.
3303         (_bfd_ecoff_set_section_contents): Handle .lib sections like the
3304         Jan 23 change to coffcode.h.
3305
3306         * som.c (som_slurp_symbol_table): Set the symbol count to the
3307         number of BFD symbols created.
3308
3309 Fri Apr 26 12:34:29 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3310
3311         * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
3312         output file if linking shared objects.  Loop to check all relocs,
3313         rather than returning false on first error.
3314
3315 Thu Apr 25 13:25:12 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3316
3317         * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
3318         (ppc_elf_additional_program_headers): If .interp section, bump #
3319         of program headers by 1.
3320         (ppc_elf_adjust_dynamic_symbol): Flesh out support.
3321         (ppc_elf_size_dynamic_sections): Add support for .plt section.
3322         (ppc_elf_check_relocs): Print out filename in debug code.  Enable
3323         PLT support.
3324         (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
3325         debug output.
3326         (ppc_elf_relocate_section): If the output section isn't defined,
3327         don't abort, just give an error message.
3328
3329         * elflink.c (_bfd_elf_create_dynamic_sections): If the section
3330         being created is .sdata or .sdata2, don't make the symbol dynamic.
3331
3332 Wed Apr 24 14:04:07 1996  Ian Lance Taylor  <ian@cygnus.com>
3333
3334         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
3335         members of an archive for dynamic objects with no symbols, and
3336         pass them directly to check_archive_element.
3337         (xcoff_link_check_ar_symbols): Pass dynamic objects to
3338         xcoff_link_check_dynamic_ar_symbols.
3339         (xcoff_link_check_dynamic_ar_symbols): New static function.
3340
3341         * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
3342         from _bfd_nodynamic to _bfd_xcoff.
3343         * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
3344         Declare.
3345         (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
3346         (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
3347         (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
3348         * libcoff.h: Rebuild.
3349         * xcofflink.c (xcoff_swap_ldrel_in): New static function.
3350         (xcoff_get_section_contents): New static function.
3351         (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
3352         (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
3353         (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
3354         (xcoff_dynamic_reloc): New static variable.
3355         (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
3356         (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
3357         
3358 Tue Apr 23 12:48:42 1996  Ian Lance Taylor  <ian@cygnus.com>
3359
3360         * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
3361         if reloc_entry->addend is not 0.
3362         (CALC_ADDEND): Just set the addend to reloc.r_offset.
3363
3364 Mon Apr 22 18:29:01 1996  Doug Evans  <dje@canuck.cygnus.com>
3365
3366         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
3367         R_SPARC_GLOB_JMP.
3368         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3369         Add entries for R_SPARC_[56].
3370         (sparc_reloc_map): Add entries for R_SPARC_[56].
3371
3372 Mon Apr 22 15:07:24 1996  Ian Lance Taylor  <ian@cygnus.com>
3373
3374         Optimize linking of stabs in sections as used in ELF and COFF.
3375         * stabs.c: New file.
3376         * libbfd-in.h (_bfd_link_section_stabs): Declare.
3377         (_bfd_write_section_stabs): Declare.
3378         (_bfd_write_stab_strings): Declare.
3379         * libbfd.h: Rebuild.
3380         * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
3381         (struct coff_link_hash_table): Add stab_info field.
3382         * libcoff.h: Rebuild.
3383         * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
3384         stab_info field.
3385         (coff_link_add_symbols): Call _bfd_link_section_stabs if
3386         appropriate.
3387         (_bfd_coff_final_link): Write out stab strings hash table.
3388         (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
3389         * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
3390         hash table.
3391         * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
3392         (struct bfd_elf_section_data): Add stab_info field.
3393         * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
3394         field.
3395         * elflink.h (elf_link_add_object_symbols): If appropriate, call
3396         _bfd_link_section_stabs.
3397         (elf_bfd_final_link): Write out stab strings hash table.
3398         (elf_link_input_bfd): Handle optimized stabs sections.
3399         * reloc.c (_bfd_final_link_relocate): Check address against
3400         _raw_size rather than _cooked_size.
3401         * Makefile.in: Rebuild dependencies.
3402         (BFD_LIBS): Add stabs.o
3403         (BFD_LIBS_CFILES): Add stabs.c.
3404
3405         * VERSION: Increment for bfdlink.h change.
3406
3407         * coffgen.c (coff_renumber_symbols): Correct handling of
3408         BSF_NOT_AT_END common symbols.
3409
3410 Fri Apr 19 19:21:56 1996  Ian Lance Taylor  <ian@cygnus.com>
3411
3412         * coff-ppc.c (record_toc): Add cast to avoid warning.
3413         (ppc_allocate_toc_section): Likewise.
3414         (coff_ppc_relocate_section): Remove ANSI C string concatenation.
3415         (ppc_coff_reloc_type_lookup): Remove unreached code.
3416         * coffcode.h (coff_write_object_contents): Don't take the address
3417         of an array.
3418         * peicode.h (pe_print_idata): Add casts to avoid warning.
3419         (pe_print_edata): Likewise.
3420         (pe_print_reloc): Remove ANSI C string concatenation.
3421
3422 Thu Apr 18 18:51:18 1996  Ian Lance Taylor  <ian@cygnus.com>
3423
3424         * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
3425         and last_bf fields.
3426         * libcoff.h: Rebuild.
3427         * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
3428         symbols.
3429         (coff_swap_aux_out): Likewise.
3430         * peicode.h (coff_swap_aux_in): Likewise.
3431         (coff_swap_aux_out): Likewise.
3432         * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
3433         symbols.
3434         * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
3435         field.
3436         (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
3437         Fix up .bf endndx link fields.
3438         * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
3439         field.
3440         * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
3441         symbols.
3442
3443 Wed Apr 17 12:08:24 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3444
3445         * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
3446         on Solaris PowerPC systems doesn't get confused.
3447
3448         * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
3449         #ifdef PPC.
3450
3451         * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
3452         (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
3453         update did_reg and did_reg2.
3454
3455 Wed Apr 17 13:07:37 1996  Ian Lance Taylor  <ian@cygnus.com>
3456
3457         * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
3458
3459         * linker.c (_bfd_generic_link_add_one_symbol): When calling the
3460         callback routines, pass h->root.string rather than name, in case
3461         copy is true and name is transient.
3462
3463 Tue Apr 16 16:36:38 1996  Stu Grossman  (grossman@lisa.cygnus.com)
3464
3465         * elfcore.h:  Add support for core files with multiple threads.
3466         (Primarily for Solaris.)
3467
3468 Tue Apr 16 13:44:08 1996  Ian Lance Taylor  <ian@cygnus.com>
3469
3470         * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
3471         section->orelocation is NULL.
3472
3473         * coffgen.c (bfd_coff_get_syment): New function.
3474         (bfd_coff_get_auxent): New function.
3475         * bfd-in.h (bfd_coff_get_syment): Declare.
3476         (bfd_coff_get_auxent): Declare.
3477         * bfd-in2.h: Rebuild.
3478
3479 Mon Apr 15 19:06:59 1996  Ian Lance Taylor  <ian@cygnus.com>
3480
3481         * elf32-mips.c (struct mips_hi16): Define.
3482         (mips_hi16_addr, mips_hi16_addend): Remove.
3483         (mips_hi16_list): New static variable.
3484         (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
3485         (mips_elf_lo16_reloc): Process mips_hi16_list.
3486         (mips_elf_relocate_section): Permit an arbitrary number of HI16
3487         relocs before the associated LO16 reloc.
3488
3489 Wed Apr 10 00:23:53 1996  Ian Lance Taylor  <ian@cygnus.com>
3490
3491         * versados.c (versados_scan): Check bfd_alloc return value.
3492         (versados_object_p): Check all bfd_read return values.  Require
3493         that lang field be less than 10, to avoid confusion with Intel Hex
3494         files.
3495
3496         * libaout.h (WRITE_HEADERS): Write out the relocs even if there
3497         aren't any symbols.
3498         * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
3499         not 0, for an absolute symbol.
3500         (NAME(aout,swap_ext_reloc_out)): Likewise.
3501
3502         * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
3503         (ihex_write_object_contents): For a large start address, output
3504         the full 32 bit address in record type 5.
3505
3506         * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
3507         to int to avoid promotion problems in prototype.
3508
3509 Tue Apr  9 11:44:21 1996  Ian Lance Taylor  <ian@cygnus.com>
3510
3511         * configure.host: Use ${srcdir} when looking for picfrag.
3512
3513         * configure.host: Switch on ${libdir}, not $(libdir).  From
3514         alan@spri.levels.unisa.edu.au (Alan Modra).
3515
3516         * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
3517         entry point, not just for DYNAMIC objects.
3518         * sunos.c (sunos_add_dynamic_symbols): Always call
3519         sunos_create_dynamic_sections.  If called with a non DYNAMIC
3520         object, don't do anything else.
3521         (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
3522
3523 Mon Apr  8 12:09:36 1996  Ian Lance Taylor  <ian@cygnus.com>
3524
3525         * configure.in: Permit --enable-shared to specify a list of
3526         directories.
3527         * configure: Rebuild.
3528
3529         * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
3530         host when configuring with --enable-shard.
3531
3532 Fri Apr  5 12:24:13 1996  Ian Lance Taylor  <ian@cygnus.com>
3533
3534         * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
3535         <jdp@polstra.com>.
3536
3537         * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
3538         to avoid crashing in bfd_hash_replace.
3539
3540         * sysdep.h: Use #ifdef, not #if.
3541
3542 Thu Apr  4 23:32:23 1996  Ian Lance Taylor  <ian@cygnus.com>
3543
3544         * config.in: Rebuild.
3545
3546 Thu Apr  4 18:49:09 1996  Fred Fish  <fnf@cygnus.com>
3547
3548         * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
3549         (AC_CHECK_HEADERS): Check for sys/time.h
3550         (AC_HEADER_TIME): Add macro.
3551         * configure: Rebuild.
3552         * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
3553         to control what combination of <time> and <sys/time.h>
3554         get included.
3555         
3556 Tue Apr  2 13:11:53 1996  Doug Evans  <dje@canuck.cygnus.com>
3557
3558         * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
3559         (aout_32_sunos4_write_object_contents): Likewise.
3560         * aoutx.h (NAME(aout,machine_type)): Handle
3561         bfd_mach_sparc_{sparclet,sparclite}.
3562         * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
3563         (bfd_mach_sparc_v9_p): Update.
3564         * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
3565         * libaout.h (enum machine_type): Add M_SPARCLET.
3566         * sunos.c (MACHTYPE_OK): Define.
3567         * bfd-in2.h: Regenerated.
3568
3569 Tue Apr  2 00:33:18 1996  Ian Lance Taylor  <ian@cygnus.com>
3570
3571         * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
3572         * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
3573         * elflink.c (_bfd_elf_create_got_section): Store the
3574         _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
3575         * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
3576         global offset table goes over 0x1000, set the value of
3577         _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
3578         (elf32_sparc_relocate_section): Subtract the offset of
3579         _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
3580
3581         * elfcode.h: Don't include <string.h>.
3582
3583 Mon Apr  1 10:39:24 1996  Jeffrey A Law  (law@cygnus.com)
3584
3585         * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
3586         generic_link_hash_newfunc.  All references changed.
3587         * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
3588         moved here from libbfd-in.h.
3589         * libbfd-in.h: Corresponding changes.
3590         * libbfd.h: Regenerated.
3591
3592 Mon Apr  1 12:35:36 1996  Ian Lance Taylor  <ian@cygnus.com>
3593
3594         * aoutx.h (aout_link_input_section_std): When reporting an
3595         overflow error, use the name of the symbol in the hash table if
3596         available.
3597         (aout_link_input_section_ext): Likewise.
3598
3599         * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
3600         defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
3601
3602 Sun Mar 31 01:58:41 1996  steve chamberlain  <sac@slash.cygnus.com>
3603
3604         * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
3605         * coffcode.h (coff_compute_section_file_positions): Likewise.
3606         (coff_write_object_contents): Likewise.
3607         
3608 Fri Mar 29 12:44:36 1996  Ian Lance Taylor  <ian@cygnus.com>
3609
3610         * section.c (SEC_LINK_ONCE): Define.
3611         (SEC_LINK_DUPLICATES): Define.
3612         (SEC_LINK_DUPLICATES_DISCARD): Define.
3613         (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
3614         (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
3615         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
3616         * bfd-in2.h: Rebuild.
3617         * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
3618         SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
3619         (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
3620         into SEC_EXCLUDE.  If IMAGE_SCN_LNK_COMDAT is set, set
3621         SEC_LINK_ONCE, and look through the symbol table for the setting
3622         for SEC_LINK_DUPLICATES.
3623         (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
3624         set for a section, find the section symbol in the symbol table,
3625         and set the aux entry based on SEC_LINK_DUPLICATES.
3626         * coffgen.c (coff_print_symbol): Add a space before "checksum".
3627         * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
3628         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3629         * coff-i386.c (i386coff_vec): Likewise.
3630         * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
3631
3632         * VERSION: Bump to 2.6.1.
3633         * Makefile.in (stamp-h): Depend upon VERSION.
3634
3635 Thu Mar 28 23:48:49 1996  Jeffrey A Law  (law@cygnus.com)
3636
3637         * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
3638         * libbfd.h: Rebuilt.
3639         * linker.c (generic_link_hash_newfunc): No longer static.
3640         * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
3641         to override.
3642         * coff-h8300.c: Add two derived hash tables and their associated
3643         funtions and #defines for use by the h8300 linker.
3644         (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
3645         the function vector as needed.  Place the address of the function
3646         vector entry in the location specified by the R_MEM_INDIRECT reloc.
3647         Rewrite the vectors section contents as necessary.
3648         (h8300_bfd_link_add_symbols): New function for the h8300 linker. 
3649         (coff_bfd_link_add_symbols): Define to use h8300 specific version.
3650         (coff_bfd_link_hash_table_create): Likewise.
3651
3652 Thu Mar 28 17:44:08 1996  Ian Lance Taylor  <ian@cygnus.com>
3653
3654         * libhppa.h: If gcc 2.7 or higher, declare all the functions with
3655         __attribute__ ((__unused__)) so that -Wall doesn't warn about
3656         them.
3657         (hppa_rebuild_insn): Pass pointer to correct type to
3658         low_sign_unext and dis_assemble_21.
3659
3660 Thu Mar 28 11:00:36 1996  Doug Evans  <dje@canuck.cygnus.com>
3661
3662         * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
3663         Stick with sparc-*-{sysv4*,solaris2*}.
3664
3665 Wed Mar 27 10:43:34 1996  Ian Lance Taylor  <ian@cygnus.com>
3666
3667         * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
3668         (coff_swap_aux_out): Swap out extra PE x_scn fields.
3669         * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
3670         * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
3671         fields is non-zero, print them.
3672
3673         * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
3674         ifdef.  Remove unused variables.
3675         (ppc_record_data_in_toc_entry): Ifdef out.  Removed unused
3676         variables.
3677         (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
3678         (get_symbol_value): Ifdef out.
3679         (pe_ppc_reloc): Ifdef out.  Remove unused variables.
3680         (coff_ppc_relocate_section): Remove unused variables.  Make
3681         fprintf strings and argument types correspond.  Put before_addr in
3682         DEBUG_RELOC ifdef.
3683         (dump_toc): Make fprintf strings and argument types correspond.
3684         (ppc_process_before_allocation): Remove unused variables.  Always
3685         return a value.
3686         (ppc_reflo_reloc): Ifdef out.
3687         (ppc_addr32nb_reloc): Ifdef out.
3688         (ppc_coff_rtype2howto): Make fprintf strings and argument types
3689         correspond.
3690         (coff_ppc_rtype_to_howto): Likewise.
3691         (ppc_coff_swap_sym_in_hook): Remove unused variables.
3692
3693         * peicode.h (pe_print_idata): Move otherwise unused variables into
3694         the #ifdef where they are used.  Always return a value.
3695         (pe_print_edata): Make fprintf strings and argument types
3696         correspond.  Always return a value.
3697         (pe_print_pdata): Removed unused variable addr_value.  Always
3698         return a value.
3699         (pe_print_reloc): Remove unused variable onaline.  Make fprintf
3700         strings and argument types correspond.  Always return a value.
3701
3702         * elf32-ppc.c (ppc_elf_fake_sections): Return true.
3703         (ppc_elf_finish_dynamic_symbol): Move definition of unused
3704         variable rela inside #if 0 section where it is used.
3705
3706         * ns32k.h: New file.
3707         * cpu-ns32k.h: Include ns32k.h.  Rename externally visible
3708         functions to start with _bfd_.
3709         * aout-ns32k.c: Include ns32k.h.  Change references to renamed
3710         functions in cpu-ns32k.h.
3711         * Makefile.in: Rebuild dependencies.
3712         (HFILES): Add ns32k.h.
3713
3714         * section.c (struct sec): Add linker_mark field.  Change
3715         user_set_vma and reloc_done to be single bit fields.
3716         (STD_SECTION): Update accordingly.
3717         * bfd-in2.h: Rebuild.
3718         * aoutx.h (NAME(aout,final_link)): Mark sections included in the
3719         link.
3720         (aout_link_input_bfd): Don't link unmarked sections.
3721         * cofflink.c (_bfd_coff_final_link): Mark sections included in the
3722         link.
3723         (_bfd_coff_link_input_bfd): Don't link unmarked sections.
3724         * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
3725         the link.
3726         * elflink.h (elf_bfd_final_link): Mark sections included in the
3727         link.
3728         (elf_link_input_bfd): Don't link unmarked sections.
3729         * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
3730         in the link.
3731         (xcoff_link_input_bfd): Don't link unmarked sections.
3732
3733         * coffswap.h (coff_swap_scnhdr_out): Include section name in
3734         overflow error messages.
3735
3736 Tue Mar 26 15:46:18 1996  Ian Lance Taylor  <ian@cygnus.com>
3737
3738         * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
3739         is not set, print "BFD: " before the error message.
3740
3741         * configure.in: Use AC_CHECK_TOOL to find ar and ranlib.  From
3742         Miles Bader <miles@gnu.ai.mit.edu>.
3743         * configure: Rebuild.
3744
3745 Fri Mar 22 12:17:00 1996  Ian Lance Taylor  <ian@cygnus.com>
3746
3747         * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
3748         symbols.
3749
3750         * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
3751         m68k-aout, m68k-coff, and m68k-elf targets.
3752
3753 Fri Mar 22 11:33:44 1996  Martin Anantharaman  <martin@goofy.imech.uni-duisburg.de>
3754
3755         * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
3756         (ieee_generic_stat_arch_elt): Restructured to prevent
3757         ieee_object_p from being called repeatedly.
3758
3759 Thu Mar 21 11:00:47 1996  steve chamberlain  <sac@slash.cygnus.com>
3760
3761         * coffcode.h (coff_write_object_contents):  Allocate
3762         buffers large enough for any FILEHDR or AOUTHDR.
3763
3764 Thu Mar 21 16:28:17 1996  David Mosberger-Tang  <davidm@azstarnet.com>
3765
3766         * ecofflink.c (lookup_line): New static function, renamed and
3767         slighly changed from old _bfd_ecoff_locate_line.
3768         (_bfd_ecoff_locate_line): Cache line number information.  Use
3769         lookup_line for actual lookup.
3770
3771 Thu Mar 21 14:59:11 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3772
3773         * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
3774         multiple of 20 bytes.
3775
3776 Thu Mar 21 13:54:40 1996  Ian Lance Taylor  <ian@cygnus.com>
3777
3778         * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
3779         allocate ecoff_find_line, and don't initialize by hand.
3780         * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
3781         mips_elf_find_line, and don't call memset.
3782
3783         * coffcode.h (coff_compute_section_file_positions): If not
3784         producing a final executable, don't consider sofar when aligning
3785         the section to the correct size.
3786
3787 Wed Mar 20 16:53:12 1996  Ian Lance Taylor  <ian@cygnus.com>
3788
3789         * coffcode.h (coff_add_missing_symbols): Ifdef out.
3790         (coff_write_object_contents): Don't call coff_add_missing_symbols.
3791         * coffgen.c (coff_section_symbol): Ifdef out.
3792
3793 Mon Mar 18 12:54:41 1996  Ian Lance Taylor  <ian@cygnus.com>
3794
3795         * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
3796         output_bfd is not NULL.
3797
3798 Thu Mar 14 17:12:06 1996  Doug Evans  <dje@charmed.cygnus.com>
3799
3800         * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
3801         of bfd_alloc (fixes fix_line not being initialized).
3802         Delete zeroing of fix_{value,tag,end,scnlen} fields.
3803
3804 Thu Mar 14 16:06:06 1996  Jeffrey A Law  (law@cygnus.com)
3805
3806         * coffcode.h: Allow specific backends to override the
3807         bfd_link_add_symbols routine.
3808
3809         * coff-h8300.c: Include genlink.h.
3810         (howto_table): Add R_MEM_INDIRECT.
3811         (rtype2howto): Support R_MEM_INDIRECT.
3812         (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
3813         for now.
3814         
3815 Tue Mar 12 12:41:17 1996  David Mosberger-Tang  <davidm@koala.azstarnet.com>
3816
3817         * coff-alpha.c (alpha_relocate_section): Use
3818         info->callbacks_warning, rather than _bfd_error_handler, for
3819         "multiple gp" warning.
3820
3821 Tue Mar 12 12:10:55 1996  Ian Lance Taylor  <ian@cygnus.com>
3822
3823         * linker.c (bfd_wrapped_link_hash_lookup): New function.
3824         (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
3825         table string.  Use bfd_wrapped_link_hash_lookup.
3826         (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
3827         table string.
3828         * aoutx.h (aout_link_write_symbols): Use the name from the hash
3829         table, if any, when writing out symbols.
3830         (aout_link_input_section_std): Use the name from the hash table,
3831         if any, when reporting undefined symbols.
3832         (aout_link_input_section_ext): Likewise.
3833         (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
3834         * bout.c (get_value): Likewise.
3835         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3836         * ecoff.c (ecoff_reloc_link_order): Likewise.
3837         * elflink.h (elf_link_add_object_symbols): Likewise.
3838         (elf_reloc_link_order): Likewise.       
3839         * linker.c (_bfd_generic_link_output_symbols): Likewise.
3840         (_bfd_generic_reloc_link_order): Likewise.
3841         (default_indirect_link_order): Likewise.
3842         * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
3843         * sunos.c (sunos_add_one_symbol): Likewise.
3844         * xcofflink.c (xcoff_link_add_symbols): Likewise.
3845         (bfd_xcoff_link_count_reloc): Likewise.
3846         (xcoff_reloc_link_order): Likewise.
3847
3848         * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
3849         into -1 for intern->rss.
3850
3851         * configure: Rebuild with autoconf 2.8.
3852
3853 Mon Mar 11 12:28:31 1996  Ian Lance Taylor  <ian@cygnus.com>
3854
3855         * stab-syms.c (__define_stab_duplicate): Define.
3856         (bfd_get_stab_name): Rename from aout_stab_name.  Rewrite to use a
3857         switch.
3858         * bfd-in.h (bfd_get_stab_name): Declare.
3859         * bfd-in2.h: Rebuild.
3860         * Makefile.in: Rebuild dependencies.
3861         (BFD_LIBS): Add stab-syms.o.
3862         (BFD_LIBS_CFILES): Add stab-syms.c.
3863         (BFD32_BACKENDS): Remove stab-syms.o.
3864         (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
3865         * configure.in: Don't list stab-syms.o in bfd_backends.
3866         * configure: Rebuild.
3867         * libaout.h (aout_stab_name): Don't declare.
3868         * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
3869         not aout_stab_name.
3870
3871 Fri Mar  8 11:26:20 1996  Ian Lance Taylor  <ian@cygnus.com>
3872
3873         * elf.c (assign_file_positions_for_segments): Adjust file offset
3874         for section alignment even if SEC_LOAD is not set.
3875
3876 Tue Mar  5 12:02:23 1996  Ian Lance Taylor  <ian@cygnus.com>
3877
3878         * configure.in: Don't set SHLIB or SHLINK to an empty string,
3879         since they appear as targets in Makefile.in.
3880         * configure: Rebuild.
3881
3882         * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
3883         don't fiddle with a symbol which is not defined anywhere.
3884
3885 Mon Mar  4 12:49:16 1996  Ian Lance Taylor  <ian@cygnus.com>
3886
3887         * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
3888         though they are defined in a shared library.
3889         (xcoff_build_ldsyms): Likewise.
3890
3891         * coffgen.c (coff_find_nearest_line): Don't look at the line
3892         numbers for the section if section->lineno is NULL.
3893
3894         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
3895         message rather than calling BFD_ASSERT.
3896         * elfcode.h (write_relocs): Check return value of
3897         _bfd_elf_symbol_from_bfd_symbol.
3898
3899 Fri Mar  1 09:42:59 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
3900
3901         * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
3902         for .sbss section.
3903
3904 Wed Feb 28 11:25:47 1996  Jeffrey A Law  (law@cygnus.com)
3905
3906         * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
3907         and R_HPPA_NLRSEL.
3908         (e_nsel, e_nlsel, e_nlrsel): Undefine.  Add to
3909         hppa_reloc_field_selector_type_alt.
3910         (hppa_field_adjust): Handle e_nlsel, e_nlrsel.  Fix e_nsel handling.
3911         * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
3912         selectors.
3913         (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
3914
3915 Wed Feb 28 11:00:24 1996  Ian Lance Taylor  <ian@cygnus.com>
3916
3917         * elf.c (assign_file_positions_for_segments): Adjust the segment
3918         memory size for the alignment of a SEC_ALLOC section, not just a
3919         SEC_LOAD section.
3920
3921 Tue Feb 27 14:17:31 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3922
3923         * m68klinux.c: New file.
3924         * hosts/m68klinux.h: New file.
3925         * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
3926         * configure.in (m68*-*-linux*): New native host.
3927         (m68klinux_vec): New vector.
3928         * configure: Rebuild.
3929         * targets.c (m68klinux_vec): Declare.
3930         * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
3931         bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
3932         * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
3933         declaration from bfd_linux_size_dynamic_sections.
3934         (bfd_m68klinux_size_dynamic_sections): Declare.
3935         * bfd-in2.h: Rebuild.
3936         * Makefile.in: Rebuild dependencies.
3937         (BFD32_BACKENDS): Add m68klinux.o.
3938         (BFD32_BACKENDS_CFILES): Add m68klinux.c.
3939
3940 Tue Feb 27 11:31:34 1996  Jeffrey A Law  (law@cygnus.com)
3941
3942         * libhppa.h (pa_arch): Add pa20.
3943         (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
3944         (e_nsel): Undefine.  Add to hppa_reloc_field_selector_type_alt.
3945         (hppa_field_adjust): Handle e_nsel.
3946         * som.c: Provide default definitions for many new relocs found only
3947         in hpux10 include files.
3948         (som_fixup_formats): Add several new relocs from hpux10.
3949         (som_hppa_howto_table): Add hpux10 relocs.
3950         (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
3951
3952 Mon Feb 26 12:52:48 1996  Stan Shebs  <shebs@andros.cygnus.com>
3953
3954         * mpw-make.sed: Edit out recent shared library support, and
3955         rules to rebuild .h files using doc/chew.
3956
3957 Mon Feb 26 14:48:39 1996  David Mosberger-Tang  <davidm@AZStarNet.com>
3958
3959         * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
3960         size even of sections with no contents.
3961
3962 Mon Feb 26 14:01:13 1996  Ian Lance Taylor  <ian@cygnus.com>
3963
3964         * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
3965         starting with '$' the way we skip names starting with '.'.  When
3966         updating x_endndx, don't be fooled by an index which has been
3967         merged.
3968
3969         * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
3970         struct/union/enum type with no elements.
3971
3972 Sat Feb 24 11:38:58 1996  Ian Lance Taylor  <ian@cygnus.com>
3973
3974         * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
3975
3976         * archive.c (bfd_generic_archive_p): If the first file in the
3977         archive can not be recognized as an object, don't assume that this
3978         is the wrong format.
3979
3980         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3981         format is not bfd_object.
3982         (bfd_elf_get_dt_soname): Likewise.
3983
3984 Wed Feb 21 13:58:04 1996  Ian Lance Taylor  <ian@cygnus.com>
3985
3986         * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
3987         reloc.
3988
3989 Tue Feb 20 16:22:44 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
3990
3991         * bfd.c (tdata): Add netbsd_core_data.
3992         * bfd-in2.h: Regenerated.
3993
3994 Tue Feb 20 16:50:02 1996  Ian Lance Taylor  <ian@cygnus.com>
3995
3996         * sunos.c (SUNOS_CONSTRUCTOR): Define.
3997         (sunos_add_one_symbol): Don't let a symbol from a dynamic object
3998         override a constructor symbol.  Set SUNOS_CONSTRUCTOR when
3999         appropriate.
4000
4001         * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
4002         to get the symbol index, matching 14 Jul 95 change.
4003
4004 Tue Feb 20 08:26:27 1996  Fred Fish  <fnf@phydeaux.cygnus.com>
4005
4006         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4007         Remove duplicate definition of gp.
4008
4009 Mon Feb 19 12:37:41 1996  Ian Lance Taylor  <ian@cygnus.com>
4010
4011         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
4012         assume that we can set the GP value and then get the same value,
4013         since it won't be true if the output file is neither ELF nor
4014         ECOFF.
4015         * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
4016         _bfd_get_gp_value here.
4017         (mips_gprel_reloc): Don't assume we can set and get the GP value.
4018         * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
4019         mips_elf_final_gp.
4020         (mips_elf_lo16_reloc): Likewise.
4021         (mips_elf_final_gp): Add pgp parameter.  Set it to the GP value.
4022         Don't require that the BFD be ELF.
4023         (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
4024         (mips_elf_gprel32_reloc): Likewise.
4025         (mips_elf_relocate_section): Don't assume we can set and get the
4026         GP value.
4027         (mips_elf_finish_dynamic_symbol): Don't bother to use
4028         _bfd_get_gp_value here.
4029
4030         * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
4031         Don't change epdr between malloc and free.  Be careful not to free
4032         NULL pointers.  Zero out the first RPDR.
4033
4034         * configure.host: On Linux, only pass -rpath option if $(libdir)
4035         is neither /lib nor /usr/lib.  From Alan Modra
4036         <alan@mullet.Levels.UniSA.Edu.Au>.
4037
4038         * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
4039         dt_name.
4040         (elf_dt_name): Rename from elf_dt_needed_name.
4041         * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
4042         elf_dt_needed_name.
4043         (bfd_elf_get_dt_soname): New function.
4044         * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
4045         elf_dt_needed_name.  Save the SONAME back in elf_dt_name.
4046         * bfd-in.h (bfd_elf_get_dt_soname): Declare.
4047         * bfd-in2.h: Rebuild.
4048
4049 Mon Feb 19 02:50:23 1996  Doug Evans  <dje@charmed.cygnus.com>
4050
4051         * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
4052         _bfd_sparc_elf_reloc_type_lookup.
4053         (bfd_elf32_bfd_reloc_type_lookup): Update.
4054         * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
4055         (sparc64_elf_howto_table): Define.
4056         (sparc_reloc_map): Define.
4057         (sparc64_elf_reloc_type_lookup): New function.
4058         (sparc_elf_wdisp16_reloc): New function.
4059         (elf_info_to_howto): Use sparc64_elf_howto_table.
4060         (sparc64_elf_relocate_section): Likewise.
4061         (bfd_elf64_bfd_reloc_type_lookup): Update.
4062
4063 Sun Feb 18 15:02:25 1996  Ian Lance Taylor  <ian@cygnus.com>
4064
4065         * configure.host: Check for 'do not mix' from native linker before
4066         trying to use -rpath.
4067
4068 Fri Feb 16 12:46:18 1996  Ian Lance Taylor  <ian@cygnus.com>
4069
4070         * bfd.c (_bfd_get_gp_value): New function.
4071         (_bfd_set_gp_value): New function.
4072         * libbfd-in.h (_bfd_get_gp_value): Declare.
4073         (_bfd_set_gp_value): Declare.
4074         * libbfd.h: Rebuild.
4075         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
4076         _bfd_get_gp_value and _bfd_set_gp_value rather than referring
4077         directly to the fields in the tdata information.
4078         (alpha_relocate_section): Likewise.
4079         * coff-mips.c (mips_adjust_reloc_in): Likewise.
4080         (mips_gprel_reloc): Likewise.
4081         (mips_relocate_section): Likewise.
4082         * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
4083         (mips_elf_lo16_reloc): Likewise.
4084         (mips_elf_final_gp): Likewise.
4085         (mips_elf_gprel16_reloc): Likewise.
4086         (mips_elf_gprel32_reloc): Likewise.
4087         (mips_elf_relocate_section): Likewise.
4088         (mips_elf_finish_dynamic_symbol): Likewise.
4089
4090         * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
4091
4092 Thu Feb 15 11:29:13 1996  Ian Lance Taylor  <ian@cygnus.com>
4093
4094         * configure.in: Call AC_PROG_CC before configure.host.
4095         * configure: Rebuild.
4096         * configure.host: Don't set information which autoconf should
4097         figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
4098
4099         * configure.host: Remove go32 and win32 host information, since it
4100         should no longer be needed.
4101
4102         * elf.c (map_sections_to_segments): If we have a .dynamic section,
4103         then start a new segment rather than put a writable section in a
4104         readonly segment.
4105
4106         * configure.host: Set RPATH_ENVVAR.
4107
4108         * Makefile.in: Rebuild dependencies.
4109
4110         * elflink.c (_bfd_elf_create_linker_section): Remove unused
4111         zero_section variable.
4112
4113 Thu Feb 15 10:39:17 1996  H.J. Lu  <hjl@zoom.com>
4114
4115         * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
4116         ($(srcdir)/libbfd.h): Rename from libbfd.h.
4117         ($(srcdir)/libcoff.h): Rename from libcoff.h.
4118
4119 Wed Feb 14 16:29:07 1996  Martin Anantharaman  <martin@mail.imech.uni-duisburg.de>
4120
4121         * ieee.c (ieee_write_expression): Only use an R variable for a
4122         local symbol.  Don't output a zero offset.  Handle a zero address.
4123         (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
4124         (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
4125         PCREL_OFFSET.
4126         (parse_expression): Don't try to handle multiple occurrences of a
4127         P variable.  Handle I variables differently from X variables.  Fix
4128         the order of minus expressions.
4129         (ieee_slurp_external_symbols): Generate an I variable for an NN
4130         record.  Fix handling of ATI and ATX records.
4131         (ieee_slurp_sections): Only set minimal section attributes.
4132         Adjust them later, based on the section contents.
4133         (ieee_object_p): Read in the file until just after the ME record.
4134         Call ieee_slurp_section_data to set the section flags.
4135         (do_one): Add iterations parameter.  Only repeat the first load
4136         item.  Set the section and file reloc flags.
4137         (ieee_slurp_section_data): Set section flags.  Pass iterations to
4138         do_one.
4139         (ieee_canonicalize_reloc): Handle I variables.
4140         (do_with_relocs): Only emit relocation size when necessary.
4141         Increase MAXRUN to 127.  Change ov to be assigned, and take
4142         src_mask and pcrel_offset into account.
4143         (ieee_write_data_part): Skip sections that are not loaded.
4144         (ieee_write_external_part): Don't output optional last entry of WX
4145         records.
4146         (ieee_write_me_part): Make setting of me_record neater.
4147         (ieee_generic_stat_arch_elt): Get the size of an archive element.
4148
4149         * syms.c (stt): Add entries for zerovars, vars, and code.
4150
4151         * elfcode.h (validate_reloc): New static function.
4152         (write_relocs): Call validate_reloc for non ELF relocs.
4153
4154         * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
4155         (TARGET_BIG_SYM): Use elf_symbol_leading_char.
4156         (TARGET_LITTLE_SYM): Likewise.
4157
4158         * config.bfd (m68*-*-psos*): New target.
4159
4160 Tue Feb 13 15:56:22 1996  Bryan Ford  <baford@snake.cs.utah.edu>
4161
4162         * i386msdos.c: Remove some #if 0 code.
4163         (msdos_write_object_contents): Don't include empty sections in the
4164         size computation, regardless of their address.
4165
4166 Tue Feb 13 15:36:37 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4167
4168         * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
4169         is NULL, ie, the -r switch is used.
4170
4171 Tue Feb 13 14:35:15 1996  Ian Lance Taylor  <ian@cygnus.com>
4172
4173         * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
4174         (BFD_RELOC_MIPS_GOT_LO16): Define.
4175         (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
4176         * bfd-in2.h, libbfd.h: Rebuild.
4177         * elf32-mips.c (mips_reloc_map): Map new relocs.
4178
4179         * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
4180
4181         * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
4182         $(SHLINK).
4183
4184         * ieee.c (get_symbol): Set the section to bfd_abs_section.
4185         (do_with_relocs): If EXEC_P is set and there are no relocs, use a
4186         simple number for the section address, rather than an expression.
4187         Limit the number of bytes between relocs to MAXRUN.
4188         (ieee_write_me_part): Set me_record to the file offset after the
4189         start address.
4190         (ieee_write_processor): New static function.
4191         (ieee_write_object_contents): Use ieee_write_processor.
4192
4193 Fri Feb  9 10:53:00 1996  Ian Lance Taylor  <ian@cygnus.com>
4194
4195         * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
4196
4197         * coff-aux.c: Change include of aux.h to aux-coff.h.
4198
4199 Thu Feb  8 14:01:03 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4200
4201         * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
4202         relocation put the addend both in the reloc entry and the data.
4203         (elf_m68k_finish_dynamic_symbol): Likewise.  Mask out marker in
4204         GOT offset value.
4205
4206         * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
4207         a R_68K_PCxx reloc against a defined global symbol directly.
4208         (elf_m68k_check_relocs): Don't count such a reloc.
4209
4210         * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
4211         a PLTxx reloc as dynamic.  Disallow PLTxxO reloc against a local
4212         symbol for now, otherwise always record the symbol as dynamic.
4213         (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
4214         is not referenced by a dynamic object, and we are not making a
4215         shared object, then don't make a PLT entry.  If we do make a PLT
4216         entry, make sure the symbol has been recorded as dynamic.
4217
4218 Wed Feb  7 13:56:06 1996  Ian Lance Taylor  <ian@cygnus.com>
4219
4220         * configure.host: When making a shared library, set HLDFLAGS to
4221         pass an appropriate -rpath option.  Use the make variable SONAME
4222         as the shared library soname, rather than computing it here.  On
4223         SunOS, build stamp-tshlink in place of $(SHLINK).
4224         * Makefile.in (SONAME): New variable.
4225         ($(SHLINK)): Make a link to the transformed name, as well.
4226         (stamp-tshlink): New target.
4227         (install): Skip stamp-tshlink during install.
4228
4229 Wed Feb  7 13:37:39 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4230
4231         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
4232         linker sections have been set up yet.
4233
4234         * elf.c (make_mapping): Add an additional argument to suppress
4235         making the first section include the program headers.
4236         (map_sections_to_segments): If the user used -Ttext such that the
4237         program headers are on a different page, do not set the flags
4238         saying that this section includes the program headers.
4239
4240 Tue Feb  6 14:04:49 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
4241
4242         * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
4243         don't define TRAD_HEADER.
4244         * configure: Rebuild.
4245
4246         * netbsd-core.c: New file, support for NetBSD core files.
4247         * hosts/*nbsd.h: Removed.
4248
4249 Tue Feb  6 11:47:49 1996  Doug Evans  <dje@charmed.cygnus.com>
4250
4251         * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
4252         (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
4253         * libbfd.h, bfd-in2.h: Regenerated.
4254         * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
4255         bfd_elf32_bfd_reloc_type_lookup.
4256         (reloc_type{,_names}): Deleted.
4257         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
4258         Add sparc64 relocs.
4259         (sparc_reloc_map): Add sparc64 relocs.
4260         (sparc_elf_notsupported_reloc): New static function.
4261         (sparc_elf_wdisp16_reloc): New static function.
4262         (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
4263         (elf32_sparc_relocate_section): Likewise.
4264         (bfd_elf32_bfd_reloc_type_lookup): Define.
4265         * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
4266         (reloc_type{,_names}): Deleted.
4267         (elf_sparc_howto_table): Deleted.
4268         (sparc_reloc_map): Deleted.
4269         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
4270         (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
4271
4272 Tue Feb  6 12:12:22 1996  Ian Lance Taylor  <ian@cygnus.com>
4273
4274         * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
4275         *-*-hpux* host.
4276
4277         * Makefile.in (program_transform_name): New variable.
4278         (install): Transform library name before installing it.
4279
4280 Mon Feb  5 10:38:27 1996  Ian Lance Taylor  <ian@cygnus.com>
4281
4282         * archures.c (bfd_mach_i960_hx): Define.
4283         * bfd-in2.h: Rebuild.
4284         * cpu-i960.c (scan_960_mach): Accept machine "hx".
4285         (MATRIX): Expand entries for HX.
4286         (arch_info_struct): Add i960:hx entry.
4287         * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
4288         * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
4289         (coff_set_flags): Handle bfd_mach_i960_hx.
4290
4291         Support for building as a shared library, based on patches from
4292         Alan Modra <alan@spri.levels.unisa.edu.au>:
4293         * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
4294         New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
4295         SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
4296         * configure: Rebuild.
4297         * configure.host: If --enable-shared, adjust shared library stuff
4298         based on the host.  If the host is SunOS, and the linker supports
4299         -rpath, set HLDFLAGS to use it.
4300         * Makefile.in (ALLLIBS): New variable.
4301         (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
4302         (COMMON_SHLIB, SHLINK): New variables.
4303         (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
4304         (STAGESTUFF): Remove variable.
4305         (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
4306         $(TARGETLIB).
4307         (stamp-ofiles): New target, like old ofiles target, but build
4308         using a temporary file and move-if-change, and touch stamp-ofiles
4309         when done.
4310         (ofiles): Just depend upon stamp-ofiles.
4311         (stamp-piclist, piclist): New targets.
4312         ($(SHLIB), $(SHLINK)): New targets.
4313         (targets.o, archures.o): Build twice if PICFLAG is set.
4314         (do_mostlyclean): Remove pic/*.o.
4315         (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
4316         stamp-piclist.
4317         (do_distclean): Remove pic and stamp-picdir.
4318         (install): Install shared libraries.
4319         ($(OFILES)): Depend upon stamp-picdir.
4320         (stamp-picdir): New target.
4321
4322         * libcoff-in.h: Add comment reminding people that libcoff.h is a
4323         generated file.
4324         * libcoff.h: Rebuild.
4325
4326         * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
4327         flavour of a section with no owner.
4328
4329         * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
4330         ELF_LINK_NON_ELF flag.
4331         (mips_elf_create_got_section): Likewise.
4332
4333         * elf.c: Revert last change, since it breaks dynamic linking.
4334         * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
4335         field.
4336         * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
4337         * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
4338         (elfNN_bed): Don't initialize want_hdr_in_seg field.
4339
4340 Sun Feb  4 20:45:13 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4341
4342         * elf.c (assign_file_positions_for_segments): If the backend does
4343         not want the elf header or the program headers in the address
4344         space, do not include them in the calculations.
4345
4346         * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
4347         function to determine if we need additional program headers.
4348         (ppc_elf_modify_segment_map): Define as a NOP function for now.
4349         (ppc_elf_create_linker_section): .sdata2 is a read-only section.
4350
4351 Sat Feb  3 23:00:03 1996  Ian Lance Taylor  <ian@cygnus.com>
4352
4353         * coffcode.h: Move today's libcoff.h change into coffcode.h.
4354
4355 Sat Feb  3 15:43:44 1996  Fred Fish  <fnf@cygnus.com>
4356
4357         * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
4358         back into one line.  Some compilers (sunos 4.1.3 for example)
4359         won't accept args split across more than one line.
4360
4361 Fri Feb  2 11:42:15 1996  Steve Chamberlain  <sac@slash.cygnus.com>
4362
4363         * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
4364         * configure: Regenerate.
4365
4366 Fri Feb  2 12:12:16 1996  Jeffrey A Law  (law@cygnus.com)
4367
4368         * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
4369         try to do arithmetic on a void *, cast it to a unsigned char * first.
4370
4371 Thu Feb  1 16:04:06 1996  Ian Lance Taylor  <ian@cygnus.com>
4372
4373         * elf-bfd.h (ELF_LINK_NON_ELF): Define.
4374         * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
4375         ELF_LINK_NON_ELF.
4376         * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
4377         flag for a newly defined symbol.
4378         (NAME(bfd_elf,record_link_assignment)): Likewise.
4379         (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
4380         set the DEF or REF_REGULAR flags correctly.
4381
4382         * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
4383         (libbfd.h, libcoff.h): Corresponding change.
4384
4385         * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
4386         a PLT32 reloc as dynamic.
4387         (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
4388         is not referenced by a dynamic object, and we are not making a
4389         shared object, then don't make a PLT entry.  If we do make a PLT
4390         entry, make sure the symbol has been recorded as dynamic.
4391
4392 Wed Jan 31 17:23:32 1996  Steve Chamberlain  <sac@slash.cygnus.com>
4393
4394         * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
4395         * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
4396         (powerpcle-*-cygwin32): New.
4397         * peicode.h (add_data_entry): Get address from vma.
4398
4399 Wed Jan 31 16:23:57 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4400
4401         * elflink.c (_bfd_elf_create_linker_section): If the symbol
4402         attached to the section has already been created as an undefined
4403         symbol, treat it as if it hasn't been created yet.
4404
4405 Wed Jan 31 16:16:53 1996  Ian Lance Taylor  <ian@cygnus.com>
4406
4407         * elflink.h (elf_bfd_final_link): Don't output initial dummy
4408         symbol or section symbols if stripping all symbols and this is not
4409         a relocateable link.  Don't output the symbol string table if
4410         there are no symbols.
4411         (elf_link_flush_output_syms): Don't do anything if there are no
4412         symbols to flush.
4413
4414 Wed Jan 31 12:55:49 1996  Richard Henderson  <rth@tamu.edu>
4415
4416         * coff-aux.c: New file.
4417         * hosts/m68kaux.h: New file.
4418         * config.bfd (m68*-apple-aux*): New target.
4419         * configure.in (m68*-apple-aux*): New native host.
4420         (m68kaux_coff_vec): New vector.
4421         * configure: Rebuild.
4422         * targets.c (m68kaux_coff_vec): Declare.
4423         * coffcode.h (bfd_coff_backend_data): Add field
4424         _bfd_coff_link_add_one_symbol.
4425         (bfd_coff_link_add_one_symbol): Define.
4426         (compare_arelent_ptr): New static function if TARG_AUX.
4427         (coff_write_relocs): If TARG_AUX, sort the relocs.
4428         (coff_write_object_contents): Set A/UX aouthdr magic number.
4429         (coff_link_add_one_symbol): Define if not defined.
4430         (bfd_coff_std_swap_table): Initialize new field.
4431         * libcoff.h: Rebuild.
4432         * cofflink.c (coff_link_add_symbols): Call
4433         bfd_coff_link_add_one_symbol rather than
4434         _bfd_generic_link_add_one_symbol.
4435         * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
4436         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4437         * coff-mips.c (mips_ecoff_backend_data): Likewise.
4438         * Makefile.in: Rebuild dependencies.
4439         (BFD32_BACKENDS): Add coff-aux.o.
4440         (BFD32_BACKENDS_CFILES): Add coff-aux.c.
4441
4442 Wed Jan 31 11:37:46 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4443
4444         * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
4445         relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
4446
4447 Tue Jan 30 12:09:04 1996  Ian Lance Taylor  <ian@cygnus.com>
4448
4449         * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
4450         $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
4451         (maintainer-clean): Warn about deleting special files.
4452         (bfd-in2.h, libbfd.h, libcoff.h): New targets.
4453
4454         * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
4455         warning symbols correctly.
4456         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4457         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4458         * elf32-mips.c (mips_elf_relocate_section): Likewise.
4459         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4460         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4461         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4462
4463         * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
4464         warnings.
4465
4466 Mon Jan 29 14:27:24 1996  Kim Knuttila  <krk@cygnus.com>
4467
4468         * libcoff-in.h: aligned newly exported names with bfd naming 
4469         conventions. Removed an erroneous define of POWERPC_LE_PE.
4470         * libcoff.h: Rebuild.
4471         * cofflink.c, coff-ppc.c: the above function name changes
4472
4473 Mon Jan 29 13:06:28 1996  Ian Lance Taylor  <ian@cygnus.com>
4474
4475         From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
4476         * ecoff.c (struct extsym_info): Define.
4477         (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
4478         to ecoff_link_write_external.
4479         (ecoff_link_write_external): Accept a struct extsym_info pointer.
4480         Strip symbols when appropriate.
4481
4482         Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
4483         * syms.c (BSF_OBJECT): Define.
4484         (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
4485         * bfd-in2.h: Rebuild.
4486         * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
4487         STT_OBJECT symbol.
4488         * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
4489         is set.
4490
4491         * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
4492         copying relocs into a shared object, treat a defined global symbol
4493         as a local symbol.
4494         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4495         * elf32-mips.c (mips_elf_relocate_section): Likewise.
4496         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4497
4498         * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
4499         real defined symbol, not to a weak defined symbol.
4500
4501 Mon Jan 29 11:34:36 1996  Kim Knuttila  <krk@cygnus.com>
4502
4503         * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
4504         and made a few static functions externs.
4505
4506         * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
4507         POWERPC_LE_PE hack in cofflink.
4508
4509         * libcoff-in.h: promoted the following from cofflink.c to allow
4510         _bfd_coff_final_link to be overridden -  STRING_SIZE_SIZE,
4511         coff_debug_merge_element, struct coff_debug_merge_type, 
4512         coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
4513         coff_debug_merge_hash_table_init,  coff_debug_merge_hash_table_free,
4514         coff_debug_merge_hash_lookup, coff_link_section_info, 
4515         coff_final_link_info, coff_debug_merge_hash_newfunc,
4516         coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
4517
4518         * libcoff.h: re-gen'd
4519
4520 Fri Jan 26 18:33:35 1996  Ian Lance Taylor  <ian@cygnus.com>
4521
4522         * syms.c: Include "bfdlink.h".
4523         (struct stab_find_info): Define.
4524         (_bfd_stab_section_find_nearest_line): New function.
4525         * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
4526         * libbfd.h: Rebuild.
4527         * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
4528         * elf.c (_bfd_elf_find_nearest_line): Try calling
4529         _bfd_stab_section_find_nearest_line before searching the ELF
4530         symbol table.  Find the closest STT_FUNC symbol, not the last one.
4531         * libcoff-in.h (coff_data_type): Add line_info field.
4532         * libcoff.h: Rebuild.
4533         * coffgen.c (coff_find_nearest_line): Try calling
4534         _bfd_stab_section_find_nearest_line before searching the COFF
4535         symbol table.
4536         * Makefile.in: Rebuild dependencies.
4537
4538 Fri Jan 26 16:11:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4539
4540         * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
4541         4 bytes, so we get the correct value when updating the register
4542         field in little endian mode.
4543
4544 Thu Jan 25 12:14:16 1996  Ian Lance Taylor  <ian@cygnus.com>
4545
4546         * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
4547         entry_section fields.  Add sntoc and snentry fields.
4548         * libcoff.h: Rebuild.
4549         * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
4550         not toc_section and entry_section (the COFF file does not have any
4551         sections at this point).
4552         (coff_write_object_contents): Set o_snentry and o_sntoc from
4553         snentry and sntoc rather than entry_section and toc_section.
4554         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
4555         snentry, not toc_section and entry_section.
4556         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
4557         entry_section from hentry.
4558         (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
4559         set snenty.
4560         (xcoff_link_input_bfd): Set sntoc, not toc_section.
4561         (xcoff_write_global_symbol): Get toc_section from sntoc, rather
4562         than using toc_section directly.
4563
4564         * archures.c: Add missing `.' in enum bfd_architecture.
4565         * bfd-in2.h: Rebuild.
4566
4567         * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec.  From
4568         Robert Lipe <robertl@arnet.com>.
4569
4570 Thu Jan 25 12:08:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4571
4572         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
4573         to sections we allocate.  Use bfd_zalloc to allocate initialial
4574         sections, not bfd_alloc.
4575         (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
4576         SDA{,2}I16 relocations.
4577         (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
4578         whether to put something in .sbss or not.
4579         (ppc_elf_relocate_section): Add support for more relocations.  Add
4580         in sec->output_offset where appropriate.  Make error messages
4581         include the symbol name.
4582
4583         * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
4584         trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
4585         doesn't get redefined messages if -shared.
4586
4587         * elflink.h (elf_create_pointer_linker_section) Only bump RELA
4588         section if the rel_section field has been set up.
4589
4590 Wed Jan 24 20:40:26 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4591
4592         * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
4593         relocations.
4594
4595 Wed Jan 24 10:38:34 1996  Doug Evans  <dje@charmed.cygnus.com>
4596
4597         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
4598         of flags, only flags used are controlled by mach number.  Bump up
4599         output file mach number to highest of input file mach numbers.
4600         (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
4601         (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
4602
4603         * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
4604         bfd_elf64_sparc_vec support.
4605
4606 Tue Jan 23 14:33:05 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4607
4608         * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
4609         the embedded bit is set on some objects and not on others.  Just
4610         or it together.
4611         (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
4612         relocations.
4613
4614 Tue Jan 23 14:22:45 1996  Ian Lance Taylor  <ian@cygnus.com>
4615
4616         * coffcode.h (coff_new_section_hook): Don't try to align the
4617         .stabstr section.
4618
4619         * coffcode.h (coff_set_section_contents): Fix the handling of the
4620         .lib section to work even if the entire section contents are
4621         written at once.  From Gvran Uddeborg <gvran@uddeborg.pp.se> and
4622         Robert Lipe <robertl@arnet.com>.
4623
4624 Mon Jan 22 18:45:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4625
4626         * elflink.h (elf_finish_pointer_linker_section): Don't allocate
4627         memory here for contents.
4628
4629         * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
4630         _SDA2_BASE_ by 32768.
4631         (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
4632         started using.  Allocate contents for .sdata and .sdata2 sections
4633         also.
4634         (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
4635         rather than _name.
4636         (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
4637         size _SDA{,2}_BASE_.
4638         (ppc_elf_relocate_section): Change how sdata{,2} relocations are
4639         done.
4640
4641 Mon Jan 22 08:52:04 1996  Doug Evans  <dje@charmed.cygnus.com>
4642
4643         * elflink.h (elf_finish_pointer_linker_section): Fix typo.
4644
4645         * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
4646         (bfd_mach_sparc_{v8plus,v8plusa}): Define.
4647         (bfd_mach_sparc_v9a): Define.
4648         (bfd_mach_sparc_v9_p): Define.
4649         * bfd-in2.h: Regenerated.
4650         * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
4651         bfd_mach_sparc_v9.
4652         * elf64-sparc.c (sparc64_elf_object_p): Likewise.
4653         * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
4654         to bfd_elf32_sparc_vec.
4655         * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
4656         Add v8plus{,a} support.
4657         Add v9a support.
4658         (sparc_compatible): New function.
4659         * elf32-sparc.h: #include "elf/sparc.h".
4660         (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
4661         elf32_sparc_final_write_processing): New functions.
4662         (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
4663         elf_backend_final_write_processing): Define.
4664
4665 Mon Jan 22 11:21:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4666
4667         * elf-bfd.h (struct elf_link_hash_entry): Add
4668         linker_section_pointer field.
4669         (enum elf_linker_section_enum): Enumeration for new way of
4670         creating linker dynamic sections and symbols.
4671         (elf_linker_section{,_pointers}): New structures for creating
4672         dynamic sections and symbols.
4673         (elf_obj_tdata): Add linker_section_pointers and linker_section
4674         fields.
4675         (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
4676         (_bfd_elf_create_linker_section): New declarations.
4677         (_bfd_elf_find_pointer_linker_section): Ditto.
4678         (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
4679         (_bfd_elf_make_linker_section_rela): Ditto.
4680
4681         * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
4682
4683         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
4684         (ppc_elf_create_linker_section): New function to create the
4685         sections .got, .sdata, and .sdata2.
4686         (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
4687         needed.
4688         (ppc_elf_check_relocs): Support more of the eabi relocations.
4689         (ppc_elf_relocate_section): Ditto.
4690         (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
4691         if the .sdata{,2} + .sbss{,2} section size is > 32k.
4692
4693         * elflink.h (elf_create_pointer_linker_section): New function to
4694         create initialized pointers in dynamic linker sections.
4695         (elf_finish_pointer_linker_section): Actually intialize the
4696         pointers created above.
4697
4698         * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
4699         macros to provide both 32 and 64 bit versions of
4700         elf_create_pointer_linker_section.
4701         (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
4702         provide both 32 and 64 bit versions of
4703         elf_finish_pointer_linker_section.
4704
4705         * elflink.c (_bfd_elf_create_linker_section): New function to
4706         create a linker section.
4707         (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
4708         given address in the linker pointer offsets created for a given
4709         symbol.
4710         (_bfd_elf_make_linker_section_rela): Make a RELA section
4711         corresponding to the generated linker section.
4712
4713 Sat Jan 20 08:36:10 1996  Doug Evans  <dje@canuck.cygnus.com>
4714
4715         * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
4716
4717 Thu Jan 18 18:25:34 1996  Kim Knuttila  <krk@cygnus.com>
4718
4719         * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
4720         (coff_ppc_relocate_section): Handle special values for gcc built dlls.
4721         (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
4722         Also begin the toc at 4 as an eye catcher ('31313131' marks the first
4723         toc entry in an objdump) for now.
4724         (ppc_do_last, ppc_get_last): New function - needed to save processing 
4725         the toc owner to the end.
4726         (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the 
4727         toc owner last.
4728
4729         * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the 
4730         toc owner from being done till last. Must define POWERPC_LE_PC 
4731         to enable it.
4732
4733         * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
4734
4735         * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
4736         to INFO.
4737         (coff_swap_aouthdr_out): Removed a non-working hack for computing the
4738         SizeOfImage for PowerPC. Ignore the size of the .junk section.
4739
4740 Thu Jan 18 17:42:12 1996  Ian Lance Taylor  <ian@cygnus.com>
4741
4742         * elfcore.h: Include <signal.h> before <sys/procfs.h>.
4743
4744 Wed Jan 17 12:40:14 1996  Ian Lance Taylor  <ian@cygnus.com>
4745
4746         * cpu-powerpc.c (arch_info_struct): Change last entry to not point
4747         back to first.
4748         (bfd_powerpc_arch): Point at first entry in arch_info_struct.
4749
4750 Tue Jan 16 15:10:49 1996  Ian Lance Taylor  <ian@cygnus.com>
4751
4752         * elf.c (assign_file_positions_for_segments): Don't increment file
4753         offset for a segment which contains no loadable sections.
4754
4755 Mon Jan 15 17:46:27 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4756
4757         * reloc.c: Add new PowerPC relocations.
4758         * {bfd-in2,libbfd}.h: Regenerate.
4759
4760         * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
4761         (ppc_elf_reloc_type_lookup): Lookup new relocations.
4762
4763 Mon Jan 15 14:29:44 1996  Ian Lance Taylor  <ian@cygnus.com>
4764
4765         * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
4766         entries.
4767
4768         * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
4769         info->shared.
4770
4771         * coffgen.c (coff_find_nearest_line): Don't try to cache
4772         information in sections that are not owned by a BFD.  From Richard
4773         Henderson <richard@atheist.tamu.edu>.
4774
4775         * elf32-mips.c: Numerous changes to dynamic linking code, mostly
4776         from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
4777         * elflink.h (elf_link_output_extsym): Remove special check for
4778         _rld_new_interface.
4779
4780         * ecoffswap.h: Add prototypes for static functions.
4781
4782 Sun Jan 14 21:36:08 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4783
4784         * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
4785         (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
4786         references.
4787         (ppc_elf_relocate_section):  No longer allow .sdata/.sbss sections
4788         to satisfy a TOC16 relocation.  Rewrite unsupported relocation
4789         support.  Begin support for R_PPC_SDA{2,}REL.
4790
4791 Sat Jan 13 09:36:52 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4792
4793         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
4794         create the .got and .got.neg sections.
4795         (ppc_elf_size_dynamic_sections): Call it.
4796         (ppc_elf_check_relocs): Call it.
4797         (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
4798         (ppc_elf_check_relocs): Add error messages for relocations we
4799         don't yet support.  Do not include R_PPC_SDAREL16 like a GOT
4800         relocation.
4801
4802 Fri Jan 12 15:27:59 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4803
4804         * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
4805         section flags for V.4 and eabi.
4806
4807 Fri Jan 12 13:59:16 1996  Ian Lance Taylor  <ian@cygnus.com>
4808
4809         * elf.c (assign_file_positions_for_segments): If a segment
4810         contains no sections, don't mark it as readable.
4811
4812         * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
4813         * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
4814
4815         * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
4816         dynamic section, if there is one.
4817         * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
4818         (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
4819         (bfd_elf64_swap_dyn_in): Likewise.
4820         * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
4821         PTR.
4822         (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
4823
4824         * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
4825         DT_TEXTREL entry because of .rel.plt.  From Martin Pirker
4826         <pirker@eiunix.tuwien.ac.at>.
4827
4828 Thu Jan 11 17:06:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
4829
4830         * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
4831         PowerPC V.4 and eabi.
4832         * bfd-in2.h: Regenerate.
4833         * libfd.h: Regenerate.
4834
4835         * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
4836
4837         * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
4838         section type and SHF_EXCLUDE section flag, turning them into the
4839         appropriate bfd section flag.
4840
4841 Thu Jan 11 11:23:30 1996  Ian Lance Taylor  <ian@cygnus.com>
4842
4843         * xcofflink.c (xcoff_link_add_symbols): Create the special
4844         sections if we see a DYNAMIC object, in case that is the only
4845         XCOFF input object we see.
4846         
4847         * elf32-mips.c: Extensive changes for a start at dynamic linking
4848         support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
4849
4850         * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
4851         (struct elf_backend_data): Remove
4852         elf_backend_create_program_headers field.  Add
4853         elf_backend_additional_program_headers and
4854         elf_backend_modify_segment_map fields.
4855         * elfxx-target.h (elf_backend_type_change_ok): Define if not
4856         defined.
4857         (elf_backend_additional_program_headers): Likewise.
4858         (elf_backend_modify_segment_map): Likewise.
4859         (elf_backend_create_program_headers): Don't define.
4860         (elfNN_bed): Change to account for field changes.
4861         * elf.c (assign_file_positions_for_segments): Call new
4862         modify_segment_map backend function.  Don't call old
4863         create_program_headers backend function.
4864         (get_program_header_size): Call additional_program_headers rather
4865         than create_program_headers.
4866         * elflink.h (elf_link_add_object_symbols): Initialize
4867         type_change_ok from new backend field.
4868         (elf_link_output_extsym): Don't warn if _rld_new_interface is
4869         defined.
4870         (elf_reloc_link_order): Treat a reloc against a defined symbol as
4871         a reloc against the appropriate section.
4872
4873         * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
4874         (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
4875         (elf_flags_init): Rename from elf_ppc_flags_init.
4876         * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
4877         elf_ppc_flags_init.
4878         (ppc_elf_copy_private_bfd_data): Likewise.
4879         (ppc_elf_merge_private_bfd_data): Likewise.
4880
4881         * elf32-m68k.c (howto_table): Change src_mask to 0 for all
4882         relocation entries.
4883
4884 Tue Jan  9 15:22:53 1996  David Mosberger-Tang  <davidm@azstarnet.com>
4885
4886         * coff-alpha.c (alpha_relocate_section): During final link, allow
4887         output .lita section to be bigger than 64k by adjusting gp value
4888         on a per-input section basis.
4889         * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
4890         field.
4891         (struct ecoff_section_tdata): Add gp field.
4892
4893 Tue Jan  9 12:00:36 1996  Ian Lance Taylor  <ian@cygnus.com>
4894
4895         Handle Alpha ECOFF changes in OSF/1 3.2.
4896         * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
4897         field.
4898         * coff-alpha.c: Include "aout/ar.h".
4899         (alpha_ecoff_get_relocated_section_contents): Don't require an
4900         ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
4901         3.2 doesn't generate one.
4902         (alpha_relocate_section): Likewise.
4903         (alpha_ecoff_slurp_armap): Define.
4904         (alpha_ecoff_slurp_extended_name_table): Define.
4905         (alpha_ecoff_construct_extended_name_table): Define.
4906         (alpha_ecoff_truncate_arname): Define.
4907         (alpha_ecoff_write_armap): Define.
4908         (alpha_ecoff_generic_stat_arch_elt): Define.
4909         (alpha_ecoff_update_armap_timestamp): Define.
4910         (ARFZMAG): Define.
4911         (alpha_ecoff_read_ar_hdr): New static function.
4912         (alpha_ecoff_get_elt_at_filepos): New static function.
4913         (alpha_ecoff_openr_next_archived_file): New static function.
4914         (alpha_ecoff_get_elt_at_index): New static function.
4915         (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
4916         (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
4917         _bfd_ecoff to alpha_ecoff.
4918         * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
4919         field from backend structure, rather than always calling
4920         _bfd_get_elt_at_filepos.
4921         * coff-mips.c (mips_ecoff_backend_data): Initialize
4922         get_elt_at_filepos field.
4923         * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
4924         from _bfd_generic_read_ar_hdr with minor changes.
4925         (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
4926         * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
4927         * libbfd.h: Rebuild.
4928
4929         * bfd-in.h (BFD_IN_MEMORY): Define.
4930         * libbfd-in.h (struct bfd_in_memory): Define.
4931         * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
4932         (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
4933         (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
4934         (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
4935         * bfd.c (struct _bfd): Change iostream field from char * to PTR.
4936         (bfd_get_size): Handle BFD_IN_MEMORY flag.
4937         * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
4938         (bfd_open_file): Cast to PTR, not char *, when setting iostream.
4939         (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
4940         * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
4941         iostream.
4942         (bfd_openstreamr): Likewise.
4943         * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
4944         BFD_IN_MEMORY is not set.
4945         * riscix.c (riscix_some_aout_object_p): Likewise.
4946         * bfd-in2.h, libbfd.h: Rebuild.
4947
4948         * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
4949         (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
4950         (bfd_get_elt_at_index): Define.
4951         * archive.c (_bfd_generic_get_elt_at_index): Rename from
4952         bfd_get_elt_at_index.  Change index parameter from int to
4953         symindex.
4954         * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
4955         (_bfd_noarchive_get_elt_at_index): Define.
4956         (_bfd_archive_bsd_get_elt_at_index): Define.
4957         (_bfd_archive_coff_get_elt_at_index): Define.
4958         * bfd-in2.h, libbfd.h: Rebuild.
4959         * aout-target.h (MY_get_elt_at_index): Define if not defined.
4960         * coff-rs6000.c (xcoff_get_elt_at_index): Define.
4961         * ieee.c (ieee_get_elt_at_index): Define.
4962         * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
4963         * oasys.c (oasys_get_elt_at_index): Define.
4964         * som.c (som_get_elt_at_index): Define.
4965
4966         * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
4967         numbers to the .text section.
4968
4969 Mon Jan  8 17:00:57 1996  Ian Lance Taylor  <ian@cygnus.com>
4970
4971         * ieee.c (ieee_write_debug_part): Change return type to boolean.
4972         If there is a SEC_DEBUGGING section, get the contents of the debug
4973         information part from it.
4974         (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
4975         section in memory.
4976         (ieee_write_object_contents): Check ieee_write_debug_part return.
4977
4978 Thu Jan  4 17:12:37 1996  Fred Fish  <fnf@cygnus.com>
4979
4980         * config.bfd (i[345]86-*-freebsd*): Add target.
4981         * configure.in (i386freebsd_vec): Add vec.
4982         * configure: Regenerate.
4983         * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
4984         (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
4985         Rebuild dependencies..
4986         * freebsd.h: New file.
4987         * i386freebsd.c: New file.
4988         * targets.c (i386freebsd_vec): Declare.
4989         (bfd_target_vector): Add i386freebsd_vec.
4990         * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
4991         * i386netbsd.c (SEGMENT_SIZE):  Define as TARGET_PAGE_SIZE
4992         
4993 Thu Jan  4 16:27:46 1996  Ian Lance Taylor  <ian@cygnus.com>
4994
4995         * ieee.c (ieee_slurp_debug): New static function.
4996         (ieee_object_p): Call it.
4997         (ieee_slurp_section_data): Skip debugging sections.
4998         (ieee_get_reloc_upper_bound): Likewise.
4999         (ieee_get_section_contents): Likewise.
5000         (ieee_canonicalize_reloc): Likewise.
5001         (ieee_write_section_part): Likewise.
5002         (ieee_write_debug_part): Likewise.
5003         (ieee_write_data_part): Likewise.
5004         (init_for_output): Likewise.
5005
5006 Wed Jan  3 19:42:47 1996  Michael Meissner  <meissner@wogglebug.tiac.net>
5007
5008         * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
5009         work.
5010         (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
5011         relocs, since ppc_elf_relocate_section handles the linker case.
5012         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
5013         used.
5014         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
5015         ppc_elf_relocate_section since that is now the only caller.
5016         (ppc_elf_relocate_section): Ditto.
5017
5018 Wed Jan  3 15:11:30 1996  Ian Lance Taylor  <ian@cygnus.com>
5019
5020         * coffcode.h (coff_write_object_contents): If we don't know the
5021         section of the entry point for an XCOFF executable, always set the
5022         entry address to -1.
5023
5024 Tue Jan  2 14:17:15 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
5025
5026         * elf.c (bfd_section_from_shdr): Add support for note sections.
5027
5028 Tue Jan  2 13:10:25 1996  Ian Lance Taylor  <ian@cygnus.com>
5029
5030         * bfd-in.h (struct _symbol_info): Add stab_type field.
5031         * bfd-in2.h: Rebuild.
5032         * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
5033
5034         * elf32-ppc.c: Remove trailing newline from calls to
5035         _bfd_error_handler.
5036         (ppc_elf_merge_private_bfd_data): Only warn about endianness
5037         difference if target endianness is known.
5038
5039 Thu Dec 21 12:43:49 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
5040
5041         * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
5042         old style TOC16 references without using R_PPC_GOT.
5043         (ppc_reloc_type): Ditto.
5044         (ppc_elf_reloc_type_lookup): Add support for TOC16.
5045         (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
5046         (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
5047         (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
5048         (ppc_elf_check_relocs): New function for GOT/PLT support that is
5049         work in progress.
5050         (ppc_elf_adjust_dynamic_symbol): Ditto.
5051         (ppc_elf_adjust_dynindx): Ditto.
5052         (ppc_elf_size_dynamic_sections): Ditto.
5053         (ppc_elf_finish_dynamic_symbol): Ditto.
5054         (ppc_elf_finish_dynamic_sections): Ditto.
5055         (ELF_DYNAMIC_INTERPRETER): Define.
5056
5057 Wed Dec 20 19:14:18 1995  Ken Raeburn  <raeburn@cygnus.com>
5058
5059         * elf.c (copy_private_bfd_data): When attaching sections to
5060         segments ignore sections that won't be allocated.  Patch from
5061         Andreas Schwab.
5062
5063 Tue Dec 19 20:01:43 1995  Ken Raeburn  <raeburn@cygnus.com>
5064
5065         * config.bfd: Match on m68k-cbm-* only if OS doesn't match
5066         anything else.
5067
5068 Tue Dec 19 16:38:59 1995  Ian Lance Taylor  <ian@cygnus.com>
5069
5070         * coff-i960.c (CALC_ADDEND): Define.
5071         (coff_i960_relocate_section): Add the input section VMA to the
5072         addend for PC relative relocs.
5073
5074 Sun Dec 17 20:11:55 1995  Kim Knuttila  <krk@cygnus.com>
5075
5076         * peicode.h (pe_print_pdata): Must test the entire entry for zero
5077         to correctly terminate.
5078
5079 Fri Dec 15 12:05:57 1995  Ian Lance Taylor  <ian@cygnus.com>
5080
5081         * targets.c (enum bfd_endian): Define.
5082         (bfd_target): Rename byteorder_big_p to byteorder, and change it
5083         from boolean to enum bfd_endian.  Change header_byteorder_big_p
5084         correspondingly.
5085         * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
5086         (bfd_header_big_endian, bfd_header_little_endian): New macros.
5087         * bfd-in2.h: Rebuild.
5088         * All targets: Change initialization of byteorder and
5089         header_byteorder to use enum bfd_endian values rather than
5090         booleans.
5091         * All files: Change all references to byteorder_big_p and
5092         header_byteorder_big_p to use new bfd_*_endian macros.
5093
5094         * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
5095         s_vaddr.
5096         * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
5097         vma.
5098         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5099
5100 Fri Dec 15 07:32:09 1995  steve chamberlain  <sac@slash.cygnus.com>
5101
5102         * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
5103
5104 Thu Dec 14 13:45:37 1995  Ian Lance Taylor  <ian@cygnus.com>
5105
5106         * ieee.c: Lots of minor cleanups.  Make many functions return
5107         errors rather than calling abort.  Also:
5108         (ieee_write_twobyte): Remove; change callers to call existing
5109         ieee_write_2bytes function.
5110         (ieee_write_expression): Don't output the section twice when
5111         outputting a local symbol.  Don't emit an extraneous zero if there
5112         is only one term.
5113         (ieee_slurp_sections): Set the lma as well as the vma.
5114         (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
5115
5116         * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
5117         a recognized one or bfd_arch_unknown.
5118         (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
5119         to succeed.
5120         (ihex_get_symtab): Likewise.
5121
5122 Wed Dec 13 15:44:06 1995  Ian Lance Taylor  <ian@cygnus.com>
5123
5124         * aoutx.h: Include <ctype.h>.
5125         (struct aout_link_includes_table): Define.
5126         (struct aout_link_includes_totals): Define.
5127         (struct aout_link_includes_entry): Define.
5128         (aout_link_includes_lookup): Define macro.
5129         (struct aout_final_link_info): Add includes field.
5130         (aout_link_includes_newfunc): New static function.
5131         (NAME(aout,final_link)): Initialize includes hash table.
5132         (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
5133
5134 Wed Dec 13 10:52:14 1995  Stan Shebs  <shebs@andros.cygnus.com>
5135
5136         * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
5137
5138 Wed Dec 13 11:07:45 1995  Kim Knuttila  <krk@cygnus.com>
5139
5140         * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
5141
5142 Tue Dec 12 17:42:06 1995  Kim Knuttila  <krk@cygnus.com>
5143
5144         * peicode.h (pe_print_reloc): New function to dump the .reloc section.
5145         (pe_print_private_bfd_data): call pe_print_reloc.
5146         * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
5147         * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
5148         up some debugging as well.
5149
5150 Tue Dec 12 11:34:23 1995  Ian Lance Taylor  <ian@cygnus.com>
5151
5152         * config.bfd: Handle sparc-*-elf*.  From Ronald F. Guilmette
5153         <rfg@monkeys.com>.
5154
5155 Fri Dec  8 17:47:07 1995  Ian Lance Taylor  <ian@cygnus.com>
5156
5157         * elflink.h (elf_link_add_object_symbols): Set section_count to 0
5158         when setting sections to NULL.
5159
5160 Wed Dec  6 17:05:37 1995  Ian Lance Taylor  <ian@cygnus.com>
5161
5162         * xcofflink.c (struct xcoff_loader_info): Add export_defineds
5163         field.
5164         (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
5165         (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
5166         for all symbols.
5167         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
5168         * bfd-in2.h: Rebuild.
5169
5170 Mon Dec  4 16:40:47 1995  Kim Knuttila  <krk@cygnus.com>
5171
5172         * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
5173
5174 Mon Dec  4 11:25:39 1995  Ian Lance Taylor  <ian@cygnus.com>
5175
5176         * ihex.c (ihex_scan): Handle record types 4 and 5.
5177         (ihex_object_p): Permit types 4 and 5.
5178         (ihex_set_section_contents): Remove check for out of range
5179         addresses.
5180         (ihex_write_object_contents): Generate types 4 and 5.
5181
5182         * elflink.h (elf_link_output_extsym): Just ignore warning and
5183         indirect references to symbols which don't really exist.
5184
5185 Sun Dec  3 19:00:27 1995  Kim Knuttila  <krk@cygnus.com>
5186
5187         * peicode.h (pe_print_idata): Minor format fixes
5188         (pe_print_edata): New function. Under private printing, this formats
5189         the edata section of a PE file.
5190         (pe_print_private_bfd_data): Added call to pe_print_edata.
5191
5192 Sun Dec  3 16:46:54 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
5193
5194         * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
5195         index, don't call stoi.
5196
5197 Fri Dec  1 14:46:51 1995  Ian Lance Taylor  <ian@cygnus.com>
5198
5199         * srec.c (srec_scan): Set lma as well as vma.
5200
5201         * ihex.c: New file; support for Intel Hex format.
5202         * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
5203         (ihex_vec): Declare.
5204         (bfd_target_vector): Always include ihex_vec.
5205         * bfd.c (struct _bfd): Add ihex_data field to tdata union.
5206         * Makefile.in: Rebuild dependencies.
5207         (BFD_LIBS): Add ihex.o
5208         (BFD_LIBS_CFILES): Add ihex.c.
5209         * bfd-in2.h: Rebuild.
5210
5211         * elf.c (assign_file_positions_for_segments): Sort the sections in
5212         each segment.
5213         (get_program_header_size): Return the right size if segment_map is
5214         not NULL.
5215         (copy_private_bfd_data): Don't bother to sort the sections.
5216
5217         * bfd.c (bfd_record_phdr): New function.
5218         * bfd-in.h (bfd_record_phdr): Declare.
5219         * bfd_in2.h: Rebuild.
5220
5221         * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
5222         BFD_ASSERT.
5223
5224         * libbfd.c (bfd_malloc, bfd_realloc): New functions.
5225         (bfd_zmalloc): Return PTR, not char *.  Take size_t, not
5226         bfd_size_type.
5227         * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
5228         (bfd_zmalloc): Change declaration.
5229         * libbfd.h: Rebuild.
5230         * Many files: Use bfd_malloc and bfd_realloc rather than malloc
5231         and realloc.  Don't set bfd_error_no_memory if they fail.
5232
5233 Thu Nov 30 19:32:26 1995  Kim Knuttila  <krk@cygnus.com>
5234
5235         * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
5236         uses as well. Added a new howto to deal with TOCREL16 relocs that 
5237         are TOCDEFN as well.
5238         (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
5239         to handle RVA relocs from dlltool.
5240         (ppc_coff_rtype2howto): TOCDEFN reloc addition.
5241         (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
5242         (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
5243
5244         * coffcode.h (coff_set_alignment_hook): check idata$X sections 
5245         to get the right section alignment.
5246
5247 Thu Nov 30 16:48:18 1995  Ian Lance Taylor  <ian@cygnus.com>
5248
5249         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
5250         p_paddr if p_paddr is zero.
5251         (make_mapping): Set includes_filehdr and includes_phdrs for first
5252         PT_LOAD segment.
5253         (map_sections_to_segments): Set includes_phdrs for PT_PHDR
5254         segment.
5255         (assign_file_positions_for_segments): Handle includes_filehdr and
5256         includes_phdrs.  Remove special handling of PT_PHDR and first
5257         PT_LOAD segments.
5258         (copy_private_bfd_data): Set includes_filehdr and includes_phdr
5259         when appropriate.  Remove special handling of PT_PHDR segment.
5260         Use a more complex condition for when a section is included in a
5261         segment to handle Solaris linker oddities.
5262
5263 Thu Nov 30 11:17:33 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
5264
5265         * coff-m88k.c (howto_table): Reformatted for easier reading;
5266         special_function now points to new function m88k_special_reloc.
5267         (howto_hvrt16): Function previously used for handling HVRT16 relocs
5268         removed.
5269         (rtype2howto): Do not add reloc's r_offset to the addend, this will
5270         be done correctly by m88k_special_reloc.
5271         (reloc_processing): New function to be used by RELOC_PROCESSING.
5272         (RELOC_PROCESSING): Define to call reloc_processing.
5273
5274 Wed Nov 29 12:42:36 1995  Ian Lance Taylor  <ian@cygnus.com>
5275
5276         * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
5277         (pe_print_pdata): Likewise.
5278
5279         * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
5280         obstack_alloc fails.
5281         (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
5282         fails.
5283         * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
5284         * Many files: don't set bfd_error_no_memory if one of the above
5285         routines fails.
5286
5287         * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
5288         if p_paddr_valid is set.
5289         (copy_private_bfd_data): New static function.
5290         (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
5291
5292         * elf.c (assign_file_positions_for_segments): Fix case where extra
5293         program headers were allocated.
5294
5295         * elf.c (_bfd_elf_print_private_bfd_data): New function.
5296         * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
5297         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
5298         _bfd_elf_print_private_bfd_data.
5299
5300         * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
5301         r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
5302         Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
5303         (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
5304         RELOC_SECTION_LITA for ALPHA_R_IGNORE.
5305         (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
5306         RELOC_SECTION_ABS to RELOC_SECTION_NONE.
5307
5308 Tue Nov 28 16:59:50 1995  Ian Lance Taylor  <ian@cygnus.com>
5309
5310         * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
5311         * elf.c (make_mapping): New static function.
5312         (map_sections_to_segments): New static function.
5313         (elf_sort_sections): New static function.
5314         (assign_file_positions_for_segments): New static function.
5315         (map_program_segments): Remove.
5316         (get_program_header_size): Remove sorted_hdrs, count, and
5317         maxpagesize parameters.  Simplify.
5318         (assign_file_positions_except_relocs): When generating an
5319         executable, use assign_file_positions_for_segments.
5320         (elf_sort_hdrs): Remove.
5321         (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
5322         to get_program_header_size.
5323
5324 Mon Nov 27 12:27:46 1995  Ian Lance Taylor  <ian@cygnus.com>
5325
5326         * hp300hpux.c (MY(callback)): Set lma as well as vma.
5327
5328         * configure, config.in: Regenerate with autoconf 2.7.
5329
5330         * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
5331         * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
5332
5333 Wed Nov 22 12:02:09 1995  Ian Lance Taylor  <ian@cygnus.com>
5334
5335         * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
5336         (ecoff_sec_to_styp_flags): Likewise.
5337         (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
5338         (ecoff_set_symbol_info): Handle scRConst.
5339         (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
5340         (ecoff_compute_section_file_positions): Handle .rconst section.
5341         (_bfd_ecoff_write_object_contents): Likewise.
5342         (ecoff_link_check_archive_element): Handle scRConst.
5343         (ecoff_link_add_externals): Likewise.
5344         (ecoff_link_write_external): Handle .rconst section.
5345         (ecoff_reloc_link_order): Likewise.
5346         * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
5347         * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
5348         section.
5349         (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
5350
5351         * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
5352         DEF_DYNAMIC flag is set.
5353
5354 Tue Nov 21 13:25:29 1995  Ken Raeburn  <raeburn@cygnus.com>
5355
5356         * host-aout.c: If TRAD_HEADER is defined, include it.
5357
5358 Tue Nov 21 13:03:57 1995  Ian Lance Taylor  <ian@cygnus.com>
5359
5360         * aclocal.m4 (AC_PROG_CC): Remove local definition.
5361         (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
5362         (BFD_NEED_DECLARATION): New function.
5363         * configure.in: Use BFD_NEED_DECLARATION.
5364         * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
5365         * configure, config.in: Rebuild with autoconf 2.6.
5366
5367         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
5368         special_sections before returning when called with a non XCOFF
5369         BFD.
5370
5371         * coffgen.c (coff_renumber_symbols): Sort common symbols with
5372         global symbols.
5373
5374         * coffcode.h (coff_compute_section_file_positions): Only pad the
5375         previous section to force file alignment when creating an
5376         executable.
5377
5378 Mon Nov 20 14:54:09 1995  Ian Lance Taylor  <ian@cygnus.com>
5379
5380         * coffcode.h (coff_compute_section_file_positions): If
5381         RS6000COFF_C, set up the .debug section.
5382
5383         * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
5384         if it is not large enough to accomodate the entire TOC area with
5385         signed 16 bit offsets.
5386         (xcoff_write_global_symbol): Handle negative TOC offsets in global
5387         linkage code.
5388         (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
5389         TOC anchor to use the TOC value used in the output file.
5390
5391 Sat Nov 18 18:01:41 1995  Ian Lance Taylor  <ian@cygnus.com>
5392
5393         * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
5394         (_bfd_coff_read_string_table): Likewise.
5395
5396 Sat Nov 18 19:43:04 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
5397
5398         * pe-arm.c: Fix typos.
5399         * coff-arm.c: Likewise.
5400
5401 Fri Nov 17 16:22:04 1995  Kim Knuttila  <krk@cygnus.com>
5402
5403         * coff-ppc.c (list_ele): Added "cat"egory member.
5404         (record_toc): New category parameter (priv or pub).
5405         (ppc_record_toc_entry): Check to see if toc bounds exceeded.
5406         (ppc_process_before_allocation): Removed embrionic data-in-toc from
5407         the mainline. It addes extra toc cells in error.
5408         (ppc_coff_swap_sym_in_hook): Added some documentation.
5409         (dump_toc): Can now diagnose "virtual toc" chicanery.
5410
5411 Fri Nov 17 10:41:25 1995  Philippe De Muyter  <phdm@info.ucl.ac.be>
5412
5413         * elf-bfd.h (struct elf_link_hash_table): Change type of
5414         dynsymcount and bucketcount fields from size_t to bfd_size_type.
5415
5416 Fri Nov 17 10:02:58 1995  Ian Lance Taylor  <ian@cygnus.com>
5417
5418         * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
5419         pointerize C_LEAFSTAT or C_LEAFEXT entries.
5420
5421         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
5422         DT_INIT and DT_FINI entries if the _init or _fini symbol is
5423         defined or mentioned in a regular file.
5424
5425 Thu Nov 16 15:16:42 1995  Kim Knuttila  <krk@cygnus.com>
5426
5427         * coff-ppc.c (ppc_record_data_in_toc_entry): new function
5428         (coff_ppc_relocate_section): Handle TOCDEFN attribute
5429         (coff_ppc_relocate_section): Correct REL24 handling
5430         (ppc_process_before_allocation): Correct TOCDEFN handling
5431
5432         * peicode.h (dir_names): Added name descriptions
5433
5434 Thu Nov 16 03:38:03 1995  Ken Raeburn  <raeburn@cygnus.com>
5435
5436         * VERSION: Updated to cygnus-2.6.
5437
5438 Wed Nov 15 19:30:07 1995  Ken Raeburn  <raeburn@cygnus.com>
5439
5440         * targets.c (m68k4knetbsd_vec): Declare.
5441
5442 Wed Nov 15 18:05:52 1995  Ian Lance Taylor  <ian@cygnus.com>
5443
5444         * targets.c (bfd_target): Change type of second argument to
5445         _bfd_print_private_bfd_data from void * to PTR.
5446         * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
5447         using PTR rather than void *.
5448         * bfd-in2, libbfd.h: Rebuild.
5449         * peicode.h (pe_print_private_bfd_data): Change vfile from void *
5450         to PTR.
5451         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
5452         _bfd_generic_bfd_print_private_bfd_data rather than casting
5453         bfd_true.
5454
5455 Wed Nov 15 04:09:14 1995  Ken Raeburn  <raeburn@cygnus.com>
5456
5457         * Makefile.in (.dep1): Fix stupid typo in last change.  Remove any
5458         "DO NOT DELETE" lines or blank lines that mkdep writes on some
5459         systems.
5460         (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
5461         BFD64_BACKENDS_CFILES): New variables.
5462         (CFILES): Use them.
5463         
5464 Tue Nov 14 11:52:23 1995  Ian Lance Taylor  <ian@cygnus.com>
5465
5466         * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
5467         not at the file position of the first section.
5468         * coffcode.h (coff_compute_section_file_positions): Avoid using
5469         unportable #elif.
5470         (coff_write_object_contents): When generating a PPC PE executable
5471         with no symbols, round up the file size to a COFF_PAGE_SIZE
5472         boundary.
5473         * cofflink.c (_bfd_coff_final_link): If there are no symbols,
5474         don't write out a string table.
5475
5476         * elf.c (bfd_section_from_shdr): When using a different section
5477         header, pass the new one to _bfd_elf_make_section_from_shdr.
5478         (elf_fake_sections): Don't set sh_info and sh_entsize fields.
5479         (elf_map_symbols): Add section VMA to symbol value when comparing
5480         against 0.
5481         (_bfd_elf_compute_section_file_positions): Only build symbol table
5482         if there are some symbols.  Set file offset of symtab and strtab
5483         sections.
5484         (assign_file_positions_except_relocs): Remove dosyms parameter.
5485         Change all callers.  Never set file offset of symtab and strtab
5486         sections.
5487         (_bfd_elf_copy_private_section_data): New function.
5488         (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
5489         (_bfd_elf_copy_private_symbol_data): New function.
5490         (swap_out_syms): Check for special mapping of st_shndx created by
5491         copy_private_symbol_data.
5492         * elfxx-target.h: Use new copy routines.
5493         * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
5494         (_bfd_elf_copy_private_section_data): Declare.
5495
5496         * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
5497
5498         * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
5499         C_NT_WEAK.
5500
5501         * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
5502         _bfd_dummy_target, matching the recent change to archive
5503         recognition.
5504
5505 Mon Nov 13 13:24:38 1995  Ian Lance Taylor  <ian@cygnus.com>
5506
5507         * libbfd.c (bfd_get_file_window): Use casts to avoid doing
5508         arithmetic on PTR types.
5509
5510         * aout-target.h (MY(callback)): Set the lma of the sections.
5511
5512         * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
5513         symbol into a reloc against the section.
5514
5515 Mon Nov 13 07:31:35 1995  Kim Knuttila  <krk@cygnus.com>
5516
5517         * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
5518         glue for the relocs: IMGLUE and IFGLUE.
5519         (record_toc): new function - tracks toc contents
5520         (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
5521         (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
5522         (ppc_coff_rtype2howto): removed invalid IMGLUE hack
5523         (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
5524         (ppc_record_toc_entry): Removed a debug define (duh)
5525
5526         * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
5527         (pe_print_idata): New function - formats the idata section data
5528         (pe_print_pdata): New function - formats the pdata section data
5529         (pe_print_private_bfd_data): calls to above
5530
5531 Sun Nov 12 12:23:24 1995  Stan Shebs  <shebs@andros.cygnus.com>
5532
5533         * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
5534         * coff-rs6000.c (rs6000coff_vec): Add conditional defines
5535         TARGET_SYM and TARGET_NAME for vector and BFD name.
5536         * coff-pmac.c (pmac_xcoff_vec): Remove.
5537         (TARGET_SYM, TARGET_NAME): Define.
5538         * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
5539         machine to 0, not all PowerMacs are 601s.
5540
5541 Fri Nov 10 12:10:14 1995  Ian Lance Taylor  <ian@cygnus.com>
5542
5543         * elfcode.h (elf_object_p): Read in any program headers.
5544         * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
5545         based on the program headers, if any.
5546         (elf_fake_sections): Set sh_addr from the vma, not the lma.
5547         (map_program_segments): Set p_paddr of program headers based on
5548         the lma.
5549
5550 Thu Nov  9 13:01:31 1995  Ian Lance Taylor  <ian@cygnus.com>
5551
5552         * archive.c (bfd_generic_archive_p): Preserve tdata in case of
5553         failure.
5554
5555         * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
5556         trying to do a relocateable link with a non-a.out object file.
5557
5558         * archive.c (bfd_generic_archive_p): Check the first object file
5559         in an archive even if target_defaulted is set.  If the object file
5560         has the wrong xvec, reject it.
5561
5562         * aoutx.h (NAME(aout,set_section_contents)): If a section can not
5563         be represented, report the name via _bfd_error_handler.
5564         (translate_to_native_sym_flags): Likewise.
5565         * elf32-mips.c (mips_elf_final_link): Likewise.
5566         * oasys.c (oasys_write_sections): Likewise.
5567
5568         * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
5569         which checks for STYP_OVRFLO sections.
5570         (coff_compute_section_file_positions): If RS6000COFF_C, handle
5571         reloc and lineno count overflows.
5572         (coff_write_object_contents): Call coff_count_linenumbers before
5573         coff_compute_section_file_positions.  If RS6000COFF_C, handle
5574         reloc and lineno count overflows.
5575         * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
5576         relocs before dealing with .pad sections.  Count overflow section
5577         headers when handling .pad sections.
5578
5579         * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
5580         if RS6000COFF_C.
5581
5582         * xcofflink.c (XCOFF_DESCRIPTOR): Define.
5583         (struct xcoff_link_hash_table): Add descriptor_section and
5584         special_sections fields.
5585         (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
5586         (xcoff_link_add_symbols): Set linkage section alignment.  Create
5587         descriptor section.  Check for magic symbol names (_text, etc.),
5588         and record them in special_sections if found.  Set
5589         XCOFF_DESCRIPTOR flag for a function descriptor, and set its
5590         descriptor field to point back to the function code symbol.
5591         (xcoff_sweep): Always mark the special descriptor_section.
5592         (bfd_xcoff_export_symbol): Check whether the symbol might be a
5593         function descriptor, and mark it if it is.
5594         (bfd_xcoff_size_dynamic_sections): Add new special_sections
5595         parameter, and fill it in.  Allocate space for the descriptor
5596         section.
5597         (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
5598         global linkage code.  If an undefined function descriptor is
5599         exported, arrange to define it.  Warn about any other undefined
5600         exported symbol.
5601         (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
5602         (xcoff_write_global_symbol): Create a function descriptor when
5603         necessary.
5604         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
5605         * bfd-in2.h: Rebuild.
5606
5607 Thu Nov  9 08:40:23 1995  Kim Knuttila  <krk@cygnus.com>
5608
5609         * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
5610         (ppc_coff_link_hash_table): new types for hashing
5611         (ppc_coff_link_hash_newfunc): hash entry constructor
5612         (ppc_coff_link_hash_table_init): hash table initializer
5613         (ppc_coff_link_hash_table_create): hash table constructor
5614         (ppc_record_toc_entry): changed references to hash table
5615         (coff_ppc_relocate_section): changed references to hash table
5616
5617         * libcoff-in.h (coff_link_hash_entry): removed toc_offset
5618         * libcoff.h: Rebuild
5619
5620         * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
5621         (coff_link_add_symbols): removed toc_offset init
5622
5623 Thu Nov  9 04:00:38 1995  Ken Raeburn  <raeburn@cygnus.com>
5624
5625         * Makefile.in (.dep1): Make sure the file mkdep is to write exists
5626         first.
5627
5628         * configure.in: Added new option --with[out]-mmap.  Set USE_MMAP
5629         if it is given and mmep is available.
5630         * acconfig.h: Undef USE_MMAP.
5631         * configure, config.in: Regenerated.
5632         * aoutx.h: If USE_MMAP is not defined, do all symbol and string
5633         table handling the old way.
5634         (aout_get_external_symbols): Don't complain if last byte of string
5635         table is nonzero.
5636         * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
5637         (bfd_free_window) [! USE_MMAP]: Don't define.
5638         (bfd_get_file_window,
5639         _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
5640
5641 Wed Nov  8 20:03:44 1995  Eric Freudenthal <freudenthal@nyu.edu>
5642
5643         * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
5644         0xffff0000.
5645
5646 Wed Nov  8 11:31:11 1995  Ian Lance Taylor  <ian@cygnus.com>
5647
5648         * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
5649         compatible with AMD generated COFF files.  Try to support both AMD
5650         and GNU formats simultaneously.
5651         (coff_a29k_relocate_section): Likewise.
5652
5653         * libbfd.c (bfd_get_file_window): Change writable parameter from
5654         int to boolean; update all callers.  Pass MAP_SHARED if not
5655         writable--it's required on Solaris.  Cast fprintf argument to
5656         avoid warning.
5657         * bfd-in.h (bfd_get_file_window): Update declaration.
5658         * bfd-in2.h: Rebuild.
5659         * aoutx.h: Update calls to bfd_get_file_window.
5660
5661         * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
5662         Change all uses.
5663         (xcoff_swap_ldhdr_in): New static function.
5664         (xcoff_swap_ldsym_in): New static function.
5665         (xcoff_find_reloc): Handle the case of a single reloc correctly.
5666         (xcoff_link_add_symbols): If we just created a descriptor, pass it
5667         to _bfd_generic_link_add_one_symbol, to save a hash lookup.
5668         Handle XTY_ER/XMC_XO symbols correctly.
5669         (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
5670         rather than normal symbol table.
5671         (bfd_xcoff_import_symbol): It's not an error if the symbol is
5672         already defined with the same absolute value.
5673         (xcoff_mark): When considering called symbols, check whether the
5674         descriptor is from a dynamic object, rather than the symbol
5675         itself.
5676         (xcoff_build_ldsyms): Likewise.
5677
5678         * libbfd.c (bfd_get_file_window): Change return type to boolean.
5679         Cast realloc and malloc return values.  If malloc or realloc fail,
5680         set bfd_error_no_memory.
5681         * bfd-in.h (bfd_get_file_window): Change type to boolean.
5682         * bfd-in2.h: Rebuild.
5683
5684 Tue Nov  7 11:53:48 1995  Kim Knuttila  <krk@cygnus.com>
5685
5686         * coff-ppc.c (ppc_record_toc_entry): new function.
5687         (in_reloc_p): changed return value.
5688         (coff_ppc_relocate_section): much rework.
5689         (ppc_allocate_toc_section): new function.
5690         (ppc_process_before_allocation): new function.
5691         (ppc_coff_swap_sym_in_hook): new function.
5692
5693         * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
5694         (coff_link_add_symbols): initialize toc_offset.
5695
5696         * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
5697         (coff_swap_aouthdr_out): Added more sections to the data
5698         dictionary for the pe file header. Also changed linker version
5699         number on the ppc side.
5700         (dir_names): small improvements to the dictionary printing.
5701         (pe_mkobject_hook): save the file level flags.
5702
5703         * libcoff-in.h (coff_link_hash_entry): added toc_offset field
5704         (pe_tdata): added real_flags field
5705         (coff_tdata): added local_toc_sym_map and access macro
5706
5707         * libcoff.h (coff_link_hash_entry): added toc_offset field
5708         (pe_tdata): added real_flags field
5709         (coff_tdata): added local_toc_sym_map and access macro
5710
5711         * coffcode.h (coff_set_alignment_hook): added hook for PE.
5712         (coff_mkobject): init for local_toc_sym_map
5713         (coff_write_object_contents): set the internal_a.magic to
5714         IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
5715         ppc compilers use.
5716
5717 Tue Nov  7 13:48:58 1995  Ian Lance Taylor  <ian@cygnus.com>
5718
5719         * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
5720         entries until both the line number address and the function name
5721         address are too large.
5722
5723         * configure.in: Call AC_CHECK_PROG to find and cache AR.
5724         * configure: Rebuilt.
5725
5726         * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
5727         is defined in the environment.
5728
5729 Tue Nov  7 10:57:24 1995  Jeffrey A Law  (law@cygnus.com)
5730
5731         * som.c (som_get_section_contents_in_window): Define to use
5732         generic version.
5733
5734 Mon Nov  6 17:13:15 1995  Harry Dolan  <dolan@ssd.intel.com>
5735
5736         * coff-i860.c: New file, based on coff-i386.c.
5737         * cpu-i860.c: New file, based on cpu-i386.c.
5738         * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
5739         * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
5740         targets, using i860coff_vec.
5741         * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
5742         trad-core.o and hosts/i860mach3.h.
5743         (i860coff_vec): Use coff-i860.o and cofflink.o.
5744         * configure: Rebuild.
5745         * Makefile.in: Rebuild dependencies.
5746         (ALL_MACHINES): Add cpu-i860.o.
5747         (BFD32_BACKENDS): Add coff-i860.o.
5748         (CFILES): Add cpu-i860.c and coff-i860.c.
5749         * targets.c (i860coff_vec): Declare.
5750         (bfd_target_vector): Add &i860coff_vec. 
5751         * archures.c (bfd_i860_arch): Declare.
5752         (bfd_archures_list): Add &bfd_i860_arch.
5753         * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
5754         (coff_set_flags): Handle bfd_arch_i860.
5755         (coff_write_object_contents): Handle I860 a.out magic number.
5756
5757 Mon Nov  6 14:34:07 1995  Ian Lance Taylor  <ian@cygnus.com>
5758
5759         * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
5760         the created .tc section to 2.
5761         (xcoff_mark): Don't keep a .loader reloc for a call to an
5762         undefined symbol when creating a shared library.
5763         (xcoff_build_ldsyms): When creating a shared library, generate
5764         global linkage code for a call to an undefined symbol.
5765
5766 Sun Nov  5 21:44:13 1995  Ken Raeburn  <raeburn@cygnus.com>
5767
5768         * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
5769         BFD32_BACKENDS, BFD64_BACKENDS.
5770         (.dep1): Put mkdep output in a separate file.
5771         Rebuilt dependencies.
5772
5773         * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
5774         value.
5775
5776         Permit use of mmap when available:
5777
5778         * configure.in: Check for mmap, madvise, mprotect.
5779         * config.in, configure: Regenerated.
5780
5781         * libbfd.c (struct _bfd_window_internal): Define type.
5782         (bfd_init_window, bfd_free_window, bfd_get_file_window): New
5783         functions.
5784         (ok_to_map): New static variable for debugging.
5785         (_bfd_generic_get_section_contents_in_window): New function.
5786         * bfd-in.h (bfd_window_internal): Declare type.
5787         (bfd_window): Define type.
5788         (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
5789         * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
5790         Declare.
5791
5792         * libaout.h (struct aoutdata): Add two window fields.
5793         (obj_aout_sym_window, obj_aout_string_window): New macros.
5794         * aoutx.h (some_aout_object_p): Initialize windows.
5795         (aout_get_external_symbols): Get symbol data and strings in
5796         windows instead of explicitly allocated buffers.
5797         (slurp_symbol_table): Free window instead of memory.
5798         (bfd_free_cached_info): Release windows instead of freeing storage
5799         directly.
5800         (aout_link_free_symbols): Ditto.
5801
5802         * targets.c (bfd_target): Add new field for
5803         get_section_contents_in_window.
5804         (BFD_JUMP_TABLE_GENERIC): Updated.
5805         * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
5806         coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
5807         libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
5808         macros for get_section_contents_in_window field.
5809
5810 Sat Nov  4 12:23:26 1995  Fred Fish  <fnf@cygnus.com>
5811
5812         * core.c: Renamed to corefile.c
5813         * makefile.dos (OBJS): Change core.o to corefile.o
5814         * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
5815         
5816 start-sanitize-gm
5817 Sat Nov  4 10:16:54 1995  Stu Grossman  (grossman@cygnus.com)
5818
5819         * config.bfd (mips*-*-magic*):  Add bfd_elf32_bigmips_vec to
5820         targ_selvecs to allow debugging under Irix-5 native.
5821
5822 end-sanitize-gm
5823 Fri Nov  3 15:54:59 1995  Ian Lance Taylor  <ian@cygnus.com>
5824
5825         * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
5826         to o.  Clobber and restore the list of new csects around the call
5827         to _bfd_generic_link_add_one_symbol, in case it wants to report a
5828         linker error and the linker wants to read the symbol table.  Reset
5829         the line number count of a real section even if it has no relocs.
5830         (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
5831
5832         * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
5833         is too small.
5834
5835 Thu Nov  2 23:16:39 1995  Ian Lance Taylor  <ian@cygnus.com>
5836
5837         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
5838         an undefined symbol in a shared link.
5839
5840         * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
5841         oldtype from bfd_link_order_type to bfd_link_hash_type.  From
5842         phdm@info.ucl.ac.be (Philippe De Muyter).
5843
5844 Wed Nov  1 14:26:02 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
5845
5846         * coff-m88k.c (rtype2howto): New static function.
5847         (RTYPE2HOWTO): Use it rather than a macro definition.
5848
5849         * coffcode.h (coff_write_object_contents): set internal_a.magic
5850         to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
5851
5852         * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
5853         define TRAD_HEADER to new file hosts/delta68.h.
5854         m88*-motorola-sysv*, however, does use ptrace-core.o.
5855         * hosts/delta68.h: New file.
5856
5857         * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
5858         bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
5859
5860 Wed Nov  1 13:51:54 1995  Ken Raeburn  <raeburn@cygnus.com>
5861
5862         * i386linux.c (MY(vec)): Declare before use.
5863
5864 Wed Nov  1 11:45:07 1995  Ian Lance Taylor  <ian@cygnus.com>
5865
5866         * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
5867         Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
5868
5869         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
5870         BFD is not of the right type.
5871         (bfd_elf_get_needed_list): Likewise.
5872         * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
5873         * sunos.c (bfd_sunos_get_needed_list): Likewise.
5874         * xcofflink.c (XCOFF_XVECP): Define.
5875         (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
5876         of the right type.
5877         (bfd_xcoff_import_symbol): Likewise.
5878         (bfd_xcoff_export_symbol): Likewise.
5879         (bfd_xcoff_link_count_reloc): Likewise.
5880         (bfd_xcoff_record_link_assignment): Likewise.
5881         (bfd_xcoff_size_dynamic_sections): Likewise.
5882
5883         * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
5884         table index against the number of symbols for a base relative
5885         reloc.
5886
5887         * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
5888         static function.
5889         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
5890         full_aouthdr flag here...
5891         (_bfd_xcoff_bfd_final_link): ...not here.
5892
5893 Tue Oct 31 12:52:02 1995  Fred Fish  <fnf@cygnus.com>
5894
5895         * libelf.h:  Rename to elf-bfd.h to avoid conflict with
5896         systems that have a system <libelf.h>.
5897         * Makefile.in: Globally replace libelf.h with elf-bfd.h.
5898         * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
5899         elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
5900         elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
5901         elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
5902         elfxx-target.h: Include elf-bfd.h rather than libelf.h.
5903         * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
5904
5905 Tue Oct 31 15:30:07 1995  David Mosberger-Tang  <davidm@azstarnet.com>
5906
5907         * ecoff.c (ecoff_set_symbol_info): Add new parameter weak.  If
5908         set, set BSF_WEAK in symbol.  Change all callers.
5909         (ecoff_get_extr): Set weakext based on BSF_WEAK.
5910         (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
5911         _bfd_generic_link_add_one_symbol.
5912         (ecoff_indirect_link_order): Check that the section tdata relocs
5913         are not NULL before using them.
5914
5915         * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
5916         define TRAD_HEADER as hosts/alphalinux.h.
5917         * configure: Rebuild.
5918         * hosts/alphalinux.h: New file.
5919         * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
5920         not int.
5921
5922 Tue Oct 31 12:34:11 1995  Ian Lance Taylor  <ian@cygnus.com>
5923
5924         * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
5925         C_ECOMM storage classes.
5926
5927         * xcofflink.c (xcoff_mark_symbol): New static function, broken out
5928         of xcoff_mark.
5929         (xcoff_mark): Call xcoff_mark_symbol.
5930         (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
5931         (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
5932         doing it by hand.
5933         (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
5934
5935 Mon Oct 30 14:53:48 1995  Ian Lance Taylor  <ian@cygnus.com>
5936
5937         * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
5938         field.
5939         (xcoff_find_reloc): New static function.
5940         (xcoff_link_add_symbols): Use it.
5941         (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
5942         (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL.  Don't
5943         relocate the value of C_DECL.
5944
5945         * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
5946
5947 Sat Oct 28 01:25:34 1995  steve chamberlain  <sac@slash.cygnus.com>
5948
5949         * cofflink.c (_bfd_coff_generic_relocate_section): Make
5950         callback decide what goes in .relocs.
5951         * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
5952         * peicode.h (pe_mkobject_hook): Only copy aouthdr if
5953         there is one.
5954
5955 Sat Oct 28 01:51:02 1995  Ian Lance Taylor  <ian@cygnus.com>
5956
5957         * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
5958         absolute section.
5959
5960 Fri Oct 27 18:14:39 1995  Ian Lance Taylor  <ian@cygnus.com>
5961
5962         * xcofflink.c: More improvements, mostly to fix handling of
5963         constructors and a few other special cases.
5964         * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
5965         zero, reverting yesterday's change.
5966         * bfd-in.h (bfd_xcoff_link_record_set): Declare.
5967         (bfd_xcoff_link_count_reloc): Declare.
5968         (bfd_xcoff_record_link_assignment): Declare.
5969         * bfd-in2.h: Rebuild.
5970
5971 Fri Oct 27 14:42:15 1995  Niklas Hallqvist  <niklas@appli.se>
5972
5973         * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
5974         aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
5975         i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
5976         i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
5977         ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
5978         Change PAGE_SIZE to TARGET_PAGE_SIZE.
5979
5980         * m68knetbsd.c: Ditto as well as add support for the m68k4k object
5981         format.
5982
5983         * netbsd.h: Double ditto (incl. m68k4k support).  NetBSD's text
5984         segments includes the a.out header.  See to that the magic number
5985         *always* is big-endian.
5986
5987         * config.bfd: Add m68*-hp*-netbsd* case.  Cross-pollinate m68k and
5988         m68k4k NetBSD configurations.
5989
5990         * configure.in, configure: Separate i386 & mips NetBSD
5991         configurations from other BSD ones.  Don't assume DEC is the only
5992         thing NetBSD/mips run on.  Add {m68k,ns32k,sparc}-*-netbsd*
5993         configurations.  Add support for m68k4k NetBSD object format.
5994
5995         * libaout.h: Added M_68K4K_NETBSD magic.
5996
5997         * m68k4knetbsd.c: New file.
5998         
5999         * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
6000
6001         * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
6002         <machine/endian.h>.
6003
6004         * hosts/mipsnbsd.h: New file.
6005         
6006 start-sanitize-gm
6007 Fri Oct 27 09:41:51 1995  Stu Grossman  (grossman@cygnus.com)
6008
6009         * config.bfd:  Add config stuff for mips*-*-magic* to set
6010         targ_defvec to ecoff_big_vec.
6011
6012 end-sanitize-gm
6013 Thu Oct 26 14:16:47 1995  Ian Lance Taylor  <ian@cygnus.com>
6014
6015         * xcofflink.c: Numerous changes to get closer to a working XCOFF
6016         linker.
6017         * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
6018         toc_section, and entry_section fields.
6019         (struct xcoff_section_tdata): Remove ldrel_count field.
6020         * libcoff.h: Rebuild.
6021         * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
6022         fields.
6023         (coff_compute_section_file_positions): If RS6000COFF_C, generate
6024         full a.out header if full_aouthdr is set in xcoff_data.
6025         (coff_write_object_contents): Likewise.  Set o_snentry and o_sntoc
6026         based on sections stored in xcoff_data.
6027         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
6028         fields.
6029         (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
6030         (rs6000coff_vec): Set symbol_leading_char to '.'.
6031         * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
6032         value stored in ret rather than returning a pointer value.
6033         
6034 Wed Oct 25 23:10:39 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6035
6036         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
6037         format for now.
6038
6039 Wed Oct 25 16:19:27 1995  Jeffrey A Law  (law@cygnus.com)
6040
6041         * som.c (som_slurp_string_table): Allocate the strings with malloc
6042         since they're free'd by free_cached_info.
6043         (som_slurp_symbol_table): Similarly for the symbol table.
6044
6045 Wed Oct 25 14:59:22 1995  Per Bothner  <bothner@kalessin.cygnus.com>
6046
6047         * Makefile.in (diststuff):  Don't make headers.
6048
6049 Wed Oct 25 11:32:54 1995  Ian Lance Taylor  <ian@cygnus.com>
6050
6051         * Makefile.in: Rebuild dependencies.
6052
6053         * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
6054         output_bfd is not SunOS.
6055         (bfd_sunos_size_dynamic_sections): Likewise.  Don't scan relocs of
6056         non-SunOS input files.
6057
6058         * xcofflink.c: Extensive changes to support linking shared objects
6059         and generating a .loader section.
6060         * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
6061         (struct xcoff_section_tdata): Add lineno_count, first_symndx,
6062         last_symndx, and ldrel_count fields.
6063         * libcoff.h: Rebuild.
6064         * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
6065         * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
6066         is set.
6067         * bfd-in.h (bfd_xcoff_import_symbol): Declare.
6068         (bfd_xcoff_export_symbol): Declare.
6069         (bfd_xcoff_size_dynamic_sections): Declare.
6070         * bfd-in2.h: Rebuild.
6071
6072 Tue Oct 24 17:44:20 1995  Stan Shebs  <shebs@andros.cygnus.com>
6073
6074         * configure.in: Add xcofflink.o to pmac_xcoff_vec.
6075         * configure: Rebuild.
6076         * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
6077         * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
6078         contents.
6079         (pmac_xcoff_vec): Update to use new xcoff support.
6080         * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
6081         (xcoff_write_armap): Declare buf as unsigned char.
6082         * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
6083
6084         * mpw-make.sed: Generalize subdir_do edit.
6085         
6086 Tue Oct 24 10:25:01 1995  Jeffrey A Law  (law@cygnus.com)
6087
6088         * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
6089         correctly.  Don't initialize asect->vma.
6090
6091 Fri Oct 20 13:23:48 1995  Ken Raeburn  <raeburn@cygnus.com>
6092
6093         * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
6094         something a little less than the page size.
6095
6096 Thu Oct 19 13:06:09 1995  Ian Lance Taylor  <ian@cygnus.com>
6097
6098         * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
6099
6100 Wed Oct 18 16:20:08 1995  steve chamberlain  <sac@slash.cygnus.com>
6101
6102         * coff-i386.c (coff_i386_reloc_type_lookup): New.
6103         * coffcode.h (coff_write_object_contents): If .bss is before
6104         .data us that as data_start.
6105         * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
6106         calc correct.
6107         * peicode.h (add_data_entry): Use _cooked_size of data directory.
6108         (coff_swap_outhdr_out): Hardwire in version number.
6109         
6110 Wed Oct 18 16:50:54 1995  Ken Raeburn  <raeburn@cygnus.com>
6111
6112         * sunos.c (sunos_add_dynamic_symbols): Rename local variables
6113         major and minor to *_vno, since the former are also macros in
6114         SunOS header files.  Cast result of bfd_alloc to appropriate
6115         type.
6116
6117         * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
6118         before assigning to sec_data.
6119
6120 Wed Oct 18 13:25:17 1995  Ian Lance Taylor  <ian@cygnus.com>
6121
6122         * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
6123         now relative to the section, not absolute.
6124         * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
6125         get the file name when there is a N_SO directory name.  When
6126         handling stabs, remember that section->vma was added to the
6127         offset.
6128
6129 Tue Oct 17 18:24:54 1995  Ian Lance Taylor  <ian@cygnus.com>
6130
6131         * sunos.c (struct sunos_link_hash_table): Add needed field.
6132         (sunos_link_hash_table_create): Call bfd_release, not free.
6133         (sunos_link_hash_table_create): Initialize needed field.
6134         (sunos_add_dynamic_symbols): Record needed objects.
6135         (bfd_sunos_get_needed_list): New function.
6136         * bfd-in.h (bfd_sunos_get_needed_list): Declare.
6137         * bfd-in2.h: Rebuild.
6138
6139 Mon Oct 16 14:43:59 1995  steve chamberlain  <sac@slash.cygnus.com>
6140
6141         * libcoff-in.h (pe_data_type.in_reloc_p): New.
6142
6143 Mon Oct 16 10:52:50 1995  Ian Lance Taylor  <ian@cygnus.com>
6144
6145         * bfd-in.h (struct bfd_link_needed_list): Rename from
6146         bfd_elf_link_needed_list.
6147         * bfd-in2.h: Rebuild.
6148         * elf.c, elflink.h, libelf.h: Corresponding changes.
6149
6150         Add start at AIX linker support; no shared libraries yet.
6151         * xcofflink.c: New file.
6152         * configure.in (rs600coff_vec): Use xcofflink.o.
6153         * configure: Rebuild.
6154         * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
6155         fields.
6156         (struct xcoff_section_tdata): Define.
6157         (xcoff_section_data): Define macro.
6158         (_bfd_xcoff_bfd_link_hash_table_create): Declare.
6159         (_bfd_xcoff_bfd_link_add_symbols): Declare.
6160         (_bfd_xcoff_bfd_final_link): Declare.
6161         (_bfd_ppc_xcoff_relocate_section): Declare.
6162         * libcoff.h: Rebuild.
6163         * coff-rs6000.c: Clean up a bit.
6164         (xcoff_mkobject): Default modtype to 1L, not RE.  Initialize
6165         cputype, csects, and debug_indices.
6166         (xcoff_copy_private_bfd_data): Copy cputype.
6167         (xcoff_howto_table): Rename from rs6000coff_howto_table.
6168         (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
6169         (xcoff_reloc_type_lookup): Rename from
6170         rs6000coff_reloc_type_lookup.
6171         (coff_relocate_section): Define.
6172         (_bfd_xcoff_sizeof_headers): Define.
6173         (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
6174         (_bfd_xcoff_bfd_relax_section): Define.
6175         (_bfd_xcoff_bfd_link_split_section): Define.
6176         (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
6177         coff.
6178         * coffcode.h (coff_compute_section_file_positions): If AIX,
6179         increment sofar by SMALL_AOUTSZ if not executable.
6180         (coff_write_object_contents): If AIX, always output an a.out
6181         header; if not executable, header size of SMALL_AOUTSZ.
6182         * hash.c (struct bfd_strtab_hash): Add xcoff field.
6183         (_bfd_stringtab_init): Initialize xcoff field.
6184         (_bfd_xcoff_stringtab_init): New function.
6185         (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
6186         (_bfd_stringtab_emit): In XCOFF mode, write out length.
6187         * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
6188         * libbfd.h: Rebuild.
6189         * Makefile.in: Rebuild dependencies.
6190         (BFD32_BACKENDS): Add xcofflink.o.
6191         (CFILES): Add xcofflink.c.
6192
6193         * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
6194         SEC_NO_FLAGS, for .acommon section.  From Peter Schauer
6195         <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
6196
6197 Sat Oct 14 21:36:02 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6198
6199         * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
6200
6201 Fri Oct 13 17:48:43 1995  Ken Raeburn  <raeburn@cygnus.com>
6202
6203         * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
6204         * config.in: Regenerated.
6205
6206         * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
6207         (_bfd_chunksize): New variable.
6208         (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
6209         for obstack chunk size.
6210         * configure.in: Check for getpagesize.
6211         * configure: Regenerated.
6212
6213         Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6214
6215         * trad-core.c (rawptr): Make it a local variable of
6216         ptrace_unix_core_file_p.
6217
6218 Fri Oct 13 11:22:01 1995  steve chamberlain  <sac@slash.cygnus.com>
6219
6220         * coff-arm.c (in_reloc_p): New.
6221         * coff-i386.c (in_reloc_p): New.
6222         * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
6223         (coff_write_object_contents): Only set has_reloc_section
6224         if PE_IMAGE.
6225         * cofflink.c (_bfd_coff_generic_relocate_section): Call
6226         in_reloc_p to decide if reloc should be emitted.
6227         * libcoff.h (pe_data_type.in_reloc_p): New.
6228         * peicode.h (pe_mkobject): Initialize in_reloc_p.
6229
6230 Wed Oct 11 00:49:29 1995  Ian Lance Taylor  <ian@cygnus.com>
6231
6232         * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
6233         (_bfd_coff_read_internal_relocs): Likewise.
6234         * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
6235         (_bfd_coff_read_internal_relocs): Likewise.
6236
6237         * elflink.h (elf_link_add_object_symbols): Correct conditions
6238         under which type and size change warnings are issued.
6239
6240 Tue Oct 10 18:32:46 1995  Ian Lance Taylor  <ian@cygnus.com>
6241
6242         * coffgen.c (coff_count_linenumbers): Don't count line numbers for
6243         a symbol which is not in a real section.
6244         (coff_write_native_symbol): Corresponding change.
6245
6246         * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
6247         coff_link_hash_newfunc and make non-static.
6248         (_bfd_coff_link_hash_table_init): New function, broken out of
6249         _bfd_coff_link_hash_table_create.
6250         (_bfd_coff_link_hash_table_create): Use it.
6251         (process_embedded_commands): Make static.
6252         * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
6253         (_bfd_coff_link_hash_table_init): Declare.
6254         * libcoff.h: Rebuild.
6255
6256         * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
6257         field in XCOFF tdata.
6258         (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
6259         U802ROMAGIC, for clarity.  Try to set arch and machine correctly
6260         based on cputype stored in a.out header, or in n_type of initial
6261         .file symbol.
6262         (coff_write_object_contents): Set cputype correctly in a.out
6263         header.
6264         (coff_slurp_symbol_table): Add casts to file_ptr to avoid
6265         warnings.
6266         * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
6267         (coff_swap_aouthdr_out): Swap out cputype field.  Don't clear
6268         old resv1 field.
6269         * libcoff-in.h (struct xcoff_tdata): Add cputype field.
6270         * libcoff.h: Rebuild.
6271
6272         * cpu-rs6000.c (rs6000_compatible): New static function.
6273         (bfd_rs6000_arch): Use it.
6274         * cpu-powerpc.c (powerpc_compatible): New static function.
6275         (arch_info_struct): Define various flavours of PowerPC.
6276         (bfd_powerpc_arch): Use powerpc_compatible.  Point at
6277         arch_info_struct.
6278
6279 Tue Oct 10 10:50:46 1995  Fred Fish  <fnf@cygnus.com>
6280
6281         * Makefile.in (FLAGS_TO_PASS):  Remove BISON.
6282
6283 Tue Oct 10 01:28:29 1995  Ian Lance Taylor  <ian@cygnus.com>
6284
6285         * elflink.h (elf_link_add_object_symbols): Don't warn about
6286         changing the size or type if the old definition was weak.
6287
6288 Mon Oct  9 11:24:08 1995  Ian Lance Taylor  <ian@cygnus.com>
6289
6290         * coffcode.h (combined_entry_type): Add fix_line field.
6291         (coff_slurp_line_table): Warn if we try to set the lineno field of
6292         a symbol twice.
6293         (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
6294         C_EINCL by setting fix_line.  Fix C_BSTAT symbol value.
6295         * coffgen.c (coff_mangle_symbols): Handle fix_line.
6296         (coff_write_symbol): Only use N_DEBUG if the symbol is in the
6297         absolute section.
6298         (coff_print_symbol): Print fix_value symbols in a useful fashion.
6299         * libcoff.h: Rebuild.
6300
6301         * libcoff-in.h (struct xcoff_tdata): Define.
6302         (xcoff_data): Define.
6303         * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
6304         * bfd-in2.h, libcoff.h: Rebuild.
6305         * coff-rs6000.c (xcoff_mkobject): New static function.
6306         (coff_mkobject): Define.
6307         (xcoff_copy_private_bfd_data): New static function.
6308         (coff_bfd_copy_private_bfd_data): Define.
6309         (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
6310         signed to bitfield.
6311         (rs6000coff_vec): Add DYNAMIC to object_flags.
6312         * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
6313         .loader sections specially.
6314         (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
6315         section alignment from the XCOFF tdata information.
6316         (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
6317         F_SHROBJ, and copy the extra a.out header information into the
6318         XCOFF tdata structure.
6319         (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
6320         F_DYNLOAD and the extra a.out header information.
6321         (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
6322         C_HIDEXT symbol with attached csect information.
6323         * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
6324         in the o_maxdata field.
6325         (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
6326         * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
6327         end if BSF_NOT_AT_END is set.
6328
6329         * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
6330         _bfd_read_ar_hdr_fn.
6331         * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
6332         * bfd-in2.h, libbfd.h: Rebuild.
6333         * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
6334         return value.
6335         (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
6336         (bfd_slurp_bsd_armap_f2): Likewise.
6337         (_bfd_slurp_extended_name_table): Likewise.
6338
6339 Fri Oct  6 16:18:35 1995  Ken Raeburn  <raeburn@cygnus.com>
6340
6341         Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6342
6343         * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
6344         when the symbol table is empty.
6345
6346         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
6347         space for section symbols, since we don't output them either.
6348         (elf_m68k_adjust_dynindx): Removed.
6349
6350         * ptrace-core.c (rawptr): Make it a local variable of
6351         ptrace_unix_core_file_p.
6352
6353 Fri Oct  6 12:24:47 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6354
6355         * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
6356         NULL.
6357
6358         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
6359         Mac object file formats.
6360
6361 Fri Oct  6 12:04:02 1995  Ian Lance Taylor  <ian@cygnus.com>
6362
6363         * coffgen.c (coff_fix_symbol_name): Don't try to set up file
6364         auxent if there isn't one.
6365         (coff_write_symbols): If there is no file auxent, use SYMNMLEN
6366         rather than FILNMLEN as the maximum name length.
6367
6368         * coffcode.h (bfd_coff_backend_data): Add new field
6369         _bfd_coff_print_aux.
6370         (bfd_coff_print_aux): New static function.
6371         (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
6372         scnlen field of an XTY_LD csect aux entry.
6373         (coff_print_aux): New static function.
6374         (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
6375         in coff_pointerize_aux_hook.
6376         (bfd_coff_std_swap_table): Initialize new field.
6377         * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
6378         * libcoff.h: Rebuild.
6379         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
6380         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6381
6382         * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
6383         if there are symbols, for native AIX ld compatibility.
6384
6385         * coffcode.h (bfd_coff_backend_data): Add new field
6386         _bfd_coff_pointerize_aux_hook.
6387         (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
6388         or I960, and as 0 otherwise.
6389         (bfd_coff_std_swap_table): Initialize new field.
6390         * libcoff.h: Rebuild.
6391         * coffgen.c (coff_pointerize_aux): Change parameters  to take
6392         symbol pointer instead of type and class, and to take aux index.
6393         Call _bfd_coff_pointerize_aux_hook if it is defined.
6394         (coff_get_normalized_symtab): Always call coff_pointerize_aux.
6395         * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
6396         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6397
6398         * coff-rs6000.c: Add full support for AIX archives.  Rewrite old
6399         read-only/host-only support.
6400
6401         * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
6402         BSF_LOCAL.
6403         (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
6404         RS6000COFF_C.
6405
6406         * targets.c (bfd_target): Add _bfd_read_ar_hdr field.  Modify
6407         BFD_JUMP_TABLE_ARCHIVE accordingly.
6408         * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
6409         (_bfd_compute_and_write_armap): Declare.
6410         (_bfd_generic_read_ar_hdr): Declare.
6411         (_bfd_read_ar_hdr): Define.
6412         (_bfd_noarchive_read_ar_hdr): Define.
6413         (_bfd_archive_bsd_read_ar_hdr): Define.
6414         (_bfd_archive_coff_read_ar_hdr): Define.
6415         * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
6416         _bfd_read_ar_hdr instead.
6417         (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
6418         (_bfd_compute_and_write_armap): Rename from
6419         compute_and_write_armap.  Make non-static.  Change all callers.
6420         * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
6421         than _bfd_snarf_ar_hdr.
6422         * aout-target.h (MY_read_ar_hdr): Define if not defined.
6423         * ieee.c (ieee_read_ar_hdr): Define.
6424         * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
6425         * oasys.c (oasys_read_ar_hdr): Define.
6426         * som.c (som_read_ar_hdr): Define.
6427         * bfd-in2.h, libbfd.h: Rebuild.
6428
6429 Thu Oct  5 14:04:07 1995  steve chamberlain  <sac@slash.cygnus.com>
6430
6431         * peicode.c (coff_swap_filehdr_in): If symptr is
6432         zero, there aren't any symbols, even if nsyms is set.
6433
6434 Thu Oct  5 11:45:02 1995  Ian Lance Taylor  <ian@cygnus.com>
6435
6436         * libecoff.h (struct ecoff_backend_data): Add adjust_headers
6437         field.
6438         * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
6439         sections, and set styp correctly for them: .got, .hash, .dynamic,
6440         .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
6441         (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
6442         types.
6443         (ecoff_sort_hdrs): New static function.
6444         (ecoff_compute_section_file_positions): Return boolean, not void.
6445         Sort the sections by VMA before looking through them.  Put the
6446         first non SEC_ALLOC section on a new page.  Put every SEC_ALLOC
6447         section on an appropriate boundary within the page.
6448         (ecoff_compute_reloc_file_positions): Check return value of
6449         ecoff_compute_section_file_positions.
6450         (_bfd_ecoff_set_section_contents): Likewise.
6451         (_bfd_ecoff_write_object_contents): Check for various Alpha
6452         section types when incrementing text_size and data_size.  Call
6453         adjust_headers backend function if it exists.
6454         * coff-alpha.c (alpha_adjust_headers): New static function.
6455         (alpha_ecoff_backend_data): Initialize adjust_headers field.
6456         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6457
6458         * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
6459
6460 Wed Oct  4 18:15:02 1995  Jeff Law  (law@hurl.cygnus.com)
6461
6462         * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
6463         of ALTERNATE_AIX_CORE_FORMAT.
6464         * configure.in (aix4): No longer need CORE_FLAGS.
6465         * configure: Updated.
6466
6467 Wed Oct  4 15:36:36 1995  Ken Raeburn  <raeburn@cygnus.com>
6468
6469         NS32k changes from Ian Dall:
6470         * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
6471         macros.
6472         (aout_link_input_section_std, aout_link_input_section_ext,
6473         aout_link_reloc_link_order): Call them instead of _bfd_*
6474         versions.
6475         * aout-target.h (MY_exec_header_not_counted): New macro, defaults
6476         to zero.
6477         (backend_data): Use it instead of hardcoded zero.
6478
6479         * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
6480         (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
6481
6482         * ns32knetbsd.c: Include bfd.h.
6483         (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
6484         (MY_bfd_reloc_type_lookup): Declare function too.
6485         * pc532-mach.c (set_sizes): Don't declare.
6486         (MY_text_includes_header, MY_exec_header_not_counted): Define.
6487         (backend_data, MY_backend_data): Don't define.
6488
6489         * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
6490         ns32k-*-lites* like ns32k-*-netbsd*.
6491
6492         * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
6493         compile on lites.
6494
6495 Wed Oct  4 14:15:52 1995  Ian Lance Taylor  <ian@cygnus.com>
6496
6497         * coffcode.h (coff_write_object_contents): Restore setting
6498         f_timdat to 0, deleted on August 22.
6499
6500 Tue Oct  3 16:28:32 1995  steve chamberlain  <sac@slash.cygnus.com>
6501
6502         * coffcode.h (coff_bfd_copy_private_symbol_data,
6503         coff_bfd_copy_private_section_data,
6504         coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
6505         * peicode.h (coff_bfd_copy_private_bfd_data): New
6506         (pe_bfd_copy_private_bfd_data): New.
6507         (coff_swap_scnhdr_in): Swap bss size into the right place.
6508         (pe_print_private_bfd_data): Add some newlines.
6509
6510 Tue Oct  3 11:53:04 1995  Jeff Law  (law@hurl.cygnus.com)
6511
6512         * som.c (setup_sections): Don't die if a space has no subspaces.
6513
6514 Mon Oct  2 14:08:55 1995  Ian Lance Taylor  <ian@cygnus.com>
6515
6516         * elflink.h (elf_link_add_object_symbols): Don't let a weak
6517         dynamic symbol override a common symbol.  Don't change the size or
6518         type if they have been set and the new symbol is not a definition.
6519         Warn if the size or type changes.
6520
6521 Sun Oct  1 01:34:41 1995  Jeff Law  (law@hurl.cygnus.com)
6522
6523         * som.c (som_begin_writing): Don't write the symbol table or
6524         symbol  strings.
6525         (som_finish_writing): Write them here.  Place them after the
6526         subspace data, but before the relocs.
6527
6528 Fri Sep 29 11:01:55 1995  Ian Lance Taylor  <ian@cygnus.com>
6529
6530         * sunos.c (sunos_add_one_symbol): Just pass false, not
6531         info->shared_library, to sunos_create_dynamic_sections.
6532         (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
6533         section.
6534         (sunos_check_dynamic_reloc): Remove .text section assertion.
6535
6536 Thu Sep 28 18:48:47 1995  Stan Shebs  <shebs@andros.cygnus.com>
6537
6538         * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
6539         * configure, configure.in: Add pmac_xcoff_vec case.
6540         * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
6541         * coff-pmac.c: New file, PowerMac XCOFF support.
6542         * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
6543         * targets.c (pmac_xcoff_vec): Declare.
6544
6545         * mpw-config.in: Various changes to be compatible with the
6546         autoconf-based configury.
6547         * mpw-make.sed: New file, sed commands to translate Unix
6548         makefile into MPW syntax.
6549         * mpw-make.in: Remove.
6550         * hosts/mpw.h: Remove.
6551         * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
6552         true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
6553
6554 Thu Sep 28 17:06:23 1995  steve chamberlain  <sac@slash.cygnus.com>
6555
6556         * binary.c (binary_get_symtab): Return an empty string on error.
6557         * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
6558
6559 Thu Sep 28 15:30:44 1995  Kim Knuttila  <krk@nellie>
6560
6561         * coff-ppc.c: Reformatted according to gnu conventions
6562                       Removed irrelevant "if 0" code
6563
6564 Thu Sep 28 11:19:53 1995  Ian Lance Taylor  <ian@cygnus.com>
6565
6566         * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
6567         symbols rather than as indirect symbols.
6568         (MY(slurp_symbol_table)): Don't do anything special about
6569         secondary symbols.
6570
6571         * coffcode.h (coff_new_section_hook): Make sure that the alignment
6572         of .ctors and .dtors sections is no larger than 2.
6573
6574         * sunos.c (sunos_add_one_symbol): Don't change
6575         bfd_link_hash_common to bfd_link_hash_new, since it may be on the
6576         undef list.
6577         (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
6578         dynamic symbols when creating a shared library.
6579         (sunos_scan_ext_relocs): Handle relocs correctly when creating a
6580         shared library.
6581         (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
6582         written even if it is not defined in a regular object.
6583         (sunos_write_dynamic_symbol): Use plt_offset for the address of
6584         the jump table reloc.  Add an assertion.  Use RELOC_JMP_SLOT
6585         rather than the constant 22.
6586         (sunos_check_dynamic_reloc): Handle creating a shared library.
6587         (sunos_finish_dynamic_link): Set the first entry in the GOT to
6588         zero when creating a shared library.
6589         * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
6590         write it out at the start of the symbol table.
6591
6592         * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
6593
6594 Thu Sep 28 00:58:05 1995  Doug Evans  <dje@deneb.cygnus.com>
6595
6596         * config.bfd: Add arm-*-coff.
6597         * configure.in, configure: Add armcoff_{little,big}_vec.
6598         * targets.c (armcoff_{little,big}_vec): Declare.
6599         (bfd_target_vector): Add armcoff_{little,big}_vec.
6600         * coff-arm.c (armcoff_{little,big}_vec): Always define.
6601
6602 Wed Sep 27 10:37:14 1995  Ian Lance Taylor  <ian@cygnus.com>
6603
6604         * targets.c (bfd_find_target): Remove debugging code.
6605
6606 Wed Sep 27 07:23:39 1995  Kim Knuttila  <krk@nellie>
6607
6608         * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE 
6609         support on powerpc.
6610         * Makefile.in: added *-ppc files
6611         * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
6612         allow pe based .o's to be shared with other tools on ppc/NT
6613         * config.bfd: added powerpc[le]-[pe|winnt] config support
6614         * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec 
6615         * peicode.h: Added more section flags for PE on ppc
6616                      Added coff_swap_filehdr_out to allow peicode.h to be
6617                      used for non-image PE files on ppc.
6618                      Check for image, or not, before copying pe_opthdr
6619         * targets.c: Added new bfd's
6620         * targets.c: Removed two inactive bfds that shouldn't have made it this
6621                      far.
6622
6623 Tue Sep 26 14:06:41 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6624
6625         * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
6626         explicit values to initialize all relocs.  Change all users.
6627         (ppc_elf_brtaken_inner): New function to handle branch predicition
6628         relocs.
6629         (ppc_elf_brtaken_reloc): Ditto.
6630         (ppc_elf_howto_raw): Use new functions.  Make sure all unsupported
6631         relocs use ppc_elf_unsupported_reloc.
6632         (ppc_elf_merge_private_bfd_data): Keep track of whether an error
6633         needs to be reported.
6634         (ppc_elf_relocate_section): Support branch prediction relocs.
6635
6636 Tue Sep 26 12:48:05 1995  Ian Lance Taylor  <ian@cygnus.com>
6637
6638         * bfd.c (bfd_assert): Remove \n from string passed to
6639         _bfd_error_handler.
6640
6641         * coff-i386.c: (TWO_DATA_SECS): Don't define.
6642         * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
6643         (bfd_coff_make_section_hook): Don't define.
6644         (coff_make_section_hook): Remove.
6645         (sec_to_styp_flags): Remove TWO_DATA_SECS case.
6646         (styp_to_sec_flags): Likewise.
6647         (coff_write_object_contents): Likewise.
6648         (bfd_coff_std_swap_table): Don't initialize make_section_hook
6649         field.
6650         * libcoff.h: Rebuild.
6651         * coffgen.c (make_a_section_from_file): Just call
6652         bfd_make_section_anyway, not bfd_make_section or
6653         bfd_coff_make_section_hook.
6654         * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
6655         * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
6656         * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
6657         make_section_hook field.
6658         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6659
6660         * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
6661         pointers into value field for warning and indirect symbols; just
6662         leave the value field alone.
6663         * linker.c (generic_link_add_symbol_list): Use next symbol for
6664         warning and indirect symbols, rather than looking in symbol value.
6665         * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
6666         parameter.  Change all callers.  Remove support for indirect
6667         symbols; it didn't work anyhow.
6668         (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
6669         * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
6670         * bfd-in2.h: Rebuild.
6671
6672 Mon Sep 25 16:04:09 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6673
6674         * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
6675         go back to telling the tools this reloc operates on 32 bits.
6676
6677 Mon Sep 25 11:48:02 1995  Ian Lance Taylor  <ian@cygnus.com>
6678
6679         * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
6680         rather than a direct fprintf.
6681         * archive.c (_bfd_write_archive_contents): Likewise.
6682         * coffcode.h (coff_slurp_symbol_table): Likewise.
6683         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
6684         (ppc_elf_unsupported_reloc): Likewise.
6685         (ppc_elf_relocate_section): Likewise.
6686         * i386linux.c (linux_tally_symbols): Likewise.
6687         (linux_finish_dynamic_link): Likewise.
6688         * osf-core.c (osf_core_core_file_p): Likewise.
6689         * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
6690         * som.c (som_sizeof_headers): Likewise.
6691         * srec.c (srec_bad_byte): Likewise.
6692         * bfd.c (bfd_assert): Likewise.  Also change file to be const.
6693         * libbfd-in.h (bfd_assert): Declare first parameter const.
6694         * libbfd.h: Rebuild.
6695         * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
6696         bfd_reloc_overflow is enough.
6697         * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
6698         * coff-h8500.c (rtype2howto): Likewise.
6699         * coff-z8k.c (rtype2howto): Likewise.
6700         * coffcode.h (dummy_reloc16_extra_cases): Likewise.
6701         * elf.c (_bfd_elf_get_lineno): Likewise.
6702         (_bfd_elf_no_info_to_howto): Likewise.
6703         (_bfd_elf_no_info_to_howto_rel): Likewise.
6704         * hp300hpux.c (convert_sym_type): Likewise.
6705         (MY(swap_std_reloc_in)): Likewise.
6706         * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
6707
6708         * libaout.h (struct aoutdata): Add line_buf field.
6709         * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
6710         and filename_buffer.  Instead, use a malloc buffer stored in the
6711         new line_buf field.  Remove length restrictions.
6712
6713         * coffgen.c (string_size): Remove static variable.
6714         (debug_string_size, debug_string_section): Likewise.
6715         (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
6716         and debug_string_size_p parameters.  Use them instead of the
6717         global variables.  Change all callers.
6718         (coff_write_symbol): Likewise.
6719         (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
6720         (coff_write_symbols): Add local variables to replace removed
6721         global variables.
6722
6723         * libcoff-in.h (struct coff_section_tdata): Add offset, i,
6724         function, and line_base fields.
6725         * libcoff.h: Rebuild.
6726         * coffgen.c (coff_find_nearest_line): Use section tdata to cache
6727         information, rather than using static variables.
6728
6729         * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
6730         file.  From Peter DeWolf <pld@amt.tay1.dec.com>.
6731
6732         * init.c (initialized): Remove static variable.
6733         (bfd_init): Don't bother setting initialized.
6734         (bfd_check_init): Remove.
6735         * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
6736         * libbfd.h: Rebuild.
6737
6738 Sat Sep 23 01:22:23 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6739
6740         * rs6000-core.c (rs6000coff_core_p):  Don't check the core file
6741         size for full core dumps. Copy core file header to private data.
6742         (rs6000coff_core_file_failing_command,
6743         rs6000coff_core_file_failing_signal):  New functions to extract
6744         the file name and terminating signal from the core file.
6745         * coff-rs6000.c:  Use them.
6746
6747 Fri Sep 22 17:44:47 1995  Ian Lance Taylor  <ian@cygnus.com>
6748
6749         Change arch info to be const, initialized at compile time.
6750         * archures.c: Reindent many functions.  Change CONST to const.
6751         (bfd_arch_info_type): Make arch_name const.  Remove disassemble;
6752         nothing set it anyhow.  Make next const.
6753         (bfd_arch_info_list): Remove.
6754         (bfd_archures_list): Rename from archures_init_table.  Change from
6755         a table of function pointers to a table of bfd_arch_info_type
6756         structure addresses.
6757         (bfd_scan_arch): Rewrite accordingly.  Return a const pointer.
6758         (bfd_lookup_arch): Likewise.
6759         (bfd_set_arch_info): Rewrite accordingly.  Change argument to be a
6760         const pointer.
6761         (bfd_default_arch_struct): Make const.
6762         (bfd_arch_init, bfd_arch_linkin): Remove.
6763         (bfd_get_arch_info): Return a const pointer.
6764         * init.c (bfd_init): Don't call bfd_arch_init.
6765         * bfd.c (struct _bfd): Make arch_info const.
6766         * bfd-in2.h: Rebuild.
6767         * libbfd.h: Rebuild.
6768         * configure.in: Put & before everything in $selarchs.
6769         * configure: Rebuild.
6770         * cpu-*.c: Change bfd_*_arch from a function which calls
6771         bfd_arch_linkin to a const structure.
6772         * ieee.c (ieee_object_p): Make arch const.
6773
6774 Fri Sep 22 16:23:18 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
6775
6776         * reloc.c (bfd_reloc_code_type): Add relocations to support all of
6777         PowerPC V.4.
6778         * bfd-in2.h: Regenerate.
6779         * libbfd.h: Regenerate.
6780
6781         * elf32-ppc.c (reloc_type): Update names to match current draft.
6782         (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
6783         relative.  Update names to current V.4 draft.
6784         (ppc_elf_reloc_type_lookup): Add support for more relocations.
6785         (ppc_elf_relocate_section): Rename relocations to match draft.
6786
6787 Thu Sep 21 21:53:18 1995  Michael Meissner  <meissner@cygnus.com>
6788
6789         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
6790         compiled with -mrelocatable-lib to be linked with either normal
6791         modules or -mrelocatable modules.
6792
6793 Wed Sep 20 12:03:26 1995  Ian Lance Taylor  <ian@cygnus.com>
6794
6795         * coffcode.h (coff_write_object_contents): Clear the vstamp field
6796         in the a.out header.
6797
6798         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
6799         a reloc against a local symbol, even if it's not a section.
6800
6801 Tue Sep 19 17:02:26 1995  Ian Lance Taylor  <ian@cygnus.com>
6802
6803         * targets.c (bfd_target): Remove unused align_power_min field.
6804         * bfd-in2.h: Rebuild.
6805         * All backends: Remove initialization of align_power_min.
6806
6807 Tue Sep 19 14:02:21 1995  steve chamberlain  <sac@slash.cygnus.com>
6808
6809         * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
6810
6811 Mon Sep 18 14:35:01 1995  Arne H. Juul  <arnej@pvv.unit.no>
6812
6813         * config.bfd (mips-dec-netbsd*): New target.
6814         * configure.host (mips-dec-netbsd*): New host.
6815         * configure.in (mips-dec-netbsd*): New native.
6816         * configure: Rebuild.
6817
6818 Fri Sep 15 10:24:36 1995  Ian Lance Taylor  <ian@cygnus.com>
6819
6820         Make the COFF backend linker merge common types:
6821         * cofflink.c (struct coff_debug_merge_element): Define.
6822         (struct coff_debug_merge_type): Define.
6823         (struct coff_debug_merge_hash_entry): Define.
6824         (struct coff_debug_merge_hash_table): Define.
6825         (coff_debug_merge_hash_table_init): Define.
6826         (coff_debug_merge_hash_table_free): Define.
6827         (coff_debug_merge_hash_lookup): Define.
6828         (struct coff_final_link_info): Add debug_merge field.
6829         (coff_debug_merge_hash_newfunc): New static function.
6830         (_bfd_coff_final_link): Allocate and free debug_merge table.
6831         (coff_link_input_bfd): Merge identical enum, struct and union
6832         types.
6833
6834 Thu Sep 14 14:53:58 1995  Ian Lance Taylor  <ian@cygnus.com>
6835
6836         Convert i960 COFF to use COFF backend linker.
6837         * coff-i960.c (coff_i960_relocate): Use a coff_section_data
6838         structure to store the symbol being used.
6839         (coff_i960_start_final_link): New static function.
6840         (coff_i960_relocate_section): New static function.
6841         (coff_i960_adjust_symndx): New static function.
6842         (coff_start_final_link): Define.
6843         (coff_relocate_section): Define.
6844         (coff_adjust_symndx): Define.
6845         * coffcode.h (bfd_coff_backend_data): Add new callback function
6846         _bfd_coff_start_final_link.
6847         (bfd_coff_start_final_link): Define.
6848         (coff_start_final_link): Define if not defined.
6849         (bfd_coff_std_swap_table): Add coff_start_final_link.
6850         * cofflink.c (_bfd_coff_internal_syment_name): Make globally
6851         visible.
6852         (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
6853         function callback is not NULL.
6854         * libcoff-in.h (struct coff_section_tdata): Add tdata field.
6855         (_bfd_coff_internal_syment_name): Declare.
6856         * libcoff.h: Rebuild.
6857         * configure.in (icoff_big_vec): Add cofflink.o.
6858         (icoff_little_vec): Likewise.
6859         * configure: Rebuild.
6860
6861 Wed Sep 13 17:38:23 1995  Fred Fish  <fnf@rtl.cygnus.com>
6862
6863         * Makefile.in (clean-info): Remove extraneous tab from line
6864         following action.
6865
6866 Wed Sep 13 13:27:53 1995  Ian Lance Taylor  <ian@cygnus.com>
6867
6868         * cofflink.c (coff_link_input_bfd): Fail if a section with no
6869         contents has relocs.
6870
6871 Thu Sep 12 12:45:34 1995  steve chamberlain  <sac@slash.cygnus.com>
6872
6873         * coffcode.h (coff_compute_section_file_positions): Keep the
6874         raw size safe. 
6875         (coff_write_object_contents): Remember if it's a relocatable
6876         file.
6877         * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
6878         * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
6879         if relocatable file. Swap out saved raw size.
6880
6881 Tue Sep 12 12:14:33 1995  Ian Lance Taylor  <ian@cygnus.com>
6882
6883         * Makefile.in (do_maintainer_clean): Rename from do_realclean.
6884         (maintainer-clean): Rename from realclean, passing
6885         maintainer-clean down to subdirectories, but leave realclean as a
6886         synonym.
6887
6888         * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
6889         warning callback.
6890
6891         * dep-in.sed: Remove config.h from generated dependencies.
6892
6893         * sunos.c (sunos_slurp_dynamic_symtab): New static function,
6894         broken out of sunos_canonicalize_dynamic_symtab.
6895         (sunos_canonicalize_dynamic_symtab): Call new function
6896         sunos_slurp_dynamic_symtab.
6897         (sunos_add_dynamic_symbols): Add three new parameters.  Return the
6898         dynamic symbol table to the caller.
6899         * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
6900         callback to override the symbols being read.
6901         * libaout.h (struct aout_backend_data): Add three new parameters
6902         to add_dynamic_symbols callback.
6903
6904         Extensive minor changes to avoid various gcc warnings.  Also:
6905         * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
6906         * archures.c (bfd_arch_info_type): Change mach field from long to
6907         unsigned long.
6908         (bfd_lookup_arch): Change machine parameter from long to unsigned
6909         long.
6910
6911 Mon Sep 11 10:55:47 1995  Ian Lance Taylor  <ian@cygnus.com>
6912
6913         * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
6914         a symbol with a non-zero plt_offset.
6915
6916 Fri Sep  8 11:47:24 1995  Ian Lance Taylor  <ian@cygnus.com>
6917
6918         * elfcode.h (align_file_position): Remove; not used.
6919
6920         * configure.in: Only check for <sys/procfs.h> on a native system,
6921         and make sure it defines prstatus_t.
6922         * configure: Rebuild.
6923
6924 Thu Sep  7 12:48:01 1995  Ian Lance Taylor  <ian@cygnus.com>
6925
6926         * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
6927
6928         * config.in: Rename from config.h.in.
6929         * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
6930         Check for config.h:config.in when creating stamp-h.
6931         * configure: Rebuild.
6932         * Makefile.in (stamp-h): Depend upon config.in rather than
6933         config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
6934         calling config.status.
6935
6936         * Makefile.in (do_distclean): Remove config.h and stamp-h.
6937         (Makefile): Just rebuild Makefile.
6938         (config.h, stamp-h): New targets.
6939         * configure.in: Create stamp-h when rebuilding config.h.
6940         * configure: Rebuild.
6941
6942 Wed Sep  6 15:00:33 1995  Ian Lance Taylor  <ian@cygnus.com>
6943
6944         * configure.in: Call AC_CONFIG_HEADER.  Substitute
6945         HOST_64BIT_LONG.  Check that various header files exist.  Check
6946         that fcntl exists.  Call BFD_BINARY_FOPEN.  Check whether malloc
6947         and/or free need to be declared.  Don't make a link to sysdep.h.
6948         Define TRAD_HEADER for various hosts.
6949         * configure: Rebuild.
6950         * configure.host: Don't set my_host.  Add definitions taken from
6951         host header files for various entries.  Remove entries which now
6952         do nothing.
6953         * acconfig.h: New file.
6954         * config.h.in: New file, built by autoheader.
6955         * sysdep.h: New file.
6956         * Makefile.in (do_distclean): Don't remove sysdep.h.
6957         (RECONFIG): Remove.
6958         (LOCAL_H_DEPS): New variable.
6959         ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
6960         $(RECONFIG).
6961         ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
6962         ($(OPTIONAL_BACKENDS)): Likewise.
6963         (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
6964         looking through sysdep.h.
6965         * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
6966         (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
6967         (fprintf_vma, sprintf_vma): Likewise.
6968         (int64_type, uint64_type): Don't define.
6969         * bfd-in2.h: Rebuild.
6970         * archures.c, bfd.c, srec.c: Include <ctype.h>.
6971         * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
6972         * lynx-core.c: Include stuff from old hosts/lynx.h.
6973         * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
6974         rather than NO_FCNTL.
6975         * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
6976         rather than NATIVE_HPPAHPUX_COMPILER.
6977         * trad-core.c: Don't include <errno.h>.  Include TRAD_HEADER if it
6978         is defined.
6979         * hosts/*.h: Remove all header files which merely include,
6980         declare, and define things.  Leave header files which define
6981         information needed by trad-core.c.
6982
6983         * aclocal.m4 (BFD_BINARY_FOPEN): Define.
6984         (BFD_CC_FOR_BUILD): Define.
6985         * configure.in: Use BFD_CC_FOR_BUILD.
6986         * configure: Rebuild.
6987
6988 Tue Sep  5 19:35:28 1995  Ian Lance Taylor  <ian@cygnus.com>
6989
6990         * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
6991         * configure: Rebuild.
6992
6993         * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
6994         a global symbol.
6995
6996 Tue Sep  5 12:48:26 1995  Jason Molenda   (crash@phydeaux.cygnus.com)
6997
6998         * config.bfd: i386pe_ve -> i386pe_vec.
6999
7000 Mon Sep  4 14:02:43 1995  Ian Lance Taylor  <ian@cygnus.com>
7001
7002         * configure.host: Incorporate host Makefile fragments by setting
7003         shell variables.
7004         * configure.in: Call AC_PROG_CC.  Substitute CFLAGS, HDEFINES and
7005         AR.  Call AC_PROG_INSTALL.  Substitute CC_FOR_BUILD, choosing a
7006         value based on whether the code is being compiled by a cross
7007         compiler.  Don't substitute host_makefile_frag or frags.
7008         * aclocal.m4: New file to define local AC_PROG_CC.
7009         * configure: Rebuild.
7010         * Makefile.in (INSTALL): Set to @INSTALL@.
7011         (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
7012         (INSTALL_DATA): Set to @INSTALL_DATA@.
7013         (AR): Set to @AR@.
7014         (CC): Define as @CC@.
7015         (CFLAGS): Set to @CFLAGS@.
7016         (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
7017         (@host_makefile_frag@): Remove.
7018         (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@.  Move $(CFLAGS)
7019         after other options.
7020         (config.status): Remove dependency upon @frags@.
7021         * config/*.mh, config/README: Remove.
7022
7023         * config.bfd: Rewrite to incorporate the contents of the Makefile
7024         fragments by setting shell variables, rather than merely returning
7025         the name of a Makefile fragment.
7026         * configure.in: Use shell variables set by config.bfd rather than
7027         looking at the target Makefile fragment files.  Don't substitute
7028         target_makefile_frag.  Do substitute TDEFINES.
7029         * configure: Rebuild.
7030         * Makefile.in (@target_makefile_frag@): Remove.
7031         (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
7032         * config/*.mt: Remove.
7033
7034 Mon Sep  4 03:13:28 1995  Ken Raeburn  <raeburn@cygnus.com>
7035
7036         * configure.in: Put changequote lines around "i[345]86" patterns
7037         section of core file support.
7038
7039 Sun Sep  3 11:31:58 1995  Jeff Law  (law@snake.cs.utah.edu)
7040
7041         * som.c (som_bfd_print_private_bfd_data): Define to use the
7042         generic version.
7043
7044 Fri Sep  1 17:08:40 1995  steve chamberlain  <sac@slash.cygnus.com>
7045
7046         * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
7047         entry, text_start and data_start.
7048
7049 Fri Sep  1 18:06:28 1995  Ian Lance Taylor  <ian@cygnus.com>
7050
7051         * Makefile.in (OFILES): Remove $(TDEPFILES).
7052         * config/apollo.mt (TDEPFILES): Remove.
7053         * config/README: Update.
7054
7055         * configure.in: For a native configuration, set COREFILE and
7056         COREFLAG based on the canonical host name.
7057         * configure: Rebuild.
7058         * Makefile.in: Rebuild dependencies.
7059         (ALL_CFLAGS): Add @COREFLAG@.
7060         (OFILES): Replace $(HDEPFILES) with @COREFILE@.
7061         * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
7062         support routines.  Check LYNX_CORE rather than HOST_LYNX.
7063         * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
7064         * i386lynx.c: Likewise.
7065         * m68klynx.c: Likewise.
7066         * sparclynx.c: Likewise.
7067         * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
7068         * *-core.c: Comment changes.
7069         * config/decstation.mh (HDEPFILES): Remove.
7070         (HDEFINES): Remove -DTRAD_CORE.
7071         * config/irix3.mh (RANLIB): Remove.
7072         * config/irix4.mh (HDEPFILES, RANLIB): Remove.
7073         (HDEFINES): Remove -DIRIX_CORE.
7074         * config/riscos.mh (RANLIB, HDEPFILES): Remove.
7075         (HDEFINES): Remove -DTRAD_CORE.
7076         * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
7077         * config/ultra3.mh (RANLIB): Remove.
7078         * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
7079         * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
7080         * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
7081         * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
7082         * config/hppahpux.mh, config/hppaosf.mh: Remove.
7083         * config/i386aix.mh, config/i386bsd.mh: Remove.
7084         * config/i386linux.mh, config/i386mach3.mh: Remove.
7085         * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
7086         * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
7087         * config/mipsmach3.mh, config/news-mips.mh: Remove.
7088         * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
7089         * config/rs600.mh, config/rs6000lynx.mh: Remove.
7090         * config/solaris2.mh, config/stratus.mh: Remove.
7091         * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
7092         * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
7093
7094 Fri Sep  1 15:18:50 1995  Kazumoto Kojima  <kkojima@info.kanagawa-u.ac.jp>
7095
7096         * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
7097         DT_FINI entry if the appropriate symbol is not in the hash table.
7098
7099         * libelf.h (struct elf_backend_data): Add create_program_headers
7100         and want_hdr_in_seg fields.
7101         * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
7102         defined.
7103         (elf_backend_create_program_headers): Likewise.
7104         (elfNN_bed): Initialize create_program_headers and
7105         want_hdr_in_seg.
7106         * elf.c (get_program_header_size): Call create_program_headers
7107         backend routine.
7108         (map_program_segments): Check want_hdr_in_seg backend field.  Call
7109         create_program_headers backend routine.
7110
7111         * elf.c (assign_file_positions_except_relocs): Align non allocated
7112         sections when creating an executable.
7113
7114         * elfcode.h (elf_swap_phdr_in): Make non static.
7115         (elf_swap_phdr_out): Make non static.
7116         * libelf.h (bfd_elf32_swap_phdr_in): Declare.
7117         (bfd_elf32_swap_phdr_out): Declare.
7118         (bfd_elf64_swap_phdr_in): Declare.
7119         (bfd_elf64_swap_phdr_out): Declare.
7120
7121         * ecofflink.c (ecoff_collect_shuffle): New static function.
7122         (_bfd_ecoff_get_accumulated_pdr): New function.
7123         (_bfd_ecoff_get_accumulated_sym): New function.
7124         (_bfd_ecoff_get_accumulated_ss): New function.
7125         * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
7126         (_bfd_ecoff_get_accumulated_sym): Declare.
7127         (_bfd_ecoff_get_accumulated_ss): Declare.
7128         * libbfd.h: Rebuild.
7129
7130 Fri Sep  1 13:20:25 1995  Ian Lance Taylor  <ian@cygnus.com>
7131
7132         * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
7133
7134         * elflink.h (elf_link_add_object_symbols): Handle indirect and
7135         warning symbols.  If any section is named .gnu.warning.XXX, treat
7136         the contents as a warning to be issued if the symbol XXX is
7137         referenced.
7138         (elf_link_output_extsym): For an indirect or warning symbol, just
7139         output the symbol it points to.
7140
7141         * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
7142         if bfd_hash_allocate fails, since it will already be set.
7143         (generic_link_hash_newfunc): Likewise.
7144         (archive_hash_newfunc): Likewise.
7145         (hash_entry_bfd): New static function.
7146         (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
7147         callback.  Allocate a new warning using the hash table newfunc.
7148         Use bfd_hash_replace to update the entry in the hash table, rather
7149         than assuming we can copy the fields with structure assignment.
7150
7151         * hash.c (bfd_hash_replace): New function.
7152         * bfd-in.h (bfd_hash_replace): Declare.
7153         * bfd-in2.h: Rebuild.
7154
7155 Fri Sep  1 08:12:50 1995  James G. Smith  <jsmith@beauty.cygnus.com>
7156
7157         * config.bfd: Add mips*vr4300-*-elf* target.
7158         * config/mipsbvr4300.mt: Added.
7159
7160 See file ChangeLog.2
7161
7162 \f
7163 Local Variables:
7164 mode: change-log
7165 left-margin: 8
7166 fill-column: 74
7167 version-control: never
7168 End: