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