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