cfb81a504375341a5eaa00368b3ee621814ea835
[external/binutils.git] / bfd / ChangeLog
1 Mon Jul  3 13:55:18 1995  Steve Chamberlain  <sac@slash.cygnus.com>
2
3         * config.bfd (win32): New configuration.
4         * configure.host (pe): Changed to i386win32.
5         * config/i386pe.mh: Deleted.
6         * config/i386win32.mh: New file.
7
8 Mon Jul  3 11:30:45 1995  Ian Lance Taylor  <ian@cygnus.com>
9
10         * ecoff.c (_bfd_ecoff_find_nearest_line): If we allocate
11         find_line_info, clear the fdrtab field.
12
13         * targets.c (enum bfd_flavour): Add bfd_target_msdos_flavour here,
14         rather than in bfd-in2.h.
15
16         * bfd.c (enum bfd_error): Define bfd_error_no_armap.
17         (bfd_errmsgs): Add string for bfd_error_no_armap.
18         * bfd-in2.h: Rebuild.
19         * ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
20         armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
21         * elfcode.h (elf_link_add_archive_symbols): Likewise.
22         * linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
23
24         * elfcode.h (elf_link_add_object_symbols): Permit common and
25         indirect symbols in weakdefs BFD_ASSERT.
26         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
27         BFD_ASSERT to permit some legal, but odd, cases.
28         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
29         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
30
31         * Makefile.in: Rebuild dependencies.
32         (BFD32_BACKENDS): Add versados.o.
33         (CFILES): Add pe-i386.c, pei-i386.c, and versados.c.
34 start-sanitize-arc
35         (elf32-arc.o): New target.  This target should be removed when
36         elf32-arc.c can be added to CFILES, after which the automatic
37         dependency building will handle it.
38 end-sanitize-arc
39
40 Sun Jul  2 17:49:32 1995  Ian Lance Taylor  <ian@cygnus.com>
41
42         * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_file
43         to FILE * before using it.
44         * stab-syms.c: Revert yesterday's patch.
45
46 Sat Jul  1 12:10:42 1995  Fred Fish  <fnf@cygnus.com>
47
48         * stab-syms.c (stdio.h):  Include prior to libaout.h, which
49         includes bfdlink.h, which now uses FILE.
50
51 Sat Jul  1 00:11:08 1995  Ken Raeburn  <raeburn@cygnus.com>
52
53         * elfxx-target.h: New file.
54
55         * libelf.h (struct elf_backend_data): Remove elf_64_p field.
56         * elfxx-target.h (elfNN_bed): Don't set it.
57
58         * elf32-target.h, elf64-target.h: Deleted.
59         * Makefile.in (elf32-target.h, elf64-target.h): Build them from
60         elfxx-target.h.
61
62 Fri Jun 30 16:07:18 1995  Steve Chamberlain  <sac@slash.cygnus.com>
63
64         * cofflink.c (_bfd_coff_generic_relocate_section): Compare
65         the full text of .reloc or .edata section names.
66
67 Fri Jun 30 15:47:37 1995  Fred Fish  <fnf@cygnus.com>
68
69         * cofflink.c (_bfd_coff_generic_relocate_section):
70         Remove extra '+'.
71
72 Thu Jun 29 17:24:52 1995  Steve Chamberlain  <sac@slash.cygnus.com>
73
74         * coff-h8300.c (COFF_LONG_FILENAMES): Define.
75
76 Wed Jun 28 18:04:42 1995  Steve Chamberlain  <sac@slash.cygnus.com>
77
78         * Makefile.in: versados.o is now conditionally built.
79         * coffcode.h (add_data_entry): New function.
80         (coff_write_object_contents): Clean up. Calculate
81         data entries.
82         * cofflink.c (_bfd_coff_generic_relocate_section):
83         .reloc and .edata sections are IMAGE_BASED too.
84         If there's a base_file then write out base information.
85         * configure.host (i386-*-pe): New.
86         * syms.c (coff_section_type): Only scan prefixes.
87         * targets.c (bfd_target_vector): Versados is now conditionally
88         built.
89         * config/m68k-coff.mt: Build versados.o
90         * hosts/i386pe.h: New file.
91
92 Mon Jun 26 13:53:49 1995  Jeff Law  (law@snake.cs.utah.edu)
93
94         * elf32-hpa.c (elf32_hppa_relocate_section): Close comment before
95         R_PARISC_DPREL21L handling.
96
97 Thu Jun 22 19:28:36 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
98
99         Sun May  7 11:53:41 MDT 1995  Bryan Ford  <baford@cs.utah.edu>
100
101         * config/i386-moss.mt: created.
102
103 Thu Jun 22 08:56:10 1995  Steve Chamberlain  <sac@slash.cygnus.com>
104
105         * reloc.c (bfd_perform_relocation): Add case for -ve words.
106
107 Wed Jun 21 13:13:49 1995  Jeff Law  (law@snake.cs.utah.edu)
108
109         * elf32-hppa.c (elf32_hppa_relocate_section): Don't try to apply a
110         relocation against an undefined symbols.
111
112 Wed Jun 21 10:16:10 1995  Steve Chamberlain  <sac@slash.cygnus.com>
113
114         * versados.c: Second pass/rewrite.
115
116 Mon Jun 19 08:40:45 1995  Steve Chamberlain  <sac@slash.cygnus.com>
117
118         * syms.c (coff_section_type): Compare only the front part
119         of a section name. (bfd/7238)
120
121 Sat Jun 17 09:40:44 1995  Jeff Law  (law@snake.cs.utah.edu)
122
123         * elf32-hppa.c (elf32_hppa_size_stubs): Set the size of the stub
124         section if we get an error.
125
126         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Don't mess
127         with the operands of an R_PARISC_DPREL21L relocation if the insn
128         is not "addil <symbol>,%r27".
129
130 Fri Jun 16 15:04:47 1995  Stan Shebs  <shebs@andros.cygnus.com>
131
132         * bfd-in.h (NT_subsystem, NT_stack_heap): Declare but don't
133         define.
134         * bfd-in2.h: Rebuilt.
135         * bfd.c (NT_subsystem, NT_stack_heap): Define.
136
137 Fri Jun 16 00:07:25 1995  Jeff Law  (law@snake.cs.utah.edu)
138
139         * elf32-hppa.c (elf32_hppa_bfd_link_link_relocate): Use the right
140         type field (there are two!) when checking to see if $global$ is
141         defined.
142
143 Thu Jun 15 14:03:47 1995  Stan Shebs  <shebs@andros.cygnus.com>
144
145         * bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
146         to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
147         * coffswap.h (coff_swap_scnhdr_out): Remove version that was
148         hacked for MPW C.
149         * mpw-config.in: Set shell vars instead of pasting to makefile
150         for each configuration, edit coffswap.h to make MPW C not choke.
151         (i386-unknown-coff, sh-hitachi-hms): Recognize.
152         * mpw-make.in (BFD_LIBS): Add versados.c.o.
153
154         * versados.c (versados_scan): Properly cast results from bfd_alloc.
155
156 Wed Jun 14 15:27:32 1995  Steve Chamberlain  <sac@slash.cygnus.com>
157
158         * cofflink.c (process_embedded_commands): New function
159         reads and handles .drectve sections for PE.
160         (coff_link_input_bfd): Call new function if PE.
161
162 Mon Jun 12 12:09:39 1995  Jeff Law  (law@snake.cs.utah.edu)
163
164         * bfd-in.h (bfd_set_section_vma): Case true to a boolean.
165         (bfd_set_cacheable): Likewise.
166         * bfd-in2.h: Rebuilt.
167
168 Fri Jun  9 12:20:28 1995  Steve Chamberlain  <sac@rtl.cygnus.com>
169
170         * elfcode.h (elf_sort_hdrs): Rewrite to be symmetrical.
171
172 Fri Jun  9 12:49:00 1995  Jeff Law  (law@snake.cs.utah.edu)
173
174         * targets.c: Add copy_private_symbol_data and link_split_section
175         to the target vector.
176         * libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
177         (_bfd_nolink_bfd_link_split_section): Likewise.
178         (bfd_generic_link_split_section): Declare.
179         * syms.c (bfd_copy_private_symbol_data): Define.
180         * linker.c (bf_link_split_section): Likewise.
181         * som.c (som_bfd_copy_private_symbol_data): New function
182         (som_bfd_link_split_section): Likewise.
183         * All other targets updated with default versions of new routines.
184
185         * Take out my braindamaged bfd_true/bfd_false changes from earlier
186         today.  Replace with just:
187         * bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
188         compiling with g++-2.6 or later.
189         * bfd-in2.h: Rebuilt.
190
191 Fri Jun  9 07:54:29 1995  Steve Chamberlain  <sac@slash.cygnus.com>
192
193         * versados.c (struct esd, get_4): Lint; use unsigned chars.
194
195         * coff-i960.c (coff_i960_relocate):  Compare output section names
196         when converting for vxworks.
197
198 Wed Jun  7 19:01:30 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
199
200         * elfcode.h (elf_fake_sections): Permit .scommon or COMMON
201         sections as random SHT_NOBITS sections, in case a linker script is
202         strange.
203
204 Tue Jun  6 17:29:32 1995  Steve Chamberlain  <sac@slash.cygnus.com>
205
206         * bfd-in.h (NT_subsystem, NT_stack_heap): Moved from pe.h
207         * coff-i386.c (coff_i386_rtype_to_howto): Get PE relocs right.
208         * coffcode.h (coff_mkobject): Set pe tdata bit when using PE.
209         * cofflink.c (COFF_WITH_PE code): Test on obj_pe bit rather
210         than conditional compile.
211         * configure.in: Fix PE dependencies.
212         * libcoff-in.h (obj_pe): New.
213         (coff_tdata): Added pe entry.
214         * libcoff.h: Regenerated.
215
216 Mon Jun  5 09:07:13 1995  Steve Chamberlain  <sac@slash.cygnus.com>
217
218         * coff-a29k.c (coff_a29k_adjust_symndx): Completely parenthesize
219         macro. (pr ld/7127)
220
221 Mon Jun  5 02:15:20 1995  Ken Raeburn  <raeburn@kr-laptop.cygnus.com>
222
223         Linker support for m68k-elf from Andreas Schwab
224         <schwab@issan.informatik.uni-dortmund.de>:
225         * elfcode.h (elf_link_add_object_symbols): Check for NULL when
226         looping through the symbol hashes.
227         (elf_bfd_final_link): When looking for _init and _fini don't use
228         the symbol if it is imported from another object.
229         * elf32-m68k.c: Relocation type changed from REL to RELA.  Regular
230         and dynamic linking support functions added, similar to other elf
231         targets.
232
233         * config.bfd (i[345]86-*-gnu*): Use ELF configuration.
234
235 Fri Jun  2 18:54:59 1995  Steve Chamberlain  <sac@slash.cygnus.com>
236
237         * versados.c: New file.
238         * bfd-in2.h (struct _bfd): New field.
239         * bfd.c (struct _bfd): New field.
240         * configure.in (versados_vec): New field.
241         * targets.c (bfd_flavor): Added versados.
242
243 Thu Jun  1 13:51:49 1995  Steve Chamberlain  <sac@slash.cygnus.com>
244
245         * coffcode.h (sec_to_styp_flags, styp_to_sec_flags, 
246         coff_new_section_hook):  Any section that starts ".stab"
247         is now marked as debugging.
248
249 Thu Jun  1 16:15:16 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
250
251         * archive.c (_bfd_write_archive_contents): Disable extended name
252         table until it can be made optional, so that native AR has half a
253         chance on SunOS and HP/UX.
254
255         * linker.c (_bfd_generic_link_output_symbols, case
256         bfd_link_hash_indirect): Add cast to correct pointer types.
257
258 Sat May 27 21:37:31 1995  J.T. Conklin  <jtc@rtl.cygnus.com>
259
260         * config.bfd (m68k-bull-sysv*): Added strip_underscore=yes.
261           (m68k-est-coff): Removed.  target does not effect object format.
262
263 Wed May 24 10:52:01 1995  Steve Chamberlain  <sac@slash.cygnus.com>
264
265         * linker.c (_bfd_generic_link_output_symbols): Cope with
266         indirect symbols.
267
268         * elf32-i386.c (elf_i386_relocate_section): Give error
269         message when linking to a shared reloc which isn't there.
270
271 Wed May 24 10:40:00 1995  Steve Chamberlain  <sac@slash.cygnus.com>
272
273         Support for ARM-PE.
274
275         * Makefile.in, coffcode.h, config.bfd, configure.in, pe-arm.c,
276          pei-arm.c, reloc.c, targets.c, config/arm-pe.mt:
277          Support for ARM COFF/PE.
278
279 Tue May 23 19:24:58 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
280
281         * bfd.c (bfd_get_relocated_section_contents): Now a function,
282         tries calling routine from input bfd target vector for
283         bfd_indirect_link_order.  Put a declaration into the header file.
284         * bfd-in2.h: Regenerated.
285         * elf32-mips.c (gprel16_with_gp): New function, split out from
286         mips_elf_gprel16_reloc.
287         (mips_elf_gprel16_reloc): Call it.  If output bfd target vector
288         isn't elf flavoured, abort, since it's assumed to be elf in some
289         of this code, including the code that looks up the gp value.
290         (elf32_mips_get_relocated_section_contents): New function,
291         modified from bfd_generic_get_relocated_section_contents to deal
292         with passing gp to gprel16_with_gp.
293         (bfd_elf32_bfd_get_relocated_section_contents): New macro.
294         * elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents):
295         Don't define if already defined.
296
297 Tue May 23 15:58:15 1995  Jeff Law  (law@snake.cs.utah.edu)
298
299         * Makefile.in: Install bfdlink.h too.
300
301 Sun May 21 22:25:09 1995  Jeff Law  (law@snake.cs.utah.edu)
302
303         * elf32-hppa.c (elf32_hppa_relocate_section): Handle undefined and
304         notsupported return codes from final_link_relocate (used when
305         $global$ is undefined or nonexistant).
306         (elf32_hppa_bfd_link_link_relocate): If $global$ exists, but is
307         not defined,then return bfd_reloc_undefined.
308
309 Fri May 19 10:00:14 1995  Steve Chamberlain  <sac@rtl.cygnus.com>
310
311         * coffswap.h: (IMAGE_BASE): Define to 0 if not.
312
313 Thu May 18 04:24:01 1995  Ken Raeburn  <raeburn@kr-laptop.cygnus.com>
314
315         Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
316
317         * aoutx.h (aout_link_input_section_standard): If defined, call
318         MY_relocatable_reloc before doing a partial relocation.
319
320         * aout-arm.c: (WRITE_HEADERS): Delete.
321         (NAME): Define version to override default in aoutx.h
322         (MY(howto_table)): Reformat.  Alter some entries slightly.
323         (RELOC_ARM_BITS_NEG_{BIG,LITTLE}): Define.
324         (MY(reloc_howto), MY(put_reloc), MY(relocatable_reloc)): New functions.
325         (MY_reloc_howto, MY_put_reloc, MY_relocatable_reloc): Define.
326         (MY(fix_pcrel_26)): Renamed from aoutarm_fix_pcrel_26, return
327         bfd_reloc_ok not bfd_reloc_continue.
328         (MY(fix_pcrel_26_done)): Likewise.
329         (MY(bfd_reloc_type_lookup)): Renamed from aoutarm_reloc_type_lookup.
330         (MY_bfd_link_hash_table_create, MY_bfd_link_add_symbols,
331         MY_bfd_final_link): Delete.
332         (MY_swap_std_reloc_in, MY_swap_std_reloc_out, MY_get_section_contents):
333         Define.
334         (aoutx.h): Include it.
335         (MY(swap_std_reloc_{in,out})): New functions.
336         Use RELOC_ARM_BITS_NEG_{BIG,LITTLE} to extract negative reloc bit.
337         (aoutarm_squirt_out_relocs): Delete.
338  
339         From: David Taylor (dtaylor@armltd.co.uk)
340         * config/arm[lb]-aout.mt: New files.
341         * aout-arm.c: New file.
342         * config.bfd: Handle arm{,e[lb]}-*-aout
343         * configure.in: Add vetor for aout_arm_{big,little}_vec.
344         * reloc.c: New relocation types for the ARM.
345         * targets.c (aout_arm_{big,little}_vec): declare.
346
347 Tue May 16 10:29:51 1995  Jim Kingdon  <kingdon@deneb.cygnus.com>
348
349         * libbfd.c (bfd_stat): If bfd_cache_lookup returns an error,
350         return an error to the caller.  Call bfd_set_error on errors.
351
352 Tue May 16 14:44:45 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
353
354         * libcoff-in.h (coff_renumber_symbols): Modified prototypes in
355         accordance with 11 May libcoff.h change.
356
357 Thu May 11 16:43:14 1995  Steve Chamberlain  <sac@slash.cygnus.com>
358
359         tekhex.c (first_phase): Understand type 0 symbols.
360         (tekhex_write_object_contents): Fix typo in final record.
361
362 Thu May 11 16:43:14 1995  Steve Chamberlain  <sac@slash.cygnus.com>
363
364         pr ld/6840
365
366         * coff-i960.c (optcall_callback): don't try and optimize
367         undefined refs. 
368         (coff_write_relocs): Search for broken relocs on the way
369         out and fix them up.
370         (coff_renumber_symbols): Calculate and return index of
371         first undefined symbol.
372         (coff_write_object_contents): Call coff_renumber_symbols 
373         and coff_write_relocs with the new args.
374         * libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
375         Modified prototypes.
376
377 Thu May 11 16:43:14 1995  Steve Chamberlain  <sac@slash.cygnus.com>
378                           Tom Griest <griest@cs.yale.edu>
379
380         Initial support for PE format. 
381         
382         * Makefile.in, targets.c, configure.in, config.bfd:
383         Add support for i386-*-winnt and i386-*-pe.
384         * archive.c (do_slurp_coff_armap):  Understand NTPE format
385         archives.
386         (_bfd_slurp_extended_name_table): Turn \ in a filename
387         into /.
388         * bfd-in.h (bfd_link_subsystem, _bfd_link_stack_heap): New.
389         * coff-i386.c  (howto_table): Conditionalize PCRELOFFSET.
390         * coffcode.h (IMAGE_BASE): New.
391         (coff_compute_section_file_positions): Throw away .junk
392         sections for PE, align symbols.
393         (coff_write_object_contents): Throw away .junk sections
394         for PE. Remember info on .idata and .rsrc sections.
395         Fill in the PE header.
396         (coff_slurp_symbol_table): PE uses C_SECTION class.
397         * cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
398         (_bfd_coff_generic_relocate_section): Cope with PE relocs.
399         * coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}): 
400         New code for PE headers.
401
402 Tue May  9 17:01:38 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
403
404         * config.bfd: Add little endian PowerPC support.
405         * configure.in: Ditto.
406         * targets.c: Ditto.
407         * config/ppcle-elf.mt: New file, for little endian PowerPC
408         support.
409         * config/ppc-elf.mt: Add little endian powerpc to the BFD
410         selection vectors.
411         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Complain if
412         linking a different endian object than we expect.
413         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define, to provide little
414         endian support.
415
416 Tue May  2 16:32:24 1995  Jeff Law  (law@snake.cs.utah.edu)
417
418         * config.bfd (hppa*-*-lites*): Treat just like hppa*-*-*elf*.
419
420 Tue Apr 25 19:38:43 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
421
422         * coffgen.c (make_a_section_from_file): Initialize lma same as
423         vma.
424
425 Tue Apr 25 11:03:21 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
426
427         * hosts/std-host.h: #include ansidecl.h 'cause PTR is used in
428         std-host.h.
429
430 Mon Apr 24 23:56:44 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
431
432         * hosts/i386linux.h (HAVE_PROCFS): Don't define it.  Added lengthy
433         comment explaining why.
434
435 Mon Apr 24 10:34:02 1995  Michael Meissner  <meissner@cygnus.com>
436
437         * hosts/i386linux.h (HAVE_PROCFS): If NO_PROCFS is defined, don't
438         define HAVE_PROCFS.
439
440 Mon Apr 24 08:33:12 1995  Michael Meissner  <meissner@cygnus.com>
441
442         * elf32-ppc.c (ppc_elf_relocate_section): Do not continue
443         processing unknown symbols to prevent a cascade of errors.
444
445 Fri Apr 21 12:48:48 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
446
447         Patches from H.J. Lu for Linux ELF core file support.
448         * elfcode.h (elf_core_file_matches_executable_p) [HAVE_PROCFS]:
449         Use prpsinfo_t instead of struct prpsinfo, for consistency.
450         * hosts/i386linux.h (HAVE_PROCFS): Define.
451
452 Thu Apr 20 09:07:39 1995  Steve Chamberlain  <sac@slash.cygnus.com>
453
454         * linker.c (link_action): Do the right thing when a undefined
455         strong symbol appears after an undefined weak symbol.
456
457 Fri Apr 14 16:51:17 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
458
459         * elf32-ppc.c (ppc_elf_relocate_section): New function to relocate
460         a whole section for the linker, bypassing bfd_perform_relocation.
461         (ppc_elf_reloc_type_lookup): New function to map the BFD
462         enumeration code into a howto structure.
463         (ppc_elf_howto_raw): Rename from ppc_elf_howto_table.
464         (ppc_elf_howto_table): New array that maps PowerPC relocation
465         numbers to howto structures without a linear search.  Change from
466         using bfd_elf_generic_reloc to use ppc_elf_std_reloc.
467         (ppc_elf_howto_init): Initialize ppc_elf_howto_table from
468         ppc_elf_howto_raw.
469         (ppc_elf_reloc_type_lookup): Use a case statement instead of a
470         loop.
471         (ppc_elf_std_reloc): Replacement for bfd_elf_generic_reloc.
472         (ppc_elf_unsupported_reloc): Print a real error message, instead
473         of calling abort.
474         (ppc_elf_addr16_ha_inner): Abstract getting adjustment from
475         ppc_elf_addr16_ha_reloc, so ppc_elf_relocate_section can use it
476         too.
477         (ppc_elf_addr16_ha_reloc): Call it.
478         (ppc_elf_got16_inner): Abstract getting adjustment from
479         ppc_elf_got16_reloc, so ppc_elf_relocate_section can use it too.
480         (ppc_elf_got16_reloc): Call it.
481         (ppc_elf_info_to_howto): Rename from powerpc_info_to_howto.
482
483         * elfcode.h (elf_symbol_from_bfd_symbol): Omit space in debugging
484         output.
485         (elf_symbol_flags): Add debug function to decode flags so that
486         defining DEBUG to be 4 will compile again.
487         (elf_debug_section): Fix typo in debug output.
488
489 Fri Apr 14 16:03:04 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
490
491         * config.bfd: Add m68*-*-elf*.
492         * elf32-m68k.c: Filled out implementation, except for dynamic
493         linking support.
494         * reloc.c (enum bfd_reloc_code_real): Added *_GOT_PCREL, *_GOTOFF,
495         *_PLT_PCREL, *_PLTOFF, *_68K_* relocations for ELF.
496         * libbfd.h, bfd-in2.h: Regenerated.
497
498 Thu Apr 13 14:28:04 1995  Torbjorn Granlund  <tege@adder.cygnus.com>
499
500         * coff-m68k.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
501         1 to 2.
502         (bfd_target): Change minimum section alignment from 1 to 2.
503
504 Wed Apr 12 12:40:04 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
505
506         * aoutx.h (machine_type, case bfd_arch_mips): Treat R8000 like
507         R6000 and R4000 for now.
508
509 Tue Apr  4 12:28:25 1995  Stan Shebs  <shebs@andros.cygnus.com>
510
511         * mpw-config.in: New file, MPW version of configure.in.
512         * mpw-make.in: New file, MPW version of Makefile.in.
513         * hosts/mpw.h: New file, MPW host definitions.
514         * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_in) [MPW_C]:
515         Alternate versions without ECOFF_64 that chokes MPW C.
516         * coffswap.h (coff_swap_scnhdr_out): Add alternative version with
517         partly-expanded macros.
518
519 Thu Mar 30 14:56:21 1995  Ian Lance Taylor  <ian@cygnus.com>
520
521         * reloc.c (bfd_perform_relocation): Don't bother to check for
522         overflow if the symbol is undefined.
523
524 Thu Mar 30 14:32:26 1995  H.J. Lu (hjl@nynexst.com)
525
526         * config.bfd: Change linux to default to elf.  Using
527         i[345]86-*-linuxaout will build a library which defaults to a.out.
528         * config/i386-laout.mt: Rename from old config/i386-linux.mt.
529         * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
530         Comment out EXTRALIBS.
531         * config/i386-lelf.mt: Remove.
532
533 Wed Mar 29 12:01:30 1995  Ian Lance Taylor  <ian@cygnus.com>
534
535         * coff-i960.c (coff_i960_relocate): Cache the section symbol in
536         the used_by_bfd field of the section, to avoid looping for each
537         reloc.
538
539         * cpu-h8500.c (arch_info_struct): Change name from "H8/300" to
540         "h8300" for consistency with other cpu-* files.
541
542 Tue Mar 28 15:14:11 1995  Ian Lance Taylor  <ian@cygnus.com>
543
544         * bout.c (b_out_canonicalize_reloc): Handle SEC_CONSTRUCTOR
545         sections.
546         (b_out_get_reloc_upper_bound): Likewise.
547
548         * linker.c (generic_link_add_symbol_list): Skip constructor
549         symbols which the main linker code did not do anything with.
550         (_bfd_generic_link_output_symbols): Use udata.p if it is set,
551         rather than looking the symbol up in the hash table.  Just pass
552         through constructor symbols for which udata.p is not set.  If the
553         linker defined the symbol, clear the constructor flag.
554
555 Tue Mar 21 10:50:32 1995  Jeff Law  (law@snake.cs.utah.edu)
556
557         * som.c (som_set_reloc_info): Sign extend constants from
558         R_DATA_OVERRIDE fixups.
559         * libhppa.h (sign_extend): Renamed from sign_ext.  Fix.
560         (low_sign_extend): Likewise.
561
562 Mon Mar 20 22:39:10 1995  Jeff Law  (law@snake.cs.utah.edu)
563
564         * som.c (som_slurp_symbol_table): Tighten test to determine
565         what symbols are section symbols.
566
567 Sat Mar 18 01:54:45 1995  Ian Lance Taylor  <ian@cygnus.com>
568
569         * elfcode.h (elf_bfd_link_add_symbols): An empty archive is OK.
570
571 Fri Mar 17 16:29:02 1995  Jeff Law  (law@snake.cs.utah.edu)
572
573         * som.c (som_bfd_copy_private_section_data): Just return true when
574         either the input or output section isn't attached to a SOM BFD.
575         (som_bfd_copy_private_bfd_data): Similarly for BFD private data.
576
577 Fri Mar 17 11:50:34 1995  Ian Lance Taylor  <ian@cygnus.com>
578
579         * elfcode.h (elf_link_add_object_symbols): Check whether a dynamic
580         object has already been included, and ignore it the second time.
581
582 Wed Mar 15 11:56:40 1995  Ian Lance Taylor  <ian@cygnus.com>
583
584         * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT13 from
585         complain_overflow_bitfield to complain_overflow_signed.
586
587         * libelf.h (bfd_elf32__write_relocs): Don't declare.
588         (bfd_elf64__write_relocs): Don't declare.
589
590 Tue Mar 14 05:54:33 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
591
592         * stab-syms.c (aout_stab_name): Moved aout_stab_names to be local
593         to this function.  Recoded function to stop using table, to
594         improve performance (on i486-netbsd host).  Left old version
595         intact under "#if 0" for further performance testing.
596
597 Mon Mar 13 13:48:49 1995  Ian Lance Taylor  <ian@cygnus.com>
598
599         * elfcode.h (write_relocs): Make static.  Use PTR argument as a
600         pointer to a boolean variable set to true if something fails.
601         Cast to PTR rather than void *.
602         (sym_is_global): Rewrite for clarity.
603         (map_program_segments): If the program header size is too small,
604         call _bfd_error_handler and return failure rather than aborting.
605         (NAME(bfd_elf,write_object_contents)): Pass boolean variable when
606         calling write_relocs.
607         (elf_symbol_from_bfd_symbol): Use BFD_ASSERT rather than abort.
608         (struct elf_info_failed): Define.
609         (NAME(bfd_elf,size_dynamic_sections)): Declare variables in inner
610         blocks.  Pass elf_info_failed structure when calling
611         elf_export_symbol and elf_adjust_dynamic_symbol.
612         (elf_export_symbol): Treat data argument as elf_info_failed rather
613         than bfd_link_info.  Set failed field on error.
614         (elf_adjust_dynamic_symbol): Likewise.
615         (struct elf_finfo_failed): Define.
616         (elf_bfd_final_link): Pass elf_finfo_failed structure when calling
617         elf_link_output_extsym.  Use BFD_ASSERT rather than abort.
618         (elf_link_output_extsym): Treat data argument as elf_finfo_failed
619         rather than elf_final_link_info.  Set failed field on error.
620         (elf_link_input_bfd): Use BFD_ASSERT rather than abort.
621         (elf_reloc_link_order): Likewise.
622
623         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Only write
624         out PLTRELSZ, PLTREL and JMPREL relocs if there is a .rela.plt
625         section.  Solaris 2.4 apparently does not handle empty reloc
626         information correctly.
627
628         * archive.c (bsd_write_armap): Cast getuid and getgid results to
629         long, and print with %ld.
630
631 start-sanitize-arc
632 Sun Mar 12 05:22:10 1995  Doug Evans  <dje@chestnut.cygnus.com>
633
634         * elf32-arc.c (elf_arc_howto_table): Relocs with implicit addends
635         don't work too well with zero src_masks.  Correct values.
636 end-sanitize-arc
637
638 Fri Mar 10 16:41:05 1995  Ian Lance Taylor  <ian@cygnus.com>
639
640         * aoutx.h (translate_to_native_sym_flags): Always use the output
641         section if it is not NULL.
642
643 Thu Mar  9 15:06:25 1995  Ian Lance Taylor  <ian@cygnus.com>
644
645         * coffswap.h (coff_swap_scnhdr_out): If the line number count or
646         the reloc count does not fit, print an error and return 0.
647         * coffcode.h (coff_write_object_contents): Check return value of
648         coff_swap_scnhdr_out.
649         * ecoff.c (_bfd_ecoff_write_object_contents): Check return value
650         of bfd_coff_swap_scnhdr_out.
651
652         * bfd.c: Include <stdarg.h> or <varargs.h>, depending upon
653         ANSI_PROTOTYPES.
654         (bfd_error_handler_type): New global type.
655         (_bfd_error_program_name): New static variable.
656         (_bfd_default_error_handler): New static function.
657         (_bfd_error_handler): New BFD private global variable.
658         (bfd_set_error_handler): New globally visible function.
659         (bfd_set_error_program_name): New globally visible function.
660         * libbfd-in.h (_bfd_error_handler): Declare.
661         * bfd-in2.h, libbfd.h: Rebuild.
662
663         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
664         and use it instead of bfd_get_symcount.  Check r_index after
665         setting r_extern based on whether this is a base relative reloc.
666         (NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it
667         instead of bfd_get_symcount.
668         (NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc
669         swap routines.
670         * libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter
671         to declaration.
672         (NAME(aout,swap_std_reloc_in)): Likewise.
673         * sunos.c (sunos_canonicalize_dynamic_reloc): Pass
674         info->dynsym_count to reloc swap routines.
675         * aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter.
676         * hp300hpux.c (MY(swap_std_reloc_in)): Likewise.
677         (MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap
678         routine.
679         * i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount
680         parameter.
681         (NAME(lynx,swap_std_reloc_in)): Likewise.
682         (NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc
683         swap routines.
684
685 Thu Mar  9 12:04:05 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
686
687         * bfd.c (bfd_merge_private_bfd_data): New function vector to be
688         called by the linker to merge any private bfd data of the input
689         files and the output file.  Used by the PowerPC ELF support to
690         check whether -mrelocatable is used for all modules.
691         (bfd_set_private_flags): New function vector to be called by the
692         assembler to set private flags.  Used by the PowerPC ELF support
693         to set that a particular object file was assembled with the
694         -mrelocatable option.
695
696         * targets.c (BFD_JUMP_TABLE_COPY): Add intiialization of the
697         bfd_merge_private_bfd_data and bfd_set_private_flags function
698         vectors.
699
700         * bfd-in2.h, libbfd-in.h: Rebuild with bfd.c and targets.c
701         changes.
702
703         * elf32-ppc.c (ppc_elf_set_private_flags): New function to set the
704         ELF e_flags field.
705         (ppc_elf_copy_private_bfd_data): Copy the e_flags field from the
706         input file to the output file.
707         (ppc_elf_merge_private_bfd_data): Check for a mismatch between the
708         e_flags field of all of the linker input files.
709
710         * libelf.h (elf_obj_tdata): Add ppc_flags_init field so that the
711         PowerPC support can check if compataible e_flags are present.
712
713         * aout-target.h: Add NOP for the bfd_merge_private_bfd_data
714         and bfd_set_private_flags function vectors.
715         * coffcode.h: Ditto.
716         * elf32-target.h: Ditto.
717         * elf64-target.h: Ditto.
718         * libbfd.h: Ditto.
719         * libecoff.h: Ditto.
720         * som.c: Ditto.
721
722 Wed Mar  8 00:53:54 1995  Ian Lance Taylor  <ian@cygnus.com>
723
724         * cpu-mips.c (arch_info_struct): Add mips:8000 entry.
725
726         * elfcode.h (swap_out_syms): Mark an undefined BSF_WEAK symbol as
727         STB_WEAK rather than STB_GLOBAL.
728
729 start-sanitize-arc
730 Tue Mar  7 20:34:43 1995  Doug Evans  <dje@chestnut.cygnus.com>
731
732         * configure.in (SELECT_VECS): Split bfd_elf32_arc_vec into big/little.
733         * targets.c (bfd_target_vector): Likewise.
734         * elf32-arc.c (TARGET_BIG_SYM): Define.
735         (TARGET_BIG_NAME): Define.
736         * config/arc-elf.mt (DEFAULT_VECTOR): Set to bfd_elf32_littlearc_vec.
737         (SELECT_VECS): Add bfd_elf32_bigarc_vec.
738 end-sanitize-arc
739
740 Tue Mar  7 12:23:47 1995  Ian Lance Taylor  <ian@cygnus.com>
741
742         * coffcode.h (bfd_coff_backend_data): Add new field
743         _bfd_coff_adjust_symndx.
744         (bfd_coff_adjust_symndx): Define.
745         (coff_adjust_symndx): Define as NULL if not already defined.
746         (bfd_coff_std_swap_table): Initialize new field to
747         coff_adjust_symndx.
748         * cofflink.c (coff_link_input_bfd): Call coff_adjust_symndx if it
749         is defined.
750         * coff-a29k.c (coff_a29k_adjust_symndx): New static function.
751         (coff_adjust_symndx): Define before including coffcode.h.
752         * libcoff.h: Rebuild.
753
754         * format.c (bfd_check_format_matches): Skip binary_vec when
755         searching through bfd_target_vector.
756
757         * elfcode.h (elf_sort_hdrs): Check SHT_NOBITS before checking
758         sh_size.
759
760 Mon Mar  6 23:31:36 1995  Doug Evans  <dje@chestnut.cygnus.com>
761
762         * elfcode.h (elf_sort_hdrs): Keep SHT_NOBITS sections after
763         !SHT_NOBITS ones.
764
765 Mon Mar  6 09:53:08 1995  Jeff Law  (law@snake.cs.utah.edu)
766
767         * cpu-hppa.c (arch_info_struct): Support both PA1.0 and PA1.1
768         machine types.
769         (bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info
770         structures.
771         * libhppa.h (enum pa_arch): New enumeration to describe the
772         different variants of the PA architecture.
773         * som.c (som_object_setup): Use new enumeration to set machine
774         type.
775         (som_finish_writing): If the machine type is PA1.1, then use the
776         PA1.1 machine identifier in the output file.
777
778 Thu Mar  2 15:58:24 1995  Ian Lance Taylor  <ian@cygnus.com>
779
780         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Treat the index of a
781         base relative reloc as an index into the symbol table, regardless
782         of the setting of r_extern.
783         (NAME(aout,swap_std_reloc_in)): Likewise.
784
785         * aoutx.h (NAME(aout,set_section_contents)): Double check that the
786         caller is writing to a valid section.
787
788 Thu Mar  2 14:37:57 1995  Bryan Ford  <baford@cs.utah.edu>
789
790         * binary.c: Add support for reading binary files.  Loads the raw
791         contents of the file into a data section and wraps some symbols
792         around it.  The symbols `_binary_<filename>_start' and
793         `_binary_<filename>_end' indicate the start and end of the data,
794         while `_binary_<filename>_size' is an absolute symbol whose value
795         is the size of the data.  <filename> is the name of the binary
796         input file, with all non-alphanumeric characters converted to
797         underscores.
798
799         * archures.c (bfd_arch_get_compatible): Assume users knows what
800         they're doing if one of the architectures is bfd_arch_unknown.
801
802 Wed Mar  1 17:30:46 1995  Michael Meissner  <meissner@cygnus.com>
803
804         * elf32-ppc.c (elf_powerpc_howto_table): For relocation
805         R_PPC_GOT16, change complain_on_overflow to be
806         complain_overflow_signed.
807
808 Wed Mar  1 11:52:55 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
809
810         * configure.host: Recognize powerpc-*-aix*.
811
812 Wed Mar  1 11:57:39 1995  Ian Lance Taylor  <ian@cygnus.com>
813
814         * coff-i960.c (COFF_PAGE_SIZE): Define.
815
816         * configure.in: Rewrite output of TDEFAULTS to avoid relying on
817         semantics of single quotes in parameter substitution.
818
819 Tue Feb 28 12:53:09 1995  Ian Lance Taylor  <ian@cygnus.com>
820
821         * elfcode.h (elf_sort_hdrs): Sort empty sections before non-empty
822         sections, if they have the same VMA.
823
824         * config.bfd (i[345]86-*-linuxelf*): New target.  Use i386-lelf.
825         (i[345]86-*-gnuelf*): New target.  Use i386-gelf.
826         * config/i386-lelf.mt: New file.
827         * config/i386-gelf.mt: New file.
828
829 Mon Feb 27 12:58:25 1995  Kung Hsu  <kung@mexican.cygnus.com>
830
831         * config.bfd: add a29k-*-vxworks configuration.
832
833 Wed Feb 22 14:40:26 1995  Ian Lance Taylor  <ian@cygnus.com>
834
835         * libaout.h (NAME(aout,slurp_reloc_table)): Change declaration to
836         use reloc_howto_type rather than const struct reloc_howto_struct.
837
838 Tue Feb 21 18:19:22 1995  Ian Lance Taylor  <ian@cygnus.com>
839
840         * bout.c (b_out_slurp_reloc_table): Don't return an error if asked
841         for relocations for the .bss section.
842
843 Tue Feb 21 15:13:05 1995  Jeff Law  (law@snake.cs.utah.edu)
844
845         * som.c (som_bfd_ar_write_symbol_stuff): Handle objects with odd
846         lengths.
847
848 Fri Feb 17 12:34:36 1995  Michael Meissner  <meissner@cygnus.com>
849
850         * elf32-ppc.c (ppc_elf_got16_reloc): Make GOT style relocs add
851         32768, so the GOT pointer can point to 16384 pointers, instead of
852         8192.
853
854 Fri Feb 17 11:45:38 1995  Ian Lance Taylor  <ian@cygnus.com>
855
856         * hosts/sysv4.h: Include <unistd.h>, <stdlib.h>, and <time.h>.
857         Only define SEEK_SET and SEEK_CUR if they are not already defined.
858         Remove all external function declarations.
859
860         * syms.c (bfd_decode_symclass): Return 'W' for a weak symbol.
861
862         * coffgen.c (coff_real_object_p): Set start address and flags
863         before calling coff_mkobject_hook.  Restore them on failure.
864         * ecoff.c (_bfd_ecoff_mkobject_hook): If not ECOFF_AOUT_ZMAGIC,
865         clear D_PAGED.
866
867         * coffgen.c: Reindented.
868
869 Thu Feb 16 14:37:23 1995  Doug Evans  <dje@cygnus.com>
870
871         * reloc.c (bfd_perform_relocation): Don't use bitpos in overflow
872         calculations.
873         (bfd_install_relocation): Likewise.
874
875 Thu Feb 16 13:22:29 1995  Ian Lance Taylor  <ian@cygnus.com>
876
877         * hosts/std-host.h: Remove all function declarations which return
878         int or void, except the one for free.
879
880 Wed Feb 15 14:54:18 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
881
882         * elf32-ppc.c (elf_powerpc_howto_table): Use a destination mask of
883         0xffffffff for R_PPC_REL32, not 0.
884         (powerpc_reloc_map): Add low 16 bit, high 16 bit, and high 16 bit
885         adjusted relocations.
886
887 Tue Feb 14 17:47:17 1995  Ian Lance Taylor  <ian@cygnus.com>
888
889         * elf32-mips.c (struct mips_elf_find_line): Define.
890         (mips_elf_find_nearest_line): New static function.
891         (bfd_elf32_find_nearest_line): Define.
892         * libelf.h (struct elf_obj_tdata): Add find_line_info field.
893
894         * ecoff.c (_bfd_ecoff_swap_tir_in): Move to ecofflink.c.
895         (_bfd_ecoff_swap_tir_out): Likewise.
896         (_bfd_ecoff_swap_rndx_in): Likewise.
897         (_bfd_ecoff_swap_rndx_out): Likewise.
898         (cmp_fdrtab_entry): Likewise.
899         (mk_fdrtab): Likewise.
900         (lookup): Likewise.
901         (_bfd_ecoff_find_nearest_line): Just call _bfd_ecoff_locate_line
902         to do most of the work.  Allocate find_line_info if necessary.
903         * ecofflink.c: Include "aout/stab_gnu.h".
904         (_bfd_ecoff_swap_tir_in): Move in from ecoff.c.
905         (_bfd_ecoff_swap_tir_out): Likewise.
906         (_bfd_ecoff_swap_rndx_in): Likewise.
907         (_bfd_ecoff_swap_rndx_out): Likewise.
908         (cmp_fdrtab_entry): Likewise.  Use PTR instead of void *.
909         (mk_fdrtab): Move in from ecoff.c.  Add debug_info, debug_swap,
910         and line_info arguments, and use them instead of ecoff_data.
911         (fdrtab_lookup): Move in from lookup in ecoff.c.  Remove abfd
912         argument, add line_info argument.  Use it instead of ecoff_data.
913         (_bfd_ecoff_locate_line): New function, mostly from the old
914         _bfd_ecoff_find_nearest_line in ecoff.c.
915         * libecoff.h (ecoff_data_type): Remove find_buffer, fdrtab_len and
916         fdrtab fields, replacing them find_line_info field.
917         (_bfd_ecoff_swap_tir_in): Declare.
918         (_bfd_ecoff_swap_tir_out): Declare.
919         (_bfd_ecoff_swap_rndx_in): Declare.
920         (_bfd_ecoff_swap_rndx_out): Declare.
921         * libbfd-in.h (_bfd_ecoff_locate_line): Declare.
922         * libbfd.h: Rebuild.
923         * configure.in: Don't use ecoff.o for bfd_elf32_bigmips_vec or
924         bfd_elf32_littlemips_vec.
925         * Makefile.in: Rebuild dependencies.
926
927 Tue Feb 14 14:04:22 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
928
929         * libelf.h (elf_backend_data): Add fields elf_machine_alt1 and
930         elf_machine_alt2 which provide alternate versions of the machine
931         code.
932
933         * elf32-ppc.c (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Define to
934         recognize old versions of the PowerPC machine code.
935
936         * elf32-target.h (elf32_bed): Initialize alternate machine code
937         fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
938
939         * elf64-target.h (elf64_bed): Initialize alternate machine code
940         fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
941
942         * elfcode.h (elf_object_p, elf_core_file_p): In addition to the
943         main machine code field, check the two alternate machine code
944         fields.
945
946 Tue Feb 14 12:46:48 1995  Ian Lance Taylor  <ian@cygnus.com>
947
948         * aoutf1.h (MACHTYPE_OK): Don't define if already defined.  Don't
949         accept M_SPARC if bfd_arch_sparc is not in the list of supported
950         architectures, and don't accept a 680x0 machine type if
951         bfd_arch_m68k is not in the list of supported architectures.
952         * aout0.c (MACHTYPE_OK): Define.
953
954 Mon Feb 13 23:25:38 1995  Ian Lance Taylor  <ian@cygnus.com>
955
956         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Don't return a pointer
957         to garbage if the symbol index is out of range.
958         (NAME(aout,swap_std_reloc_in)): Likewise.
959
960 start-sanitize-arc
961 Mon Feb 13 09:35:30 1995  Doug Evans  <dje@canuck.cygnus.com>
962
963         * elf32-arc.c (reloc_type): New type R_ARC_B26.
964         (elf_arc_howto_table): Likewise.
965         * reloc.c (BFD_RELOC_ARC_B26): Likewise.
966
967 Thu Feb  9 17:31:40 1995  Doug Evans  <dje@canuck.cygnus.com>
968
969         * archures (bfd_mach_arc_base): #define.
970         (bfd_mach_arc_host, bfd_mach_arc_graphics, bfd_mach_arc_audio): Ditto.
971         * cpu-arc.c (arch_info_struct): Define entries for each cpu variant.
972         (bfd_arc_arch): Link each one in.
973         (arc_get_mach): New function.
974         * elf32-arc.c (arc_info_to_howto_rel): Renamed from arc_info_to_howto.
975         (elf_info_to_howto_rel): Update.
976         (arc_elf_object_p, arc_elf_final_write_processing): New functions.
977         (elf_backend_object_p): Define.
978         (elf_backend_final_write_processing): Define.
979         (USE_REL): Define.
980 end-sanitize-arc
981
982 Thu Feb  9 18:36:52 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
983
984         * Makefile.in (BFD32_BACKENDS): Add i386msdos.o.
985
986 Thu Feb  9 12:02:35 1995  Ian Lance Taylor  <ian@cygnus.com>
987
988         * i386linux.c (NEEDS_SHRLIB): Define.
989         (linux_tally_symbols): Crash if a NEEDS_SHRLIB symbol is
990         undefined.  From hjl@nynexst.com (H.J. Lu).
991
992 Wed Feb  8 17:26:00 1995  Ian Lance Taylor  <ian@cygnus.com>
993
994         * linker.c (generic_link_check_archive_element): Allocate common
995         symbol information structure.  Don't bother to check for common
996         symbol size overflow.
997         (_bfd_generic_link_add_one_symbol): Likewise.
998         * aoutx.h (aout_link_check_ar_symbols): Likewise.
999         * linker.c (generic_link_check_archive_element): Adjust references
1000         to common symbol information for new structure.
1001         (_bfd_generic_link_add_one_symbol): Likewise.
1002         * aoutx.h (aout_link_check_ar_symbols): Likewise.
1003         (aout_link_add_symbols): Likewise.
1004         * ecoff.c (ecoff_link_add_externals): Likewise.
1005         * elfcode.h (elf_link_add_object_symbols): Likewise.
1006         (elf_link_output_extsym): Likewise.
1007         * sunos.c (sunos_add_one_symbol): Likewise.
1008
1009 Wed Feb  8 09:53:42 1995  Doug Evans  <dje@canuck.cygnus.com>
1010
1011         * elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
1012
1013 Tue Feb  7 16:27:33 1995  Jeff Law  (law@snake.cs.utah.edu)
1014
1015         * som.c (som_bfd_find_nearest_line): Just return false, don't
1016         abort.
1017
1018 Tue Feb  7 14:43:33 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
1019
1020         * ecoff.c: Reformatted some comments and brace constructs in
1021         recent changes to GNU style.
1022         (cmp_fdrtab_entry, mk_fdrtab, lookup): Use old-style function
1023         definitions.
1024
1025 Tue Feb  7 14:21:28 1995  Ian Lance Taylor  <ian@cygnus.com>
1026
1027         * ecoffswap.h (ecoff_swap_pdr_in): Zero out intern before setting
1028         any of the fields.
1029
1030 Mon Feb  6 20:01:24 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
1031
1032         Sat Feb  4 14:20:24 1995  David Mosberger-Tang  <davidm@piston.cs.arizona.edu>
1033
1034         * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_out): added
1035         internalizing/externalizing new "prof" field.
1036
1037         * libecoff.h (ecoff_tdata): added fdrtab.
1038
1039         * ecoff.c (_bfd_ecoff_find_nearest_line): Fixed.
1040
1041 Mon Feb  6 14:25:24 1995  Ian Lance Taylor  <ian@cygnus.com>
1042
1043         * libelf.h (struct elf_link_hash_table): Add saw_needed field.
1044         * elfcode.h (elf_link_add_object_symbols): Set saw_needed if
1045         DT_NEEDED seen in .dynamic section.
1046         (elf_link_output_extsym): Warn if an undefined symbol is
1047         only referenced from a dynamic object, and not making a shared
1048         object, and saw_needed is false.
1049         * elf.c (_bfd_elf_link_hash_table_init): Initialize saw_needed.
1050
1051         * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
1052         * elfcode.h (elf_link_add_object_symbols): Don't clear or set
1053         ELF_LINK_HASH_DEFINED_WEAK.
1054         (elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
1055
1056         Distinguish a weak defined symbol from a regular defined symbol.
1057         * linker.c (enum link_action): Add DEFW.
1058         (link_action): Add bfd_link_hash_defweak column.
1059         (_bfd_generic_link_add_one_symbol): Add DEFW case.  Handle
1060         bfd_link_hash_defweak in a few other cases.
1061         * Many files (bfd_link_hash_undefweak): Renamed from
1062         bfd_link_hash_weak.
1063         * aoutx.h (aout_link_write_symbols): Handle bfd_link_hash_defweak.
1064         (aout_link_write_other_symbol): Likewise.
1065         (aout_link_input_section_std): Likewise.
1066         (aout_link_input_section_ext): Likewise.
1067         * bout.c (get_value): Likewise.
1068         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
1069         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1070         (alpha_relocate_section): Likewise.
1071         * coff-mips.c (mips_relocate_section): Likewise.
1072         (mips_relax_section): Likewise.
1073         (bfd_mips_ecoff_create_embedded_relocs): Likewise.
1074         * cofflink.c (coff_write_global_sym): Likewise.
1075         (_bfd_coff_generic_relocate_section): Likewise.
1076         * ecoff.c (ecoff_link_add_externals): Likewise.
1077         (ecoff_link_write_external): LIkewise.
1078         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1079         (elf32_hppa_size_stubs): Likewise.
1080         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1081         (elf_i386_relocate_section): Likewise.
1082         (elf_i386_finish_dynamic_symbol): Likewise.
1083         * elf32-mips.c (mips_elf_output_extsym): Likewise.
1084         (mips_elf_relocate_section): Likewise.
1085         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1086         (elf32_sparc_relocate_section): Likewise.
1087         * elfcode.h (elf_link_add_object_symbols): Likewise.
1088         (elf_adjust_dynamic_symbol): Likewise.
1089         (elf_bfd_final_link): Likewise.
1090         (elf_link_output_extsym): Likewise.
1091         * i386linux.c (linux_add_one_symbol): Likewise.
1092         (linux_tally_symbols): Likewise.
1093         (linux_finish_dynamic_link): Likewise.
1094         * linker.c (_bfd_generic_link_output_symbols): Likewise.
1095         (set_symbol_from_hash): Likewise.
1096         * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1097         (bfd_perform_slip): Likewise.
1098         * sunos.c (sunos_add_one_symbol): Likewise.
1099         (sunos_scan_std_relocs): Likewise.
1100         (sunos_scan_ext_relocs): Likewise.
1101         (sunos_scan_dynamic_symbol): Likewise.
1102         (sunos_write_dynamic_symbol): Likewise.
1103
1104 Mon Feb  6 03:20:17 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
1105
1106         Changes from Bryan Ford, baford@schirf.cs.utah.edu:
1107         * config.bfd (i[345]86-*-msdos*): New target.
1108         * configure.in (i386msdos_vec): Handle it.
1109         * i386msdos.c: New file.
1110         * config/i386-msdos.mt: New file.
1111         * bfd.c (enum bfd_error): Added new value bfd_error_file_too_big.
1112         (bfd_errmsgs): Added string to table.
1113         * libaout.h (reloc_type-lookup): Declare it.
1114         * targets.c (enum bfd_flavour): Added bfd_target_msdos_flavour.
1115         (i386msdos_vec): Declare.
1116         (bfd_target_vector): Add it to the list.
1117         * bfd-in2.h: Regenerated.
1118
1119 Wed Feb  1 01:32:14 1995  Jeff Law  (law@snake.cs.utah.edu)
1120
1121         * som.c (som_set_reloc_info, case R_DATA_ONE_SYMBOL): If there's
1122         nothing in R_DATA_OVERRIDE, then try to find the addend in the
1123         section's contents.
1124         (som_write_fixups): Ignore the addend in a R_DATA_ONE_SYMBOL fixup.
1125
1126         * som.c (som_object_setup): More heruistics to detect the
1127         braindamaged HP OSF1 linker. 
1128         (setup_sections): Don't forget to free subspace_sections if we get
1129         an error.
1130         (som_slurp_string_table): Allocate strings on this bfd's obstack
1131         rather than directly out of the heap.
1132         (som_slurp_symbol_table): Likewise for the saved copy of the
1133         canonical symbols.
1134         (som_slurp_reloc_table): Likewise for the saved copy of the
1135         canonical relocations.  Free the native relocations when we're
1136         done with them.
1137
1138 Tue Jan 31 21:53:28 1995  Doug Evans  <dje@canuck.cygnus.com>
1139
1140         * libelf.h (struct elf_obj_tdata): New member program_header_size.
1141         * elfcode.h (get_program_header_size): New parameters sorted_hdrs,
1142         count, and maxpagesize.  All callers updated.
1143         If sorted_hdrs is non-NULL, use it to compute the number of segments.
1144         Save result in case called again.
1145         (assign_file_positions_except_relocs): Sort headers before calling
1146         get_program_header_size.
1147
1148 Tue Jan 31 15:27:53 1995  Ian Lance Taylor  <ian@cygnus.com>
1149
1150         * elfcode.h (map_program_segments): Add sorted_hdrs parameter.
1151         Search through it rather than through unsorted section headers.
1152         (assign_file_positions_except_relocs): Pass sorted_hdrs to
1153         map_program_segments.
1154
1155 Mon Jan 30 22:04:53 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
1156
1157         * ecoff.c (_bfd_ecoff_find_nearest_line): Fix problems in range
1158         checking.  Expect argument OFFSET to be section-relative.  From
1159         David Mosberger-Tang, davidm@piston.cs.arizona.edu.
1160
1161 Mon Jan 30 11:22:11 1995  Ian Lance Taylor  <ian@cygnus.com>
1162
1163         * elfcode.h (NAME(bfd_elf,record_link_assignment)): Don't do
1164         anything if we are not linking an ELF file.
1165         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1166
1167 Sat Jan 28 12:48:57 1995  Jeff Law  (law@snake.cs.utah.edu)
1168
1169         * som.c (compare_subspaces): New function to sort subspaces by
1170         their location in the object file.
1171         (setup_sections): When computing the index for each subspace,
1172         handle case where setup_sections reads the subspaces in a
1173         different order that they appear in the object file.
1174         (som_is_space): Also examine the output section for the containing
1175         section.
1176         (som_is_subspace, som_is_container): Likewise.
1177         (som_begin_writing): Don't prepare or write fixups here.  When
1178         writing the symbol strings, use the unsorted symbol table.
1179         (som_write_object_contents): Don't write the symbol table here.
1180         (som_finish_writing): Prepare and write the fixups here.  Likewise
1181         for the symbol table.
1182         (som_bfd_derive_misc_symbol_info): Undefined symbols always have
1183         type SS_UNSAT regardless of BSF_EXPORT.
1184         (som_set_reloc_info): Unpack and attach argument location
1185         information for R_PCREL_CALL and R_ABS_CALL relocations.
1186
1187         * som.c (som_object_setup): New heuristic to determine if the
1188         entry and flags fields are switched in the exec header.
1189
1190 Sat Jan 28 00:16:01 1995  Ian Lance Taylor  <ian@cygnus.com>
1191
1192         * elfcode.h (elf_link_add_object_symbols): Use *sym_hash instead
1193         of h if we might not be doing an ELF link.
1194
1195 Fri Jan 27 16:13:42 1995  Ian Lance Taylor  <ian@cygnus.com>
1196
1197         * elf32-mips.c (mips_elf_final_link): If the size of an input
1198         .reginfo section is zero, force it to the correct size, since the
1199         linker emulation code may have clobbered it.
1200
1201         * elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
1202         (assign_file_positions_except_relocs): Free sorted_hdrs.
1203
1204 Thu Jan 26 09:00:12 1995  Steve Chamberlain  <sac@splat>
1205
1206         * srec.c (srec_set_section_contents): Fix off by
1207         one end address calculation.
1208
1209         * config.bfd: (m68*-est-coff): New configuration.
1210
1211 Thu Jan 26 11:39:21 1995  Ian Lance Taylor  <ian@cygnus.com>
1212
1213         * elfcode.h (elf_link_add_object_symbols): Only examine weakdef if
1214         we are using an ELF hash table.
1215
1216         * aoutx.h (NAME(aout,some_aout_object_p)): Always set EXEC_P if
1217         the start address is in the .text section, even if STAT_FOR_EXEC
1218         is set.  Just use STAT_FOR_EXEC as an additional test.
1219
1220 Thu Jan 26 11:12:54 1995  Michael Meissner  <meissner@cygnus.com>
1221
1222         * elfcode.h (prep_headers): Use EM_PPC instead of
1223         EM_CYGNUS_POWERPC.
1224
1225         * elf32-ppc.c (reloc_type): Add all System V.4 and eABI
1226         relocations currently defined.
1227         (powerpc_reloc_map): Adjust to new relocation names.
1228         (elf_powerpc_howto_table): Add most of the new relocations.
1229         (ELF_MACHINE_CODE): Use EM_PPC instead of EM_CYGNUS_POWERPC.
1230
1231         * config.bfd: Add support for powerpc-*-eabi.
1232
1233         * config/ppc-elf.mt: Add rs6000 architecture support to the
1234         PowerPC.  Also add XCOFF support.
1235
1236 Wed Jan 25 23:26:13 1995  Ian Lance Taylor  <ian@cygnus.com>
1237
1238         * coff-sh.c (CALC_ADDEND): Don't define.
1239         (coff_sh_relocate_section): Remove.
1240         (coff_relocate_section): Use _bfd_coff_generic_relocate_section.
1241
1242 Tue Jan 24 14:22:47 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1243
1244         * elf32-mips.c (mips_elf_output_extsym): Set the value of the
1245         ECOFF symbol from the hash table entry.
1246
1247 Mon Jan 23 14:53:35 1995  Steve Chamberlain  <sac@splat>
1248
1249         * coff-sh.c (coff_sh_relocate_section):  Don't subtract
1250         vma twice.
1251
1252 Mon Jan 23 13:33:18 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1253
1254         * coff-sh.c (sh_reloc): Don't ignore the previous contents of an
1255         R_SH_IMM32 reloc.
1256
1257         * config.bfd (i[345]86-*-gnu*): Set bfd_name to i386-gnu.
1258         * config/i386-gnu.mt: New file.  Include ELF support.
1259
1260         * opncls.c (bfd_openstreamr): Call bfd_cache_init.
1261
1262 Fri Jan 20 11:44:45 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1263
1264         * sunos.c (sunos_add_one_symbol): Only set the sunos specific
1265         fields if we are doing a sunos link.
1266
1267 Wed Jan 18 12:28:17 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1268
1269         * cpu-h8300.c (h8300_info_struct): Change name from "H8/300" to
1270         "h8300" for consistency with other cpu-* files.
1271         (h8300h_info_struct): Change name from "H8/300H" to "h8300h".
1272         * coff-h8300.c (special): Remove unused variable diff.
1273
1274 Tue Jan 17 10:52:32 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1275
1276         * bfd-in.h (bfd_byte, reloc_howto_type): Define here, not...
1277         * reloc.c (bfd_byte, reloc_howto_type): here.
1278         * Changed all occurrences of ``const struct reloc_howto_struct''
1279         to be ``reloc_howto_type'' instead.
1280         * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
1281
1282         * opncls.c (bfd_openstreamr): New function.
1283         * bfd-in2.h: Rebuilt.
1284
1285         * elf32-mips.c (enum reloc_type): Define new relocs used on Irix.
1286         (elf_mips_howto_table): Add entries for new relocs.
1287         (mips_elf_section_from_shdr): Handle SHT_MIPS_MSYM,
1288         SHT_MIPS_DWARF, and SHT_MIPS_EVENTS.
1289         (mips_elf_fake_sections): Handle sections named .msym, .debug_*
1290         and .MIPS.events.*.
1291
1292         * srec.c (srec_init): Remove unused local variable i.
1293
1294 Sat Jan 14 19:09:48 1995  Steve Chamberlain  <sac@jonny>
1295
1296         * archures.c, Makefile.in, targets.c, bfd-in2.h, coffcode.h,
1297         config.bfd, configure.in, config/w65.mt: Initial support for the W65.
1298
1299 Sun Jan 15 13:57:45 1995  Steve Chamberlain  <sac@splat>
1300
1301         * opncls.c (bfd_fdopenr): Configure for WIN32.
1302
1303 Thu Jan 12 16:30:47 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
1304
1305         * Makefile.in (diststuff): Include `headers'.
1306
1307         * sunos.c (m68k_plt_first_entry, sparc_plt_first_entry): Now
1308         const.
1309         * tekhex.c (digs): Ditto.
1310         * elf32-i386.c (elf_i386_plt0_entry, elf_i386_plt_entry): Ditto.
1311
1312         * srec.c, tekhex.c: Include libiberty.h.  Delete static array
1313         hex_value and replace references to it with references to
1314         hex_init, hex_p, and hex_value.
1315         * Makefile.in: Updated dependencies.
1316
1317         * archures.c (archures_init_table): Now const.
1318         (bfd_arch_init): Adjusted type of local var `ptable'.
1319 start-sanitize-rce
1320
1321         * Makefile.in (ALL_MACHINES): Include cpu-rce.o.
1322         (BFD32_BACKENDS): Include aout-rce.o.
1323 end-sanitize-rce
1324 start-sanitize-arc
1325
1326         * Makefile.in (ALL_MACHINES): Include cpu-arc.o.
1327         (BFD32_BACKENDS): Include elf32-arc.o.
1328 end-sanitize-arc
1329
1330 Thu Jan 12 09:33:24 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
1331
1332         * hosts/symmetry.h:  Redefine `shared' to enable compilation
1333         with the native Dynix cc compiler.
1334         * i386dynix.c:  Include aoutx.h instead of using routines
1335         from aout32.c.
1336
1337 Wed Jan 11 21:31:41 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
1338
1339         * reloc.c (reloc_howto_type): Make typedef include `const'.
1340         * aout-ns32k.c, aoutx.h, bout.c, cf-m68klynx.c, coff-i386.c,
1341         coff-i960.c, coff-m68k.c, cofflink.c, cpu-ns32k.c, ecoff.c,
1342         elf32-hppa.c, elf32-i386.c, elf32-mips.c, elf32-sparc.c,
1343         elfcode.h, libbfd-in.h, linker.c, mipsbsd.c, nlm32-ppc.c, oasys.c,
1344         reloc.c, som.c: Don't use `const' in combination with
1345         `reloc_howto_type'.
1346 start-sanitize-arc
1347         * elf32-arc.c: Ditto.
1348 end-sanitize-arc
1349         * bfd-in2.h, libbfd.h: Regenerated.
1350
1351         * ecoff.c (ecoff_type_to_string): Local variable `buffer1' doesn't
1352         need to be static.
1353
1354 Wed Jan 11 14:36:41 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1355
1356         * sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
1357         definition of an absolute symbol is encountered.
1358
1359         * linker.c (_bfd_generic_link_add_one_symbol): Ignore
1360         redefinitions of an absolute symbol to the same value.
1361
1362 Mon Jan  9 15:51:32 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1363
1364         * elfcode.h (elf_link_add_object_symbols): It's reasonable for no
1365         flags to be set, so don't insist otherwise.
1366
1367 Fri Jan  6 16:39:40 1995  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1368
1369         * elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
1370         undefined or common symbol.
1371         (elf_link_add_object_symbols): Likewise.
1372
1373 Wed Jan  4 14:14:05 1995  Jeff Law  (law@snake.cs.utah.edu)
1374
1375         * som.c (bfd_section_from_som_symbol): Only return sections which
1376         correspond to subspaces.
1377
1378         * som.c (som_begin_writing): Don't forget to bump the
1379         total_subspaces when writing the unloadable subspaces.
1380
1381 Wed Dec 28 20:54:47 1994  Jeff Law  (law@snake.cs.utah.edu)
1382
1383         * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
1384         bss-like sections.
1385         (som_get_section_contents): Likewise.
1386         (som_set_section_contents): Likewise.
1387
1388 Tue Dec 27 14:03:47 1994  Jeff Law  (law@snake.cs.utah.edu)
1389
1390         * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-like
1391         sections.
1392
1393 Tue Dec 20 15:30:12 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
1394
1395         * coffgen.c (bfd_debug_section): Deleted.
1396         (coff_section_from_bfd_index): Return absolute section for debug
1397         symbol.
1398         (coff_write_symbol): Set BSF_DEBUGGING for C_FILE symbols.  If
1399         BSF_DEBUGGING is set, set section to N_DEBUG.
1400         (coff_bfd_make_debug_symbol): Use absolute section.
1401
1402         * elfcode.h (assign_file_positions_except_relocs): In assertion,
1403         force all values to the same type.
1404
1405 Tue Dec 20 11:11:58 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1406
1407         * coff-h8300.c (howto_table): All relocs get a special function.
1408         (special): Never do anything when linking -r.
1409
1410 Tue Dec 20 13:58:01 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1411
1412         * i386linux.c (linux_add_one_symbol): Don't do anything Linux
1413         specific if this is not a Linux hash table.  From Eric Youngdale
1414         <eric@aib.com>.
1415
1416         Patches from kkojima@mix.or.jp (Kazumoto Kojima):
1417         * mipsbsd.c (mips_howto_table_ext): Change sizes of memory relocs
1418         apply to from two bytes to four bytes.
1419         * MY(reloc_howto_type_lookup): Handle BFD_RELOC_CTOR.
1420
1421         * elf32-i386.c (elf_i386_relocate_section): Correct and expand the
1422         list of cases for which relocation need not be computed.
1423         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1424
1425 start-sanitize-arc
1426 Tue Dec 20 09:01:01 1994  Doug Evans  <dje@canuck.cygnus.com>
1427
1428         * elf32-arc.c (elf_arc_howto_table, R_ARC_B22_PCREL): Value is
1429         right-shifted 2 bits.  Fix dst_mask.
1430 end-sanitize-arc
1431
1432 Mon Dec 19 23:09:16 1994  Jeff Law  (law@snake.cs.utah.edu)
1433
1434         * elf32-hppa.c (elf32_hppa_read_symext_info): Delete do_locals and
1435         do_globals arguments, always read symbol extension information for
1436         globals and locals.  All callers changed.
1437         (elf32_hppa_size_stubs): Rework to only read symbol extension
1438         information once for each input bfd.  10% improvement in linker
1439         performance.
1440
1441 Fri Dec 16 12:28:46 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1442
1443         * elfcode.h (elf_section_from_bfd_section): Check
1444         bfd_is_abs_section, etc., only after checking for the section in
1445         the BFD and after calling the backend routine.
1446
1447 Wed Dec 14 20:21:58 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1448
1449         * elfcode.h (elf_map_symbols): Only use section symbols whose
1450         value is the start of the section, checking output_offset when
1451         using output_section.  When creating a new symbol, set the value
1452         to 0, since BFD symbol values are section relative.
1453
1454 Tue Dec 13 13:31:06 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1455
1456         * cpu-z8k.c (arch_info_struct): Make z8002 the default
1457         architecture.
1458
1459 Fri Dec  9 12:43:05 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1460
1461         * elfcode.h (elf_bfd_link_add_symbols): If the first object in the
1462         archive is not an ELF object, pass the archive to the add_symbols
1463         entry point appropriate for the first object.  From Eric Youngdale
1464         <eric@aib.com>.
1465         * aoutx.h (NAME(aout,link_add_symbols)): Similar change if the
1466         first object is not an a.out object.
1467
1468         * elf32-i386.c (elf_i386_relocate_section): Don't compute
1469         relocation in cases where we won't use it.
1470         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1471
1472 Thu Dec  8 14:19:41 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
1473
1474         * pc532-mach.c (NAME): Define to use ns32kaout prefix.
1475         * ns32knetbsd.c (NAME): Ditto.
1476         (ns32kaout_32_get_section_contents): Define to standard aout-32
1477         version.
1478
1479 Fri Dec  2 13:56:49 1994  Ian Lance Taylor  <ian@rtl.cygnus.com>
1480
1481         * coff-mips.c (mips_read_relocs): New static function, broken out
1482         of mips_relax_section.
1483         (mips_relax_section): Call mips_read_relocs.
1484         (bfd_mips_ecoff_create_embedded_relocs): New function.
1485         * bfd-in.h (bfd_mnips_ecoff_create_embedded_relocs): Declare.
1486         * bfd-in2.h: Rebuild.
1487
1488 Wed Nov 30 14:12:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1489
1490         * coff-sh.c: Use _bfd_dummy_target instead of no_archive.
1491
1492 start-sanitize-arc
1493 Tue Nov 29 17:14:21 1994  Doug Evans  <dje@canuck.cygnus.com>
1494
1495         * archures.c: Initial support for the ARC.
1496         * reloc.c, targets.c, config.bfd, configure.in, elfcode.h: Likewise.
1497         * bfd-in2.h: Regenerated.
1498         * libbfd.h: Likewise.
1499         * config/arc-elf.mt: New file.
1500 end-sanitize-arc
1501
1502 Tue Nov 29 14:00:19 1994  J.T. Conklin  <jtc@.rtl.cygnus.com>
1503
1504         * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name.
1505         * configure.host (i[345]86-*-freebsd*): Use i386bsd as my_host.
1506
1507 Mon Nov 28 15:36:04 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
1508
1509         * config/m68k-nbsd.mt (DEFAULT_VECTOR): set to m68knetbsd_vec.
1510         * Makefile.in: Rebuilt dependancies.
1511           (CFILES): Added m68knetbsd.c.
1512           (HFILES): Added netbsd.h.
1513
1514 Wed Nov 23 19:21:41 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
1515
1516         * coff-sh.c (shlcoff_vec): New target vector.
1517         (no_archive): New function.
1518         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
1519         little endian SH.
1520         * configure.in: Handle shl.
1521         * targets.c (bfd_target_vector): Add shlcoff_vec.
1522         * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
1523
1524 Wed Nov 23 10:50:13 1994  Jeff Law  (law@snake.cs.utah.edu)
1525
1526         * elfcode.h (write_relocs): Do not subtract the section's vma from
1527         the reloc's offset when writing .o's.  Instead add the section's
1528         vma to the reloc's offset when writing an executable or shared
1529         library.
1530
1531 Tue Nov 22 23:34:37 1994  Jeff Law  (law@snake.cs.utah.edu)
1532
1533         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
1534         input_section->vma to the relocation's offset.
1535
1536 Mon Nov 21 12:37:25 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1537
1538         * srec.c (srec_get_reloc_upper_bound): Define.
1539         (srec_canonicalize_reloc): Define.
1540         (srec_bfd_reloc_type_lookup): Define.
1541         (srec_vec, symbolsrec_vec): Use BFD_JUMP_TABLE_RELOCS (srec).
1542
1543 Sat Nov 19 03:10:51 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
1544
1545         * configure.host (i[345]86-*-solaris*):  Use solaris2 to
1546         enable extraction of procfs info from core file for GDB.
1547
1548 Thu Nov 17 17:37:39 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
1549
1550         * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.
1551         * bfd-in2.h, libbfd.h: Rebuilt.
1552
1553 Thu Nov 17 13:12:08 1994  Jeff Law  (law@snake.cs.utah.edu)
1554
1555         * bfd/elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
1556         vma from the output_section containing $global$ when computing
1557         global_vlaue.
1558
1559 Thu Nov 17 14:29:13 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1560
1561         * archive.c (_bfd_write_archive_contents): Round up the archive
1562         header size of the extended name table to an even number.
1563
1564 Wed Nov 16 16:08:06 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
1565
1566         * coff-sh.c: Deleted some code that was commented out or inside
1567         "#if 0".
1568         (COFF_LONG_FILENAMES): Define.
1569
1570         * cpu-sh.c (arch_info_struct): Convert name to lowercase, for
1571         consistency with other architectures.
1572
1573 Sat Nov 12 23:50:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1574
1575         * elfcode.h (elf_export_symbol): Also export symbols which are
1576         referenced by a regular file.
1577
1578 Fri Nov 11 14:29:31 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1579
1580         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add
1581         export_dynamic argument, and handle it.
1582         (elf_export_symbol): New function.
1583         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1584         (bfd_elf64_size_dynamic_sections): Update declaration.
1585         * bfd-in2.h: Rebuild.
1586
1587 Fri Nov 11 10:35:33 1994  Jeff Law  (law@snake.cs.utah.edu)
1588
1589         * hpux-core.c (hpux_core_struct): Delete handles for the
1590         data, reg and stack sections.  They're never used.  Delete
1591         accessor macros.
1592         (make_bfd_asection): Use bfd_make_section_anyway since debugging
1593         cores from dynamic executables may have several sections with the
1594         same logical name.
1595         (hpux_core_core_file_p): Don't save handles to data, reg and
1596         stack sections.  Handle CORE_TEXT, CORE_MMF and CORE_SHM.
1597
1598 Tue Nov  8 13:03:30 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1599
1600         * bout.c (callj_callback): Add new argument shrinking.  Change all
1601         callers.  Handle relocs against section symbols correctly.  If not
1602         shrinking, don't subtract out dstidx; the subtraction is already
1603         in the object file.
1604
1605 Sun Nov  6 12:52:00 1994  Jeff Law  (law@snake.cs.utah.edu)
1606
1607         * som.h: Conditionally include <shl.h> and <dl.h>.
1608
1609 Thu Nov  3 18:19:13 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
1610
1611         * Makefile.in (ALL_MACHINES): Include m68knetbsd.o.
1612
1613         * config/i386linux.mh (EXTRALIBS): Include -lm.
1614
1615         Patches from DJ Delorie:
1616         * coff-go32.c: Replacement file, uses coff-i386.c with minor
1617         changes.
1618         * coff-i386.c (TARGET_UNDERSCORE): allow other files to override
1619         underscore also
1620         * makefile.dos: del ctor.o, add cofflink.o and elf32.o
1621
1622         * aoutx.h (adjust_o_magic): If user set data section vma, use it
1623         to determine the default bss vma.  Patch from Takada Hiroaki,
1624         hiro@is.s.u-tokyo.ac.jp.
1625         (machine_type, case bfd_arch_vax): Set *unknown to false.  Patch
1626         from John David Anglin <dave@hiauly1.hia.nrc.ca>.
1627
1628         * configure.in (tb): Rename ns32knetbsd_vec to pc532netbsd_vec,
1629         since that's what it's called.
1630
1631 Wed Nov  2 15:24:51 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1632
1633         * archive.c (normalize): Change to take a BFD as an argument.
1634         Change VMS version to use bfd_alloc rather than malloc, so that we
1635         don't lose the memory forever.
1636         (_bfd_construct_extended_name_table): Check the name of an archive
1637         entry which is not being extended, and correct it if it is wrong.
1638         This is necessary in case the archive was constructed by another
1639         program which put an entry in the extended name table which we
1640         don't plan to put in ourselves.  From jjc@jclark.com (James
1641         Clark).
1642         (bfd_dont_truncate_arname): Check return value of normalize.
1643
1644 Mon Oct 31 14:19:08 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1645
1646         * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
1647         (ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
1648         (symextn_entry): Don't define.
1649         (symext_chain_size): Change type to bfd_size_type.
1650         (symextn_contents): Change type to bfd_byte *.
1651         (elf32_hppa_backend_begin_write_processing): Use
1652         ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
1653         (elf32_hppa_size_symext): Likewise.  Also, change type of sizep to
1654         bfd_size_type *.
1655         (elf_hppa_tc_make_sections): Cast symextn_contents assignment to
1656         bfd_byte *.  Use ELF32_PARISC_SX_PUT instead of direct assignment.
1657         (elf32_hppa_backend_symbol_table_processing): Use
1658         ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).  Use
1659         ELF32_PARISC_SX_GET insetad of direct assignment.
1660         (elf32_hppa_read_symext_info): Change type of contents, and its
1661         assignment cast, to bfd_byte *.  Use ELF32_PARISC_SX_SIZE instead
1662         of sizeof (symextn_entry).  Use symext_entryS instead of
1663         symextn_entry.  Use ELF32_PARISC_SX_GET instead of direct
1664         assignment.
1665
1666         * archive.c (bfd_dont_truncate_arname): Add the ar padding
1667         character, if there is room for it, even if the name is the
1668         maximum length.
1669
1670         * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
1671         headers by section address when assigning file positions.
1672         (elf_sort_hdrs): New static function.
1673
1674 Sun Oct 30 18:56:58 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1675
1676         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
1677         and DT_FINI dynamic entries based on the existence of _init and
1678         _fini symbols, not on the .init and .fini sections.  This is
1679         compatible with some SVR4 linkers.
1680         (elf_bfd_final_link): Corresponding change.
1681
1682 Sat Oct 29 12:18:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1683
1684         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
1685         symbol with a PLT entry into the .plt section if it is defined in
1686         a regular file.
1687         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1688
1689         * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
1690         error if an empty archive has no symbol table.
1691         * ecoff.c (ecoff_link_add_archive_symbols): Likewise.
1692         * elfcode.h (elf_link_add_archive_symbols): Likewise.
1693
1694 Fri Oct 28 10:08:41 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
1695
1696         NetBSD/m68k support, based on work by mikeb@snow.datametrics.com: 
1697         * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
1698         * configure.in (m68knetbsd_vec): Added.
1699         * targets.c (bfd_m68knetbsd_vec): Added.
1700         * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
1701         * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
1702
1703         miscellaneous cleanup required by all netbsd targets, based on work 
1704         by Andrew Cagney <cagney@highland.com.au>:
1705         * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
1706           N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
1707           definitions work.
1708         * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
1709           (MY(write_object_contents)): Use NetBSD's magic numbers
1710
1711 Thu Oct 27 16:59:52 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1712
1713         * libelf.h (struct bfd_elf_section_data): Add field dynindx.
1714         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
1715         the .dynsym, .dynstr or .hash sections until after the backend
1716         size_dynamic_sections routine, so that it can add dynamic symbols
1717         if it wants to.
1718         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
1719         symbol to be in the .plt section when generating a shared library
1720         if it is a defined symbol.
1721         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1722         (elf32_sparc_size_dynamic_sections): When generating a shared
1723         library, allocate space for a dynamic symbol for each output
1724         section, storing the index in the dynindx field of the ELF section
1725         data.  Adjust the other dynindx fields to account for this.
1726         (elf32_sparc_adjust_dynindx): New static function.
1727         (elf32_sparc_relocate_section): When copying a reloc into a shared
1728         library, use the original addend as appropriate.  Convert an
1729         R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc.  Use the dynamic
1730         symbol index of the output section, not the normal symbol index.
1731         (elf32_sparc_finish_dynamic_sections): Don't die if a section does
1732         not exist when setting the value of the dynamic tags.  Write out
1733         a dynamic symbol for each output section.
1734
1735 Wed Oct 26 01:15:51 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1736
1737         * aoutx.h (aout_link_input_section): Don't bother to read or write
1738         the relocs if there aren't any.
1739
1740 Tue Oct 25 11:44:38 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1741
1742         * Makefile.in (ALL_MACHINES): Add tekhex.o.
1743         * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
1744         include tekhex_vec.
1745         * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
1746         (getvalue, getsym, out): Likewise.
1747         (find_chunk): Remove unused variable s.
1748         (first_phase): Remove unused variable s.
1749         (pass_over): Remove unused variable address.
1750         (tekhex_object_p): Remove unused variable section.
1751         (move_section_contents): Change return type from boolean to void.
1752         (tekhex_write_object_contents): Remove unused variables tdata and
1753         list.
1754
1755         * linker.c (enum link_action): Add CIND.
1756         (link_action): Change COMMON_ROW\indr from MDEF to CREF.  Change
1757         INDR_ROW\common from MDEF to CIND.
1758         (_bfd_generic_link_add_one_symbol): In CREF case, handle an
1759         existing symbol which is indirect rather than defined.  Add new
1760         CIND case.
1761
1762 Mon Oct 24 15:33:16 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1763
1764         Change S-record backend to use multiple sections to handle gaps in
1765         file.
1766         * srec.c (srec_data_list_struct): Move field next from last place
1767         to first.  Change type of data to bfd_byte *.
1768         (struct srec_symbol): Define.
1769         (tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
1770         string_size, string_idx.  Change type of symbols to struct
1771         srec_symbol *.  Add symtail and csymbols.
1772         (low, high): Remove.
1773         (size_symbols, fillup_symbols, size_srec, fillup): Remove.
1774         (white, skipwhite, pass_over, object_p): Remove.
1775         (srec_mkobject): Call srec_init.  Adjust tdata initialization for
1776         field changes.
1777         (srec_get_byte, srec_bad_byte): New static functions.
1778         (srec_new_symbol, srec_scan): New static functions.
1779         (srec_object_p): Change type of b to bfd_byte.  Explicitly set
1780         wrong_format error.  Call srec_mkobject and srec_scan instead of
1781         object_p.
1782         (symbolsrec_object_p): Likewise.  Also, change b to be only two
1783         bytes.
1784         (srec_read_section): New static function.
1785         (srec_get_section_contents): Call srec_read_section rather than
1786         pass_over.  Handle zero length section correctly.
1787         (set_set_arch_mach): Change from function to macro.
1788         (srec_set_section_contents): Change data to bfd_byte *.
1789         (srec_write_record): Change data, end and src to bfd_byte *.
1790         (srec_write_header): Change buffer and dst to bfd_byte *.
1791         (srec_write_section): Change location to bfd_byte *.
1792         (srec_write_terminator): Change buffer to bfd_byte *.
1793         (srec_get_symtab_upper_bound): Don't call
1794         srec_get_section_contents.
1795         (srec_get_symtab): Rewrite.
1796
1797         * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL.
1798
1799 Fri Oct 21 16:43:13 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
1800
1801         * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
1802         * i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
1803           changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
1804           consistant with each other.
1805         * netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
1806           header into the start of its text segment.
1807
1808 Fri Oct 21 17:13:07 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1809
1810         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
1811         _construct_extended_name_table.
1812         (bfd_target): Add _bfd_construct_extended_name_table.
1813         * archive.c (_bfd_archive_bsd_construct_extended_name_table): New
1814         function.
1815         (_bfd_archive_coff_construct_extended_name_table): New function.
1816         (_bfd_construct_extended_name_table): Renamed by adding a leading
1817         underscore, and made externally visible.  Added trailing_slash
1818         argument, and used it instead of elf_style.  Changed type of
1819         tablen to bfd_size_type *.
1820         (_bfd_write_archive_contents): Use BFD_SEND to call
1821         construct_extended_name_table.  Use the returned name.
1822         * libbfd-in.h (_bfd_construct_extended_name_table): Declare.
1823         (_bfd_noarchive_construct_extended_name_table): Define.
1824         (_bfd_archive_bsd_construct_extended_name_table): Declare.
1825         (_bfd_archive_coff_construct_extended_name_table): Declare.
1826         * bfd-in2.h: Rebuild.
1827         * libbfd.h: Rebuild.
1828         * som.c (som_construct_extended_name_table): New static function.
1829         * aout-target.h (MY_construct_extended_name_table): Define.
1830         * coff-rs6000.c (rs6000coff_construct_extended_name_table):
1831         Define.
1832         * ieee.c (ieee_construct_extended_name_table): Define.
1833         * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
1834         * oasys.c (oasys_construct_extended_name_table): Define.
1835
1836         Fix the ELF linker to not require an interpreter if no dynamic
1837         objects were seen, even when linking PIC code.
1838         * libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
1839         (struct elf_link_hash_table): Add field dynamic_sections_created.
1840         * elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
1841         doesn't already exist.
1842         (elf_link_add_object_symbols): Create dynamic sections based on
1843         dynamic_sections_created field, not dynobj field.  Don't bother to
1844         set dynobj.
1845         (elf_link_create_dynamic_sections): If dynamic sections were
1846         already created, don't do anything.  If dynobj is already set, use
1847         it; otherwise, set it to the bfd argument.  Don't initialize
1848         dynsymcount.  Only create dynstr if it does not exist.  Set
1849         dynamic_sections_created to true.
1850         (NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
1851         if no dynamic objects were seen.
1852         (elf_adjust_dynamic_symbol): If a symbol has the
1853         ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
1854         (elf_bfd_final_link): Change most decisions based on dynobj to
1855         check dynamic_sections_created instead.
1856         (elf_link_output_extsym): Only handle dynamic symbols if a dynamic
1857         object was seen.
1858         * elf.c (_bfd_elf_link_hash_table_init): Initialize new field
1859         dynamic_sections_created.  Set dynsymcount to 1, not 0.
1860         * elf32-i386.c (elf_i386_create_dynamic_sections): Call
1861         elf_i386_create_got_section rather than creating the .got and
1862         .got.plt sections.
1863         (elf_i386_create_got_section): New static function.
1864         (elf_i386_check_relocs): Just call elf_i386_create_got_section if
1865         a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
1866         Only create the .rel.got section, and only make space for a reloc,
1867         for a global symbol or when generating a shared object.  For a
1868         R_386_PLT32 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
1869         (elf_i386_adjust_dynamic_symbol): Rework initial assertion to
1870         permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols.  Create a
1871         procedure linkage table entry for such symbols.  But, if no
1872         dynamic objects were seen, never create a PLT entry.
1873         (elf_i386_size_dynamic_sections): If no dynamic objects were seen,
1874         skip most of this function, and force the size of the .rel.got
1875         section to zero.
1876         (elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
1877         symbol when no dynamic object was seen, initialize the contents of
1878         the .got section.  For a R_386_GOT32 against a local symbol, only
1879         create a R_386_RELATIVE reloc when generating a shared object.
1880         Treat a R_386_PLT32 reloc against a symbol for which we did not
1881         create a PLT entry as a R_386_PC32 reloc.
1882         (elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
1883         entries and the PLT if we saw a dynamic object.
1884         * elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
1885         setting rightshift to 10.  Fix R_SPARC_WPLT20 by setting
1886         rightshift to 2, size to 2, bitsize to 30, and dst_mask to
1887         0x3fffffff.
1888         (elf32_sparc_create_dynamic_sections): Don't set the size of the
1889         .plt section.  Call elf32_sparc_create_got_section rather than
1890         creating the .got section.
1891         (elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
1892         a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
1893         Only create the .rela.got section, and only make space for a
1894         reloc, for a global symbol or when generating a shared object.
1895         Set the alignment of the .rela.got section to 2.  For a
1896         R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
1897         (elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
1898         permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols.  Create a
1899         procedure linkage table for such symbols.  But, if no dynamic
1900         objects were seen, never create a PLT entry.  Initialize the size
1901         of the .plt section.
1902         (elf32_sparc_size_dynamic_sections): If no dynamic objects were
1903         seen, skip most of this function, and force the size of the
1904         .rela.got section to zero.  Strip empty reloc sections, and strip
1905         an empty .plt section.
1906         (elf32_sparc_relocate_section): For a GOT reloc against a global
1907         symbol when no dynamic object was seen, initialize the contents of
1908         the .got section.  For a GOT reloc against a local symbol, only
1909         create a R_SPARC_RELATIVE reloc when generating a shared object.
1910         Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
1911         create a PLT entry as a R_SPARC_WDISP30 reloc.
1912         (elf32_sparc_finish_dynamic_sections): Only fiddle with the
1913         dynamic entries and the PLT if we saw a dynamic object.
1914
1915 Thu Oct 20 13:28:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1916
1917         * elfcode.h (elf_map_symbols): Don't worry about section symbols
1918         in a section not owned by any BFD.
1919         (elf_section_from_bfd_section): Separate out loop which calls
1920         backend routine.  Check bfd_section and call the backend routine
1921         even for a section not owned by any BFD.
1922         * elf32-mips.c (mips_elf_section_from_bfd_section): Handle
1923         .acommon section.
1924
1925 Wed Oct 19 13:28:29 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
1926
1927         * coffgen.c (coff_print_symbol): Make names for section number and
1928         storage class slightly more verbose.  It's not clear how many
1929         characters I can justify using up, but before this change they
1930         both were abbreviated "sc" which is (IMHO) clearly unacceptable.
1931
1932 Wed Oct 19 01:26:39 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
1933
1934         * binary.c (binary_set_section_contents): Set the base file
1935         position from the lowest section VMA, not the start address.
1936
1937         * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
1938         if there are no symbols.
1939         * coffgen.c (coff_get_normalized_symtab): Likewise.
1940         * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
1941
1942 Tue Oct 18 12:56:43 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1943
1944         * aout-target.h (MY_bfd_copy_private_section_data): Only copy
1945         subformat to another bfd_target_aout_flavour file.
1946
1947         * binary.c: New file for raw binary output format.
1948         * Makefile.in (BFD_LIBS): Add binary.o.
1949         (CFILES): Add binary.c.
1950         * targets.c (binary_vec): Declare.
1951         (bfd_target_vector): Include binary_vec.
1952
1953         * srec.c (tdata_type): Add field tail.
1954         (srec_mkobject): Initialize tail.
1955         (srec_set_section_contents): Sort S record list by address.
1956
1957 Mon Oct 17 11:38:16 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
1958
1959         * elfcode.h (elf_map_symbols): Sort the symbols into a new array,
1960         rather than messing with Elf_Sym_Extra.  Store the symbol index in
1961         the udata.i field.
1962         (swap_out_syms): Use outbound_syms as a pointer rather than as an
1963         array.  Don't worry about elf_sym_num.
1964         * libelf.h (struct elf_sym_extra): Don't define.
1965         (Elf_Sym_Extra): Don't define.
1966         (struct elf_obj_tdata): Remove sym_extra field.
1967         (elf_sym_extra): Don't define.
1968         * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Use
1969         udata.i rather than elf_sym_extra array.
1970
1971         * syms.c (asymbol): Change udata field into a union.
1972         * bfd-in2.h: Rebuild.
1973         * aoutx.h (NAME(aout,translate_symbol_table)): Use udata.p rather
1974         than just udata.
1975         * bout.c (perform_slip): Likewise.
1976         * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
1977         * ieee.c (ieee_slurp_external_symbols): Likewise.
1978         * linker.c (generic_link_add_symbol_list): Likewise.
1979         (default_indirect_link_order): Likewise.
1980         * oasys.c (oasys_slurp_symbol_table): Likewise.
1981         * reloc16.c (bfd_perform_slip): Likewise.
1982         * srec.c (fillup_symbols): Likewise.
1983         * coffcode.h (get_index): Use udata.i rather than just udata.
1984         (coff_slurp_symbol_table): Likewise.
1985         * coffgen.c (set_index): Likewise.
1986         * ecoff.c (ecoff_set_symbol_info): Likewise.
1987         * elfcode.h (elf_symbol_from_bfd_symbol): Likewise.
1988         * libecoff.h (ecoff_get_sym_index, ecoff_set_sym_index): Likewise.
1989         * som.c (compare_syms): Likewise.
1990         (som_prep_for_fixups): Likewise.
1991         (som_write_fixups): Likewise.
1992
1993         Use a hash table when writing out ELF symbol names.
1994         * elfcode.h (elf_stringtab_init): New static function.
1995         (bfd_new_strtab, bfd_add_to_strtab, bfd_add_2_to_strtab): Remove.
1996         Change all callers to use elf_stringtab_init or
1997         _bfd_stringtab_add, and get stringtab lengths using
1998         _bfd_stringtab_size.
1999         (elf_fake_sections): Change ignored argument to pointer to
2000         boolean, and set the boolean to true if an error occurs.  If an
2001         error has already occurred, don't do anything.
2002         (assign_section_numbers): Just set sh_size, not contents.
2003         (elf_compute_section_file_positions): Pass the address of a
2004         boolean to elf_fake_sections.  Pass the address of a
2005         bfd_strtab_hash to swap_out_syms.  Write out the .strtab section.
2006         (prep_headers): Change shstrtab to bfd_strtab_hash.
2007         (swap_out_syms): Take a pointer to a bfd_strtab_hash as an
2008         argument.  Set it to the symbol names.
2009         (NAME(bfd_elf,write_object_contents)): Write out the section
2010         header names using _bfd_stringtab_emit.
2011         (elf_debug_section): Remove first argument; get the section name
2012         via the bfd_section pointer.  Change caller.
2013         (elf_bfd_final_link): Write out the symbol names using
2014         _bfd_stringtab_emit.  Likewise for the .dynstr section contents.
2015         Free the symbol names at the end of the function.
2016         (elf_link_input_bfd): Remove the last argument, output_names,
2017         from relocate_section.  Save the old symbol contents before
2018         calling elf_link_output_sym, and restore them afterward.
2019         * libelf.h (struct elf_link_hash_table): Change dynstr field to
2020         struct bfd_strtab_hash.
2021         (struct elf_backend_data): Remove last argument, output_names,
2022         from elf_backend_relocate_section field.
2023         (struct strtab): Don't define.
2024         (struct elf_obj_tdata): Change strtab_ptr field to struct
2025         bfd_strtab_hash.
2026         * elf32-hppa.c (elf32_hppa_relocate_section): Remove last
2027         argument, output_names.
2028         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2029         * elf32-mips.c (mips_elf_relocate_section): Likewise.
2030         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2031
2032         * libbfd-in.h (DEFAULT_STRING_SPACE_SIZE): Don't define.
2033         (bfd_add_to_string_table): Don't declare.
2034         * libbfd.h: Rebuild.
2035         * libbfd.c (bfd_add_to_string_table): Remove.
2036
2037         * elfcode.h (elf_swap_shdr_in): Use bfd_section, not rawdata.
2038         Clear contents field.
2039         (bfd_section_from_shdr): In SHT_STRTAB case, check bfd_section,
2040         not rawdata.  Don't set rawdata if e_shstrndx.  Use bfd_section
2041         rather than rawdata in commented out code.  In SHT_REL[A] case,
2042         don't bother to check elf_section_data of section returned by
2043         section_from_elf_index.
2044         (elf_fake_sections): Set bfd_section, not rawdata.  Don't set
2045         size.
2046         (elf_map_symbols): Don't set elf_num_section_syms.  Don't create
2047         section symbols that already exist.
2048         (assign_file_position_for_section): Use bfd_section, not rawdata.
2049         (section_from_elf_index): Just check bfd_section field.
2050         (elf_section_from_bfd_section): Likewise.
2051         (elf_debug_section): Don't print rawdata, contents, or size.
2052         (elf_link_add_object_symbols): Don't error out if
2053         section_from_elf_index returns NULL.
2054         (elf_bfd_final_link): Check return value from
2055         section_from_elf_index against NULL, not bfd_is_abs_section.
2056         (elf_link_input_bfd): Don't check section_from_elf_index return
2057         value.
2058         * libelf.h (struct elf_obj_tdata): Remove num_section_syms field.
2059         (elf_num_section_syms): Don't define.
2060         * elf.c (elf_get_str_section): Store section contents in contents
2061         field rather than rawdata field.
2062         (elf_string_from_elf_section): Likewise.
2063         (_bfd_elf_make_section_from_shdr): Store BFD section pointer in
2064         bfd_section field rather than rawdata field.
2065         * elf32-hppa.c (elf32_hppa_read_symext_info): Use bfd_section
2066         rather than rawdata.
2067         (elf32_hppa_size_stubs): Likewise.
2068         (elf32_hppa_backend_symbol_table_processing): Don't set
2069         symextn_hdr->size; just use sh_size.
2070         * elf32-mips.c (mips_elf_final_write_processing): Use bfd_section
2071         rathern than rawdata.
2072         (mips_elf_section_from_shdr): Likewise.
2073         (mips_elf_section_processing): Likewise.
2074         (mips_elf_section_from_bfd_section): Remove rawdata check.
2075
2076         * srec.c (pass_over): Set the start address for S7, S8 or S9.
2077
2078 Fri Oct 14 19:15:46 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
2079
2080         * VERSION: Updated to 2.5.
2081
2082 Fri Oct 14 11:07:50 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2083
2084         * bfd.c (bfd_scan_vma): Cast end to be non const before passing it
2085         to strtoul.
2086
2087 Thu Oct 13 14:40:41 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2088
2089         * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.
2090
2091 Wed Oct 12 16:46:43 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
2092
2093         * opncls.c (bfd_realloc): Deleted, since it's broken and fixing it
2094         would make it slow.  Besides, it isn't used much.
2095         * elfcode.h (elf_map_symbols): Always allocate new storage for the
2096         symbol table.
2097
2098 Wed Oct 12 11:54:37 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2099
2100         * ecoff.c (ecoff_set_symbol_info): Mark local stProc, stLabel or
2101         stabs symbols as BSF_DEBUGGING.
2102
2103         * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Make
2104         str1 and str2 const pointers.
2105
2106         * Makefile.in (INSTALL): Use top level install.sh script.
2107         * config/README (INSTALL): Remove.
2108         * config/delta88.mh (INSTALL): Remove.
2109         * config/i386v4.mh (INSTALL): Remove.
2110         * config/irix4.mh (INSTALL): Remove.
2111         * config/irix5.mh (INSTALL): Remove.
2112         * config/ncrt3000.mh (INSTALL): Remove.
2113
2114 Tue Oct 11 13:57:56 1994  Eric Youngdale  (eric@andante.aib.com)
2115
2116         * elf32-i386.c (elf_i386_check_relocs): Make sure that a symbol
2117         with a global offset table entry or a procedure linkage table
2118         entry is added to the dynamic symbol table.
2119         * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2120         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): If a symbol has
2121         already gotten a procedure linkage table entry, change the
2122         definition to the PLT entry.
2123         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
2124
2125 Tue Oct 11 17:12:00 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2126
2127         * lynx-core.c (lynx_core_file_p): SPARC Lynx appears to start
2128         dumping the .data section in a core file at a page boundary.
2129
2130 Mon Oct 10 16:24:44 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
2131
2132         * cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32
2133         to correct type.
2134         (coff_read_string_table): Cast argument to bfd_h_get_32 to correct
2135         type.
2136         * elfcode.h (elf_link_output_extsym): Cast argument to
2137         bfd_elf_hash to correct type.
2138
2139         * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and
2140         WPLT30 relocations are PC-relative.
2141
2142 Thu Oct  6 12:57:26 1994  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
2143
2144         * aoutx.h (adjust_o_magic): Correctly initialize vma if the vma of
2145         the text section was user-defined.
2146
2147 Wed Oct  5 14:42:12 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2148
2149         * archive.c (bfd_construct_extended_name_table): SVR4 uses slash
2150         newline at the end of the file name, not just newline.
2151
2152 Tue Oct  4 11:23:12 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2153
2154         * ecoff.c (_bfd_ecoff_new_section_hook): Default section alignment
2155         power to 4, rather than using align_power_min.
2156
2157         * coffcode.h (coff_new_section_hook): Don't use align_power_min;
2158         use COFF_DEFAULT_SECTION_ALIGNMENT_POWER instead.  Force the .stab
2159         and .stabstr sections to be aligned to no more than 2.  Remove
2160         COFF_SPARC special cases.
2161         * coff-a29k.c: Define COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
2162         * coff-apollo.c, coff-go32.c, coff-h8300.c: Likewise.
2163         * coff-h8500.c, coff-i386.c, coff-i960.c, coff-m68k.c: Likewise.
2164         * coff-m88k.c, coff-rs6000.c, coff-sh.c, coff-sparc.c: Likewise.
2165         * coff-we32k.c, coff-z8k.c: Likewise.
2166
2167         * configure.in: Use ${config_shell} when running config.bfd.
2168
2169         * cofflink.c (coff_link_input_bfd): Don't try to convert a long
2170         filename if the offset field is zero.
2171
2172         * elfcode.h (swap_out_syms): If the alignment of a common symbol
2173         was not set, use a sensible default rather than zero.
2174
2175 Mon Oct  3 16:04:29 1994  H.J. Lu (hjl@nynexst.com)
2176
2177         * opncls.c (bfd_close): Honor umask when setting execution bits.
2178         (bfd_close_all_done): Likewise.
2179
2180 Mon Oct  3 04:41:49 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
2181
2182         * rs6000-core.c (rs6000coff_core_p):  Set SEC_HAS_CONTENTS flag
2183         for .stack and .ldinfo sections. Cast coredata.c_tab to a
2184         file_ptr to avoid warnings from gcc.
2185
2186 Fri Sep 30 13:11:38 1994  Ian Lance Taylor  <ian@sanguine.cygnus.com>
2187
2188         * elfcode.h (elf_bfd_final_link): Remove assertion when a non
2189         SEC_IN_MEMORY section is found in dynobj.  This can happen when
2190         linking PIC compiled code.
2191
2192 Thu Sep 29 15:21:44 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
2193
2194         * reloc.c (bfd_install_relocation): Change type of "data" to
2195         bfd_byte *, to go along with yesterday's change.
2196
2197         * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol
2198         in elfcode.h.  (case bfd_print_symbol_all): Print symbol's size
2199         field, except for common symbols; print their alignment.
2200         * elfcode.h (elf_print_symbol): Deleted.
2201         * libelf.h (bfd_elf_print_symbol): Declare.
2202         (bfd_elf{32,64}_print_symbol): Replace declarations with macros.
2203
2204         * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL
2205         in one column.  Use the column freed up to show BSF_FUNCTION and
2206         BSF_FILE.
2207
2208 Thu Sep 29 12:29:01 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2209
2210         * syms.c (stt): Add .rdata and .rodata.
2211
2212 Wed Sep 28 13:35:05 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2213
2214         * reloc.c (bfd_install_relocation): Cast data_start to bfd_byte *
2215         before trying to add values to it.
2216
2217 Tue Sep 27 16:47:58 1994  Ken Raeburn  <raeburn@cujo.cygnus.com>
2218
2219         * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Cast
2220         return value from elf_sym_extra.
2221         (elf32_hppa_build_stubs): Cast return value from bfd_zalloc.
2222         (elf32_hppa_size_stubs): Cast return value from malloc.
2223
2224         * gen-aout.c (main): Declare and initialize "arch".
2225
2226         * cofflink.c (coff_link_add_symbols): Cast return value of
2227         bfd_hash_allocate.
2228
2229         * riscix.c (riscix_callback): Use PARAMS macro in prototype.
2230
2231         * reloc.c (bfd_install_relocation): New function, mostly copied
2232         from bfd_perform_relocation, adjusted for the assembler's needs.
2233         * bfd-in2.h: Regenerated.
2234
2235 Mon Sep 26 11:00:14 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2236
2237         * elfcode.h (assign_file_positions_except_relocs): Align the
2238         section VMA and the file position even if D_PAGED is not set.
2239
2240         * bfd-in.h (bfd_seek): Change declaration to not mark fp const.
2241         * bfd-in2.h: Rebuild.
2242         * libbfd.c (bfd_seek): Don't mark parameters const, to avoid
2243         conflicts with declaration.
2244
2245 Fri Sep 23 15:15:31 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2246
2247         * elfcode.h (map_program_segments): Don't abort if we allocated
2248         too much space for the program header, only if we allocated too
2249         little.
2250         (assign_file_positions_except_relocs): Similar change.
2251
2252 Tue Sep 20 13:17:07 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
2253
2254         * libaout.h: Fix comment.
2255         * ns32knbsd.h: Changed M_NS32K_NETBSD to M_532_NETBSD to match
2256           libaout.h.
2257
2258 Tue Sep 20 15:23:21 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2259
2260         * Makefile.in: Rebuilt dependencies.
2261         (BFD32_BACKENDS): Add sparcnetbsd.o.
2262         (CFILES): Add ns32knetbsd.c and sparcnetbsd.c.
2263         * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec.
2264
2265         * coff-sh.c (rtype2howto): Remove; unused.
2266         (coff_sh_relocate_section): Remove unused local variable rstat.
2267         (reloc_processing): Comment out; unused.
2268
2269 Fri Sep 16 12:12:27 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2270
2271         * aoutx.h (aout_link_write_other_symbol): If h->indx is -2, then
2272         always write it out even if it would normally be stripped.
2273         (aout_link_input_section_std): If we find a reloc against a
2274         stripped global symbol, force it to be written out rather than
2275         merely calling unattached_reloc.
2276         (aout_link_input_section_ext): Likewise.
2277         (aout_link_reloc_link_order): Likewise.
2278
2279 Wed Sep 14 15:37:19 1994  Jeff Law  (law@snake.cs.utah.edu)
2280
2281         * som.h (struct somdata): New field sorted_syms.
2282         (obj_som_sorted_syms): Accessor macro.
2283         * som.c (som_object_setup): Initialize sorted_syms to NULL.
2284         (som_prep_for_fixups): Sort a copy of the BFD's symbol table;
2285         store the sorted symbol table in sorted_syms.
2286         (som_write_fixups): Initalize tmp_reloc to NULL to make GCC happy.
2287         (som_begin_writing): Similarly for exec_header.  Pass the sorted
2288         symbol table to som_write_symbol_strings.
2289         (som_build_and_write_symbol_table): Use the sorted symbols rather
2290         than the canonical symbol table.
2291
2292         * som.h (som_symbol_type): Add "stringtab_offset" field.
2293         * som.c (som_write_symbol_strings): Use "stringtab_offset"
2294         rather than destroying the "name" field in the BFD symbol.
2295         (som_build_and_write_symbol_table): Likewise.
2296
2297 Wed Sep 14 15:06:55 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2298
2299         * aoutx.h (aout_link_write_symbols): Rename skip_indirect to
2300         skip_next.  If we find an N_WARNING symbol which has already been
2301         written out, set skip_next.
2302
2303         * libecoff.h (struct ecoff_tdata): Add field find_buffer.
2304         * ecoff.c: Include aout/stab_gnu.h.
2305         (ecoff_find_nearest_line): Handle stabs debugging information.
2306
2307         * elfcode.h (elf_link_output_extsym): Keep a symbol marked as weak
2308         even if it is referenced by another object.
2309
2310 Tue Sep 13 17:57:00 1994  Jeff Law  (law@snake.cs.utah.edu)
2311
2312         * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both
2313         'T' and 'U' to grab all the unwind information.
2314         (som_set_reloc_info): Make 'U' unwind bits persist across
2315         multiple SOM relocations.  Set the addend field of an R_ENTRY
2316         relocation to the value in 'T'; set the addend field on an
2317         R_EXIT relocation to the value in 'U'.
2318
2319         * som.h (som_symbol_type): Delete unwind field.
2320
2321         * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
2322         unwind information from the addend field of the R_ENTRY, get the
2323         other 32bits from the addend field of the R_EXIT.
2324         (bfd_som_attach_unwind_info): Delete function and all references.
2325
2326         * som.h (som_symbol_type): Delete unused a.out-related fields.
2327
2328         * som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
2329         instead of &bfd_abs_section.
2330
2331         * som.c (som_object_setup): Handle exec_entry and exec_flags being
2332         switched in executables created by the OSF1 linker.
2333         (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
2334         fixups.  Support R_ALT_ENTRY (handle just like R_EXIT).
2335
2336 Tue Sep 13 16:04:07 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
2337
2338         * cofflink.c (coff_link_input_bfd): syment_base is unsigned
2339         so can't compare -ve numbers with it.
2340
2341 Mon Sep 12 20:31:17 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
2342
2343         * configure.in (shcoff_vec): Use cofflink.o now.
2344         * coff-sh.c: Rewritten to use new fast coff backend.
2345
2346 Tue Sep 13 16:23:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2347
2348         * aoutx.h (NAME(aout,final_link)): Don't assume that all the input
2349         files are a.out.
2350
2351 Tue Sep 13 11:09:39 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
2352
2353         * configure.host (sparc-*-netbsd): use sparcnbsd.
2354           (ns32k-*-netbsd): use ns32knbsd.
2355
2356         * hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
2357           host support.
2358
2359         * sparcnetbsd.c: New file, adds support for NetBSD/sparc.
2360         * config/sparc-nbsd.mt: Likewise.
2361
2362         * netbsd.h: New file, definitions common to all netbsd ports.
2363         * i386netbsd.c: Use it.
2364         * ns32knetbsd.c: Use it.
2365
2366         * Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
2367           config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
2368           file/variable naming conventions.
2369         * i386netbsd.c: New file, renamed from netbsd386.c.
2370         * ns32knetbsd.c: New file, renamed from netbsd532.c.
2371         
2372 Mon Sep 12 21:56:20 1994  Jeff Law  (law@snake.cs.utah.edu)
2373
2374         * som.c (som_reloc_skip): Correct off-by-one error for 4-byte
2375         R_NO_RELOCATION fixups.
2376         (bfd_section_from_som_symbol): Return the absolute section if the
2377         symbol isn't contained in any section in the output file.
2378         (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
2379         not function symbols (they are magic code labels which *can* be the
2380         targets of cross space branches).  $START$ is not a section symbol.
2381
2382 Mon Sep 12 11:43:08 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2383
2384         * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
2385         to section_flags.
2386         * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
2387
2388         * elfcode.h (swap_out_syms): Set the type of an undefined symbol
2389         to STT_FUNC if the BSF_FUNCTION flag is set.
2390
2391         * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
2392         change it.
2393         (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
2394         absolute reloc.  Don't dump core using r_symndx as an array index.
2395         * cf-m68klynx.c (coff_bfd_link_add_symbols): Define.
2396         (lynx_link_add_symbols): New static function (copy of function in
2397         coff-i386.c).
2398         (coff_m68k_lynxrtype_to_howto): sym argument may be NULL.
2399         * coff-i386.c (coff_i386_rtype_to_howto): Likewise.
2400         * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx
2401         value of -1, meaning an absolute reloc.
2402
2403         * ctor.c: Remove; obsolete.
2404         * Makefile.in: Rebuild dependencies.
2405         (BFD_LIBS): Remove ctor.o.
2406         (CFILES): Remove ctor.c.
2407         * libbfd.h: Rebuild.
2408
2409 Mon Sep 12 01:58:47 1994  Jeff Law  (law@snake.cs.utah.edu)
2410
2411         * elf32-hppa.c (elf32_hppa_relocate_section): If there was a link
2412         error of some sort (for example, undefined symbols), then do not
2413         apply any relocs, just notify the user of the errors.
2414         (elf32_hppa_backend_begin_write_processing): Do not build a symbol
2415         extension section for an executable (it's useless).
2416         (elf32_hppa_link_output_symbol_hook): Do nothing if there was a
2417         link error of some sort (for example, undefined symbols).
2418         (elf32_hppa_read_symext_info): Kludge.  Turn off SEC_HAS_CONTENTS
2419         for all the input symbol extension sections to keep the generic
2420         BFD code happy.  Temporarily turn it on to read the contents of
2421         the symbol extension section.
2422
2423 Sun Sep 11 21:58:59 1994  Jeff Law  (law@snake.cs.utah.edu)
2424
2425         * config/hppaosf.mh (RANLIB): Do not set.
2426         * config/hppabsd.mh (RANLIB): Likewise.
2427
2428 Sun Sep 11 22:50:49 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
2429
2430         * cf-i386lynx.c: Remove #if 0 code.
2431         (i386_lynxos_coff_object_p): Remove unused function.
2432         (coff_bfd_link_add_symbols): Define.
2433         (lynx_link_add_symbols): New static function.
2434         * coffcode.h (coff_bfd_link_hash_table_create): If
2435         coff_relocate_section is defined, only define this if not already
2436         defined.
2437         (coff_bfd_link_add_symbols, coff_bfd_final_link): Likewise.
2438
2439         * linker.c (_bfd_generic_final_link): Handle
2440         bfd_indirect_link_order explicitly, rather than via
2441         _bfd_default_link_order.
2442         (set_symbol_from_hash): New static function, broken out of
2443         _bfd_generic_link_write_global_symbol.
2444         (_bfd_generic_link_write_global_symbol): Symbol setting code moved
2445         to set_symbol_from_hash; call it.
2446         (default_indirect_link_order): Add generic_linker argument.
2447         Change all callers.  If false, set the generic symbols based on
2448         the hash table entries.
2449
2450 Fri Sep  9 11:51:49 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2451
2452         * coffgen.c (coff_get_symtab): Reindented.  Removed commented out
2453         call to bfd_constructor_entry.
2454
2455         Convert m68k COFF to use new COFF backend linker.
2456         * coff-m68k.c (coff_relocate_section): Define.
2457         * cf-m68klynx.c (coff_rtype_to_howto): Define.
2458         (coff_m68k_lynx_rtype_to_howto): New static function.
2459         * configure.in (m68kcoff_vec): Build cofflink.o.
2460         (m68kcoffun_vec, m68klynx_coff_vec): Likewise.
2461
2462 Thu Sep  8 16:20:38 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
2463
2464         * coff-h8300.c (h8300_reloc16_extra_cases, case RELBYTE): Flag
2465         overflows correctly.
2466
2467 Wed Sep  7 19:01:42 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2468
2469         * libelf.h (struct elf_backend_data): Change second argument of
2470         elf_backend_final_write_processing hook to boolean.
2471         (struct elf_obj_tdata): Add linker field.
2472         * elfcode.h (NAME(bfd_elf,write_object_contents)): Pass value of
2473         tdata linker field to final_write_processing, rather than NULL.
2474         (elf_bfd_final_link): Don't call final_write_processing hook.  Set
2475         tdata linker field to true.
2476         * elf32-mips.c (mips_elf_final_write_processing): Change type of
2477         second argument to boolean.
2478         * elf32-hppa.c (elf32_hppa_backend_final_write_processing):
2479         Likewise.
2480
2481         * coff-go32.c (RTYPE2HOWTO): Fully parenthesize arguments.
2482         * coff-i960.c (RTYPE2HOWTO): Likewise.
2483         * coff-m88k.c (RTYPE2HOWTO): Likewise.
2484         * coff-we32k.c (RTYPE2HOWTO): Likewise.
2485
2486         Make i386 COFF use new COFF backend linker.
2487         * coff-i386.c (RTYPE2HOWTO): Fully parenthesize arguments.
2488         (coff_relocate_section): Define.
2489         (coff_i386_rtype_to_howto): New function.
2490         * configure.in (i386coff_vec): Use cofflink.o.
2491         (i386lynx_coff_vec): Likewise.
2492
2493         * coffcode.h (bfd_coff_backend_data): Add new field
2494         _bfd_coff_rtype_to_howto.
2495         (bfd_coff_rtype_to_howto): Define.
2496         (coff_rtype_to_howto): Define to use RTYPE2HOWTO, if not already
2497         defined.
2498         (bfd_coff_std_swap_table): Initialize new field.
2499         * cofflink.c (_bfd_coff_final_link): Allocate section_count + 1
2500         section_info structures, since the target_index is 1 based.
2501         (coff_link_input_bfd): Set *secpp to bfd_com_section_ptr for a
2502         common symbol.  Adjust rel_hash by the output reloc count.
2503         (_bfd_coff_generic_relocate_section): New function.
2504         * libcoff-in.h (_bfd_coff_generic_relocate_section): Declare.
2505         * libcoff.h: Rebuild.
2506         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2507         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2508
2509 Tue Sep  6 23:28:52 1994  Jeff Law  (law@snake.cs.utah.edu)
2510
2511         * som.c (som_bfd_derive_misc_symbol_info): Treat undefined code
2512         symbols and undefined symbols which no type in the same manner
2513         if the associated BFD symbol has BSF_FUNCTION set.  For a defined
2514         symbol which no type, select a SOM type based on the flags of the
2515         section containing the symbol.
2516         (som_slurp_symbol_type): Set BSF_FUNCTION for undefined ST_STUB
2517         or ST_CODE symbols (importing a non-function code symbol is
2518         meaningless in SOM).
2519         (som_set_reloc_info): Don't set "offset" to the section's vma; it
2520         should always start at zero.
2521
2522 Tue Sep  6 14:51:11 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2523
2524         Add new style linker support to COFF backend.  a29k only for now.
2525         * cofflink.c: New file.
2526         * libcoff-in.h: Include bfdlink.h.
2527         (obj_coff_external_syms, obj_coff_strings): Define accessor macro.
2528         (obj_coff_sym_hashes): Define accessor macro.
2529         (struct coff_tdata): Add fields external_syms, strings, and
2530         sym_hashes.
2531         (struct coff_link_hash_entry): Define.
2532         (struct coff_link_hash_table): Define.
2533         (coff_link_hash_lookup, coff_link_hash_traverse): Define.
2534         (coff_hash_table): Define.
2535         (_bfd_coff_link_hash_table_create): Declare.
2536         (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
2537         * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
2538         _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
2539         _bfd_coff_compute_section_file_positions,
2540         _bfd_coff_relocate_section.
2541         (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
2542         (bfd_coff_sym_is_global): Define.
2543         (bfd_coff_compute_section_file_positions): Define.
2544         (bfd_coff_relocate_section): Define.
2545         (coff_mkobject_hook): Initialize obj_raw_syment_count and
2546         obj_conv_table_size.
2547         (coff_compute_section_file_positions): Set target_index of all
2548         sections.  Set output_has_begun field.
2549         (coff_write_object_contents): Don't set target_index; now done by
2550         coff_compute_section_file_positions.  Remove obsolete handling of
2551         scn_base and data_base.  Don't bother to check that target_index
2552         is positive, since it always is.  Remove use of pad, which is
2553         always zero.  Check obj_raw_syment_count, not bfd_get_symcount,
2554         for the number of symbols, but only write them out if
2555         bfd_get_symcount is non-zero.  Don't check obj_raw_syment_count
2556         until after coff_write_symbols is called.
2557         (coff_slurp_symbol_table): Use obj_raw_syment_count, not
2558         bfd_get_symcount for the number of symbols.  Don't set
2559         obj_conv_table_size.
2560         (coff_sym_is_global): New static function or macro.
2561         (coff_slurp_reloc_table): Call coff_swap_reloc_in, not
2562         bfd_swap_reloc_in.
2563         (coff_bfd_link_hash_table_create): If coff_relocate_section is
2564         defined, define as _bfd_coff_link_hash_table_create.
2565         (coff_bfd_link_add_symbols): Similar change.
2566         (coff_bfd_final_link): Similar change.
2567         (coff_relocate_section): Define as NULL if not defined.
2568         (bfd_coff_std_swap_table): Initialize new fields.
2569         * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
2570         and obj_conv_table_size here.
2571         (coff_count_linenumbers): Reindent.  If bfd_get_symcount is zero,
2572         add up the line numbers from the sections.
2573         (coff_write_symbols): Set obj_raw_syment_count, not
2574         bfd_get_symcount.
2575         (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
2576         field.
2577         (coff_get_normalized_symtab): Use obj_raw_syment_count, not
2578         bfd_get_symcount.
2579         (coff_print_symbol): If auxp->fix_end, print x_endndx value.
2580         * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
2581         Reindent.  Change argument type to  PTR.
2582         * coff-a29k.c (coff_a29k_relocate_section): New static function.
2583         (coff_relocate_section): Define.
2584         * configure.in (a29kcoff_big_vec): Compile cofflink.o.
2585         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
2586         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2587         * libcoff.h: Rebuilt.
2588         * Makefile.in: Rebuilt dependencies.
2589         (BFD32_BACKENDS): Add cofflink.o.
2590         (CFILES): Add cofflink.c.
2591
2592 Tue Sep  6 14:00:45 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
2593
2594         * coffgen.c (coff_print_symbol, case bfd_symbol_print_all): Check
2595         for section symbol, and print its aux fields with appropriate
2596         labels.
2597
2598         * Makefile.in (ALL_MACHINES): Added cpu-arm.o.
2599
2600 Sun Sep 04 17:58:10 1994  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
2601
2602         * aoutx.h (NAME(aout,machine_type)): Recognize the ARM processor.
2603         * archures.c, config.bfd, configure.host, libaout.h, reloc.c,
2604         targets.c: Add support for the ARM.
2605         * cpu-arm.c, riscix.c, config/riscix.mh, config/riscix.mt: New files.
2606
2607         * aoutx.h (add_to_stringtable): Check that str isn't a NULL pointer.
2608
2609 Fri Sep  2 14:10:30 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
2610
2611         * reloc.c (enum bfd_reloc_code_real): Rewrote definition to use
2612         new "chew" commands for simultaneous definition of enumerator and
2613         enumerator name table.
2614         (bfd_get_reloc_code_name): New function, for retrieving a symbolic
2615         name associated with an enumerator.
2616         * libbfd.h, bfd-in2.h: Regenerated.
2617
2618 Tue Aug 30 21:24:54 1994  Jeff Law  (law@snake.cs.utah.edu)
2619
2620         * som.c (som_write_fixups, case R_ENTRY): Handle case where no
2621         unwind descriptor information is available.
2622
2623 Tue Aug 30 11:43:30 1994  Eric Youngdale  (ericy@cais.cais.com)
2624
2625         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
2626         argument, and use it to set DT_SONAME dynamic entry.
2627         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
2628         (bfd_elf64_size_dynamic_sections): Update prototype.
2629         * bfd-in2.h: Rebuilt.
2630
2631 Fri Aug 26 15:47:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2632
2633         * coffgen.c (coff_real_object_p): Set obj_raw_syment_count.
2634         (coff_get_normalized_symtab): Verify obj_raw_syment_count, rather
2635         than setting it.
2636
2637 Thu Aug 25 10:44:53 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2638
2639         * archive.c (bsd_write_armap): Remove host dependencies.
2640
2641         * aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
2642         before adding BYTES_IN_WORD.
2643
2644         * coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
2645         not merely the first.
2646
2647         * coffgen.c (coff_write_alien_symbol): If we are not using the
2648         symbol, clear the name so that it is not put in the string table.
2649         From Antti.Miettinen@ntc.nokia.com.
2650
2651 Wed Aug 24 11:49:19 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2652
2653         * coffgen.c (coff_print_symbol): Cast pointer different to long
2654         and use %ld to print it.
2655         * osf-core.c (osf_core_core_file_p): Remove unused variable
2656         dseccnt.
2657         * ecoffswap.h (ecoff_swap_ext_out): If ECOFF_64, clear remaining
2658         bytes in bits2.
2659
2660         * configure.host, config.bfd: Change i[34]86 to i[345]86.
2661         * coffgen.c (coff_real_object_p): Set obj_conv_table_size here,
2662         rather than waiting until coff_slurp_symbol_table.
2663         (coff_write_alien_symbol): Just ignore BSF_DEBUGGING symbols.
2664         From Antti.Miettinen@ntc.nokia.com.
2665
2666         * section.c (bfd_make_section_anyway): Fix failure check of
2667         bfd_make_empty_symbol.  From Antti.Miettinen@ntc.nokia.com.
2668
2669         * aoutx.h (translate_to_native_sym_flags): Use the output_section
2670         (and output_offset) if there is one.
2671
2672         * aoutx.h (aout_link_check_archive_element): Discard the symbols
2673         if the archive element was not needed.
2674
2675         * aoutx.h (aout_get_external_symbols): Ensure that a zero string
2676         index yields an empty string.
2677         (aout_link_write_symbols): If info->keep_memory is false, use name
2678         from original hash table entry, not from entry in *sym_hash.
2679
2680         * aoutx.h (struct aout_final_link_info): Add fields contents,
2681         relocs, symbol_map and output_syms.
2682         (NAME(aout,final_link)): Work out the largest section size, reloc
2683         size, and number of symbols.  Use them to preallocate buffers that
2684         are large enough for all cases.
2685         (aout_link_input_bfd): Use preallocated symbol_map.
2686         (aout_link_write_symbols): Remove symbol_map argument; use
2687         preallocated symbol_map instead.  Change all callers.  Use
2688         preallocated output_syms.
2689         (aout_link_input_section): Remove symbol_map argument.  Change all
2690         callers.  Use preallocated contents and relocs.
2691         (aout_link_input_section_std): Remove symbol_map argument; use
2692         preallocated symbol_map instead.  Change all callers.
2693         (aout_link_input_section_ext): Likewise.
2694
2695 Tue Aug 23 10:51:09 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2696
2697         * archive.c (_bfd_write_archive_contents): Don't update the
2698         symbol map timestamp if there is no symbol map.  From
2699         schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
2700
2701 Mon Aug 22 12:26:42 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2702
2703         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.
2704         (bfd_target): Add field _bfd_update_armap_timestamp.
2705         * bfd.c (bfd_update_armap_timestamp): Define.
2706         * bfd-in2.h: Rebuilt.
2707         * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define.
2708         (_bfd_archive_bsd_update_armap_timestamp): Declare.
2709         (_bfd_archive_coff_update_armap_timestamp): Define.
2710         * libbfd.h: Rebuilt.
2711         * archive.c (_bfd_write_archive_contents): Call
2712         bfd_update_armap_timestamp instead of checking for a BSD archive
2713         and calling bsd_update_armap_timestamp.
2714         (_bfd_archive_bsd_update_armap_timestamp): Rename from
2715         _bsd_update_armap_timestamp.  Don't assume that armap_datepos is
2716         already set.
2717         * aout-target.h (MY_update_armap_timestamp): Define if not already
2718         defined.
2719         * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define.
2720         * ieee.c (ieee_update_armap_timestamp): Define.
2721         * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define.
2722         * oasys.c (oasys_update_armap_timestamp): Define.
2723         * som.c (som_update_armap_timestamp): Define.
2724
2725         * hash.c: Copy string hash functions from aoutx.h.
2726         * aoutx.h: String hash functions moved to hash.c.  Retain
2727         simplified versions of add_to_stringtab and emit_stringtab.
2728         Change all callers to use new function and structure names.
2729         * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare.
2730         (_bfd_stringtab_size, _bfd_stringtab_add): Declare.
2731         (_bfd_stringtab_emit): Declare.
2732         * libbfd.h: Rebuilt.
2733
2734 Mon Aug 22 10:49:37 1994  Eric Youngdale  (ericy@cais.cais.com)
2735
2736         * i386linux.c (linux_add_one_symbol): Create a fixup for any
2737         defined absolute symbol, not just GOT or PLT symbols.
2738         (linux_tally_symbols): Correct handling of references to defined
2739         symbols.
2740
2741 Thu Aug 18 16:29:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2742
2743         Get ld -x -r to handle a.out set symbols correctly.
2744         * aoutx.h (adjust_o_magic): If the .bss VMA was set outside of
2745         BFD, pad the .data section up to the VMA of the .bss section.
2746         (aout_link_add_symbols): If a set symbol does not get modified,
2747         treat it as a local symbol.
2748         (aout_link_write_symbols): Set the value of set symbols
2749         correctly.  Don't discard set symbols even if discarding local
2750         symbols.
2751         (aout_link_write_other_symbol): Don't abort on bfd_link_hash_new,
2752         since it can now happen for set symbols.
2753
2754         * elfcode.h (elf_fake_sections): Just check for ".rela" and
2755         ".rel", not ".rela." and ".rel."; make this work by checking
2756         use_rela_p.
2757         * elf32-i386.c (elf_i386_check_relocs): Just check for ".rel", not
2758         ".rel."
2759         (elf_i386_size_dynamic_sections): Likewise.
2760         (elf_i386_relocate_section): Likewise.
2761         * elf32-sparc.c (elf32_sparc_check_relocs): Just check for
2762         ".rela", not ".rela."
2763         (elf32_sparc_size_dynamic_sections): Likewise.
2764         (elf32_sparc_relocate_section): Likewise.
2765
2766 Wed Aug 17 16:54:18 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2767
2768         * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
2769         PASS to the old value + 1.
2770
2771         * coffgen.c (coff_get_normalized_symtab): If a C_FILE symbol has
2772         no aux entries, use the symbol name as the file name.
2773         (coff_find_nearest_line): Look for the right C_FILE symbol, rather
2774         than always using the first one.  If there is a debugging symbol
2775         after a function symbol, skip it.  Add the section VMA to the line
2776         offset, since it was subtracted out in coff_slurp_line_table.
2777
2778 Tue Aug 16 16:53:00 1994  Jeff Law  (law@snake.cs.utah.edu)
2779
2780         * som.c (som_prep_headers): If writing some form of an executable,
2781         allocate and attach an exec header to the BFD private data.
2782         (som_begin_writing): Don't fill fields of the exec header based
2783         on BFD private data here (like the exec flags).  Do not write
2784         the exec header here.
2785         (som_write_headers): Instead do it here.
2786         * som.h (struct somdata): New field "exec_hdr" for the executable
2787         file header.
2788         (obj_som_exec_hdr): New accessor macro.
2789
2790 Tue Aug 16 00:12:31 1994  Eric Youngdale  (ericy@cais.cais.com)
2791
2792         * i386linux.c (linux_link_create_dynamic_sections): Create section
2793         named .linux-dynamic, not .dynamic.
2794         (linux_add_one_symbol): Use .linux-dynamic, not .dynamic.
2795         (bfd_linux_size_dynamic_sections): Likewise.
2796         (linux_finish_dynamic_link): Likewise.
2797
2798 Mon Aug 15 12:16:56 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2799
2800         * coffgen.c (STRING_SIZE_SIZE): Define.
2801         (coff_fix_symbol_name): Use STRING_SIZE_SIZE, not 4.
2802         (coff_write_symbols, build_string_table): Likewise.
2803         (coff_get_normalized_symtab): Likewise.
2804
2805         * libcoff-in.h (obj_symbol_slew): Don't define.
2806         (struct coff_tdata): Remove unused fields index_slew, raw_linenos,
2807         and flags.
2808         * libcoff.h: Rebuilt.
2809         * coffcode.h (coff_mkobject): Don't initialize raw_linenos.
2810         (coff_mkobject_hook): Don't initialize flags.
2811
2812         * aout-target.h (MY_zmagic_contiguous): Define as 0 if not already
2813         defined.
2814         (MY(backend_data)): Use MY_zmagic_contiguous, not hardcoded 0.
2815         * i386linux.c (MY_zmagic_contiguous): Define.
2816
2817         * elfcode.h (bfd_section_from_shdr): If a SHT_SYMTAB section in a
2818         shared object has SHF_ALLOC set, create a BFD section for it.
2819         (elf_section_from_bfd_section): There may be a BFD section for a
2820         SHT_SYMTAB section.
2821
2822         * coffcode.h (styp_to_sec_flags): Add name argument.  If no flags
2823         are recognized, chose section flags based on the name.
2824         (bfd_coff_backend_data): _bfd_styp_to_sec_flags_hook field: Add
2825         name argument.
2826         (bfd_coff_styp_to_sec_flags_hook): Add name argument.
2827         (coff_compute_section_file_positions): Don't adjust the section
2828         position by COFF_PAGE_SIZE unless SEC_ALLOC is set.
2829         * libcoff.h: Rebuilt.
2830         * coffgen.c (make_a_section_from_file): Pass section name to
2831         bfd_coff_styp_to_sec_flags_hook.
2832         * ecoff.c (_bfd_ecoff_styp_to_sec_flags): Add unused name
2833         argument.
2834         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Add name argument to
2835         prototype.
2836
2837 Fri Aug 12 11:22:40 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2838
2839         * elfcode.h (section_from_elf_index): Correct check for invalid
2840         section index.
2841
2842         * elfcode.h (elf_link_add_object_symbols): If there is no symbol
2843         table, try using the dynamic symbol table.  From Eric Youngdale
2844         <ericy@cais.cais.com>.
2845
2846         * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
2847         The linker depends upon configuring for solaris2.
2848         * hosts/solaris2.h: New file; include hosts/sysv4.h.
2849         * config/solaris2.mh: New file; copy of config/sysv4.mh.
2850
2851 Wed Aug 10 13:09:38 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2852
2853         * aoutx.h (adjust_z_magic): Make sure data section is padded to
2854         page boundary when the VMA is set by the calling program.  From
2855         Eric Youngdale <ericy@cais.cais.com>.
2856
2857 Mon Aug  8 17:18:49 1994  Stan Shebs  (shebs@andros.cygnus.com)
2858
2859         Update to ns32k support, from Ian Dall (dall@hfrd.dsto.gov.au).
2860         * aout-ns32k.c: Add declarations that were in aout-ns32k.h, change
2861         declarations to traditional form.
2862         (MY_reloc_howto, MY_put_reloc): Change from macro to function.
2863         (ns32k_relocate_contents): New function.
2864         * aout-ns32k.h: Remove.
2865         * cpu-ns32k.c: Add declarations that were in aout-ns32k.h, change
2866         declarations to traditional form.
2867         (ns32k_final_link_relocate): Call ns32k_relocate_contents.
2868         * netbsd532.c: Reformat to standards, add copyright notice.
2869         (ARCH): Don't define.
2870         (aout-ns32k.h): Don't include.
2871         * pc532-mach.c: Ditto.
2872
2873 Mon Aug  8 17:55:52 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2874
2875         * coff-i960.c (coff_i960_relocate): Don't try to convert relocs
2876         against common symbols.
2877
2878 Sat Aug  6 22:27:30 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
2879
2880         * irix-core.c (irix_core_core_file_p):  Ignore sections that
2881         are not contained in the core file.
2882
2883 Thu Aug  4 11:32:23 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2884
2885         * coff-m68k.c (m68k_reloc_type_lookup): New function.
2886         (coff_bfd_reloc_type_lookup): Define.
2887         * cf-m68klynx.c (_bfd_m68kcoff_reloc_type_lookup): Define.
2888
2889         * elfcode.h (elf_bfd_final_link): Force the vma of sections which
2890         do not have SEC_ALLOC set to be 0.  This is needed to handle
2891         relocs against debugging sections.
2892
2893 Wed Aug  3 16:45:41 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2894
2895         * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
2896         against locally defined symbols into relocs against section
2897         symbols, for VxWorks 5.1.
2898
2899 Wed Aug  3 10:34:37 1994  Eric Youngdale  (ericy@cais.cais.com)
2900
2901         * i386linux.c (linux_add_one_symbol): Only handle
2902         SHARABLE_CONFLICTS specially if BSF_CONSTRUCTOR is set.  Set hashp
2903         for a GOT or PLT symbol.  Set jump field of fixup for a PLT symbol.
2904         (linux_tally_symbols): Check section of real symbol.  When looking
2905         for a builtin fixup, check builtin and jump flags.  Create no more
2906         than one fixup, and always create one if the real symbol is in the
2907         absolute section.  Only strip absolute symbols.
2908
2909 Wed Aug  3 05:08:24 1994  D. V. Henkel-Wallace  (gumby@cygnus.com)
2910
2911         * coffcode.h (coff_write_object_contents): set internal_a.magic to
2912         LYNXCOFFMAGIC whenever 68k, SPARC or i386 LynxOS
2913         (yes, they have the same magic number!)
2914
2915 Tue Aug  2 10:43:21 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2916
2917         * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make test
2918         in aoutx.h work correctly.
2919
2920         * coff-i960.c (coff_i960_relocate): New function.
2921         (howto_rellong, howto_iprmed): Use it as special_function.
2922
2923         * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,
2924         bfd_tell, bfd_flush, and bfd_stat from here...
2925         * bfd-in.h: ...to here, to make them visible to programs which
2926         know more about the object file format than BFD does.
2927         * libbfd.h, bfd-in2.h: Rebuilt.
2928
2929 Mon Aug  1 17:55:53 1994  Fred Fish  (fnf@cygnus.com)
2930
2931         * ptrace-core.c (ptrace_unix_core_file_p):  Convert zalloc usage
2932         to bfd_zalloc.
2933
2934 Mon Aug  1 12:04:40 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2935
2936         * elf64-sparc.c (ELF_MAXPAGESIZE): Define.
2937
2938         ELF linker patches from Eric Youngdale <ericy@cais.cais.com>.
2939         * elfcode.h (elf_link_create_dynamic_sections): Set type of
2940         _DYNAMIC to STT_OBJECT.
2941         (NAME(bfd_elf,record_link_assignment)): Always create hash table
2942         entry.  Set type to STT_OBJECT.
2943         (elf_link_output_extsym): Don't set type of weak defined symbol to
2944         STB_WEAK if symbol was referenced.
2945         (map_program_segments): Check DYNAMIC as well as EXEC_P.
2946         (assign_file_positions_except_relocs): Likewise.
2947         * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of
2948         _GLOBAL_OFFSET_TABLE to STT_OBJECT.
2949         (elf_i386_check_relocs): Ignore local PLT32 relocs.
2950         (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
2951
2952         * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
2953         handling again.
2954
2955         * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
2956         if there aren't any.
2957
2958         * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
2959         * hosts/solaris2.h: Remove.
2960         * config/solaris2.mh: Remove.
2961
2962 Sun Jul 31 14:27:04 1994  Jeff Law  (law@snake.cs.utah.edu)
2963
2964         * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
2965         HPPA ELF spec the code implements.
2966
2967 Tue Jul 26 17:38:01 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
2968
2969         * cpu-i960.c (MAX_ARCH): New macro.
2970         (compatible): Use it in computing array bounds.  Put comma after
2971         last entry in array, for regularity.
2972         (arch_info_struct): Adjust spacing for easier reading.
2973
2974         * coff-i960.c (howto_rellong, howto_iprmed, howto_optcall): Use
2975         HOWTO macro.
2976
2977         start-sanitize-i960xl
2978         * cpu-i960.c (XL): Define as bfd_mach_i960_xl.
2979         (scan_960_mach): Recognize xl machine.
2980         (MAX_ARCH): Define to be XL.
2981         (compatible): Add XL row to array.
2982         (arch_info_struct): Add XL entry.
2983
2984         * archures.c (bfd_mach_i960_xl): New macro.
2985         * bfd-in2.h: Regenerated.
2986
2987         * coffcode.h (coff_set_arch_mach_hook): For F_I960XL, set machine
2988         to bfd_mach_i960_xl.
2989         (coff_set_flags): For bfd_mach_i960_xl, set F_I960XL.
2990         end-sanitize-i960xl
2991
2992 Tue Jul 26 11:04:00 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
2993
2994         * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
2995         symbol, correct check to see whether the equivalent normal symbol
2996         was referenced.
2997
2998         Add support for creating shared libraries under i386 ELF and SPARC
2999         ELF.  Based on patches by Eric Youngdale <ericy@cais.cais.com>.
3000         * libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
3001         Add got_offset and plt_offset fields.
3002         (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
3003         (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
3004         (ELF_LINK_HASH_NEEDS_COPY): Define.
3005         (struct elf_backend_data): Add check_relocs field.
3006         (struct bfd_elf_section_data): Change relocs from PTR to
3007         Elf_Internal_Rela *.
3008         (struct elf_obj_tdata): Add local_got_offsets field.
3009         (elf_local_got_offsets): Define accessor macro.
3010         (bfd_elf32_link_create_dynamic_sections): Declare.
3011         (bfd_elf32_link_record_dynamic_symbol): Declare.
3012         (bfd_elf64_link_create_dynamic_sections): Declare.
3013         (bfd_elf64_link_record_dynamic_symbol): Declare.
3014         * elfcode.h (elf_slurp_reloc_table): Don't use the section data
3015         relocs field.
3016         (elf_link_record_dynamic_symbol): Make globally visible.  Use
3017         macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
3018         (elf_link_add_object_symbols): If creating a shared library, put
3019         make all local symbols dynamic.  Don't bother with the
3020         DYNAMIC_MULTIPLE flags.  Call the check_relocs backend function if
3021         it is defined.
3022         (elf_link_create_dynamic_sections): Make globally visible.  Use
3023         macro to rename to NAME(bfd_elf,link_create_dynamic_sections).  If
3024         creating a shared library, make sure that _DYNAMIC is added as a
3025         dynamic symbol.
3026         (elf_link_read_relocs): New function.
3027         (NAME(bfd_elf,record_link_assignment)): If creating a shared
3028         library, always create symbols, and always make them dynamic.
3029         (elf_bfd_final_link): Permit creation of shared libraries.
3030         (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
3031         * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
3032         copy_offset.  Initialize got_offset and plt_offset.
3033         * elf32-target.h (elf_backend_check_relocs): Define as 0 if not
3034         defined.
3035         (elf32_bed): Initialize check_relocs field.
3036         * elf64-target.h (elf_backend_check_relocs): Define as 0 if not
3037         defined.
3038         (elf64_bed): Initialize check_relocs field.
3039         * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
3040         R_386_GOTPC to be pc_relative and pcrel_offset.
3041         (elf_i386_pic_plt0_entry): Define.
3042         (elf_i386_pic_plt_entry): Define.
3043         (elf_i386_create_dynamic_sections): Create a .got.plt section, and
3044         define _GLOBAL_OFFSET_TABLE_ at the start of it.  If creating a
3045         shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
3046         dynamic symbol.  Don't create .rel.bss if creating a shared
3047         library.
3048         (elf_i386_check_relocs): New function.
3049         (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
3050         symbol already has one.  When making a PLT entry, set plt_offset.
3051         Don't create a copy reloc when creating a shared library.  Don't
3052         set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
3053         (elf_i386_allocate_dynamic_section): Remove.
3054         (elf_i386_size_dynamic_sections): Look through all the sections
3055         rather than assuming we know their names.  Remove any empty reloc
3056         or plt sections.  Only add a DT_DEBUG entry if not creating a
3057         shared library.  Only add a DT_PLTGOT entry if there is a PLT.
3058         Add a DT_TEXTREL entry if required.
3059         (elf_i386_relocate_section): Permit undefined symbols when
3060         creating a shared library.  Handle the special relocation types
3061         specially.
3062         (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
3063         is set.  If creating a shared library, produce a PIC PLT entry.
3064         Only mark a PLT symbol as undefined if it was not defined by a
3065         regular object file.  Create a GOT entry if got_offset is set.
3066         Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
3067         (elf_i386_finish_dynamic_sections): Change the handling of
3068         DT_RELSZ to simply subtract out the size of .rel.plt.  If creating
3069         a shared library, produce PIC PLT code.
3070         (elf_backend_check_relocs): Define.
3071         * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
3072         R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
3073         (elf32_sparc_create_dynamic_sections): If creating a shared
3074         library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
3075         dynamic symbol, and set the type to STT_OBJECT.  Likewise for
3076         _PROCEDURE_LINKAGE_TABLE_.  Don't create .rel.bss if creating a
3077         shared library.
3078         (elf32_sparc_check_relocs): New function.
3079         (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
3080         symbol already has one.  When making a PLT entry, set plt_offset.
3081         Don't create a copy reloc when creating a shared library.  Don't
3082         set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
3083         (elf32_sparc_allocate_dynamic_section): Remove.
3084         (elf32_sparc_size_dynamic_sections): Look through all the sections
3085         rather than assuming we know their names.  Only add a DT_DEBUG
3086         entry if not creating a shared library.  Add a DT_TEXTREL entry if
3087         required.
3088         (elf32_sparc_relocate_section): Permit undefined symbols when
3089         creating a shared library.  Handle the special relocation types
3090         specially.
3091         (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
3092         is set.  Only mark a PLT symbol as undefined if it was not defined
3093         by a regular object file.  Create a GOT entry if got_offset is
3094         set.  Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
3095         (elf32_sparc_finish_dynamic_sections): Store dynobj in a local
3096         variable.
3097         (elf_backend_check_relocs): Define.
3098
3099 Mon Jul 25 12:21:07 1994  Stan Shebs  (shebs@andros.cygnus.com)
3100
3101         * configure.in (pc532mach_vec): Change to pc532machaout_vec.
3102         * config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name.
3103         * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o.
3104         (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o,
3105         pc532-mach.o.
3106         * targets.c (pc532machaout_vec): Use instead of pc532mach_vec.
3107         * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto.
3108         (SELECT_VECS): Remove.
3109         * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt.
3110         * config/ns32k-netbsd.mt: Remove, name too long.
3111
3112 Fri Jul 22 11:07:14 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3113
3114         * linker.c (generic_link_check_archive_element): When changing a
3115         symbol to common, set the alignment.
3116         (_bfd_generic_link_add_one_symbol): When creating a common symbol,
3117         set the alignment.
3118         * aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
3119         common, set the alignment.
3120         (aout_link_add_symbols): Restrict the alignment of a common symbol
3121         to the alignment power given by the architecture.
3122         * libelf.h (struct elf_link_hash_entry): Remove align field.  Add
3123         copy_offset field.
3124         * elfcode.h (elf_link_add_object_symbols): Store alignment in
3125         new bfd_link_hash_entry field, not in elf_link_hash_entry field.
3126         (elf_link_output_extsym): Similar change when getting alignment.
3127         * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align.  Do
3128         initialize copy_offset.
3129         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset
3130         field rather than align field.  Get alignment using bfd_log2
3131         rather than switch.
3132         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
3133         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset,
3134         not align.
3135         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
3136
3137         * aoutx.h (NAME(aout,some_aout_object_p)): Just check
3138         STAT_FOR_EXEC, don't check MACH.
3139         * m88kmach3.c (MACH): Don't define.
3140         * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC.
3141         * config/m88k-mach3.mt (TDEFINES): Likewise.
3142         * config/mips-mach3.mt (TDEFINES): Likewise.
3143
3144 Thu Jul 21 17:24:31 1994  Stan Shebs  (shebs@andros.cygnus.com)
3145
3146         * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
3147
3148 Thu Jul 21 12:26:01 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3149
3150         * reloc.c (struct reloc_howto_struct): Remove special_function1.
3151         It's the wrong way to do things.
3152         (HOWTO): Change accordingly.
3153         (HOWTO2): Remove.
3154         (_bfd_final_link_relocate): Remove references to
3155         special_function1.
3156         * bfd-in2.h: Rebuilt.
3157         * aoutx.h (aout_link_input_section_std): Remove references to
3158         special_function1.
3159         (aout_link_reloc_link_order): Likewise.
3160
3161 Wed Jul 20 15:46:44 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3162
3163         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpath
3164         argument.  If it is not NULL, use it to set DT_RPATH.
3165         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
3166         (bfd_elf64_size_dynamic_sections): Likewise.
3167         * bfd-in2.h: Rebuilt.
3168
3169 Sat Jul 16 21:10:39 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3170
3171         * elfcode.h (elf_get_dynamic_symtab_upper_bound): If there is no
3172         dynamic symtab, return error.
3173
3174         * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
3175         * elfcode.h (elf_link_add_object_symbols): If symbol is defined as
3176         weak, set ELF_LINK_HASH_DEFINED_WEAK.
3177         (elf_link_output_extsym): If symbol is defined as weak, mark it
3178         STB_WEAK.
3179
3180         * libelf.h (struct bfd_elf_section_data): Add relocs field.
3181         (shdr_name): Remove; unused.
3182         * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
3183         and RELA relocs.  Free up the unswapped relocs.  Permit the relocs
3184         to be cached in the section_data.  Correct the reloc address.
3185         (elf_slurp_reloca_table): Remove.
3186         (elf_canonicalize_reloc): Rewrote.
3187         (elf_link_input_bfd): Permit the relocs to be cached in the
3188         section data.
3189
3190 Sat Jul 16 13:55:38 1994  Stan Shebs  (shebs@andros.cygnus.com)
3191
3192         * config.bfd (m88*-harris-cxux*): Recognize.
3193         * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
3194
3195         * configure.host (m68*-atari-sysv4*): New host.
3196         (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
3197         * hosts/amix.h: Remove.
3198         * hosts/m68kv4.h: New file, was amix.h.
3199
3200 Thu Jul 14 15:12:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
3201
3202         * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
3203         reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
3204         changes over from bfd-in2.h so they get generated properly next
3205         time someone runs "make headers".
3206         * bfd-in2.h: Rebuilt.
3207
3208         * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
3209         (m88kmach3_vec): Restore deleted declaration.
3210
3211         * configure.in: Alphabetize target vector names.
3212
3213         * config/pc532mach.mh: New file.
3214         (HDEPFILES, HDEFINES): Define here.
3215         * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
3216         * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
3217
3218         Sun Jul 10 00:04:20 1994  Ian Dall  (dall@hfrd.dsto.gov.au)
3219
3220         * pc532-mach.c: New File. pc532-mach a.out format.
3221
3222         * netbsd532.c: New file. pc532-netbsd532 a.out format.
3223
3224         * hosts/pc532mach.h: New file. pc532-mach host support.
3225
3226         * cpu-ns32k.c: New file. ns32k support cpu specific code rather
3227         than format specific code.
3228
3229         * config/pc532-mach.mt: New file. Support for pc532-mach target.
3230
3231         * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
3232
3233         * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
3234         ns32k series. 
3235
3236         * targets.c: Add netbsd532_vec and pc532machaout_vec into
3237         bfd_target_vector array. Move netbsd386_vec to alphabetic order
3238         location.
3239
3240         * reloc.c (_bfd_final_link_relocate) Add support for
3241         special_function1 in howto.
3242
3243         * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
3244         machine_type enum.
3245
3246         * configure.in: add pc532mach_vec and netbsd532_vec entries.
3247
3248         * config.bfd: add pc532mach host entries. Use for both
3249         ns32k-pc532-mach and ns32k-pc532-netbsd.
3250
3251         * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
3252         add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
3253
3254         * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
3255         enum.
3256
3257         * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
3258         and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
3259         macro.
3260
3261         * bfd-in2.h: Split definition of struct reloc_howto_struct
3262         and corresponding typedef into two statements.
3263
3264         * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
3265
3266         * archures.c: Add bfd_ns32k_arch prototype, and entry in
3267         archures_init_table. 
3268
3269         * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
3270         MY_put_reloc macro. Allow for target dependent special_function1
3271         to apply the relocation. 
3272
3273         * aoutx.h (aout_link_input_section_std): Allow for target
3274         dependent determination of reloc howto. Allow for target dependent
3275         special_function1 to apply the relocation.
3276
3277         * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
3278
3279         * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
3280         zero reloc entries.
3281
3282         * aoutx.h (machine_type): Add bfd_arch_ns32k case.
3283
3284         * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
3285         is defined (not just MACH). Use fstat instead of stat and check
3286         for fstat error.
3287
3288         * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
3289
3290         * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
3291         table.
3292
3293         * aout-target.h: Apply SWAP_MAGIC (if defined) after
3294         swap_exec_header_in, otherwise we have magic in the wrong order.
3295
3296 Thu Jul 14 11:47:27 1994  Stan Shebs  (shebs@andros.cygnus.com)
3297
3298         * coff-sparc.c (sparccoff_vec): Have leading underscores.
3299
3300 Tue Jul 12 12:08:10 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3301
3302         * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
3303         hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
3304         rs6000-core.c, trad-core.c:  Remove SEC_ALLOC flag from .reg
3305         sections, .reg sections are not allocated and contain debug
3306         information only.
3307         * osf-core.c (make_bfd_asection, osf_core_core_file_p):  Use
3308         bfd_make_section_anyway instead of building unique section names.
3309
3310 Tue Jul 12 11:41:22 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3311
3312         * libelf.h (bfd_elf32_swap_symbol_in): Declare.
3313         (bfd_elf32_swap_symbol_out): Declare.
3314         (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
3315         * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
3316
3317         * aout-encap.c (ARCH): Don't define.  Obsolete.
3318         * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
3319         * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
3320         * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
3321         * newsos3.c, sparclynx.c, sunos.c: Likewise.
3322
3323 Mon Jul 11 20:08:23 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3324
3325         * section.c (STD_SECTION): Make the sixth argument boolean, not
3326         the seventh.  From gary@tuva.pacsemi.oz.au (gary kopff).
3327
3328 Sun Jul 10 09:12:02 1994  D. V. Henkel-Wallace  (gumby@cygnus.com)
3329
3330         * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
3331         in order not to collide with LynxOS's definition of FREE in
3332         /usr/include/sys/proc.h
3333
3334 Thu Jul  7 14:18:06 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3335
3336         * reloc.c (bfd_perform_relocation): Don't clobber the relocation
3337         value for coff-Intel-little or coff-Intel-big.  Hack upon hack.
3338
3339 Thu Jul  7 10:10:34 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3340
3341         * aoutx.h (howto_table_std):  Add entry for GOT relocations
3342         which are present in sun3 shared libraries, to avoid assertions
3343         when reading the dynamic relocations.
3344
3345 Thu Jul  7 10:19:20 1994  Jeff Law  (law@snake.cs.utah.edu)
3346
3347         * som.h (R_HPPA_COMPLEX): Fix dumb typo. 
3348
3349 Wed Jul  6 19:21:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3350
3351         * hosts/sysv4.h (qsort, strtol): Don't declare.
3352
3353         * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
3354         if it is NULL.
3355
3356         * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
3357         argument to correspond to recent libelf.h change.
3358
3359 Wed Jul  6 00:48:57 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3360
3361         * coff-alpha.c (alpha_ecoff_mkobject_hook):  New hook to
3362         additionally copy object type information from the alpha file
3363         header to the BFD flags.
3364         (alpha_ecoff_backend_data):  Use it.
3365         (ecoffalpha_little_vec):  Add DYNAMIC to object_flags.
3366         * aout64.c:  Fix typo in conditional QMAGIC definition.
3367
3368 Wed Jul  6 00:13:17 1994  Jeff Law  (law@snake.cs.utah.edu)
3369
3370         * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
3371         value of clicksz to help weed out non HPPA BSD core files.
3372
3373 Tue Jul  5 13:26:02 1994  Stan Shebs  (shebs@andros.cygnus.com)
3374
3375         Mach 3 support.
3376         * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
3377         New targets.
3378         * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
3379         "mach3" instead of "mach".
3380         (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
3381         * targets.c (m88kmach3_vec): New target vector.
3382         (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
3383         inside #if 0.
3384         * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
3385         checking for execute permission, instead of looking at entry
3386         point.
3387         * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
3388         N_SHARED_LIB, don't include aout/*.h files, etc.
3389         * m88kmach3.c: New file, m88k Mach 3 target.
3390         * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
3391         makefile fragments.
3392         * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
3393         New files, host makefile fragments.
3394         * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
3395
3396 Tue Jul  5 13:56:52 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3397
3398         * elfcode.h (swap_out_syms): Get alignment of common symbol from
3399         st_value field of saved ELF symbol information, if there is any.
3400
3401 Mon Jul  4 19:13:32 1994  Jeff Law  (law@snake.cs.utah.edu)
3402
3403         * som.h (R_HPPA_COMPLEX): Define.
3404         * elf32-hppa.h (R_HPPA_COMPLEX): Define.
3405         (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
3406
3407 Fri Jul  1 12:07:41 1994  Jeff Law  (law@snake.cs.utah.edu)
3408
3409         * Support code for enabling the new style linker for PA ELF.
3410         * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
3411         (elf_compute_section_file_positions): Pass link_info to
3412         the begin_write_processing hook.
3413         (bfd_elf_write_object_contents): Pass NULL for new link_info
3414         argument to final_write_processing hook.
3415         (elf_link_output_sym): Accept new "input_section" argument for
3416         the symbols's input section.  All callers changed.  Call the
3417         link_output_symbol_hook if it's defined.
3418         (elf_bfd_final_link): Call the final_write_processing hook if
3419         it's defined.
3420         * libelf.h (elf_backend_link_output_symbol_hook): Declare.
3421         (elf_backend_begin_write_processing): Add new "info" argument.
3422         (elf_backend_final_write_processing): Likewise.
3423         * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
3424         a default definition.
3425         (elf32_bed): Add elf_backend_link_output_symbol_hook.
3426         * elf64-target.h: Likewise.
3427         
3428         * Major rework of the PA ELF code.  Uses the new style BFD
3429         linker, major cleanups.
3430         * hppa_stubs.h: Rewrite from scratch.  Much smaller and simpler.
3431         * elf32-hppa.h: Delete all symbol extension related code.
3432         (hppa_look_for_stubs_in_section): Delete decl.
3433         (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
3434         * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
3435         into elf32-hppa.c.  Do not include aout64.h.
3436         (typdef hppa_stub_type): Delete.
3437         (elf32_hppa_stub_name_list_struct): Delete.
3438         (elf32_hppa_stub_description_struct): Delete.
3439         (arg_reloc_type): Use simpler enumerations.  All references changed.
3440         (arg_location, arg_reloc_relocation): Likewise.
3441         (elf32_hppa_symextn_map_struct): Delete.
3442         (get_symbol_value): Delete.
3443         (elf32_hppa_get_sym_extn): Delete.
3444         (find_stubs, new_stubs, type_of_mismatch): Delete.
3445         (find_stub_by_name, add_stub_by_name): Delete.
3446         (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
3447         (hppa_elf_arg_reloc_needed): Renamed.  Simplify.
3448         (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
3449         (hppa_elf_long_branch_needed_p): Delete.
3450         (hppa_look_for_stubs_in_section): Delete.
3451         (hppa_elf_get_section_contents): Delete.
3452         (elf32_hppa_backend_symbol_processing): Delete.
3453         (elf32_hppa_backend_section_processing): Delete.
3454         (elf32_hppa_backend_section_from_shdr): Delete.
3455         (elf32_hppa_backend_fake_sections): Delete.
3456         (elf32_hppa_backend_section_from_bfd_section): Delete.
3457         (NEW_INSTRUCTION): Delete.
3458         (CURRENT_STUB_OFFSET): Delete.
3459         (elf32_hppa_relocate_section): New function.
3460         (elf32_hppa_bfd_final_link_relocate): New function.
3461         (elf32_hppa_size_symext): New function.
3462         (elf32_hppa_link_output_symbol_hook): New function.
3463         (elf32_hppa_read_symext_info): New function.
3464         (elf32_hppa_add_symbol_hook): New function.
3465         (elf32_hppa_name_of_stub): New function.
3466         (elf32_hppa_size_of_stub): New function.
3467         (elf32_hppa_build_one_sub): New function.
3468         (elf32_hppa_build_stubs): New function.
3469         (elf32_hppa_size_stubs): New function.
3470         (linker, stub and argument hash tables): Add appropriate
3471         structures, definitions and functions to implement all three
3472         hash tables.
3473         (hppa_elf_relocate_insn): Don't need argument location information
3474         in this function.
3475         (add_entry_to_symext_chain): Accept a symbol's argument location
3476         information rather than the symbol itself.  All callers changed.
3477         (hppa_elf_gen_reloc_type): Simplify.
3478         (hppa_elf_set_section_contents): Stub section is no longer special.
3479         (hppa_elf_reloc): Greatly simplify.
3480         (elf32_hppa_begin_write_processing): Accept link_info argument.
3481         Handle being called from the BFD backend linker.
3482         (elf32_hppa_final_write_processing): Likewise.
3483         (elf_hppa_tc_make_sections): No longer call stub_finish.
3484         
3485 Mon Jun 27 18:07:06 1994  Steve Chamberlain  (sac@cirdan.cygnus.com)
3486
3487         * section.c (bfd_get_section_contents): Put in parens to get
3488         precedence right.
3489
3490 Sun Jun 26 18:08:29 1994  Jeff Law  (law@snake.cs.utah.edu)
3491
3492         * libelf.h (relocate_section): New argument "output_names" added
3493         to prototype.
3494         * elfcode.h (elf_link_input_bfd): New argument "output_names"
3495         added to prototype of relocate_section.  Pass the output symbol
3496         names to relocate_section.
3497         * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
3498         determine the name of a local symbol.
3499         * elf32-mips.c (mips_elf_relocate_section): Likewise.
3500         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3501
3502 Fri Jun 24 08:15:42 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3503
3504         Add Solaris BCP (the part of Solaris which allows it to run
3505         SunOS4 a.out files) core file handling.
3506         * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
3507         New structure and its swap in function.
3508         (internal_sunos_core):  New member c_data_addr, to receive the
3509         start address of the data section in the core file.
3510         (swapcore_sun3, swapcore_sparc, sunos4_core_file_p):  Use it.
3511         (sunos4_core_file_p):  Recognize Solaris BCP core file.
3512         (sunos4_core_file_matches_executable_p):  Always indicate match
3513         for Solaris BCP core files.
3514
3515 Thu Jun 23 15:31:28 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3516
3517         Preliminary support for generating shared libraries, from Eric
3518         Youngdale <ericy@cais.cais.com>.
3519         * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
3520         (elf_link_add_object_symbols): If generating a shared library,
3521         create dynamic sections for first input BFD with the right format.
3522         (elf_link_create_dynamic_sections): Don't create .interp section
3523         if creating a shared library.
3524         (elf_link_input_bfd): Skip dynamic sections in input file.
3525         (elf_bfd_final_link): If creating a shared library, it's OK for
3526         dynobj to have sections which are not SEC_IN_MEMORY.
3527         * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
3528         section if not creating a shared library.
3529         * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
3530
3531         * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
3532         is an SHT_DYNAMIC section.
3533
3534         * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
3535         object_flags.
3536         * coff-sparc.c (sparccoff_vec): Likewise.
3537         * hppabsd-core.c (hppabsd_core_vec): Likewise.
3538
3539         * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
3540         just because DYNAMIC is set.
3541
3542 Thu Jun 23 12:53:41 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
3543
3544         * configure.in: Change --with-targets to --enable-targets and
3545         --with-64-bit-bfd to --enable-64-bit-bfd.
3546         * Makefile.in, mpw-make.in, targets.c: Change comments.
3547
3548 Wed Jun 22 17:59:59 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
3549
3550         * config.bfd (powerpc-*-elf*): New target, just like
3551         powerpc-*-sysv4*.
3552
3553         * linker.c (FAIL): Undefine macro before defining as enum.
3554
3555 Wed Jun 22 10:52:47 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3556
3557         * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
3558         pass from abfd->archive_pass, and save it there as well.
3559
3560         * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
3561         obstack_alloc returns NULL unless the size is non-zero.
3562
3563         * linker.c (archive_hash_allocate): Define.
3564         (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
3565         rather than obstack_alloc, for clarity.
3566
3567         * elfcode.h (elf_get_reloc_upper_bound): Correct.
3568
3569         * aout64.c (BMAGIC, QMAGIC): Define if not already defined.  From
3570         Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
3571
3572         Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
3573         * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
3574         * aout-target.h (MY(callback)): Only set alignment according to
3575         architecture if the section sizes are aligned to that alignment,
3576         for backward compatibility.
3577         (MY(set_sizes)): Initialize zmagic_disk_block_size field.
3578         * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format.  Set
3579         text section filepos to zmagic_disk_block_size if not ztih.  Use a
3580         different padding algorithm if not ztih.
3581         * i386linux.c (MY_text_includes_header): Don't define.
3582
3583         * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
3584         symbols; don't look them up in the hash table.  From
3585         ralphc@pyramid.com (Ralph Campbell).
3586
3587 Tue Jun 21 11:47:20 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3588
3589         * coff-go32.c (go32coff_archive_p): Remove unused function.
3590
3591         * section.c (bfd_abs_section): Make const.
3592         (bfd_abs_section_ptr, bfd_is_abs_section): Define.
3593         (bfd_und_section): Make const.
3594         (bfd_und_section_ptr, bfd_is_und_section): Define.
3595         (bfd_com_section): Make const.
3596         (bfd_com_section_ptr): Define.
3597         (bfd_ind_section): Make const.
3598         (bfd_ind_section_ptr, bfd_is_ind_section): Define.
3599         (bfd_abs_symbol, bfd_com_symbol): Make const.
3600         (bfd_und_symbol, bfd_ind_symbol): Likewise.
3601         (global_syms): Cast initialization of section field.
3602         (STD_SECTION): Define as const, and cast initializations.
3603         * bfd-in2.h: Rebuilt.
3604         * Many files: Change uses of bfd_abs_section, etc., to use
3605         bfd_abs_section_ptr or bfd_is_abs_section, etc.
3606
3607 Mon Jun 20 11:06:27 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
3608
3609         * Many files: change all bfd_target vectors to be const.  Change
3610         all uses of bfd_target * to be const bfd_target *.  Change
3611         bfd_target_vector and bfd_default_vector arrays to be const
3612         bfd_target * const *.
3613
3614         * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
3615         elf32-mips.c: Renamed all externally visible ECOFF routines which
3616         are local to BFD to start with _bfd_ecoff instead of just ecoff.
3617
3618         * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
3619         (ecoff_swap_tir_out): Likewise.
3620         (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
3621         (ecoff_slurp_symbolic_info): Add new arguments to correspond to
3622         read_debug_info entry point in ecoff_debug_swap structure.
3623         Change all calls.
3624         * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
3625         * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
3626         (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
3627         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
3628         ecoff_debug_swap fields.
3629         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3630         * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
3631         (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
3632         fields.
3633         * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
3634         ecofflink.o.
3635         (bfd_elf32_littlemips_vec): Likewise.
3636         (ecoff_big_vec, ecoff_little_vec): Likewise.
3637         (ecoffalpha_little_vec): Likewise.
3638         * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
3639         (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
3640
3641         * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
3642         when computing reloc sizes.  From Eric Youngdale
3643         <ericy@cais.cais.com>.
3644         * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
3645         reloc count or size for a non-ELF file.
3646
3647         * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
3648
3649         * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
3650         (BMAGIC, QMAGIC): Define; used by aoutx.h.
3651         (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
3652         calls to use new parameters.
3653
3654 Fri Jun 17 14:45:32 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3655
3656         * aout-target.h (MY(callback)): Set the alignments of the text,
3657         data and bss sections after determining the architecture.
3658
3659         * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
3660         dynamic object as being in the .bss section of the object, rather
3661         than as being undefined.
3662
3663 Fri Jun 17 11:16:50 1994  Jeff Law  (law@snake.cs.utah.edu)
3664
3665         * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
3666
3667         * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
3668
3669 Thu Jun 16 23:36:23 1994  Jeff Law  (law@snake.cs.utah.edu)
3670
3671         * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
3672         if there aren't any in the input file.
3673
3674 Thu Jun 16 14:25:22 1994  Eric Youngdale  (ericy@cais.cais.com)
3675
3676         * i386linux.c: Many new functions and definitions for linker
3677         support for Linux shared libraries.
3678         * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
3679         * bfd-in2.h: Rebuild.
3680
3681 Thu Jun 16 14:23:46 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3682
3683         * config.bfd: If second argument is ``_'', then, instead of
3684         echoing config file name, echo whether target uses leading
3685         underscores on symbol names.  Add appropriate settings to
3686         different cases.  Used by binutils/configure.in to set default for
3687         c++filt.
3688
3689         * elfcode.h (elf_bfd_final_link): If trying to generate a shared
3690         object, warn and return false.
3691
3692         * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
3693         and treat them as OMAGIC.
3694
3695 Wed Jun 15 18:02:21 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
3696
3697         Enable sparc v9 support for release.  Note that this is still a
3698         work in progress, pending release of an ABI specification.
3699         * config.bfd, configure.in: Include sparc v9 elf config.
3700         * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
3701         * reloc.c (bfd_reloc_code_real): New reloc types.
3702         * elf64-sparc.c: Implement elf64-sparc target.
3703         * Makefile.in, targets.c: Updated.
3704
3705 Wed Jun 15 01:34:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3706
3707         * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
3708         (elf_dt_needed_name): New accessor macro.
3709         * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
3710         is set, use that instead of the filename for the DT_NEEDED dynamic
3711         entry.
3712         * elf.c (bfd_elf_set_dt_needed_name): New function.
3713         * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
3714         * bfd-in2.h: Rebuilt.
3715
3716         * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
3717         argument, and set it to the .interp section.
3718         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
3719         (bfd_elf64_size_dynamic_sections): Likewise.
3720         * bfd-in2.h: Rebuilt.
3721
3722         * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
3723         field of the reloc rather than letting it be garbage.
3724
3725         * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
3726         __.SYMDEF; the former was used in old Linux archives.  From
3727         jrs@world.std.com (Rick Sladkey).
3728
3729         * i386linux.c (i386linux_write_object_contents): Define; like
3730         MY(write_object_contents) in aout-target.h, but set MACHTYPE to
3731         M_386.  From jrs@world.std.com (Rick Sladkey).
3732         (MY_write_object_contents): Define.
3733
3734         * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
3735         as N_DATA symbols.
3736         (aout_link_add_symbols): Likewise.
3737
3738         * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
3739         tables.
3740         (struct stringtab_entry, struct stringtab_data): Remove.
3741         (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
3742         (struct strtab_hash_entry, struct strtab_hash): Define.
3743         (strtab_hash_newfunc, strtab_hash_lookup): Define.
3744         (stringtab_free, emit_stringtab): Define.
3745         (stringtab_init, add_to_stringtab): Rewrite.
3746         (NAME(aout,write_syms)): Use new stringtab code.
3747         (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
3748         (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
3749
3750         * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
3751         request BFD to write object in the traditional format, whatever
3752         that means for the particular backend.
3753         * bfd-in2.h: Rebuilt.
3754
3755         * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
3756         bfd_error_no_memory.
3757
3758 Tue Jun 14 13:00:04 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3759
3760         * libaout.h (struct aoutdata): Add q_magic_format to subformat
3761         enum.
3762         * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
3763         if not already defined.  Copy subformat information.
3764         (MY_text_includes_header): Define as 0 if not already defined.
3765         (MY(backend_data)): Use MY_text_includes_header rather than 0.
3766         (MY_final_link_callback): Rename from final_link_callback, and
3767         define only if MY_final_link_callback is not already defined.
3768         (MY_bfd_final_link): Rename use of final_link_callback to
3769         MY_final_link_callback.
3770         * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
3771         ZMAGIC, but set the subformat to q_magic_format.  Abort if the
3772         magic number if not recognized.
3773         (adjust_z_magic): Use QMAGIC if q_magic_format.
3774         * i386linux.c (MY_text_includes_header): Define as 1.
3775         (i386linux_bfd_final_link): New static function.
3776         (MY_bfd_final_link): Define as i386linux_bfd_final_link.
3777
3778         * aoutx.h (translate_to_native_sym_flags): Check both section and
3779         output_section against sections of abfd.
3780
3781         * libecoff.h (struct ecoff_link_hash_entry): Change type of
3782         written from boolean to char.  Add new field small.
3783         * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
3784         rather than false.  Initialize small to 0.
3785         (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
3786         small.  If small is set, and hash table type is common, force the
3787         symbol into a section named SCOMMON and change the ECOFF type from
3788         scCommon to scSCommon.
3789         (ecoff_link_write_external): Set written to 1 rather than true.
3790         * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
3791         overflow check to consider section VMA of input file.
3792
3793 Mon Jun 13 14:20:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3794
3795         * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
3796         machine type of 68000.
3797         * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
3798         Set *unknown to true if machine type is really unknown, as opposed
3799         to M_UNKNOWN for the 68000.
3800         (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
3801         accordingly.
3802         * libaout.h (NAME(aout,machine_type)): Add new argument to
3803         prototype.
3804
3805 Sun Jun 12 20:21:03 1994  Jeff Law  (law@snake.cs.utah.edu)
3806
3807         * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
3808         or HIUX_AUX_ID.
3809         (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
3810         (som_write_armap): Use CPU_PA_RISC1_0 as the magic number.  Note
3811         som.c is careful to always define CPU_PA_RISC1_0.
3812
3813 Sat Jun 11 16:32:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3814
3815         Add weak symbols as an extension to a.out.
3816         * aoutx.h (sym_in_text_section): Don't define.
3817         (sym_in_data_section, sym_in_bss_section): Likewise.
3818         (sym_is_undefined, sym_is_global_defn): Likewise.
3819         (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
3820         (sym_is_absolute, sym_is_indirect): Likewise.
3821         (translate_from_native_sym_flags): Rewrite for clarity.  Rearrange
3822         arguments and change caller.  Handle weak symbols.
3823         (translate_to_native_sym_flags): Likewise.
3824         (aout_link_check_ar_symbols): Don't ignore weak symbols.  Pull
3825         object in from archive if a weak defintion is found for an
3826         existing undefined symbol.
3827         (aout_link_add_symbols): Put all cases in switch.  Set flags of an
3828         undefined symbol to 0.  Handle weak symbols.
3829         (aout_link_write_symbols): Handle weak symbols.
3830         (aout_link_write_other_symbol): Likewise.
3831         (aout_link_input_section_std): Likewise.
3832         (aout_link_input_section_ext): Likewise.
3833         * sunos.c (sunos_write_dynamic_symbol): Likewise.
3834
3835 Fri Jun 10 13:25:13 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3836
3837         * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
3838         (NAME(aout,get_reloc_upper_bound)): Likewise.
3839
3840         * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
3841         * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
3842         the section of a common symbol is not NULL.
3843
3844 Wed Jun  8 23:15:53 1994  Stu Grossman  (grossman@cygnus.com)
3845
3846         * nlmcode.h (nlm_object_p):  Set EXEC_P and start address for GDB.
3847
3848 Wed Jun  8 23:57:34 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3849
3850         * aoutx.h (aout_get_external_symbols): Don't try to read the
3851         strings if there are no symbols.
3852         (aout_link_write_other_symbol): Use the output section when
3853         working out the type.
3854
3855 Tue Jun  7 13:25:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3856
3857         * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
3858         strtab sections at end of file.  Avoids bug in some versions of
3859         SVR4 strip.  From Eric Youngdale <eric@tantalus.nrl.navy.mil>.
3860
3861         * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
3862         set SEC_DEBUGGING for STYP_INFO sections.
3863         (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
3864         defined, and D_PAGED is set, set the file position equal to the
3865         section VMA modulo COFF_PAGE_SIZE.
3866         * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
3867         * coff-i386.c: Set D_PAGED in BFD target.
3868         (COFF_PAGE_SIZE): Define.
3869         * coff-m68k.c, coff-sparc.c: Likewise.
3870
3871 Mon Jun  6 10:57:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3872
3873         * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
3874         into a BFD section just because SHF_ALLOC is set; require that it
3875         not use the normal symbol table.
3876         (elf_section_from_bfd_section): Corresponding change.
3877
3878         Better indirect and warning symbol handling inspired by Stuart
3879         Quick <stuck@cs.man.ac.uk>.
3880         * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
3881         (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
3882         to REF.  Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
3883         REFC.  Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
3884         Change DEFW_ROW/indr from CYCLE to NOACT.  Change INDR_ROW/indr
3885         from MDEF to MIND.  Change INDR_ROW/warn from WARNC to CYCLE.
3886         Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN.  Change
3887         WARN_ROW/com from MWARN to WARN.  Change WARN_ROW/warn from NOACT
3888         to CYCLE.  Change SET_ROW/warn from WARNC to CYCLE>
3889         (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
3890         REFC.  If a new indirect symbol has been referenced, push the
3891         reference down to the symbol it points to.  FIx handling of WARN.
3892         * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
3893         clobber e_type of next symbol.
3894         (translate_to_native_sym_flags): Likewise.
3895         (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
3896         as bfd_link_hash_indirect.
3897
3898         * libaout.h (struct aout_link_hash_entry): New field written.
3899         * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
3900         (aout_link_write_symbols): Use written, not root.written.
3901         (aout_link_write_other_symbol): Likewise.
3902         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3903         * libecoff.h (struct ecoff_link_hash_entry): New field written.
3904         * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
3905         (ecoff_link_write_external): use written, not root.written.
3906         * genlink.h (struct generic_link_hash_entry): New field written.
3907         * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
3908         (generic_link_hash_newfunc): Initialize written.
3909         (_bfd_generic_link_output_symbols): Use written, not root.written.
3910         (_bfd_generic_link_write_global_symbol): Likewise.
3911         (_bfd_generic_reloc_link_order): Likewise.
3912
3913         * libecoff.h (ecoff_data_type): Add linker field.
3914         * ecoff.c (ecoff_write_object_contents): Check new tdata linker
3915         field, rather than outsymbols being non-NULL, to decide whether to
3916         output the symbols and relocs.
3917         (ecoff_bfd_final_link): Set new tdata linker field to true.
3918
3919         * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
3920         data to a non-ECOFF file.
3921
3922         * libbfd-in.h: Add warning that libbfd.h is a generated file.
3923         * libbfd.h: Rebuilt.
3924
3925 Sun Jun  5 15:02:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3926
3927         Changes to support ELF strip and objcopy on dynamically linked
3928         files.
3929         * elfcode.h (elf_fake_sections): Add prototype.
3930         (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
3931         section, and from an SHT_DYNSYM section, and from the dynamic
3932         string table section.
3933         (elf_object_p): Set D_PAGED if there is a program header.
3934         (elf_make_sections): Remove.
3935         (fix_up_strtabs): Remove.
3936         (elf_fake_sections): Rewrite.  Now sets sh_entsize.
3937         (assign_section_numbers): Rewrite.  Now sets sh_link and sh_info
3938         for all sections.
3939         (elf_compute_section_file_positions):  Don't call obsolete
3940         functions elf_make_sections or fix_up_strtabs.
3941         (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
3942         (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
3943         objects.
3944         (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
3945         sections.  If an SHT_REL or SHT_RELA section is allocated or uses
3946         an unusual symbol table, permit a BFD section to map to it.
3947         Permit most SHT_STRTAB sections to have a BFD section mapped to
3948         them.
3949         (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
3950         fields of dynamic sections here; do it in assign_section_numbers.
3951         * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
3952         flags.
3953
3954         * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
3955         SEC_LOAD is set, rather than checking SEC_ALLOC.
3956
3957         * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
3958
3959 Fri Jun  3 10:58:02 1994  Jeff Law  (law@snake.cs.utah.edu)
3960
3961         * som.c (som_write_object_contents): Don't compute the file header's
3962         checksum here.
3963         (som_write_headers): Instead do it here.
3964
3965         * libbfd.h (bfd_realloc): Change last arg to "size_t size".
3966
3967 Thu Jun  2 17:39:22 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
3968
3969         * hosts/sun3.h: Include <stdlib.h>.  Don't declare free, exit or
3970         getenv.
3971
3972         Add linker support for SunOS shared libraries.
3973         * sunos.c: Include bfdlink.h.  Add many new functions and
3974         definitions for SunOS shared library support.
3975         * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
3976         (bfd_sunos_size_dynamic_sections): Declare.
3977         * bfd-in2.h: Rebuilt.
3978         * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
3979         (struct aout_link_hash_table): Likewise.
3980         (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
3981         (aout_hash_table): Likewise.
3982         (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
3983         and make externally visible.
3984         (NAME(aout,link_hash_table_init)): New function.
3985         (NAME(aout,link_hash_table_create)): Call
3986         NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
3987         (aout_link_add_symbols): Don't fail if no symbols.  If it exists,
3988         call add_dynamic_symbols backend entry point for dynamic objects.
3989         Use add_one_symbol backend entry point if it exists.
3990         (NAME(aout,final_link)): Call finish_dynamic_link backend entry
3991         point, if it exists.
3992         (aout_link_input_bfd): For a dynamic object, call
3993         link_dynamic_object backend entry point, if it exists.
3994         (aout_link_write_other_symbol): Call write_dynamic_symbol backend
3995         entry point, if it exists.
3996         (aout_link_input_section): Don't read the relocs if they have
3997         already been read.
3998         (aout_link_input_section_std): When doing a final link, for a
3999         reloc against an external symbol, call check_dynamic_reloc backend
4000         entry point, if it exists.
4001         (aout_link_input_section_ext): Likewise.
4002         * libaout.h: Protect against multiple inclusion.  Include
4003         bfdlink.h.
4004         (struct aout_link_hash_entry): Move in from aoutx.h.
4005         (struct aout_link_hash_table): Likewise.
4006         (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
4007         (aout_hash_table): Likewise.
4008         (struct aout_backend_data): Add fields add_dynamic_symbols,
4009         add_one_symbol, link_dynamic_object, write_dynamic_symbol,
4010         check_dynamic_reloc, and finish_dynamic_link.
4011         (struct aout_section_data_struct): Define new structure.
4012         (aout_section_data): Define new accessor macro.
4013         (NAME(aout,link_hash_newfunc)): Declare.
4014         (NAME(aout,link_hash_table_init)): Declare.
4015         * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
4016         fields.
4017         * aout-target.h (MY(backend_data)): Likewise.
4018         * i386aout.c (MY(backend_data)): Likewise.
4019         * i386mach3.c (MY(backend_data)): Likewise.
4020         * mipsbsd.c (MY(backend_data)): Likewise.
4021         * sparclynx.c (sparclynx_aout_backend): Likewise.
4022
4023         * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
4024         until we know it is non-NULL.
4025         (aout_link_write_symbols): Don't skip a warning symbol even if it
4026         has already been written out.  If skipping an indirect symbol,
4027         skip the next symbol as well.
4028
4029 Wed Jun  1 14:37:50 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4030
4031         * hosts/sun3.h: Don't declare qsort, malloc or realloc.
4032
4033 Thu May 26 13:56:03 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
4034
4035         * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
4036         to char pointer to avoid compiler warnings.
4037
4038         * dep-in.sed: Remove spaces before colons.
4039
4040         Merged changes back in from FSF gas release 2.3:
4041
4042         * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
4043         invocation, to avoid a bug in BSD 4.4 make.
4044
4045         From Ralph Campbell:
4046         * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
4047         error.
4048         (mips_fix_hi16_s): Ditto.
4049
4050         Fri May 13 21:21:00 1994  DJ Delorie (dj@ctron.com)
4051
4052         * makefile.dos: define a default target, or archives won't work
4053           due to multiple matches.
4054
4055         Wed May 11 22:32:00 1994  DJ Delorie (dj@ctron.com)
4056
4057         * configure.bat: update for latest files
4058         * makefile.dos: update for correct targets and sources
4059         * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
4060         * targets.c: add go32coff target
4061         * makefile.in: add coff-go32.c support
4062
4063 Thu May 26 10:10:21 1994  Jeff Law  (law@snake.cs.utah.edu)
4064
4065         * som.c (som_prep_headers): Do not set the system_id here, private
4066         bfd data has not been copied yet.
4067         (som_write_headers): Instead do it here.
4068
4069 Tue May 24 16:17:18 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4070
4071         Make MIPS ELF use new ELF backend linker.  No shared library
4072         support yet.
4073         * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
4074         (bfd_mips_elf32_swap_gptab_out): New function.
4075         (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
4076         (mips_elf_final_write_processing): Set sh_info field for .gptab.*
4077         sections.
4078         (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
4079         (mips_elf_read_ecoff_info): Read and free external symbols last,
4080         not first, for clarity.
4081         (struct mips_elf_link_hash_entry): Define new structure.
4082         (struct mips_elf_link_hash_table): Define new structure.
4083         (mips_elf_link_hash_lookup): Define new macro.
4084         (mips_elf_link_hash_traverse): Define new macro.
4085         (mips_elf_hash_table): Define new macro.
4086         (mips_elf_link_hash_newfunc): New static function.
4087         (mips_elf_link_hash_table_create): New static function.
4088         (mips_elf_add_symbol_hook): New static function.
4089         (struct extsym_info): Define new structure.
4090         (mips_elf_get_extr, mips_elf_set_index): Remove.
4091         (mips_elf_output_extsym): New static function.
4092         (gptab_compare): New static function.
4093         (mips_elf_final_link): Rewrite to use ELF backend linker, and to
4094         merge gptab information in input files.
4095         (mips_elf_relocate_hi16): New static function.
4096         (mips_elf_relocate_section): New static function.
4097         (bfd_elf32_bfd_link_hash_table_create): Define as macro before
4098         including elf32-target.h.
4099         (elf_backend_relocate_section): Likewise.
4100         (elf_backend_add_symbol_hook): Likewise.
4101         * elf.c (_bfd_elf_link_hash_newfunc): Rename from
4102         elf_link_hash_newfunc and make globally visible.  Change caller.
4103         (_bfd_elf_link_hash_table_init): New function, broken out of
4104         _bfd_elf_link_hash_table_create.
4105         (_bfd_elf_link_hash_table_create): Use
4106         _bfd_elf_link_hash_table_init.
4107         * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
4108         (elf_bad_symtab): Define new accessor macro.
4109         (_bfd_elf_link_hash_newfunc): Declare.
4110         (_bew_elf_link_hash_table_init): Declare.
4111         * elfcode.h (elf_object_p): Call backend object_p hook after
4112         swapping in all the section headers.
4113         (map_program_segments): Correct typo: Internal for External.
4114         (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
4115         the symbols.  Skip STB_LOCAL symbols rather than giving an error.
4116         (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
4117         all symbols, not just locals.
4118         (elf_link_output_extsym): Only skip a symbol not mentioned by a
4119         regular file if it is mentioned by a dynamic object.
4120         (elf_link_input_bfd): If elf_bad_symtab is set, read all the
4121         symbols.
4122
4123 Fri May 20 13:38:23 1994  Jeff Law  (law@snake.cs.utah.edu)
4124
4125         * som.c (som_set_reloc_info): Do not set any relocation info
4126         for SOM fixups which are never passed to BFD.
4127
4128 Fri May 20 11:57:05 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4129
4130         * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
4131         checking.
4132
4133         * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
4134         the dynamic linking information for the benefit of the debugger.
4135         From Peter Schauer.
4136         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4137
4138         * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
4139         code repeated three times in bfd_section_from_shdr in elfcode.h.
4140         * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
4141         * elfcode.h (bfd_section_from_shdr): Use new function
4142         _bfd_elf_make_section_from_shdr to create BFD sections.  If a
4143         reloc section does not use the main symbol table, or it is part of
4144         the process image, treat it as a normal section, not relocs.
4145         * elf32-mips.c (mips_elf_section_from_shdr): Use new function
4146         _bfd_elf_make_section_from_shdr.
4147
4148 Thu May 19 11:37:11 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4149
4150         * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
4151         15 to 14 to match SVR4 ar.
4152
4153         Add support for ELF shared libraries.  Loosely based on work by
4154         Eric Youngdale <ericy@cais.com>.
4155         * libelf.h (struct elf_backend_data): Add new fields for dynamic
4156         linking: elf_backend_create_dynamic_sections,
4157         elf_backend_adjust_dynamic_symbol,
4158         elf_backend_size_dynamic_sections,
4159         elf_backend_finish_dynamic_symbol,
4160         elf_backend_finish_dynamic_sections.
4161         (struct elf_link_hash_entry): Change type of align field to
4162         bfd_size_type.  Add fields dynindx, dynstr_index, weakdef,
4163         elf_link_hash_flags.
4164         (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
4165         dynstr, bucketcount.
4166         (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
4167         (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
4168         (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
4169         (bfd_elf32_add_dynamic_entry): Declare.
4170         (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
4171         (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
4172         (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
4173         (bfd_elf64_add_dynamic_entry): Declare.
4174         * elfcode.h (Elf_External_Dyn): Define.
4175         (elf_swap_reloc_in): Define as macro using NAME.  Make externally
4176         visible.
4177         (elf_swap_reloc_out): Likewise.
4178         (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
4179         (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
4180         and as new externally visible function.
4181         (elf_fake_sections): Set section type of dynamic sections based on
4182         section names.
4183         (elf_write_phdrs): Remove.
4184         (assign_file_position_for_section): Add new align argument.
4185         Change all callers.
4186         (get_program_header_size): New static function.
4187         (struct seg_info): Remove.
4188         (map_program_segments): Completely rewrite.
4189         (assign_file_positions_except_relocs): Completely rewrite.
4190         (assign_file_positions_for_relocs): Don't set a file position for
4191         sections which already have one.  Don't bother to align the file
4192         position here.
4193         (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
4194         section types.
4195         (elf_section_from_bfd_section): Likewise.
4196         (elf_slurp_symbol_table): If section_from_elf_index fails, just
4197         use bfd_abs_section rather than returning an error.
4198         (elf_sizeof_headers): Make useful.
4199         (elf_link_record_dynamic_symbol): New static function.
4200         (elf_link_add_object_symbols): Handle dynamic objects.
4201         (elf_link_create_dynamic_sections): New static function.
4202         (elf_add_dynamic_entry): Define as macro using NAME and as new
4203         externally visible function.
4204         (NAME(bfd_elf,record_link_assignment)): New function.
4205         (elf_buckets): New static variable.
4206         (NAME(bfd_elf,size_dynamic_sections)): New function.
4207         (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
4208         (elf_bfd_final_link): Handle dynamic linking.  Create a section
4209         symbol for all ELF sections, not all BFD sections.  Store section
4210         symbol index in target_index field, not index field.  Traverse
4211         over global symbols even if stripping.
4212         (elf_link_output_extsym): Output dynamic symbols.  Mark symbols
4213         defined by dynamic objects as undefined.
4214         (elf_link_input_bfd): Ignore dynamic objects.  Use target_index
4215         field for section relocs, and make sure it is set.
4216         (elf_reloc_link_order): Use target_index field for section relocs,
4217         and make sure it is set.
4218         * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
4219         weakdef and elf_link_hash_flags fields.
4220         (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
4221         dynstr and bucketcount fields.
4222         * elf32-target.h: Initialize new dynamic linking fields.
4223         * elf64-target.h: Likewise.  
4224         * elf32-i386.c: New functions for dynamic linking support.
4225         * elf32-sparc.c: Likewise.
4226         * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
4227         (bfd_elf64_record_link_assignment): Declare.
4228         (bfd_elf32_size_dynamic_sections): Declare.
4229         (bfd_elf64_size_dynamic_sections): Declare.
4230         * bfd-in2.h: Rebuilt.
4231
4232 Wed May 18 08:29:04 1994  Ian Lance Taylor  (ian@cygnus.com)
4233
4234         * som.c: Don't include <sys/dir.h> or <sys/user.h>.
4235         (som_reloc_queue_find): Call memcmp instead of bcmp.
4236         (som_bfd_reloc_type_lookup): Change first argument to bfd *.
4237         (compare_syms): Change types of arguments to const void *.
4238         (bfd_section_from_som_symbol): Removed unused local found.
4239         (som_write_armap): Add elength, map, orl_count and int arguments.
4240         (som_write_armap): Use %ld and cast to long for getuid result.
4241
4242 Wed May 18 09:09:32 1994  Jeff Law  (law@snake.cs.utah.edu)
4243
4244         * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
4245         * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
4246
4247         * som.h (R_HPPA_ABS_CALL): Define.
4248         * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
4249
4250 Tue May 17 19:33:12 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
4251
4252         * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
4253         underscore, for compatibility with Intel tool chain (gnu960v2).
4254
4255 Mon May 16 10:09:22 1994  Jeff Law  (law@snake.cs.utah.edu)
4256
4257         * bfd-in2.h: Rebuilt.
4258
4259         * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
4260         likewise for other PA specific sections.
4261         (hppa_elf_relocate_unwind_table): Delete unused
4262         function.
4263         (elf_hppa_howto_table): Completely new table based on 94-02-02
4264         draft PA ELF spec.  Change relocation tags appropriately
4265         throughout elf32-hppa.c
4266         (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
4267         spec.
4268         (hppa_elf_reloc): Likewise.
4269         (hppa_look_for_stubs_in_section): Likewise
4270         (ELF_MACHINE_CODE): Change to EM_PARISC.
4271         * elf32-hppa.h: Include "elf/hppa.h".  Change relocation tags 
4272         appropriately throughout elf32-hppa.h.
4273         (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
4274         spec.
4275         (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
4276         * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
4277         * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
4278         * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
4279
4280         * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
4281         the final value twice for LR and RR field selectors.
4282
4283 Sat May 14 09:09:19 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
4284
4285         * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert.  This
4286         avoids __eprintf troubles.
4287
4288 Fri May 13 10:51:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4289
4290         * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4291
4292         * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
4293         ecoff_little_vec since Irix 5 supports ECOFF executables.
4294
4295 Wed May 11 00:31:57 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4296
4297         * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
4298         correctly.
4299
4300         * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
4301         make to invoke the shell.
4302
4303 Tue May 10 14:23:43 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4304
4305         * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
4306         SEC_SHARED_LIBRARY for clarity.  Changed all uses.
4307         * bfd-in2.h: Rebuilt.
4308         * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
4309         set, set STYP_NOLOAD.
4310         * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
4311         failure because of a bad shared library.
4312
4313 Mon May  9 18:53:40 1994  Bill Cox  (bill@rtl.cygnus.com)
4314
4315         * linker.c: Add missing comment terminator.
4316
4317 Mon May  9 11:53:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4318
4319         * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
4320         are not NULL, assume the caller has already looked up the symbol
4321         in the hash table and has stored the entry in *hashp.
4322         (generic_link_add_symbol_list): Set h to NULL before calling
4323         _bfd_generic_link_add_one_symbol.
4324         * ecoff.c (ecoff_link_add_externals): Likewise.
4325
4326         * elfcode.h (assign_file_positions_except_relocs): Don't require
4327         page shared between .data and .bss segments to contain zeroes.
4328
4329         * elfcode.h: Include bfdlink.h.  Added several new functions to do
4330         linking.
4331         (ELF_R_TYPE): Define.
4332         (bfd_add_to_strtab): Return unsigned long.  Change check for
4333         realloc failure.
4334         (elf_fake_sections): Check return value of bfd_add_to_strtab.
4335         (elf_compute_section_file_positions): Add link_info argument.
4336         Call elf_backend_begin_write_processing hook and prep_headers
4337         here.  Only call swap_out_syms if link_info is NULL.  Set up
4338         .shstrtab section here.  Pass dosyms argument to
4339         assign_file_positions_except_relocs.  Set output_has_begun flag.
4340         (assign_file_positions_for_symtab_and_strtabs): Add dosyms
4341         argument, and use it to control setting .symtab and .strtab file
4342         positions.
4343         (assign_file_positions_except_relocs): Add dosyms argument, and
4344         pass it on.
4345         (prep_headers): Check return value of bfd_add_to_strtab.
4346         (swap_out_syms): Likewise.  Also, don't set up .shstrtab here.
4347         (NAME(bfd_elf,write_object_contents)): Some calls moved into
4348         elf_compute_section_file_positions.
4349         (elf_set_section_contents): Likewise.
4350         (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
4351         * libelf.h: Include bfdlink.h.
4352         (struct elf_backend_data): Add fields collect,
4353         elf_add_symbol_hook, elf_backend_relocate_section.
4354         (struct bfd_elf_section_data): Add field rel_hashes.
4355         (struct elf_obj_tdata): Remove fields internal_syms and symbols.
4356         Add field sym_hashes.
4357         (obj_symbols, obj_internal_syms): Remove definitions.
4358         (elf_sym_hashes): Define.
4359         (struct elf_link_hash_entry): Define.
4360         (struct elf_link_hash_table): Define.
4361         (elf_link_hash_lookup): Define.
4362         (elf_link_hash_traverse): Define.
4363         (elf_hash_table): Define.
4364         (_bfd_elf_link_hash_table_create): Declare.
4365         (bfd_elf32_bfd_link_add_symbols): Declare.
4366         (bfd_elf32_bfd_final_link): Declare.
4367         (bfd_elf64_bfd_link_add_symbols): Declare.
4368         (bfd_elf64_bfd_final_link): Declare.
4369         * elf.c: Include bfdlink.h.
4370         (elf_link_hash_newfunc): New function.
4371         (_bfd_elf_link_hash_table_create): New function.
4372         * elf32-target.h (elf_backend_relocate_section): If not defined,
4373         define as 0 and use generic linker.  Otherwise, use ELF backend
4374         linker.
4375         (elf_backend_collect): If not defined, define as false.
4376         (elf_backend_add_symbol_hook): If not defined, define as 0.
4377         (elf32_bed): Initialize new fields.
4378         * elf64-target.h: Same changes as elf32-target.h.
4379         * elf32-i386.c: Include bfdlink.h.
4380         (elf_i386_relocate_section): New function.
4381         (elf_backend_relocate_section): Define.
4382         * elf32-sparc.c: Include bfdlink.h.
4383         (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
4384         to Elf_Internal_Rela (they're the same type anyhow).
4385         (elf_sparc_relocate_section): New function.
4386         (elf_backend_relocate_section): Define.
4387         * elf32-mips.c (elf_backend_collect): Define.
4388
4389         * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
4390         different way; touch takes a numeric argument on some systems.
4391
4392 Fri May  6 13:34:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4393
4394         * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
4395         handling for latest suggested format.
4396         (nlm_swap_auxiliary_headers_out): Likewise.
4397         (nlm_compute_section_file_positions): Likewise.
4398
4399 Fri May  6 11:11:50 1994  D. V. Henkel-Wallace  (gumby@rtl.cygnus.com)
4400
4401         * config.bfd: handle erricsson config (for OSE).
4402
4403 Thu May  5 15:40:47 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
4404
4405         Patches from Ralph Campbell:
4406         * mipsbsd.c (mips_fix_jmp_addr): New function.
4407         (mips_fix_hi16_s): Use bfd_is_com_section.
4408         (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
4409
4410 Fri May  6 11:48:55 1994  Steve Chamberlain  (sac@cygnus.com)
4411
4412         * config/go32.mh: XX support.
4413
4414         From bill
4415         * Makefile.in: Build sysdep.h without causing worrying but
4416         harmless error message.
4417
4418 Wed May  4 11:09:53 1994  Ian Lance Taylor  (ian@cygnus.com)
4419
4420         Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
4421         * aout0.c: New file.
4422         * targets.c (aout0_big_vec): Declare.
4423         (bfd_target_vector): Add aout0_big_vec.
4424         * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
4425         * config/m68k-aout.mt (SELECT_VECS): Removed.
4426         * config/m68k-0aout.mt: New file.
4427         * configure.in (aout0_big_vec): New target vector: use aout0.o,
4428         aout32.o and stab-syms.o.
4429         * Makefile.in: Rebuilt dependencies.
4430         (BFD32_BACKENDS): Add aout0.o.
4431         (CFILES): Add aout0.c.
4432
4433         * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
4434         * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
4435         MY(backend_data): Initialize exec_hdr_flags field.
4436         * aoutf1.h (sunos_32_set_arch_mach): Make static.
4437         (aout32_sunos4_write_object_contents): Set flags from backend
4438         info.
4439         (MY_exec_hdr_flags): If not defined, define as 1.
4440         (sunos4_aout_backend): Initialize exec_hdr_flags field.
4441         * aout-encap.c (encap_write_object_contents): Set flags from
4442         backend info.
4443         (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
4444         * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
4445         (MY(write_object_contents)): Set flags from backend info.
4446         * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
4447         * i386mach3.c (MY(backend_data)): Likewise.
4448         * mipsbsd.c (MY(backend_data)): Likewise.
4449         * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
4450         flags from backend info.
4451         (sparclynx_aout_backend): Initialize exec_hdr_flags field.
4452
4453 Wed May  4 02:56:00 1994  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
4454
4455         * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
4456         (m68*-apollo-*): Treat all Apollo configs the same, don't handle
4457         BSD specially.
4458
4459 Tue May  3 19:43:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4460
4461         * cache.c: Rewrote to work correctly.
4462         * libbfd.h: Rebuilt.
4463         * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
4464         (bfd_fdopenr): Check return value of bfd_cache_init.
4465
4466 Fri Apr 29 15:08:23 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4467
4468         * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
4469         enumerating them, since the reloc type can not serve as an index
4470         into the m68k COFF howto_table.
4471
4472 Fri Apr 29 09:42:39 1994  Steve Chamberlain  (sac@cygnus.com)
4473
4474         * config.bfd (*-go32): Changed to coff.
4475         * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
4476         * srec.c (srec_write_symbols): Write out the correct number of
4477         symbols and don't stick in extra nulls.
4478
4479 Tue Apr 26 15:07:24 1994  Stan Shebs  (shebs@andros.cygnus.com)
4480
4481         * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
4482         * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
4483         (COFF_SPARC): Define.
4484         * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
4485         power of data and bss sections to 3.
4486         * hosts/lynx.h (__LYNXOS): Define.
4487
4488 Tue Apr 26 15:04:26 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4489
4490         * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
4491         against section symbols to avoid losing during ld -r.
4492
4493 Tue Apr 26 12:16:41 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4494
4495         * elfcode.h (shstrtab_length_fixed): Remove useless static
4496         variable.
4497         (struct elf_sect_data): Remove unused structure.
4498         (elf_object_p): Free memory if error occurs.  Check return value
4499         of bfd_default_set_arch_mach.  If elf_get_str_section fails,
4500         preserve error code rather than setting wrong_format.
4501         (null_shdr): Remove static variable.
4502         (assign_section_numbers): Remove shstrtab_length_fixed assignment.
4503         Allocate first section header on BFD obstack rather than using
4504         null_shdr.
4505         (bfd_prpsinfo): Remove unused local variable newsect.
4506
4507 Mon Apr 25 15:31:04 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4508
4509         * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
4510
4511         * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
4512         to create sections.  Check return value of recursive calls.
4513         (bfd_section_from_phdr): Check return value of bfd_make_section.
4514         (elf_symbol_from_bfd_symbol): Likewise.
4515         (elf_object_p): Check return value of bfd_section_from_shdr.
4516         (section_from_elf_index): Likewise.
4517         (elf_slurp_symbol_table): Check return value of
4518         section_from_elf_index.
4519         (bfd_prstatus): Return boolean value.  Check return value of
4520         bfd_make_section.
4521         (bfd_fpregset): Likewise.
4522         (bfd_prpsinfo): Return boolean value.
4523         (elf_corefile_note): Check return values of bfd_prstatus,
4524         bfd_fpregset, and bfd_prpsinfo.
4525         (elf_core_file_p): Check return value of elf_corefile_note.
4526
4527 Fri Apr 22 11:08:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4528
4529         Get rid of the ECOFF .reginfo section hack.
4530         * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
4531         (ecoff_new_section_hook): Don't handle the .reginfo section.
4532         (ecoff_sizeof_headers): Likewise.
4533         (ecoff_get_section_contents): Likewise.
4534         (ecoff_compute_section_file_positions): Likewise.
4535         (ecoff_compute_reloc_file_positions): Likewise.
4536         (ecoff_set_section_contents): Likewise.
4537         (ecoff_write_object_contents): Likewise.
4538         (ecoff_bfd_final_link): Likewise.
4539         (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
4540         register masks.
4541         (bfd_ecoff_get_gp_value): New function.
4542         (bfd_ecoff_set_gp_value): New function.
4543         (bfd_ecoff_set_regmasks): New function.
4544         * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
4545         (bfd_ecoff_set_gp_value): Declare.
4546         (bfd_ecoff_set_regmasks): Declare.
4547         * bfd-in2.h: Rebuilt.
4548
4549         Fix ECOFF objcopy to actually copy debugging information.
4550         * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
4551         (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
4552         an external symbol, rather than checking the symbol flags.  Only
4553         check the flags for non-ECOFF symbols.
4554         * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
4555         output_section field of the symbol section is NULL.
4556         * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
4557         function rather than defining as macro.
4558
4559         * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
4560         appropriate.
4561
4562         * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
4563
4564         * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
4565         bfd_default_set_arch_mach.  Accept bfd_arch_m68k as well as
4566         bfd_arch_unknown.
4567         * coffcode.h (coff_set_arch_mach): Check return value of
4568         bfd_default_set_arch_mach.
4569         * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
4570         architectures, just see if the desired architecture matches what
4571         the ELF backend permits.
4572
4573         * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
4574         SH_ARCH_MAGIC to match change in coff/sh.h.
4575         (coff_set_flags): Likewise.
4576
4577         Follow convention in which each NLM header has an 8 byte stamp
4578         followed by a four byte length.
4579         * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
4580         to nlm_cygnus_ext_header, and change type to
4581         Nlm_Internal_Cygnus_Ext_Header.
4582         (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
4583         * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
4584         of CyGnUsSeCs.  Rename from cygnus_section to cygnus_ext.  Require
4585         length word to be 8.
4586         (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
4587         cygnus_ext.  Set length word to 8.
4588         (nlm_compute_section_file_positions): Rename from cygnus_section
4589         to cygnus_ext.
4590
4591 Thu Apr 21 22:54:22 1994  Stu Grossman  (grossman at cygnus.com)
4592
4593         * nlmcode.h (nlm_swap_auxiliary_headers_in):  Keep section table
4594         (from CyGnUsSeCs) in more permanent memory to keep section names
4595         from getting trashed.
4596
4597 Thu Apr 21 09:29:37 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
4598
4599         * libelf.h (elf_obj_tdata):  Add members for dynamic symbol table
4600         handling.
4601         * elfcode.h (bfd_section_from_shdr):  Handle dynamic symbol table.
4602         * elfcode.h (elf_slurp_symbol_table):  Take additional parameter
4603         to select static or dynamic symbol table and return number of
4604         symbols slurped or -1 on error.
4605         * elfcode.h (elf_get_symtab):  Set bfd symcount from
4606         elf_slurp_symbol_table result.
4607         * elfcode.h (elf_get_dynamic_symtab_upper_bound,
4608         elf_canonicalize_dynamic_symtab):  New functions to handle dynamic
4609         symbol table.
4610         * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
4611         Change to handle dynamic symbol table, provide default definitions
4612         for dynamic relocs.
4613         * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
4614         NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
4615         aout_link_reloc_link_order):  Handle r_jmptable and r_relative
4616         relocations.
4617
4618 Thu Apr 21 11:58:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4619
4620         Clean up uses of _bfd_dummy_target (from Peter Schauer).
4621         * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
4622         * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
4623         NULL.
4624         * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
4625         _bfd_check_format.
4626         (symbolsrec_vec): Likewise.
4627         * tekhex.c (tekhex_vec): Likewise.
4628
4629         * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
4630         field.
4631         (nlm_cygnus_section_header): New accessor macro.
4632         * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
4633         Add fixed sections before swapping in auxiliary headers.  After
4634         adding sections, treat errors as real, not as wrong format.
4635         (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
4636         sections to the BFD for each section it describes.
4637         (nlm_swap_auxiliary_headers_out): Swap out the sections header.
4638         (nlm_compute_section_file_positions): Account for the size of the
4639         sections header.
4640
4641 Wed Apr 20 16:45:51 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
4642
4643         * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
4644         2, so that stab sections can be multiples of 4 bytes only.
4645
4646         * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
4647         ones defined in stdlib.h.  (From Minh Tran-Le.)
4648
4649 Wed Apr 20 14:15:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4650
4651         * nlm32-ppc.c: Complete rewrite for new version of PowerPC
4652         NetWare.  Old code still present, but ifdeffed out.
4653
4654         * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
4655         particular format for the customer header.  Allocate a block of
4656         memory and read it into that.
4657         (nlm_swap_auxiliary_headers_out): Write out the block of memory.
4658         (nlm_compute_section_file_positions): Include length of customer
4659         header when computing its size.
4660
4661 Mon Apr 18 14:27:17 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4662
4663         * som.c (som_prep_headers): Get the space's number from the
4664         backend private section data rather than target_index.
4665         (bfd_som_set_section_attributes): Store the space's number
4666         in the backend private section data rather than target_index.
4667
4668         * som.h (som_copyable_section_data_struct): Add space_number.
4669
4670 Fri Apr 15 12:22:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4671
4672         * coff-a29k.c (reloc_processing): Always set the address of a
4673         R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
4674         gas does this anyhow, but some other assemblers seem to leave
4675         garbage in the R_IHCONST address field.
4676
4677         * bfd/archive.c: Consistently use ARFMAG; from
4678         schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
4679         (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
4680         '\012'.
4681         (bsd_write_armap): Likewise.
4682         (coff_write_armap): Likewise.
4683
4684         * coff-mips.c (mips_relocate_section): When relaxing, adjust local
4685         relocs against the .text section as required.
4686         * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
4687         PDR addresses as required.
4688
4689         * ecoff.c (ecoff_emit_aggregate): Take fdr argument.  Map fdr
4690         index through rfd map if it exists.  Check for a couple of cases
4691         which gdb handles specially.  Change all callers.
4692         (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
4693         bigendian argument.  Change all callers.
4694         (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
4695
4696 Thu Apr 14 13:05:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4697
4698         * coff-mips.c (mips_howto_table): Add dummy entries to account for
4699         numbering changes in include/coff/mips.h.  Add entries for
4700         MIPS_R_RELHI and MIPS_R_RELLO.
4701         (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
4702         when little endian.  Treat internal MIPS_R_RELLO or MIPS_R_RELHI
4703         relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
4704         bits.
4705         (mips_ecoff_swap_reloc_out): Likewise.
4706         (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
4707         MIPS_R_RELHI relocs like MIPS_R_SWITCH.
4708         (mips_adjust_reloc_out): Likewise.
4709         (mips_relhi_addr, mips_relhi_addend): New static variables.
4710         (mips_relhi_reloc, mips_rello_reloc): New functions.
4711         (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
4712         MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
4713         (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
4714         argument.  Changed all callers.
4715         (mips_relocate_section): Rename got_reflo to got_lo and
4716         reflo_int_rel to lo_int_rel.  Handle MIPS_R_RELLO and MIPS_R_RELHI
4717         relocs.
4718         (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
4719         expanding a PC relative call.
4720
4721         * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
4722         and BFD_RELOC_PCREL_LO16.
4723         * bfd-in2.h: Rebuilt.
4724
4725 Wed Apr 13 11:50:07 1994  Stan Shebs  (shebs@andros.cygnus.com)
4726
4727         * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
4728
4729 Tue Apr 12 13:36:20 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4730
4731         * som.c (som_write_fixups): Always emit at least
4732         one relocation for any non-bss section.
4733
4734 Mon Apr 11 14:41:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4735
4736         * elfcode.h (assign_file_positions_except_relocs): Don't require
4737         the file alignment to correspond to the page size when linking
4738         with -N.
4739
4740 Sun Apr 10 01:02:24 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4741
4742         * elfcode.h (write_relocs): For rela relocations, adjust the
4743         addend for relocations involving section symbols to account
4744         for the lossage of 1:1 mapping from input section symbols to
4745         output section symbols.
4746
4747 Fri Apr  8 12:22:02 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4748
4749         * aoutx.h (NAME(aout,make_sections)): New function.
4750         (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
4751         rather than making sections inline.
4752         (NAME(aout,mkobject)): Don't make any sections.
4753         (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
4754         (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
4755         obj_datasec (abfd) if they are NULL.
4756         * libaout.h (NAME(aout,make_sections)): Declare.
4757         * bout.c (b_out_mkobject): Don't make any sections.
4758         (b_out_write_object_contents): Call aout_32_make_sections.
4759         (b_out_set_section_contents): Likewise.
4760         * i386os9k.c (os9k_mkobject): Don't make any sections.
4761         (os9k_write_object_contents): Call aout_32_make_sections.
4762         (os9k_set_section_contents): Likewise.
4763
4764         * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
4765         index.
4766
4767 Wed Apr  6 20:44:56 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
4768
4769         * config.bfd, configure.host:  Add mips-*-sysv4* support.
4770
4771 Thu Apr  7 14:23:05 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4772
4773         * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
4774         (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
4775         r_offset and set r_symndx to RELOC_SECTION_TEXT.
4776         (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
4777         value from the r_offset field.
4778         (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
4779         For MIPS_R_SWITCH, copy the r_offset field into the addend field.
4780         (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
4781         into the r_offset field.
4782         (mips_switch_reloc): New function.
4783         (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
4784         MIPS_R_SWITCH.
4785         (mips_relocate_section): Handle MIPS_R_SWITCH.
4786         (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
4787
4788 Thu Apr  7 11:10:51 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4789
4790         * elfcode.h (elf_set_section_contents): Support calling the backend
4791         function elf_backend_begin_write_processing when just beginning to
4792         write an object file.
4793
4794         * libelf.h (elf_backend_begin_write_processing): Declare.
4795
4796         * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
4797         a default definition.
4798         (elf{32,64}_bed): Add elf_backend_begin_write_processing.
4799         
4800         * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
4801         (elf_hppa_tc_make_sections): Likewise.
4802
4803         * elf32-hppa.c (symext_chain_built): Delete.
4804         (symext_chain_size): Renamed from symextn_contents_real_size.
4805         (elf32_hppa_backend_{begin,final}_write_processing): New functions.
4806         (add_entry_to_symext_chain): New function.
4807         (hppa_elf_set_section_contents): Ignore writes to the symbol extension
4808         section until it's been rebuilt internally.
4809         (hppa_elf_get_section_contents): Symbol extension section is no
4810         longer special.
4811         (elf_backend_{begin,final}_write_processing): Define.
4812         (elf_hppa_tc_make_sections): Simplify now that much code has
4813         migrated into elf32_hppa_backend_{being,final}_write_processing.
4814
4815 Wed Apr  6 17:24:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4816
4817         Add new target vectors to read the dynamic symbols and dynamic
4818         relocs.  Change a.out to use these rather than reading the dynamic
4819         symbols and relocs along with the normal symbols and relocs.
4820         * targets.c (bfd_target): Add fields
4821         _bfd_get_dynamic_symtab_upper_bound,
4822         _bfd_canonicalize_dynamic_symtab,
4823         _bfd_get_dynamic_reloc_upper_bound,
4824         _bfd_canonicalize_dynamic_reloc.
4825         (BFD_JUMP_TABLE_DYNAMIC): Define.
4826         * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
4827         Define.
4828         (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
4829         (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
4830         (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
4831         * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
4832         (bfd_canonicalize_dynamic_symtab): Define.
4833         (bfd_get_dynamic_reloc_upper_bound): Define.
4834         (bfd_canonicalize_dynamic_reloc): Define.
4835         * sunos.c (MY_read_dynamic_symbols): Don't define.
4836         (MY_read_dynamic_relocs): Don't define.
4837         (MY_get_dynamic_symtab_upper_bound): Define.
4838         (MY_canonicalize_dynamic_symtab): Define.
4839         (MY_get_dynamic_reloc_upper_bound): Define.
4840         (MY_canonicalize_dynamic_reloc): Define.
4841         (struct sunos_dynamic_info): Change type of dynsym_count and
4842         dynrel_count to long.  Add fields canonical_dynsym and
4843         canonical_dynrel.
4844         (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
4845         Clear info->canonical_dynsym and info->canonical_dynrel.
4846         (MY(read_dynamic_symbols)): Removed.
4847         (MY(read_dynamic_relocs)): Removed.
4848         (sunos_get_dynamic_symtab_upper_bound): New function.
4849         (sunos_canonicalize_dynamic_symtab): New function.
4850         (sunos_get_dynamic_reloc_upper_bound): New function.
4851         (sunos_canonicalize_dynamic_reloc): New function.
4852         * libaout.h: Declare struct reloc_ext_external and
4853         reloc_std_external to avoid prototype problems.
4854         (struct aout_backend_data): Remove fields read_dynamic_symbols and
4855         read_dynamic_relocs.
4856         (NAME(aout,translate_symbol_table)): Declare.
4857         (NAME(aout,swap_ext_reloc_in)): Declare.
4858         (NAME(aout,swap_std_reloc_in)): Declare.
4859         * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
4860         translate_symbol_table and made non-static.  Changed all callers.
4861         (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
4862         (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
4863         (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
4864         * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
4865         remove dynamic symbols and relocs.  They will no longer be
4866         present.
4867         (MY_read_dynamic_symbols): Don't define.
4868         (MY_read_dynamic_relocs): Don't define.
4869         (sunos4_aout_backend): Don't initialize dynamic entry points.
4870         * aout-target.h (MY_read_dynamic_symbols): Don't define.
4871         (MY_read_dynamic_relocs): Don't define.
4872         (MY(backend_data)): Don't initialize dynamic entry points.
4873         (MY_get_dynamic_symtab_upper_bound): If not defined, define to
4874         _bfd_nodynamic version.
4875         (MY_canonicalize_dynamic_symtab): Likewise.
4876         (MY_get_dynamic_reloc_upper_bound): Likewise.
4877         (MY_canonicalize_dynamic_reloc): Likewise.
4878         * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
4879         * bfd-in2.h: Rebuilt.
4880         * libbfd.h: Rebuilt.
4881
4882         * cf-m68klynx.c: Include sysdep.h.
4883
4884         * hp300hpux.c: Removed some spaces in uses of NAME to avoid
4885         problems with traditional C compilers.
4886
4887         * targets.c (bfd_target): Rearranged fields in target vector.
4888         Removed _bfd_debug_info_start, _bfd_debug_info_end and
4889         _bfd_debug_info_accumulate, which were never used.
4890         (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
4891         (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
4892         (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
4893         (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
4894         * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
4895         rather than the single JUMP_TABLE macro.  Removed many of the
4896         weird macro definitions needed to support the monolithic
4897         JUMP_TABLE.
4898         * bfd-in.h (JUMP_TABLE): Removed.
4899         * libbfd-in.h: Define a bunch of macros, and declare a few
4900         functions, for use with the new BFD_JUMP_TABLE_* macros.
4901         * libbfd.c (_bfd_dummy_new_section_hook): Removed.
4902         (bfd_false): Set bfd_error_invalid_operation.
4903         (bfd_nullvoidptr): Likewise.
4904         (bfd_n1): New function.
4905         (_bfd_nocore_core_file_matches_executable_p): Renamed from
4906         _bfd_dummy_core_file_matches_executable_p.
4907         (_bfd_nocore_core_file_failing_command): Similar rename.  Set
4908         bfd_error_invalid_operation.
4909         (_bfd_nocore_core_file_failing_signal): Likewise.
4910         (_bfd_generic_get_section_contents): Renamed from
4911         bfd_generic_get_section_contents.  Changed all callers.
4912         (_bfd_generic_set_section_contents): Similar rename.
4913         * ieee.c: #if 0 out ieee_bfd_debug_info_start,
4914         ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate.  They
4915         were never called.
4916         * bfd-in2.h: Rebuilt.
4917         * libbfd.h: Rebuilt.
4918
4919 Tue Apr  5 22:10:04 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4920
4921         * Crude support for examining dynamic libraries.
4922         * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
4923         DL_MAGIC objects.
4924         (som_prep_headers): Preserve the system_id for DYNAMIC objects.
4925         Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
4926         Write exec headers for DYNAMIC objects.
4927         (som_begin_writing): DYNAMIC objects have the same alignment
4928         restrictions as D_PAGED objects.
4929         (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
4930         objects.
4931         (object_flags): Add DYNAMIC.
4932
4933 Tue Apr  5 17:48:52 1994  Stan Shebs  (shebs@andros.cygnus.com)
4934
4935         * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
4936         macro uses, confuses some non-ANSI compilers.
4937
4938 Tue Apr  5 15:50:01 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
4939
4940         * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
4941         Don't free anything if we don't have a bfd_object.
4942         (som_close_and_cleanup): Call som_bfd_free_cached_info.
4943
4944 Tue Apr  5 11:22:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4945
4946         * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
4947         It turns out not to be required on Irix 5, and it causes problems
4948         if the sections happen to contain symbols.
4949
4950         * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
4951
4952         * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
4953         section->relocation is NULL; malloc might have returned NULL when
4954         given a zero size if there were no relocations.
4955         * bout.c (b_out_canonicalize_reloc): Likewise.
4956         * coffcode.h (coff_canonicalize_reloc): Likewise.
4957         * ecoff.c (ecoff_canonicalize_reloc): Likewise.
4958         * elfcode.h (elf_canonicalize_reloc): Likewise.
4959         * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
4960         * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
4961         * nlmcode.h (nlm_canonicalize_reloc): Likewise.
4962         * som.c (som_canonicalize_reloc): Likewise.
4963         * hp300hpux.c (MY(slurp_reloc_table)): Likewise.  Also, if malloc
4964         returns NULL, don't report an error if we asked for zero bytes.
4965         * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
4966         NULL, don't report an error if we asked for zero bytes.
4967         * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
4968
4969 Mon Apr  4 15:30:49 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4970
4971         * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
4972         if we don't have a bfd_object.
4973
4974         Made sure that every call to bfd_read, bfd_write, and bfd_seek
4975         checks the return value and handled bfd_error correctly.  These
4976         changes are not itemised.  Also:
4977         * aoutx.h (emit_strtab): Change return type to boolean, and return
4978         errors.
4979         (NAME(aout,write_syms)): Check emit_strtab return value.
4980         (NAME(aout,final_link)): Likewise.
4981         * coffcode.h (coff_write_relocs): Change return type to boolean,
4982         and return errors.
4983         (coff_write_object_contents): Check coff_write_relocs return
4984         value.
4985         * i386os9k.c (os9k_swap_exec_header_in): Change return type to
4986         boolean.
4987         (os9k_object_p): Check os9k_swap_exec_header_in return value.
4988         * oasys.c (oasys_read_record): Change return type to boolean.
4989         (oasys_slurp_symbol_table: Check oasys_read_record return value.
4990         (oasys_object_p, oasys_slurp_section_data): Likewise.
4991         (oasys_write_record): Change return type to boolean.
4992         (oasys_write_syms): Likewise.  Also, check oasys_write_record
4993         return value.
4994         (oasys_write_sections): Check oasys_write_record return value.
4995         (oasys_write_header): Change return type to boolean.  Check
4996         oasys_write_record return value.
4997         (oasys_write_end, oasys_write_data): Likewise.
4998         (oasys_write_object_contents): Check return values of
4999         oasys_write_header, oasys_write_syms, oasys_write_data, and
5000         oasys_write_end.
5001         * srec.c (srec_write_record): Change return type to boolean.
5002         (srec_write_header): Likewise.  Also, check srec_write_record
5003         return value.
5004         (srec_write_section, srec_write_terminator): Likewise.
5005         (srec_write_symbols): Change return type to boolean.
5006         (internal_srec_write_object_contents): Check return value of
5007         srec_write_symbols, srec_write_header, srec_write_section, and
5008         srec_write_terminator.
5009
5010         * Makefile.in: Rebuilt dependencies.
5011
5012 Mon Apr  4 10:56:45 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
5013
5014         * aix386-core.c (aix386_bfd_is_local_label):  Correct cast from
5015         asection to asymbol.
5016         * ptrace-core.c (ptrace_unix_bfd_is_local_label):  Correct cast from
5017         bfd to asymbol.
5018         * trad-core.c (trad_unix_bfd_is_local_label):  Correct cast from
5019         asection to asymbol.
5020
5021 Sun Apr  3 18:27:29 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5022
5023         * som.c (som_slurp_string_table): Use malloc to allocate space
5024         for the cached copy of the native string table.
5025         (som_slurp_symbol_table): Likewise for the native symbol table.
5026         (som_slurp_reloc_table): Likewise for the native and generic
5027         relocation tables.
5028         (som_bfd_free_cached_info): Free the cached native strings,
5029         symbols, and relocations.  Also free the canonical cached
5030         relocations.
5031
5032 Fri Apr  1 12:40:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5033
5034         * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
5035         sure the symbol name is stored in permanent memory before adding
5036         it to the string table.
5037
5038         * archive.c (_bfd_write_archive_contents): Once we've found an
5039         object, don't bother to look for more when deciding whether to
5040         build a map.
5041         (compute_and_write_armap): After adding the symbols for a BFD,
5042         call bfd_free_cached_info on it.
5043
5044         Add bfd_free_cached_info support to a.out backends.
5045         * aoutx.h (aout_get_external_symbols): Renamed from
5046         aout_link_get_symbols.  Read strings even if symbols have been
5047         read.  Store string size in obj_aout_string_size.
5048         (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
5049         read the symbols.  Allocate the cached symbols with malloc, not
5050         bfd_alloc.
5051         (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
5052         malloc, not bfd_alloc.
5053         (NAME(aout,bfd_free_cached_info)): New function; free cached
5054         symbols and relocs.
5055         * libaout.h (struct aoutdata): Add external_string_size field.
5056         (obj_aout_external_string_size): New accessor macro.
5057         (NAME(aout,close_and_cleanup)): Don't declare.
5058         (NAME(aout,bfd_free_cached_info)): Declare.
5059         (aout_32_close_and_cleanup): Don't define.
5060         (aout_64_close_and_cleanup): Don't define.
5061         * aout-target.h (MY_bfd_free_cached_info): If not already defined,
5062         define as NAME(aout,free_cached_info).
5063         (MY_close_and_cleanup): If not already defined, define as
5064         MY_bfd_free_cached_info.
5065         * aout-adobe.c (aout_32_close_and_cleanup): Define.
5066         (aout_32_bfd_free_cached_info): Don't define.
5067         * bout.c (aout_32_close_and_cleanup): Define.
5068         (aout_32_bfd_free_cached_info): Don't define.
5069         * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
5070         (MY_close_and_cleanup): Don't define.
5071         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
5072         relocs with malloc, not bfd_alloc.
5073         * i386os9k.c (aout_32_close_and_cleanup): Define.
5074         (aout_32_bfd_free_cached_info): Don't define.
5075
5076         Add a new entry point to free memory cached by a BFD.
5077         * targets.c (bfd_target): Add _bfd_free_cached_info field.
5078         * bfd.c (bfd_free_cached_info): Define.
5079         * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
5080         * bfd-in2.h: Rebuilt.
5081         * All backends: Initialize bfd_free_cached_info entry point to
5082         bfd_true.
5083
5084         * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
5085         first, unused, argument.
5086         (hppa_elf_is_local_label): Declare instead of
5087         som_bfd_is_local_label.
5088
5089         * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
5090         absolute R_IREL reloc.
5091
5092 Thu Mar 31 11:52:15 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5093
5094         Added some support for Irix 4 shared libraries.
5095         * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
5096         .lib section.
5097         (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
5098         STYP_ECOFF_LIB bit is set.
5099         (ecoff_compute_section_file_positions): Round the contents of a
5100         .lib section up to the next page boundary.
5101         (ecoff_set_section_contents): If we see a .lib section, increment
5102         the vma by one to count the number of shared libraries we have.
5103         (ecoff_write_object_contents): Don't crash if we see a
5104         STYP_ECOFF_LIB section, and don't adjust text_start or data_start
5105         or bss_size either.
5106
5107         * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
5108         from original BFD, rather than using value of current BFD symbol.
5109         Needed for new linker.
5110         * coff-sparc.c (CALC_ADDEND): Likewise.
5111
5112         * ecoff.c (ecoff_write_object_contents): Set the text_start and
5113         data_start entries in the optional header correctly even if a text
5114         or data section starts at location zero.
5115
5116         * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
5117         and raeburn).
5118         * bfd-in2.h: Rebuilt.
5119
5120         * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
5121         name.
5122         * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
5123         * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
5124
5125         * coffgen.c (coff_write_symbol): Reindented.  Changed to return
5126         boolean, and changed written to unsigned int *.  Check error
5127         returns from called functions.
5128         (coff_write_alien_symbol): Likewise.
5129         (coff_write_native_symbol): Likewise.
5130         (coff_write_symbols): Likewise.  Reworked checks on whether to
5131         write symbol name to string table for clarity and to avoid core
5132         dumping when given a non COFF symbol.
5133         * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
5134         * libcoff.h: Rebuilt.
5135         * coffcode.h (coff_write_object_contents): Check return value of
5136         coff_write_symbols.
5137
5138 Wed Mar 30 16:25:41 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5139
5140         Changes to let BFD return an error indication from
5141         get_symtab_upper_bound, bfd_canonicalize_symtab,
5142         bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc.  They now
5143         return long instead of unsigned int, and use -1 to indicate an
5144         error.  Along the way, rename get_symtab_upper_bound to
5145         bfd_get_symtab_upper_bound.
5146         * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
5147         errors.
5148         (bfd_canonicalize_reloc): Likewise.
5149         * syms.c (bfd_get_symtab_upper_bound): Renamed from
5150         get_symtab_upper_bound.
5151         * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
5152         _bfd_get_symtab_upper_bound, and changed it and
5153         _bfd_canonicalize_symtab and _get_reloc_upper_bound and
5154         _bfd_canonicalize_reloc to all return long.
5155         * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
5156         (NAME(aout,canonicalize_reloc)): Likewise.
5157         (NAME(aout,get_reloc_upper_bound)): Likewise.
5158         (NAME(aout,get_symtab_upper_bound)): Likewise.
5159         * bout.c (b_out_canonicalize_reloc): Likewise.
5160         (b_out_get_reloc_upper_bound): Likewise.
5161         * coffcode.h (coff_canonicalize_reloc): Likewise.
5162         * coffgen.c (coff_get_symtab_upper_bound): Likewise.
5163         (coff_get_symtab): Likewise.
5164         (coff_get_reloc_upper_bound): Likewise.
5165         * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
5166         (ecoff_get_symtab): Likewise.
5167         (ecoff_canonicalize_reloc): Likewise.
5168         * elfcode.h (elf_get_symtab_upper_bound): Likewise.
5169         (elf_get_reloc_upper_bound): Likewise.
5170         (elf_canonicalize_reloc): Likewise.
5171         (elf_get_symtab): Likewise.
5172         * hp300hpux.c (MY(get_symtab)): Likewise.
5173         (MY(get_symtab_upper_bound)): Likewise.
5174         (MY(canonicalize_reloc)): Likewise.
5175         * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
5176         * ieee.c (ieee_slurp_external_symbols): Change return type to
5177         boolean.  Check for errors from get_symbol.
5178         (ieee_slurp_symbol_table): Change return type to boolean.  Check
5179         for errors from ieee_slurp_external_symbols.
5180         (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
5181         (ieee_get_symtab): Likewise.
5182         (ieee_get_reloc_upper_bound): Likewise.
5183         (ieee_canonicalize_reloc): Likewise.
5184         * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
5185         * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
5186         (nlm_get_symtab): Likewise.
5187         (nlm_get_reloc_upper_bound): Likewise.
5188         (nlm_canonicalize_reloc): Likewise.
5189         * oasys.c (oasys_get_symtab_upper_bound): Likewise.
5190         (oasys_get_symtab): Likewise.
5191         (oasys_get_reloc_upper_bound): Likewise.
5192         (oasys_canonicalize_reloc): Likewise.
5193         * som.c (som_get_symtab_upper_bound): Likewise.
5194         (som_get_symtab): Likewise.
5195         (som_get_reloc_upper_bound): Likewise.
5196         (som_canonicalize_reloc): Likewise.
5197         * srec.c (srec_get_symtab_upper_bound): Likewise.
5198         (srec_get_symtab): Likewise.
5199         (srec_get_reloc_upper_bound): Define as bfd_0l.
5200         (srec_canonicalize_reloc): Likewise.
5201         * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
5202         (tekhex_get_symtab_upper_bound): Likewise.
5203         (tekhex_get_reloc_upper_bound): Define as bfd_0l.
5204         (tekhex_canonicalize_reloc): Likewise.
5205         * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
5206         declaration to return long.
5207         (NAME(aout,get_symtab)): Likewise.
5208         (NAME(aout,canonicalize_reloc)): Likewise.
5209         (NAME(aout,get_reloc_upper_bound)): Likewise.
5210         * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
5211         (coff_get_symtab): Likewise.
5212         (coff_get_reloc_upper_bound): Likewise.
5213         * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
5214         (ecoff_get_symtab): Likewise.
5215         (ecoff_canonicalize_reloc): Likewise.
5216         * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
5217         (bfd_elf32_get_symtab): Likewise.
5218         (bfd_elf32_get_reloc_upper_bound): Likewise.
5219         (bfd_elf32_canonicalize_reloc): Likewise.
5220         (bfd_elf64_get_symtab_upper_bound): Likewise.
5221         (bfd_elf64_get_symtab): Likewise.
5222         (bfd_elf64_get_reloc_upper_bound): Likewise.
5223         (bfd_elf64_canonicalize_reloc): Likewise.
5224         * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
5225         (nlmNAME(get_symtab)): Likewise.
5226         (nlmNAME(get_reloc_upper_bound)): Likewise.
5227         (nlmNAME(canonicalize_reloc)): Likewise.
5228         * archive.c (compute_and_write_armap): Use error_return and
5229         no_memory_return labels rather than freeing information in various
5230         places.  Change storage, symcount and src_count to long.  Check
5231         errors from bfd_get_symtab_upper_bound and
5232         bfd_canonicalize_symtab.
5233         * bout.c (b_out_relax_section): Change reloc_size to long.  Check
5234         for errors from bfd_get_reloc_upper_bound and
5235         bfd_canonicalize_reloc.
5236         (b_out_get_relocated_section_contents): Likewise.
5237         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5238         Likewise.
5239         * elf32-mips.c: Likewise.
5240         * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
5241         (hppa_look_for_stubs_in_section): Check for errors from
5242         bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
5243         bfd_canonicalize_reloc.
5244         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
5245         from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
5246         * linker.c (generic_link_read_symbols): Likewise.
5247         (_bfd_generic_final_link): Check for errors from
5248         bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
5249         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5250         * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
5251         (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
5252         * libbfd.c (bfd_0l): New function.
5253         * libbfd-in.h (bfd_0l): Declare.
5254         * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
5255         get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
5256         than bfd_0u.
5257         * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
5258         * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
5259         * bfd-in2.h: Rebuilt.
5260         * libbfd.h: Rebuilt.
5261         * libcoff.h: Rebuilt.
5262
5263         * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
5264         temp and name.
5265
5266 Wed Mar 30 08:33:04 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5267
5268         * hosts/dpx2.h: Define POSIX_UTIME.
5269
5270 Wed Mar 30 00:31:49 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
5271
5272         * i386dynix.c, config/i386-dynix.mt:  New files, handling Dynix
5273         variant of a.out.
5274         * configure.in, config.bfd:  Use them for Dynix.
5275         * Makefile.in:  Add dependencies for i386dynix.o. 
5276         * targets.c:  Add definition for i386dynix_vec.
5277         * hosts/symmetry.h:  Do not define TRAD_CORE_USER_OFFSET for Dynix.
5278         Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
5279         for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
5280         i386dynix.c
5281
5282 Mon Mar 28 12:53:27 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5283
5284         * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
5285
5286         * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
5287         bfd_arch_rs6000.
5288
5289         * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
5290         * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
5291
5292         * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
5293         for generated constructor section.
5294
5295 Sun Mar 27 16:25:22 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5296
5297         * som.c (som_begin_writing): New approach at dealing with holes
5298         in executables left by the HP linker.  Does not rely on subspace
5299         alignments as subspaces are *NOT* guaranteed to be properly
5300         aligned in an executable (can you believe that!).
5301
5302 Sat Mar 26 10:25:43 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5303
5304         * som.c (som_get_section_contents): New function.  Do not try
5305         to actually read data from a section that doesn't have either
5306         SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
5307
5308         * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
5309         read. (bfd_error_system_call or bfd_error_file_truncated).
5310
5311         * som.c: Do not blindly set bfd_error_system_call after a
5312         failing bfd_read, bfd_write, or bfd_seek.  In a few places
5313         (like som_object_p) override the error status set by bfd_read.
5314
5315         * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
5316         * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
5317         * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
5318         * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
5319
5320         * som.c: Check return values from several bfd_{seek,read,write}
5321         calls that we just assumed were not failing.
5322
5323 Fri Mar 25 11:44:06 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5324
5325         * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
5326         * config/sysv4.mh: Add comment.
5327         * config/symmetry.mh: Change comment.
5328         * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
5329
5330 Fri Mar 25 17:10:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5331
5332         Changes to support linker relaxing of embedded MIPS PIC code to
5333         use a five instruction sequence for function calls which are out of
5334         range of the bal instruction.
5335         * libecoff.h (struct ecoff_section_tdata): Define.
5336         (ecoff_section_data): Define.
5337         (ecoff_bfd_relax_section): Don't define.
5338         * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
5339         the debugging information if it has already been read.
5340         (ecoff_indirect_link_order): Handle _cooked_size being different
5341         from _raw_size.  Don't reread the contents or the relocs if they
5342         have already been read in.
5343         * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
5344         18 to 16.
5345         (PCREL16_EXPANSION_ADJUSTMENT): Define.
5346         (mips_relocate_refhi): Take adjust argument.
5347         (mips_relocate_section): Handle reloc offsets stored in section
5348         used_by_bfd field.  Call mips_relax_pcrel16 to handle details of
5349         expanding an out of range PCREL16.  Keep trace of adjustments
5350         required by expansions.  Set s and unset h when converting a reloc
5351         from undefined to section.  Change handling of PC relative relocs:
5352         if against a section, they are correct in the object file, if
5353         against an external symbol they are pcrel_offset.
5354         (mips_relax_section): New function.
5355         (mips_relax_pcrel16): New function.
5356         (ecoff_bfd_relax_section): Define.
5357         * coff-alpha.c (ecoff_bfd_relax_section): Define.
5358         * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
5359         built by mips_relax_section when writing out addresses.
5360         * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
5361
5362         * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
5363         functionname_ptr to be set to a symbol name, so prepend
5364         symbol_leading_char.
5365
5366 Thu Mar 24 11:33:46 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
5367
5368         * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
5369         for 16bit relative branches.
5370         * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
5371         overflow.
5372
5373 Thu Mar 24 09:21:13 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5374
5375         * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
5376         (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
5377
5378 Wed Mar 23 14:29:31 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
5379
5380         * netbsd386.c (N_SET_FLAGS): Delete the old definition.
5381
5382 Wed Mar 23 14:58:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5383
5384         Clean up the relaxing code for the new linker.
5385         * targets.c (_bfd_relax_section): Take boolean *again argument
5386         rather than asymbol list.
5387         * bfd.c (bfd_relax_section): Change name of fourth argument from
5388         symbols to again.
5389         * reloc.c (bfd_generic_relax_section): Take boolean *again
5390         argument rather than asymbol list.  Always return true.
5391         * bout.c: Include genlink.h.
5392         (aligncode, perform_slip): Declare.
5393         (perform_slip): Take BFD argument rather than asymbol list.
5394         Changed all callers.  Get the symbols from the BFD.  Change the
5395         hash table entry value as well as the symbol value.
5396         (abs32code): Take BFD argument rather than asymbol list.  Changed
5397         all callers.
5398         (aligncode): Likewise.
5399         (b_out_relax_section): Take boolean *again argument rather than
5400         asymbol list.  Only return false if an error occurred.  Set *again
5401         to false.  Get symbols from BFD.
5402         * reloc16.c: Include genlink.h.
5403         (bfd_perform_slip): Take BFD argument rather than asymbol list.
5404         Get the symbols from the BFD.  Change the hash table entry value
5405         as well as the symbol value.
5406         (bfd_coff_reloc16_relax_section): Take boolean *again argument
5407         rather than asymbol list.  Only return false if an error occurred.
5408         Set *again to false.  Get symbols from BFD.
5409         * coffcode.h (bfd_coff_backend_data): Change
5410         _bfd_coff_reloc16_estimate to take BFD argument rather than
5411         asymbol list.
5412         (bfd_coff_reloc16_estimate): Corresponding change.
5413         (dummy_reloc16_estimate): Corresponding change.
5414         * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
5415         declaration to take boolean * rather than asymbol list.
5416         (bfd_perform_slip): Change declaration to take BFD rather than
5417         asymbol list.
5418         * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
5419         than asymbol list.  Changed calls to bfd_perform_slip.
5420         * bfd-in2.h: Rebuilt.
5421         * libbfd.h: Rebuilt.
5422         * libcoff.h: Rebuilt.
5423         * Makefile.in: Rebuilt dependencies.
5424
5425         * genlink.h (_bfd_generic_link_get_symbols): Define.
5426         (_bfd_generic_link_get_symcount): Define.
5427         * linker.c (generic_link_read_symbols): New function.
5428         (generic_link_add_object_symbols): Use it.  Use
5429         _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
5430         to get the symbols from the BFD.
5431         (generic_link_check_archive_element): Likewise.
5432         (_bfd_generic_final_link): Likewise.
5433         (_bfd_generic_link_output_symbols): Likewise.
5434         (default_indirect_link_order): Likewise.
5435         (generic_link_add_symbol_list): Store pointer to hash table entry
5436         in asymbol udata field.
5437
5438 Tue Mar 22 13:09:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5439
5440         * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
5441         reloc, used in embedded PIC code.
5442         (mips_adjust_reloc_in): Change sanity check to permit new reloc.
5443         (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
5444         MIPS_R_PCREL16.
5445
5446         * elf32-mips.c (mips_elf_final_link): Account for link_order
5447         relocs when allocating space for relocations.  Set SEC_RELOC flag
5448         for any section which has relocs.  Handle link_order relocs in
5449         link_order loop.  Use _bfd_generic_link_add_symbols_collect for
5450         add_symbls entry point.
5451
5452         * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
5453         counting relocs.  Set SEC_RELOC flag for any section which has
5454         relocs.
5455
5456         * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
5457
5458         * linker.c (_bfd_generic_link_add_symbols): Just call
5459         generic_link_add_symbols.
5460         (_bfd_generic_link_add_symbols_collect): New function, like
5461         _bfd_generic_link_add_symbols but also collect constructors and
5462         destructors by name as collect2 does.
5463         (generic_link_add_symbols): New function, like old
5464         _bfd_generic_link_add_symbols but with collect argument.
5465         (generic_link_add_object_symbols): Take collect argument.
5466         (generic_link_check_archive_element_no_collect): New function.
5467         (generic_link_check_archive_element_collect): New function.
5468         (generic_link_check_archive_element): Take collect argument.
5469         (generic_link_add_symbol_list): Take collect argument.
5470         (_bfd_generic_link_add_one_symbol): Rename constructor argument to
5471         collect.
5472         * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
5473         * libbfd.h: Rebuilt.
5474
5475 Tue Mar 22 10:04:00 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5476
5477         * archive.c (bfd_construct_extended_name_table): Use ar_padchar
5478         for first character in an extended name.
5479         (_bfd_write_archive_contents): If ar_padchar == '/', then use
5480         "//" as the name of the special archive member holding the
5481         extended name table.
5482
5483 Mon Mar 21 12:28:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5484
5485         Support for link_order types which generate relocs in order to
5486         support -Ur in the linker.
5487         * linker.c (generic_link_add_symbol_list): Remove bitsize argument
5488         from call to _bfd_generic_link_add_one_symbol.
5489         (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
5490         Don't pass bitsize to constructor call back.  Pass BFD_RELOC_CTOR
5491         instead of bitsize to add_to_set call back.
5492         (_bfd_generic_final_link): Account for link_order relocs when
5493         allocating space for relocations.  Handle them in link_order loop.
5494         (_bfd_generic_reloc_link_order): New function.
5495         (_bfd_default_link_order): If a reloc_link_order is seen here,
5496         abort.
5497         (_bfd_count_link_order_relocs): New function.
5498         * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
5499         argument from declaration.
5500         (_bfd_generic_reloc_link_order): Declare.
5501         (_bfd_count_link_order_relocs): Declare.
5502         * libbfd.h: Rebuilt.
5503         * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
5504         call to _bfd_generic_link_add_one_symbol.
5505         (NAME(aout,final_link)): Account for link_order relocs when
5506         allocating space for relocations.  Handle them after handling all
5507         input BFDs.
5508         (aout_link_reloc_link_order): New function.
5509         * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
5510         call to _bfd_generic_link_add_one_symbol.
5511         (ecoff_bfd_final_link): Account for link_order relocs when
5512         allocating space for relocations.  Handle them in link_order loop.
5513         (ecoff_link_write_external): Set the storage class of a defined
5514         linker created symbol based on the section it is in.  Correct
5515         bfd_link_hash_weak case to use .sc rather than .st.
5516         (ecoff_reloc_link_order): New function.
5517         * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
5518         BFD_RELOC_CTOR.
5519         * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
5520
5521         * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
5522         and buf.
5523
5524         * cisco-core.c (cisco_core_file_p): Only pass one argument to
5525         bfd_zmalloc.  Free a pointer, not a union.
5526         (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
5527
5528 Sun Mar 20 09:24:36 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5529
5530         * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
5531
5532         * som.c (bfd_section_from_som_symbol): Only to do the value
5533         comparison for function symbols within executables.
5534
5535         * som.c (bfd_section_from_som_symbol): Renamed from
5536         som_section_from_subspace_index.  Pass in a native SOM symbol.
5537         For executables, iterate through the sections to find out
5538         which contains the symbol's address rather than using the
5539         symbol_info field.  (symbol_info has a different meaning for
5540         dynamicly linked executables.)
5541
5542         * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
5543         bfd_zmalloc.
5544
5545         * som.c (som_begin_writing): Fix braino (one call to align
5546         space/subspace data was done unconditionally rather than
5547         just for executables.)
5548
5549         * som.c (som_begin_writing): Align text in all executables to
5550         make HPUX kernel happy.  Fixes strip/objcopy for shared
5551         executables.
5552
5553 Sat Mar 19 07:06:59 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5554
5555         * som.c (som_begin_writing): Account for alignment needs of
5556         subspaces too when writing executables.  Never request a negative
5557         bss size.  Fixes some problems with demand paged executables,
5558         still having problems with pure executables and shared executables.
5559
5560 Fri Mar 18 19:12:47 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5561
5562         * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
5563         bfd_zalloc for rawptr, because later on we may call free, not
5564         bfd_release, on it.
5565
5566         * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
5567         * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
5568         * cisco-core.c: New file.
5569         * Makefile.in: Change accordingly.
5570         * configure.in: Recognize cisco_core_vec.
5571         * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
5572         * targets.c: Add cisco_core_vec.
5573         * bfd-in2.h: Rebuilt.
5574
5575 Fri Mar 18 18:13:49 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5576
5577         * som.h (som_copyable_section_data_struct): New structure
5578         containing all the private section information which needs
5579         to be copied from input section to output section during
5580         objcopy or strip.
5581         (som_section_data_struct): Remove several fields now in
5582         som_copyable_section_data_struct.  Make the space and 
5583         subspace dictionaries be pointers (to save space when
5584         only reading objects).
5585
5586         * som.c (bfd_som_set_section_attributes): Now returns a boolean;
5587         some references changed.  Allocate a copyable data stucture if
5588         none exists.  Store info into the copyable data structure.
5589         (bfd_som_set_subsection_attributes): Likewise.
5590         (som_is_space, som_is_subspace, som_is_container): New functions.
5591         Use these instead of directly accessing private data.
5592         (som_prep_headers): Allocate space and subspace headers here.
5593         Fill in some fields in the space/subspace headers from the
5594         copyable data.
5595         (som_bfd_copy_private_section_data): Only copy the stuff
5596         that we really need to make objcopy and strip work.  Allocate
5597         the copy_data structure for the output bfd before copying.
5598
5599         * som.h (struct som_exec_data): New structure to hold exec
5600         info that must be preserved when running objcopy/strip.
5601         (struct somdata): Add new "exec_data" field and accessor
5602         macro.  Add some comments on how the various fields are used.
5603         (som_section_data_struct): Make is_space and is_subspace bitfields.
5604         Delete unused subspace_index.  All references now use the
5605         target_index field within the section structure itself.
5606
5607         * som.c (make_unique_section): Delete unused declaration.
5608         (som_bfd_copy_private_bfd_data): New function.
5609         (som_object_setup): Allocate space for and save exec information
5610         that needs to be copied during objcopy/strip.
5611         (som_mkobject): Do not allocate space for a file header here.
5612         It is not used when only reading SOM objects.
5613         (som_prep_headers): Allocate space for and attach a file header
5614         to the output bfd.  For executables, use the saved system_id
5615         value rather than trying to guess the right value.  Do not abort
5616         wwhen setting file_hdr->entry* for executables.
5617         (som_begin_writing): For executables, set the exec_entry and
5618         exec_flags fields.
5619         (som_copy_private_backend_section_data): Always return a value.
5620
5621         * libhppa.h (PA_PAGESIZE): Define.
5622
5623         * som.c (SOM_ALIGN): Define.
5624         (som_begin_writing): If writing an executable, initialize all
5625         fields in the exec header to zero.  Update fields in the exec
5626         header as sizes of loadable subspaces are computed.  Carefully
5627         preserve alignments when building executables.  Actually write the
5628         exec after all the fields are filled in.
5629
5630         * Better long-filename handling.  Reads SOM ABI compliant extended
5631         names, but doesn't quite write compliant extended names yet.
5632         * som.c (som_slurp_extended_name_table): Delete function.  The
5633         generic code will handle things correctly.
5634         (som_slurp_armap): Seek to the beginning of the next member.
5635         (normalize): New function.
5636         (som_bfd_ar_write_symbol_stuff): Take the size of the extended
5637         name table into account when computing the file offsets in the
5638         SOM dictionary.  Make sure to align to an even boundary.
5639         (som_write_armap): Initialize the checksum to zero.
5640         (ar_maxchars): Fix.  Opps.
5641
5642 Fri Mar 18 20:35:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5643
5644         * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
5645         machine.  Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
5646
5647 Thu Mar 17 18:26:46 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5648
5649         * bfd-in.h (BFD_VERSION): Use @VERSION@.
5650         * Makefile.in (bfd.h): Replace it with contents of VERSION file.
5651         * bfd-in2.h: Regenerated.
5652
5653         * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
5654         this was also named trad_unix_bfd_copy_private_bfd_data.
5655
5656 Thu Mar 17 10:37:07 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5657
5658         * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
5659         elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
5660         returns NULL, it is not an error.  It's possible that some of
5661         these checks are not necessary (because the size can never be
5662         zero), but putting in the checks is the conservative thing to do
5663         in light of the fact that some of these malloc calls replaced
5664         unchecked alloca calls, in which a zero argument would work fine.
5665
5666 Thu Mar 17 11:44:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5667
5668         * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
5669         duplicate definition.
5670         (osf_core_bfd_is_local_label): Define.
5671
5672         * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
5673         if malloc (0) fails.  bfd_canonicalize_reloc returning 0 is not a
5674         failure indication, it merely means there are no relocs.
5675
5676         * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
5677         after NAME, since SunOS /bin/cc can't handle it.
5678
5679 Wed Mar 16 16:43:33 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
5680
5681         * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
5682         From sukes@glue.umd.edu (Tasuki Hirata).
5683
5684 Wed Mar 16 07:55:54 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5685
5686         * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
5687         all that convoluted stuff with NAME, CAT3, etc.  The convoluted
5688         stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
5689
5690 Wed Mar 16 00:02:05 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5691
5692         * som.c (som_prep_for_fixups): Detect section symbols based
5693         on either the lack of private data or the symbol flags.  Do not
5694         munge section symbol names anymore -- they no longer confuse GDB.
5695         (som_begin_writing): Leave space for an exec header if writing
5696         an executable.
5697         (som_slurp_symbol_table): Recognize both forms of section symbol
5698         names "L$0\002" and "$<FOO>$".  Change the name of "L$0\002"
5699         section symbols to be the name of the section they represent.
5700         Debugging  symbols begin with "L$0\001", not just "L$".
5701
5702 Tue Mar 15 22:58:28 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5703
5704         * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
5705
5706         * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
5707         for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
5708         and bfd_is_local_label.
5709
5710         * targets.c: Add new entries to the bfd_target structure.
5711         
5712         * bfd.c (bfd_copy_private_bfd_data): New definition.
5713
5714         * section.c (bfd_copy_private_section_data): New definition.
5715
5716         * syms.c (bfd_is_local_label): New definition.
5717
5718         * libbfd-in.h (bfd_generic_is_local_label): Declare.
5719
5720         * libbfd.c (bfd_generic_is_local_label): New function.
5721
5722         * *-core.c: Provide default definitions for new functions in
5723         the target vector which all point to bfd_false.
5724
5725         * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
5726         libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
5727         Default new vectors for copying private backend data to bfd_true.
5728         Default new vector for determining if a symbol is a local label
5729         to bfd_generic_is_local_label.
5730
5731         * som.c (som_bfd_copy_private_section_data): New function.
5732         (som_bfd_is_local_label): New function.
5733         (som_bfd_copy_private_bfd_data): For now default to bfd_true.
5734
5735         * elf32-hppa.c (hppa_elf_is_local_label): New function.
5736
5737 Tue Mar 15 23:55:47 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5738
5739         * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
5740
5741 Tue Mar 15 04:41:13 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
5742
5743         * Most files:
5744         Replace DEFUN and DEFUN_VOID with K&R-style function definition.
5745         Indent some of them to GNU standards.
5746
5747         * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
5748         cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
5749         elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
5750         libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
5751         Update copyright years.
5752
5753 Mon Mar 14 11:41:23 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5754
5755         * som.c (som_prep_for_fixups): A relocation involving the section
5756         symbol for the *ABS* section is really a relocation involving
5757         no symbol.
5758         (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
5759         undefined symbols.  Correctly distinguish between debugger symbols
5760         and section symbols.
5761
5762         * som (setup_sections): Set SEC_DEBUGGING and the section attributes
5763         for spaces and subspaces.
5764
5765         * som.c (som_bfd_count_ar_symbols): Fix typo.
5766
5767         * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
5768         HAS_RELOC based on the object's magic number.
5769         (make_unique_section): Delete function.  BFD and its users are
5770         prepared to handle multiple sections with the same name.
5771         (setup_sections): Allocate space on the BFD's obstack to hold
5772         section names.  Use bfd_make_setion_anyway rather than the
5773         obsolete make_unique_section.
5774         (som_prep_headers): Choose the correct SOM magic number based
5775         on the BFD's flags.
5776         (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
5777
5778 Sat Mar 12 09:46:09 1994  Ian Lance Taylor  (ian@cygnus.com)
5779
5780         * elf32-ppc.c: Renamed from elf32-powerpc.c.
5781         * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
5782         * Makefile.in, configure.in: Corresponding changes.
5783
5784 Fri Mar 11 22:27:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5785
5786         * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
5787
5788 Fri Mar 11 00:34:59 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
5789
5790         * sunos.c (sunos_read_dynamic_info):  Assume that dynamic info
5791         is always located at the start of the data section to allow
5792         recovery of the dynamic info from a stripped executable.
5793         * ecoff.c (ecoff_styp_to_sec_flags):  Handle STYP_PDATA, STYP_XDATA
5794         and STYP_COMMENT.
5795
5796 Wed Mar  9 17:17:53 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
5797
5798         * libbfd-in.h: Remove alloca cruft.  It was missing some necessary
5799         cruft (like the #pragma alloca for AIX).
5800         In addition to that problem, the C alloca calls xmalloc, which
5801         means checking for being out of memory can't work right.  The
5802         following changes remove all uses of alloca from BFD.
5803         * hosts/solaris2.h: Remove alloca cruft.
5804         * som.c: Replace alloca with a fixed size auto array.
5805         * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
5806         ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
5807         sunos.c: Replace alloca with malloc and appropriate error checking and
5808         freeing.
5809         * linker.c: Replace alloca with obstack_alloc.
5810         * libbfd.h: Rebuilt.
5811
5812 Tue Mar  8 12:10:38 1994  Ian Lance Taylor  (ian@cygnus.com)
5813
5814         * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
5815         MIPS_R_GPREL.
5816
5817 Sat Mar  5 14:08:54 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
5818
5819         * elf32-hppa.h, elfcode.h:  Replace uses of Elf*_Half, Elf*_Word,
5820         Elf*_Off typedefs by their expansion, the typedefs have been
5821         removed from include/elf/internal.h.
5822         * elfcode.h (bfd_section_from_shdr):  Handle SHT_DYNAMIC section like
5823         SHT_PROGBITS section.
5824
5825 Thu Mar  3 20:03:39 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5826
5827         * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
5828
5829 Wed Mar  2 13:28:06 1994  Jim Kingdon  (kingdon@deneb.cygnus.com)
5830
5831         * configure.host: Recognize i[34]86-sequent-*.
5832
5833         * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
5834         return from bfd_seek indicates an error.
5835         New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
5836         TRAD_CORE_STACK_OFFSET.
5837         * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
5838         TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
5839
5840 Wed Mar  2 11:57:03 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5841
5842         * som.[ch]: Do not include libhppa.h in som.c, instead include
5843         it in som.h.
5844
5845         * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
5846         include it in elf32-hppa.h.
5847
5848         * som.c (log2): Return -1 on error rather than aborting.
5849         (setup_sections): Bubble up an error from log2.
5850
5851         * Changes to make HP C compiler happy in both traditional
5852         and ANSI mode.
5853         * som.c (hppa_som_gen_reloc_type): Use correct enum type for
5854         field parameter.
5855         (bfd_som_set_section_attributes): Use unsigned int rather than
5856         unsigned char to avoid GNU-C extensions.
5857         (bfd_som_attach_aux_hdr): Return a boolean to indicate success
5858         or failure rather than aborting on failure.
5859
5860         * som.h (bfd_som_set_section_attributes): Fix prototype to match
5861         som.c changes.
5862         (bfd_som_attach_aux_hdr): Add prototype.
5863         (hppa_som-gen_reloc_type): Likewise.
5864
5865         * elf32-hppa.c: Add a couple casts to make HP compiler happy.
5866         (hppa_look_for_stubs_in_section): Do not return false on failure
5867         until rest of code is ready to handle it.  Abort for now.
5868
5869 Tue Mar  1 18:33:59 1994  Jim Kingdon  (kingdon@deneb.cygnus.com)
5870
5871         * bfd-in2.h: Rebuilt.
5872
5873 Tue Mar  1 13:06:53 1994  Kung Hsu  (kung@mexican.cygnus.com)
5874
5875         * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
5876         * Makefile.in: delete an extra blank.
5877         * configure.in : Add i396os9k_vec.
5878
5879 Mon Feb 28 15:41:01 1994  Kung Hsu  (kung@mexican.cygnus.com)
5880
5881         * config.bfd : Add i386-os9k.
5882         * config/i386-os9k.mt : Newly add os9k target makefile.
5883
5884         * i386os9k.c : new file to handle os9k format bfd.
5885         * Makefile.in : Handle new file i386os9k.c
5886         * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
5887         * cache.c : Initialize cache_sentinel to 0.
5888
5889 Sun Feb 27 16:30:55 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5890
5891         * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
5892         action in case where caller specified no argument relocation.
5893         (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
5894         right in the original relocation and the stub's relocation.
5895
5896         * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo.  Delete
5897         unused symbols argument.
5898
5899         * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
5900         than asymbol * for original target symbol.  All callers changed.
5901         Set reloc->sym_ptr_ptr appropriately.
5902         (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
5903         (hppa_elf_look_for_stubs_in_section): No longer need symbols
5904         argument.  Use the output symbols when canonicalizing the relocs,
5905         creating them if necessary.
5906
5907         * linker.c (_bfd_generic_link_output_symbols): Do not
5908         rebuild/clobber the output symbols if they already exist.
5909
5910 Sun Feb 27 15:22:36 1994  Stan Shebs  (shebs@andros.cygnus.com)
5911
5912         * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
5913         check all the pointer dereferences.  Enabled via DEBUG_BFD_SEND.
5914         * bfd-in2.h: Rebuilt.
5915
5916         * srec.c (hex_value): Always set to a size of 256 bytes.
5917         (srec_init): Cosmetic changes.
5918
5919 Sun Feb 27 11:18:47 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5920
5921         * elf32-hppa.c: Second half of major cleanup.  More comments,
5922         PARAMize and staticize rest of functions.  Delete unused
5923         functions.  Delete unused/unnecessary arguments to some functions.
5924         Group static vars together.  Abort for bad errors until we have
5925         error code propogation working.  Work on spacing and indention.
5926         Add FIXMEs for unresolved problems.  Use enums rather than
5927         #defines for lots of things.  Merge two functions which build
5928         linker stubs into a single function (so they can easily share a
5929         ton of common code).
5930
5931 Sat Feb 26 10:00:45 1994  Ian Lance Taylor  (ian@cygnus.com)
5932
5933         * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
5934         avoid depending upon right shifts of signed numbers, and to
5935         correct handling of src_mask with lower bits zero.
5936
5937         * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
5938         * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
5939         * elf32-i386.c: Likewise.
5940         * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
5941         #if 0 code.
5942         (elf_write_phdrs): Make i unsigned.
5943         (map_program_segments): Make i and n_left unsigned.
5944         (assign_file_positions_except_relocs): Make i unsigned.
5945         (write_shdrs_and_ehdr): Make count unsigned.
5946         (assign_file_positions_for_relocs): Make i unsigned.
5947         (NAME(bfd,elf_write_object_contents)): Make count unsigned.
5948         (section_from_elf_index): Make index argument unsigned.
5949
5950 Fri Feb 25 21:34:58 1994  Ian Lance Taylor  (ian@cygnus.com)
5951
5952         * elfcode.h: Don't include assert.h.
5953         (swap_out_syms): Use BFD_ASSERT rather than assert.
5954
5955         * linker.c (_bfd_generic_link_write_global_symbol): Add missing
5956         break in switch.
5957
5958         * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
5959         declarations.
5960
5961 Fri Feb 25 16:35:57 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
5962
5963         * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
5964
5965         * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
5966         (elf_hppa_tc_make_sections): Likewise.
5967         (elf_hppa_final_processing): Add extern decl.
5968
5969         * elf32-hppa.c: First half of major cleanup.  Add/cleanup lots of
5970         comments.  PARAMize some static functions.  Delete unused functions.
5971         Delete unused/unnecessary arguments to many functions.  Group
5972         static vars together.  Collapse common case statements together
5973         in many places.  Use default case when possible instead of listing
5974         each case separately.  Abort for bad errors until we get error
5975         code propogation working.  Work on spacing and indention problems.
5976         Add FIXMEs for some unresolved problems.  Delete hopelessly broken 
5977         COMPLEX relocation support (it's never used anyway).
5978         (hppa_elf_rebuild_insn): Delete.  Moved into libhppa.h.
5979         (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
5980         (elf_hppa_tc_make_sections): Likewise.
5981
5982         * format.c (bfd_check_format_matches): Initialize matching_vector
5983         to keep gcc -Wall quiet.
5984
5985         * elfcode.h (elf_slurp_reloca_table): Fix typo.
5986
5987         * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
5988         not "sizeof (som_symbol_type *)".
5989
5990         * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
5991         not "sizeof (asymbol").  Opps.
5992
5993 Fri Feb 25 13:19:04 1994  Ted Lemon  (mellon@pepper.ncd.com)
5994
5995         * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
5996         (bfd_set_gp_size):  Can't set gp value on an archive.
5997
5998 Fri Feb 25 12:57:00 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
5999
6000         * srec.c (pass_over): Don't skip too many characters when
6001         end of line seen.
6002
6003 Fri Feb 25 11:41:57 1994  Ian Lance Taylor  (ian@cygnus.com)
6004
6005         * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
6006         boundary.
6007
6008 Thu Feb 24 07:13:22 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6009
6010         * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
6011         field for absolute symbols in the same manner as undefined
6012         and common symbols.
6013
6014 Thu Feb 24 04:29:19 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6015
6016         * elfcode.h (elf_core_file_p):  Check for core file e_machine match
6017         like in elf_object_p.
6018
6019 Wed Feb 23 18:28:37 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6020
6021         * elfcode.h (alloca): Delete declaration.
6022
6023         * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
6024         number rather than HP9000S800_ID.  Note som.c is careful
6025         to make sure CPU_PA_RISC1_0 is always defined.
6026
6027 Mon Feb 21 10:12:02 1994  Stan Shebs  (shebs@andros.cygnus.com)
6028
6029         * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
6030         flags to explicit compile actions.
6031
6032 Mon Feb 21 09:50:06 1994  Ian Lance Taylor  (ian@lisa.cygnus.com)
6033
6034         * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
6035         * ecoff.c (ecoff_write_object_contents): Make sure .bss section
6036         ends on a page boundary if there is no symbol table.
6037         (ecoff_bfd_final_link): Don't set symhdr->magic here.
6038
6039         * hosts/hp300.h: Include <stdlib.h>; don't declare free.
6040
6041         * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
6042         rather than an array of variable size.
6043         (som_bfd_fill_in_ar_symbols): Likewise.
6044         (som_bfd_ar_write_symbol_stuff): Likewise.
6045
6046         * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
6047         operation to avoid OSF 1.3 cc bug.
6048         * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
6049         and bss_size bfd_size_type instead of unsigned long.  Make
6050         text_start and data_start bfd_vma instead of unsigned long.
6051         * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
6052         value.
6053
6054 Sun Feb 20 16:06:54 1994  Ian Lance Taylor  (ian@lisa.cygnus.com)
6055
6056         * linker.c (_bfd_generic_link_add_archive_symbols): Consider
6057         symbols in the order they appear in the archive map.
6058
6059 Sat Feb 19 03:17:32 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6060
6061         * coff-alpha.c (reloc_nil):  Add forward declaration, add missing
6062         error_message argument.
6063         * coff-sparc.c (bfd_coff_generic_reloc):  Add forward declaration,
6064         add missing error_message argument.
6065         * mipsbsd.c (mips_fix_hi16_s):  Add forward declaration, add missing
6066         error_message argument.
6067
6068 Fri Feb 18 11:41:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6069
6070         Support for PowerPC NetWare.
6071         * nlm32-powerpc.c: New file.
6072         * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
6073         * config/ppc-nlm.mt: New file.
6074         * configure.in (nlm32_powerpc_vec): New target vector; use
6075         nlm32-powerpc.o, nlm32.o, nlm.o.
6076         * targets.c (nlm32_powerpc_vec): Declare.
6077         * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
6078         (CFILES): Add nlm32-powerpc.c.
6079
6080         Initial support for PowerPC ELF.  Done without an ABI, and
6081         probably to be changed when I get an ABI.
6082         * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
6083         * config/ppc-elf.mt: New file.
6084         * configure.in (bfd_elf32_powerpc_vec): New target vector; use
6085         elf32-powerpc.o, elf32.o, elf.o.
6086         * elf32-powerpc.c: New file.
6087         * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
6088         (elf_set_arch_mach): Likewise.
6089         * targets.c (bfd_elf32_powerpc_vec): Declare.
6090         * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
6091         (CFILES): Add elf32-powerpc.c.
6092         Rebuilt dependencies.
6093
6094 Thu Feb 17 15:29:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6095
6096         * coffgen.c (coff_write_linenumbers): Always return a value.
6097
6098         * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
6099         reasonably.  Allocate x_symp using alloca.
6100
6101         * elfcode.h (map_program_segments): ELF program header entries
6102         must be sorted by load address.  This used to generate the entries
6103         in reverse order.
6104
6105         * section.c (SEC_IN_MEMORY): Define.
6106         (asection): Rename unused field otheruserdata to contents, and
6107         make it char *.
6108         (bfd_make_section_anyway): Initialize contents field to NULL.
6109         (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
6110         contents from contents field rather than from file.
6111         * bfd-in2.h: Rebuilt.
6112
6113 Thu Feb 17 08:30:53 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6114
6115         * bfd.c (bfd_get_error, bfd_set_error): New functions.
6116         (bfd_error): Make static.
6117         (bfd_error_type): Renamed from bfd_ec.  Prepend "bfd_error_" to
6118         all values.
6119         * bfd-in2.h: Regenerated.
6120         * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h, 
6121         aoutf1.h, aoutx.h, archive.c, archures.c, 
6122         bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c, 
6123         coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c, 
6124         ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c, 
6125         elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c, 
6126         i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c, 
6127         lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c, 
6128         nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c, 
6129         ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c, 
6130         srec.c, sunos.c, syms.c, targets.c, tekhex.c, 
6131         trad-core.c: Change callers.
6132
6133 Tue Feb 15 22:27:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6134
6135         * som.c: Remove FIXMEs for things which have been dealt with.
6136
6137 Tue Feb 15 19:39:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6138
6139         * section.c (bfd_get_section_contents): Since this function reads
6140         unrelocated contents, the section's raw size is always the one to
6141         use for bounds checking.
6142
6143         * linker.c (default_indirect_link_order): In assertion, compare
6144         link_order size field against cooked size, not raw size, of input
6145         section.
6146
6147         * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
6148         return 0.
6149         (aligncode): When shrinking, the addend should be set to the
6150         current offset in the section plus the number of bytes of padding
6151         that will actually be retained.
6152         (b_out_relax_section): If a section contains no relocations, don't
6153         bother processing them.
6154         (b_out_get_relocated_section_contents): Set reloc_done.  Assert
6155         that bfd_get_section_contents returns true.  Check that relocs are
6156         properly ordered.
6157         (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
6158         that reloc->addend falls between the current source offset and the
6159         raw size of the input section.
6160
6161         * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
6162         bout.  Default with no version number is still bout.  Support
6163         explicit i960-coff target too.
6164
6165         * bout.c: Changed some indentation, deleted trailing whitespace,
6166         fixed some comments, removed some "#if 1" lines.
6167         (output_addr): New macro.
6168         (calljx_callback, callj_callback, get_value, abs32code, aligncode,
6169         b_out_get_relocated_section_contents): Use it for readability.
6170
6171 Tue Feb 15 09:00:16 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6172
6173         * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
6174         symbols, not the BFD symbols.
6175         (som_bfd_ar_write_symbol_stuff): Likewise.
6176
6177 Mon Feb 14 22:55:20 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6178
6179         * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
6180         have any symbols.
6181
6182         * Finish basic read-write support for SOM archive libraries.  Bugs
6183         surely remain as this hasn't been tested all that much.
6184         * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
6185         (struct som_misc_symbol_info): New structure to hold info necessary
6186         to build both normal and library symbol tables.
6187         (som_derive_misc_symbol_info): New function to derive info necessary
6188         to build both normal and library symbol tables.
6189         (som_build_and_write_symbol_table): Use new function to derive misc
6190         symbol information.
6191         (som_slurp_symbol_table): Update backend private data for symbols
6192         appropriately.
6193         (som_bfd_prep_for_ar_write): New function.
6194         (som_bfd_ar_symbol_hash): New function.
6195         (som_bfd_ar_write_symbol_stuff): New function.
6196         (som_write_armap): Flesh out.
6197         (som_vec): Fix ar padding character.
6198
6199         * som.c: Consistently use memset rather than bzero.
6200
6201 Mon Feb 14 17:02:28 1994  Stu Grossman  (grossman at cygnus.com)
6202
6203         * coff-rs6000.c:  Add Lynx core file support, use HOST_AIX, where
6204         appropriate.
6205         * rs6000-core.c:  Use HOST_AIX instead of COREFILES_PLEASE.
6206         * config/rs6000.mh:  Remove defs of ARCHIVES_PLEASE and
6207         COREFILES_PLEASE.
6208         * config/rs6000lynx.mh:  Turn on Lynx core file support.
6209         * hosts/rs6000.h:  #define HOST_AIX.
6210         * hosts/rs6000lynx.h:  Create this to enable Lynx host support.
6211
6212 Sun Feb 13 14:30:00 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6213
6214         * som.h (som_symbol_data): Safely access backend private data
6215         for BFD symbols.  All callers changed.
6216
6217         * Read-only SOM archive support.
6218         * som.c (som_bfd_count_ar_symbols): New helper function.
6219         (som_bfd_fill_in_ar_symbols): New helper function.
6220         (som_slurp_armap): New function to read a SOM LST.
6221
6222         * som.h: Include <lst.h> and <ar.h>.
6223
6224 Sat Feb 12 22:34:14 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6225
6226         * elfcode.h (elf_map_symbols): Fix typo.
6227         (write_object_contents): Check return values from prep_headers and
6228         elf_compute_section_file_positions.
6229         (set_section_contents): Likewise.
6230
6231 Fri Feb 11 16:56:50 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6232
6233         * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
6234         (bfd_construct_extended_name_table): Check result of normalize.
6235
6236 Tue Feb  8 08:57:31 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6237
6238         Make all callers of malloc or realloc (including via obstacks)
6239         check the result for NULL.  Most set bfd_error to no_memory and
6240         return in that case; a few are harder to fix, and are marked
6241         with "FIXME <return type>".
6242
6243         * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
6244         hppa_elf_build_long_branch_stub):  Check bfd_make_empty_symbol return.
6245         * linker.c (_bfd_generic_link_output_symbols
6246         _bfd_generic_link_write_global_symbol): Ditto
6247         * section.c (bfd_make_section_anyway): Ditto.
6248
6249         * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
6250         (first_phase): Ditto.  FIXME void
6251         (tekhex_make_empty_symbol): Check bfd_zalloc.
6252
6253         * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
6254         (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
6255
6256         * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
6257
6258         * srec.c: Indent.
6259         (fillup_symbols): Check bfd_alloc.  FIXME void
6260         (srec_mkobject srec_get_section_contents
6261         srec_set_section_contents): Check bfd_alloc. 
6262         (srec_make_empty_symbol): Check bfd_zalloc.
6263
6264         * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
6265         (make_unique_section): Check bfd_alloc.
6266         (som_new_section_hook): Check bfd_zalloc.
6267         (bfd_som_attach_aux_hdr): Ditto.  FIXME void
6268
6269         * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
6270
6271         * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
6272         (osf_core_core_file_p): Check bfd_alloc.
6273
6274         * oasys.c (oasys_slurp_symbol_table oasys_archive_p
6275         oasys_mkobject oasys_object_p oasys_new_section_hook
6276         oasys_set_section_contents): Check bfd_alloc.
6277         (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
6278         (oasys_make_empty_symbol): Check bfd_zalloc.
6279
6280         * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
6281         (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
6282
6283         * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
6284
6285         * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
6286
6287         * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
6288
6289         * linker.c (_bfd_link_hash_newfunc
6290         (generic_link_hash_newfunc
6291         (archive_hash_newfunc
6292         (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
6293         (_bfd_generic_final_link
6294         (_bfd_generic_link_output_symbols
6295         (default_indirect_link_order): Check bfd_alloc.
6296         (bfd_new_link_order): Check bfd_alloc_by_size_t.
6297
6298         * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
6299
6300         * ieee.c: Indent.
6301         (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
6302         ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
6303         (do_one): Check bfd_alloc.  Return a boolean.
6304         (ieee_slurp_section_data): Check it.
6305         (init_for_output): Check bfd_alloc.  Return a boolean.
6306         (ieee_set_section_contents): Check it.
6307         (do_with_relocs):  Check bfd_alloc.  Return a boolean.
6308         (ieee_bfd_debug_info_accumulate): Ditto.  FIXME void.
6309         (ieee_mkobject): Check bfd_zalloc.
6310         (ieee_make_empty_symbol): Check bfd_zmalloc.
6311
6312         * hpux-core.c (hpux_core_make_empty_symbol): Check
6313         bfd_zalloc.
6314
6315         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
6316         bfd_zalloc.
6317         (hppabsd_core_core_file_p): Check bfd_zalloc.
6318
6319         * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
6320
6321         * elfcode.h (elf_new_section_hook): Check bfd_alloc.
6322         (bfd_section_from_phdr): Ditto.
6323         (write_relocs): Ditto.  FIXME void
6324         (elf_map_symbols assign_section_numbers map_program_segments):
6325         Ditto.  Return a boolean. 
6326         (swap_out_syms): Ditto.  Check elf_map_symbols.
6327         (elf_slurp_symbol_table): Check bfd_zalloc.
6328         (elf_slurp_reloca_table): Check bfd_alloc.
6329         (elf_slurp_reloc_table): Ditto.
6330         (elf_compute_section_file_positions): Check assign_section_numbers.
6331         (assign_file_positions_except_relocs): Return a boolean.
6332         Check map_program_segments.
6333         (elf_compute_section_file_positions): Check it.
6334
6335         * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
6336
6337         * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
6338         realloc. 
6339         (hppa_elf_stub_reloc): Ditto.
6340         (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
6341         (hppa_elf_build_long_branch_stub): Ditto.
6342         (elf32_hppa_backend_symbol_table_processing): Ditto.
6343
6344         * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc.  Return a boolean.
6345         (ecoff_slurp_symbol_table): Check it.
6346         (ecoff_slurp_armap): Check bfd_alloc.
6347         (ecoff_write_armap): Check bfd_zalloc.
6348         (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
6349         _bfd_link_hash_newfunc. 
6350         (ecoff_link_add_externals): Check bfd_alloc.
6351
6352         * ctor.c (bfd_constructor_entry): Check bfd_alloc.
6353
6354         * coffgen.c (coff_real_object_p): Check bfd_alloc.
6355         (coff_renumber_symbols): Check bfd_alloc_by_size_t.  Return a boolean.
6356         (coff_write_symbol): Check bfd_alloc.  FIXME int
6357         (coff_write_linenumbers): Check bfd_alloc.  Return a boolean.
6358         (coff_section_symbol): Check bfd_alloc_by_size_t.
6359         (coff_get_normalized_symtab): Check bfd_alloc.
6360         (coff_bfd_make_debug_symbol): Check bfd_zalloc.
6361         * libcoff-in.h: Change decls of coff_renumber_symbols,
6362         coff_write_linenumbers.
6363         * libcoff.h: Rebuilt.
6364         * coffcode.h (coff_write_object_contents): Check
6365         coff_renumber_symbols, coff_write_linenumbers.
6366
6367         * coffcode.h: Indent.
6368         (coff_add_missing_symbols): Check bfd_alloc_by_size_t.  Return a
6369         boolean. 
6370         (coff_write_object_contents): Check it.
6371
6372         * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
6373         * coff-mips.c (mips_relocate_section): Ditto.
6374
6375         * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
6376         (do_slurp_bsd_armap): Ditto.
6377         (compute_and_write_armap): Check bfd_realloc value.
6378
6379         * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
6380         return value.  Return boolean value.
6381         (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
6382         (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
6383         return value.
6384         (add_to_stringtab): Ditto.  FIXME void
6385         (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
6386         (aout_link_add_symbols): Check bfd_alloc value.
6387         (translate_symbol_table): Check translate_from_native_sym_flags.
6388         * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
6389         * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
6390
6391         * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
6392
6393         * opncls.c (obstack_chunk_alloc): Define as malloc, not
6394         bfd_xmalloc_by_size_t. 
6395         (_bfd_new_bfd): Check obstack_begin for 0 return.
6396
6397         * ieee.c (obstack_chunk_alloc): Define as malloc, not
6398         bfd_xmalloc_by_size_t. 
6399         (ieee_archive_p): Check obstack_begin for 0 return and
6400         obstack_finish for NULL return.
6401
6402         * hash.c (obstack_chunk_alloc): Define as malloc, not
6403         bfd_xmalloc_by_size_t. 
6404         (bfd_hash_table_init_n): Check obstack_begin for 0 return and
6405         obstack_finish for NULL return.
6406         (bfd_hash_lookup): Check obstack_alloc for NULL return.
6407
6408         * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
6409         bfd_xmalloc_by_size_t. 
6410         bfd_ecoff_debug_accumulate
6411         bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
6412         (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
6413         NULL return.  Return boolean, not void.
6414         (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
6415         (bfd_ecoff_debug_accumulate): Check add_file_shuffle
6416         and add_memory_shuffle return. 
6417         (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
6418         (bfd_ecoff_debug_accumulate): Check bfd_alloc.
6419         (ecoff_add_string): Check add_memory_shuffle return.
6420
6421         * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
6422         Remove decls. 
6423         * libbfd.h: Rebuilt.
6424
6425 Fri Feb 11 15:35:32 1994  Stu Grossman  (grossman at cygnus.com)
6426
6427         * configure.host:  Add Lynx/rs6000 support.
6428         * config/i386-nlm.mt:  Enable a.out file support.
6429         * config/rs6000lynx.mh:  Lynx/rs6000 host support.
6430
6431 Fri Feb 11 17:25:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6432
6433         * archive.c (compute_and_write_armap): Rewrite somewhat to improve
6434         memory usage.
6435
6436 Fri Feb 11 13:10:42 1994  Stan Shebs  (shebs@andros.cygnus.com)
6437
6438         * archive.c: Change all references to '\n' in archive magic
6439         to '\012', for greater portability.
6440         * ecoff.c (ecoff_write_armap): Ditto.
6441
6442 Thu Feb 10 12:58:48 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6443
6444         * aoutx.h (aout_link_write_other_symbol): Check strip settings to
6445         see whether symbol should be output.
6446         * genlink.h (struct generic_write_global_symbol_info): Added info
6447         field.
6448         * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
6449         (_bfd_generic_link_write_global_symbol): Check strip settings to
6450         see whether symbol should be output.
6451         * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
6452
6453 Wed Feb  9 21:34:58 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6454
6455         * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
6456
6457         * som.c: Cast return values from BFD memory allocation routines to
6458         avoid warnings from the HP compiler.
6459
6460 Wed Feb  9 12:55:02 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6461
6462         * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
6463         reloc on an "ldl" instruction too.
6464
6465         * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
6466         when passing them to sprintf.  Use %ld instead of %d.
6467
6468         * coff-rs6000.c (rs6000coff_mkarchive): Return false.
6469         (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
6470         Also removed unused variable namelen.
6471         (rs6000coff_write_armap): Declare orl_count and stridx parameters.
6472
6473 Tue Feb  8 18:00:34 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6474
6475         * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
6476         conflicts.
6477         * libbfd.h: Rebuilt.
6478
6479 Tue Feb  8 15:55:50 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6480
6481         * coff-alpha.c (reloc_nil): New function.
6482         (alpha_howto_table): Use it as special_function to prevent certain
6483         relocs from being adjusted by bfd_perform_relocation.  IGNORE
6484         reloc should be partial_inplace.
6485         (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
6486         reloc on an "ldl" instruction too.
6487
6488 Tue Feb  8 00:32:28 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6489
6490         * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
6491         hppa_elf_build_long_branch_stub):  Cast to char * instead of int
6492         before performing pointer arithmetic.
6493
6494 Mon Feb  7 20:56:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6495
6496         * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
6497         configuration.
6498         (hppa*-*-*elf*): This configuration used hppa-elf now.
6499
6500         * som.c: This file is also used for HOST_HPPAOSF.
6501
6502         * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
6503
6504         * hosts/hppaosf.h: New host configuration file.
6505
6506         * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
6507         BSD handles both SOM and ELF object files.
6508
6509         * config/hppaosf.mh (HDEFINES): Delete.  No longer needed.
6510         (RANLIB): Doesn't do anything, define it to be "echo".
6511
6512         * config/hppaosf.mt: New target makefile fragment for a PA running
6513         OSF1.
6514
6515 Mon Feb  7 15:02:06 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6516
6517         * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
6518         (archures_init_table): If SELECT_ARCHITECTURES is not defined,
6519         added bfd_powerpc_arch.
6520         * bfd-in2.h: Rebuilt.
6521         * cpu-powerpc.c: New file.
6522         * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
6523         Rebuilt dependencies.
6524
6525         * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
6526         of an SHT_STRTAB section from sh_addr and sh_addralign, rather
6527         than just setting them to zero.
6528
6529 Sun Feb  6 20:04:10 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6530
6531         * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
6532         from bfd_new_strtab. 
6533         (elf_compute_section_file_positions): Check for false return from
6534         swap_out_syms. 
6535
6536         * linker.c (default_indirect_link_order): Check for NULL return
6537         from bfd_get_relocated_section_contents.
6538
6539         * syms.c: Make example application in doc call xmalloc, not
6540         bfd_xmalloc. 
6541
6542         * aoutx.h (NAME(aout,slurp_symbol_table),
6543         aout_link_get_symbols, NAME(aout,link_hash_table_create)):
6544         * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
6545         * ecoff.c (ecoff_bfd_link_hash_table_create): 
6546         * ecofflink.c (bfd_ecoff_debug_init): 
6547         * format.c (bfd_check_format_matches): 
6548         * linker.c (_bfd_generic_link_hash_table_create): 
6549         (_bfd_generic_final_link): 
6550         * reloc16.c (bfd_coff_reloc16_relax_section): 
6551         (bfd_coff_reloc16_get_relocated_section_contents): 
6552         * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): 
6553         * elf32-mips.c (mips_elf_final_link): 
6554         * elfcode.h (bfd_new_strtab): 
6555         (bfd_add_2_to_strtab): 
6556         (elf_slurp_symbol_table): 
6557         (elf_corefile_note): 
6558         * libbfd.c (bfd_zmalloc): 
6559         Use malloc and check the result, instead of bfd_xmalloc.
6560
6561 Sat Feb  5 12:39:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
6562
6563         * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
6564
6565 Sat Feb  5 05:32:44 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6566
6567         * srec.c (srec_write_record):  Put CONST keyword for "src" before
6568         "unsigned", some compilers don't like it after "unsigned".
6569         * libcoff.h, libcoff-in.h (bfd_perform_slip):  Rename "value" to
6570         "val" in prototype declaration because some compilers don't like
6571         arguments whose names are the same as types.
6572
6573 Sat Feb  5 01:14:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6574
6575         * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
6576         object file defines symbol.  Also, if skipping a symbol, skip the
6577         second symbol of a N_WARNING or N_INDR symbol as well.
6578
6579 Fri Feb  4 23:55:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6580
6581         Add basic support for writing RS/6000 XCOFF files.
6582         * coff-rs6000.c (dummy_reloc): Removed.
6583         (rs6000coff_howto_table): Defined XCOFF relocs.
6584         (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
6585         (rs6000coff_rtype2howto): New function.
6586         (coff_bfd_reloc_type_lookup): Defined to use
6587         rs6000coff_reloc_type_lookup. 
6588         (rs6000coff_reloc_type_lookup): New function.
6589         (SELECT_RELOC): Defined to set r_type and r_size fields.
6590         (COFF_LONG_FILENAMES): Defined.
6591         * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
6592         fields to bitfields.  Added fields fix_value and fix_scnlen.
6593         (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
6594         STYP_INFO for the type of a section named .debug.
6595         (coff_add_missing_symbols): Don't define if RS6000COFF_C.
6596         (coff_write_object_contents): If RS6000COFF_C, don't call
6597         coff_add_missing_symbols.
6598         (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
6599         entry has type STY_LD change the x_scnlen into a pointer to a
6600         symbol and set fix_scnlen.  Also, for a C_BSTAT symbol, change the
6601         value into a pointer to a symbol and set fix_value.
6602         * libcoff.h: Rebuilt.
6603         * coffgen.c (coff_mangle_symbols): Reindent.  If fix_value is set,
6604         get the symbol offset. Likewise for fix_scnlen.
6605         (string_size): Change type to bfd_size_type.
6606         (debug_string_size, debug_string_section): New static variables.
6607         (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
6608         write the symbol name into the .debug section; assume that the
6609         section has already been created with the right size.
6610         (coff_write_symbols): Initialize debug_string_size to 0.  If
6611         bfd_coff_symname_in_debug returns true, don't put symbol name in
6612         usual string table.  After writing out all symbols, if
6613         debug_string_size is not 0, check that it matches the size of the
6614         .debug section.
6615         (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
6616         fields.  If the string offset is 0, always use an empty string as
6617         the name.
6618         (coff_make_empty_symbol): Zero out the symbol structure.
6619         * reloc.c (bfd_perform_relocation): Work around one gross hack
6620         with another: actually look at the target name to avoid the broken
6621         COFF check.
6622         (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
6623         BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
6624         * bfd-in2.h: Rebuilt.
6625
6626 Fri Feb  4 17:28:32 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6627
6628         * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
6629         (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
6630         * libbfd-in.h: Define them as macros calling xmalloc and declare
6631         xmalloc. 
6632         * libbfd.h: Rebuilt.
6633
6634 Thu Feb  3 16:49:35 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6635
6636         * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
6637         symbol has a value in the ECOFF symbol but not in the BFD symbol,
6638         keep the value in the ECOFF symbol.  This helps gas.
6639
6640         * linker.c (_bfd_generic_link_output_symbols,
6641         _bfd_generic_link_write_global_symbol): Don't require that all
6642         references to a common symbol be themselves common symbols.
6643
6644         * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
6645
6646 Wed Feb  2 20:37:19 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
6647
6648         * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
6649         sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
6650         * bfd-in2.h: Rebuilt.
6651
6652 Wed Feb  2 12:30:13 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6653
6654         * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
6655         and size correctly.
6656         (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
6657         x_csect.x_scnlen.l to match change in coff/internal.h.
6658         (coff_swap_aux_out): Likewise.
6659
6660         * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
6661         (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
6662         fields to match yesterday's changes.
6663
6664         * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
6665         in the internal_reloc itself, not the type.
6666         * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
6667         coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
6668         definition of SELECT_RELOC accordingly.
6669
6670 Tue Feb  1 12:05:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6671
6672         * coffcode.h (bfd_coff_backend_data): Added new arguments to
6673         _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
6674         and number of aux entries.
6675         (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
6676         accordingly.
6677         * libcoff.h: Rebuilt.
6678         * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
6679         arguments.  If RS6000COFF_C, only treat C_EXT and C_HIDEXT
6680         specially if this is the last aux entry.
6681         * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
6682         new arguments to swap_aux functions.
6683
6684 Sun Jan 30 15:14:36 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6685
6686         * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
6687         (only testing for m68k and vax at the moment); do verify that the
6688         preprocessor didn't trash the arch name inside the string version.
6689         Don't print out "pagesize =" line that prevents output from
6690         compiling.  Derive BYTES_IN_WORD and ARCH values from sizeof
6691         results.
6692         * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
6693         (check, installcheck): Identify directory in "no testsuites"
6694         message.
6695
6696 Sun Jan 30 13:25:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6697
6698         * aoutx.h (aout_link_write_symbols): Write out correct value for
6699         object file symbol.
6700
6701 Fri Jan 28 18:34:05 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6702
6703         * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
6704         KERNBASE, so hard-code 0x80000000 instead.
6705
6706 Thu Jan 27 13:54:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6707
6708         * linker.c (generic_link_add_symbol_list): If symbol is common,
6709         set the BSF_OLD_COMMON flag.
6710
6711 Wed Jan 26 13:47:15 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6712
6713         * format.c (bfd_check_format_matches): Put the new entry in the
6714         correct element of matching_vector.
6715
6716 Tue Jan 25 11:43:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
6717
6718         * som.c, som.h (bfd_som_set_section_attributes,
6719         bfd_som_set_subsection_attributes): Change parameters from char
6720         to int.  Following a prototype with an old-style function definition
6721         in the presence of widened parameters is a GCC-ism not supported
6722         by the HP compiler in ANSI mode.
6723
6724 Tue Jan 25 11:46:46 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6725
6726         * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
6727
6728         * hp300hpux.c (MY(write_object_contents)): Write out the symbols
6729         before writing out the relocs, so that the right symbol indices
6730         are used.
6731
6732         * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
6733         try to overlay the internal carsyms on the external symdefs.  That
6734         can not work if the size of a host pointer is larger than 4 bytes.
6735
6736         * format.c (bfd_check_format_matches): Cast result of
6737         bfd_xmalloc_by_size_t.
6738         * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
6739
6740         * archive.c: Reindented to GNU standards.
6741
6742 Mon Jan 24 14:41:23 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6743
6744         * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
6745         "_bfd_" to function names.
6746         * archive.c (_bfd_create_empty_archive_element_shell),
6747         libbfd-in.h: Change callers.
6748
6749         * libbfd.c (bfd_zmalloc): Renamed from zalloc.
6750         * libbfd.c (bfd_add_to_string_table),
6751         trad-core.c (trad_unix_core_file_p),
6752         targets.c (bfd_target_list),
6753         ptrace-core.c (ptrace_unix_core_file_p),
6754         opncls.c (new_bfd), libbfd-in.h,
6755         ieee.c (ieee_make_empty_symbol),
6756         elf32-hppa.c (hppa_elf_stub_branch_reloc),
6757         (hppa_elf_stub_reloc): Change callers.
6758         * libbfd.h: Regenerated.
6759
6760         * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
6761         (_bfd_get_elt_at_filepos), 
6762         coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
6763         Change callers.
6764
6765         * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
6766         elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
6767         and default_vector to bfd_default_vector.
6768         * libbfd.h: Regenerated.
6769
6770         * format.c (bfd_check_format_matches): New function.
6771         (bfd_check_format): Call it.
6772         (bfd_matching_formats): Function removed.
6773         * targets.c: Replace the vector added on Jan 21 with a count of
6774         entries in default_vector.
6775         * bfd-in2.h: Regenerated.
6776
6777 Mon Jan 24 12:38:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6778
6779         * coff-alpha.c (alpha_ecoff_object_p): New function.  Set size of
6780         .pdata section based on lnnoptr field, not section header.
6781         (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
6782         since it is unsigned.
6783         (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
6784         coff_object_p.
6785         * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
6786         .pdata section to 3.
6787         (ecoff_compute_section_file_positions): Save the size of the
6788         .pdata section in the line_filepos field, and actually align the
6789         .pdata section to an alignment power of 4.
6790         (ecoff_compute_reloc_file_positions): Set output_has_begun after
6791         calling ecoff_compute_section_file_positions.
6792         (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
6793         section from the line_filepos field.  Set vstamp for the optional
6794         header from the vstamp of the symbolic header.
6795         (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
6796         vstamp used by the first object file in the link.
6797
6798         * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
6799
6800         * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
6801         for a created common section.
6802         (_bfd_generic_link_add_one_symbol): Likewise.
6803
6804         * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
6805         get the index of a common section, rather than always using
6806         SHN_COMMON (MIPS has multiple common sections).
6807
6808         * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
6809
6810         * bfd/aoutx.h (aout_link_input_section_std,
6811         aout_link_input_section_ext): Pass additional arguments to
6812         reloc_overflow callback.
6813         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
6814         alpha_relocat_section): Likewise.
6815         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
6816         * coff-h8500.c (extra_case): Likewise.
6817         * coff-mips.c (mips_relocate_section): Likewise.
6818         * coff-z8k.c (extra_case): Likewise.
6819         * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
6820         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6821
6822         * bout.c (calljx_callback, callj_callback): Use get_value to get
6823         the symbol value and check for undefined symbols.
6824         (get_value): If the symbol is undefined, look it up in the linker
6825         hash table.
6826         (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
6827         use get_value to get the symbol value and check for undefined
6828         symbols.
6829         * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
6830         undefined, look it up in the linker hash table.
6831
6832         * aoutx.h (translate_symbol_table): The string index 0 has a
6833         special meaning for normal symbols, but not for dynamic symbols.
6834
6835 Sat Jan 22 12:26:01 1994  Stu Grossman  (grossman at cygnus.com)
6836
6837         * sparclynx.c:  Setup appropriate macros to enable core file
6838         support.
6839
6840 Fri Jan 21 16:25:35 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6841
6842         * targets.c: Add a vector of matching format names.
6843         * format.c (bfd_matching_formats): New function to return it.
6844         (bfd_check_format): Set it.
6845         * bfd-in2.h: Regenerated.
6846
6847         * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
6848         Remove decl of type symclass; wasn't used.
6849         * bfd.c: Document error handling, including code fragments
6850         containing the error decls that were in bfd-in.h.
6851         Remove DEFUNs.
6852         * bfd-in2.h: Regenerated.
6853
6854 Fri Jan 21 14:11:16 1994  Sean Fagan  (sef@cygnus.com)
6855
6856         * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
6857         The sparc (and possibly other?) NLM format requires a different
6858         way to write exports, so add a write_export field to the backend
6859         data (and set it to NULL for everything but the sparc).
6860
6861 Fri Jan 21 14:11:16 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
6862
6863         * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
6864         not (struct external_nlist *) NULL.  info->dynrel is a PTR, not
6865         a struct external_nlist *.
6866
6867 Fri Jan 21 09:29:01 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6868
6869         * bfd.c: Remove error strings for errors removed below.
6870         * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
6871         oasys.c (oasys_write_sections): Rename
6872         bfd_error_nonrepresentable_section to nonrepresentable_section.
6873         None of the other bfd error names start with "bfd_error".
6874         Remove errors symbol_not_found and no_relocation_info, which seem
6875         to be unused.
6876         * bfd-in2.h: Regenerated.
6877
6878 Fri Jan 21 01:11:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6879
6880         * bfd.c (bfd_get_gp_size): Added support for ELF.
6881
6882         * syms.c (BSF_DYNAMIC): New symbol flag.
6883         (bfd_print_symbol_vandf): Print it.
6884         * bfd-in2.h: Rebuilt.
6885         * libaout.h (struct aout_backend_data): New read_dynamic_symbols
6886         and read_dynamic_relocs fields.
6887         (struct aoutdata): New dynamic_info field.
6888         (obj_aout_dynamic_info): New accessor macro.
6889         * sunos.c (struct sunos_dynamic_info): New structure.
6890         (sunos_read_dynamic_info, MY(read_dynamic_symbols),
6891         MY(read_dynamic_relocs)): New functions to read dynamic symbols
6892         and relocs.
6893         * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
6894         dynamically linked, set SEC_RELOC for both the .text and .data
6895         sections.
6896         (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
6897         undefined symbol.
6898         (translate_symbol_table): New function, split out of
6899         slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
6900         (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
6901         (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
6902         (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
6903         return value.
6904         * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
6905         out dynamic symbols or relocs against reloc symbols, since they
6906         are already in the .text section and we wouldn't know where to
6907         write them anyhow.
6908         (sunos4_aout_backend): Initialize read_dynamic_symbols and
6909         read_dynamic_relocs fields.
6910         * aout-target.h (MY(backend_data)): Initialize
6911         read_dynamic_symbols and read_dynamic_relocs fields.
6912
6913 Thu Jan 20 20:57:27 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6914
6915         * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
6916         typedefs, since HOST_64_BIT will take care of defining them in
6917         bfd.h.
6918
6919 Wed Jan 19 17:28:59 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6920
6921         * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
6922         that's dealt with elsewhere.
6923         * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
6924         (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
6925         they get copied to bfd.h.
6926
6927         * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
6928         types.  Reorganized some of the existing ones.
6929         * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
6930         values in case of compilation on a 32-bit machine.  Fix pcrel
6931         fields of some reloc types.
6932         (alpha_bfd_reloc_type_lookup): Handle more relocation types.
6933
6934         * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
6935         definitions when not defined, regardless of whether uint64_type is
6936         a defined macro or not.
6937         (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
6938         already defined.
6939
6940 Wed Jan 19 00:02:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6941
6942         * aoutx.h (translate_to_native_sym_flags): Set the type of a
6943         BSF_WARNING symbol to N_WARNING.
6944
6945 Tue Jan 18 16:43:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6946
6947         * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
6948         for an indirect or warning symbol.
6949         (aout_link_write_symbols): Update sym_hash with the target of an
6950         indirect or warning symbol.  If an indirect symbol is defined,
6951         output the calculated value and don't output the target symbol.
6952
6953 Tue Jan 18 03:54:59 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6954
6955         * aoutx.h (translate_from_native_sym_flags): Give warning symbols
6956         an (unused) nonzero section value, needed for check below.
6957
6958 Mon Jan 17 15:12:07 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
6959
6960         * aoutx.h (translate_from_native_sym_flags,
6961         aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
6962         N_SET[ABDT].
6963
6964 Fri Jan 14 16:45:43 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6965
6966         * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
6967         the DYNAMIC flag for the BFD.
6968         (NAME(bfd_elf,write_object_contents)): Don't try to write out a
6969         BFD with the DYNAMIC flag set, since we don't generate the program
6970         header table correctly.
6971
6972 Fri Jan 14 01:04:36 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6973
6974         * elfcode.h (elf_slurp_symbol_table):  Free x_symp at the end
6975         of the function to avoid storage leak.
6976
6977 Thu Jan 13 23:07:32 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6978
6979         * ecoff.c (ecoff_link_write_external): An ifd can be -1.
6980
6981 Thu Jan 13 12:33:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
6982
6983         * som.c (som_set_reloc_info): Provide a default symbol for
6984         relocations which don't actually have an associated symbol.
6985
6986         * som.c (hppa_som_reloc): Add new "error message" argument.
6987
6988 Wed Jan 12 13:36:43 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6989
6990         Enable gdb to write to core files on more core file readers.
6991         * libbfd.c (bfd_generic_set_section_contents):  Remove range check
6992         for section size, it is already done in bfd_set_section_contents
6993         with bfd_get_section_size_now.
6994         * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
6995         osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
6996         Use bfd_generic_set_section_contents instead of bfd_false.
6997
6998 Wed Jan 12 15:31:57 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6999
7000         * linker.c: Added initial documentation.
7001
7002         * linker.c (default_indirect_link_order): Don't expect space for
7003         output relocations if there aren't any input relocations.
7004
7005 Tue Jan 11 14:37:12 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7006
7007         * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
7008         file offsets.
7009
7010         * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
7011         STT_NOTYPE.
7012
7013 Tue Jan 11 09:10:56 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
7014
7015         * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
7016         Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
7017
7018 Tue Jan 11 00:07:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7019
7020         * ecofflink.c: Extensive changes to compress and merge debugging
7021         information, and to write some of out directly rather than saving
7022         it in memory.  Several new functions and structures, and new
7023         arguments to existing functions.
7024         * ecoff.c (ecoff_compute_reloc_file_positions): Compute
7025         sym_filepos as well.
7026         (ecoff_get_extr): Use ifdmap instead of ifdbase.
7027         (ecoff_write_object_contents): Don't compute sym_filepos here.
7028         Only output symbols if outsymbols is not NULL.
7029         (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
7030         bfd_ecoff_debug functions.  Write out debugging information here.
7031         (ecoff_final_link_debug_accumulate): Adjust for changes in
7032         bfd_ecoff_debug functions.
7033         (ecoff_link_write_external): Use ifdmap rather than ifdbase.
7034         * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
7035         first, to put them in the first memory buffer.  Clear fdr field.
7036         (mips_elf_get_extr): Use pointer to unswapped external symbol.
7037         (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
7038         Preserve .text, .data and .bss even if they are empty.  Save
7039         pointer to unswapped external symbol rather than copying it.
7040         Don't free up the external symbols.
7041         * libelf.h (elf_symbol_type): Change mips_extr to PTR.
7042         * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
7043         (bfd_ecoff_debug_accumulate): Update declaration.
7044         (bfd_ecoff_debug_accumulate_other): Rename declaration from
7045         bfd_ecoff_debug_link_other and update.
7046         (bfd_ecoff_write_accumulated_debug): Declare.
7047         * bfd-in2.h: Rebuilt.
7048         * Makefile.in: Rebuilt dependencies.
7049
7050 Mon Jan 10 20:46:53 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
7051
7052         * Makefile.in (install): Remove "@" which follows a backslash.  In
7053         this position it just causes errors, not suppresses echoes.
7054
7055 Mon Jan 10 09:06:21 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7056
7057         * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
7058         field selectors.
7059
7060 Sun Jan  9 04:32:25 1994  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
7061
7062         * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
7063
7064 Fri Jan  7 10:27:27 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
7065
7066         * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
7067         end of data if they are not contiguous.
7068
7069         * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
7070
7071 Fri Jan  7 15:40:16 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7072
7073         * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
7074         for .reginfo section here.
7075         (ecoff_new_section_hook): Set it here instead.
7076
7077 Fri Jan  7 10:29:27 1994  Stan Shebs  (shebs@andros.cygnus.com)
7078
7079         * bfd-in.h: (bfd_boolean): Add workaround for systems that also
7080         define true and false as enums.
7081         (ALMOST_STDC): Add as alternative to __STDC__.
7082         * bfd-in2.h: Rebuilt.
7083         * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
7084
7085 Thu Jan  6 14:24:44 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
7086
7087         * aoutx.h (translate_to_native_sym_flags): Catch the case where
7088         there is no output section.
7089
7090 Thu Jan  6 14:37:42 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7091
7092         * nlmcode.h (nlm_object_p): If we can't read the fixed header,
7093         count it as a wrong format error, not a system call error, since
7094         the object file might simply be too small.
7095
7096         * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
7097         BFD64.
7098         * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
7099         (BFD64_BACKENDS): Add nlm32-alpha.o.  It depends on 64 bit
7100         support, even though it is for an Alpha in 32 bit mode.
7101         * configure.in (nlm32_alpha_vec): Set target64 to true.
7102
7103         * nlm32-gen.c, nlm64-gen.c: Removed.  All nlm targets are
7104         different, so there is no point to providing a generic one.
7105         * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
7106         in the backend accessor macros; that should no longer be possible.
7107         * targets.c (target_vector): Removed nlm32_big_generic_vec,
7108         nlm64_big_generic_vec, nlm64_little_generic_vec.
7109         * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
7110         nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
7111         * Makefile.in: Rebuilt dependencies, and
7112         (BFD32_BACKENDS): Removed nlm32-gen.o.
7113         (BFD64_BACKENDS): Removed nlm64-gen.o.
7114         (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
7115
7116         * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
7117
7118         * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
7119         bitsize arguments.  Changed all callers (aoutx.h).
7120         * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
7121         and bitsize arguments to declaration.
7122         * libbfd.h: Rebuilt.
7123
7124         * ecoff.c: First cut at new style of linker backend for
7125         ECOFF--added a bunch of functions.  Also:
7126         (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
7127         (ecoff_slurp_symbolic_header): New function.
7128         (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
7129         (ecoff_compute_reloc_file_positions): New function.
7130         (ecoff_set_section_contents): Get out quickly if count is zero.
7131         Check errors better.
7132         (ecoff_write_object_contents): Put .xdata section in data segment.
7133         Call ecoff_compute_reloc_file_positions.  Don't output relocs or
7134         external symbols if outsymbols is NULL.
7135         (ecoff_bfd_final_link): Completely rewritten.
7136         * libecoff.h: Include bfdlink.h.
7137         (struct ecoff_backend_data): Add relocate_section field.
7138         (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
7139         (struct ecoff_link_hash_entry): Define.
7140         (struct ecoff_link_hash_table): Define.
7141         (ecoff_bfd_link_add_symbols): Declare as function, not macro.
7142         (ecoff_bfd_link_hash_table_create): Likewise.
7143         * ecofflink.c (bfd_ecoff_debug_one_external): New function.
7144         (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
7145         * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
7146         * bfd-in2.h: Rebuilt.
7147         * coff-alpha.c (alpha_howto_table): Mark BRADDR as
7148         partial_inplace, and set the src_mask to 0x1fffff.
7149         (alpha_ecoff_get_relocated_section_contents): Remove unused
7150         variable gp_warned.
7151         (alpha_convert_external_reloc): New static function.
7152         (alpha_relocate_section): New static function.
7153         (alpha_ecoff_backend_data): Initialize relocate_section field.
7154         * coff-mips.c (mips_relocate_refhi): New static function.
7155         (mips_relocate_section): New static function.
7156         (mips_ecoff_backend_data): Initialize relocate_section field.
7157
7158         * reloc.c (_bfd_relocate_contents): Corrected signed overflow
7159         checking when there is an addend.
7160
7161         * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
7162         a non a.out file, just pass it to _bfd_default_link_order.
7163         (aout_link_input_section_std): When doing a final PC relative link
7164         against a section symbol, subtract the VMA of the input section.
7165         (aout_link_input_section_ext): Likewise.
7166
7167         * linker.c (default_indirect_link_order): Renamed from
7168         _bfd_generic_indirect_link_order and made static.
7169         (_bfd_generic_final_link): Don't switch on link_order type, just
7170         call _bfd_default_link_order.
7171         (_bfd_default_link_order): Handle bfd_indirect_link_order type.
7172         * genlink.h: Removed declaration of
7173         _bfd_generic_indirect_link_order.
7174         * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
7175         type, just call _bfd_default_link_order.
7176
7177 Tue Jan  4 21:23:37 1994  Ian Lance Taylor  (ian@cygnus.com)
7178
7179         * linker.c (generic_link_check_archive_element): Base the name of
7180         the created common section on the name of the section the symbol
7181         came from.
7182         (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
7183         must have a section, so don't bother to create one.
7184
7185 Mon Jan  3 15:32:16 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
7186
7187         * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
7188         * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
7189         If the DYNAMIC flag is set, set it in the exec header.
7190         * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
7191         dynamically linked, set the DYNAMIC flag in the BFD.
7192         * libaout.h (N_SET_DYNAMIC): New macro.
7193         (N_DYNAMIC): Add missing 0 in mask.
7194
7195 Mon Jan  3 11:41:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7196
7197         * ecoff.c (ecoff_get_extr): Don't output section symbols as
7198         external symbols.
7199
7200         * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
7201         to unsigned int, because size_t may not be defined in bfd.h.
7202         * bfd-in2.h: Rebuilt.
7203
7204         * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
7205         be a const pointer.
7206         * bfd-in2.h: Rebuilt.
7207         * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
7208         be a const pointer.
7209         * targets.c (bfd_target): Change swap function pointers
7210         accordingly.
7211         * archive.c (do_slurp_coff_armap): Change swap accordingly.
7212         * aix386-core.c: Change NO_GET and NO_GETS accordingly.
7213         * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
7214         ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
7215         accordingly.
7216
7217         * libbfd-in.h (struct artdata): Added tdata field.
7218         (_bfd_add_bfd_to_archive_cache): Declare.
7219         (_bfd_get_elt_at_filepos): Declare.
7220         (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
7221         * libbfd.h: Rebuilt.
7222         * archive.c: Cleaned up some more.
7223         (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
7224         pointer elements of artdata.
7225         (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
7226         (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
7227         (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
7228         (get_extended_arelt_filename, bfd_construct_extended_name_table,
7229         bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
7230         * ecoff.c: Some comment changes.
7231         (ecoff_slurp_armap): Handle rename of snarf_ar_hdr.  Set
7232         ardata->tdata to raw_armap.
7233         (ecoff_archive_p): Initialize pointer elements of artdata.
7234         * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
7235         add_bfd_to_cache.
7236
7237         * hash.c: Added some documentation.
7238
7239 Mon Jan  3 11:09:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
7240
7241         * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
7242         and do the swapping here rather than calling ntohl from the N_*
7243         macros.  This cleans up assumptions about the size of a host long,
7244         the existence to ntohl, etc.
7245
7246 Sat Jan  1 13:50:05 1994  Rob Savoye  (rob@darkstar.cygnus.com)
7247
7248         * config.bfd: Add support for VSTa micro-kernel. It currently uses
7249         i386-aout.
7250
7251 Sat Jan  1 10:18:54 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
7252
7253         * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
7254         * i386mach3.c (SEGMENT_SIZE): Fix value.
7255
7256 Fri Dec 31 16:23:43 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7257
7258         Minor cleanups suggested by CodeCenter.
7259         * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
7260         linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
7261         appropriate.
7262         * aoutx.h (struct external_exec): Removed unnecessary declaration.
7263         (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
7264         (adjust_z_magic): Removed useless variable data_vma.
7265         (stringtab_init): Initialize hash_zero.
7266         (add_to_stringtab): Removed unused fourth argument.
7267         (NAME(aout,swap_std_reloc_out)): Removed useless variable
7268         r_addend.
7269         (aout_link_input_section): Added some casts.
7270         * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
7271         bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
7272         Minor code rewriting to make it more C like.
7273         (do_slurp_bsd_armap): Added some casts.
7274         * ecoff.c (ecoff_write_object_contents): Removed useless variable
7275         scn_base.
7276         (ecoff_write_armap): Added some casts.  Use "" rather than "\0".
7277         * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
7278         * libaout.h (struct internal_exec): Removed unnecessary
7279         declaration.
7280         * linker.c (_bfd_generic_indirect_link_order): Added a cast.
7281         * opncls.c (new_bfd): Removed a cast.
7282         * reloc.c (bfd_generic_get_relocated_section_contents): Added
7283         some casts.
7284         * srec.c (internal_srec_write_object_contents): Removed useless
7285         variable bytes_written.
7286
7287 Fri Dec 31 11:46:13 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
7288
7289         * i386mach3.c (N_TXTADDR): Don't define after all.
7290         (TEXT_START_ADDR): Don't include exec header size in value.
7291
7292 Thu Dec 30 15:47:54 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
7293
7294         * i386mach3.c (N_TXTADDR): Define.
7295
7296 Thu Dec 30 13:37:24 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7297
7298         Extensive changes to move the bulk of the linker into BFD so that
7299         more efficient backend code can be written for specific object
7300         files.  Only existing efficient backend is a.out.
7301         * seclet.c, seclet.h: Removed.
7302         * hash.c, linker.c, genlink.h: New files.
7303         * bfd-in.h: Removed bfd_error_vector.  Declared hash table
7304         structures and functions.
7305         (JUMP_TABLE): Removed bfd_seclet_link, added
7306         bfd_link_hash_table_create, bfd_link_add_symbols and
7307         bfd_final_link.
7308         * All backends: Changed accordingly.
7309         * bfd-in2.h: Rebuilt.
7310         * bfd.c (struct _bfd): Added link_next and archive_pass fields.
7311         Removed ld_symbols field.
7312         (bfd_nonrepresentable_section, bfd_undefined_symbol,
7313         bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
7314         bfd_error_vector): Removed.
7315         (bfd_default_error_trap, bfd_error_trap,
7316         bfd_error_nonrepresentabltrap): Removed.
7317         (bfd_get_relocated_section_contents): Pass link_info.  Pass
7318         link_order instead of seclet.  Pass symbols.
7319         (bfd_relax_section): Pass link_info.
7320         (bfd_seclet_link): Removed.
7321         (bfd_link_hash_table_create, bfd_link_add_symbols,
7322         bfd_final_link): New macros.
7323         * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
7324         alloca as __builtin_alloca.  Declare internal linking functions.
7325         * libbfd.h: Rebuilt.
7326         * libbfd.c (bfd_seek): Comment out fseek assertion.  It's worked
7327         for months.
7328         * reloc.c (reloc_howto_type): Added error_message argument to
7329         special_function field.  Changed all callers and all definitions.
7330         (bfd_get_reloc_size): Make argument a const pointer.
7331         (bfd_perform_relocation): Add error_message argument to hold
7332         string set if return value if bfd_reloc_dangerous.  Changed all
7333         callers.
7334         (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
7335         * section.c (asection): Renamed seclets_head and seclets_tail to
7336         link_order_head and link_order_tail.
7337         * targets.c (bfd_target): Replaced seclet argument with link_info
7338         and link_order and symbols arguments in
7339         bfd_get_relocated_section_contents.  Added symbols argument to
7340         bfd_relax_section.  Removed bfd_seclet_link.  Added
7341         bfd_link_hash_table_create, bfd_link_add_symbols and
7342         bfd_final_link.
7343         * libaout.h (struct aoutdata): Added external_syms,
7344         external_sym_count, external_strings, sym_hashes fields.
7345         (obj_aout_external_syms, obj_aout_external_sym_count,
7346         obj_aout_external_strings, obj_aout_sym_hashes): New accessor
7347         macros.
7348         (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
7349         * aoutx.h: Wrote new back end linker routines.
7350         (translate_to_native_sym_flags): Return boolean value.  Don't use
7351         bfd_error_vector.
7352         (NAME(aout,write_syms)): Return boolean value.  Check return value
7353         of translate_to_native_sym_flags and bfd_write.
7354         * aout-target.h (final_link_callback): New function.
7355         (MY_bfd_final_link): New function.
7356         * aout-adobe.c (aout_adobe_write_object_contents): Check return
7357         value of aout_32_write_syms.
7358         * hp300hpux.c (MY(write_object_contents)): Likewise.
7359         * i386lynx.c (WRITE_HEADERS): Likewise.
7360         * libaout.h (WRITE_HEADERS): Likewise.
7361         * bout.c: Changed functions to use link_info->callbacks rather
7362         than bfd_error_vector, and link_orders rather than seclets.
7363         * coff-alpha.c: Likewise.
7364         * coff-h8300.c: Likewise.
7365         * coff-h8500.c: Likewise.
7366         * coff-sh.c: Likewise.
7367         * coff-z8k.c: Likewise.
7368         * elf32-hppa.c: Likewise.
7369         * reloc16.c: Likewise.
7370         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
7371         up _gp in the hash table rather than in outsymbols.
7372         * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
7373         argument rather than printing them.
7374         * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
7375         link_order arguments rather than seclet.  Changed all uses and
7376         definitions.
7377         (bfd_coff_reloc16_estimate): Pass link_info arguments.  Changed
7378         all uses and definitions.
7379         * libcoff.h: Rebuilt.
7380         * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
7381         not by ECOFF, make it scAbs.
7382         (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
7383         rewritten.
7384         * elf32-mips.c (mips_elf_final_link): Renamed from
7385         mips_elf_seclet_link and rewritten.
7386         * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
7387         field.
7388         (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
7389         hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
7390         Added link_info arguments.  Changed all callers.
7391         * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
7392         not NULL.
7393         * oasys.c (oasys_write_sections): Return boolean value rather than
7394         using bfd_error_vector.
7395         (oasys_write_object_contents): Check return value of
7396         oasys_write_sections.
7397         * hosts/std-host.h: Don't declare qsort or strtol.
7398         * Makefile.in: Rebuild dependencies.
7399         (BFD_LIBS): Removed seclet.o.  Added hash.o and linker.o.
7400         (CFILES): Removed seclet.c.  Added hash.c and linker.c.
7401         (HFILES): Removed seclet.h.  Added genlink.h.
7402
7403 Thu Dec 30 07:41:36 1993  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
7404
7405         * section.c (bfd_get_section_contents):  Return zero filled buffer
7406         if section has no contents.
7407
7408 Tue Dec 28 12:43:54 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7409
7410         * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
7411         then skip bfd_perform_relocation even if the addend is non-zero.
7412
7413 Tue Dec 21 09:22:19 1993  Ken Raeburn  (raeburn@rtl.cygnus.com)
7414
7415         * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
7416         addend to r_offset field.
7417
7418         * Makefile.in (CFILES): Added coff-sparc.c.  Rebuild dependencies.
7419
7420         * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
7421         CALC_ADDEND): Define.
7422
7423         * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
7424         the offsetof because AIX /bin/cc does not like to take the address
7425         of an array.  (From Minh Tran-Le.)
7426
7427 Thu Dec 16 13:06:32 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7428
7429         * Thu Dec 16 15:41:06 1993  Peter Hoogenboom  (hoogen@cs.utah.edu)
7430
7431         * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
7432         the return pointer into %r2 if no jump-in-call-delay-slot
7433         optimization was done.
7434
7435         * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
7436
7437 Wed Dec 15 08:04:16 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
7438
7439         * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
7440
7441         * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
7442         (HOST_SEGMENT_SIZE): Set to 0 for same reason.
7443
7444         * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
7445         (TEXT_START_ADDR): Correct.
7446         (MY_backend_data): Define.
7447
7448         * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
7449         New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
7450
7451 Tue Dec 14 21:48:33 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7452
7453         * som.c (som_begin_writing): Fix thinkos in auxiliary header
7454         support.
7455         (bfd_som_attach_aux_hdr): Likewise.
7456
7457 Mon Dec 13 23:34:48 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7458
7459         * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
7460         selectors for PIC code.
7461
7462         * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
7463         (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
7464         relocations needed by PIC.
7465
7466 Tue Dec  7 15:47:51 1993  Stu Grossman  (grossman at cygnus.com)
7467
7468         * nlmcode.h:  Fixes to avoid compiler warnings...
7469
7470 Tue Dec  7 15:10:54 1993  Ian Lance Taylor  (ian@cygnus.com)
7471
7472         * libnlm.h (nlm_backend_data): Removed macro definition.
7473         (nlm_alpha_backend_data): Adjusted accordingly.
7474
7475 Sun Dec  5 19:32:08 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7476
7477         * som.c (som_begin_writing): Flesh out code for handling simple
7478         auxiliary headers.
7479         (bfd_som_attach_aux_hdr): New function.
7480
7481         * som.h (struct somdata): Add fields for attaching version and
7482         copyright headers.  Add accessor macros.
7483
7484         * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
7485         definitions for old versions of HPUX which fail to define them.
7486         (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
7487         now that they're safe.  Delete bogus R_STATEMENT relocations.
7488
7489         * som.c (som_hppa_howto_table): Add missing R_END_TRY.  Delete 
7490         extra R_DATA_OVERRIDE.
7491         (hppa_som_gen_reloc_type): Generate a relocation for the rounding
7492         mode selector if needed.
7493         (som_write_fixups): Handle requests for a change in the default
7494         rounding mode.  Rounding modes do not consume input bytes, but
7495         are just markers much like R_ENTRY and R_EXIT.
7496
7497 Sat Dec  4 19:40:32 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7498
7499         Fri Dec  3 09:55:17 1993  Pete Hoogenboom  (hoogen@cs.utah.edu)
7500
7501         * elf32-hppa.c: (hppa_elf_reloc):  Do not do code reordering when
7502         the branch instruction as originally been nullified.
7503         hppa_elf_reloc):  Avoid useless call to bfd_put_32 () in the
7504         case of no code reordering due to an LDO instruction in the
7505         delay slot of the branch.  Make sure to relocate the correct
7506         instruction.  Do not perform instruction reordering for millicode
7507         calls.
7508         (hppa_elf_build_arg_reloc_stub):  Change the relocation type
7509         to R_HPPA_STUB_CALL_17 when special processing might be needed.
7510         (hppa_elf_build_long_branch_stub): Prevent code reordering on
7511         a call from a linker stub to another linker stub and for millicode
7512         calls.  Do not trash the return register for calls from one linker
7513         stub to a second linker stub.
7514
7515         * elf32-hppa.c: (elf_hppa_howto_table):  PLABEL and DLT
7516         relocations are not pc-relative.
7517
7518         * hppa_stubs.h: (BLE_N_XXX_0_31):  New instruction used in
7519         linker stub code. 
7520         (COPY_2_31):  Likewise.
7521
7522 Fri Dec  3 18:40:58 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7523
7524         * config/solaris2.mh (HDEFINES): Remove -Dconst=
7525         * hosts/solaris.h: If not __GNUC__, define const as empty.
7526
7527 Thu Dec  2 15:43:32 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7528
7529         * ecoff.c: Added various casts for 32/64 bit cross targeting.
7530         (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
7531         section so that the linker ignores it.
7532         * ecofflink.c: Added various casts for 32/64 bit cross targeting.
7533         (ecoff_add_bytes): Changed need argument to size_t.
7534         (bfd_ecoff_debug_link_other): Check return value of
7535         ecoff_add_string.
7536
7537         * libbfd-in.h (new_bfd): Use void rather than an empty parameter
7538         list.
7539         * libbfd.h: Rebuilt.
7540
7541         * libnlm.h (struct nlm_obj_tdata): New field backend_data.
7542         (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
7543         (struct nlm_backend_data): New field no_uninitialized_data.
7544         (nlm_no_uninitialized_data): New accessor macro.
7545         * nlmcode.h (nlm_compute_section_file_positions): Handle
7546         no_uninitialized_data.
7547         (nlm_external_reloc_compare): Sort relocs by address for a
7548         particular symbol, to make the sort more stable.
7549         (nlm_write_object_contents): Cast the arguments to qsort.  Get the
7550         value of a debugging symbol the same way we get the value of a
7551         normal symbol.
7552         * nlm32-alpha.c: Various changes.  Write out GP and .lita relocs.
7553         Set no_uninitialized_data to true.
7554         * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
7555         (nlm32_sparc_backend): Set no_uninitialized_data field false.
7556         * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
7557         before filling it in.
7558
7559 Wed Dec  1 21:47:58 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7560
7561         * som.c (som_section_type, som_decode_symcalss): New functions.
7562         (som_get_symbol_info): Use them.
7563         (som_slurp_symbol_table): Set the section of common and undefined
7564         symbols correctly.
7565
7566 Wed Dec  1 14:15:10 1993  Ken Raeburn  (raeburn@cygnus.com)
7567
7568         * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
7569         make gcc happy.
7570
7571         * mipsbsd.c: Changes from Ralph Campbell:
7572         (mips_howto_table_ext): MIPS_RELOC_LO16 should use
7573         complain_overflow_dont.
7574         (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
7575         make gdb happy.
7576
7577         * bfd.c (bfd_errmsgs): Reword invalid-target message.
7578
7579         * config.bfd: For sparc*-*-coff, use sparc-coff.
7580         * configure.in: Handle sparccoff_vec.
7581         * targets.c (sparccoff_vec): Declare.
7582
7583         * reloc.c (bfd_get_reloc_size): New function.
7584         (struct reloc_howto_type): Update documentation of size field.
7585
7586 Wed Dec  1 14:39:05 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7587
7588         * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
7589         * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
7590         * config/alpha-nlm.mt: New file.
7591         * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
7592         nlm32.o, and nlm.o.
7593         * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
7594         (CFILES): Added nlm32-alpha.c.
7595         Rebuilt dependencies.
7596         * targets.c (nlm32_alpha_vec): Declare.
7597
7598         * libnlm.h (struct nlm_backend_data): New fields
7599         optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
7600         nlm_set_public_section, nlm_get_public_offset.  Removed unused
7601         nlm_write_reloc field.  Changed nlm_write_import to remove
7602         unnecessary symbol argument.  Renamed nlm_write_externals to
7603         nlm_write_external, and changed cound argument from bfd_vma to
7604         bfd_size_type.
7605         (nlm_optional_prefix_size, nlm_backend_object_p_func,
7606         nlm_write_prefix_func, nlm_set_public_section_func,
7607         nlm_get_public_offset_func): New accessor macros.
7608         (nlm_write_reloc_func): Removed.
7609         (nlm_write_external_func): Adjusted for field renaming.
7610         * nlm32-i386.c (nlm_i386_write_import): Renamed from
7611         nlm_i386_write_reloc.  Removed old nlm_i386_write_import which
7612         just called old nlm_i386_write_reloc.
7613         (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
7614         Declared.  Changed second argument from bfd_vma to bfd_size_type.
7615         (nlm32_i386_backend): Adjusted for changes to fields and names.
7616         * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
7617         ifdeffed out code.
7618         (nlm_sparc_write_import): Removed second argument.
7619         (nlm_sparc_write_external): Renamed from
7620         nlm_sparc_write_externals.  Changed second argument from bfd_vma
7621         to bfd_size_type.
7622         (nlm32_sparc_backend): Adjusted for changes to fields and names.
7623         * nlmcode.h: Removed some unused code.
7624         (nlm_object_p): Don't destroy tdata pointer.  Call
7625         backend_object_p function if it exists.
7626         (nlm_slurp_symbol_table): Removed unused variable rcount.  Call
7627         set_public_section_func if it exists instead of checking
7628         NLM_HIBIT.
7629         (nlm_compute_section_file_positions): Account for
7630         optional_prefix_size.
7631         (nlm_write_object_contents): Account for optional_prefix_size.
7632         Removed useless variable write_reloc_func.  Changed declaration
7633         and call of write_import_func.  Call write_prefix_func if it
7634         exists.  Removed unused variables len and temp.  Call
7635         get_public_offset_func if it exists rather than setting NLM_HIBIT.
7636         * nlmswap.h: Declare functions.
7637
7638         * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
7639         for clarity.
7640         (fprintf_vma, sprintf_vma): Use %lx, not %x.
7641         * bfd-in2.h: Rebuilt.
7642         * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
7643         to unsigned long.
7644
7645         * config.bfd: Don't set target64 here, as the setting is ignored.
7646         * configure.in (ecoffalpha_little_vec): Set target64.
7647
7648         * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
7649         in TDEFINES is wrong.
7650
7651         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
7652         Remove unused variable output_section.
7653
7654 Tue Nov 30 16:45:23 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7655
7656         * irix-core.c: New file for Irix 4 and Irix 5 core support.
7657         Functions taken out of coff-mips.c.  Handle vmap type VMAPFILE.
7658         * coff-mips.c: Irix 4 core file support moved to irix-core.c.
7659         * targets.c: If IRIX_CORE defined, include irix_core_vec in
7660         target_vector.
7661         * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
7662         (HDEPFILES): Define to be irix-core.o.
7663         * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
7664         (HDEPFILES): Define to be irix-core.o.
7665         * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o.  Removed
7666         sco-core.o, which no longer exists.
7667         (CFILES): Added all *-core.c files.
7668         Rebuilt dependencies.
7669
7670 Wed Nov 24 02:02:41 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7671
7672         * elfcode.h (map_program_segments): Restore check of file_size !=
7673         mem_size, but only if SHT_PROGBITS.
7674
7675         * ecofflink.c: New file to hold ECOFF debug information linking
7676         routines.
7677         * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
7678         ecoff_add_string, ecoff_get_debug): Removed.  Functionality now in
7679         ecofflink.c.
7680         (ecoff_get_extr, ecoff_set_index): New functions.
7681         (ecoff_slurp_symbolic_info): Don't save raw_size.
7682         (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
7683         (ecoff_compute_section_file_positions): Don't set EXEC_P just
7684         because there is a start address.
7685         (ecoff_write_object_contents): Handle external symbols here.  Use
7686         ecofflink.c functions to write out debugging information.
7687         * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
7688         mips_elf_set_index): New functions.
7689         (mips_elf_seclet_link): Discard empty sections, the .options
7690         section and .gptab sections.  Handle linking .mdebug section.
7691         * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
7692         * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
7693         * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
7694         called by gas, so they are public).
7695         * bfd-in2.h: Rebuilt.
7696         * Makefile.in (BFD_LIBS): Added ecofflink.o.
7697         (CFILES): Added ecofflink.c.
7698         (ecofflink.o): New target.  Rebuilt dependencies.
7699
7700 Mon Nov 22 22:26:42 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7701
7702         * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
7703         a valid magic number if it's been defined.
7704
7705 Mon Nov 22 14:17:36 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7706
7707         * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
7708         no longer requires it.
7709         (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
7710         ecoff_write_object_contents): Don't treat .scommon section
7711         specially.
7712
7713 Mon Nov 22 10:54:27 1993  Fred Fish  (fnf@cygnus.com)
7714
7715         Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
7716         * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
7717         * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
7718         * bfd/ptrace-core.c:  New file for dealing with core files with
7719         start with the ptrace_user structure found on BCS compliant systems.
7720         * bfd/targets.c (ptrace_core_vec):  New vector.
7721
7722 Mon Nov 22 02:33:12 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7723
7724         * Minimal support for reading SOM fixup streams.  Allows
7725         objdump -r to do something reasonable.
7726         * som.c (som_get_reloc_upper_bound): Implement.
7727         (som_canonicalize_reloc): Implement.
7728         (som_set_reloc_info, som_slurp_reloc_table): New functions.
7729
7730 Sun Nov 21 13:46:55 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
7731
7732         * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
7733         * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
7734
7735 Fri Nov 19 14:34:04 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7736
7737         * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
7738         signed_value before sign extending it.  Don't subtract out
7739         reloc_entry->address.  This makes it compatible with what gas is
7740         generating.
7741
7742         * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
7743         SHT_NOBITS sections.
7744         (map_program_segments): Don't leave the loop after the first
7745         SHT_NOBITS section.
7746         (assign_file_positions_except_relocs): Only force sh_offset and
7747         sh_addr to match modulo maxpagesize for a section which is not
7748         SHT_NOBITS.  Changed the method used to force page alignment after
7749         a SHT_NOBITS section to only do it for the last such consecutive
7750         section, and to really force page alignment.
7751
7752 Fri Nov 19 04:02:01 1993  Ken Raeburn  (raeburn@cambridge.cygnus.com)
7753
7754         * coffcode.h (coff_slurp_symbol_table): Print more verbose message
7755         in the case of an unknown (or unhandled) storage class.
7756
7757         * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
7758         not be defined here, since it is a host attribute, not a target
7759         one.
7760         * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
7761
7762         * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
7763         defined.
7764
7765         * coff-sparc.c: Define some relocations, based on ELF relocations.
7766         (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
7767         struct coff_reloc_map, sparc_reloc_map,
7768         coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
7769         elf.c, renamed.
7770         (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
7771         (rtype2howto): Index into coff_sparc_howto_table using
7772         dst->r_type.
7773
7774 Thu Nov 18 11:45:39 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7775
7776         * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
7777         * configure.host (mips-sgi-irix5*) New host; use irix5 (no
7778         hosts/irix5.h created; just use std-host.h).
7779         * config/irix5.mh: New file; like irix4.mh, but don't use -G or
7780         -lmalloc.
7781         * Makefile.in: Rebuilt dependencies.
7782
7783         * ecoffswap.h: Changed type of internal pointers for swap out
7784         functions to const *.
7785
7786         * elf32-mips.c (mips_elf_got16_reloc): New function.  Handle GOT16
7787         correctly for assembler, but linker support not implemented.
7788         (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
7789         (mips_elf_sym_is_global): New function; at least on Irix 5, all
7790         non section symbols are considered global.
7791         (elf_backend_sym_is_global): Define.
7792         (mips_elf_final_write_processing): New function.  Set the MIPS
7793         architecture level correctly.
7794         (elf_backend_final_write_processing): Define.
7795         (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
7796         (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
7797         section to 1.  Handle .options section.
7798         (mips_elf_acom_section, mips_elf_acom_symbol,
7799         mips_elf_acom_symbol_ptr): New static variables, used to build a
7800         generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
7801         (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
7802         putting them all in a global .acommon section.
7803
7804         * elfcode.h (bfd_section_from_shdr): Don't dump core if target
7805         section has no ELF section data.
7806         (elf_make_sections): Set addralign of reloc section to 4.
7807         (elf_fake_sections): Likewise.
7808         (map_program_segments): Don't consider section 0.
7809         (assign_file_positions_except_relocs): Don't consider section 0.
7810         In the main loop, skip the symtab and strtab sections, since their
7811         positions are set elsewhere.
7812         (swap_out_syms): Set addralign of symtab section to 4.  Set
7813         addralign of strtab sections to 1.
7814         (assign_file_positions_for_relocs): Don't consider section 0.
7815         (write_object_contents): Don't write out section 0.
7816
7817         * libelf.h (struct elf_backend_data): Added fields
7818         elf_backend_sym_is_global and elf_backend_final_write_processing.
7819         * elf32-target.h (elf32_bed): Added corresponding initializers.
7820         * elf64-target.h (elf64_bed): Likewise.
7821         * elfcode.h (sym_is_global): Take abfd argument.  Call
7822         elf_backend_sym_is_global if it is not NULL.
7823         (elf_map_symbols): Pass abfd to sym_is_global.
7824         (write_object_contents): Call elf_backend_final_write_processing
7825         if it is defined.
7826
7827 Wed Nov 17 18:43:28 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7828
7829         * libecoff.h: Include coff/ecoff.h.
7830         (struct ecoff_backend_data): Move external debugging information
7831         fields into a single field pointing to an ecoff_debug_swap
7832         structure.
7833         (ecoff_data_type): Move debugging information fields into a single
7834         field pointing to an ecoff_debug_info structure.
7835         * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
7836
7837 Wed Nov 17 17:38:58 1993  Sean Eric Fagan  (sef@cygnus.com)
7838
7839         * nlmswap.h: New file to swap fixed header.  Included by NLM
7840         backends.
7841         * libnlm.h (struct reloc_and_sec): Define.
7842         (struct nlm_backend_data): Add fields fixed_header_size,
7843         nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
7844         nlm_swap_fhdr_out.
7845         (nlm_fixed_header_size, nlm_read_import_func,
7846         nlm_write_import_func, nlm_swap_fixed_header_in_func,
7847         nlm_swap_fixed_header_out_func, nlm_write_external_func): New
7848         accessor macros.
7849         * nlmcode.h: Use new functions.
7850         * nlm32-i386.c: Provide new functions.
7851         * nlm32-sparc.c: New file; SPARC NLM backend.
7852
7853 Wed Nov 17 13:56:10 1993  Stan Shebs  (shebs@rtl.cygnus.com)
7854
7855         * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
7856         garbage bits appearing in the upper end of symbolnums.
7857
7858         * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
7859
7860 Tue Nov 16 17:03:41 1993  Stu Grossman  (grossman at cygnus.com)
7861
7862         * lynx-core.c (lynx_core_file_p):  Change bfd_zalloc to bfd_alloc.
7863         * m68klynx.c:  Define core file macros.
7864         * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h:  Move all
7865         non-architecture specific stuff into lynx.h.
7866
7867 Tue Nov 16 15:45:54 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
7868
7869         * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
7870         change PAGE_SIZE to 4096.
7871
7872 Mon Nov 15 11:48:08 1993  Ken Raeburn  (raeburn@rtl.cygnus.com)
7873
7874         * Makefile.in (diststuff): New target.
7875
7876         * VERSION: Updated.
7877
7878 Sun Nov 14 23:33:01 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7879
7880         * som.c (som_object_setup): Do not create dummy ".text", ".data",
7881         and ".bss" sections.
7882         (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
7883         is zero.  Recognize BSS type sections and turn off SEC_LOAD and
7884         SEC_DATA (so binutils/size works).  Set the correct value for
7885         a section's _raw_size.
7886         (som_slurp_symbol_table): Program entry points, and millicode are
7887         also functions.  Mark them as such.  Also mark L$* symbols as
7888         debugging symbols.
7889
7890         * bfd-in2.h: Rebuilt.
7891
7892 Sat Nov 13 15:27:15 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7893
7894         * som.c (som_bfd_reloc_type_lookup): Add missing prototype.  Returns
7895         a pointer to constant data.  Delete bogus #define which made the 
7896         function useless.
7897
7898         * som.c (som_prep_for_fixups): New function.
7899         (som_write_fixups): New function.
7900         (som_write_space_strings): New function.
7901         (som_write_symbol_strings): New function.
7902         (som_begin_writing): New function.
7903
7904 Fri Nov 12 15:29:36 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7905
7906         * som.c (som_write_object_contents): Do not abort.  Flesh out.
7907         (som_set_section_contents): Do not abort.  Flesh out.
7908
7909         * som.c (som_write_headers): New function.
7910         (som_prep_headers): New function.
7911         (som_build_and_write_symbol_table): New function.
7912
7913         * som.c (som_sizeof_headers): Add missing prototype.
7914         (som_set_arch_mach): Do not abort.
7915
7916         * som.c (som_count_spaces): New function.
7917         (som_count_subspaces): New function.
7918         (compare_syms): New function.
7919         (som_compute_checksum): New function.
7920
7921         * som.c (hppa_som_gen_reloc_type): New function.
7922         (som_bfd_reloc_type_lookup): New function.
7923
7924         * som.c (try_prev_fixup): New function.
7925         (som_reloc_skip): New function.
7926         (som_reloc_addend): New function.
7927         (som_reloc_call): New function.
7928
7929         * som.c (som_initialize_reloc_queue): New function.
7930         (som_reloc_queue_insert): Likewise.
7931         (som_reloc_queue_fix): Likewise.
7932         (som_reloc_queue_find): Likewise.
7933
7934         * som.c (som_hppa_howto_table): SOM howto relocation table.
7935         (hppa_som_reloc): New function.
7936
7937         * som.c (struct reloc_queue): New structure to keep track of
7938         the last four multibyte relocations emitted.
7939         (enum pa_symbol_type): Type to fully describe the symbol types
7940         associated with .import/.export assembler directives.
7941
7942         * som.c: Include libhppa.h
7943
7944         * som.c (bfd_som_set_section_attributes): New function.
7945         (bfd_som_set_subsection_attributes): Likewise.
7946         (bfd_som_set_symboL_type): Likewise.
7947         (bfd_som_attach_unwind_info): Likewise.
7948         * som.h: Declare new exported functions.
7949
7950         * som.h (struct som_symbol): Add new fields to hold additional
7951         information needed to build/write symbol tables and fixup streams.
7952         (struct som_section_data_struct): Add new fields to hold additional
7953         information needed to build/write space and subspace headers.
7954         (som_symbol_data): New accessor macro for SOM symbol information.
7955         (R_HPPA_*): Basic relocation types to be used by the assembler.
7956
7957 Fri Nov 12 11:00:28 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
7958
7959         * trad-core.c (trad_unix_core_file_p): If new hook
7960         TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
7961         corefile being too big.
7962         * hosts/i386sco.h: Define it.
7963
7964 Thu Nov 11 15:16:28 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
7965
7966         * bfd.c (struct _bfd): Add hppabsd_core_data.
7967         * targets.c (target_vector): Add hppabsd_core_vec.
7968         * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
7969         section is encountered during core section scanning.
7970         * hppabsd-core.c: New file.
7971         * config/hppabsd.mh: Enable HPPA BSD core files.
7972
7973         * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud.  Remove code
7974         which is either commented out or ifdef'd out.  Add, update and
7975         clean comments.  Fix various indention and spacing problems.  Handle
7976         problems related to using "ble" to jump to a stub rather than "bl"
7977         (%r31 is trashed by "ble", but not by "bl").
7978         (NEW_INSTRUCTION): Put inside curly braces.
7979         (CURRENT_STUB_OFFSET): Fix indention problems.
7980         (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
7981         Add, update and clean comments.  Handle "ble" %r31 lossage problems.
7982         (hppa_elf_build_long_branch_stub): Likewise.
7983         (hppa_look_for_stubs_in_section): Likewise.
7984         (hppa_elf_stub_check): Remove obsolete function.
7985
7986         * hppa_stubs.h: Add new instructions to deal with %r31 lossage
7987         problems.  Delete unused instructions.
7988         
7989 Tue Nov  9 11:40:27 1993  Stan Shebs  (shebs@rtl.cygnus.com)
7990
7991         * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
7992
7993 Tue Nov  9 11:26:05 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7994
7995         * elfcode.h (elf_object_p): Rather than looking through an array
7996         of architectures, get the ELF EM_xxx code from the backend
7997         information.  Let the generic ELF target match any EM_xxx code not
7998         matched by another ELF target.  Call elf_backend_object_p to let
7999         the backend do more checks and set global information.
8000         * libelf.h (struct elf_backend_data): Added elf_machine_code and
8001         elf_backend_object_p fields.
8002         (struct bfd_elf_arch_map): Removed.
8003         (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
8004         * elf32-target.h, elf64-target.h: Initialize elf_machine_code
8005         field with ELF_MACHINE_CODE.  Initialize elf_backend_object_p
8006         field with elf_backend_object_p (if it is defined).
8007         * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
8008         elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
8009         elf64-gen.c (ELF_MACHINE_CODE): Defined.
8010         * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
8011         routines.
8012         (mips_elf_object_p): Set the right machine number.
8013         (mips_elf_ecoff_debug_swap): Defined.
8014         (elf_backend_object_p): Defined to be mips_elf_object_p.
8015         (elf_backend_ecoff_debug_swap): Defined to be
8016         mips_elf_ecoff_debug_swap.
8017         * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
8018
8019         * libbfd-in.h (target_vector, default_vector): Declare.
8020         * libbfd.h: Rebuilt.
8021         * format.c (target_vector, default_vector): Don't declare.
8022
8023         * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
8024         for R_MIPS_26.  Correct overflow detection requires matching the
8025         upper four bits of the destination against the PC.  From Ted Lemon
8026         <mellon@pepper.ncd.com>.
8027
8028         * bout.c (b_out_reloc_type_lookup): Return type should point to
8029         const data.
8030         * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
8031         * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
8032         * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
8033         * coff-i386.c (coff_i386_reloc): Made howto const.
8034         * oasys.c (oasys_write_data): Made how const.
8035
8036         * libelf.h: Added some comments.
8037         (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
8038         field.  Removed unused write_relocs field.
8039         * elf32-target.h: Adjusted elf_backend_data initialization
8040         accordingly.
8041         * elf64-target.h: Corrected elf_backend_data initialization to
8042         fill in all fields and to set elf_64_p to 1.
8043
8044 Mon Nov  8 18:13:14 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8045
8046         * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
8047         to filepos in SHT_STRTAB case.
8048         (assign_file_position_for_section): Set BFD section filepos as
8049         well as ELF section sh_offset.
8050
8051         * reloc.c: Use const instead of CONST.
8052         (bfd_perform_relocation): Make variable howto a const pointer.
8053         * bfd-in2.h, libbfd.h: Rebuilt.
8054
8055 Mon Nov  8 12:19:15 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
8056
8057         * Makefile.in (realclean): Don't remove generated headers.  Reverts
8058         change of 2 Jul 1993.
8059
8060 Mon Nov  8 06:08:31 1993  D. V. Henkel-Wallace  (gumby@cirdan.cygnus.com)
8061
8062         * configure.bfd: make unixware equivalent to sysv4.
8063
8064         * config/i386-nlm.mt: bring in elf config; make it the default.
8065
8066 Sun Nov  7 20:21:38 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
8067
8068         * libbfd.c (bfd_put_8): Add parens around reference to "val"
8069         argument.
8070
8071 Fri Nov  5 21:45:09 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
8072
8073         * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
8074         i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
8075
8076 Fri Nov  5 15:17:57 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8077
8078         * coffcode.h (coff_write_object_contents): Zero out internal_a.
8079
8080 Fri Nov  5 10:41:07 1993  David J. Mackenzie  (djm@thepub.cygnus.com)
8081
8082         * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
8083         core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
8084         section.c, syms.c, targets.c:
8085         Doc cleanup (spelling, punctuation, grammar, formatting).
8086         * bfd-in2.h, libbfd.h: Rebuild.
8087
8088 Thu Nov  4 14:46:14 1993  John Gilmore  (gnu@rtl.cygnus.com)
8089
8090         * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable):  New accessors.
8091         * bfd.c, opncls.c:  Improve comments on file descriptor cacheing.
8092
8093 Thu Nov  4 08:54:30 1993  Jeffrey A. Law  (law@snake.cs.utah.edu)
8094
8095         * From Pete Hoogenboom (hoogen@cs.utah.edu)
8096         * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
8097         in last change.  Always rebuild symbol extension section the first
8098         time though if output sections exist (fixes ld -r problems).
8099
8100 Thu Nov 04 08:08:46 1993  Jeffrey Wheat  (cassidy@cygnus.com)
8101
8102         * Makefile.in: Add .PHONY for check and installcheck rules.
8103
8104 Tue Nov  2 14:42:27 1993  Bill Cox (bill@tarkas.cygnus.com)
8105
8106         * libbfd-in.h (artdata): Use long, not time_t for portability, at
8107           least to HPUX.  File below is a derived file.
8108
8109 Tue Nov  2 14:42:27 1993  Bill Cox (bill@tarkas.cygnus.com)
8110
8111         * libbfd.h (artdata): Use long, not time_t for portability, at
8112           least to HPUX.
8113
8114 Tue Nov  2 09:32:25 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
8115
8116         * config.bfd: Use bigmips for mips*-*-bsd*.
8117
8118 Mon Nov  1 14:30:09 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8119
8120         * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
8121         Handle symbol number of zero.
8122
8123         * reloc.c (enum bfd_reloc_code_real): Added
8124         BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
8125         BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
8126         * bfd-in2.h: Rebuilt.
8127         * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
8128         BFD_RELOC_MIPS_LITERAL.
8129         * elf32-mips.c (mips_reloc_map): Handle new relocs.
8130         (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
8131         checks slightly.
8132
8133         * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
8134         MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
8135         (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
8136         MY_bfd_seclet_link): Define.
8137         (MY_bfd_reloc_type_lookup): Rename from
8138         MY_reloc_howto_type_lookup.
8139         (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
8140         (MY(vec)): Use JUMP_TABLE rather than listing functions.
8141         * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
8142         MY_canonicalize_reloc, MY_write_object_contents): Don't define in
8143         terms of MY, because that causes a recusive invocation of CAT when
8144         expanded within JUMP_TABLE, and ANSI compilers don't expand
8145         recursive macros.
8146         * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
8147         MY_reloc_howto_type_lookup, and don't define in terms of MY.
8148         (MY_canonicalize_reloc): Don't define in terms of MY.
8149         (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
8150         than listing functions.
8151
8152 Mon Nov  1 09:12:25 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
8153
8154         * config.bfd: Use m68k-elf for m68*-*-sysv4*.
8155
8156 See file ChangeLog.1
8157
8158 \f
8159 Local Variables:
8160 mode: indented-text
8161 left-margin: 8
8162 fill-column: 74
8163 version-control: never
8164 End: