2000-12-08 Kazu Hirata <kazu@hxi.com>
[external/binutils.git] / bfd / ChangeLog
1 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
2
3         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4           (BFD_LIBS): ...to here.
5           (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
6           (BFD_LIBS_CFILES): ...to here.
7         * Makefile.in: Regenerate.
8         * configure.in: Remove dwarf.lo from the elf shell variable.
9         * configure: Regenerate.
10         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
11         * libcoff.h: Regenerate.
12         * coffgen.c (coff_find_nearest_line): Call 
13           _bfd_dwarf2_find_nearest_line.
14         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
15           accordingly.
16           (read_abbrevs): Likewise
17           (decode_line_info): Likewise.
18           (parse_comp_unit): Likewise.
19           (comp_unit_find_nearest_line): Likewise.
20         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
21         * libbfd.h: Regenerate.
22         * elf.c (_bfd_elf_find_nearest_line): Update call.
23         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
24         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
25         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
26           (sec_to_styp_flags): Use them. Handle DWARF2 sections.
27           (styp_to_sec_flags): Handle DWARF2 sections.
28
29 2000-12-08  Kazu Hirata  <kazu@hxi.com>
30
31         * coffgen.c: Fix formatting.
32         * elf-m10300.c: Likewise.
33         * elf32-i386.c: Likewise.
34         * elf32-i960.c: Likewise.
35         * elf32-m68k.c: Likewise.
36         * elf32-mcore.c: Likewise.
37         * elf32-ppc.c: Likewise.
38         * elf32-sh.c: Likewise.
39         * elf32-sparc.c: Likewise.
40         * elf32-v850.c: Likewise.
41         * elf64-alpha.c: Likewise.
42         * elf64-hppa.c: Likewise.
43         * elf64-mips.c: Likewise.
44         * elf64-sparc.c: Likewise.
45
46 2000-12-07  Kazu Hirata  <kazu@hxi.com>
47
48         * elf32-ppc.c: Fix formatting.
49         * elf64-x86-64.c: Likewise.
50
51 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
52
53         From  Ralf Baechle  <ralf@gnu.org>
54
55         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
56         BFDs containing no sections or empty .text, .data or .bss sections
57         to be merged, regardless of their flags.
58
59 2000-12-06  Kazu Hirata  <kazu@hxi.com>
60
61         * elf32-m32r.c: Fix formatting.
62         * elf32-m68hc11.c: Likewise.
63         * elf32-m68hc12.c: Likewise.
64         * elf32-m68k.c: Likewise.
65         * elf32-mcore.c: Likewise.
66         * elf32-pj.c: Likewise.
67         * elf32-ppc.c: Likewise.
68
69 2000-12-05  Kazu Hirata  <kazu@hxi.com>
70
71         * elf32-fr30.c: Fix formatting.
72         * elf32-hppa.c: Likewise.
73         * elf32-i370.c: Likewise.
74         * elf32-i386.c: Likewise.
75         * elf32-i860.c: Likewise.
76         * elf32-i960.c: Likewise.
77
78 2000-12-03  Kazu Hirata  <kazu@hxi.com>
79
80         * elf32-arm.h: Fix formatting.
81         * elf32-avr.c: Likewise.
82         * elf32-cris.c: Likewise.
83         * elf32-d10v.c: Likewise.
84         * elf32-d30v.c: Likewise.
85         * elf-hppa.h: Likewise.
86         * elf-m10200.c: Likewise.
87         * elf-m10300.c: Likewise.
88
89 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
90
91         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
92         bfd_mach_mips32_4k.  Update FIXME comment.
93         * archures.c (bfd_mach_mips32): New constant.
94         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
95         the latter, renumber it.
96         * bfd-in2.h (bfd_mach_mips32): New constant.
97         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
98         the latter, renumber it.
99         * cpu-mips.c (I_mips32): New constant.
100         (I_mips4K, I_mips32_4k): Rename the former to the latter.
101         (arch_info_struct): Add bfd_mach_mips32 entry, replace
102         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
103         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
104         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
105         with E_MIPS_MACH_MIPS32_4K.
106         (_bfd_mips_elf_final_write_processing): Replace
107         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
108         bfd_mach_mips32 case.
109         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
110         comparison with support for MIPS32.
111         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
112         MIPS32.
113
114         * aoutx.h (NAME(aout,machine_type)): Add cases for
115         bfd_mach_mips5 and bfd_mach_mips64.
116         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
117         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
118         * cpu_mips.c (I_mips5, I_mips64): New definitions.
119         (arch_info_struct): Add entries for bfd_mach_mips5 and
120         bfd_mach_mips64.
121         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
122         _bfd_mips_elf_print_private_bfd_data): Add cases for
123         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
124         (_bfd_mips_elf_final_write_processing): Add cases for
125         bfd_mach_mips5 and bfd_mach_mips64.
126
127         * bfd/aoutx.h (NAME(aout,machine_type)): Add a
128         bfd_mach_mips_sb1 case.
129         * bfd/archures.c (bfd_mach_mips_sb1): New constant.
130         * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant.
131         * bfd/cpu-mips.c (I_sb1): New constant.
132         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
133         * bfd/elf32-mips.c (elf_mips_mach): Add case for
134         E_MIPS_MACH_SB1.
135         (_bfd_mips_elf_final_write_processing): Add case for
136         bfd_mach_mips_sb1.
137
138 2000-12-01      Joel Sherrill <joel@OARcorp.com>
139
140         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
141         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
142         (sparc*-*-rtems*): Switched from a.out to ELF.
143
144 2000-11-30  Jan Hubicka  <jh@suse.cz>
145         
146         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
147         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
148         (elf64-x86-64.lo): Add dependencies.
149         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
150         bfd_mach_x86_64_intel_syntax.
151         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
152         * config.bfd (x86_64): Add.
153         * configure.in: Add support for bfd_elf64_x86_64_vec.
154         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
155         (bfd_i386_arch, i8086_ar): Link in.
156         * elf64-x86-64.c: New file.
157         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
158         * targets.c (bfd_elf64_x86_64_vec): Add.
159         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
160
161 2000-11-30  Kazu Hirata  <kazu@hxi.com>
162
163         * xcofflink.c: Fix formatting.
164
165 2000-11-28  Kazu Hirata  <kazu@hxi.com>
166
167         * aoutx.h: Fix formatting.
168         * bfd-in.h: Likewise.
169         * bfd-in2.h: Likewise.
170         * cache.c: Likewise.
171         * cisco-core.c: Likewise.
172         * coff64-rs6000.c: Likewise.
173         * coffcode.h: Likewise.
174         * coffswap.h: Likewise.
175         * corefile.c: Likewise.
176         * elf32-mips.c: Likewise.
177
178 2000-11-27  Kazu Hirata  <kazu@hxi.com>
179
180         * aout-adobe.c: Fix formatting.
181         * coff64-rs6000.c: Likewise.
182         * coffgen.c: Likewise.
183         * cofflink.c: Likewise.
184
185 2000-11-27  Philip Blundell  <pb@futuretv.com>
186
187         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
188         (obj_coff_strings_written): New accessor macro for above.
189         * libcoff.h: Regenerate.
190         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
191         strings.
192         * coffcode.h (coff_write_object_contents): No need to write out
193         the string table if it's already been done.
194
195 2000-11-22  Philip Blundell  <pb@futuretv.com>
196
197         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to 
198         weak undefined symbols.
199
200 2000-11-24  Nick Clifton  <nickc@redhat.com>
201
202         * archures.c (bfd_mach_arm_5TE): Define.
203         (bfd_mach_arm+XScale): Define.
204         * bfd-in2.h: Regenerate.
205
206         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
207         BFD_RELOC_ARM_PCREL_BLX.
208
209         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
210         XScale machine numbers.
211
212         * config.bfd (xscale-elf): Add target.
213         (xscale-coff): Add target.
214
215         * cpu-arm.c: Add xscale machine name.
216         Add v5t, v5te and XScale machine numbers.
217
218 2000-11-23  Kazu Hirata  <kazu@hxi.com>
219
220         * aix386-core.c: Fix formatting.
221
222 2000-11-22  Jim Wilson  <wilson@redhat.com>
223
224         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
225         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
226         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
227         (ins_imms_scaled): Initialize sign_bit at function entry.
228         (elf64_ia64_operands): Add missing initializers.
229         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
230         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
231         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
232         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
233         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
234         parameters.
235         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
236         and free_extsyms at function entry.
237         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
238         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
239         (get_got): Delete unused local srel.
240         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
241         (elfNN_ia64_relocate_section): Delete unused local dynindx.
242         
243 2000-11-21  Kazu Hirata  <kazu@hxi.com>
244
245         * coff-a29k.c: Fix formatting.
246         * coff-h8500.c: Likewise.
247         * coff-i960.c: Likewise.
248         * coff-ppc.c: Likewise.
249         * coff-rs6000.c: Likewise.
250         * coff-stgo32.c: Likewise.
251         * coff-tic54x.c: Likewise.
252         * coff-w65.c: Likewise.
253         * cpu-h8500.c: Likewise.
254         * cpu-hppa.c: Likewise.
255         * cpu-ns32k.c: Likewise.
256         * ecoff.c: Likewise.
257         * ecofflink.c: Likewise.
258
259 2000-11-21  Nick Clifton  <nickc@redhat.com>
260
261         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
262         remove possibility of infinite loop.
263
264 2000-11-20  Kazu Hirata  <kazu@hxi.com>
265
266         * aix386-core.c: Fix formatting.
267         * aout-adobe.c: Likewise.
268         * aout-arm.c: Likewise.
269         * aout-encap.c: Likewise.
270         * aout-ns32k.c: Likewise.
271         * aout-target.h: Likewise.
272         * aout-tic30.c: Likewise.
273         * aoutf1.h: Likewise.
274         * aoutx.h: Likewise.
275         * archive.c: Likewise.
276         * bfd-in.h: Likewise.
277         * bfd-in2.h: Likewise.
278         * bfd.c: Likewise.
279         * bout.c: Likewise.
280
281 2000-11-17  H.J. Lu  <hjl@gnu.org>
282
283         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
284         pltoff entries for DT_INIT and DT_FINI.
285         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
286         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
287         entries.
288
289 2000-11-16  Richard Henderson  <rth@redhat.com>
290
291         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
292         (allocate_dynrel_entries): Likewise.
293         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
294         (set_pltoff_entry): Likewise.
295         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
296         (elfNN_ia64_reloc_type_lookup): Likewise.
297         (elfNN_ia64_install_value): Likewise.
298         (elfNN_ia64_relocate_section): Likewise.
299         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
300         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
301
302 2000-11-16  Kazu Hirata  <kazu@hxi.com>
303
304         * cpu-a29k.c: Fix formatting.
305         * cpu-alpha.c: Likewise.
306         * cpu-arm.c: Likewise.
307         * cpu-avr.c: Likewise.
308         * cpu-d10v.c: Likewise.
309         * cpu-h8500.c: Likewise.
310         * cpu-hppa.c: Likewise.
311         * cpu-i370.c: Likewise.
312         * cpu-i386.c: Likewise.
313         * cpu-i960.c: Likewise.
314         * cpu-ia64-opc.c: Likewise.
315         * cpu-ia64.c: Likewise.
316         * cpu-m32r.c: Likewise.
317         * cpu-m68hc11.c: Likewise.
318         * cpu-m68hc12.c: Likewise.
319         * cpu-m68k.c: Likewise.
320         * cpu-m88k.c: Likewise.
321         * cpu-mips.c: Likewise.
322         * cpu-ns32k.c: Likewise.
323         * cpu-pj.c: Likewise.
324         * cpu-powerpc.c: Likewise.
325         * cpu-sh.c: Likewise.
326         * cpu-sparc.c: Likewise.
327         * cpu-tic54x.c: Likewise.
328         * cpu-v850.c: Likewise.
329         * cpu-vax.c: Likewise.
330         * cpu-w65.c: Likewise.
331         * cpu-we32k.c: Likewise.
332         * cpu-z8k.c: Likewise.
333         * dwarf1.c: Likewise.
334         * dwarf2.c: Likewise.
335
336 2000-11-15  Kazu Hirata  <kazu@hxi.com>
337
338         * coff-arm.c: Fix formatting.
339         * coff-ppc.c: Likewise.
340         * coff-rs6000.c: Likewise.
341         * coff-sh.c: Likewise.
342         * coff-sparc.c: Likewise.
343         * coff-tic30.c: Likewise.
344         * coff-tic54x.c: Likewise.
345         * coff-tic80.c: Likewise.
346         * coff-w65.c: Likewise.
347         * coff-we32k.c: Likewise.
348         * coff-z8k.c: Likewise.
349
350 2000-11-15  Richard Henderson  <rth@redhat.com>
351
352         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
353         section with the same ALLOC|LOAD flags as the source section.
354
355 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
356
357         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
358         by STO_ALPHA constants.
359
360 2000-11-14  Kazu Hirata  <kazu@hxi.com>
361
362         * coff-pmac.c: Fix formatting.
363         * coff-ppc.c: Likewise.
364
365 2000-11-13  H.J. Lu  <hjl@gnu.org>
366
367         * elflink.h (elf_link_add_object_symbols): Also add indirect
368         symbols for common symbols with the default version.
369
370 2000-11-09  Philip Blundell  <pb@futuretv.com>
371
372         * section.c (STD_SECTION): Set gc_mark flag.
373
374 2000-11-11  Kazu Hirata  <kazu@hxi.com>
375
376         * coff-i960.c: Likewise.
377         * coff-m68k.c: Likewise.
378         * coff-m88k.c: Likewise.
379         * coff-mcore.c: Likewise.
380         * coff-mips.c: Likewise.
381
382 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
383
384         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
385
386 2000-11-10  Kazu Hirata  <kazu@hxi.com>
387
388         * coff-h8300.c: Fix formatting.
389         * coff-h8500.c: Likewise.
390         * coff-i386.c: Likewise.
391         * coff-i860.c: Likewise.
392         * coff-i960.c: Likewise.
393         * coff-ia64.c: Likewise.
394
395 2000-11-09  Kazu Hirata  <kazu@hxi.com>
396
397         * archive.c: Fix formatting.
398         * archures.c: Likewise.
399
400 2000-11-07  Richard Henderson  <rth@redhat.com>
401
402         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
403         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
404         * section.c (bfd_set_section_contents): Call memcpy if
405         section->contents set and location not equal to contents plus offset.
406
407 2000-11-08  Kazu Hirata  <kazu@hxi.com>
408
409         * bfd-in.h: Fix formatting.
410         * bfd-in2.h: Likewise.
411         * bfd.c: Likewise.
412         * binary.c: Likewise.
413         * bout.c: Likewise.
414         * coff-a29k.c: Likewise.
415         * coff-alpha.c: Likewise.
416         * coff-apollo.c: Likewise.
417         * coff-aux.c: Likewise.
418
419 2000-11-07  Kazu Hirata  <kazu@hxi.com>
420
421         * aix386-core.c: Fix formatting.
422         * aoutf1.h: Likewise.
423         * aoutx.h: Likewise.
424         * archures.c: Likewise.
425         * armnetbsd.c: Likewise.
426
427 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
428
429         * coff-h8300.c (special): Adjust reloc address.
430
431 2000-11-06  Steve Ellcey <sje@cup.hp.com>
432
433         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
434         to differentiate elf32 and elf64 on ia64.
435         * bfd-in2.h: Regenerate.
436         * config.bfd: Add target for "ia64*-*-hpux*".
437         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
438         * configure: Regenerate.
439         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
440         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
441
442         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
443         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
444         * Makefile.in: Regnerate.
445         * elf64-ia64.c: Deleted.
446         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
447
448 2000-11-06  Kazu Hirata  <kazu@hxi.com>
449
450         * aout-adobe.c: Fix formatting.
451         * aout-arm.c: Likewise.
452         * aout-cris.c: Likewise.
453         * aout-encap.c: Likewise.
454         * aout-ns32k.c: Likewise.
455         * aout-target.h: Likewise.
456         * aout-tic30.c: Likewise.
457
458 2000-11-05  Philip Blundell  <philb@gnu.org>
459
460         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
461         BFDs containing no sections to be merged, regardless of their flags.
462
463 2000-11-04  Philip Blundell  <philb@gnu.org>
464
465         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
466         if a relocation for an undefined symbol also results in an
467         overflow.
468
469 2000-11-06  Christopher Faylor <cgf@cygnus.com>
470
471         * config.bfd: Add support for Sun Chorus.
472
473 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
474
475         * configure.in: Recognize alpha-*-freebsd*.
476         * configure: Regenerate.
477
478 2000-11-02  Luciano Gemme <ishitawa@yahoo.com> 
479
480         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
481         (Chunk): New global variable set by a parameter in objcopy.c.
482         (S3Forced): New global variable set by a parameter in
483         objcopy.c.
484         (srec_set_section_contents): If S3Forced is true, always generate
485         S3 records.
486         (srec_write_section): Use 'Chunk' to limit maximum length of S
487         records.
488
489 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
490
491         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
492         * Makefile.in: Regenerate.
493         * bfd-in2.h: Regenerate.
494         * po/bfd.pot: Regenerate.
495         
496 2000-10-31  Philip Blundell  <philb@gnu.org>
497
498         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
499         EF_SOFT_FLOAT if it is defined.
500
501 2000-10-27  Philip Blundell  <philb@gnu.org>
502
503         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
504         attempts to mix PIC code with non-PIC, just mark the output as
505         being position dependent.
506         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error 
507         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for 
508         all mismatches, not just the first one.
509         
510 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
511
512         * ieee.c (ieee_archive_p): Plug one of many possible
513         memory leaks in error handling.
514
515 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
516
517         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
518         elf32_sparc_object_p, elf32_sparc_final_write_processing):
519         Support v8plusb.
520         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
521         sparc64_elf_object_p): Support v9b.
522         * archures.c: Declare v8plusb and v9b machines.
523         * bfd-in2.h: Ditto.
524         * cpu-sparc.c: Ditto.
525
526 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
527
528         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
529         of a GOT reloc.
530
531         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
532         (SYMBOL_CALLS_LOCAL): New macro.
533         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
534         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
535         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
536         (ppc_elf_relocate_section): Use flag variable to determine
537         whether the relocation refers to a local symbol.
538         Test whether a PLTREL24 reloc will produce a reloc by looking
539         to see whether a PLT entry was made.
540
541 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
542
543         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
544         entries that could serve as a definition for a weak symbol.
545
546 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
547
548         From  Ralf Baechle  <ralf@gnu.org>
549
550         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
551         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
552         against local symbols.
553         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
554         
555 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
556
557         * section.c (struct sec): Add kept_section.
558         (struct bfd_comdat_info): Remove sec, we can use above.
559         (STD_SECTION): Add initializer.
560         (bfd_make_section_anyway): Init here too.
561
562         * bfd-in2.h: Regenerate.
563
564         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
565         zeroing of `flags'.  
566         (elf_link_input_bfd): Set all asection->symbol->value's here, and
567         fudge values for discarded link-once section symbols.
568
569         * elf64-hppa.c: Include alloca-conf.h
570
571 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
572
573         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
574
575         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
576
577 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
578
579         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
580
581 2000-10-10  Tom Rix <trix@redhat.com>
582
583         * section.c (bfd_make_section_anyway): Release newsect ptr when 
584         newsect->symbol fails to alloc.  Use bfd_release instead of free.
585
586 2000-10-09  Richard Henderson  <rth@cygnus.com
587
588         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
589         (elf64_ia64_unwind_entry_compare): New.
590         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
591
592 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
593
594         * elflink.h (size_dynamic_sections): Don't create various tags if
595         .dynstr is excluded from the link.  Don't set first dynsym entry
596         if dynsymcount is zero.
597         (elf_bfd_final_link): Don't try to swap out dynamic syms if
598         .dynsym excluded from the link.  Don't try to write any dynamic
599         sections excluded from the link.
600
601         * elf.c (swap_out_syms): Handle global section symbols.
602
603 2000-10-05  DJ Delorie  <dj@redhat.com>
604
605         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
606         * coffcode.h (coff_set_alignment_hook): read extended reloc count
607         (coff_write_relocs): write extended reloc count
608         (coff_write_object_contents): account for extended relocs
609
610 2000-10-05  Jim Wilson  <wilson@cygnus.com>
611
612         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
613         field.
614         * elf.c (_bfd_elf_make_section_from_shdr): Call the
615         elf_backend_section_flags function.
616         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
617         code.
618         (elf64_ia64_section_flags): New function containing flag conversion
619         code.
620         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
621         * elfxx-target.h (elf_backend_section_flags): Define.
622         (elfNN_bed): Initialize elf_backend_section_flags field.
623
624 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
625
626         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
627         _bfd_elf32_gc_record_vtable.  Correct a comment.
628
629 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
630
631         From  Ralf Baechle  <ralf@gnu.org>
632
633         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
634         produces binaries with got[1] = 0x80000001 to differenciate them
635         for the dynamic linker from the broken binaries produced by old
636         versions.
637
638 2000-09-30  Petr Sorfa <petrs@sco.com>
639
640         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
641         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
642         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
643         * configure: Regenerate.
644
645 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
646
647         Define two bfd_targets for absence and presence of leading
648         underscore on symbols.  Make sure to only link same kind.
649         * elf32-cris.c (cris_elf_object_p,
650         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
651         cris_elf_merge_private_bfd_data): New.
652         (elf_backend_object_p, elf_backend_final_write_processing,
653         bfd_elf32_bfd_print_private_bfd_data,
654         bfd_elf32_bfd_merge_private_bfd_data): Define.
655         <Target vector definition>: Include elf32-target.h twice with
656         different macro settings:
657         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
658         bfd_elf32_us_cris_vec.
659         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
660         (elf_symbol_leading_char): First as 0, then '_'.
661         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
662         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
663         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
664         * configure: Regenerate.
665         * targets.c: Declare bfd_elf32_us_cris_vec.
666         * po/bfd.pot: Regenerate.
667
668 2000-09-29  Momchil Velikov  <velco@fadata.bg>
669
670         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
671         R_ARM_THM_PC22 relocations.
672
673 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
674
675         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
676
677 2000-09-29  Momchil Velikov <velco@fadata.bg>
678
679         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
680         is has the SEC_HAS_CONTENTS flag set.
681
682 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
683             Hans-Peter Nilsson  <hp@axis.com>
684
685         * aout-cris.c (N_TXTADDR): Define.
686
687 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
688
689         * som.c: Include alloca-conf.h.
690         * Makefile.am: "make dep-am"
691         * Makefile.in: Regenerate.
692
693 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
694
695         * elf32-hppa.c (plt_stub): New.
696         (PLT_STUB_ENTRY): Define.
697         (elf32_hppa_link_hash_table): Change multi_subspace to packed
698         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
699         (elf32_hppa_link_hash_table_create): Init to suit.
700         (elf32_hppa_check_relocs): Set has_12bit_branch and
701         has_17bit_branch as appropriate.
702         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
703         non-local functions.
704         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
705         Add space for plt_stub as needed.
706         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
707         functions at plt_stub.
708         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
709         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
710
711         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
712         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
713         of fixed size, and if negative, disable handling of input sections
714         before stub section.  Set up default stub group size depending
715         on detected branch relocs.
716         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
717         ensure different offsets from sym_value aren't rounded to
718         different 2k blocks.  Use lrsel and rrsel for other stubs too for
719         consistency rather than necessity.
720         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
721         (final_link_relocate): Likewise.
722         (elf32_hppa_relocate_section): Likewise.
723
724         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
725         (_bfd_elf_hppa_gen_reloc_type): Generate them.
726         (elf_hppa_final_link_relocate): Handle them.
727         (elf_hppa_relocate_insn): Likewise.
728         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
729
730 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
731
732         * elfcode.h (elf_object_p): Preserve and clear abfd section
733         information.  Restore at error.
734
735 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
736
737         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
738         is empty, make sure that its rva also 0. NT loader dislikes
739         having otherwise.
740
741 2000-09-26  Steve Ellcey <sje@cup.hp.com>
742
743         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
744         global by default.
745
746 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
747
748         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
749         currently unused RELATIVE_DYNAMIC_RELOCS code.
750         (hppa_discard_copies): Likewise.
751         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
752         comments.  Don't check non-code output sections for stub grouping.
753
754 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
755
756         * section.c (bfd_get_unique_section_name): Return NULL if
757         bfd_malloc fails.
758
759 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
760
761         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
762         instruction sequence to actually work.
763         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
764         accordingly.
765
766 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
767
768         * elf32-sh.c (sh_elf_relocate_section): Use
769         _bfd_final_link_relocate to apply the relocation against a section
770         symbol, when doing relocatable links.
771
772 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
773
774         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
775         to id_sec.
776         (stub_hash_newfunc): Here too.
777         (hppa_add_stub): And here.
778         (elf32_hppa_link_hash_table): Remove stub_section_created,
779         reloc_section_created, first_init_sec and first_fini_sec.  Add
780         stub_group.
781         (elf32_hppa_link_hash_table_create): Init to suit.
782         (hppa_get_stub_entry): Add support for grouping stub sections.
783         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
784         section code.  Index stub vars by section->id.
785         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
786         exit paths.  Zap allocation of above removed vars.  Refine
787         link-once test.
788
789         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
790         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
791         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
792         rather than pointer to bfd_link_info.
793         (hppa_add_stub): Likewise.
794         (final_link_relocate): Likewise.
795
796 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
797
798         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
799         link-once sections.
800
801 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
802
803         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
804         ld/emulparams/shelf.sh.
805
806 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
807
808         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
809         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
810         * bfd-in2.h: Regenerate.
811
812 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
813
814         * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
815         LITUSE relocations incorrectly if -relax is specified on the ld
816         command line and the displacement field of the load or store
817         instruction is non-zero. (Patch by paul.winalski@compaq.com)
818
819 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
820
821         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
822         first_fini_sec here.
823         (elf32_hppa_size_stubs): Instead correctly find the first .init
824         and .fini section here.
825
826 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
827
828         * elf32-hppa.c (clobber_millicode_symbols): New function.
829         (elf32_hppa_size_dynamic_sections): Call it.
830
831 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
832
833         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
834         packed.  Add plabel, plt_abs packed booleans.
835         (hppa_link_hash_newfunc): Init new fields.
836         (PLABEL_PLT_ENTRY_SIZE): Define.
837         (hppa_stub_name): Use size_t len vars.
838         (hppa_add_stub): Likewise.
839         (elf32_hppa_build_stubs): Likewise.
840         (hppa_build_one_stub): Kill some compiler warnings.
841         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
842         if dynamic linking.  Munge the local plt offsets into
843         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
844         size_t len vars.  Add assert for plabel addend.
845         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
846         (elf32_hppa_hide_symbol): New function.
847         (elf_backend_hide_symbol): Define.
848         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
849         with h->plabel set.  Don't make plt entries to have dynamic syms
850         when they have been forced local.  If plt entry is used by a
851         plabel, make it PLABEL_PLT_ENTRY_SIZE.
852         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
853         Set up .plt offsets for local syms.
854         (elf32_hppa_relocate_section): Initialise plt entries for local
855         syms.  Leave weak undefined plabels zero.  Make global plabel
856         relocs against function symbol, and leave the addend zero.
857         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
858         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
859         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
860         relocs instead of SEGREL32 for dynamic got relocs.
861         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
862         (elf_backend_got_header_size): Adjust.
863         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
864
865         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
866         (hppa_type_of_stub): Use it instead of #if 0
867         (hppa_discard_copies): Use it here too.
868         (elf32_hppa_size_dynamic_sections): And here.
869
870         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
871         (elf32_hppa_link_hash_table_create): And here.
872         (hppa_build_one_stub): And here.  Instead keep track of stub
873         offset using _raw_size.
874         (elf32_hppa_size_stubs): Likewise.
875         (elf32_hppa_build_stubs): Likewise.
876         (hppa_size_one_stub): Likewise.  Resize reloc section too.
877
878         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
879         first_fini_sec handling.  Don't search for reloc section or set
880         hplink->reloc_section_created here.
881         (elf32_hppa_size_stubs): Instead search for reloc sections, and
882         set reloc_section_created here.
883         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
884         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
885         and DT_FINI.
886         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
887
888         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
889         with `hplink->root.'.
890         (elf32_hppa_check_relocs): Likewise.
891         (elf32_hppa_gc_sweep_hook): Likewise.
892         (elf32_hppa_adjust_dynamic_symbol): Likewise.
893         (hppa_handle_PIC_calls): Likewise.
894         (elf32_hppa_size_dynamic_sections): Likewise.
895         (elf32_hppa_set_gp): Likewise.
896         (elf32_hppa_relocate_section): Likewise.
897         (elf32_hppa_finish_dynamic_symbol): Likewise.
898         (elf32_hppa_finish_dynamic_sections): Likewise.
899
900         From  David Huggins-Daines  <dhd@linuxcare.com>
901         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
902         defined weak symbols in shared links.
903         (final_link_relocate): Calls to defined weak symbols in shared
904         objects must go via import stubs, as the target might not be known
905         at link time.
906
907 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
908
909         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
910         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
911         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
912         the original entries with EMPTY_HOWTOs, and added new ones to fill
913         in the gap.
914         (sh_elf_info_to_howto): Make sure the new gap isn't used.
915         (sh_elf_relocate_section): Likewise.
916
917 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
918
919         * cpu-mips.c (arch_info_struct): Add mips:4K
920         * bfd-in2.h (bfd_mach_mips4K): New define.
921         * archures.c: Add bfd_mach_mips4K to comment.
922         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
923         E_MIPS_ARCH_2 for bfd_mach_mips4K.
924
925 2000-09-13  Marco Franzen <marcof@thyron.com>
926
927         * som.c (som_write_symbol_strings): Do not used fixed buffers,
928         use size_t as a counter.
929         (som_write_space_strings): Similarly.
930
931 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
932
933         * elf32-i860.c (elf32_i860_relocate_pc26): New function
934         and prototype.
935         (elf32_i860_relocate_section): Invoke new function from here.
936
937 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
938
939         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
940         static.
941
942 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
943
944         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
945         target section name instead of dumping core when the target symbol is
946         undefined.
947
948 2000-09-09  Kazu Hirata  <kazu@hxi.com>
949
950         * riscix.c: Remove DEFUN.
951
952 2000-09-08  Nick Clifton  <nickc@redhat.com>
953
954         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
955         initialise flags in output bfd if the input bfd is the default
956         architecture with the default flags.
957
958 2000-09-08  Kazu Hirata  <kazu@hxi.com>
959
960         * archive.c: Fix formatting.
961         * coff-arm.c: Likewise.
962         * doc/chew.c: Likewise.
963
964 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
965
966         * section.c (bfd_get_unique_section_name): Put a dot before the
967         numeric suffix.
968
969 2000-09-07  Kazu Hirata  <kazu@hxi.com>
970
971         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
972         * elf.c: Fix formatting.
973
974 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
975
976         * config.bfd (sh-*-linux*): Added.
977         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
978         * targets.c: Declare them.
979         * elf32-sh-lin.c: New file.
980         * Makefile.am: Compile it.
981         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
982         * configure, Makefile.in: Rebuilt.
983
984 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
985
986         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
987         pseduo-section when determining where the TOC ends.
988
989         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
990         output x_tvndx as it is only two bytes wide.
991
992         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
993         reloc is 26 or 32 bits wide.
994
995         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
996         for relocs that don't change anything.  Also look at the full
997         6 bits of bitsize.
998
999 2000-09-06  Philip Blundell  <philb@gnu.org>
1000
1001         * config.bfd (arm*-*-uclinux*): New target.
1002
1003 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
1004
1005         * configure: Rebuilt with new libtool.m4.
1006
1007 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
1008
1009         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
1010         word for variable name.
1011         * bfd-in2.h: Regenerate.
1012
1013 2000-09-05  Nick Clifton  <nickc@redhat.com>
1014
1015         * config.in: Regenerate.
1016         * libbfd.h: Regenerate.
1017         * po/bfd.pot: Regenerate.
1018         * doc/bfdint.texi: Remove CVS date string - it foils compares with
1019         local versions.
1020
1021 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
1022
1023         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
1024
1025 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
1026
1027         Shared library and PIC support.
1028         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
1029         (GOT_ENTRY_SIZE): New.
1030         (ELF_DYNAMIC_INTERPRETER): New.
1031         (STUB_SUFFIX): Define.
1032         (LONG_BRANCH_PIC_IN_SHLIB): Define.
1033         (RELATIVE_DYNAMIC_RELOCS): Define.
1034         (enum elf32_hppa_stub_type): New.
1035         (struct elf32_hppa_stub_hash_entry): Rename offset to
1036         stub_offset.  Add a number of new fields.
1037         (struct elf32_hppa_link_hash_entry): New.
1038         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
1039         global_value.
1040         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
1041         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
1042         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
1043         new fields.
1044         (hppa_link_hash_newfunc): New function.
1045         (elf32_hppa_link_hash_table_create): Use above function. Init new
1046         fields.
1047         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
1048         instead of addend, and remove sym_name from args.  Don't use
1049         symbol name for local syms, instead use sym index.
1050         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
1051         stub type rather than size.  Pass in hash and handle import stub
1052         case.  Also pass in reloc instead of offset so we can calculate
1053         PCREL22F and PCREL12F branches properly.
1054         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
1055         import and export stubs too.
1056         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
1057         import and export stub sizing.
1058         (elf32_hppa_check_relocs): New function.
1059         (elf32_hppa_adjust_dynamic_symbol): New function.
1060         (hppa_discard_copies): New function.
1061         (elf32_hppa_size_dynamic_sections): New function.
1062         (elf_backend_size_dynamic_sections): Define.
1063         (elf32_hppa_finish_dynamic_symbol): New function.
1064         (elf_backend_finish_dynamic_symbol): Define.
1065         (elf32_hppa_size_stubs): Stash params in link hash table, and move
1066         some local vars into the link hash table too.  For shared links,
1067         trundle over function syms, generating export stubs.  Handle
1068         PCREL22F branches.  Break out stub creation code from here..
1069         (hppa_add_stub): .. to here.  New function.
1070         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
1071         call the bfd linker.  Use elf_gp to record global pointer.
1072         Calculate a value from sections if $global$ is missing.
1073         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
1074         (elf32_hppa_gc_mark_hook): New function.
1075         (elf_backend_gc_mark_hook): Define.
1076         (elf32_hppa_gc_sweep_hook): New function.
1077         (elf_backend_gc_sweep_hook): Define.
1078         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
1079         Add rel to args, and remove howto, input_bfd, offset, addend,
1080         sym_name as we can recalculate these locally.  Handle calls to
1081         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
1082         handling of undefined weak syms.  Check that stubs are in range.
1083         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
1084         message on hitting a DPREL21L reloc that needs fixing.  Subtract
1085         off PC for PCREL14F.  Break out code that does a stub lookup from
1086         here..
1087         (hppa_get_stub_entry): ..to here.  New function.
1088         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
1089         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
1090         relocs, etc. etc.
1091         (elf32_hppa_finish_dynamic_sections): New function.
1092         (elf_backend_finish_dynamic_sections): Define.
1093         (elf_backend_final_write_processing) Define.
1094         (hppa_handle_PIC_calls): New function.
1095         (elf32_hppa_build_stubs): Call it.  Pass link_info to
1096         hppa_build_one_stub.
1097         (elf32_hppa_create_dynamic_sections): New function
1098         to create .plt and .got then set .plt flags correctly.
1099         (elf_backend_create_dynamic_sections): Define.
1100         (elf32_hppa_object_p): New function.
1101         (elf_backend_object_p): Define.
1102         (elf32_hppa_elf_get_symbol_type): New function.
1103         (elf_backend_get_symbol_type): Define.
1104         (elf_backend_can_gc_sections): Define.
1105         (elf_backend_want_got_plt): Define.
1106         (elf_backend_plt_alignment): Set to 2.
1107         (elf_backend_plt_readonly): Define.
1108         (elf_backend_want_plt_sym): Define.
1109         (elf_backend_got_header_size): Reserve one entry.
1110
1111         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
1112         (elf32_hppa_size_stubs): Pass in multi_subspace.
1113         (elf32_hppa_set_gp): Declare.
1114
1115         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
1116         (bfd_get_unique_section_name): New function.
1117         * bfd_in2.h: Regenerate.
1118
1119         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
1120         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
1121         comment.
1122
1123         From  David Huggins-Daines  <dhd@linuxcare.com>
1124         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
1125         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
1126         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
1127         been updated in finish_dynamic_symbol before modifying function
1128         symbol.
1129
1130         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
1131         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
1132         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
1133         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
1134         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
1135         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
1136         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
1137         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
1138
1139         From David Huggins-Daines  <dhd@linuxcare.com>
1140         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
1141         style of local labels as well.
1142
1143 2000-09-03  Philip Blundell  <philb@gnu.org>
1144
1145         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
1146         references to undefined symbols in debugging sections.
1147
1148 2000-09-02  H.J. Lu  <hjl@gnu.org>
1149
1150         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1151         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
1152         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
1153         section.
1154
1155 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
1156
1157         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
1158         (elf32_i860_is_local_label_name): New function and prototype.
1159
1160 2000-09-02  Nick Clifton  <nickc@redhat.com>
1161
1162         * configure.in: Increase version number to 2.10.91.
1163         * configure: Regenerate.
1164         * aclocal.m4: Regenerate.
1165         * config.in: Regenerate.
1166         * po/bfd.pot: Regenerate.
1167
1168 2000-09-02  Daniel Berlin <dberlin@redhat.com>
1169
1170         * elf.c (_bfd_elf_make_section_from_shdr): Add
1171         .gnu.linkobce.wi. to the list of debug section names.
1172
1173 2000-09-02  Nick Clifton  <nickc@redhat.com>
1174
1175         * dwarf2.c (find_debug_info): New function: Locate a section
1176         containing dwarf2 debug information.
1177         (bfd_dwarf2_find_nearest_line): Find all sections containing
1178         debug information and include them in the stash.
1179
1180 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
1181
1182         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
1183         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
1184         (sh_reloc_map): Add new relocs.
1185         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
1186         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
1187         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
1188         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
1189         functions.
1190         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
1191         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1192         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
1193         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1194         New array constants.
1195         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
1196         New variables.
1197         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1198         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
1199         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
1200         elf_sh_plt_reloc_offset): Define.
1201         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
1202         elf_sh_link_hash_table): New structs.
1203         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
1204         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
1205         relocation types.
1206         (elf_backend_create_dynamic_sections,
1207         bfd_elf32_bfd_link_hash_table_create,
1208         elf_backend_adjust_dynamic_symbol,
1209         elf_backend_size_dynamic_sections,
1210         elf_backend_finish_dynamic_symbol,
1211         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1212         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1213         elf_backend_got_header_size, elf_backend_plt_header_size):
1214         Define.
1215         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1216         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
1217         New relocs.
1218         * bfd-in2.h, libbfd.h: Rebuilt.
1219
1220 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
1221
1222         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
1223         change.
1224
1225 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
1226
1227         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
1228         not initialized, set them to indicate the SH1 instruction set.
1229
1230 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
1231
1232         * acinclude.m4: Include libtool and gettext macros from the
1233         top level.
1234         * aclocal.m4, configure: Rebuilt.
1235
1236 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
1237
1238         * elf.c: Eliminate references to __sparcv9 macro; replace with
1239         autoconf variables HAVE_PSINFO32_T etc.
1240         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
1241         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
1242         * config.in: Ditto.
1243         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
1244         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
1245         * aclocal.m4: Ditto.
1246         * configure: Regenerate.
1247
1248 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
1249
1250         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
1251         for any shared link, not just shared -Bsymbolic.
1252         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
1253         any shared link, and pass link info to it.
1254         (elf_i386_size_dynamic_sections): Update comment.
1255         (elf_i386_discard_copies): Modify to discard relocs for symbols
1256         that have been forced local.
1257         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
1258         that have been forced local.
1259
1260 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
1261
1262         * elflink.h (elf_link_add_object_symbols): Allow common
1263         symbols to have an alignment of 1 if explicitly requested, and
1264         not overridden by other definitions.
1265
1266 2000-08-22  Doug Kwan <dkwan@transmeta.com>
1267
1268         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
1269         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
1270
1271 2000-08-22  H.J. Lu  <hjl@gnu.org>
1272
1273         * elf-bfd.h (elf_link_hash_table): Add runpath.
1274
1275         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
1276         * bfd-in2.h: Rebuilt.
1277
1278         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
1279         "runpath" field to NULL.
1280         (bfd_elf_get_runpath_list): New function.
1281
1282         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
1283         DT_RUNPATH entries.
1284
1285 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
1286
1287         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
1288         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
1289         explicitly.  Improve validation of r_type.
1290
1291 2000-08-21  H.J. Lu  <hjl@gnu.org>
1292
1293         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
1294         dynamic allocated content space.  Add a comment to remind us that
1295         one day this ought to be fixed.
1296         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1297         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1298         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1299
1300 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
1301
1302         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
1303         field with the newly relocated value instead of adding it to the
1304         existing immediate field.
1305         (elf32_i860_relocate_splitn): Likewise.
1306         (elf32_i860_relocate_highadj): Likewise.
1307
1308 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
1309
1310         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
1311         was previously just a stub).
1312
1313 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
1314
1315         * elflink.c (_bfd_elf_create_got_section): Don't abort().
1316         Formatting fixes.
1317         (_bfd_elf_create_dynamic_sections): Likewise.
1318
1319 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
1320
1321         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
1322         for undefined symbols to be the beginning of the section.
1323
1324         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
1325         four extra entries at the beginning of the .rela.plt section.
1326         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
1327         section to account for the four reserved entries in the .plt section.
1328
1329 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
1330
1331         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
1332         to the list of NOPs we recognize after a branch-and-link.
1333         Use the ori NOP when one is needed.
1334
1335         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
1336         for large archives.
1337
1338 2000-08-14  Jim Wilson  <wilson@cygnus.com>
1339
1340         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
1341         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
1342         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
1343         EF_IA_64_ABSOLUTE.
1344
1345 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
1346
1347         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
1348
1349 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
1350
1351         * elf32-i860.c (elf32_i860_relocate_section): New function.
1352         (i860_final_link_relocate): New function.
1353         (elf32_i860_relocate_splitn): New function.
1354         (elf32_i860_relocate_pc16): New function.
1355         (elf32_i860_relocate_highadj): New function.
1356         (elf32_i860_howto): Minor adjustments to some relocations.
1357         (elf_info_to_howto_rel): Define.
1358         (elf_backend_relocate_section): Define.
1359
1360 2000-08-10  Nick Clifton  <nickc@cygnus.com>
1361
1362         * elf32-arm.h: Fix formatting.
1363
1364 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
1365
1366         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
1367
1368 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
1369
1370         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
1371
1372 2000-08-07  Kazu Hirata  <kazu@hxi.com>
1373
1374         * ieee.c (ieee_write_debug_part): Rewrite a comment.
1375         * elf64-ia64.c: Fix a typo.
1376
1377 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
1378
1379         * elf32-i860 (elf32_i860_howto_table): New structure.
1380         (lookup_howto): New function.
1381         (elf32_i860_reloc_type_lookup): New function.
1382         (elf32_i860_info_to_howto_rela): New function.
1383         (elf_code_to_howto_index): New structure.
1384         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
1385         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
1386         elf32_i860_reloc_type_lookup.
1387
1388 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
1389
1390         * som.c (struct fixup_format): Constify `format'.
1391         (som_hppa_howto_table): Use SOM_HOWTO macro.
1392         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
1393         (som_bfd_reloc_type_lookup): Likewise.
1394         (compare_subspaces): Remove unused `count1', `count2'.
1395         (som_begin_writing): Remove unused `total_reloc_size'.
1396         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
1397         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
1398         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
1399         (som_find_nearest_line): Decorate unused parameter(s).
1400         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
1401         (som_bfd_link_split_section): Likewise.
1402
1403 2000-08-03  Nick Clifton  <nickc@cygnus.com>
1404
1405         * section.c: Restore backed out code.
1406         * elf.c: Restore backed out code.
1407         (copy_private_bfd_data): Fix bug preventing stipped dynamic
1408         binaries from working.
1409         * bfd-in2.h: Regenerate.
1410
1411 2000-08-03  H.J. Lu  <hjl@gnu.org>
1412
1413         * section.c: Back out the change made by Nick Clifton
1414         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
1415         binaries.
1416         * bfd-in2.h: Likewise.
1417         * elf.c: Likewise.
1418
1419 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
1420
1421         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
1422
1423 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
1424
1425         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
1426         * bfd-in2.h, libbfd.h: Regenerate.
1427
1428 2000-07-31  Nick Clifton  <nickc@cygnus.com>
1429
1430         * section.c (struct sec): Add new boolean field 'segment_mark'.
1431         (STD_SECTION): Initialise new field to zero.
1432
1433         * bfd-in2.h: Regenerate.
1434
1435         * elf.c (copy_private_bfd_data): Reorganise section to segment
1436         mapping to cope with moved sections requiring new segments,
1437         and overlapping segments.
1438         (SEGMENT_END): New macro: Return the end address of a segment.
1439         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
1440         contains a section by comparing their VMA addresses.
1441         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
1442         contains a section by comparing their LMA addresses.
1443         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
1444         section should be included in a segment.
1445         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
1446         follows another in memory.
1447         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
1448         segments overlap.
1449
1450 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
1451
1452         * cpu-i860.c: Added comments.
1453
1454         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
1455         bfd_elf32_i860_little_vec.
1456         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
1457         (ELF_MAXPAGESIZE): Changed to 4096.
1458
1459         * targets.c (bfd_elf32_i860_little_vec): Declaration of
1460         new target.
1461         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
1462
1463         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
1464         config for little endian elf32 i860.
1465         (targ_defvec): Define for the new config above
1466         as "bfd_elf32_i860_little_vec".
1467         (targ_selvecs): Define for the new config above
1468         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
1469
1470         * configure.in (bfd_elf32_i860_little_vec): Added recognition
1471         of new target vec.
1472
1473         * configure: Regenerated.
1474
1475 2000-07-27  H.J. Lu  <hjl@gnu.org>
1476
1477         * elflink.h (elf_merge_symbol): Take one more argument,
1478         dt_needed, to indicate if the symbol comes from a DT_NEEDED
1479         entry. Don't overide the existing weak definition if dt_needed
1480         is true.
1481         (elf_link_add_object_symbols): Pass dt_needed to
1482         elf_merge_symbol ().
1483
1484 2000-07-27  Nick Clifton  <nickc@cygnus.com>
1485
1486         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
1487         allocated contents.
1488
1489 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
1490
1491         * configure.host (*-*-aix*): AIX has 'long long' always.
1492
1493         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
1494         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
1495         (xcoff_write_archive_contents_big): Don't update the offset
1496         of the symbol table, xcoff_write_armap will do it.
1497
1498 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
1499
1500         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
1501         of dynobj for SGI_COMPAT checks.
1502
1503 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1504
1505         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
1506         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
1507         * bfd-in2.h: Regenerate.
1508
1509 2000-07-21  Nick Clifton  <nickc@cygnus.com>
1510
1511         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
1512         range symbol indices in relocs and issue an error message.
1513
1514 2000-07-20  H.J. Lu  <hjl@gnu.org>
1515
1516         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
1517         info->new_dtags when setting DT_FLAGS_1. It will only be set
1518         by the new linker options. It shouldn't break anything.
1519
1520 2000-07-20  H.J. Lu  <hjl@gnu.org>
1521
1522         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
1523         only if info->new_dtags is true.
1524
1525 2000-07-20  H.J. Lu  <hjl@gnu.org>
1526
1527         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
1528         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
1529
1530 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
1531
1532         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
1533         (ALL_MACHINES_CFILES): Add cpu-cris.c.
1534         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
1535         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
1536         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
1537         * Makefile.in: Rebuild.
1538         * aclocal.m4: Rebuild.
1539         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
1540         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
1541         (bfd_cris_arch): Declare.
1542         (bfd_archures_list): Add bfd_cris_arch.
1543         * bfd-in2.h: Rebuild.
1544         * config.bfd: (cris-*-*): New target.
1545         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
1546         * configure: Rebuild.
1547         * elf.c (prep_headers): Add bfd_arch_cris.
1548         * libbfd.h: Rebuild.
1549         * libaout.h (enum machine_type): Add M_CRIS.
1550         * reloc.c: Add CRIS relocations.
1551         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
1552         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
1553         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
1554         * po/POTFILES.in, po/bfd.pot: Regenerate.
1555
1556 2000-07-19  H.J. Lu  <hjl@gnu.org>
1557
1558         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
1559         DF_TEXTREL if DT_TEXTREL is set.
1560         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1561         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1562         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1563         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1564         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1565         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1566         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1567         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1568         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
1569         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1570
1571         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
1572         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
1573         DT_RPATH is set.
1574         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
1575
1576 2000-07-19  H.J. Lu  <hjl@gnu.org>
1577
1578         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
1579         * bfd-in2.h: Rebuild.
1580
1581         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
1582         (elf_dt_soname): New.
1583
1584         * elf.c (bfd_elf_set_dt_needed_soname): New.
1585
1586         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
1587         entry if the shared object loaded by DT_NEEDED is used to
1588         resolve the reference in a regular object.
1589
1590 2000-07-19  H.J. Lu  <hjl@gnu.org>
1591
1592         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
1593         DT_DEPAUDIT and DT_AUDIT as strings.
1594
1595 2000-07-19  Nick Clifton  <nickc@cygnus.com>
1596
1597         * format.c: Fix formatting.
1598
1599 2000-07-19  H.J. Lu  <hjl@gnu.org>
1600
1601         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
1602
1603 2000-07-19  H.J. Lu  <hjl@gnu.org>
1604
1605         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
1606         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
1607         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
1608         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
1609         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
1610         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
1611         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
1612
1613 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
1614
1615         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
1616         renamed functions from here...
1617         (assign_section_numbers): Use renamed functions.
1618         (prep_headers): Use renamed functions.
1619
1620         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
1621         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
1622         * bfd-in2.h: Regenerate.
1623
1624 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
1625
1626         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
1627         parenthesis in if statement.
1628
1629 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
1630
1631         Enable the support for Traditional MIPS.
1632         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
1633         return ict_none appropriately for traditional mips targets.
1634         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
1635         (STUB_MOVE): Conditionalize for traditonal mips.
1636         (STUB_LI16): Likewise.
1637         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
1638         room for RTPROC header.
1639         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
1640         the permission for the PT_DYNAMIC as read, write and execute.
1641         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
1642         for traditonal mips.
1643         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
1644         _DYNAMIC_LINKING for traditonal mips.
1645         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
1646         in case of traditonal mips.
1647         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
1648         entry is required. For a function if PLT is not required then set the
1649         corresponding hash table entry to 0.
1650         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
1651         traditonal mips.
1652         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
1653         shared object set the value to 0.
1654         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
1655         _DYNAMIC_LINKING for traditonal mips.
1656         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
1657         for traditonal mips.
1658
1659 2000-07-15  H.J. Lu  <hjl@gnu.org>
1660
1661         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
1662
1663 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
1664
1665         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
1666         out a structure that is BFD_IN_MEMORY.
1667
1668 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
1669
1670         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
1671         bfd pointer.  Print section id instead of bfd pointer for local
1672         syms.  Prefix addend with `+' for global syms as well as local.
1673         Correct calculation of name component lengths.
1674         (elf64_hppa_check_relocs): Update call to get_dyn_name.
1675
1676         From David Huggins-Daines  <dhd@linuxcare.com>
1677         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
1678         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
1679         (elf64_hppa_modify_segment_map): Likewise.
1680
1681 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
1682
1683         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
1684         addresses to be "naturally" sign extended.  Return -1 if unknown.
1685         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
1686         * bfd-in2.h: Regenerate.
1687
1688 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
1689
1690         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
1691         and ECOF_SIGNED_64 to list ways to extract an offset.
1692         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
1693         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
1694         Update.
1695         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
1696         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
1697
1698 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
1699
1700         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
1701         bfd_get_start_address.
1702         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
1703         (elf_swap_ehdr_out): Ditto.
1704
1705 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
1706
1707         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
1708         compatibility with older binutils.
1709
1710 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
1711
1712         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
1713         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
1714
1715         From Ryan Bradetich  <rbradetich@uswest.net>
1716         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
1717         (parse_line_table): Ditto.
1718         (_bfd_dwarf1_find_nearest_line): Ditto.
1719         * syms.c (cmpindexentry): Remove extra `*' from params.
1720
1721 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
1722
1723         * elf32-mips.c (sort_dynamic_relocs): New Function.
1724         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
1725         via qsort to sort the dynamic relocations in increasing r_symndx
1726         value.
1727
1728 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
1729
1730         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
1731         ATTRIBUTE_UNUSED to unused args.
1732         (get_opd): Likewise.
1733         (get_plt): Likewise.
1734         (get_dlt): Likewise.
1735         (get_stub): Likewise.
1736         (elf64_hppa_adjust_dynamic_symbol): Likewise.
1737         (elf64_hppa_link_output_symbol_hook): Likewise.
1738         (elf64_hppa_check_relocs): Delete unused var.
1739         (elf64_hppa_size_dynamic_sections): Likewise.
1740         (elf64_hppa_finalize_opd): Likewise.
1741         (elf64_hppa_finalize_dynreloc): Likewise.
1742         (elf64_hppa_modify_segment_map): Likewise.
1743         (elf64_hppa_finish_dynamic_sections): Likewise.
1744
1745         * elf-hppa.h (elf_hppa_final_write_processing): Add
1746         ATTRIBUTE_UNUSED to unused args.
1747         (elf_hppa_final_link_relocate): Likewise.
1748         (elf_hppa_record_segment_addrs): Add paretheses.
1749         (elf_hppa_relocate_section): Constify dyn_name.
1750
1751         From  David Huggins-Daines  <dhd@linuxcare.com>
1752         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
1753         rearrange case statement so that it gets preferred to 32-bit ones.
1754
1755         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
1756         asection->id instead of address of asection structure.
1757         (elf32_hppa_size_stubs): Likewise.
1758
1759         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
1760         for .init* and .fini*.
1761
1762         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
1763         and addends used in stub names to 32 bits.
1764         (elf32_hppa_size_stubs): Likewise.
1765
1766         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
1767         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
1768         not bfd_put_64.  Fix minor comment typo and formatting.
1769
1770         Changes to create multiple linker stubs, positioned immediately
1771         before the section where they are required.
1772         * elf32-hppa.c: Don't include hppa_stubs.h.
1773         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
1774         (elf32_hppa_stub_hash_table): Delete.
1775         (elf32_hppa_link_hash_entry): Delete.
1776         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
1777         stub_hash_table, and store the struct here rather than a pointer.
1778         Delete output_symbol_count.  Add offset array.  Change
1779         global_value to a bfd_vma.
1780         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
1781         (elf32_hppa_stub_hash_traverse): Delete.
1782         (elf32_hppa_name_of_stub): Delete.
1783         (elf32_hppa_link_hash_lookup): Delete.
1784         (elf32_hppa_link_hash_traverse): Delete.
1785         (elf32_hppa_stub_hash_table_init): Delete.
1786         (elf32_hppa_size_of_stub): Pass input section and offset rather
1787         than location and calculate location here.  Don't pass name as all
1788         stubs are now the same size.
1789         (elf32_hppa_stub_hash_newfunc): Init new fields.
1790         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
1791         too.
1792         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
1793         comparing against ints.  Rewrite stub handling code.
1794         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
1795         Case enums to int before comparing against ints.  Remove
1796         bfd_reloc_dangerous case.
1797         (elf32_hppa_build_one_stub): Rewrite.
1798         (elf32_hppa_size_one_stub): New function.
1799         (elf32_hppa_build_stubs): Rewrite.
1800         (elf32_hppa_size_stubs): Pass in linker call-back functions.
1801         Rewrite stub-handling specific code.
1802
1803         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
1804
1805         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
1806
1807         * hppa_stubs.h: Delete.
1808         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
1809         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
1810         * Makefile.in: Regenerate.
1811
1812         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
1813         e_nlrsel.
1814
1815         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
1816
1817         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
1818         and section name for bfd_reloc_notsupported error message.
1819         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
1820         bfd_reloc_notsupported.
1821         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
1822
1823         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
1824         undefined weak symbols for all relocs.
1825         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
1826         offsets are relative to one past the delay slot.
1827         (elf32_hppa_size_stubs): Account for reloc addend when calculating
1828         branch destination.  Put addend into stub name too.
1829         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
1830         adjust by 8 when deciding whether a linker stub is needed.  Put
1831         addend into stub name as for above.
1832
1833         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
1834         various args and vars.
1835         (elf32_hppa_bfd_final_link_relocate): Here too.
1836         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
1837         inner block var to avoid shadowing.
1838
1839         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
1840         unsigned.
1841         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
1842         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
1843         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
1844
1845         * libhppa.h: Change practically all unsigned ints to plain ints.
1846         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
1847         prototypes.
1848
1849         From Ryan Bradetich  <rbradetich@uswest.net>
1850         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
1851         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
1852         suit above.
1853         From  David Huggins-Daines  <dhd@linuxcare.com>
1854         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
1855         to the new OP_* ones.
1856
1857         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
1858         error exit.  Bail out earlier on plabel relocs that we aren't
1859         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
1860         string, and then don't free our copy.
1861         (elf32_hppa_build_one_stub): Make insn unsigned int.
1862
1863         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
1864         available with BL, not BE and BLE.
1865
1866         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
1867         code for elf arg relocs.
1868         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
1869         argument with elf_link_hash_entry h.  Handle undefined weak
1870         symbols.  Move $global$ lookup from here...
1871         (elf32_hppa_relocate_section): ...to here.  Return correct error
1872         message for non-handled relocs.
1873         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
1874         wrong test was -0x3ffff to +0x40000.
1875
1876         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
1877         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
1878         Handle them as such.
1879         (elf_hppa_relocate_insn): Fix a typo.
1880
1881         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
1882         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
1883         assemble_17, assemble_21): Delete.
1884         Supply defines for all 64 possible opcodes.
1885         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
1886         formats.  Handle COMICLR.
1887         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
1888         -10, -16, 16, 22.
1889
1890         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
1891         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
1892         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
1893         to suit.
1894         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
1895         the local syms - did this code get deleted accidentally?  Ignore
1896         undefined and undefweak syms.
1897
1898         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
1899         block.  Use it instead of elf64_hppa_hash_table (info).
1900         (elf_hppa_final_link_relocate): Use hppa_info instead of
1901         elf64_hppa_hash_table (info).
1902
1903         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1904         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1905         (hppa_rebuild_insn): Mask immediate bits here instead.
1906         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1907
1908 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
1909
1910         * section.c (struct sec): Add id field.  Tidy comment formatting.
1911         (bfd_make_section_anyway): Set id.
1912         (STD_SECTION): Init id too.
1913         Change CONST to const throughout.
1914         * archures.c (bfd_arch_info): Tidy comment.
1915         (bfd_arch_list): Change a CONST to const.
1916         * libbfd-in.h: Tidy comments and replace CONST with const.
1917         * elf-bfd.h: Likewise.
1918         * libbfd.h: Regenerate.
1919         * bfd-in2.h: Regenerate.
1920         * libcoff.h: Regenerate.
1921
1922 2000-07-07  DJ Delorie  <dj@redhat.com>
1923
1924         * archive.c (_bfd_write_archive_contents): Add an informative
1925         comment.
1926
1927 2000-07-06  Kazu Hirata  <kazu@hxi.com>
1928
1929         * srec.c: Fix formatting.
1930
1931 2000-06-05  DJ Delorie  <dj@redhat.com>
1932
1933         * MAINTAINERS: new
1934
1935 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
1936
1937         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
1938         value of PC-relative offsets.
1939
1940 2000-07-03  Jim Wilson  <wilson@cygnus.com>
1941
1942         * elf64-alpha.c (alpha_elf_size_info): New.
1943         (elf_backend_size_info): Define to alpha_elf_size_info.
1944         * elfcode.h (elf_size_info): Change hash bucket size to 4.
1945
1946 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
1947
1948         * elf32-mips.c: Include elf32-target.h again for the traditional
1949         MIPS targets.
1950
1951 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
1952
1953         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
1954         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
1955         (avr_info_to_howto_rela): Likewise.
1956         (elf32_avr_gc_mark_hook): Likewise.
1957         (elf32_avr_gc_sweep_hook): Likewise.
1958         (elf32_avr_relocate_section): Likewise.
1959
1960 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
1961
1962         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
1963         an external symbol for a non-shared, non-relocatable link.
1964
1965 2000-07-03  Nick Clifton  <nickc@redhat.com>
1966
1967         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
1968         is an external symbol.
1969         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
1970         external symbol.
1971
1972 2000-07-03  Kazu Hirata  <kazu@hxi.com>
1973
1974         * reloc16.c: Fix formatting.
1975
1976 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
1977
1978         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
1979         to add a new target for traditional mips i.e
1980         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
1981         * configure.in: Likewise.
1982         * configure: Rebuild.
1983         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
1984         bfd_target_vector.
1985         (bfd_elf32_tradlittlemips_vec): Likewise.
1986         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
1987         to see that elfNN_bed does not get redefined even if the target file
1988         is included twice for a chip. See elf32-mips.c.
1989
1990 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
1991
1992         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
1993         (CLEANFILES): Add DEPA.
1994         * Makefile.in: Regenerate.
1995
1996 2000-06-30  DJ Delorie  <dj@cygnus.com>
1997
1998         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
1999         can't assume the PE header is at 0x80.
2000
2001 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
2002
2003         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
2004
2005 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
2006
2007         * go32stub.h: Update stub.
2008
2009 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
2010
2011         * archures.c (bfd_mach_avr5): Define.
2012         * bfd-in2.h (bfd_mach_avr5): Define.
2013         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
2014         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
2015         (compatible): Update comment.  Add missing test.
2016         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
2017         for avr2 and avr4.  Simplify 8K wrap code.
2018         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
2019         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
2020
2021 2000-06-26  Kazu Hirata  <kazu@hxi.com>
2022
2023         * coff-h8300.c: Fix formatting.
2024         * cpu-h8300.c: Likewise.
2025
2026 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
2027
2028         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
2029         for local symbols whose names are unknown.
2030
2031 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
2032
2033         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
2034         find one.
2035         * Makefile.in: Regenerate.
2036         * doc/Makefile.in: Regenerate.
2037
2038 2000-06-20  H.J. Lu  <hjl@gnu.org>
2039
2040         * Makefile.am: Rebuild dependency.
2041         * Makefile.in: Rebuild.
2042
2043 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2044
2045         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
2046         (elf_backend_copy_indirect_symbol): Map to the new function.
2047
2048 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
2049
2050         * archive.c (normalize): Correct pointer comparison when checking
2051         for backslashes.
2052         (bfd_bsd_truncate_arname): Likewise.
2053         (bfd_gnu_truncate_arname): Likewise.
2054
2055 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
2056
2057         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
2058         sections elf_{text,data}_{section,symbol}.
2059         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
2060         (_bfd_mips_elf_hide_symbol): New function.
2061         (elf_backend_hide_symbol): Map to the new function.
2062         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
2063         definitions of mips_elf_{text,data}_{section,symbol}.
2064         (mips_elf_local_relocation_p): Try to find the direct symbol
2065         based on new check_forced argument.
2066         (mips_elf_calculate_relocation): Use new version of
2067         mips_elf_local_relocation_p.
2068         (mips_elf_relocate_section): Likewise.
2069         (_bfd_mips_elf_relocate_section): Likewise.
2070         (mips_elf_sort_hash_table): Only assert that have enough GOT
2071         space.
2072         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
2073         entry if the relocation based on the new external argument.
2074         (mips_elf_create_dynamic_relocation): Assert that we have a
2075         section contents allocated where we can swap out the dynamic
2076         relocations.
2077         (mips_elf_calculate_relocation): Find the real hash-table entry
2078         correctly by using h->root.root.type.  Only create a dynamic
2079         relocation entry if the symbol is defined in a shared library.
2080         Create an external GOT entry for the GOT16 relocation if the
2081         symbol was forced local.
2082         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
2083         dynamic index if the symbol was forced local.
2084
2085 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2086
2087         * elf32-mips.c: Fix typos in comments.
2088
2089 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
2090
2091         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
2092         CORE_VERSION_1.
2093
2094 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
2095
2096         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
2097         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
2098         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
2099         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
2100         (bfd_elf32_m68hc11_vec): Likewise.
2101         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
2102         Supports 68hc11 & 68hc12  at the same time.
2103         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
2104         bfd_target_vector.
2105         (bfd_elf32_m68hc11_vec): Likewise.
2106         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
2107         * archures.c (bfd_m68hc12_arch): Define and register in global list
2108         (bfd_m68hc11_arch): Likewise.
2109         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
2110         BFD_RELOC_M68HC11_3B): Define.
2111         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
2112         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
2113
2114 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2115
2116         * elf_bfd.h (struct elf_backend_data): Add info argument to
2117         elf_backend_hide_symbol.
2118         (_bfd_elf_link_hash_hide_symbol): Likewise.
2119         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
2120         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
2121         * elflink.h (elf_link_add_object_symbols): Likewise.
2122         (elf_link_assign_sym_version): Likewise.
2123
2124 2000-06-18  H.J. Lu  <hjl@gnu.org>
2125
2126         * coff-i386.c (coff_i386_reloc): Don't return in case of
2127         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
2128         Compensate PE relocations when linking with non-PE object
2129         files to generate a non-PE executable.
2130
2131 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
2132
2133         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
2134         GOT entries if we're doing a static link or -Bsymbolic link.
2135
2136 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
2137
2138         * elflink.h (elf_link_adjust_relocs): Check for and call backend
2139         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
2140         available.
2141         (elf_link_output_relocs): Likewise.
2142         (elf_reloc_link_order): Likewise.
2143
2144 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2145
2146         * archures.c (enum bfd_architecture): #define constants for
2147         PowerPc and RS6000 machine numbers.
2148         * bfd-in2.h: Regenerate.
2149         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
2150         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
2151         and RS6000 machine numbers using #defined constants from
2152         archures.c.
2153         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
2154         machine numbers using #defined constants from archures.c.  Add
2155         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
2156         64-bit words in 620 entry.
2157         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
2158         RSC, and RS2.
2159         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
2160
2161 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
2162
2163         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
2164         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
2165         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
2166
2167 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2168
2169         * bfd-in.h (bfd_family_coff): Define.
2170         * bfd-in2.h: Regenerate.
2171         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
2172         coff_find_nearest_line): Check COFFness using bfd_family_coff()
2173         instead of bfd_target_coff_flavour.
2174         * cofflink.c (_bfd_coff_final_link): Likewise.
2175         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
2176         exclude XCOFF files.
2177         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2178         Likewise.
2179         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
2180         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
2181         * xcofflink.c (XCOFF_XVECP): Delete.
2182         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
2183         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
2184         bfd_xcoff_record_link_assignment,
2185         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
2186         check for bfd_target_xcoff_flavour.
2187
2188 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2189
2190         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
2191         files on AIX 4.3.
2192         (read_hdr): New function.
2193         (rs6000coff_core_p): Store mstsave or __context64 struct instead
2194         of trying to extract individual registers.  Set abfd->arch_info
2195         to match the architecture that created the core file.
2196         (rs6000coff_get_section_contents): Delete.
2197         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
2198
2199 2000-06-14  H.J. Lu  <hjl@gnu.org>
2200
2201         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
2202         is NULL.
2203
2204 2000-06-13  H.J. Lu  <hjl@gnu.org>
2205
2206         * configure: Regenerate.
2207
2208 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
2209
2210         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
2211         armpei_little_vec.
2212
2213 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
2214
2215         * configure.in (VERSION): Update to show this is the CVS mainline.
2216
2217 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
2218
2219         * elf32-d10v.c: Include elf/d10v.h
2220         (enum reloc_type): Delete.
2221         * elf32-d30v.c: Include elf/d30v.h
2222         (enum reloc_type): Delete.
2223
2224         * Makefile.am: Run "make dep-am" to regenerate dependencies.
2225         * Makefile.in: Regenerate.
2226
2227         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
2228         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
2229         move HOWTOs into elf_howto_table.
2230         (R_386_standard, R_386_ext_offset): Define.
2231         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
2232         (elf_i386_reloc_type_lookup): Modify calculation of index into
2233         elf_howto_table since we've removed the padding.
2234         (elf_i386_info_to_howto_rel): Likewise.
2235         (elf_i386_relocate_section): Likewise.
2236
2237 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2238
2239         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
2240
2241 2000-06-05  H.J. Lu  <hjl@gnu.org>
2242
2243         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
2244         an error when seeing an undefined symbol with hidden/internal
2245         attribute. It is handled in *_relocate_section ().
2246
2247 2000-06-05  H.J. Lu  <hjl@gnu.org>
2248
2249         * elflink.h (elf_fix_symbol_flags): Follow the link for the
2250         indirect symbol for the ELF_LINK_NON_ELF bit.
2251         (elf_link_output_extsym): Don't output the indirect symbol even
2252         if the ELF_LINK_NON_ELF bit is set.
2253
2254 2000-06-01  J.T. Conklin  <jtc@redback.com>
2255
2256         * config.bfd (i[3456]86-*-netbsdelf*): New target.
2257         (i[3456]86-*-netbsdaout*): New target.
2258         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
2259         (i[3456]86-*-openbsd*): Likewise.
2260
2261 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
2262
2263         * trad-core.c: From hpux-core.c, include <dirent.h> or
2264         <sys/ndir.h> when possible.
2265
2266 2000-05-31  Nick Clifton  <nickc@cygnus.com>
2267
2268         * opintl.h (_(String)): Explain why dgettext is used instead
2269         of gettext.
2270
2271 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
2272
2273         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
2274         definitions.  We must not assume they are sorted in the file
2275         according to their index numbers.
2276
2277 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
2278
2279         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
2280         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
2281         R_PARISC_DIR17F are for absolute branches; Handle them as such.
2282
2283 2000-05-30  Nick Clifton  <nickc@cygnus.com>
2284
2285         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
2286         80960CA, 80960MC as valid machine names.
2287
2288 2000-05-30  H.J. Lu  <hjl@gnu.org>
2289
2290         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
2291         visibility bits if the symbol is undefined. Correctly handle
2292         weak undefined symbols with hidden and internal attributes.
2293
2294         * elflink.h (elf_link_add_object_symbols): Always turn the
2295         symbol into local if it has the hidden or internal attribute.
2296
2297 2000-05-29  Philip Blundell  <philb@gnu.org>
2298
2299         * ppcboot.c:  Add packed attribute if compiling with GCC.
2300
2301 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
2302
2303         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
2304
2305 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
2306
2307         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
2308         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
2309         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
2310         a few old comments.
2311
2312 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
2313
2314         * Makefile.am: Update dependencies with "make dep-am"
2315         * Makefile.in: Regenerate.
2316
2317         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
2318         bindtextdomain): Replace defines with those from intl/libgettext.h
2319         to quieten gcc warnings.
2320
2321 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
2322
2323         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
2324
2325         * archive.c (normalize, bfd_bsd_truncate_arname,
2326         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
2327         file names with backslashes.
2328
2329         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
2330         before opening it.
2331
2332         * sysdep.h: Include filenames.h.
2333
2334 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
2335
2336         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
2337
2338 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
2339
2340         * elf64-sparc.c (sparc64_elf_relax_section): New.
2341         (sparc64_elf_relocate_section): Optimize tail call into branch always
2342         if possible.
2343         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2344         (elf32_sparc_relax_section): New.
2345
2346 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
2347
2348         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
2349         Remove unusued variables.
2350         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
2351         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
2352         previous fix, so that shared libs really don't influence targets
2353         extension mask and memory model.
2354
2355 2000-05-23  H.J. Lu  <hjl@gnu.org>
2356
2357         * elf64-alpha.c (elf64_alpha_relocate_section): Check
2358         h->root.other not h->other.
2359         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2360
2361         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
2362
2363 2000-05-23  H.J. Lu  <hjl@gnu.org>
2364
2365         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
2366         undefined symbol with the non-default visibility attributes.
2367         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2368         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2369         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2370         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2371         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2372         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2373         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2374         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2375         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2376         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
2377         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2378
2379 2000-05-22  Richard Henderson  <rth@cygnus.com>
2380
2381         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
2382         PCREL22, PCREL64I.  Zero size of special relocs.
2383         (elf64_ia64_reloc_type_lookup): Likewise.
2384         (USE_BRL, oor_brl, oor_ip): New.
2385         (elf64_ia64_relax_section): New.
2386         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
2387         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
2388         (elf64_ia64_relocate_section): Likewise.
2389         (bfd_elf64_bfd_relax_section): New.
2390         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
2391         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
2392         * bfd-in2.h, libbfd.h: Regenerate.
2393
2394 2000-05-22  Nick Clifton  <nickc@cygnus.com>
2395
2396         * configure.in : Add peigen.lo to MIPS PE targets.
2397         * configure: Regenerate.
2398
2399 2000-05-22  Momchil Velikov  <velco@fadata.bg>
2400
2401         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
2402         only if it is known for both input and output bfds. Separate
2403         error message strings as in some languages, it may be necessary
2404         to change more than one place in the string to change between
2405         'big' and 'little'.
2406
2407         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
2408         endianess checks, call _bfd_generic_verify_endian_match() instead.
2409
2410         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2411
2412         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
2413
2414         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
2415         endianess before checking bfd flavours.
2416
2417 2000-05-22  H.J. Lu  <hjl@gnu.org>
2418
2419         * elflink.h (elf_link_output_extsym): Clear the visibility
2420         field for symbols not defined locally.
2421
2422 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
2423
2424         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2425         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2426         (hppa_rebuild_insn): Mask immediate bits here instead.
2427         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2428
2429 2000-05-18  Momchil Velikov <velco@fadata.bg>
2430
2431         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
2432         relocs for an executable, ensure that they are virtual addresses.
2433
2434 2000-05-18  Jeffrey A Law  (law@cygnus.com)
2435
2436         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
2437
2438 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
2439             Rick Gorton             <gorton@scrugs.lkg.dec.com>
2440
2441         * elflink.h: Add emitrelocations support: when enabled, relocation
2442         information and relocation sections are put into final output
2443         executables.  If the emitrelocations flag is set, do the following:
2444         (elf_bfd_final_link): Emit relocation sections.
2445         (elf_link_input_bfd): Compute relocation section contents.
2446         (elf_gc_sections): Don't clean relocation sections.
2447
2448 2000-05-16  Catherine Moore  <clm@cygnus.com>
2449
2450         * som.c (som_decode_symclass):  Recognize weak symbols.
2451
2452 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
2453
2454         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
2455         read idata section only from dataoff.
2456         (pe_print_edata): Correctly check for valid eat_member.
2457
2458 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
2459
2460         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
2461
2462 2000-05-14  Philip Blundell  <philb@gnu.org>
2463
2464         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
2465
2466 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
2467
2468         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
2469
2470         * peigen.c (pe_print_idata): Look for .idata section and print
2471         info even if data directory has zero entries.  Read idata section
2472         starting from dataoff, and adjust all data offsets to suit.  Cast
2473         all bfd_vma vars to unsigned long before passing to fprintf.
2474         * peigen.c (pe_print_edata): Similarly, look for .edata section
2475         and print info even if data directory has zero entries.  Cast
2476         all bfd_vma vars to unsigned long before passing to fprintf.
2477
2478         From Szabolcs Szakacsits <szaka@F-Secure.com>
2479         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
2480         directory size which may be bogus.
2481         * peigen.c (pe_print_edata): Similarly.
2482
2483 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
2484
2485         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
2486         section is empty.
2487         (copy_private_bfd_data): Allow for space possibly taken up by elf
2488         headers when calculating segment physical address from lma.
2489
2490 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
2491
2492         * versados.c (versados_scan): Init stringlen and pass_2_done.
2493
2494         * trad-core.c (trad_unix_core_file_p): Return
2495         bfd_error_wrong_format rather than bfd_error_file_truncated.
2496
2497         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
2498         add_data_entry.  DataDirectory virtual address is relative.
2499         (pe_print_idata): Account for relative DataDirectory virtual
2500         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
2501         (pe_print_edata): Similarly.
2502
2503         From Szabolcs Szakacsits <szaka@F-Secure.com>
2504         * peigen.c (dir_names): Add Delay Import Directory.
2505         (pe_print_idata):  Always search for bfd section containing
2506         idata address rather than looking up section name.  Print this
2507         section name rather than .idata.
2508         (pe_print_edata): Similarly.  Also print some fields as %08lx.
2509         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
2510         Win32Version.
2511
2512 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
2513
2514         * xcoff.h: Rename to xcoff-target.h
2515         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
2516         * coff-rs6000.c: Ditto.
2517         * coff64-rs6000.c: Ditto.
2518         * coff-pmac.c: Ditto.
2519         * Makefile.in: Regenerate.
2520
2521 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
2522
2523         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
2524         Change U802TOC64MAGIC to U803XTOCMAGIC.
2525
2526 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
2527
2528         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
2529         * bfd-in.h: Prototype bfd_elf_get_arch_size.
2530         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
2531
2532 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
2533
2534         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
2535
2536 2000-05-03  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2537
2538         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
2539         hidden and internal symbols.
2540         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
2541         visibility.
2542         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
2543         assign a PLT or GOT entry to symbols with hidden and
2544         internal visibility.
2545
2546 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
2547
2548         * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
2549         the .bss section.
2550         * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2551
2552 2000-05-02  H.J. Lu  <hjl@gnu.org>
2553
2554         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
2555         ELFOSABI_SYSV.
2556
2557 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2558
2559         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
2560         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
2561         dependencies.
2562         * Makefile.in: Regenerate.
2563
2564 2000-05-01  Jim Wilson  <wilson@cygnus.com>
2565
2566         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
2567         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
2568         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
2569         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
2570         * Makefile.in: Rebuild.
2571
2572 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2573
2574         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
2575         doesn't work very well.
2576
2577         * elf-hppa.h (elf_hppa_internal_shdr): Define.
2578         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
2579         Set hdr->s_type to 1 if ARCH_SIZE == 32.
2580         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
2581         (elf_hppa_info_to_howto): Likewise.
2582         (elf_hppa_info_to_howto_rel): Likewise.
2583         (elf_hppa_reloc_type_lookup): Likewise.
2584         (elf_hppa_is_local_label_name): Likewise.
2585         (elf_hppa_fake_sections): Likewise.
2586         (elf_hppa_final_write_processing): Likewise.
2587         (elf_hppa_howto_table): Fully initialise all entries.
2588         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
2589         (elf_hppa_info_to_howto): Likewise.
2590         (elf_hppa_info_to_howto_rel): Likewise.
2591         (elf_hppa_reloc_type_lookup): Likewise.
2592         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
2593         elf_hppa_unmark_useless_dynamic_symbols,
2594         elf_hppa_remark_useless_dynamic_symbols,
2595         elf_hppa_record_segment_addrs, elf_hppa_final_link,
2596         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
2597         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
2598         elf32-hppa.c mess is cleaned up.
2599         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
2600         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
2601         r_field then call hppa_field_adjust inline func with variable
2602         r_field arg, instead call hppa_field_adjust with fixed arg.
2603         In case R_PARISC_PCREL22F, don't set r_field.
2604         (elf_hppa_relocate_insn): Change args and return type to unsigned
2605         int.  Call re_assemble_* funcs to do the work.
2606
2607         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
2608         sign extending.
2609
2610         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
2611         extending.
2612         (sign_extend): Mask first before sign extending.
2613         (low_sign_extend): Rewrite without condition expression.
2614         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
2615         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
2616         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2617         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
2618         result as function return value rather than through pointer arg.
2619         Accept unsigned int args, and return unsigned int.
2620         (re_assemble_3): New.  Combines function of dis_assemble_3 with
2621         re-assembly of opcode and immediate.
2622         (re_assemble_12): Likewise.
2623         (re_assemble_16): Likewise.
2624         (re_assemble_17): Likewise.
2625         (re_assemble_21): Likewise.
2626         (re_assemble_22): Likewise.
2627         (hppa_field_adjust): Rewrite and document, paying attention to
2628         size of types and signed/unsigned issues.
2629         (get_opcode): Shift before masking.
2630         (FDLW): Rename to FLDW.
2631         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
2632         (hppa_rebuild_insn): Change args and return value to unsigned
2633         int.  Make use of re_assemble_*.  Correct case 11.
2634
2635         * dep-in.sed: Handle ../opcodes/.
2636         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
2637         elf64-hppa.h, hppa_stubs.h, xcoff.h.
2638         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
2639         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
2640         elfarm-nabi.lo dependencies outside of auto-dependency area.
2641         Regenerate dependencies.
2642         * Makefile.in: Regenerate.
2643
2644         * configure.in (TRAD_HEADER): Test non-null before
2645         AC_DEFINE_UNQUOTED.
2646         * configure: Regenerate.
2647
2648         * reloc.c: Fix mis-spelling in comment.
2649
2650 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
2651
2652         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
2653         * vms.c (vms_openr_next_archived_file): Return NULL.
2654
2655 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
2656
2657         * coffcode.h Copy changes mistakenly done to libcoff.h in
2658         4/24/2000 patch.
2659
2660 2000-04-29  Andreas Jaeger  <aj@suse.de>
2661
2662         * libbfd-in.h: Correctly check GCC version.
2663         * bfd-in.h: Likewise.
2664         * libhppa.h: Likewise.
2665         * libbfd.h: Regenerate.
2666         * bfd-in2.h: Regenerate.
2667
2668 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
2669
2670         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
2671         coffdu-rs6000.{lo,c}.
2672         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
2673         on xcoff.h
2674         * Makefile.in: Regenerate.
2675         * xcoff.h: New file.
2676         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
2677         * coff-rs6000.c: Move all declarations and defines that are
2678         common to the xcoff backends into xcoff.h
2679         * coff64-rs6000.c: Ditto,
2680
2681 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
2682
2683         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
2684         _bfd_coff_force_symnames in strings and
2685         _bfd_coff_debug_string_prefix_length to their default values.
2686         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
2687
2688 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
2689
2690         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
2691         _bfd_coff_force_symnames in strings and
2692         _bfd_coff_debug_string_prefix_length to their default values.
2693
2694 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
2695
2696         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
2697         Check local_got_refcounts before dereferencing.
2698
2699         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
2700         before deciding we don't need R_PPC_PLT32 relocation.
2701         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
2702         dereferencing.
2703
2704         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
2705
2706         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
2707         .plt entries.
2708         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
2709         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
2710         (elf_i386_relocate_section): Allow for .plt to go missing.
2711         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
2712         can use a relative reloc for got as elf_i386_relocate_section.
2713         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
2714
2715 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
2716
2717         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
2718
2719 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
2720
2721         * Makefile.am (coff64-rs6000.lo): New rule.
2722         * Makefile.in: Regenerate.
2723         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
2724         xcoff_is_local_label_name, xcoff_rtype2howto,
2725         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
2726         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
2727         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
2728         (NO_COFF_SYMBOLS): Define.
2729         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
2730         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
2731         internally.
2732         (MINUS_ONE): New macro.
2733         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
2734         relocation.
2735         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
2736         coff_SWAP_aux_out): Map to the new functions.
2737         * coff64-rs6000.c: New file.
2738         * libcoff.h (bfd_coff_backend_data): Add new fields
2739         _bfd_coff_force_symnames_in_strings and
2740         _bfd_coff_debug_string_prefix_length.
2741         (bfd_coff_force_symnames_in_strings,
2742         bfd_coff_debug_string_prefix_length): New macros for above fields.
2743         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
2744         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
2745         of using coff_swap_sym_in directly.
2746         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
2747         (coff_set_flags) Set magic for XCOFF64.
2748         (coff_compute_section_file_positions): Add symbol name length to
2749         string section length if bfd_coff_debug_string_prefix_length is
2750         true.
2751         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
2752         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
2753         using coff_swap_lineno_in directly.
2754         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
2755         and _bfd_coff_debug_string_prefix_length fields.
2756         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
2757         symbol names into strings table when
2758         bfd_coff_force_symnames_in_strings is true.
2759         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
2760         SET_RELOC_VADDR): New macros.
2761         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
2762         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
2763         code.
2764         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
2765         changes within RS6000COFF_C specific code.
2766         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
2767         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
2768         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2769         Extend existing hack on target name.
2770         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
2771         target name.
2772         * coff-tic54x.c (ticof): Keep up to date with new fields
2773         in bfd_coff_backend_data.
2774         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
2775         targ_selvecs to include rs6000coff64_vec for rs6000.
2776         * configure.in: Add rs6000coff64_vec case.
2777         * cpu-powerpc.c: New bfd_arch_info_type.
2778
2779 2000-04-24  Jeffrey A Law  (law@cygnus.com)
2780
2781         * config.bfd: Only disable elf32-hppa vectors, not all of the
2782         BSD and OSF configuration support.  Provide (disabled) clauses
2783         for PA64 support.
2784         * configure.in: Add clause for PA64 support.
2785         * configure: Rebuilt.
2786
2787         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
2788         (bfd_elf64_hppa_vec): Declare.
2789
2790         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
2791         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
2792         (elf64-hppa.lo): Add dependencies.
2793         * Makefile.in: Rebuilt.
2794
2795         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
2796
2797 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
2798
2799         * libhppa.h (dis_assemble_16): New function.
2800         (pa_arch): Added pa20w element.
2801
2802 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
2803
2804         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
2805         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
2806         bfd_elf64_slurp_reloc_table.
2807
2808         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
2809         definitions to get external names.
2810         (elf_write_relocs): Renamed from write_relocs and make global.
2811         (elf_slurp_reloc_table): Make global.
2812         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
2813
2814         * archive.c (hpux_uid_gid_encode): New function.
2815         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
2816         defined and the ID is greater than 99999.
2817         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
2818         special uid/gid fields into 32 bit values.
2819
2820 2000-04-21  Matthew Green  <mrg@cygnus.com>
2821
2822         * config.bfd: Add NetBSD/sparc64 support.
2823
2824 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
2825                           David Mosberger  <davidm@hpl.hp.com>
2826                           Timothy Wall <twall@cygnus.com>
2827                           Jim Wilson  <wilson@cygnus.com>
2828
2829         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
2830         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
2831         (BFD64_BACKENDS): Add elf64-ia64.lo.
2832         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
2833         (cpu-ia64.lo, elf64-ia64.lo): New rules.
2834         * Makefile.in: Rebuild.
2835         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
2836         (bfd_ia64_arch): Declare.
2837         (bfd_archures_list): Add bfd_ia64_arch.
2838         * bfd-in2.h: Rebuild.
2839         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
2840         * configure: Rebuild.
2841         * configure.host: (ia64-*-linux*): New host.
2842         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
2843         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
2844         * elf.c (prep_headers): Add bfd_arch_ia64.
2845         * libbfd.h: Rebuild.
2846         * reloc.c: Add IA-64 relocations.
2847         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
2848         Declare.
2849         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
2850         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
2851
2852 2000-04-21  Richard Henderson  <rth@cygnus.com>
2853
2854         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
2855         contents when performing a partial link.
2856         (bfd_elf_d30v_reloc_21): Likewise.
2857
2858 2000-04-20  H.J. Lu  <hjl@gnu.org>
2859
2860         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
2861         patch to symbols defined by a shared object.
2862         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
2863
2864 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2865
2866         K&R compiler fixes.
2867         * dwarf2.c (concat_filename): Avoid string literal concatenation.
2868         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
2869
2870 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
2871
2872         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
2873         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
2874         (coff-ia64.lo): Add dependency.
2875         * Makefile.in: Regenerate.
2876         * coff-ia64.c: New file.
2877         * efi-app-ia32.c: Ditto.
2878         * efi-app-ia64.c: Ditto.
2879         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
2880         (coff_set_flags): Ditto.
2881         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
2882         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
2883         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
2884         * configure: Regenerate.
2885         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
2886         (PUT_OPTHDR_IMAGE_BASE): Ditto.
2887         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2888         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2889         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2890         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2891         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2892         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2893         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2894         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2895         (GET_PDATA_ENTRY): Ditto.
2896         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
2897         data_start.  Use above macros to read fields that are 64 bit wide for
2898         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
2899         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
2900         FileAlignment and SectionAlignment to minimum alignment if they
2901         are zero.
2902         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
2903         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
2904         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
2905         Use above macros to write fields that are 64 bit wide for
2906         COFF_WITH_PEP64.
2907         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
2908         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
2909         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
2910         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
2911         begin address, end address, and unwind info address only.  Use
2912         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
2913         print addresses.
2914         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
2915         HIGH3ADJ relocation names.
2916         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
2917         * targets.c: Declare bfd_efi_app_ia32_vec and
2918         bfd_efi_app_ia64_vec.
2919         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
2920         bfd_efi_app_ia64_vec.
2921
2922 2000-04-17  Timothy Wall  <twall@cygnus.com>
2923
2924         * bfd-in2.h: Add prototypes for tic54x load page access.
2925         * bfd-in.h: Regenerate.
2926         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
2927         in customized _set_arch_mach function.
2928         * coffcode.h (coff_set_alignment_hook): Set section load page if
2929         the appropriate macro is defined.
2930         (write_object_contents): Read section load page.
2931
2932 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
2933
2934         * elf32-hppa.h: Update copyright date.
2935
2936         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
2937         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
2938
2939         * elf32-d30v.c (MAX32): Don't use LL suffix.
2940         (MIN32): Define in terms of MAX32.
2941         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
2942
2943         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
2944         expression.
2945
2946         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
2947
2948 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
2949
2950         * dep-in.sed: Match space before file name, not after.
2951         * Makefile.am: Regenerate dependencies.
2952         * Makefile.in: Regenerate.
2953
2954         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
2955         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
2956         extend without an if statement.
2957
2958 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
2959
2960         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
2961         signed quantites.
2962         * elf32-mips.c (gprel16_with_gp): Likewise.
2963         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
2964         here using -0x40000, not (int)0xfffc0000.
2965         (elf32_hppa_size_of_stub): Likewise.
2966
2967 2000-04-11  Timothy Wall  <twall@cygnus.com>
2968
2969         * coff-tic54x.c: Now builds with all targets.
2970         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
2971         * Makefile.in: Regenerate.
2972         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
2973         unitialized variable.
2974
2975 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2976
2977         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
2978         --enable-build-warnings option.
2979         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2980         * Makefile.in, configure: Re-generate.
2981
2982 2000-04-07  Nick Clifton  <nickc@cygnus.com>
2983
2984         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
2985         BFD_RELOC_THUMB_PCREL_BLX.
2986
2987         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2988         R_ARM_XPC25 and R_ARM_THM_PC22.
2989
2990         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
2991         R_ARM_XPC25 and R_ARM_THM_XPC22.
2992         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
2993         R_ARM_[XPC25|THM_XPC22].
2994
2995         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
2996         elf/arm-oabi.h to elf/arm.h
2997
2998         * Makefile.am: Fix dependency for elfarm-oabi.c
2999         * Makefile.in: Regenerate.
3000
3001         * bfd-in2.h: Regenerate.
3002         * libbfd.h: Regenerate.
3003
3004 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3005
3006         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
3007         and restore it on failure.  Release newly allocated tdata on
3008         failure.
3009
3010 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
3011
3012         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
3013         (decode_line_info): Set it.  Report error if unit->line_offset is
3014         equal to or larger than it.
3015
3016 2000-04-07  Timothy Wall  <twall@cygnus.com>
3017
3018         * targets.c: Added vecs for tic54x.
3019         * reloc.c: Added relocs for tic54x.
3020         * libbfd.h: Regenerated.
3021         * configure: Add TI COFF vecs for tic54x.
3022         * configure.in: Ditto.
3023         * config.bfd (targ_cpu): Recognize new tic54x target.
3024         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
3025         * bfd-in2.h: Add tic54x target and relocations.
3026         * Makefile.am, Makefile.in: Add tic54x target.
3027         * archures.c (bfd_archures_list): Add tic54x target.
3028         * coff-tic54x.c: New.
3029         * cpu-tic54x.c: New.
3030
3031 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3032
3033         * elfcore.h (elf_core_file_p): call backend_object_p which
3034         thereby gets an opportunity to update the arch/machine type.
3035
3036 2000-04-06  Timothy Wall  <twall@cygnus.com>
3037
3038         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
3039         class.  Handle SEC_CLINK and SEC_BLOCK flags.
3040         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
3041         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
3042
3043 2000-04-06  Nick Clifton  <nickc@cygnus.com>
3044
3045         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
3046         EF_INTERWORK if this is an unknown EABI.
3047         (elf32_arm_merge_private_bfd_data): Check EABI version
3048         numbers.  Only check EF_xxx flags if the EABI version number
3049         is unknown.
3050         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
3051         if the EABI version number is unknown.
3052         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
3053         if the EABI version number is unknown.
3054
3055 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3056
3057         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
3058         BFD_RELOC_SH_LOOP_END.
3059         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
3060         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
3061         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
3062         (sh_elf_reloc_loop): New function.
3063         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
3064         any more.
3065         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
3066         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
3067         * bfd-in2.h, libbfd.h: Regenerate.
3068
3069 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
3070
3071         * po/bfd.pot: Regenerate.
3072
3073         * Makefile.am: Remove extraneous mkdep comment.
3074         (MKDEP): Use gcc -MM rather than mkdep.
3075         (DEP): Quote when passing vars to sub-make.  Add warning
3076         message to end.
3077         (DEP1): Rewrite for "gcc -MM".
3078         (CLEANFILES): Add DEP2.
3079         Update dependencies.
3080         * Makefile.in: Regenerate.
3081
3082 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
3083
3084         * configure.in: Added corefile support for AIX 4.3.  In particular,
3085         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
3086         compiling rs6000-core.c.
3087         * configure: Regenerated.
3088
3089 2000-04-03  H.J. Lu  <hjl@gnu.org>
3090
3091         * cache.c (bfd_open_file): Unlink the output file only if
3092         it has non-zero size.
3093
3094 2000-04-01  Ken Block USG  <block@zk3.dec.com>
3095
3096         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
3097         relative relocations for non-loaded sections in shared objects.
3098         (elf64_alpha_check_relocs): Similarly.
3099
3100 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
3101
3102         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
3103         BFD_RELOC_16 to switch for extended relocs.
3104         (MY_swap_ext_reloc_in): New.
3105         (MY_swap_ext_reloc_out): New.
3106         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
3107         than NAME(aout,swap_ext_reloc_in) for extended relocs.
3108         (NAME(aout,squirt_out_relocs)): Similarly use
3109         MY_swap_ext_reloc_out.
3110         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
3111
3112 2000-04-03  Kazu Hirata  <kazu@hxi.com>
3113
3114         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
3115         the R_PCRWORD_B case.
3116
3117 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
3118
3119         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
3120         on some targets.
3121         * ihex.c : Ditto.
3122
3123 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
3124
3125         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
3126         HOWTO references to bfd_elf_generic_reloc, that have
3127         partial_inplace == true, now use the new function.  The function
3128         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
3129         extends its fixes to the R_M32R_{16,24,32} relocs.
3130         The new logic in m32r_elf_lo16_reloc() has been removed, and
3131         it instead calls the new routine to obtain that functionality.
3132
3133 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
3134
3135         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
3136         elf32_avr_check_relocs, avr_final_link_relocate,
3137         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
3138         elf32_avr_object_p): Add prototypes.
3139         (elf32_avr_gc_mark_hook): Add default for h->root.type.
3140         (bfd_elf_avr_final_write_processing): Make static.
3141
3142 2000-03-27  Denis Chertykov  <denisc@overta.ru>
3143
3144         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
3145         * archures.c (bfd_architecture): Add AVR architecture.
3146         (bfd_archures_list): Add reference to AVR architecture info.
3147         * elf.c (prep_headers): Handle bfd_arch_avr.
3148         * reloc.c: Add various AVR relocation enums.
3149         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
3150         list.
3151         * Makefile.am: Add support for AVR elf.
3152         * configure.in: Likewise.
3153         * config.bfd: Likewise.
3154         * Makefile.in: Regenerate.
3155         * configure: This too.
3156         * bfd-in2.h: And this.
3157         * libbfd.h: And this.
3158
3159 2000-03-24  H.J. Lu  <hjl@gnu.org>
3160
3161         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
3162         (elf64_alpha_find_reloc_at_ofs): Likewise.
3163
3164 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
3165
3166         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
3167         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
3168         allowable range used to be -2**(n-1) to 2**n-1.
3169         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
3170         "boolean overflow" with "bfd_reloc_status_type flag".
3171
3172 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
3173
3174         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
3175
3176 2000-03-14  Kazu Hirata  <kazu@hxi.com>
3177
3178         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
3179         of shrinks properly, including the last reloc.
3180
3181 2000-03-13  Kazu Hirata  <kazu@hxi.com>
3182
3183         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
3184         check for R_MOVL2.
3185
3186 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
3187
3188         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
3189         a format mismatch rather than an "error" from bfd_read such as
3190         bfd_error_file_truncated.
3191
3192 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
3193
3194         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
3195         sign-extension and big-endian compensation for
3196         R_MIPS_64 even in ld -r.
3197
3198 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
3199
3200         * elf32-mips.c (mips_elf_next_relocation): Rename from
3201         mips_elf_next_lo16_relocation, and generalize to look
3202         for any relocation type.
3203         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
3204         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
3205         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
3206         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
3207         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
3208         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
3209         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
3210         (mips_rtype_to_howto): Likewise.
3211         (mips_elf_calculate_relocation): Handle new relocs.
3212         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
3213         are paired.  The addend for R_MIPS_GNU_REL16_S2
3214         is shifted right two bits.
3215
3216 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
3217
3218         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
3219         comment, and ensure it doesn't happen again.
3220         (bfd_install_relocation): Same here.
3221         (_bfd_relocate_contents): Don't bother assigning unused signmask
3222         shift result.  Fix typos in comments.
3223         Remove trailing whitespace throughout file.
3224
3225 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
3226
3227         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
3228         * bfd-in2.h: Rebuild.
3229
3230 2000-03-06  Nick Clifton  <nickc@cygnus.com>
3231
3232         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
3233         sym_ptr_ptr fields.
3234         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
3235         (SIZEOF_ILF_STRINGS): Redefine.
3236         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
3237         relative reloc, as opposed to a section relative reloc.
3238         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
3239         not C_LABEL.
3240         Add length of symbol's prefix to string pointer.
3241         Store a pointer to the symbol in the symbol pointer table.
3242         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
3243         Initialise the symbol pointer table.
3244         Store the hint in the Hint/Name table.
3245         Make the jump reloc be symbol realtive, not section relative.
3246         Create an import symbol for imported code.
3247
3248 2000-03-06  Catherine Moore  <clm@cygnus.com>
3249
3250         * elf.c (swap_out_syms):  Check for null type_ptr.
3251
3252 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
3253
3254         * aout-target.h (MY(write_object_contents)): Remove unused
3255         and unusable "#if CHOOSE_RELOC_SIZE".
3256         * pc532-mach.c (MY(write_object_contents)): Ditto.
3257         * netbsd.h (MY(write_object_contents)): Ditto.
3258         * hp300hpux.c (MY(write_object_contents)): Ditto.
3259         * freebsd.h (MY(write_object_contents)): Ditto.
3260         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
3261
3262 2000-02-29  H.J. Lu  <hjl@gnu.org>
3263
3264         * peicode.h (jtab): Make it static.
3265
3266         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
3267         defined and COFF_IMAGE_WITH_PE is not defined.
3268         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
3269         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
3270
3271 2000-03-01  Nick Clifton  <nickc@cygnus.com>
3272
3273         * coff-arm.c (bfd_arm_process_before_allocation): Make
3274         'symndx' signed to prevent compile time warning.
3275
3276         * coff-mcore.c: Remove unused prototype for pe_object_p.
3277
3278         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
3279         functions that are not used when COFF_IMAGE_WITH_PE is
3280         defined.
3281         (struct sh_opcode): Change type of 'flags' field to unsigned
3282         long so that it can hold the USESAS flag.
3283
3284         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
3285
3286         * elf-m10300.c (mn10300_elf_relax_section): Initialise
3287         'sym_sec'.
3288
3289         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
3290         parameters.
3291         Remove unusued variables and code.
3292         (elf_backend_add_symbol_hook): Fix prototype.
3293
3294         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
3295         'srelgot'.
3296
3297         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
3298         'oldinst'.
3299
3300         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
3301         parameters.
3302         Remove unusued variables and code.
3303         (elf_backend_add_symbol_hook): Fix prototype.
3304
3305         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
3306
3307         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
3308         to unused function parameter.
3309
3310         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
3311         parameters.
3312         Use EMPTY_HOWTO to initialise empty howto slots.
3313         Remove unused variables.
3314
3315         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
3316
3317 2000-03-01  H.J. Lu  <hjl@gnu.org>
3318
3319         * aoutx.h (aout_link_input_section_std): Pass "true" to
3320         the undefined_symbol callback.
3321         (aout_link_input_section_ext): Likewise.
3322         * bout.c (get_value): Likewise.
3323         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3324         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
3325         Likewise.
3326         (alpha_relocate_section): Likewise.
3327         * coff-arm.c (coff_arm_relocate_section): Likewise.
3328         * coff-i960.c (coff_i960_relocate_section): Likewise.
3329         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3330         * coff-mips.c (mips_relocate_section): Likewise.
3331         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3332         * coff-sh.c (sh_relocate_section): Likewise.
3333         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3334         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
3335         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3336         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3337         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3338         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3339         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3340         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3341         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3342         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3343         * elf32-sh.c (sh_elf_relocate_section): Likewise.
3344         * elf32-v850.c (v850_elf_relocate_section): Likewise.
3345         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
3346         * elflink.h (elf_link_output_extsym): Likewise.
3347         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
3348         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
3349         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
3350
3351         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
3352         undefined_symbol callback when building shared library with
3353         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
3354         "true".
3355         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3356         * elf32-i386.c (elf_i386_relocate_section): Likewise.
3357         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3358         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3359         (elf32_mips_get_relocated_section_content): Likewise.
3360         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3361         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3362         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3363         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3364
3365 2000-02-28  Nick Clifton  <nickc@cygnus.com>
3366
3367         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
3368         * Makefile.in: Regenerate.
3369
3370         * configure.in: Add support for mips and sh pe vectors.
3371         * configure: regenerate.
3372
3373         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
3374         targets.
3375
3376         * targets.c: Add mips and sh pe vectors.
3377
3378         * libpei.h (coff_final_link_postscript): Only define if not
3379         already defined.
3380
3381         * coffcode.h: Add support for WinCE magic numbers.
3382
3383         * peigen.c (pe_print_reloc): Update comment and rearrange
3384         appending of newline character.
3385
3386         * peicode.h: Add support for Image Library Format.
3387         (pe_ILF_vars): Structure containing data used by ILF code.
3388         (pe_ILF_make_a_section): New function.  Create a section based
3389         on ILF data.
3390         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
3391         ILF data.
3392         (pe_ILF_make_a_symbol): New function.  Create a symbol based
3393         on ILF data.
3394         (pe_ILF_save_relocs): New function.  Store the relocs created
3395         by pe_ILF_make_a_reloc in a section.
3396         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
3397         an ILF object.
3398         (pe_ILF_object_p): New function.  Return a bfd_target pointer
3399         for an ILF object.
3400         (pe_bfd_object_p): If an ILF object is detected call
3401         pe_ILF_object_p on it.
3402
3403         * coff-arm.c: Add support for WinCE relocs which are different
3404         from normal ARM COFF relocs.
3405         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
3406
3407         * coff-sh.c: Add support for sh-pe target.
3408         * pe-sh.c: New file.  Support code for sh-pe target.
3409         * pei-sh.c: New file.  Support code for sh-pe target.
3410
3411         * pe-mips.c: New file.  Support code for mips-pe target.
3412         * pei-mips.c: New file.  Support code for mips-pe target.
3413
3414 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
3415
3416         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
3417         architecture if the object causing the bump is dynamic.
3418         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
3419         and also don't it for memory ordering.
3420         (sparc64_elf_write_relocs): Take src_rela out of the loop.
3421
3422 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
3423
3424         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
3425         calling bfd_get_section_size_before_reloc.
3426         (decode_line_info): Likewise.
3427         (_bfd_dwarf2_find_nearest_line): Likewise.
3428
3429 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
3430
3431         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
3432         name of the libtool directory.
3433         * Makefile.in: Rebuild.
3434
3435 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
3436
3437         * som.c (SOM_HOWTO): Define.
3438         (som_hppa_howto_table): Use it.
3439
3440 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3441
3442         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
3443
3444         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
3445
3446 2000-02-24  Catherine Moore  <clm@cygnus.com>
3447
3448         * som.c (som_misc_symbol_info):  Add field
3449         secondary_def.
3450         (som_bfd_derive_misc_symbol_info):  Initialize
3451         secondary_def.
3452         (som_build_and_write_symbol_table): Keep track
3453         of secondary_def field.
3454         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
3455         if secondary_def field is set.
3456         (som_bfd_ar_write_symbol_stuff): Initialize
3457         secondary_def.
3458
3459 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
3460
3461         * dwarf2.c (read_address): Read 16-bits addresses.
3462         (parse_comp_unit): Accept addr_size == 2.
3463
3464 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
3465
3466         * bfd-in.h: Update copyright date.
3467
3468 2000-02-23  Linas Vepstas <linas@linas.org>
3469
3470         * cpu-i370.c: New file.
3471         * elf32-i370.c:  New file.
3472         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
3473         (bfd_i370_arch): New.
3474         (bfd_archures_list): Add bfd_i370_arch.
3475         * elf.c (prep_headers): Add bfd_arch_i370.
3476         * Makefile.am: Add support for IBM 370 elf.
3477         * config.bfd: Likewise.
3478         * configure.in: Likewise.
3479         * libbfd.h (bfd_reloc_code_real_names): Likewise.
3480         * reloc.c (bfd_reloc_code_type): Likewise.
3481         * targets.c: Likewise.
3482
3483         * Makefile.in: Regenerate.
3484         * configure: Regenerate.
3485         * bfd-in2.h: Regenerate.
3486
3487 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
3488
3489         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
3490         invalid relocation types, and change them to R_386_NONE.
3491
3492 2000-02-22  H.J. Lu  <hjl@gnu.org>
3493
3494         * elflink.h (elf_link_add_object_symbols): If a version symbol is
3495         not defined, don't add a second ELF_VER_CHR.
3496
3497         * elflink.h (elf_bfd_final_link): Call output_extsym for global
3498         symbols converted to local symbols even when stripping all
3499         symbols.
3500         (elf_link_output_extsym): Process global symbols converted to
3501         local symbols even if they are being stripped.
3502
3503 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
3504
3505         * archures.c (bfd_octets_per_byte): Return unsigned int.
3506         (bfd_arch_mach_octets_per_byte): Ditto.
3507         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
3508         comparison warning.
3509         * section.c (bfd_get_section_size_before_reloc): Quell signed
3510         vs. unsigned comparison warning.
3511         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
3512         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
3513         change.  What was I thinking?
3514         * bfd-in2.h: Regenerate.
3515
3516         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
3517         (elf_gc_sections): Same here.
3518         (elf_gc_common_finalize_got_offsets): And here.
3519
3520 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
3521
3522         ELF HPPA doesn't work at present; remove it until it does.
3523         * config.bfd: Comment out setting targ_defvec to
3524         bfd_elf32_hppa_vec.
3525         * Makefile.am: Rebuild dependencies.
3526         (BFD32_BACKENDS): Remove elf32-hppa.lo.
3527         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
3528         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
3529         * Makefile.in: Rebuild.
3530         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
3531
3532 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
3533
3534         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
3535         is no bfd_free().  Revert bfd_free part of previous change.
3536
3537 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
3538
3539         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
3540         arrays.
3541         (coff_compute_section_file_positions): Use bfd_free to pair
3542         bfd_malloc.
3543         (coff_write_object_contents): Likewise.
3544
3545         * coff-rs6000.c (xcoff_howto_table_16): New variable.
3546         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
3547
3548 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
3549
3550         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
3551         (xcoff_ar_file_hdr_big): New structure.
3552         (SIZEOF_AR_FILE_HDR_BIG): New macro.
3553         (xcoff_ar_hdr_big): New structure.
3554         (SIZEOF_AR_HDR_BIG): New macro.
3555         (xcoff_big_format_p): New macro.
3556         (xcoff_ardata_big): New macro.
3557         (arch_xhdr_big): New macro.
3558         (xcoff_slurp_armap): Handle large archives.
3559         (xcoff_archive_p): Detect large archives.
3560         (xcoff_read_ar_hdr): Handle large archives.
3561         (xcoff_openr_next_archived_file): Handle large archives.
3562         (xcoff_generic_stat_arch_elt): Handle large archives.
3563         (xcoff_write_armap_old): Rename from xcoff_write_armap.
3564         (xcoff_write_armap_big): New function.
3565         (xcoff_write_armap): New function, dispatch to _old or _big.
3566         (xcoff_write_archive_contents_old): Rename from
3567         xcoff_write_archive_contents.
3568         (xcoff_write_archive_contents_big): New function.
3569         (xcoff_write_archive_contents): New function, dispatch to _old or
3570         _big.
3571
3572 2000-02-18  Richard Henderson  <rth@cygnus.com>
3573
3574         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
3575         and hide_symbol members.
3576         (elf_link_hash_copy_indirect): Remove.
3577         (elf_link_hash_hide_symbol): Remove.
3578         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
3579         and elf_backend_hide_symbol.
3580         (_bfd_elf_link_hash_copy_indirect): Declare.
3581         (_bfd_elf_link_hash_hide_symbol): Declare.
3582         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
3583         (_bfd_elf_link_hash_hide_symbol): Likewise.
3584         (_bfd_elf_link_hash_table_init): Don't init killed members.
3585         * elflink.h (elf_link_add_object_symbols): Use the bed function
3586         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
3587         (elf_link_assign_sym_version): Likewise.
3588         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
3589         (elf_backend_hide_symbol): Likewise.
3590         (elfNN_bed): Update for new members.
3591
3592 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
3593
3594         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
3595         STACK_END_ADDR): Define for new core file format.
3596         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
3597         for handling the vagaries of the various core file structures used
3598         by AIX over the years.
3599         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
3600         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
3601         core_dumpx structure.
3602
3603 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3604
3605         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
3606         (bfd_mach_sh3_dsp): Likewise.
3607         (bfd_mach_sh4): Reinstate.
3608         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
3609         * bfd-in2.h: Regenerate.
3610         * coff-sh.c (struct sh_opcode): flags is no longer short.
3611         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
3612         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
3613         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
3614         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
3615         (sh_opcodes): No longer const.
3616         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
3617         (sh_insn_uses_reg): Check for USESAS and USESR8.
3618         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
3619         (_bfd_sh_align_load_span): Return early for SH4.
3620         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
3621         Take into account that field b of a parallel processing insn
3622         could be mistaken for a separate insn.
3623         * cpu-sh.c (arch_info_struct): New array elements for
3624         sh2, sh-dsp and sh3-dsp.
3625         Reinstate element for sh4.
3626         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
3627         (SH4_NEXT): Reinstate.
3628         (SH3_NEXT, SH3E_NEXT): Adjust.
3629         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
3630         * elf32-sh.c (sh_elf_set_private_flags): New function.
3631         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
3632         (sh_elf_merge_private_data): New function.
3633         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
3634         (bfd_elf32_bfd_copy_private_bfd_data): Define.
3635         (bfd_elf32_bfd_merge_private_bfd_data): Change to
3636         sh_elf_merge_private_data.
3637
3638 2000-02-13  Richard Henderson  <rth@cygnus.com>
3639
3640         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
3641         hide_symbol members.
3642         (elf_link_hash_copy_indirect): New.
3643         (elf_link_hash_hide_symbol): New.
3644         * elflink.h (elf_link_add_object_symbols): Break out copy from
3645         indirect new new symbol to elf.c.
3646         (elf_link_assign_sym_version): Break out privatization of
3647         non-exported symbol to elf.c.
3648         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
3649         (_bfd_elf_link_hash_hide_symbol): New.
3650         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
3651
3652 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
3653
3654         * section.c (_bfd_strip_section_from_output): Add info parameter.
3655         If it passed as non-NULL, use it to check whether any input BFD
3656         has an input section which uses this output section.  Change all
3657         callers.
3658         * bfd-in2.h: Rebuild.
3659
3660         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
3661         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
3662         1999-11-29.
3663         * bfd-in2.h: Rebuild.
3664
3665 2000-02-10  Timothy Wall  <twall@cygnus.com>
3666
3667         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
3668         allow final modifications of swapped-in symbol.
3669         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
3670         * coffcode.h (coff_write_relocs): Use macro
3671         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
3672         symbol index should be set to -1.
3673
3674 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
3675
3676         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
3677         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
3678         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
3679         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
3680         sh_insns_uses_or_sets_freg): New functions.
3681         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
3682         * (sh_insns_conflict): Use new functions and new macros to
3683         detect conflicts when two instructions both set same integer registers,
3684         both set same fp register, and both set special register.
3685
3686 2000-02-09  Timothy Wall  <twall@cygnus.com>
3687
3688         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
3689         swapping in sections, so that the swapping routines have access to
3690         the arch/mach info.
3691
3692 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
3693
3694         * coff-go32.c: Update comment. Update copyright.
3695
3696 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
3697
3698         * syms.c (bfd_decode_symclass)
3699         Two new class characters were added - 'V' and 'v'.  The
3700         meaning of 'W' is now restricted to just weak non-object
3701         symbols.  This allows differentiation between, for example,
3702         weak functions vs weak objects.  nm for example now dumps:
3703         'W' = weak global
3704         'w' = weak unresolved
3705         'V' = weak global object
3706         'v' = weak unresolved object
3707
3708         (bfd_is_undefined_symclass): New function.  Return true if the
3709         given symbol class represents and undefined/unresolved symbol.
3710
3711         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
3712         unresolved symbols.
3713
3714         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
3715
3716         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
3717         STT_ARM_16BIT flag set, but it is not attached to a data object
3718         return STT_ARM_16BIT so that it will be treated as code by the
3719         disassembler.
3720
3721 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
3722
3723         * coff-i386.c (i3coff_object_p): Remove prototype.
3724         Update copyright.
3725
3726         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
3727         to name.  Update copyright.
3728
3729         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
3730         assignment to avoid warning.  Update copyright.
3731
3732 2000-01-24  Robert Lipe  (robertl@sco.com)
3733
3734         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
3735         instead of using GNU C extension.
3736
3737 2000-01-21  Nick Clifton  <nickc@cygnus.com>
3738
3739         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
3740         amount from a bfd_in_memory structure.
3741         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
3742         structure.
3743
3744 2000-01-14  Nick Clifton  <nickc@cygnus.com>
3745
3746         * linker.c (default_indirect_link_order): oops - fix incorrectly
3747         applied patch from Tim Wall.
3748
3749 2000-01-13  Timothy Wall (twall@tiac.net>
3750
3751         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
3752         = scnhsz, filhsz, relsz, aoutsz, etc)
3753
3754          * coffswap.h: Ditto.
3755
3756 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3757
3758         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
3759         interwork thumb to arm stub.
3760
3761 2000-01-13  Timothy Wall (twall@tiac.net>
3762
3763         * archures.c (bfd_octets_per_byte): New function: Return
3764         target byte size.
3765         (bfd_arch_mach_octets_per_byte): New function: Return target
3766         byte size.
3767
3768         * section.c: Distinguish between octets and bytes for usage of
3769         _cooked_size,  _raw_size, and output_offset.  Clarify
3770         description of bfd_set_section_contents.
3771
3772         * bfd-in2.h: Regenerate.
3773
3774         * coffgen.c: Indicate that the offset parameter is in bytes, not
3775         octets.
3776
3777         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
3778         where appropriate to get the octet offset when calling
3779         bfd_set_section_contents.
3780         (bfd_coff_reloc_link_order): Ditto.
3781
3782         * linker.c (bfd_generic_reloc_link_order): Ditto.
3783         (_bfd_default_link_order): Ditto.
3784
3785         * reloc.c (bfd_perform_relocation):  Distinguish between octets
3786         and bytes.  Use octets when indexing into octet data; use bytes
3787         when calculating target addresses.
3788         (bfd_install_relocation): Ditto.
3789
3790         * srec.c (srec_write_section): Ditto.
3791
3792 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3793
3794         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3795         3 to 2.  This allows 4 byte sized sections, which is necessary for
3796         dlltool to build functioning DLLs.
3797
3798 2000-01-10  Philip Blundell  <pb@futuretv.com>
3799
3800         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
3801         (arm*-*-conix*): New target.
3802
3803 2000-01-10  Egor Duda  <deo@logos-m.ru>
3804
3805         * config.bfd: Include elf32_i386 vector to target list for cygwin
3806         and mingw.
3807
3808         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
3809         * configure.in: Test for structure win32_pstatus_t in
3810         <sys/procfs.h>
3811         * configure: Regenerate.
3812
3813         * elf.c (elfcore_grok_win32pstatus): New function: process
3814         win32_pstatus_t notes in elf core file.
3815         (elfcore_grok_note): Detect win32_pstatus notes.
3816
3817 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
3818
3819         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
3820         visibility.
3821         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
3822         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
3823
3824 1999-12-29  Richard Henderson  <rth@cygnus.com>
3825
3826         * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
3827         if no dynamic sections created.
3828
3829 1999-12-27  Nick Clifton  <nickc@cygnus.com>
3830
3831         * peicode.h (pe_bfd_object_p): Only define for PE format
3832         targets.
3833
3834 1999-12-17  Nick Clifton  <nickc@cygnus.com>
3835
3836         * coff-i386.c (i3coff_object_p): Delete.
3837         (i386coff_vec): Replace reference to i3coff_object_p with a
3838         reference to coff_object_p.
3839
3840         * coff-mcore.c (pe_object_p): Delete.
3841
3842         * peicode.h (pe_bfd_object_p): New function: Detect the
3843         presence of a PE format COFF object file.  Also detect and
3844         warn about the presence of LINK6 format Image Library Format
3845         object files.
3846
3847 1999-12-16  Nick Clifton  <nickc@cygnus.com>
3848
3849         * coff-arm.c (NUM_ELEM): New macro.
3850         (NUM_RELOCS): New macro: The number of known ARM relocs.
3851         (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
3852         (coff_arm_rtype_to_howto):  Return NULL if the reloc type is out
3853         of range.
3854         (bfd_arm_process_before_allocation): Produce a warning message if
3855         an out of range symbol index is encountered.
3856
3857 1999-12-14  Nick Clifton  <nickc@cygnus.com>
3858
3859         * elflink.h (is_global_symbol_definition): New Function: Return
3860         true iff the symbol is being given a global definition in this
3861         bfd.
3862         (elf_link_is_defined_archive_symbol): Do not bother processing
3863         symbols for an archive element that has already been included
3864         in the link.
3865         Use is_global_symbol_definition().
3866
3867 1999-12-09  Andrew Cagney  <cagney@cygnus.com>
3868
3869         * config.bfd: Add support for sparc-*-netbsdelf* and
3870         sparc-*-netbsdaout*.
3871
3872 1999-12-13  Nick Clifton  <nickc@cygnus.com>
3873
3874         * elflink.h (elf_link_is_defined_archive_symbol): Check to see
3875         if the symbol is in the common section.
3876
3877 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3878
3879         * elflink.h (elf_link_is_defined_archive_symbol): New
3880         function: Decide if a symbol, in an archive map is there
3881         because it is defined in the archive element, or because it is
3882         just another common declaration of it.
3883         (elf_link_add_archive_symbols): Use
3884         elf_link_is_defined_archive_symbol to decide if an archive
3885         element contain a reference to a common symbol should be
3886         linked in or not.
3887
3888 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3889
3890         * elflink.h: Revert previous patch.
3891         * targets.c: Revert previous patch.
3892         * libbfd-in2.h: Revert previous patch.
3893         * libbfd.h: Revert previous patch.
3894         * elfxx-target.h: Revert previous patch.
3895         * archive.c: Revert previous patch.
3896         * aout-target.h: Revert previous patch.
3897         * aout-tic30.h: Revert previous patch.
3898         * bfd.c: Revert previous patch.
3899         * coff-alpha.c: Revert previous patch.
3900         * coff-rs6000.c: Revert previous patch.
3901         * elf64-mips.c: Revert previous patch.
3902         * ieee.c: Revert previous patch.
3903         * libecoff.h: Revert previous patch.
3904         * oasys.c: Revert previous patch.
3905         * som.c: Revert previous patch.
3906         * vms.c: Revert previous patch.
3907
3908 1999-12-09  Nick Clifton  <nickc@cygnus.com>
3909
3910         * elflink.h (elf_link_add_archive_symbols): Add an archive
3911         element even if contains a symbol which is currently only
3912         considered to be a common.
3913
3914         * targets.c (struct bfd_target): Add new field
3915         _bfd_allow_commons_in_armap.
3916         * bfd-in2.h:Regenerate.
3917
3918         * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
3919         Define.
3920          (_bfd_archive_bsd_allow_commons_in_armap): Define.
3921         * libbfd.h: Regenerate.
3922
3923         * elfxx-target.h: If using COFF archive map, override
3924         definition of allow_commons_in_armap and replace with
3925         bfd_false.
3926
3927         * archive.c (bfd_compute_and_write_armap): Do not place common
3928         symbols into the archive map unless _bfd_allow_commons_in_armap
3929         returns true.
3930
3931         * aout-target.h (MY_allow_commons_in_armap): Define.
3932         * aout-tic30.h (MY_allow_commons_in_armap): Define.
3933         * bfd.c (bfd_allow_commons_in_armap): Define.
3934         * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
3935         * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
3936         * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
3937         * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
3938         * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
3939         * oasys.c (oasys_allow_commons_in_armap): Define.
3940         * som.c (som_allow_commons_in_armap): Define.
3941         * vms.c (vms_allow_commons_in_armap): Define.
3942
3943 1999-12-07  Jim Blandy  <jimb@cygnus.com>
3944
3945         Add support for SSE registers in ELF core files.
3946         * elf.c (elfcore_make_note_pseudosection): New function.
3947         (elfcore_grok_prfpreg): Use it.
3948         (elfcore_grok_prxfpreg): New function.
3949         (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
3950
3951 1999-12-03  Ian Lance Taylor  <ian@zembu.com>
3952
3953         * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
3954         value by 4 before storing it back in the field.  From
3955         Koundinya. K <kk@ddeorg.soft.net>.
3956
3957 Tue Nov 30 22:41:14 1999  Jeffrey A Law  (law@cygnus.com)
3958
3959         * archures.c (bfd_mach_am33): Define.
3960         * bfd-in2.h: Rebuilt.
3961         * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
3962         * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
3963         (compute_function_info): Handle additional registers saved by
3964         movm on the am33.
3965         (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
3966         (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
3967
3968 1999-11-29  Jim Blandy  <jimb@cygnus.com>
3969
3970         * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3971         functions.
3972         * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3973         declarations.
3974
3975 1999-11-27  Michael Meissner  <meissner@cygnus.com>
3976
3977         * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
3978         internal use within gas for alpha explicit relocations.
3979         (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
3980         (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
3981         (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
3982         (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
3983         (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
3984         (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
3985
3986         * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
3987         BFD_RELOC_ALPHA_USER_*.
3988
3989         * bfd-in2.h: Regenerate.
3990         * libbfd.h: Regenerate.
3991
3992 1999-11-26  Fred Fish  <fnf@cygnus.com>
3993
3994         * elf.c (elfcore_read_notes): Add prototype for static function.
3995         (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
3996         (bfd_section_from_phdr): Replacement function that calls
3997         _bfd_elf_make_section_from_phdr for generic segment types and
3998         backend fucntion pointed to by elf_backend_section_from_phdr for
3999         backend specific segment types.
4000         (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
4001         now called by _bfd_elf_make_section_from_phdr.  Note that this func
4002         is now just a stub between the caller and bfd_section_from_phdr.
4003
4004         * elf-bfd.h (struct elf_backend_data): Add new function pointer
4005         elf_backend_section_from_phdr.
4006         (elf_backend_section_from_phdr): Add prototype.
4007
4008         * elfxx-target.h (elf_backend_section_from_phdr): Define default.
4009         (elfNN_bed): Add elf_backend_section_from_phdr.
4010
4011 1999-11-25  Nick Clifton  <nickc@cygnus.com>
4012
4013         * coff-arm.c (bfd_arm_get_bfd_for_interworking):  Add
4014         SEC_CODE and SEC_READONLY flags to glue sections.
4015
4016         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
4017         SEC_CODE and SEC_READONLY flags to glue sections.
4018
4019 1999-11-20  Nick Clifton  <nickc@cygnus.com>
4020
4021         * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
4022         delta.
4023
4024 1999-11-19  Catherine Moore  <clm@cygnus.com>
4025
4026         * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
4027         (elf_cpu32_plt_entry): Likewise.
4028
4029 1999-11-18  Nick Clifton  <nickc@cygnus.com>
4030
4031         * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
4032         for RVA relocs.
4033         (coff_mcore_relocate_section): Initialise addend to 0.
4034         Special case processing of RVA reloc.
4035
4036 1999-11-17  Richard Henderson  <rth@cygnus.com>
4037
4038         * elf-bfd.h (struct elf_backend_data): Reorder collect and
4039         type_change_ok; add sign_extend_vma.
4040         * elf32-mips.c (elf_backend_sign_extend_vma): Define.
4041         * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
4042         (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
4043         * elfxx-target.h (elf_backend_sign_extend_vma): Default.
4044         (elfNN_bed): Follow struture changes.
4045
4046 1999-11-09  Ian Lance Taylor  <ian@zembu.com>
4047
4048         * libbfd.c (bfd_read): Check result of read against desired result
4049         using !=, not <.
4050         (_bfd_generic_get_section_contents): Set bfd_error if the seek is
4051         invalid compared to the section size.
4052
4053         * ieee.c (ieee_slurp_debug): Get the length of the debug
4054         information right if there is no data part.
4055
4056 Tue Nov  2 01:44:41 1999  Jeffrey A Law  (law@cygnus.com)
4057
4058         * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
4059         R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
4060
4061 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
4062
4063         * elflink.h (elf_bfd_final_link): Make last_local signed.
4064
4065 1999-10-27  Ian Lance Taylor  <ian@zembu.com>
4066
4067         * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
4068         starts with a zero.
4069
4070 Sat Oct 23 17:36:12 1999  Andrew Cagney  <cagney@b1.cygnus.com>
4071
4072         * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
4073         bfd_mach_d10v_ts3.
4074         * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
4075         * bfd-in2.h: Regenerate.
4076
4077 1999-10-15  Andrew Haley  <aph@cygnus.com>
4078
4079         * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
4080
4081 Sun Oct 17 17:19:00 1999  Jeffrey A Law  (law@cygnus.com)
4082
4083         * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
4084
4085 1999-10-08  Ian Lance Taylor  <ian@zembu.com>
4086
4087         * elflink.h (elf_merge_symbol): When overriding a weak symbol with
4088         a defined symbol in a shared library, clear the DEF_DYNAMIC flag
4089         too.
4090
4091 Fri Oct  8 13:03:45 1999  Geoffrey Keating  <geoffk@cygnus.com>
4092
4093         * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
4094         relocs also need the GP value.
4095         (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
4096         properly.  Handle sign-extension for R_MIPS_64 correctly.  Correct
4097         the GP value for R_MIPS_LITERAL relocs too.  Handle
4098         R_MIPS_64 relocs properly on big-endian MIPS.
4099         (mips_elf_sign_extend): Behave properly with 'long long'.
4100         (mips_elf_highest): Correct typo.
4101
4102 Mon Oct  4 17:49:45 1999  Nick Clifton  <nickc@cygnus.com>
4103
4104         * cpu-m32r.c (arch_info_struct): New static global.
4105         (bfd_m32r_arch): Refer to it.
4106         * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
4107         (m32r_elf_print_private_bfd_data): Ditto.
4108         (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
4109         * archures.c (bfd_mach_m32rx): Define it.
4110         * bfd-in2.h: Rebuild.
4111
4112 1999-09-28  Fred Fish  <fnf@cygnus.com>
4113
4114         * targets.c (cisco_core_vec): Replaced with two new vecs ...
4115         (cisco_core_big_vec): Add new bigendian vec.
4116         (cisco_core_little_vec): Add new little endian vec.
4117
4118         * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
4119         (crash_info_locs): Add array of possible offsets.
4120         (MASK_ADDR): Mask to apply to crash info offset.
4121         (crashinfo_external): Add textbase, database, bssbase and
4122         turn into a typedef.
4123         (cisco_core_file_validate): Renamed from cisco_core_file_p.
4124         Many small changes to account for additional hardware versions.
4125         Pick a reasonable size for ".reg" section.  Add a ".crash"
4126         section to allow access to crashinfo_external struct.
4127         (cisco_core_file_p): New version of this function that
4128         iterates over crash_info_locs, calling cisco_core_file_validate.
4129         (cisco_core_vec): Old big endian only vec replaced with ...
4130         (cisco_core_big_vec): Add big endian version.
4131         (cisco_core_little_vec): Add little endian version.
4132
4133         * configure.in (cisco_core_vec): Split to two new vectors ...
4134         (cisco_core_big_vec): New target vector.
4135         (cisco_core_little_vec): New target vector.
4136         * configure: Regenerate.
4137         * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
4138         to cisco_core_big_vec in targ_selvecs.
4139
4140 1999-09-28  Geoffrey Keating  <geoffk@cygnus.com>
4141
4142         * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
4143         (mips_elf_relocate_got_local): Unused, delete.
4144         (mips_elf_relocate_global_got): Unused, delete.
4145
4146 1999-09-24  Fred Fish  <fnf@cygnus.com>
4147
4148         * elf.c (bfd_section_from_phdr): Add typename variable.  Use p_type
4149         to initialize it to something meaningful.  Then use it to generate
4150         more useful segment names.
4151
4152 Sun Sep 19 12:16:47 1999  Jeffrey A Law  (law@cygnus.com)
4153
4154         * som.c (NO_PCREL_MODES): Define if the system does not define
4155         R_SHORT_PCREL_MODE.
4156         (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
4157         (som_write_fixups): Eliminate redundant pcrel mode relocs.  Handle
4158         R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
4159         * libhppa.h (dis_assemble_22): New function.
4160         (bfd_hppa_insn2fmt): Handle long branch.
4161
4162         * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
4163         in PA2.0.
4164
4165 1999-09-17  Alan Modra  <alan@spri.levels.unisa.edu.au>
4166
4167         * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
4168         BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
4169         (reloc_howto_type howto_table): Tidy comments and whitespace.
4170
4171 1999-09-17  Nick Clifton  <nickc@cygnus.com>
4172
4173         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
4174         previous delta.  Set sec->gc_mark instead.
4175
4176 Thu Sep 16 11:21:13 1999  Catherine Moore  <clm@cygnus.com>
4177
4178         * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
4179         (elf_cpu32_plt_entry): Likewise.
4180
4181 Thu Sep 16 10:48:17 1999  Jeffrey A Law  (law@cygnus.com)
4182
4183         * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
4184
4185         * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
4186         symbol table, then just compute a suitable value (but do not
4187         create a __gp symbol).
4188
4189         * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
4190         symbols when building shared libraries.
4191         (elf_hppa_final_link_relocate): Correct handling of PCREL
4192         relocations against undefined symbols.
4193
4194 1999-09-16  Nick Clifton  <nickc@cygnus.com>
4195
4196         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
4197         interworking sections as linker created so that they will not
4198         be removed by garbage collection.
4199
4200 Wed Sep 15 02:31:57 1999  Jeffrey A Law  (law@cygnus.com)
4201
4202         * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
4203         (elf_hppa_final_link_relocate): Consistently create an absolute
4204         address, then subtract out the value of __gp.
4205
4206 1999-09-14  Michael Meissner  <meissner@cygnus.com>
4207
4208         * configure.in (Canonicalization of target names): Remove adding
4209         ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
4210         generates $ac_config_sub with a ${CONFIG_SHELL} already.
4211         * configure: Regenerate.
4212
4213 1999-09-14  Nick Clifton  <nickc@cygnus.com>
4214
4215         * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
4216         Mitsubishi).
4217
4218 Mon Sep 13 20:01:47 1999  Jeffrey A Law  (law@cygnus.com)
4219
4220         * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
4221         (elf_hppa_final_link): Initialize text_segment_base and
4222         data_segment_base.
4223         (elf_hppa_final_link_relocate): Handle SEGREL relocations.
4224
4225         * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
4226         (elf_hppa_final_link_relocate): Likewise.
4227         (elf_hppa_relocate_insn): Likewise.
4228         (elf_hppa_relocate_section): Initialize HOWTO.
4229
4230 1999-09-13  Donn Terry  <donn@interix.com>
4231
4232         * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
4233         handling to support both GNU and MS objects.
4234
4235         * coffcode.h (coff_write_object_contents): Don't check reloc_count
4236         when determining whether to set F_RELFLG.
4237
4238 1999-09-13  Philip Blundell  <pb@nexus.co.uk>
4239
4240         * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
4241         PC24 relocs if the target is an undefined weak symbol.
4242         (arm_add_to_rel): Fix compiler warning.
4243         (elf32_arm_plt0_entry): Correct comments.
4244
4245 1999-09-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
4246
4247         * elfcode.h (write_relocs): Check for the_bfd NULL when handling
4248         an absolute symbol in REL relocs.
4249
4250 Sun Sep 12 23:47:58 1999  Jeffrey A Law  (law@cygnus.com)
4251
4252         * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
4253         Stub SEGREL32.  Return an error for any relocation not handled.
4254
4255 1999-09-12  Ian Lance Taylor  <ian@zembu.com>
4256
4257         * cofflink.c (coff_link_add_symbols): Look for special MSVC string
4258         constant symbols, and avoid multiple definition errors on them.
4259
4260 1999-09-12  Donn Terry  <donn@interix.com>
4261
4262         * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
4263         significant bit is set.
4264
4265 1999-09-11  Ian Lance Taylor  <ian@zembu.com>
4266
4267         * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4268
4269         * elfcode.h (write_relocs): Handle an absolute symbol in REL
4270         relocs as we do for RELA relocs.
4271
4272 1999-09-11  Donn Terry  <donn@interix.com>
4273
4274         * libpei.h (_bfd_pei_final_link_postscript): Declare.
4275         (coff_final_link_postscript): Define.
4276         * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
4277         directory entries here.
4278         (_bfd_pei_final_link_postscript): New function.
4279
4280         * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
4281         section flags based on the section name.
4282
4283         * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
4284         get the overflow of the s_nlnno field from the s_nreloc field.
4285         * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
4286         the s_nlnno overflow of the .text section into the s_nreloc
4287         field.
4288
4289         * peigen.c (add_data_entry): Declare.
4290         (pei_swap_aouthdr_out): Get image size right.  Set linker version
4291         more intuitively.
4292         (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
4293         (pe_print_idata): Code cleanup, print more info, get rid of (now)
4294         extraneous ImageBase.
4295         (pe_print_edata): Likewise.
4296         (pe_print_pdata): Likewise.  Print exception entries.
4297         (pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
4298         (tbl): Make const, add "UNKNOWN".
4299         (_bfd_pe_print_private_bfd_data_common): Print timestamp.
4300         (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
4301         section data directory.
4302         (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
4303
4304         * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
4305         * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
4306         * peicode.h (coff_get_symbol_info): Define.
4307
4308         * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
4309         -DSTRICT_PE_FORMAT.
4310         * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
4311         than __INTERIX.
4312         (coff_classify_symbol): Re-revert 1999-08-08 patch if
4313         STRICT_PE_FORMAT.
4314
4315         * libpei.h: New file, broken out of peicode.h.
4316         * peigen.c: New file, broken out of peicode.h.
4317         * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
4318         * configure.in: Add peigen.lo to list of files required for each
4319         PE target.
4320         * Makefile.am: Rebuild dependencies.
4321         (BFD32_BACKENDS): Add peigen.lo.
4322         (BFD32_BACKENDS_CFILES): Add peigen.c.
4323         (SOURCE_HFILES): Add libpei.h.
4324         * configure, Makefile.in: Rebuild.
4325
4326         * peicode.h (coff_swap_scnhdr_in): Don't check for a special
4327         section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
4328         instead.  Don't clear the s_paddr field for an uninitialized data
4329         section.
4330
4331         * coffcode.h (coff_mkobject_hook): Set timestamp field in
4332         coff_data_type to f_timdat.
4333         * peicode.h (pe_mkobject_hook): Likewise.
4334
4335         * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
4336         number if COFF_IMAGE_WITH_PE.
4337
4338         * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
4339         to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
4340         (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
4341         there is no SEC_DEBUGGING section.
4342         * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
4343         IMAGE_FILE_DEBUG_STRIPPED.
4344
4345         * pe-i386.c (COFF_LONG_FILENAMES): Define.
4346         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4347         * pei-i386.c (COFF_LONG_FILENAMES): Define.
4348         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4349
4350         * coffswap.h (IMAGE_BASE): Don't define.
4351         * pei-arm.c (IMAGE_BASE): Don't define.
4352         * pei-i386.c (IMAGE_BASE): Don't define.
4353         * pei-mcore.c (IMAGE_BASE): Don't define.
4354         * pei-ppc.c (IMAGE_BASE): Don't define.
4355
4356         * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
4357         symbol, switch on the class when determining whether to modify the
4358         value.  For PE, don't modify the value of a C_FCN symbol not named
4359         .bf.
4360
4361         * libbfd-in.h (_bfd_abort): Declare.
4362         (abort): Define.
4363         * bfd.c (_bfd_abort): New function.
4364         * libbfd.h: Rebuild.
4365
4366         * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
4367         special handling.
4368
4369         * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
4370         don't write out the associated line numbers.
4371
4372         * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
4373         aux entries.
4374
4375         * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
4376         changes when the base type is unknown.
4377
4378         * coffgen.c (coff_print_symbol): Fix printing of aux record for
4379         function symbols.
4380
4381         * syms.c (BSF_DEBUGGING_RELOC): Define.
4382         * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
4383         for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
4384         symbols named .bf.
4385         * coffgen.c (fixup_symbol_value): Relocate a symbol which has
4386         BSF_DEBUGGING_RELOC set.
4387         * bfd-in2.h: Rebuild.
4388
4389 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
4390
4391         * ecoff.c (bfd_debug_section): Update initialization for new
4392         comdat_info field.
4393         (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
4394         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
4395
4396 1999-09-10  H.J. Lu  <hjl@gnu.org>
4397
4398         * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
4399         _bfd_filnmlen field.
4400         * coff-mips.c (mips_ecoff_backend_data): Likewise.
4401
4402 Fri Sep 10 00:35:14 1999  Jeffrey A Law  (law@cygnus.com)
4403
4404         * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
4405         for FPTR relocs involving local symbols.
4406
4407         * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
4408         value for the stub address in a call through a stub.
4409         Install the value for a local symbol directly into the DLT
4410         instead of generating a reloc.  Correctly handle FPTR64 relocs.
4411
4412         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
4413         (elf_hppa_remark_useless_dynamic_symbols): Similarly.
4414         (elf_hppa_final_link): Call them.
4415
4416 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
4417
4418         * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
4419         (elf_adjust_dynamic_symbol): ...from here.
4420
4421 Wed Sep  8 17:56:11 1999  Jeffrey A Law  (law@cygnus.com)
4422
4423         * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
4424         relocation, remove them.  SECREL64->LTOFF16WF.
4425         (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
4426         DIR* relocations.
4427         (elf_hppa_relocate_insn): Similarly.
4428
4429         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
4430         (elf_hppa_relocate_insn): Similarly.
4431
4432         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
4433         GPREL* relocations.
4434         (elf_hppa_relocate_insn): Similarly.
4435
4436         * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
4437         Handle LTOFF_TP* relocs.
4438         (elf_hppa_relocate_insn): Similarly.
4439
4440         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
4441         Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
4442         (elf_hppa_relocate_insn): Handle PCREL* relocs.
4443
4444         * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
4445         DIR32, DIR64 and FPTR64 relocations.
4446         (elf_hppa_relocate_insn): Similarly.
4447
4448         * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
4449         address of the .PARISC.global section.
4450         (elf_hppa_relocate_section): Lookup and pass the PA64 hash
4451         table entry elf_hppa_final_link_relocate.  Do not give a warning
4452         for a reloc against an external symbol if it has a PA64 hash
4453         table entry.
4454         (elf_hppa_final_link_relocate): Significantly rework.  Handle
4455         DLTIND relocations.  Compute the final value of the relocation
4456         before passing the value of elf_hppa_relocate_insn.
4457         (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
4458         relocation support.  Handle DLTIND relocation requests just like
4459         DLTREL relocation requests.  Simplify branch handling.
4460
4461 1999-09-08  Ulrich Drepper  <drepper@cygnus.com>
4462
4463         * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
4464         non-allocated section as done in i386 version.
4465         (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
4466         statement since this is no know relocation.
4467
4468 Tue Sep  7 17:25:12 1999  Jeffrey A Law  (law@cygnus.com)
4469
4470         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
4471         relocs.
4472         (elf_hppa_relocate_insn): Similarly.
4473
4474         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
4475         DLTREL14WD relocs.
4476         (elf_hppa_relocate_insn): Similarly.
4477
4478         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
4479         DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
4480         Pass the relocate type rather than the insn format to
4481         elf_hppa_relocate_insn.
4482         (elf_hppa_relocate_insn): Make switch dependent on relocation type
4483         rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
4484
4485 1999-09-07  Ian Lance Taylor  <ian@zembu.com>
4486
4487         * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
4488         (bfd_coff_filnmlen): Define.
4489         (bfd_coff_std_swap_table): Initialize new field.
4490         * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
4491         than FILNMLEN.
4492         (coff_write_symbols): Likewise.
4493         (coff_get_normalized_symtab): Likewise.
4494         * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
4495         * libcoff.h: Rebuild.
4496
4497 1999-09-06  Donn Terry  <donn@interix.com>
4498
4499         * coffcode.h (sort_by_secaddr): New static function if
4500         COFF_IMAGE_WITH_PE.
4501         (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
4502         sections by VMA when assigning target_index values.  Always set
4503         virt_size.
4504
4505         * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
4506         * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
4507         pe_flags field.
4508         * libcoff.h: Rebuild.
4509
4510         * coffcode.h (coff_set_custom_section_alignment): Add const to
4511         declaration to match definition.
4512         (coff_write_object_contents): Don't set F_AR32W(R)? if
4513         COFF_WITH_PE.
4514
4515         * coff-i386.c (in_reloc_p): Add declaration.
4516         (i386coff_vec): Simplify initialization of
4517         application_section_flags.
4518
4519         * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
4520         version.  Move COFF_WITH_PE specific code to new version.
4521         (stype_to_sec_flags): Likewise.  Add section parameter.
4522         * coffgen.c (make_a_section_from_file): Set target_index before
4523         calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
4524         * libcoff.h: Rebuild.
4525
4526         * syms.c (stt): Add some PE/PEI section names.
4527         (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
4528         symbol.
4529         (bfd_symbol_info): Check for 'w'.
4530
4531         * section.c (struct bfd_comdat_info): Define.
4532         (asection): Add comdat field.
4533         (STD_SECTION): Initialize comdat field.
4534         (bfd_make_section_anyway): Likewise.
4535         * bfd-in2.h: Rebuild.
4536
4537 1999-09-06  Andreas Schwab  <schwab@suse.de>
4538
4539         * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
4540         to version symbols.
4541
4542 1999-09-06  Nick Clifton  <nickc@cygnus.com>
4543
4544         * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
4545         bfd_realloc instead of calloc and realloc.
4546
4547 1999-09-04  Steve Chamberlain  <sac@pobox.com>
4548
4549         * cpu-pj.c: New file.
4550         * elf32-pj.c: New file.
4551         * config.bfd (pj*): New cpu.
4552         (pj-*-*, pjl-*-*): New targets.
4553         * configure.in (bfd_elf32_pj_vec): New target vector.
4554         (bfd_elf32_pjl_vec): New target vector.
4555         * archures.c (bfd_arch_pj): Define.
4556         * elf.c (prep_headers): Handle bfd_arch_pj.
4557         * reloc.c: Define BFD_RELOC_PJ_* relocations.
4558         * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
4559         to target vector list.
4560         * Makefile.am: Rebuild dependencies.
4561         (ALL_MACHINES): Add cpu-pj.lo.
4562         (ALL_MACHINES_CFILES): Add cpu-pj.c.
4563         (BFD32_BACKENDS): Add elf32-pj.lo.
4564         (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
4565         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
4566
4567 1999-09-04  Ian Lance Taylor  <ian@zembu.com>
4568
4569         * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
4570         * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
4571         and NON_GOT_REF from weak defined symbol to real symbol.
4572         * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
4573         (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
4574         create a COPY reloc.
4575         * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
4576         (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
4577         don't create a COPY reloc.
4578
4579 1999-09-03  Ian Lance Taylor  <ian@zembu.com>
4580
4581         * elflink.h (elf_bfd_final_link): When counting relocations, don't
4582         count those in sections we are not including in the link.
4583
4584 Thu Sep  2 17:41:20 1999  Jeffrey A Law  (law@cygnus.com)
4585
4586         * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
4587         field in hpux11 shared libraries.
4588
4589 1999-09-02  Nick Clifton  <nickc@cygnus.com>
4590
4591         * elflink.h (elf_gc_record_vtentry): Fix memory leak.
4592
4593 Wed Sep  1 13:34:29 1999  Jeffrey A Law  (law@cygnus.com)
4594
4595         * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
4596         (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
4597         (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
4598
4599 1999-08-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4600
4601         * elflink.h (record_link_assignment): When possible, keep the
4602         original type of the symbol.
4603
4604 Mon Aug 30 15:26:48 1999  Jeffrey A Law  (law@cygnus.com)
4605
4606         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
4607         R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
4608         tools were configured.
4609         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
4610
4611 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4612
4613         * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
4614         GOT entries for GOT16 relocations; they're not required.
4615
4616 1999-08-24  Nick Clifton  <nickc@cygnus.com>
4617
4618         From a patch submitted by Roland McGrath  <roland@baalperazim.frob.com>
4619
4620         * config.bfd (arm-*-netbsd*): New target.
4621         * configure.in (armnetbsd_vec): New target vector.
4622         * configure: Regenerate
4623         * targets.c (bfd_target_vector): Add &armnetbsd_vec.
4624
4625         * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
4626         (ALL_MACHINES_CFILES): Add armnetbsd.c.
4627         (armnetbsd.lo): New rule with deps.
4628         * Makefile.in: Regenerate.
4629
4630         * armnetbsd.c: New file:  Definitions specific to arm-netbsd
4631         target.
4632
4633 Tue Aug 24 00:25:58 1999  Jeffrey A Law  (law@cygnus.com)
4634
4635         * som.c (som_slurp_symbol_table): Fix typo in comment.
4636
4637 Fri Aug 20 17:01:23 1999  Jeffrey A Law  (law@cygnus.com)
4638
4639         * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
4640         here instead of using elf_section_data...
4641
4642 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4643
4644         * coff-mcore.c (mcore_emit_base_file_entry): New function:  Emit
4645         relocations into the base file.
4646         (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
4647         we are building a base file.
4648
4649 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4650
4651         * elf32-arm.h (arm_add_to_rel): New function.  Add a value to
4652         a REL style reloc.
4653         (elf32_arm_relocate_section): Use arm_add_to_rel to increment
4654         REL relocs when performing a partial relocation.
4655
4656 1999-08-18  Donn Terry  <donn@interix.com>
4657
4658         * cofflink.c: Move definitions of N_TMASK, et. al., out of
4659         _bfd_coff_link_input_bfd into top level.
4660
4661         * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
4662         (RTYPE2HOWTO): Return NULL if reloc type is out of range.
4663         (coff_i386_rtype_to_howto): Likewise.
4664         * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
4665         Completely ignore symbols which are all zero.
4666         (dummy_reloc16_estimate): Add return 0.
4667         * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
4668         variable copy to name_copy to avoid shadowing outer scope
4669         variable.
4670         * libcoff-in.h (coff_data_type): Change raw_syment_count field
4671         from unsigned int to unsigned long.  Add timestamp field.
4672         * libcoff.h: Rebuild.
4673
4674 1999-08-17  H.J. Lu  <hjl@gnu.org>
4675
4676         * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
4677         macro definition.
4678
4679 1999-08-17  Ian Lance Taylor  <ian@zembu.com>
4680
4681         * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
4682         for special section symbols.
4683         * elflink.h (elf_merge_symbol): If we have no old BFD, check
4684         BSF_DYNAMIC on the section symbol to see whether the old BFD is
4685         dynamic.
4686
4687 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4688
4689         * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
4690         coincidence of variable names between old and new code.
4691
4692 1999-08-12  Nick Clifton  <nickc@cygnus.com>
4693
4694         * elf32-arm.h (elf32_arm_to_thumb_stub):  Make 'offset' parameter
4695         into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
4696         (elf32_thumb_to_arm_stub):  Make 'offset' parameter into a bfd_vma
4697         and 'addend' parameter a 'bfd_signed_vma'.
4698         (elf32_arm_final_link_relocate): Do not involve stubs in
4699         R_ARM_THM_PC22 relocs relative to section symbols, they are long
4700         jumps, not function calls.
4701
4702 1999-08-11  Robin Farine <advanc@dial.eunet.ch>
4703
4704         * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
4705         in R_ARM_PC24 relocs.
4706
4707 Tue Aug 10 12:48:09 1999  Jeffrey A Law  (law@cygnus.com)
4708
4709         * elf-hppa.h (elf_hppa_fake_sections): New function.
4710         * elf32-hppa.c (elf_backend_fake_sections): Define.
4711
4712         * elf-hppa.h (elf_hppa_final_write_processing): Update for
4713         recent changes to the arch_info structure.
4714
4715         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
4716         R_HPPA_SEGBASE and R_HPPA_SEGREL32.
4717         * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
4718         list.
4719
4720 Tue Aug 10 00:34:29 1999  Mark P. Mitchell  <mark@codesourcery.com>
4721                           Ralf Baechle <ralf@uni-koblenz.de>
4722
4723         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
4724         output DT_MIPS_GOTSYM.
4725         (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
4726         DT_MIPS_SYMTABNO if there are no global GOT symbols.
4727
4728 Tue Aug 10 00:21:08 1999  Mark P. Mitchell  <mark@codesourcery.com>
4729
4730         * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
4731         prototype.  Handle local symbols.  Add commentary.
4732         (mips_elf_calculate_relocation): Adjust accordingly.
4733         (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
4734         relocations.
4735
4736         * elflink.h (elf_bfd_final_link): Tweak last change.
4737
4738 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4739
4740         * elflink.h (elf_link_size_reloc_section): Use the counts in the
4741         elf-section data to allocate just the right amount of relocation
4742         space.  Don't allocate the hash space twice.
4743         (elf_bfd_final_link): Calculate the amount of space to allocate in
4744         each relocation section.
4745
4746 Mon Aug  9 17:37:30 1999  Jeffrey A Law  (law@cygnus.com)
4747
4748         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
4749         64bit mode, generate a section relative relocation for a 32bit
4750         wide relocation.
4751         (elf_hppa_is_local_label_name): New function.
4752         * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
4753         shared between 32bit and 64bit port.
4754
4755 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4756
4757         * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
4758         R_MIPS_GOT16 and R_MIPS_CALL16.
4759         (mips_elf_got16_entry): Use mips_elf_high to calculate the value
4760         to use when looking for a preexisting GOT entry.
4761
4762 1999-08-09  Jakub Jelinek  <jj@ultra.linux.cz>
4763
4764         * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
4765         the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
4766         not binutils.
4767         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4768
4769 1999-08-09  Geoff Keating  <geoffk@cygnus.com>
4770
4771         * elflink.h (elf_link_output_extsym): Don't output a weak
4772         reference to an undefined symbol just because it was defined weak
4773         in a shared object.
4774
4775 1999-08-09  Eli Zaretskii  <eliz@is.elta.co.il>
4776
4777         * coffgen.c (coff_find_nearest_line): When looking for file, use
4778         last best match rather than first.  If address is beyond last line
4779         number record, don't return the last line as the correct value.
4780
4781 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4782
4783         * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
4784         * bfd-in2.h: Rebuild.
4785
4786 1999-08-08  Mark Elbrecht  <snowball3@bigfoot.com>
4787
4788         * libcoff-in.h (struct coff_section_alignment_entry): Define.
4789         * coffcode.h (coff_set_custom_section_alignment): New static
4790         function.
4791         (coff_section_alignment_table): New static array.
4792         (coff_new_section_hook): Use coff_set_customer_section_alignment.
4793         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4794         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4795         * libcoff.h: Rebuild.
4796
4797 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4798
4799         * Makefile.am: Rename .dep* files to DEP*.  Change DEP variable to
4800         MKDEP.
4801         * Makefile.in: Rebuild.
4802
4803 1999-08-08  Mumit Khan  <khan@xraylith.wisc.edu>
4804
4805         * section.c (SEC_SHARED): Define.
4806         * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
4807         (styp_to_sec_flags): Likewise.
4808         * peicode.h (coff_swap_scnhdr_out): Likewise.
4809         * bfd-in2.h: Rebuild.
4810
4811 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4812
4813         * coffcode.h (coff_classify_symbol): Comment out part of
4814         1999-08-05 change which breaks cygwin DLLs.
4815
4816         * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
4817         * aclocal.m4, configure: Rebuild.
4818
4819 1999-08-06  Ian Lance Taylor  <ian@zembu.com>
4820
4821         * section.c (global_syms): Only initialize union field if
4822         __STDC__.
4823
4824 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4825
4826         * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
4827         the size of a GOT entry here.
4828         (mips_elf_calculate_relocation): Don't create a local GOT entry
4829         for the symbol in a GOT16 relocation; just for it's high-order bit
4830         (_bfd_mips_elf_relocate_section): Fix thinko.
4831
4832 1999-08-05  Ian Lance Taylor  <ian@zembu.com>
4833
4834         Based on patches from Donn Terry <donn@interix.com>:
4835         * coffcode.h (enum coff_symbol_classification): Define.
4836         (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
4837         _bfd_coff_classify_symbol.  Change return type.
4838         (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
4839         (coff_slurp_symbol_table): Use coff_classify_symbol.
4840         (coff_classify_symbol): New static function.
4841         (coff_sym_is_global): Never define.
4842         (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
4843         * cofflink.c (coff_link_check_ar_symbols): Use
4844         bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
4845         (coff_link_add_symbols): Likewise.
4846         (_bfd_coff_link_input_bfd): Likewise.
4847         * coff-sh.c (bfd_coff_small_swap_table): Initialize with
4848         coff_classify_symbol.
4849         * libcoff.h: Rebuild.
4850
4851 Wed Aug  4 18:08:07 1999  Jeffrey A Law  (law@cygnus.com)
4852
4853         * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
4854         (e_ltpsel, e_rtpsel): Similarly.
4855
4856         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
4857         and 14bit ertpsel.  Handle 64bit psel.
4858
4859 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4860
4861         * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
4862         handling for REL relocations.  And only left-shift R_MIPS26
4863         relocation addends where necessary.
4864
4865 1999-08-03  Mark Mitchell  <mark@codesourcery.com>
4866
4867         * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
4868         (mips_elf_next_lo16_relocation): Don't compute the addend here.
4869         Just return the relocation found.
4870         (mips_elf_relocate_section): Pull the LO16 addend out of the
4871         section itself when using REL relocations.
4872
4873         * elf32-mips.c (mips_elf_calculate_relocation): Restore
4874         _DYNAMIC_LINK handling and handling of undefined symbols in shared
4875         libraries.
4876
4877 1999-08-03  Ian Lance Taylor  <ian@zembu.com>
4878
4879         * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
4880         value of a symbol in a SEC_DEBUGGING section.  Warn when doing a
4881         relocation against a symbol in an input section with no output
4882         section.  From Daniel Jacobowitz <drow@false.org>.
4883
4884         * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
4885
4886         * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
4887         look for generated file correctly.
4888         * aclocal.m4, configure: Rebuild.
4889
4890 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4891
4892         * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
4893         and R_MIPS16_26 relocations correctly when relocating.
4894         (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
4895         and R_MIPS_CALL_LO16 are for global symbols.
4896
4897 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4898
4899         * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
4900         some fields.
4901         * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
4902         variables and initialize them.
4903
4904 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
4905
4906         * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
4907         there are no global symbols requiring GOT entries.
4908         (_bfd_mips_elf_size_dynamic_sections): Likewise.
4909         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4910         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4911
4912         * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
4913         symbols are considered to have the value zero.
4914         (_bfd_mips_elf_relocate_section): Don't try to perform a
4915         relocation for an undefined symbol.
4916         (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
4917         GOT16 relocations.
4918
4919 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4920
4921         * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
4922         wants ba,a,pt %xcc instead of %icc.
4923         Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
4924         of large PLT entries.
4925         (sparc64_elf_plt_ptr_offset): Fix calculation.
4926         (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
4927         addend should be relative to load address, not .plt section start.
4928         (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
4929
4930 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4931
4932         * elf-bfd.h (struct elf_backend_data): Add
4933         print_symbol_all and output_arch_syms backend methods.
4934         * elfxx-target.h: Likewise.
4935         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
4936         sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
4937         sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
4938         functions.
4939         (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
4940         symbols in .dynsym, add their names into .dynstr. Put those symbols
4941         into dynlocal.
4942         (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
4943         pointers to STT_REGISTER symbols in dynsym section.
4944         (sparc64_elf_print_symbol_all): New function.
4945         * elf.c (bfd_elf_print_symbol): Allow special backend symbol
4946         printing using the print_symbol_all hook.
4947
4948 1999-07-30  Catherine Moore  <clm@cygnus.com>
4949
4950         * elf32-arm.h (elf32_arm_check_relocs):  Use r_offset for
4951         R_ARM_GNU_VTENTRY.
4952
4953 1999-07-29  Richard Henderson  <rth@cygnus.com>
4954
4955         * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
4956         dynamic_sections_created.
4957
4958 1999-07-29  Richard Henderson  <rth@cygnus.com>
4959
4960         * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
4961         (mips_rtype_to_howto): ... new function.
4962         (_bfd_mips_elf_relocate_section): Use it.
4963
4964 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
4965
4966         * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
4967
4968 1999-07-27  Nick Clifton  <nickc@cygnus.com>
4969
4970         Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
4971
4972         * coff-arm.c (coff_arm_is_local_label_name): Change to strip
4973         out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
4974
4975 1999-07-23  Donn Terry  <donn@interix.com>
4976
4977         * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
4978         field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
4979         * cofflink.c (coff_link_add_symbols): If PE, handle section
4980         symbols specially.
4981         * libcoff.h: Rebuild.
4982
4983         * config.bfd (i[3456]86-*-interix*): New target.
4984
4985 1999-07-21  Mark Elbrecht  <snowball3@bigfoot.com>
4986
4987         * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
4988         COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
4989         .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
4990         * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
4991         (COFF_SUPPORT_GNU_LINKONCE): Define.
4992         * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
4993         (COFF_SUPPORT_GNU_LINKONCE): Define.
4994
4995 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
4996
4997         From Mark Elbrecht:
4998         * makefile.dos: Remove; obsolete.
4999         * configure.bat: Remove; obsolete.
5000
5001 1999-07-21  H.J. Lu  <hjl@gnu.org>
5002
5003         * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
5004
5005 1999-07-21  Philippe De Muyter  <phdm@macqel.be>
5006
5007         * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
5008         message and fail if a symbol index is out of range.
5009
5010 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
5011
5012         * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
5013         when looking at a R_MIPS_GOT16 relocation.
5014
5015 1999-07-20  Nick Clifton  <nickc@cygnus.com>
5016
5017         * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
5018
5019 Mon Jul 19 14:03:44 1999  Mark P. Mitchell  <mark@codesourcery.com>
5020
5021         * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
5022         removed in previous change.
5023         (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
5024         in relocateable output.
5025
5026 1999-07-19  Ian Lance Taylor  <ian@zembu.com>
5027
5028         * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
5029         structure.
5030
5031         * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
5032         if they appear to be specially created by the linker.
5033
5034 1999-07-19  Nick Clifton  <nickc@cygnus.com>
5035
5036         * targets.c (alternative_target): New field in bfd_target
5037         structure.
5038         (bfd_search_for_target): New function:  Find a target that
5039         satisifies a search function.
5040         * bfd-in2.h: Regenerate.
5041
5042         * elfxx-target.h: Initialise the alternative_target field of
5043         the bfd_target structures to point to the other target (if
5044         defined).
5045         * nlm-target.h: Initialise the alternative_target field of
5046         the bfd_target structures to point to the other target (if
5047         defined).
5048
5049         * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
5050         (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
5051
5052         * aix386-core.c: Initialise new field of bfd_target structure.
5053         * aout-adobe.c: Initialise new field of bfd_target structure.
5054         * aout-arm.c: Initialise new field of bfd_target structure.
5055         * aout-target.h: Initialise new field of bfd_target structure.
5056         * aout-tic30.c: Initialise new field of bfd_target structure.
5057         * binary.c: Initialise new field of bfd_target structure.
5058         * bout.c: Initialise new field of bfd_target structure.
5059         * cisco-core.c: Initialise new field of bfd_target structure.
5060         * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
5061         * coff-alpha.c: Initialise new field of bfd_target structure.
5062         * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
5063         * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
5064         * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
5065         * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
5066         * coff-i386.c: Initialise new field of bfd_target structure.
5067         * coff-i860.c: Initialise new field of bfd_target structure.
5068         * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
5069         * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
5070         * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
5071         * coff-mips.c: Initialise new field of bfd_target structure.
5072         * coff-ppc.c: Initialise new field of bfd_target structure.
5073         * coff-rs6000.c: Initialise new field of bfd_target structure.
5074         * coff-sh.c:  Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
5075         * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
5076         * coff-tic30.c: Initialise new field of bfd_target structure.
5077         * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
5078         * coff-w65.c:   Use CREATE_LITTLE_COFF_TARGET_VEC.
5079         * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
5080         * coff-z8k.c:   Use CREATE_BIG_COFF_TARGET_VEC.
5081         * hppabsd-core.c: Initialise new field of bfd_target structure.
5082         * hpux-core.c: Initialise new field of bfd_target structure.
5083         * i386msdos.c: Initialise new field of bfd_target structure.
5084         * i386os9k.c: Initialise new field of bfd_target structure.
5085         * ieee.c: Initialise new field of bfd_target structure.
5086         * ihex.c: Initialise new field of bfd_target structure.
5087         * irix-core.c: Initialise new field of bfd_target structure.
5088         * mipsbsd.c: Initialise new field of bfd_target structure.
5089         * netbsd-core.c: Initialise new field of bfd_target structure.
5090         * oasys.c: Initialise new field of bfd_target structure.
5091         * osf-core.c: Initialise new field of bfd_target structure.
5092         * ppcboot.c: Initialise new field of bfd_target structure.
5093         * ptrace-core.c: Initialise new field of bfd_target structure.
5094         * sco5-core.c: Initialise new field of bfd_target structure.
5095         * som.c: Initialise new field of bfd_target structure.
5096         * srec.c: Initialise new field of bfd_target structure.
5097         * tekhex.c: Initialise new field of bfd_target structure.
5098         * trad-core.c: Initialise new field of bfd_target structure.
5099         * versados.c: Initialise new field of bfd_target structure.
5100         * vms.c: Initialise new field of bfd_target structure.
5101
5102 1999-07-19  Andreas Schwab  <schwab@suse.de>
5103
5104         * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
5105         and rel_hdr.
5106
5107 Sat Jul 17 02:28:28 1999  Mark P. Mitchell  <mark@codesourcery.com>
5108
5109         * elflink.h (elf_link_adjust_relocs): New function.
5110         (elf_bfd_final_link): Use it.
5111         (elf_link_input_bfd): Deal with the fact that there can be
5112         two relocation sections for a single section.
5113         (elf_reloc_link_order): Likewise.
5114
5115         * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
5116         a relocateable object.
5117         (_bfd_mips_elf_relocate_section): Handle relocateable links.
5118
5119 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
5120
5121         * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
5122         (sparc64_elf_get_reloc_upper_bound,
5123         sparc64_elf_get_dynamic_reloc_upper_bound,
5124         sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
5125         sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
5126         New functions.
5127         (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
5128         ELF64_R_TYPE_ID/DATA where appropriate.
5129
5130 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
5131
5132         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
5133         DT_SPARC_PLTFMT.
5134
5135 1999-07-16  Ian Lance Taylor  <ian@zembu.com>
5136
5137         * elf32-mips.c (mips_elf_local_relocation_p): New static
5138         function.
5139         (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
5140         (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
5141         Always set *require_jalxp.
5142         (mips_elf_stub_section_p): Mark abfd parameter as unused.
5143         (_bfd_mips_elf_relocate_section): Only look for LO16 following
5144         GOT16 if the GOT16 is against a local symbol.  Don't return false
5145         for an undefined symbol.  If there is an overflow, assert that we
5146         have a name.
5147
5148 1999-07-16  Andreas Schwab  <schwab@suse.de>
5149
5150         * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
5151         variables `link' and `elfsec'.
5152         (elf_bfd_final_link): Remove unused variable `os'.
5153
5154 Thu Jul 15 17:55:31 1999  Mark P. Mitchell  <mark@codesourcery.com>
5155
5156         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
5157         a PT_PHDR program headers.
5158         (_bfd_mips_elf_final_link): Don't assume there are going to be
5159         section symbols when we're not building a shared object.
5160         (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
5161         we need one.
5162
5163 1999-07-15  J.T. Conklin  <jtc@redback.com>
5164
5165         * config.bfd (i[3456]86-*-vxworks*): New target.
5166
5167 1999-07-15  Mark Mitchell  <mark@codesourcery.com>
5168
5169         * elf32-mips.c (mips_elf_stub_section_p): New function.
5170         (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
5171         (mips_elf_relocate_section): Adjust calling sequence for
5172         mips_elf_calculate_relocation and mips_elf_perform_relocation.
5173         (mips_elf_perform_relocation): Turn `jal' into `jalx' where
5174         required.
5175
5176 1999-07-15  Ian Lance Taylor  <ian@zembu.com>
5177
5178         * configure.in: Bump version number to 2.9.5.
5179         * configure: Rebuild.
5180
5181 Thu Jul 15 02:56:15 1999  Jeffrey A Law  (law@cygnus.com)
5182
5183         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
5184         64bit format.
5185         (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
5186         to derive final type instead of hardwiring a selection.
5187
5188 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
5189
5190         * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
5191         things relocated by R_MIPS16_GPREL.
5192         (mips_elf_perform_relocation): Likewise.
5193
5194 Wed Jul 14 15:23:19 1999  Jim Wilson  <wilson@cygnus.com>
5195
5196         * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
5197
5198 1999-07-14  Richard Henderson  <rth@cygnus.com>
5199
5200         * elf32-mips.c (struct mips_got_info): Add global_gotno.
5201         (_bfd_mips_elf_size_dynamic_sections): Set it.
5202         (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
5203         (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
5204         new argument max_local.
5205
5206 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
5207
5208         * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
5209         subwords when handling an R_MIPS16_26 relocation.
5210         (mips_elf_perform_relocation): Don't be paranoid abour right-shift
5211         semantics.
5212
5213         * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
5214         dst_mask to match reality.
5215         (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
5216         (mips_elf_obtain_contents): Use bfd_get.
5217         (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
5218         (mips_elf_relocate_section): Likewise.
5219
5220 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
5221
5222         * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
5223         (mips_elf_relocate_section): Adjust calling sequence for
5224         mips_elf_perform_relocation.
5225         (mips_elf_perform_relocation): Take additional argument.  Handle
5226         R_MIPS16_26.  Use bfd_put for convenience.
5227
5228 1999-07-13  Richard Henderson  <rth@cygnus.com>
5229
5230         * elf.c (assign_file_positions_for_segments): Thinko last change.
5231         Always overwrite p_flags.
5232
5233 1999-07-13  Richard Henderson  <rth@cygnus.com>
5234
5235         * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
5236         * elflink.c (_bfd_elf_create_dynamic_sections): Only create
5237         .dynbss and .rel[a].bss if want_dynbss.
5238         * elfxx-target.h (elf_backend_want_dynbss): Provide default.
5239
5240 1999-07-13  Richard Henderson  <rth@cygnus.com>
5241
5242         * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
5243
5244 1999-07-13  Richard Henderson  <rth@cygnus.com>
5245
5246         * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
5247         (struct elf_link_hash_table): Add dynlocal.
5248         (_bfd_elf_link_lookup_local_dynindx): Prototype.
5249         (_bfd_elf_link_adjust_dynindx): Delete.
5250         (_bfd_elf_link_renumber_dynsyms): Prototype.
5251         (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
5252         * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
5253         * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
5254         (_bfd_elf_link_lookup_local_dynindx): New function.
5255         (elf_link_renumber_hash_table_dynsyms): New function.
5256         (_bfd_elf_link_renumber_dynsyms): New function.
5257         * elflink.h (elf_link_record_local_dynamic_symbol): New function.
5258         (struct elf_assign_sym_version_info): Delete removed_dynamic.
5259         (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
5260         instead of elf_link_remove_section_and_adjust_dynindices.
5261         Remove removed_dynamic code.  Use _bfd_elf_link_renumber_dynsyms.
5262         (elf_link_assign_sym_version): Remove removed_dynamic code.
5263         (elf_link_renumber_dynsyms): Delete.
5264         (elf_bfd_final_link): Install section and local symbols into .dynsym.
5265
5266         * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
5267         (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
5268         (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
5269         * elf32-mips.c: Similarly.
5270         * elf32-ppc.c: Similarly.
5271         * elf32-sparc.c: Similarly.
5272         * elf64-alpha.c: Similarly.
5273         * elf64-sparc.c: Similarly.
5274
5275 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
5276
5277         * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
5278         when _gp_disp is undefined.  Do not check R_MIPS_LO16 for overflow
5279         when the relocation is against _gp_disp.
5280
5281 1999-07-12  Mark Mitchell  <mark@codesourcery.com>
5282
5283         * dwarf2.c (read_attribute): Support DW_FORM_ref8.
5284         * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
5285         to possibly_dynamic_relocs.  Adjust usage throughout code.
5286         (elf_mips_howto_table): Handle R_MIPS_64 correctly.
5287         (elf_mips_ctor64_howto): Likewise.
5288         (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
5289         Adjust indentation.
5290         (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
5291         (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
5292         Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
5293         * elf64-mips.c (elf_backend_may_use_rel_p): Define.
5294
5295 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
5296
5297         * Makefile.am: Rebuild dependencies.
5298         * Makefile.in: Rebuild.
5299
5300         * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
5301         * bfd-in2.h: Rebuild.
5302
5303         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
5304         as appropriate.  Use EMPTY_HOWTO as appropriate.  Fill in
5305         structure initializations.  Add casts.
5306         * reloc.c (EMPTY_HOWTO): Define.
5307         * bfd-in2.h: Rebuild.
5308         * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
5309         comparisons against 0.
5310         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
5311         previous_ibfd_e_flags to unsigned long.
5312         * vms.h (struct vms_private_data_struct): Change section_count to
5313         unsigned.
5314         * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
5315         (_bfd_vms_write_gsd): Change symnum to unsigned.
5316         * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
5317         * vms-tir.c (etir_sta): Change psect to unsigned.
5318         (alloc_section): Change idx to unsigned.
5319         (tir_sta, tir_ctl): Change psect to unsigned.
5320         (_bfd_vms_write_tir): Change len and before to bfd_size_type.
5321         * vms.c (priv_section_count): Change to unsigned.
5322
5323 1999-07-12  Andreas Schwab  <schwab@suse.de>
5324
5325         * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
5326         * m68klinux.c: Likewise.
5327
5328 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
5329
5330         * Many files: Changes to avoid gcc warnings: Remove unused local
5331         variables.  Add default case to enum switches.
5332         * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
5333         compile if not COFF_IMAGE_WITH_PE.
5334         (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
5335         (bfd_arm_get_bfd_for_interworking): Likewise.
5336         (bfd_arm_process_before_allocation): Likewise.
5337         * epoc-pei-arm.c: Don't rename bfd_arm functions.
5338         * pei-arm.c: Likewise.
5339         * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
5340         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
5341         (mips_elf_got16_entry): Put parens around & in body of ==.
5342         (mips_elf_calculate_relocation): Correct test for empty string.
5343         * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
5344         stderr.
5345         * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
5346         format.
5347
5348 1999-07-11  Ian Lance Taylor  <ian@zembu.com>
5349
5350         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
5351         as appropriate.  Fill in structure initializations.  Add variable
5352         initializations.  Add casts.
5353         * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
5354         (dwarf1_unit_find_nearest_line): Change i to unsigned long.
5355
5356         * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
5357         char *.
5358         * elf-bfd.h (bfd_elf_hash): Update declaration.
5359         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
5360         when calling bfd_elf_hash.
5361
5362 1999-07-11  Mark Mitchell  <mark@codesourcery.com>
5363
5364         * libbfd.c (bfd_put_8): Make it of type `void'.
5365         * bfd-in2.h: Regenerated.
5366         * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
5367         for 32-bit hosts.
5368         (_bfd_mips_elf_final_link): Likewise.
5369
5370         * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
5371
5372 Thu Jul  8 12:32:23 1999  John David Anglin <dave@hiauly1.hia.nrc.ca>
5373
5374         * config.bfd (hppa*-*-linux-gnu*): New target
5375
5376 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
5377
5378         * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
5379         (_bfd_mips_elf_create_dynamic_sections): New function.
5380         (_bfd_mips_elf_add_symbol_hook): Likewise.
5381         (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
5382         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
5383         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
5384         (_bfd_mips_elf_gc_mark_hook): Likewise.
5385         (_bfd_mips_elf_gc_sweep_hook): Likewise.
5386         (_bfd_mips_elf_always_size_sections): Likewise.
5387         (_bfd_mips_elf_size_dynamic_sections): Likewise.
5388         (_bfd_mips_elf_check_relocs): Likewise.
5389         (_bfd_mips_elf_link_hash_table_create): Likewise.
5390         (_bfd_mips_elf_print_private_data): Likewise.
5391         (_bfd_mips_elf_link_output_symbol_hook): Likewise.
5392         (_bfd_mips_elf_final_link): Likewise.
5393         (_bfd_mips_elf_additional_program_headers): Likewise.
5394         (_bfd_mips_elf_modify_segment_map): Likewise.
5395         (_bfd_mips_elf_relocate_section): Likewise.
5396         * elf32-mips.c (mips_elf32_object_p): Move contents into
5397         _bfd_mips_elf_object_p.
5398         (mips_elf_additional_program_headers): Rename to
5399         _bfd_mips_elf_additional_program_headers.
5400         (mips_elf_modify_segment_map): Rename to
5401         _bfd_mips_elf_modify_segment_map.
5402         (elf_mips_abi_name): Change prototype.
5403         (mips_elf32_section_from_shdr): Merge into
5404         _bfd_mips_elf_section_from_shdr.
5405         (mips_elf32_section_processing): Merge into
5406         _bfd_mips_elf_section_processing.
5407         (mips_elf_final_link): Rename to _bfd_mips_elf_final_link.  Invoke
5408         the right back-end ELF linker.
5409         (mips_elf_relocate_section): Rename to
5410         _bfd_mips_elf_relocate_section.  Clean up.  Adjust for 64-bit code.
5411         (mips_elf_link_output_symbol_hook): Rename to
5412         _bfd_mips_elf_link_output_symbol_hook.
5413         (mips_elf_create_dynamic_section): Rename to
5414         _bfd_mips_elf_create_dynamic_section.
5415         (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
5416         Adjust for 64-bit code.  Use mips_elf_got_section.
5417         (mips_elf_adjust_dynamic_symbol): Rename to
5418         _bfd_mips_elf_adjust_dynamic_symbol.  Use
5419         mips_elf_allocate_dynamic_relocations.
5420         (mips_elf_finish_dynamic_symbol): Rename to
5421         _bfd_mips_elf_finish_dynamic_symbol.  Use mips_elf_got_section.
5422         Adjust for 64-bit code.
5423         (mips_elf_finish_dynamic_sections): Rename to
5424         _bfd_mips_elf_finish_dynamic_sections.  Adjust for 64-bit code.
5425         (mips_elf_always_size_sections): Rename to
5426         _bfd_mips_elf_always_size_sections.
5427         (mips_elf_add_symbol_hook): Rename to
5428         _bfd_mips_elf_add_symbol_hook.
5429         (mips_elf_next_lo16_addend): Constify.
5430         (mips_elf_calculate_relocation): Likewise.
5431         (mips_elf_obtain_contents): Likewise.
5432         (mips_elf_perform_relocation): Likewise.
5433         (mips_elf_create_dynamic_relocation): Likewise.
5434         (mips_elf_allocate_dynamic_relocations): New function.
5435         (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
5436         (MIPS_ELF_REL_SIZE): Likewise.
5437         (MIPS_ELF_DYN_SIZE): Likewise.
5438         (MIPS_ELF_GOT_SIZE): Likewise.
5439         (MIPS_ELF_SYM_SIZE): Likewise.
5440         (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
5441         (MIPS_ELF_GET_WORD): Likewise.
5442         (MIPS_ELF_PUT_WORD): Likewise.
5443         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5444         (STUB_LW): Conditionalize for 64-bit value.
5445         (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
5446         entries.
5447         (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
5448         Check it for inconsistency.
5449         (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
5450         ABI.
5451         (_bfd_mips_elf_fake_sections): Remove duplicate handling of
5452         .msym.
5453         (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
5454         (mips_elf_got_offset_from_index): Use misp_elf_got_section.
5455         (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
5456         (mips_elf_local_got_index): Likewise.
5457         (mips_elf_got_page): Likewise.
5458         (mips_elf_got_info): Likewise.
5459         (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
5460         (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
5461         (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
5462         instead of constant `2'.
5463         (mips_elf_create_got_section): Tidy.  Use MIPS_ELF_GOT_SIZE.
5464         (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
5465         (mips_elf_size_dynamic_sections): Use
5466         MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
5467         MIPS_ELF_ADD_DYNAMIC_ENTRY.  Remove #if 0'd code.
5468         Adjust all releveant entries in elf backend table.
5469         * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
5470         (mips_elf64_section_processing): Likewise.
5471         Adjust elf backend entries to use _bfd_mips_elf variants now
5472         publicly available.
5473
5474         * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
5475         hash-entry sizes.
5476         (size_dynamic_sections): Likewise.
5477         (elf_link_output_extsym): Likewise.
5478         * elf.c: (elf_fake_sections): Likewise.
5479         * libbfd.c (bfd_get): New macro.
5480         (bfd_put): Likewise.
5481         * bfd-in2.h: Regenerated.
5482
5483 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
5484
5485         * elf-bfd.h (elf_size_info): Add hash_entry_size,
5486         int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
5487         wap_reloca_in, and swap_reloca_out.
5488         * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
5489         multiple internal relocations per external relocation.
5490         (link_read_relocs): Likewise.
5491         (elf_bfd_final_link): Likewise.
5492         (elf_link_input_bfd): Likewise.
5493         (elf_gc_mark): Likewise.
5494         (elf_gc_smash_unused_vtentry_relocs): Likewise.
5495         * elfcode.h (elf_swap_dyn_out): Adjust type to match
5496         elf_swap_dyn_in.
5497         (size_info): Add entries for new fields.
5498         * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
5499         (mips_elf64_be_swap_reloc_in): New function.
5500         (mips_elf64_be_swap_reloc_out): Likewise.
5501         (mips_elf64_be_swap_reloca_in): Likewise.
5502         (mips_elf64_be_swap_reloca_out): Likewise.
5503         (mips_elf64_size_info): Add entries for new fields.
5504
5505 1999-07-07  Ian Lance Taylor  <ian@zembu.com>
5506
5507         * elflink.h (elf_bfd_final_link): Assert that section reloc_count
5508         field equals the new rel_count field.
5509         (elf_link_input_bfd): When doing a relocateable link, use the new
5510         rel_count field rather than the reloc_count field.
5511         (elf_reloc_link_order): Likewise.
5512         (elf_finish_pointer_linker_section): Likewise.
5513
5514         Based on patch from H.J. Lu <hjl@gnu.org>:
5515         * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
5516         shared library to override a weak definition in a regular object.
5517
5518 Tue Jul  6 10:23:39 1999  Jeffrey A Law  (law@cygnus.com)
5519
5520         * libhppa.h: Revert July 2, 1999 patch.
5521
5522         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
5523         need to generate DLTIND relocations, not DLTREL relocations.
5524
5525 1999-07-05  Nick Clifton  <nickc@cygnus.com>
5526
5527         * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
5528         architectures.
5529         (coff_set_flags): Recognise arm 5 architectures.
5530
5531         * cpu-arm.c: Add support for strongarm and arm9 cpus.
5532         Add support for armv5 architecture.
5533
5534         * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
5535
5536         * reloc.c: Add new, assembler only, ARM reloc:
5537         BFD_RELOC_ARM_ADRL_IMMEDIATE.
5538
5539         * bfd-in2.h: Regenerate.
5540
5541 1999-07-02  Mark Mitchell  <mark@codesourcery.com>
5542
5543         * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
5544         (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
5545         * elf.c (_bfd_elf_find_nearest_line): Pass it.
5546         * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
5547         * elf32-mips.c (ABI_64_P): New macro.
5548         (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
5549         (_bfd_mips_elf_find_nearest_line): Adjust call to
5550         _bfd_dwarf2_find_nearest_line.
5551         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5552         * libbfd.h: Regenerated.
5553
5554 1999-07-02  Ian Lance Taylor  <ian@zembu.com>
5555
5556         * config.bfd: Add * at the end of i[3456]86-*-unixware.
5557
5558 Fri Jul  2 12:21:10 1999  Jeffrey A Law  (law@cygnus.com)
5559
5560         * libhppa.h (HPPA_R_ARG_RELOC): Delete.
5561         (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
5562
5563 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5564
5565         * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
5566         fields.
5567         (_bfd_elf_init_reloc_shdr): New function.
5568         * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
5569         bfd_alloc followed by memset.
5570         (_bfd_elf_init_reloc_shdr): New function, split out from ...
5571         (elf_fake_sections): Here.
5572         (assign_section_numbers): Assign section numbers for the second
5573         relocation section, if required.
5574         * elflink.h (elf_link_output_relocs): New function.
5575         (elf_link_size_reloc_section): Likewise.
5576         (elf_bfd_final_link): Use elf_link_size_reloc_section.
5577         (elf_link_input_bfd): Use elf_link_output_relocs.
5578
5579         * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
5580         _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
5581
5582 Thu Jul  1 13:58:48 1999  Jeffrey A Law  (law@cygnus.com)
5583
5584         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
5585         with 22bit format.
5586
5587 1999-06-28  Mark Mitchell  <mark@codesourcery.com>
5588
5589         * elf32-mips.c (mips_elf_got_info): Move declaration before
5590         prototypes.  Change global_gotsym to be a pointer to a hash entry,
5591         rather than a number index.
5592         (mips_elf_link_hash_entry): Move declaration before prototypes.
5593         (mips_elf_irix6_finish_dynamic_symbol): New function.
5594         (mips_elf_sign_extend): Likewise.
5595         (mips_elf_high): Likewise.
5596         (mips_elf_higher): Likewise.
5597         (mips_elf_highest): Likewise.
5598         (mips_elf_global_got_index): Likewise.
5599         (mips_elf_local_got_index): Likewise.
5600         (mips_elf_got_offset_from_index): Likeiwse.
5601         (mips_elf_record_global_got_symbol): Likewise.
5602         (mips_elf_got_page): Likewise.
5603         (mips_elf_next_lo16_addend): Likewise.
5604         (mips_elf_calculate_relocation): Likewise.
5605         (mips_elf_obtain_contents): Likewise.
5606         (mips_elf_perform_relocation): Likewise.
5607         (mips_elf_assign_gp): Likewise.
5608         (mips_elf_sort_hash_table_f): Likewise.
5609         (mips_elf_sort_hash_table): Likewise.
5610         (mips_elf_got_section): Likewise.
5611         (mips_elf_got_info): Likewise.
5612         (mips_elf_create_local_got_entry): Likewise.
5613         (mips_elf_got16_entry): Likewise.
5614         (mips_elf_create_dynamic_relocation): Likewise.
5615         (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
5616         (mips_elf_final_gp): Use mips_elf_assign_gp.
5617         (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
5618         into SHN_SCOMMON automatically on IRIX6.
5619         (mips_elf_add_symbol_hook): Likewise.
5620         (mips_elf_relocate_section): Rewrite, using
5621         mips_elf_calculate_relocation and mips_elf_perform_relocation.
5622         (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
5623         Don't deal with .rld_map on IRIX6.
5624         (mips_elf_create_got_section): Adjust use of global_gotsym.  Set
5625         section flags appropriately for .got.
5626         (mips_elf_check_relocs): Handle IRIX6 relocations making use of
5627         the got.  Call mips_elf_record_global_got_symbol and allocate
5628         local got space appropriately.
5629         (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
5630         char *.  Rework calculation of GOT size.  Sort dynamic symbol
5631         table entries so entries that do not require GOT entries appear at
5632         the beginning.  Don't use DT_MIPS_HIPAGENO on IRIX6.  Remove dead
5633         code dealing with DT_INIT and DT_FINI.  Remove fiddling with
5634         global_gotsym.
5635         (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
5636         entries.
5637         (mips_elf_finish_dynamic_symbol): Use
5638         mips_elf_irix6_finish_dynamic_symbol.
5639         (mips_elf_finish_dynamic_sections): Correct off-by-one error
5640         setting DT_MIPS_UNREFEXTNO.  Adjust setting of DT_MIPS_GOTSYM for
5641         change to global_gotsym.  Set DT_MIPS_OPTIONS on IRIX6.
5642
5643 1999-06-30  Ian Lance Taylor  <ian@zembu.com>
5644
5645         * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
5646         relocateable link.  From Ralf Baechle <ralf@uni-koblenz.de>.
5647
5648 1999-06-04  Philip Blundell  <philb@gnu.org>
5649
5650         * elf32-arm.h (elf_backend_got_header_size): Define.
5651         (elf_backend_plt_header_size): Likewise.
5652
5653 1999-06-28  Jim Pick  <jim@jimpick.com>
5654
5655         * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
5656
5657 Tue Jun 29 02:25:03 1999  Jeffrey A Law  (law@cygnus.com)
5658
5659         * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
5660         relocation function.
5661         * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
5662
5663 1999-06-27  Mark Mitchell  <mark@codesourcery.com>
5664
5665         * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
5666         (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
5667         (MIPS_ELF_STUB_SECTION_NAME): Likewise.
5668         (_bfd_mips_elf_section_from_shdr): Use them.
5669         (_bfd_mips_elf_fake_sections): Likewise.  Add .srdata to the list
5670         of GP-relative sections.
5671         (_bfd_mips_elf_set_section_contents): Use them.
5672         (_bfd_mips_elf_section_processing): Share code between .sdata and
5673         .lit4/.lit8 sections.  Set appropriate flags for .srdata.
5674         (mips_elf_additional_program_headers): Add handling for
5675         PT_MIPS_OPTIONS segment on IRIX6.
5676         (mips_elf_modify_segment_map): Likeiwse.
5677         (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
5678         Include the options sections on IRIX6.  Don't look for GP-relative
5679         sections by name; use SHF_MIPS_GPREL instead.
5680         (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
5681         the N32 ABI.
5682         (mips_elf_create_dynamic_sections): Don't muck about with section
5683         alignments and such on IRIX6.
5684         (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5685         (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
5686         fact that ELF_DYNAMIC_INTERPRETER is no longer a constant.  Use
5687         bfd_zalloc rather than bfd_alloc and memset.
5688         (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5689         Don't assert the existence of .rld_map on IRIX6.
5690         (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
5691
5692         * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
5693         (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
5694         instead.
5695
5696 1999-06-26  Mark Mitchell  <mark@codesourcery.com>
5697
5698         * elf32-mips.c (mips_elf_swap_msym_in): New function.
5699         (mips_elf_swap_msym_out): New function.
5700         (mips_elf_create_msym_section): Likewise.
5701         (MIPS_ELF_MSYM_SECTION_NAME): New macro.
5702         (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
5703         (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
5704         section not named .msym.
5705         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
5706         .msym directly.  Set appropriate attributes for the .msym
5707         section.
5708         (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
5709         (mips_elf_link_hash_newfunc): Clear it.
5710         (mips_elf_create_dynamic_sections): Create the .msym section
5711         on IRIX6.
5712         (mips_elf_size_dynamic_sections):  Allocate space for the
5713         .msym section.  Add a DT_MIPS_MSYM entry.
5714         (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
5715         the symbol.
5716         (mips_elf_finish_dynamic_sections): Assign a value for
5717         DT_MIPS_MSYM.  Add .msym entries for the section symbols as well.
5718
5719         * elf32-mips.c (irix_compat_t): New enumeration.
5720         (ABI_N32_P): New macro.
5721         (IRIX_COMPAT): Likewise.
5722         (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
5723         (mips_elf_relocate_section): Fix typo.
5724
5725 1999-06-26  Mumit Khan  <khan@xraylith.wisc.edu>
5726
5727         * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
5728         as writable PE sections.
5729
5730 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5731
5732         * dwarf2.c (struct arange): New type.
5733         (struct comp_unit): Replace LOW and HIGH by member ARANGE.
5734         (arange_add): New function.
5735         (decode_line_info): Keep track of address ranges that a compilation
5736         unit covers.
5737         (comp_unit_contains_address): Return true if address is contained
5738         in _any_ of the address ranges associated with a compilation unit.
5739         (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
5740         on the first comp_unit that contains the address.
5741
5742 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5743
5744         * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
5745         (decode_line_info): Add variable STASH and initialize it to point
5746         to the per-bfd dwarf2_debug info.  Remove static variable
5747         dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
5748
5749 1999-06-26  Ian Lance Taylor  <ian@zembu.com>
5750
5751         * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
5752         shared library to have an undefined symbol.
5753
5754         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5755         * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
5756
5757 Thu Jun 24 20:59:11 1999  Jeffrey A Law  (law@cygnus.com)
5758
5759         * elf-hppa.c (elf_hppa_final_write_processing): New function.
5760         * elf32-hppa.c: Remove everything related to symbol extension
5761         sections & records.  Use the common elf_hppa_final_write_processing.
5762
5763 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5764
5765         * elflink.h (size_dynamic_sections): Use user-specified init/fini
5766         functions instead of _init/_fini if requested.
5767
5768 1999-06-23  Ian Lance Taylor  <ian@zembu.com>
5769
5770         * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
5771         field.
5772
5773 1999-06-22  Ian Lance Taylor  <ian@zembu.com>
5774
5775         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5776         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
5777         field to 0, not -1.
5778         (ppc_elf_finish_dynamic_sections): Check for positive section
5779         dynindx field, rather than comparing against -1.
5780         (ppc_elf_relocate_section): Only return false if undefined_symbol
5781         or reloc_overflow fail, not always upon encountering an error.
5782
5783 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5784
5785         * elflink.h (link_read_relocs): Explicitly cast external_relocs to
5786         bfd_byte * before performing pointer arithmetic.
5787
5788 Tue Jun 22 13:06:25 1999  Jeffrey A Law  (law@cygnus.com)
5789
5790         * elf-hppa.h: New file.  Common stuff for elf32 and elf64 PA
5791         support.
5792         * elf32-hppa.c: Include elf-hppa.h.
5793         (ARCH_SIZE): Define.
5794         (elf_hppa_reloc_type_lookup): Delete.  Found in the common code
5795         now.
5796         (elf32_hppa_info_to_howto): Similarly.
5797         (elf_hppa_howto_table): Similarly.
5798         (elf_hppa_reloc_type_lookup): Similarly.
5799         (hppa_elf_gen_reloc_type): Similarly.
5800         * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
5801
5802 1999-06-22  Nick Clifton  <nickc@cygnus.com>
5803
5804         * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
5805         handling R_V850_22_PCREL relocation.
5806
5807 1999-06-21  Ian Lance Taylor  <ian@zembu.com>
5808
5809         * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
5810         type.
5811
5812 Sun Jun 20 14:13:57 1999  Richard Henderson  <rth@cygnus.com>
5813
5814         * section.c (_bfd_strip_section_from_output): Ignore sections
5815         DISCARDed by the link script.
5816
5817 1999-06-19  Ian Lance Taylor  <ian@zembu.com>
5818
5819         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5820         Remove unused local variable spp.
5821
5822         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
5823         the entry symbol is not set.
5824
5825 Fri Jun 18 04:24:57 1999  Richard Henderson  <rth@cygnus.com>
5826
5827         * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
5828         GPDISP or LITUSE in a relocatable link.
5829
5830 Thu Jun 17 21:24:43 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5831
5832         * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
5833         * (alloc_dwarf1_func): Likewise.
5834
5835 Wed Jun 16 03:09:57 1999  Jeffrey A Law  (law@cygnus.com)
5836
5837         * libhppa.h: Fix various formatting errors.
5838         (assemble_3); Rewrite using CATENATE.
5839         (assemble_17): Fix various bugs.
5840
5841 1999-06-16  Nick Clifton  <nickc@cygnus.com>
5842
5843         * elf32-mcore.c (R_MCORE_RAW): Fix definition.
5844
5845 1999-06-15  Richard Henderson  <rth@cygnus.com>
5846
5847         * section.c (SEC_SHORT): Define.
5848         * bfd-in2.h: Rebuild.
5849
5850 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5851
5852         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5853         Remove abfd parameter.  Use _bfd_strip_section_from_output.
5854         (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
5855
5856         * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
5857         * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
5858         * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
5859         function.
5860         (bfd_elf_size_dynamic_sections): Use it.
5861
5862 1999-06-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
5863
5864         * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
5865         complain_overflow_bitfield to complain_overflow_signed.
5866
5867 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5868
5869         * elflink.h (elf_link_read_relocs_from_section): New function,
5870         split out from ...
5871         (elf_link_read_relocs): Here.  Use it for both relocation
5872         sections.
5873
5874 1999-06-12  Mark Mitchell  <mark@codesourcery.com>
5875
5876         * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
5877         asect->reloc_count is valid.
5878
5879 1999-06-12  Ian Lance Taylor  <ian@zembu.com>
5880
5881         * elf32-mips.c (mips_elf32_section_processing): Permit a
5882         SHT_MIPS_REGINFO section to have a size of 0.
5883
5884 1999-06-12  David O'Brien  <obrien@freebsd.org>
5885
5886         * config.bfd (alpha*-*-freebsd*): New target.
5887         (i[3456]86-*-freebsd*): Now defaults to ELF.
5888
5889 1999-06-11  Ian Lance Taylor  <ian@zembu.com>
5890
5891         * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
5892         wrap if the relocation covers the high bit of an address.
5893
5894         * dwarf2.c (decode_line_info): Remove unused variable first_time.
5895
5896 1999-06-10  Jakub Jelinek  <jj@ultra.linux.cz>
5897
5898         * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
5899         instead of R_SPARC_max.
5900         (sparc64_elf_info_to_howto): Likewise.
5901         * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
5902         (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
5903
5904 1999-06-07  Richard Henderson  <rth@cygnus.com>
5905
5906         * section.c (_bfd_strip_section_from_output): Remove output
5907         sections with no initial link_order.
5908
5909 1999-06-07  Nick Clifton  <nickc@cygnus.com>
5910
5911         * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
5912
5913 Mon Jun  7 11:49:43 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5914
5915         * Makefile.am (SOURCE_HFILES): Add missing headers.
5916         * Makefile.in: Regenerated.
5917
5918 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
5919
5920         * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
5921         the N32 ABI.
5922
5923 1999-06-04  Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5924
5925         * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
5926         range undefweak symbols.
5927         * hash.c: Add missing comma after @xref{}
5928         * linker.c: Likewise.
5929
5930 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5931
5932         * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
5933         if not defined.
5934         * elf32-gen.c (ELF_MAXPAGESIZE): Define.
5935         * elf32-i860.c (ELF_MAXPAGESIZE): Define.
5936         * elf32-i960.c (ELF_MAXPAGESIZE): Define.
5937         * elf64-gen.c (ELF_MAXPAGESIZE): Define.
5938
5939 1999-06-04  Ian Lance Taylor  <ian@zembu.com>
5940
5941         * Makefile.am: Rebuild dependencies.
5942         (BFD32_BACKENDS): Add dwarf1.lo.
5943         (BFD32_BACKENDS_CFILES): Add dwarf1.c.
5944         * Makefile.in: Rebuild.
5945
5946 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5947
5948         * Makefile.am: Add epoc-arm-pe target.
5949         * Makefile.in: Regenerate.
5950         * pe-arm.c: Only redefine interworking function names if they have
5951         not already been redefined.
5952         * pei-arm.c: Only redefine interworking function names if they have
5953         not already been redefined.
5954         * epoc-pe-arm.c: Redefine interworking function names to avoid a
5955         name space clash.
5956         * epoc-pei-arm.c: Redefine interworking function names to avoid a
5957         name space clash.
5958
5959 1999-06-03  Nick Clifton  <nickc@cygnus.com>
5960
5961         * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
5962
5963 Fri Jun  4 10:05:11 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5964
5965         * elf.c (elf_fake_sections): Undo change of 1999-05-10.
5966
5967 Fri Jun  4 03:10:49 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5968
5969         * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
5970         start / stop for recalculating of r_addend of R_SH_SWITCH*.
5971
5972 Fri Jun  4 02:53:13 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5973
5974         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
5975         in other text sections.
5976
5977 Fri Jun  4 02:29:34 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5978
5979         * libbfd.c (_bfd_generic_verify_endian_match): New function.
5980         * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
5981         * libbfd.h: Regenerate.
5982         * coff-sh.c (sh_merge_private_data): Delete.
5983         (coff_bfd_merge_private_bfd_data): Change to
5984         _bfd_generic_verify_endian_match.
5985         (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
5986
5987 1999-06-03  Ulrich Drepper  <drepper@cygnus.com>
5988
5989         * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
5990
5991 1999-06-03  Ian Lance Taylor  <ian@zembu.com>
5992
5993         * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
5994         prototype.
5995         (bfd_elf32_arm_process_before_allocation): Likewise.
5996         * bfd-in2.h: Rebuild.
5997
5998 1999-06-03  David Mosberger  <davidm@hpl.hp.com>
5999
6000         * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
6001         track of end_sequence markers.
6002         (add_line_info): Add END_SEQUENCE arg.
6003         (decode_line_info): Don't try to infer lo_pc and hi_pc from the
6004         debug-line info---it doesn't work right if a compilation unit
6005         consists of multiple discontiguous code-sequences.  It would be
6006         worthwhile to optimize for the common case where a compilation
6007         unit results in a contiguous set of code sequences, but this is
6008         quite tricky to get right for arbitrary DWARF2 files.
6009         (lookup_address_in_line_info_table): Don't use the last line entry
6010         for a compilation unit for anything with an address higher than
6011         this line entry.  Also, check for end_sequence markers to
6012         correctly handle discontinuities.
6013         (_bfd_dwarf2_find_nearest_line): When checking previously loaded
6014         compilation units, check all compilation units with each->high==0
6015         just like when reading compilation units.
6016
6017         * dwarf2.c (decode_line_info): Initialize table->files and
6018         table->last_line to NULL to avoid segfaults due to random
6019         values in these members.
6020         (concat_filename): Check for out-of-range file number before
6021         indexing filename table.  Segfaults suck.
6022
6023         * dwarf2.c (decode_line_info): Don't truncate address to least
6024         significant 32 bits (breaks 64 bit targets).
6025         (lookup_address_in_function_table): Ditto.
6026         (comp_unit_contains_address): Ditto.
6027
6028 1999-06-02  Mark Mitchell  <Mark Mitchell <mark@codesourcery.com>>
6029
6030         * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
6031         * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
6032         (mips_elf64_howto_table_rela): Likewise.
6033
6034         * elfcode.h (elf_slurp_reloc_table_from_section): New function,
6035         split out from ...
6036         (elf_slurp_reloc_table): Here.  Use it to handle the case where a
6037         single section has two associated relocation sections.
6038
6039 1999-06-02  Mark Salter  <msalter@cygnus.com>
6040
6041         * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
6042         COFF_WITH_PE defined.
6043
6044 1999-06-02  Nick Clifton  <nickc@cygnus.com>
6045
6046         * pe-arm.c: Rename global arm interworking functions to avoid name
6047         collision when all targets BFD is built.
6048         * pei-arm.c: Ditto.
6049
6050 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
6051
6052         * elf-bfd.h (elf_backend_data): Remove use_rela_p.  Add
6053         may_use_rel_p, may_use_rela_p, default_use_rela_p.
6054         (bfd_elf_section_data): Add use_rela_p.
6055         * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
6056         (_bfd_elf_new_section_hook): Likewise.
6057         (elf_fake_sections): Use may_use_rela_p, etc., instead of
6058         use_rela_p.
6059         (_bfd_elf_copy_private_section_data): Copy use_rela_p.
6060         * elfcode.h (write_relocs): Determine whether or not use rela
6061         relocs based on the relocation section header.
6062         * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
6063         instead of use_rela_p.
6064         * elfxx-target.h (elf_backend_may_use_relp): New macro.
6065         (elf_backend_may_use_rela_p): Likewise.
6066         (elf_backend_default_use_rela_p): Likewise.
6067         (elfNN_bed): Use them.
6068
6069 Wed Jun  2 12:38:49 1999  Miodrag Vallat <miodrag@multimania.com>
6070
6071         * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
6072
6073 Tue Jun  1 17:57:58 1999  Mark P. Mitchell  <mitchell@n02.acl.lanl.gov>
6074
6075         * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
6076         (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
6077         (BFD_RELOC_MIPS_GOT_OFST): Likewise.
6078         (BFD_RELOC_MIPS_GOT_DISP): Likewise.
6079         * bfd-in2.h: Regenerated.
6080         * libbfd.h: Likewise.
6081         * elf32-mips.c (mips_info_to_howto_rela): New function.
6082         (USE_REL): Adjust for new conventions.
6083         (MINUS_ONE): New macro.
6084         (elf_mips_howto_table): Add R_MIPS_SUB.
6085         (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
6086         and MIPS_GOT_DISP.
6087         (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
6088         .MIPS.content section.
6089         (_bfd_mips_elf_fake_sections): Treat all sections that begin
6090         with .MIPS.content as .MIPS.content sections.  Set
6091         SHF_MNIPS_NOSTRIP for such section.
6092         (elf_info_to_howto): Define to mips_info_to_howto_rela.
6093         * elf64-mips.c (mips_r):  Add entries for MIPS_SUB, MIPS_GOT_PAGE,
6094         MIPS_GOT_OFST, and MIPS_GOT_DISP.
6095
6096 Wed Jun  2 11:51:12 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6097
6098         * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
6099         variable.
6100
6101         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
6102         `else'.
6103
6104 1999-05-30  Philip Blundell  <philb@gnu.org>
6105
6106         * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
6107         1993-03-25 (!!).  Take into account the bitmasks for the reloc so
6108         the addend does not overflow into the rest of the word.
6109
6110 1999-05-29  Nick Clifton  <nickc@cygnus.com>
6111
6112         * bfd-in.h: Amend prototype for
6113         bfd_elf32_arm_process_before_allocation .
6114         * bfd-in.h: Regenerate.
6115
6116         * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
6117         elements in a fixed sized array.
6118         (ARM_ELF_ABI_VERSION): Define.
6119         (ARM_ELF_OS_ABI_VERSION): Define.
6120         (R_ARM_THM_ABS5): Fix rightshift and size.
6121         (R_ARM_THM_PC22): Fix size.
6122         (R_ARM_PLT32): Define Howto.
6123         (find_howto): New function: Locate a howto based on a reloc
6124         number.
6125         (elf32_arm_info_to_howto): Use find_howto if necessary.
6126         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
6127         bfd_reloc_code_real_type.
6128         (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
6129         and BFD_RELOC_VTABLE_ENTRY.
6130         (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
6131
6132         * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
6133         elements in a fixed sized array.
6134         (ARM_ELF_ABI_VERSION): Define.
6135         (ARM_ELF_OS_ABI_VERSION): Define.
6136         (R_ARM_THM_ABS5): Fix rightshift and size.
6137         (R_ARM_THM_PC22): Fix size.
6138         (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
6139         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
6140         bfd_reloc_code_real_type.
6141
6142         * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
6143         no_pipeline_knowledge.
6144         (elf32_arm_link_hash_create): Initialise new field to zero.
6145         (bfd_elf32_arm_process_before_allocation): Add new paraemter:
6146         no_pipeline_knowledge.  Use this parameter to initialise the field
6147         in the globals data structure.
6148         (elf32_arm_final_link_relocate): Only add in pipeline offset if
6149         no_pipeline_knowledge is false and the binary is from an old
6150         toolchain.
6151         (elf32_arm_merge_private_data): Generate an error if an attempt is
6152         made to link together big endian and little endian code.
6153         (elf32_arm_post_process_headers): New function:  Initialise the
6154         EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
6155         header.
6156         (elf_backend_post_process_headers): Define.
6157
6158 1999-05-28  Nick Clifton  <nickc@cygnus.com>
6159
6160         * elf-bfd.h (struct elf_backend_data): Add new field:
6161         elf_backend_post_process_headers.
6162
6163         * elfxx-target.h (elf_backend_post_process_headers): Define to
6164         NULL if not already defined.
6165         (elfNN_bed): Initialise elf_backend_post_process_headers field.
6166
6167         * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
6168         to zero.
6169         (_bfd_elf_compute_section_file_positions): Call
6170         elf_backend_post_process_headers if defined.
6171
6172 1999-05-28  Ian Lance Taylor  <ian@zembu.com>
6173
6174         * configure.in: Check whether getuid and getgid exist.
6175         * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
6176         HAVE_GETGID are not defined, respectively.
6177         (bfd_write_armap): Don't special case on _WIN32 for getuid and
6178         getgid.
6179         * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
6180         * configure, config.in: Rebuild.
6181
6182 1999-05-28  Martin Dorey  <mdorey@madge.com>
6183
6184         * elf32-i960.c: New file.
6185         * elf.c (prep_headers): Handle bfd_arch_i960.
6186         * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
6187         * config.bfd (i960-*-elf*): New target.
6188         * configure.in (bfd_elf32_i960_vec): New target vector.
6189         * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
6190         (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
6191         * Makefile.in, aclocal.m4, configure: Rebuild.
6192
6193 1999-05-27  Nick Clifton  <nickc@cygnus.com>
6194
6195         * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
6196         R_ARM_PLT32.
6197         (find_howto): New function: Find entries in the
6198         elf32_arm_howto_table.
6199         (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
6200         computed simply.
6201         (elf32_arm_reloc_type_lookup): Add lookup for
6202         BFD_RELOC_ARM_PLT32.
6203
6204 1999-05-25  Philip Blundell  <pb@nexus.co.uk>
6205
6206         * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
6207         (elf32_arm_link_hash_table_create): Use above function as the
6208         constructor for hash table entries.
6209         (elf32_arm_relocate_section): Avoid crash when there is no output
6210         section.
6211         (elf32_arm_final_link_relocate): New parameter h.
6212         (elf32_arm_relocate_section): Pass symbol hash entry to above
6213         routine.
6214         (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
6215         comments.
6216
6217 1999-05-25  Catherine Moore  <clm@cygnus.com>
6218
6219         * coff-arm.c (coff_arm_relocate_section): Don't emit
6220         base file entries for pc-relative values.
6221
6222 1999-05-25  DJ Delorie  <dj@cygnus.com>
6223
6224         * peicode.h (coff_swap_sym_in): When we create the actual section
6225         to reflect the not-there section C_SECTION symbols refer to,
6226         change the symbol class to C_STAT as the section is now really
6227         there.
6228
6229 1999-05-24  Philip Blundell  <pb@nexus.co.uk>
6230
6231         * elf32-arm.h (elf32_arm_relocate_section): Undo change of
6232         1999-03-25.
6233
6234 Mon May 17 13:35:35 1999  Stan Cox  <scox@cygnus.com>
6235
6236         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
6237         F_PIC_INT to F_PIC.
6238         * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
6239         F_ARM_3M labels.  Changed F_PIC_INT to F_PIC.
6240
6241 1999-05-16  Nick Clifton  <nickc@cygnus.com>
6242
6243         * coff-mcore.c (in_reloc_p): Reinstate.
6244
6245 1999-05-15  Nick Clifton  <nickc@cygnus.com>
6246
6247         * reloc.c (BFD_RELOC_MCORE_RVA): Define.
6248         * bfd-in2.h: Regenerate.
6249         * coff-mcore.c (in_reloc_p): Remove defintion.
6250         (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
6251         (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
6252         IMAGE_REL_MCORE_RVA.
6253         (coff_mcore_rtype_to_howto): Add special processing for
6254         IMAGE_REL_MCORE_RVA.
6255         (coff_mcore_relocate_section): Add support for
6256         IMAGE_REL_MCORE_RVA.
6257         * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
6258         (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
6259         R_MCORE_RELATIVE.
6260         (mcore_elf_relocate_section): Delete redundant case labels.
6261
6262 Fri May 14 10:59:55 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6263
6264         * elf32-arm.h (elf32_arm_relocate_section): Fix operator
6265         precedence between bit-and and comparison.
6266
6267 Thu May 13 09:45:23 1999  Joel Sherrill (joel@OARcorp.com)
6268
6269         * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
6270         list of target formats (targ_selvecs).
6271         (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
6272         (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
6273
6274 1999-05-10  DJ Delorie  <dj@cygnus.com>
6275
6276         * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
6277         reasonable mode until "ar x" is smart enough to skip it (fixes
6278         gcc/libgcc.a builds on mips-ecoff targets
6279
6280         * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
6281         to work.  Hack to support MS import libraries, which use different
6282         COMDAT types than GNU.
6283         (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
6284         to implied zero-length sections (see peicode below)
6285         * coffgen.c (coff_get_normalized_symtab): Properly read long MS
6286         filename symbols, which use one *or more* auxents.
6287         * coffswap.h (coff_swap_aux_in): ditto
6288         * peicode.h (coff_swap_sym_in): Build the implied zero-length
6289         sections
6290
6291 Tue May 11 15:51:58 1999  Jeffrey A Law  (law@cygnus.com)
6292
6293         * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
6294         for all relocations.
6295
6296 1999-05-10  Catherine Moore  <clm@cygnus.com>
6297
6298         * bfd-in.h (bfd_arm_allocate_interworking_sections):  Static
6299         if COFF_IMAGE_WITH_PE.
6300         (bfd_arm_process_before_allocation): Likewise.
6301         (bfd_arm_get_bfd_for_interworking): Likewise.
6302         * coff-arm.c: Likewise.
6303         * bfd-in2.h: Regenerate.
6304         * configure.in (armpe_little_vec): Remove coff-arm.lo.
6305         (armpe_big_vec): Likewise.
6306         * configure: Rebuild.
6307
6308 1999-05-10  Nick Clifton  <nickc@cygnus.com>
6309
6310         * elf.c (elf_fake_sections): Check for .rel. as start of rel
6311         section, not just .rel.  Same for .rela.
6312
6313 1999-05-07  Nick Clifton  <nickc@cygnus.com>
6314
6315         * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
6316         endianism with an error message.
6317
6318 Thu May  6 17:09:09 1999  Fred Fish  <fnf@be.com>
6319
6320         * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
6321         assignment from "unsigned char *" to "char *".
6322         (decode_line_info): Likewise for dwarf_line_buffer assignment.
6323
6324 1999-05-05  Catherine Moore  <clm@cygnus.com>
6325
6326         * coff-arm.c (coff_arm_relocate_section):  Add one to
6327         address of ARM_RVA32 thumb functions.
6328
6329 1999-05-05  Catherine Moore  <clm@cygnus.com>
6330
6331         * elf32-m68k.c (elf32_m68k_set_private_flags): New.
6332         (elf32_m68k_copy_private_bfd_data): New.
6333         (elf32_m68k_merge_private_bfd_data): New.
6334         (elf32_m68k_print_private_bfd_data): New.
6335         (CPU32_FLAG): Define.
6336         (PLT_CPU32_ENTRY_SIZE): Define.
6337         (elf_cpu32_plt0_entry): Declare.
6338         (elf_cpu32_plt_entry): Declare.
6339         (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
6340         (elf_m68k_finish_dynamic_symbol): Likewise.
6341         (elf_m68k_finish_dynamic_sections): Likewise.
6342         (elf_backend_plt_header_size): Remove definition.
6343         (bfd_elf32_bfd_copy_private_bfd_data): Define.
6344         (bfd_elf32_bfd_merge_private_bfd_data): Define.
6345         (bfd_elf32_bfd_set_private_flags): Define.
6346         (bfd_elf32_bfd_print_private_bfd_data): Define.
6347
6348 Mon May  3 09:24:49 1999  Jeffrey A Law  (law@cygnus.com)
6349
6350         * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
6351         and R_LONG_PCREL_MODE.
6352
6353 1999-04-29  Nick Clifton  <nickc@cygnus.com>
6354
6355         * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
6356
6357 Fri Apr 28 16:36:19 1999  Stan Cox  <scox@cygnus.com>
6358
6359         * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
6360         in relocation calculation.
6361
6362 1999-04-26  Tom Tromey  <tromey@cygnus.com>
6363
6364         * aclocal.m4, configure: Updated for new version of libtool.
6365
6366 1999-04-21  Nick Clifton  <nickc@cygnus.com>
6367
6368         * coff-mcore.c: Add support for mcore relocs.
6369
6370 1999-04-20  Gavin Romig-Koch  <gavin@cygnus.com>
6371
6372         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
6373         incorrect use EF_MIPS_xxBITPTRS.
6374
6375 1999-04-18  Ian Lance Taylor  <ian@zembu.com>
6376
6377         * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
6378         variable insn.
6379
6380         * bfd-in2.h: Rebuild.
6381         * libbfd.h: Rebuild.
6382
6383 Sat Apr 17 20:55:15 1999  Catherine Moore  <clm@cygnus.com>
6384
6385         * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
6386         (coff_arm_relocate_section):  Add ARM26D transform.  Only
6387         change to ARM26D for relocateable links.
6388
6389 1999-04-16  Gavin Romig-Koch  <gavin@cygnus.com>
6390
6391         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
6392         (bfd_elf32_bfd_print_private_bfd_data): New.
6393
6394 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
6395
6396         * elf32-arm.h (elf32_arm_final_link_relocate):  For R_ARM_THM_ABS5,
6397         refetch addend if USE_REL, add many comments regarding current state.
6398         For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
6399         * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
6400         size and rightshift.  For R_ARM_THM_PC22, fix bitsize.
6401         * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
6402
6403 Wed Apr 14 14:33:08 1999  Richard Henderson  <rth@cygnus.com>
6404
6405         * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
6406         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
6407
6408 1999-04-13  David Mosberger  <davidm@hpl.hp.com>
6409
6410         * dwarf2.c (decode_line_info): Don't truncate address to least
6411         significant 32 bits (breaks 64 bit targets).
6412         (lookup_address_in_function_table): Ditto.
6413         (comp_unit_contains_address): Ditto.
6414
6415 Tue Apr 13 21:27:19 1999  Catherine Moore  <clm@cygnus.com>
6416
6417         * coff-arm.c (arm_emit_base_file_entry): New routine.
6418         (A2T3_OFFSET): Define.
6419         (T2A3_OFFSET): Define.
6420         (coff_arm_relocate_section):  Emit base file entries for interworking
6421         stubs.
6422
6423 1999-04-13  Philip Blundell  <philb@gnu.org>
6424
6425         * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
6426         relocs 17 through 19.
6427
6428 Sun Apr 11 01:25:17 1999  Richard Henderson  <rth@cygnus.com>
6429
6430         * elfcode.h: Remove fnmatch.h.
6431         * elflink.h (elf_link_assign_sym_version): Call back to ld
6432         instead of calling fnmatch.
6433
6434         * config.bfd (i?86-*-beoself): Include pe vecs.
6435
6436 Sun Apr 11 01:14:06 1999  Richard Henderson  <rth@cygnus.com>
6437
6438         * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
6439         to go missing.
6440
6441 1999-04-10  Richard Henderson  <rth@cygnus.com>
6442
6443         * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
6444         when trying to resolve dynamic symbol references.
6445         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6446         * elf32-mips.c (mips_elf_relocate_section): Likewise.
6447         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6448         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6449         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6450         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6451         * elflink.h (elf_link_output_extsym): Likewise.
6452
6453 Sat Apr 10 15:12:09 1999  Richard Henderson  <rth@cygnus.com>
6454
6455         * section.c (_bfd_strip_section_from_output): New function moved from
6456         * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
6457         * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
6458         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6459         * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
6460         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6461         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6462         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6463         * bfd-in2.h: Update.
6464
6465 1999-04-09  Ian Lance Taylor  <ian@zembu.com>
6466
6467         * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
6468
6469 1999-04-08  Nick Clifton  <nickc@cygnus.com>
6470
6471         * coff-mcore.c: New File: Support for mcore-pe targets.
6472         * cpu-mcore.c: New File: Support for mcore targets.
6473         * elf32-mcore.c: New File: Support for mcore-elf target.
6474         * pe-mcore.c: New File: Definitions for mcore-pe target.
6475         * pei-mcore.c: New File: Definitions for mcore-pei target.
6476         * Makefile.am: Add support for MCore targets.
6477         * Makefile.in: Regenerate.
6478         * config.bfd: Add support for MCore targets.
6479         * configure.in: Add support for MCore targets.
6480         * configure: Regenerate.
6481         * archures.c: Add support for MCore architecture.
6482         * bfd-in2.h: Regenerate.
6483         * coffcode.h: Add support for mcore-pe targets.
6484         * elf.c: Add support for mcore-elf target.
6485         * reloc.c: Add support for MCore relocs.
6486         * targets.c: Add support for MCore targets.
6487
6488 1999-04-07  Nick Clifton  <nickc@cygnus.com>
6489
6490         * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
6491         R_ARM_XPC25 and R_ARM_THM_XPC22.
6492         (elf32_arm_reloc_map): Remove redundant entries.
6493
6494 1999-04-06  Ian Lance Taylor  <ian@zembu.com>
6495
6496         * sysdep.h (LC_MESSAGES): Never define.
6497
6498 1999-04-06  Chris Torek  <torek@bsdi.com>
6499
6500         * reloc.c (bfd_check_overflow): Add addrsize parameter.  Change
6501         all callers.  Rewrite completely.
6502         (_bfd_relocate_contents): Rewrite overflow checking.
6503         * bfd-in2.h: Rebuild.
6504
6505 1999-04-05  Ian Lance Taylor  <ian@zembu.com>
6506
6507         From Gabriel Paubert <paubert@iram.es>:
6508         * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
6509         R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
6510         Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
6511         have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
6512         * ppcboot.c (ppcboot_vec): Use little endian routines for
6513         headers.
6514
6515         * elf.c (elfcore_strndup): Only define if it will be used.
6516         * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
6517         and irelend.
6518         (ppc_elf_check_relocs): Remove unused local i.
6519         (ppc_elf_gc_mark_hook): Add default case to switch.
6520
6521         From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
6522         * srec.c (srec_scan): Accept \r in symbol definitions.
6523         (srec_object_p): Set HAS_SYMS if we saw any symbols.
6524         (symbolsrec_object_p): Likewise.
6525
6526 1999-04-04  Don Bowman <don@pixsci.com>
6527
6528         * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
6529
6530 1999-04-04  Ian Lance Taylor  <ian@zembu.com>
6531
6532         * dwarf1.c (parse_line_table): Remove unused locals last_pc and
6533         last_line.
6534         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
6535         * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
6536         switch.
6537         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
6538         local i.
6539         * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
6540         local val.
6541
6542 1999-03-31  Nick Clifton  <nickc@cygnus.com>
6543
6544         * config.bfd: Add support for arm-epoc-pe target.
6545         * configure.in: Add support for arm-epoc-pe target.
6546         * configure: Regenerate.
6547         * targets.c: Add support for arm-epoc-pe target.
6548         * coff-arm.c: Allow header files to override definition of
6549         TARGET_UNDERSCORE and USER_LABEL_PREFIX.
6550         * pe-arm.h: Allow previous header files to override definition of
6551         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6552         * pei-arm.h: Allow previous header files to override definition of
6553         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6554         * epoc-pe-arm.c: New file.  Support arm-epoc-pe target.
6555         * epoc-pei-arm.c: New file.  Support arm-epoc-pei target.
6556
6557 1999-03-30  Nick Clifton  <nickc@cygnus.com>
6558
6559         * elf.c (elf_map_symbols): Handle the case where section
6560         symbols are generated for content-less sections which are
6561         not mapped to the output file.
6562
6563         * linker.c: Replace direct references to fields in BFD structure
6564         with accessor macros.
6565
6566         * elflink.h: Replace direct references to fields in BFD structure
6567         with accessor macros.
6568
6569 1999-03-25  Philip Blundell  <pb@nexus.co.uk>
6570
6571         * config.bfd: Eliminate redundancy in checks for Linux/ARM.
6572
6573         * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
6574         account when adjusting section symbols during a partial link.
6575
6576 1999-03-24  Nick Clifton  <nickc@cygnus.com>
6577
6578         * coff-sparc.c (struct coff_reloc_map): Change type of field
6579           'bfd_reloc_val' to bfd_reloc_code_real_type.
6580         * elf-m10200.c (struct mn10200_reloc_map): Ditto.
6581         * elf-m10300.c (struct mn10300_reloc_map): Ditto.
6582         * elf32-arc.c (struct arc_reloc_map): Ditto.
6583         * elf32-d10v.c (struct d10v_reloc_map): Ditto.
6584         * elf32-d30v.c (struct d30v_reloc_map): Ditto.
6585         * elf32-fr30.c (struct fr30_reloc_map): Ditto.
6586         * elf32-m32r.c (struct m32r_reloc_map): Ditto.
6587         * elf32-sh.c (struct elf_reloc_map): Ditto.
6588         * elf32-sparc.c (struct elf_reloc_map): Ditto.
6589         * elf32-v850.c (struct v850_reloc_map): Ditto.
6590         * elf64-sparc.c (struct elf_reloc_map): Ditto.
6591         * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
6592         * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
6593
6594 1999-03-17  Martin Hunt  <hunt@cygnus.com>
6595
6596         * syms.c (_bfd_stab_section_find_nearest_line): Changed this
6597         function so source-level assembly works.  If multiple N_SOs
6598         are seen without and N_FUNs, create an indextable entry with
6599         a NULL function name.
6600
6601 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6602
6603         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
6604         of certian similar cpus.
6605
6606 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6607
6608         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6609         Add the 5000.  Change the architecture for the 5400 to mips4.
6610         (elf_mips_mach): Add r5000.
6611
6612 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6613
6614         * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
6615
6616 1999-03-11  Nick Clifton  <nickc@cygnus.com>
6617
6618         * binary.c (binary_set_section_contents): Generate warning about
6619         huge file offsets for any section that will occupy file space, not
6620         just those that are loadable.
6621
6622 1999-02-24  Jim Blandy  <jimb@zwingli.cygnus.com>
6623
6624         * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
6625
6626 1999-02-22  Jim Lemke  <jlemke@cygnus.com>
6627
6628         * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
6629
6630 Mon Feb 22 18:26:51 1999  Ian Lance Taylor  <ian@cygnus.com>
6631
6632         * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
6633         * elflink.h: Revert all changes since Feb 16.  Instead:
6634         (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
6635         appropriate.  Copy it to version symbols.
6636         (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
6637         symbols if appropriate.
6638         (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
6639         symbol if appropriate.
6640         (elf_link_output_extsym): If symbol is marked as undefined, and
6641         has no nonweak references, mark it as weak undefined.
6642
6643 Fri Feb 19 16:01:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6644
6645         * elflink.h (elf_merge_symbol): When overriding a dynamic
6646         definition with a weak undefined symbol, set NEEDS_PLT if it is a
6647         function.
6648         (elf_link_add_object_symbols): Don't copy the other field if we
6649         are overridding.
6650
6651 Thu Feb 18 18:07:43 1999  Ian Lance Taylor  <ian@cygnus.com>
6652
6653         * elflink.h (elf_merge_symbol): Do not merge any symbol from a
6654         shared object with a weak undefined symbol.
6655
6656 1999-02-18  Nick Clifton  <nickc@cygnus.com>
6657
6658         * elfarm-nabi.c: Set partial_inplace back to false.
6659
6660 1999-02-17  Nick Clifton  <nickc@cygnus.com>
6661
6662         * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
6663         (USER_LABEL_PREFIX): Set to "_".
6664
6665         The following patches are from: Scott Bambrough
6666         <scottb@corelcomputer.com>
6667
6668         * libaout.h (M_ARM6_NETBSD): Set to 143.
6669
6670         * reloc.c: Add ARM PIC relocs:   BFD_RELOC_ARM_GOT12,
6671         BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
6672         BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
6673         BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
6674         * bfd-in2.h: Regenerate.
6675
6676         * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
6677         'true' as REL relocs are now being used.  Add new PIC relocs:
6678         R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
6679         R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
6680
6681         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
6682         of targets.
6683         (elf32_arm_final_link_relocate): Change parameters so that entire
6684         reloc is passed.  Add support for PIC relocs.
6685         (elf32_arm_relocate_section): Pass entire reloc to
6686         elf32_arm_final_link_relocate.
6687         (elf32_arm_check_relocs): Handle new PIC relocs.
6688         (elf32_arm_adjust_dynamic_symbol): New function.
6689         (elf32_arm_size_dynamic_sections): New function.
6690         (elf32_arm_discard_copies): New function.
6691         (elf32_arm_finish_dynamic_symbol): New function.
6692         (elf32_arm_finish_dynamic_sections): New function.
6693         (ELF_MAXPAGE_SIZE): Define.
6694         (bfd_elf32_bfd_reloc_type_lookup): Define.
6695         (elf_backend_relocate_section): Define.
6696         (elf_backend_adjust_dynamic_symbol): Define.
6697         (elf_backend_create_dynamic_sections): Define.
6698         (elf_backend_finish_dynamic_symbol): Define.
6699         (elf_backend_finish_dynamic_sections): Define.
6700         (elf_backend_size_dynamic_sections): Define.
6701         (elf_backend_plt_readonly): Define.
6702         (elf_backend_want_got_plt): Define.
6703         (elf_backend_want_plt_sym): Define.
6704
6705 Wed Feb 17 12:02:26 1999  Stan Cox  <scox@cygnus.com>
6706
6707         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
6708         sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
6709         (_bfd_mips_elf_fake_sections): Likewise.
6710
6711 Wed Feb 17 12:07:23 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6712
6713         * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
6714         bfd_elf32_arm_get_bfd_for_interworking,
6715         bfd_elf32_arm_process_before_allocation): Define to avoid clash
6716         with elfarm-nabi.c.
6717
6718         * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
6719         (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
6720         elf32_arm_find_nearest_line): Make them static.
6721
6722 Tue Feb 16 22:44:37 1999  Ian Lance Taylor  <ian@cygnus.com>
6723
6724         * elflink.h (elf_merge_symbol): Add pflags parameter.  Change all
6725         callers.  Do not merge a definition from a shared object with a
6726         weak undefined symbol.
6727         (elf_link_add_object_symbols): Do not change the symbol type or
6728         size if the old symbol overrides the new one.
6729
6730 1999-02-08  Nick Clifton  <nickc@cygnus.com>
6731
6732         * config.bfd: Add support for strongarm target.
6733
6734 Mon Feb  8 11:18:14 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6735
6736         * elf32-m68k.c (reloc_map): Use the correct types for the struct
6737         fields instead of unsigned char.
6738
6739 Fri Feb  5 00:22:36 1999  Ian Lance Taylor  <ian@cygnus.com>
6740
6741         * Makefile.am: Rebuild dependencies.
6742         * Makefile.in: Rebuild.
6743
6744 Thu Feb  4 22:30:13 1999  Ian Lance Taylor  <ian@cygnus.com>
6745
6746         * configure.in: Change AC_PREREQ to 2.13.  Remove AM_CYGWIN32.
6747         Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
6748         AC_PROG_INSTALL.  Add comments to uses of AC_DEFINE.
6749         * acinclude.m4: Add comments to uses of AC_DEFINE.
6750         * acconfig.h: Remove.
6751         * configure: Rebuild with current autoconf/automake.
6752         * aclocal.m4: Likewise.
6753         * config.in: Likewise.
6754         * Makefile.in: Likewise.
6755
6756 1999-02-04  DJ Delorie  <dj@cygnus.com>
6757
6758         * libbfd.c (real_read): don't call fread for zero bytes.  This
6759         covers up a bug (or misuse of bfd) that's exposed by Solaris.
6760
6761 Thu Feb  4 12:38:10 1999  Stan Cox  <scox@cygnus.com>
6762
6763         * elf32-mips.c (mips_elf_relocate_section): Insure that the target
6764         of a jump is in the current 256 MB region.
6765
6766 Thu Feb  4 12:15:38 1999  Ian Lance Taylor  <ian@cygnus.com>
6767
6768         * format.c (bfd_check_format_matches): Change last patch to only
6769         take effect for the binary target.
6770
6771 Wed Feb  3 19:40:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6772
6773         * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
6774
6775 Wed Feb  3 15:02:44 1999  Catherine Moore  <clm@cygnus.com>
6776
6777         * elf32-fr30.c (fr30_elf_check_relocs):  New routine.
6778
6779 Tue Feb  2 21:38:28 1999  Ian Lance Taylor  <ian@cygnus.com>
6780
6781         * format.c (bfd_check_format_matches): If the target was
6782         previously specified, don't check other targets when checking for
6783         an archive file.
6784
6785 Tue Feb  2 18:16:43 1999  Catherine Moore  <clm@cygnus.com>
6786
6787         * elf32-arm.h (elf32_arm_reloc_map):  Removed.
6788         (elf32_arm_reloc_type_lookup):  Removed
6789         * elfarm-nabi.c (elf32_arm_reloc_map):  New.
6790         (elf32_arm_reloc_type_lookup):  New.
6791         * elfarm-oabi.c (elf32_arm_reloc_map):  New.
6792         (elf32_arm_reloc_type_lookup):  New.
6793
6794 Mon Feb  1 19:49:21 1999  Catherine Moore  <clm@cygnus.com>
6795
6796         * elfarm-nabi.c:  Renamed from elf32-arm-newabi.c.
6797         * elfarm-oabi.c:  Renamed from elf32-arm-oldabi.c
6798         * Makefile.am:  Use new files.
6799         * Makefile.in:  Regenerate.
6800         * configure.in:  Use new files.
6801         * configure:  Regenerate.
6802
6803 1999-02-01  Nick Clifton  <nickc@cygnus.com>
6804
6805         * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
6806         (fr30_elf_gc_sweep_hook): New function.
6807         (elf_backend_can_gc_sections): Define.
6808
6809 Mon Feb  1 12:21:47 1999  Catherine Moore  <clm@cygnus.com>
6810
6811         * targets.c (bfd_target_vector):  Add bfd_elf32_littlearm_oabi_vec
6812         and bfd_elf32_bigarm_oabi_vec.
6813
6814 Mon Feb  1 11:46:31 1999  Catherine Moore  <clm@cygnus.com>
6815
6816         * Makefile.am (elf32-arm-oldabi.lo):  New.
6817         (elf32-arm-newabi.lo):  New.
6818         * Makefile.in:  Regenerate.
6819         * config.bfd (thumb-*-elf):  Remove definition of targ_underscore.
6820         (arm-*-elf):  Likewise.
6821         (arm-*-oabi):  New.
6822         (thumb-*-oabi):  New.
6823         * configure:  Regenerate.
6824         * configure.in (bfd_elf32_littlearm_oabi_vec):  New.
6825         (bfd_elf32_bigarm_oabi_vec):  New.
6826         * elf32-arm-newabi.c:  New.
6827         * elf32-arm-oldabi.c:  New.
6828         * elf32-arm.c:  Removed.
6829         * elf32-arm.h:  New.
6830
6831 Mon Feb  1 11:52:12 1999  Frank Ch. Eigler  <fche@cygnus.com>
6832
6833         * binary.c (binary_set_section_contents): Omit warnings for
6834         unloadable sections.
6835
6836 1999-01-31  Michael Meissner  <meissner@cygnus.com>
6837
6838         * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
6839         powerpc{,le}-*-eabi.
6840
6841 1999-01-29  Nick Clifton  <nickc@cygnus.com>
6842
6843         * dwarf2.c (read_unsigned_leb128): Remove unused variables.
6844         * dwarf2.c (read_signed_leb128): Remove unused variables.
6845
6846 Fri Jan 29 00:47:21 1999  H.J. Lu  <hjl@gnu.org>
6847
6848         * elf.c (assign_file_positions_for_segments): Only adjust
6849         p_align when needed.
6850
6851 Thu Jan 28 20:05:22 1999  Ian Lance Taylor  <ian@cygnus.com>
6852
6853         * binary.c (binary_set_section_contents): Don't return early for a
6854         non-loadable section, in case the first section is non-loadable.
6855         Don't set the low lma for a SEC_NEVER_LOAD section.  From Maciej
6856         W. Rozycki <macro@ds2.pg.gda.pl>.
6857
6858 1999-01-28  Nick Clifton  <nickc@cygnus.com>
6859
6860         * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
6861         R_FR30_GNU_VTENTRY relocs.
6862
6863 Thu Jan 28 11:08:16 1999  Catherine Moore  <clm@cygnus.com>
6864
6865         * elflink.h (elf_link_output_sym):  Zero syms which are
6866         part of sections which have been excluded.
6867
6868 Wed Jan 27 13:35:35 1999  Stan Cox  <scox@cygnus.com>
6869
6870         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
6871         to F_PIC_INT.
6872         * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
6873         F_ARM_3M labels.  Changed F_PIC to F_PIC_INT.
6874
6875 1999-01-27  Nick Clifton  <nickc@cygnus.com>
6876
6877         * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
6878         relocation.
6879         (fr30_final_link_relocate): Use computed value as result of
6880         relocation.
6881
6882 1999-01-26  Frank Ch. Eigler  <fche@cygnus.com>
6883
6884         * binary.c (binary_set_section_contents): Emit warning for
6885         huge file offsets due to widely-dispersed section LMAs.
6886
6887 Mon Jan 18 03:35:35 1999  Ian Lance Taylor  <ian@cygnus.com>
6888
6889         * elf.c (assign_file_positions_for_segments): If not D_PAGED,
6890         align first section to largest section alignment, not first
6891         section alignment.
6892
6893 1999-01-04  Jason Molenda  (jsm@bugshack.cygnus.com)
6894
6895         * configure.in: Require autoconf 2.12.1 or higher.
6896
6897 Tue Dec 22 15:21:41 1998  Catherine Moore  <clm@cygnus.com>
6898
6899         * archures.c (bfd_mach_i386_i386_intel_syntax):  Define.
6900         * bfd-in2.h:  Likewise.
6901         * cpu-i386.c (bfd_i386_arch_intel_syntax):  New.
6902
6903 1998-12-16  Gavin Romig-Koch  <gavin@cygnus.com>
6904
6905         * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
6906         * cpu-mips.c: Add support for and independent 4111.
6907         * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
6908         (_bfd_mips_elf_final_write_processing):
6909         bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
6910
6911 1998-12-15  Gavin Romig-Koch  <gavin@cygnus.com>
6912
6913         * elf32-mips.c (elf_mips_abi_name): New.
6914         (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
6915
6916 1998-12-12  Gavin Romig-Koch  <gavin@cygnus.com>
6917
6918         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6919         Handle bfd_mach_mips4300.
6920
6921 1998-12-11  Ulrich Drepper  <drepper@cygnus.com>
6922
6923         * elf32-i386.c: Remove leaked development code from patch
6924         1998-12-10 by Richard Henderson.
6925
6926 1998-12-10  Richard Henderson  <rth@cygnus.com>
6927
6928         * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
6929         in debug sections for symbol defined externally.
6930
6931 Thu Dec 10 10:58:38 1998  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6932
6933         * targets.c (bfd_target_vector): Remove duplicate entry for
6934         tekhex_vec.
6935
6936 1998-12-09  Nick Clifton  <nickc@cygnus.com>
6937
6938         * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
6939         since we are using RELAs.
6940
6941 Tue Dec  8 22:15:48 1998  Ian Lance Taylor  <ian@cygnus.com>
6942
6943         SCO Open Server Release 5 core file support, from Jouke Numan
6944         <jnuman@hiscom.nl>:
6945         * sco5-core.c: New file.
6946         * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
6947         (sco5-core.lo): Define SCO5_CORE in COREFLAG.
6948         * Makefile.am: Rebuild dependencies.
6949         (OPTIONAL_BACKENDS): Add sco5-core.lo.
6950         (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
6951         * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
6952         * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
6953         * bfd-in2.h, configure, Makefile.in: Rebuild.
6954
6955 Tue Dec  8 19:38:42 1998  Mark Klein  <mklein@dis.com>
6956
6957         * config.bfd (hppa*-*-mpeix*): New target.
6958         * configure.in: Add AC_HEADER_DIRENT.
6959         (hppa*-*-mpeix*): New target.
6960         * configure.host (hppa*-*-mpeix*): New host.
6961         * hpux-core.c: Check HOST_HPPAMPEIX.  Use HAVE_DIRENT_H and
6962         friends rather than just including <sys/dir.h>.
6963         * som.h (struct som_symbol): Add hppa_priv_level and apto
6964         tc_data.  Change all users.
6965         (struct somdata): Add comp_unit field.
6966         (obj_som_compilation_unit): Define.
6967         (bfd_som_attach_compilation_unix): Declare.
6968         * som.c: Check HOST_HPPAMPEIX.
6969         (struct som_misc_symbol_info): Add new field priv_level.
6970         (som_object_setup): Add current_offset parameter.  Change all
6971         callers.
6972         (setup_sections): Likewise.
6973         (som_object_p): For EXECLIBMAGIC, read the lst header.
6974         (som_write_symbol_strings): Add compilation_unit parameter.
6975         Change all callers.
6976         (som_finish_writing): Write out compilation_unit.
6977         (som_bfd_derive_misc_symbol_info): Set priv_level.
6978         (som_build_and_write_symbol_table): Set xleast field to 3.
6979         (som_slurp_symbol_table): Set symbol priv_level.
6980         (bfd_som_attach_compilation_unit): New function.
6981         (som_bfd_ar_write_symbol_stuff): Set xleast field to 3.  Set
6982         priv_level into symbol_value.
6983         * configure, config.in: Rebuild.
6984
6985 Tue Dec  8 16:21:35 1998  Ian Lance Taylor  <ian@cygnus.com>
6986
6987         * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
6988         warning function to call _bfd_error_handler instead.
6989
6990         * libbfd.c (COERCE32): Cast through unsigned long and long to
6991         avoid bug in old version of gcc.
6992
6993         * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
6994         (elf_backend_additional_program_headers): Don't define.
6995
6996 1998-12-08  Nick Clifton  <nickc@cygnus.com>
6997
6998         * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
6999         relocations to include offset of 2 included in the insns, and the
7000         offset of the relocs within the section.
7001
7002 Wed Dec  2 15:03:59 1998  David Taylor  <taylor@texas.cygnus.com>
7003
7004         The following changes were made by David Taylor
7005         <taylor@texas.cygnus.com>, Edith Epstein
7006         <eepstein@sophia.cygnus.com>, Jim Blandy
7007         <jimb@zwingli.cygnus.com>, and Elena Zannoni
7008         <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
7009         changes originally made by HP; HP did not create ChangeLog
7010         entries.
7011
7012         * aclocal.m4, configure, Makefile.in: Rebuilt using latest
7013         automake macro library.
7014
7015         * hpux-core.c (hpux_core_core_file_p): this function now
7016         understands HPUX 10.30 thread info. Yes, the thread stacks can be
7017         found in the corefile! Also, in hpux_core_core_file_p, if we
7018         encounter a section with an unknown type, don't punt.  Instead,
7019         just skip it.  Also, count the number of sections of known type
7020         that we encounter.  If we encounter at least one good one, then
7021         we'll declare that the file is a core file.  If we encounter any
7022         unknown ones but some known ones, then we'll issue a warning (but
7023         still declare it to be a core file). Also, correctly decide when a
7024         file is not a core.
7025         (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
7026         (CORE_ANON_SHMEM): define if not defined.
7027         (hpux_core_struct): add members lwpid and user_tid.
7028         (core_kernel_thread_id, core_user_thread_id): new macros.
7029         (make_bfd_asection): use bfd_alloc to allocate room for a copy of
7030         the name before storing it in the bfd.
7031         (hpux_core_core_file_p): handle threads.
7032
7033         * libhppa.h (GET_FIELD): protect against redefinition.
7034         (HPPA_WIDE): define.
7035         (GET_FIELD): define.
7036         (GET_BIT): define.
7037         (MASK): define.
7038         (CATENATE): define.
7039         (ELEVEN): define.
7040         (sign_extend): redefine.
7041         (assemble_6): define.
7042         (assemble_12): rewrite.
7043         (assemble_16): define.
7044         (assemble_16a): define.
7045         (assemble_17): rewrite.
7046         (assemble_22): define.
7047
7048 1998-12-07  Nick Clifton  <nickc@cygnus.com>
7049
7050         * elf32-fr30.c (fr30_final_link_relocate): Using signed
7051         relocations for signed values.
7052
7053 Sun Dec  6 16:30:33 1998  Ian Lance Taylor  <ian@cygnus.com>
7054
7055         * mipsbsd.c (MY(set_arch_mach)): Make static.
7056         * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
7057         bfd_mach_mips* macros rather than simple numbers.
7058
7059         COFF weak symbol support, based on patches from Mark Elbrecht
7060         <snowball3@usa.net>:
7061         * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
7062         * coffgen.c (coff_renumber_symbols): Handle weak symbols.
7063         (coff_write_alien_symbol): Likewise.
7064         * cofflink.c (coff_link_check_ar_symbols): Likewise.
7065         (coff_link_add_symbols): Likewise.
7066         (_bfd_coff_link_input_bfd): Likewise.
7067         (_bfd_coff_write_global_sym): Likewise.
7068
7069         * elf.c (copy_private_bfd_data): Always initialize the
7070         includes_phdrs field.
7071
7072         * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
7073         file defines a symbol first mentioned in an ELF file.
7074
7075         * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
7076         possible, rather than only if BFD64.
7077         * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
7078         not __GNUC__.
7079         * bfd-in2.h: Rebuild.
7080
7081         * srec.c (srec_set_section_contents): Correct test to avoid
7082         switching to 4 byte addresses after seeing a second section which
7083         requires 3 byte addresses.  From Joel Schantz
7084         <joel.schantz@argosys.boeing.com>.
7085
7086         * config.bfd (m68*-*-gnu*): New target.  From Aymeric Vincent
7087         <aymeric.vincent@emi.u-bordeaux.fr>.
7088
7089 1998-12-04  Jim Blandy  <jimb@zwingli.cygnus.com>
7090
7091         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
7092         decide whether the output file is -mrelocatable-lib,
7093         -mrelocatable, or neither.  (gdb.base/nodebug.exp)
7094
7095 1998-12-03  Nick Clifton  <nickc@cygnus.com>
7096
7097         * elf32-fr30.c: Add support for R_FR30_48 reloc.
7098         * reloc.c: Add BFD_RELOC_FR30_48 relocation.
7099         * bfd-in2.h: Regenerate.
7100         * libbfd.h: Regenerate
7101
7102 Wed Dec  2 00:58:37 1998  Ian Lance Taylor  <ian@cygnus.com>
7103
7104         * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
7105         link against a dynamic symbol with no type or size.
7106
7107 1998-12-01  Ulrich Drepper  <drepper@cygnus.com>
7108
7109         * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
7110         relocation for section which does not get loaded.
7111         (elf_i386_relocate_section) [R_386_32]: Likewise.
7112
7113 Tue Dec  1 11:33:33 1998  Jim Wilson  <wilson@cygnus.com>
7114
7115         * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
7116         reloc_count and i long instead of unsigned long.  Handle error
7117         return from bfd_canonicalize_reloc.
7118
7119 1998-12-01  Nick Clifton  <nickc@cygnus.com>
7120
7121         * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
7122         a hash table.
7123
7124 Mon Nov 30 15:28:09 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
7125
7126         * elf32-sh.c (elf/sh.h): Include.
7127         sh_reloc_type: Delete.  Changed all references to elf_sh_reloc_type.
7128         (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
7129         (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
7130         (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7131         * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
7132
7133 Fri Nov 27 17:51:38 1998  Geoff Keating  <geoffk@ozemail.com.au>
7134
7135         * elflink.h (compute_bucket_count): Don't allow minsize==0, it
7136         causes division by zero later on.
7137
7138 Thu Nov 26 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7139
7140         * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
7141         needed.
7142
7143 1998-11-25  DJ Delorie  <dj@cygnus.com>
7144
7145         * coff-i386.c (i3coff_object_p): Remove hack.  Use new emulation
7146         hook now.
7147
7148 Tue Nov 24 10:25:27 1998  Nick Clifton  <nickc@cygnus.com>
7149
7150         * elf32-fr30.c (fr30_elf_relocate_section): Call
7151         fr30_final_link_relocate.
7152         (fr30_final_link_relocate): New function: Handle I20 and I32
7153         relocs.
7154         (fr30_elf_i32_reloc): New function: Handle I32 relocs.
7155         (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
7156         (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
7157
7158         * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
7159         chain to empty.
7160
7161         The following changes are based on a patch submitted by Gianluca
7162         Moro <glctr@abc.it>:
7163
7164         (v850_elf_perform_relocation): Only update a hi16s reloc if it has
7165         not already been updated.
7166         (find_remembered_hi16s_reloc): New parameter 'already_found'
7167         returns state of remembered hi16s reloc.
7168         (remember_hi16s_reloc): Set 'found' field to false.
7169         (hi16s_location): Add 'found' field.
7170
7171 1998-11-23  DJ Delorie  <dj@cygnus.com>
7172
7173         * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
7174         to see .DLL files as unrecognized.
7175         (i3coff_object_p): Sorry, had to hack it to not recognize these
7176         files (pei-i386) on request.
7177
7178 1998-11-23  DJ Delorie  <dj@cygnus.com>
7179
7180         * opncls.c (bfd_make_readable): need more cleanup for symbols and
7181         relents.  Call bfd_check_format to reinitialize.
7182
7183 Fri Nov 20 14:21:36 1998  Nick Clifton  <nickc@cygnus.com>
7184
7185         * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
7186         warnings.
7187
7188 Thu Nov 19 14:42:15 1998  Geoffrey Noer  <noer@cygnus.com>
7189
7190         * aclocal.m4: regenerate
7191         * configure: regenerate
7192
7193 Tue Nov 17 20:23:35 1998  Richard Henderson  <rth@cygnus.com>
7194
7195         * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
7196         * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
7197         * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
7198         respect it as an upper bound on what memory to reference.
7199         (elf_gc_smash_unused_vtentry_relocs): Likewise.
7200         (elf_gc_record_vtentry): Handle as-yet undefined vtables.  Set and
7201         update vtable_entries_size appropriately.
7202
7203 Tue Nov 17 15:28:31 1998  Nick Clifton  <nickc@cygnus.com>
7204
7205         * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
7206         reloc number.
7207
7208 Mon Nov 16 22:19:21 1998  DJ Delorie  <dj@cygnus.com>
7209
7210         * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
7211         bfds; they have no "file" so we fake it.
7212         * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
7213         * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
7214         resizing the memory buffer.
7215         * opncls.c (bfd_make_writable): New function; lets you write a
7216         bfd_create'd bfd to an in-memory buffer.
7217         (bfd_make_readable): New function; lets you read back that buffer
7218         as if it were from bfd_openr.  Used to build generated archive
7219         members (winsup's ld's dlltool)
7220
7221 Mon Nov 16 19:15:19 1998  Dave Brolley  <brolley@cygnus.com>
7222
7223         * po/bfd.pot: Regenerated.
7224
7225 Mon Nov 16 10:57:06 1998  Nick Clifton  <nickc@cygnus.com>
7226
7227         * elf32-v850.c (hi16s_location): Replaced fixed size array with
7228         linked list.
7229
7230 Sun Nov 15 20:28:25 1998  Richard Henderson  <rth@cygnus.com>
7231
7232         * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
7233         element of the gotentry list for local symbols too.
7234         (elf64_alpha_relocate_section): Unify local and global handling.
7235         Assert that gotent->use_count > 0.
7236
7237 Sat Nov 14 15:16:01 1998  Ian Lance Taylor  <ian@cygnus.com>
7238
7239         * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
7240         update for file name changes of July 2, 1998.
7241         (vms_vax_vec): New.
7242         * configure: Rebuild.
7243
7244 Thu Nov 12 19:19:54 1998  Dave Brolley  <brolley@cygnus.com>
7245
7246         * po/bfd.pot: Regenerated.
7247
7248 Tue Nov 10 16:17:06 1998  Geoffrey Noer  <noer@cygnus.com>
7249
7250         * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
7251         * aclocal.m4, configure: regenerate
7252
7253 Tue Nov 10 15:13:59 1998  Nick Clifton  <nickc@cygnus.com>
7254
7255         * elf.c (prep_headers): Add support for bfd_arch_fr30.
7256
7257 Tue Nov 10 13:37:36 1998  Felix Lee  <flee@cygnus.com>
7258
7259         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
7260         BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
7261         was cached.
7262         * aclocal.m4, configure: regenerated.
7263
7264 Tue Nov 10 14:31:01 1998  Catherine Moore  <clm@cygnus.com>
7265
7266         * elf32-d10v.c (reloc_type):  Add R_D10V_GNU_VTINHERIT and
7267         R_D10V_GNU_VTENTRY relocs.
7268         (elf_d10v_howto_table):  Likewise.
7269         (d10v_reloc_map d10v_reloc_map):  Likewise.
7270         (elf32_d10v_gc_mark_hook):  New.
7271         (elf32_d10v_gc_sweep_hook):  New.
7272         (elf32_d10v_check_relocs):  New.
7273         (elf32_d10v_relocate_section):  New.
7274         (elf_backend_relocate_section):  Define.
7275         (elf_backend_can_gc_sections):  Define.
7276
7277 Sat Nov  7 18:07:51 1998  Peter Schauer  <peter.schauer@regent.e-technik.tu-muenchen.de>
7278
7279         * Makefile.am (BFD32_BACKENDS): Move vms files here...
7280         (BFD64_BACKENDS): ...from here.
7281         (BFD32_BACKENDS_CFILES): Move vms files here...
7282         (BFD64_BACKENDS_CFILES): ...from here.
7283         * Makefile.in: Rebuild.
7284
7285 Wed Nov  4 15:58:48 1998  Nick Clifton  <nickc@cygnus.com>
7286
7287         * Makefile.am: Add FR30 target.
7288         * Makefile.in: Add FR30 target.
7289         * archures.c: Add support for FR30.
7290         * config.bfd: Add support for FR30.
7291         * configure.in: Add support for FR30.
7292         * reloc.c: Add support for FR30 relocations.
7293         * targets.c: Add support for FR30 relocations.
7294         * bfd-in2.h: Regenerate.
7295         * configure: Regenerate.
7296         * libbfd.h:  Regenerate.
7297         * cpu-fr30.c: New file.
7298         * elf32-fr30.c: New file.
7299
7300 Mon Nov  2 14:59:33 1998  Geoffrey Noer  <noer@cygnus.com>
7301
7302         * configure.in: detect cygwin* instead of cygwin32*
7303         * configure: regenerate
7304
7305 Sun Nov  1 19:32:28 1998  Jeffrey A Law  (law@cygnus.com)
7306
7307         * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
7308         use bfd_malloc and free instead and check return value from bfd_malloc.
7309
7310 Sun Nov  1 16:20:35 1998  Ian Lance Taylor  <ian@cygnus.com>
7311
7312         * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
7313         * libbfd.h: Rebuild.
7314
7315         * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
7316         (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
7317         (MIPS_TEXT_DYNSYM_SECN): Likewise.
7318         (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
7319         section.
7320         (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
7321         field.
7322         (mips_elf_link_hash_table_create): Don't initialize
7323         dynsym_sec_strindex.
7324         (mips_elf_gc_mark_hook): Add default case to avoid warning.
7325         (mips_elf_size_dynamic_sections): Generate a section symbol for
7326         every output section.
7327         (mips_elf_finish_dynamic_sections): Count all sections for
7328         DT_MIPS_UNREFEXTNO.
7329         (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
7330         output sections.
7331
7332 Sun Nov  1 12:46:53 1998  Geoff Keating  <geoffk@ozemail.com.au>
7333
7334         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
7335         for later PLT entries in large PLTs.
7336         (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
7337
7338 Sat Oct 31 20:10:09 1998  Jeffrey A Law  (law@cygnus.com)
7339
7340         * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
7341
7342 1998-10-26 15:58  Ulrich Drepper  <drepper@cygnus.com>
7343
7344         * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
7345         * elflink.h (elf_collect_hash_codes): New function.  This function is
7346         called for each exported symbol and we compute the ELF hash value for
7347         it.
7348         (compute_bucket_value): New function.  It is called from
7349         size_dynamic_sections to determine the hash table size.  When we are
7350         optimizing a better, but slower, algorithm is used.
7351         (size_dynamic_sections): Call compute_bucket_value.
7352
7353         * elf.c (bfd_elf_hash): Optimize the hash function a bit.
7354
7355 Mon Oct 19 20:03:21 1998  Catherine Moore  <clm@cygnus.com>
7356
7357         * elf32-sh.c:  Add HOWTO entries for R_SH_GNU_VTINHERIT and
7358         R_SH_GNU_VTENTRY.
7359         (sh_elf_gc_mark_hook):  New.
7360         (sh_elf_gc_sweep_hook):  New.
7361         (sh_elf_check_relocs):  New.
7362         (elf_backend_can_gc_sections):  Define.
7363
7364 Mon Oct 19 16:57:05 1998  Felix Lee  <flee@cygnus.com>
7365
7366         * acinclude.m4: undo previous gettext change
7367         * aclocal.m4: rebuild with right version of aclocal.
7368
7369 Mon Oct 19 01:47:21 1998  Felix Lee  <flee@cygnus.com>
7370
7371         * acinclude.m4, aclocal.m4: move gettext-related fragments from
7372         aclocal.m4 to acinclude.m4, so they don't get lost.
7373
7374         * elfcore.h: rewrite for better corefile support.
7375         * elf.c (elfcore_*): new functions.
7376         * elf-bfd.h (elf_obj_tdata): new structure members.
7377         * acconfig.h, acinclude.m4, configure.in: add feature-tests for
7378         flavor of procfs.
7379         * aclocal.m4, config.in, configure, Makefile.in: regenerated.
7380
7381 Fri Oct 16 14:07:45 1998  Catherine Moore  <clm@cygnus.com>
7382
7383         * elf32-m32r.c:  Add HOWTO entries for R_M32R_GNU_VTINHERIT
7384         and R_M32R_GNU_VTENTRY.
7385         (elf_backend_can_gc_sections):  Define.
7386         (m32r_elf_check_relocs):  New.
7387         (m32r_elf_gc_mark_hook):  New.
7388         (m32r_elf_gc_sweep_hook):  New.
7389         (m32r_elf_relocate_section):  Handle VT relocs.
7390
7391 Mon Oct 12 14:18:40 1998  Nick Clifton  <nickc@cygnus.com>
7392
7393         * coff-arm.c (arm_relocate_section): Remove redundant test.
7394
7395         * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
7396         cleat that the 'bitsize' field is the size of the bitfield AFTER
7397         relocation not before.
7398
7399         * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
7400
7401         * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
7402         relocs.
7403
7404 Tue Oct  6 09:20:44 1998  Catherine Moore  <clm@cygnus.com>
7405
7406         * elf32-sparc.c:  Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
7407         R_SPARC_GNU_VTENTRY.
7408         (elf32_sparc_check_relocs):  Handle them.
7409         (elf32_sparc_reloc_type_lookup):  Likewise.
7410         (elf32_sparc_relocate_section):  Likewise.
7411         (elf32_sparc_gc_mark_hook):  New.
7412         (elf32_sparc_gc_sweep_hook):  New.
7413
7414 Mon Oct  5 14:55:30 1998  Jeffrey A Law  (law@cygnus.com)
7415
7416         * som.c (som_finish_writing): Perform some sanity checks when
7417         writing an executable or shared library.
7418
7419 Mon Oct  5 12:02:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
7420
7421         * dwarf1.c : New file.  Adds _bfd_dwarf1_find_nearest_line.
7422         * configure.in (elf): Add dwarf1.lo.
7423         * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
7424         * elf.c (_bfd_elf_find_nearest_line): Add call to
7425         _bfd_dwarf1_find_nearest_line.
7426         * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
7427         Add call to _bfd_dwarf1_find_nearest_line.
7428         * configure: Rebuilt.
7429
7430 Mon Oct  5 10:06:22 1998  Catherine Moore  <clm@cygnus.com>
7431
7432         * elflink.h (elf_gc_sections):  Do not allow garbage
7433         collection if dynamic sections have been created.
7434
7435 Mon Oct  5 09:07:37 1998  Catherine Moore  <clm@cygnus.com>
7436
7437         * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
7438         R_V850_GNU_VTENTRY.
7439         (v850_elf_check_relocs):  Handle VTINHERIT and VTENTRY relocs.
7440         (v850_elf_perform_relocation):  Likewise.
7441         (v850_elf_final_link_relocate):  Likewise.
7442         (v850_elf_relocate_section):  Likewise.
7443         (v850_elf_gc_sweep_hook):  New routine.
7444         (v850_elf_gc_mark_hook):  New routine.
7445         (elf_backend_can_gc_sections):  Define.
7446
7447 Mon Oct  5 09:04:25 1998  Catherine Moore  <clm@cygnus.com>
7448
7449         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Don't assume
7450         that dynobj exists.
7451
7452 Sun Oct  4 23:29:34 1998  David Edelsohn  <edelsohn@mhpcc.edu>
7453
7454         * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
7455         Declare size as bfd_size_type.
7456         (rs6000coff_get_section_contents): Declare count as bfd_size_type.
7457
7458 Sun Oct  4 20:38:29 1998  Jeffrey A Law  (law@cygnus.com)
7459
7460         * cpu-hppa.c (bfd_hppa20_arch): Define.  Link it into the bfd_hppa_arch
7461         structure.
7462         * som.c (CPU_PA_RISC2_0): Define.
7463         (_PA_RISC2_0_ID): Likewise.
7464         (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
7465
7466 Sun Oct  4 21:19:09 1998  Ian Lance Taylor  <ian@cygnus.com>
7467
7468         * elflink.h (elf_link_add_object_symbols): When a versioned symbol
7469         has a base which is already defined, only add the referenced
7470         symbol to the dynamic symbol table if it is defined or referenced
7471         by a regular file.
7472
7473         * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
7474         correctly.
7475
7476 1998-09-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7477
7478         * elflink.h (elf_link_add_object_symbols): Undo last change.
7479
7480 Wed Sep 23 16:09:31 1998  Richard Henderson  <rth@cygnus.com>
7481
7482         * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
7483         symbol for the indirect alias to a versioned symbol.
7484
7485 Mon Sep 21 12:15:22 1998  Catherine Moore  <clm@cygnus.com>
7486
7487         * elf32-i386.c (elf32_i386_vtinherit_howto): New.
7488         (elf32_i386_vtentry_howto): New.
7489         (elf_i386_reloc_type_lookup):  Return elf32_i386_vtentry_howto
7490         or elf32_i386_vtinherit_howto  on lookup.
7491
7492 Sun Sep 20 00:48:07 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7493
7494         * elf32-m68k.c: Include "elf/m68k.h".  Remove definition of enum
7495         reloc_type.  Rename R_68K__max to R_68K_max.
7496         (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
7497         reloc.
7498
7499 Sun Sep 20 00:09:25 1998  Chris Torek  <torek@bsdi.com>
7500
7501         * libbfd.c (bfd_getb32): Rewrite expression to get better code.
7502         (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7503
7504         * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
7505         after.
7506
7507 Sat Sep 19 22:42:23 1998  Doug Rabson  <dfr@nlsystems.com>
7508
7509         * elflink.h (elf_link_add_object_symbols): Ensure that the warning
7510         message has a null byte terminator.
7511
7512 Fri Sep 18 14:35:29 1998  Nick Clifton  <nickc@cygnus.com>
7513
7514         * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
7515         word subject to R_V850_32 relocation.
7516
7517 Thu Sep 17 17:20:36 1998  Nick Clifton  <nickc@cygnus.com>
7518
7519         * dwarf2.c: Add comment describing problem computing line numbers
7520         for undefined symbols at link time.
7521
7522 Thu Sep 17 16:03:28 1998  Richard Henderson  <rth@cygnus.com>
7523
7524         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
7525         transform a defweak into a plt entry.
7526         (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
7527         plt entry references to receive a RELATIVE reloc.
7528         (elf64_alpha_finish_dynamic_symbol): Fill them in.
7529         (elf64_alpha_relocate_section): Assert we don't overrun
7530         the allocated relocation space.
7531
7532 Wed Sep 16 18:03:13 1998  Nick Clifton  <nickc@cygnus.com>
7533
7534         * elf.c (swap_out_syms): Always treat section symbols as
7535         special, even if they are attached to a common section.
7536
7537 Wed Sep 16 10:34:13 1998  Nick Clifton  <nickc@cygnus.com>
7538
7539         * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
7540         sections with v850 common section attributes into named v850
7541         common sections.
7542         (v850_elf_add_symbol_hook): Move symbols in sections with v850
7543         common section attributes into named v850 common sections.
7544
7545 Wed Sep 16 11:26:49 CDT 1998  Catherine Moore  <clm@cygnus.com>
7546
7547         * elf32-arm.c (elf32_arm_gc_mark_hook):  Remove print
7548         statement.
7549
7550 1998-09-15  Geoff Keating  <geoffk@ozemail.com.au>
7551
7552         * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
7553         part of Vladimir's change of 1998-08-19.  Make a R_PPC_SDAREL16
7554         reloc to the wrong section a warning, not an error.  .dynsbss
7555         is not an output section, so there is no need to check for it.
7556
7557 Tue Sep 15 12:40:05 1998  Catherine Moore  <clm@cygnus.com>
7558
7559         * elf-bfd.h:  Add argument to elf_backend_get_symbol_type.
7560
7561 Tue Sep 15 08:34:40 1998  Catherine Moore  <clm@cygnus.com>
7562
7563         * elf.c (swap_out_syms):  Pass type to elf_backend_get_symbol_type.
7564         * elf32-arm.c:  Add HOWTO entries for R_ARM_GNU_VTINHERIT and
7565         R_ARM_GNU_VTENTRY.
7566         (elf32_arm_gc_mark_hook): New.
7567         (elf32_arm_gc_sweep_hook): New.
7568         (elf32_arm_check_relocs): New.
7569         (elf32_arm_final_link_relocate):  Handle VTINHERIT and VTENTRY
7570         relocations.
7571         (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
7572         relocations.
7573
7574 1998-09-10  Geoff Keating  <geoffk@ozemail.com.au>
7575
7576         * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
7577         assume there is no PLT or GOT.
7578
7579 Wed Sep  9 14:24:12 1998  Nick Clifton  <nickc@cygnus.com>
7580
7581         * elf32-arm.c (elf32_arm_find_nearest_line): New function:  just
7582         like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
7583         also accepted as a function symbol type.
7584
7585 Mon Sep  7 13:24:03 1998  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
7586
7587         * rs6000-core.c (_LONG_LONG):  Define for AIX 4.x only.
7588
7589 Sat Sep  5 20:40:18 1998  Ian Lance Taylor  <ian@cygnus.com>
7590
7591         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
7592         match definition of _bfd_gc_sections field.
7593         * libbfd.h: Rebuild.
7594
7595 Fri Sep  4 13:54:23 1998  David Miller  <davem@dm.cobaltmicro.com>
7596
7597         * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
7598         the addend of a dynamic relocation referencing a section.
7599         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7600         (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
7601
7602 Thu Sep  3 17:28:50 1998  Richard Henderson  <rth@cygnus.com>
7603
7604         * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
7605         bed has a size_dynamic_sections routine before trying to use it.
7606
7607 Mon Aug 31 14:49:22 1998  Richard Henderson  <rth@cygnus.com>
7608
7609         * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
7610         _bfd_elf_rel_vtable_reloc_fn.
7611
7612 Mon Aug 31 10:23:40 1998  Catherine Moore  <clm@cygnus.com>
7613
7614         * Makefile.am:  Add elf32-arm.c.
7615         * Makefile.in:  Rebuild.
7616         * elf-bfd.h:  Add elf_backend_get_symbol_type.
7617         * elf.c (swap_out_syms):  If defined, call
7618         elf_backend_get_symbol_type.
7619         * elf32-arm.c: Define elf_backend_get_symbol_type.
7620         (elf32_arm_get_symbol-type):  New routine.
7621         (record_thumb_to_arm_glue):  Change to use STT_ARM_TFUNC.
7622         (bfd_elf32_arm_process_before_allocation):  Change to
7623         check for STT_ARM_TFUNC.
7624         (elf32_arm_final_link_relocate):  Likewise.
7625         * elfxx-target.h:  Add elf_backend_get_symbol_type.
7626
7627 Fri Aug 28 19:44:07 1998  Richard Henderson  <rth@cygnus.com>
7628
7629         * archures.c (bfd_mach_alpha_ev[456]): New.
7630         * cpu-alpha.c: Rework to match these types.
7631         * bfd-in2.h: Rebuild.
7632
7633 Fri Aug 28 19:38:53 1998  Richard Henderson  <rth@cygnus.com>
7634
7635         * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
7636         * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
7637
7638         * elf32-i386.c (elf_howto_table): Add vtable relocs.
7639         (elf_i386_reloc_type_lookup): Recognize them.
7640         (elf_i386_check_relocs): Pass them off to generic code.
7641         (elf_i386_relocate_section): Ignore them.
7642         (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
7643         (elf_backend_can_gc_sections): True.
7644
7645 Thu Aug 20 15:03:45 1998  Nick Clifton  <nickc@cygnus.com>
7646
7647         * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
7648         before looking at owner field.
7649         (elf32_arm_to_thumb_stub): Ditto.
7650         (elf32_arm_relocate_section): Compute name before calling
7651         elf32_arm_final_link_relocate().
7652
7653 Thu Aug 20 11:30:17 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7654
7655         * elf.c: comment and formatting cleanups.
7656         * elfcore.h: ditto.
7657
7658 Wed Aug 19 15:43:26 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7659
7660         * elfcode.h (elf_object_p): Reject files of header type ET_CORE
7661         (core files are treated differently than object files).
7662         * elf-bfd.h (_bfd_elf_write_corefile_contents,
7663         bfd_elf_mkcorefile): declare.
7664         * elfxx-target.h (_bfd_elf_write_corefile_contents,
7665         bfd_elf_mkcorefile): add to bfd_target vector.
7666         * elfcore.h (elf_core_file_p): save the program header table,
7667         and set the bfd architecture from the elf file header.
7668         * elf.c (bfd_elf_mkcorefile): new function.
7669         (_bfd_elf_write_corefile_contents): new function.
7670         (assign_file_positions_for_segments): add cases for handling
7671         PT_NOTE segments.  (assign_file_positions_except_relocs):
7672         core files should be handled the same as exec files.
7673         (prep_headers): identify core files as type ET_CORE.
7674         (copy_private_bfd_data): identify the sections belonging to
7675         the PT_NOTE segment.
7676
7677         * elf32-sparc.c (elf32_sparc_final_write_processing):
7678         add break statement to default case.
7679
7680 1998-08-19  Vladimir N. Makarov  <vmakarov@cygnus.com>
7681
7682         * elf32-ppc.c (ppc_elf_relocate_section): Check that output
7683         section (not input) will be in sections ".sbss", ".sbss2",
7684         ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
7685         R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA.  In all these cases also ignore
7686         output_offset for correct evaluation of addend.
7687
7688 Tue Aug 18 11:48:12 1998  Catherine Moore  <clm@cygnus.com>
7689
7690         * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
7691         elf32_arm_allocate_interworking_sections and
7692         elf32_arm_process_before_allocation.
7693
7694 Tue Aug 18 11:46:00 1998  Nick Clifton  <nickc@cygnus.com>
7695
7696         * bfd-in.h: Ammend prototype for
7697         elf32_arm_process_before_allocation to remove surplus third
7698         argument.
7699
7700         * bfd-in2.h: Regenerate.
7701
7702 Sat Aug 15 20:55:08 1998  Richard Henderson  <rth@cygnus.com>
7703
7704         * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
7705
7706 Fri Aug 14 09:12:28 1998  Stan Cox  <scox@cygnus.com>
7707
7708         * aoutx.h (aout_link_input_section_ext): Use the relocation already
7709         calculated for RELOC_SPARC_REV32 case.
7710
7711 Thu Aug 13 14:02:02 1998  Catherine Moore  <clm@cygnus.com>
7712
7713         * bfd-in.h:  Add prototypes for elf32_arm_get_bfd_for_interworking,
7714         elf32_arm_allocate_interworking_sections and
7715         elf32_arm_process_before_allocation.
7716         * bfd-in2.h:  Regenerated.
7717         * elf32-arm.c Define elf32_arm_link_hash_table.
7718         (insert_thumb_branch): New routine.
7719         (find_thumb_glue): New routine.
7720         (find_arm_glue): New routine.
7721         (record_arm_to_thumb_glue): New routine.
7722         (record_thumb_to_arm_glue): New routine.
7723         (elf32_arm_link_hash_table_create): New routine.
7724         (elf32_arm_get_bfd_for_interworking): New routine.
7725         (elf32_arm_allocate_interworking_sections) New routine.
7726         (elf32_arm_process_before_allocation) New routine.
7727         (elf32_thumb_to_arm_stub): New routine.
7728         (elf32_arm_to_thumb_stub): New routine.
7729         (elf32_print_private_bfd_data): Fix typo.
7730         (elf32_arm_final_link_relocate):  Add argument sym_sec.
7731         Check for branches to thumb symbols in case R_ARM_PC24.
7732         Check for branches to arm symbols in case R_ARM_THM_PC22.
7733         (elf32_arm_relocate_section):  Pass symbol section to
7734         elf32_arm_final_link_relocate.
7735
7736 Wed Aug 12 19:00:39 1998  Geoff Keating  <geoffk@ozemail.com.au>
7737
7738         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
7739         entries unless the symbol is defined in the executable; in
7740         particular, undefined weak symbols get a PLT entry.
7741
7742 Wed Aug 12 14:48:33 1998  Ian Lance Taylor  <ian@cygnus.com>
7743
7744         * libaout.h: Remove nested comment to avoid warning.
7745
7746 Wed Aug 12 08:10:11 1998 Catherine Moore  <clm@cygnus.com>
7747
7748         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7749         R_ARM_PC24 relocation.
7750
7751 Tue Aug 11 14:42:26 1998  Catherine Moore  <clm@cygnus.com>
7752
7753         * elf32-arm.c (elf32_arm_final_link_relocate):  Remove unused
7754         argument is_local.  Add argument sym_flags.  Check sym_flags
7755         in R_ARM_ABS32 case.  Include addend for R_ARM_THM_PC22 case.
7756         (elf32_arm_relocate_section):  Don't pass local sym and pass
7757         sym_flags to elf32_arm_final_link_relocate.
7758
7759 Mon Aug 10 20:38:39 1998  Richard Henderson  <rth@cygnus.com>
7760
7761         * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
7762         to not count too few relocs for dynamicly linked executables.
7763
7764 Mon Aug 10 15:35:34 1998  Richard Henderson  <rth@cygnus.com>
7765
7766         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
7767         symbols without a dynamic index dynamic.  Consider all weak
7768         symbols dynamic.
7769         (elf64_alpha_strip_section_from_output): Don't assume 1-1
7770         correspondance between input and output sections.
7771
7772 Mon Aug 10 15:31:39 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7773
7774         * elflink.h (elf_gc_common_finalize_got_offsets): For backends
7775         that use a .got.plt section start the got offset at zero.
7776
7777 Mon Aug 10 17:31:21 1998  Ian Lance Taylor  <ian@cygnus.com>
7778
7779         * ieee.c (ieee_write_processor): Correct the processor ID written
7780         out for bfd_arch_m68k, accommodating change of March 25.
7781
7782 Sun Aug  9 20:55:44 1998  Catherine Moore  <clm@cygnus.com>
7783
7784         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7785         R_ARM_THM_RPC22 relocations.
7786
7787 Sat Aug  8 15:15:30 1998  Richard Henderson  <rth@cygnus.com>
7788
7789         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
7790         are always dynamic.
7791         (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
7792         .got relocs in -Bsymbolic shared objects.
7793
7794 Wed Aug  5 15:48:08 1998  Nick Clifton  <nickc@cygnus.com>
7795
7796         * elf32-arm.c: Add private flags to ELF header.
7797         (elf32_arm_print_private_bfd_data): New Function.
7798         (elf32_arm_set_private_flags): New Function.
7799         (elf32_arm_copy_private_flags): New Function.
7800         (elf32_arm_merge_private_bfd_data): New Function.
7801
7802 Mon Aug  3 17:10:15 1998  Ian Lance Taylor  <ian@cygnus.com>
7803
7804         * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
7805         a local symbol.
7806         (elf32_sparc_relocate_section): Likewise.
7807
7808 Sun Aug  2 03:19:23 1998  Richard Henderson  <rth@cygnus.com>
7809
7810         * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL.  Create the
7811         .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
7812         (ppc_elf_relocate_section): Pull sgot and splt search to the start
7813         of the function.  Recognize no .plt as static linking.
7814
7815 1998-08-01  Ulrich Drepper  <drepper@cygnus.com>
7816
7817         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
7818         ".liblist" string through gettext.
7819
7820 Fri Jul 31 16:38:14 1998  Catherine Moore  <clm@cygnus.com>
7821
7822         * Makefile.am: Add support for elf32-arm.lo.
7823         * Makefile.in: Rebuild.
7824         * config.bfd (arm-*-elf):  Define targ_defvec and targ_selvecs.
7825         (thumb-*-elf): Define targ_defvec and targ_selvecs.
7826         * configure.in:  Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
7827         * configure: Regenerate.
7828         * elf.c: (prep_headers):  Support arch_type of EM_ARM.
7829         * targets.c:  Support new targets bfd_elf32_bigarm_vec and
7830         bfd_target bfd_elf32_littlearm_vec.
7831         * elf32-arm.c:  New file.
7832
7833 Tue Jun 28 19:05:28 1998  Stan Cox  <scox@cygnus.com>
7834
7835         * libaout.h (M_SPARCLITE_LE): New machine.
7836         * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
7837         * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
7838         (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
7839         * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
7840         (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
7841         (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
7842         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7843         elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
7844         * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
7845         be BFD_RELOC_SPARC_REV32.
7846         * reloc.c: Ditto.
7847         * config.bfd (sparc86x-*-aout): New
7848
7849 Fri Jul 24 13:54:19 1998  Nick Clifton  <nickc@cygnus.com>
7850
7851         * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
7852         actually mapping the output sections.
7853
7854 Fri Jul 24 11:24:29 1998  Jeffrey A Law  (law@cygnus.com)
7855
7856
7857         * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
7858         (mn10300_elf_reloc_map): Similarly.
7859         (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
7860
7861 Fri Jul 24 12:36:04 1998  Ian Lance Taylor  <ian@cygnus.com>
7862
7863         * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
7864         Irix 6.
7865         (bfd_elf32_bfd_reloc_type_lookup): Add default case.
7866         * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
7867         elf_mips_reloc_type defined in elf/mips.h.
7868
7869 1998-07-24  Ulrich Drepper  <drepper@cygnus.com>
7870
7871         * elf64-mips.c: Remove reloc_type definition completely.  It's now
7872         in elf/mips.h.
7873
7874 Thu Jul 23 13:33:19 1998  Doug Evans  <devans@canuck.cygnus.com>
7875
7876         * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
7877         as they are defined in elf/mips.h now.
7878
7879 Thu Jul 23 11:29:43 1998  Jeffrey A Law  (law@cygnus.com)
7880
7881
7882         * Re-add lost change:
7883         * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
7884         "movm_stack_size".
7885         (mn10300_elf_relax_section): Include stack space for register saves
7886         in the imm8 field of a "call" instruction.
7887         (compute_function_info): Determine how much stack is allocated by
7888         the movm instruction.  Fix typo.
7889         (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
7890
7891 Thu Jul 23 11:38:05 1998  Ian Lance Taylor  <ian@cygnus.com>
7892
7893         * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
7894         * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
7895
7896 1998-07-22  Ulrich Drepper  <drepper@cygnus.com>
7897
7898         * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
7899
7900 Wed Jul 22 16:27:18 1998  Nick Clifton  <nickc@cygnus.com>
7901
7902         * elf32-hppa.h: Let ELF header define the enum containing the
7903         external reloc numbers.
7904         * elf32-i386.h: Likewise.
7905
7906 1998-07-22 14:57  Ulrich Drepper  <drepper@cygnus.com>
7907
7908         * elf-m10300.c: Let ELF header now define the macros to get the enum.
7909         * elf32-mips.c: Likewise.
7910         * elf32-ppc.c: Likewise.
7911
7912 Wed Jul 22 13:53:52 1998  Nick Clifton  <nickc@cygnus.com>
7913
7914         * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
7915         bfd_coff_set_symbol_class(), in order to avoid K&R compatability
7916         prblems.
7917         * bfd-in.h: Regenerate.
7918         * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
7919         parameter to 'unsigned int' to avoid K&R compatability problems.
7920
7921 Wed Jul 22 16:43:24 1998  Ian Lance Taylor  <ian@cygnus.com>
7922
7923         * ieee.c (ieee_find_nearest_line): Change filename_ptr and
7924         functionname_ptr to be const.  Change line_ptr to be unsigned.
7925
7926         * coffcode.h (coff_link_output_has_begun): Simplify handling when
7927         macro is not defined.  Change second parameter from bfd_link_info
7928         to coff_final_link_info.  Add prototype.
7929         (coff_final_link_postscript): Simplify handling when macro is not
7930         defined.  Add prototype.
7931
7932 1998-07-22 13:08  Ulrich Drepper  <drepper@cygnus.com>
7933
7934         * elf-mn10300.c: Before include system specific ELF header define
7935         START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
7936         * elf32-mips.c: Likewise.
7937         * elf32-ppc.c: Likewise.
7938
7939 Wed Jul 22 13:46:51 1998  Ian Lance Taylor  <ian@cygnus.com>
7940
7941         * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
7942         temporary patch over to elf64-mips.c as well.
7943
7944 1998-07-21  Ulrich Drepper  <drepper@cygnus.com>
7945
7946         * elf32-mips.c (reloc_type): Temporarily disable definition of
7947         standard relocation since they are now defined in elf/mips.h.
7948
7949 Tue Jul 21 09:47:00 1998  Catherine Moore  <clm@cygnus.com>
7950
7951         * elf-m10200.c (mn10200_elf_final_link_relocate):
7952         Modify range test for case R_MN10200_8.
7953
7954         * elf-m10300.c (mn10300_elf_final_link_relocate):
7955         Modify range test for case R_MN10300_8.
7956
7957 Mon Jul 20 18:50:54 1998  Richard Henderson  <rth@cygnus.com>
7958
7959         * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
7960         * elf32-i386.c (elf_backend_got_header_size): Define.
7961         (elf_backend_plt_header_size): Define.
7962         * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
7963         * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
7964         * elfxx-target.h: Provide a default of zero.
7965         * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
7966         * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
7967
7968         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
7969         entry from an executable, even if the plt refcount goes to 0.
7970
7971 Mon Jul 20 12:47:26 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7972
7973         * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
7974         directory name at the line number.
7975
7976         * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
7977         with an unspecified type.
7978
7979 Wed Jul 15 11:20:01 1998  Ian Lance Taylor  <ian@cygnus.com>
7980
7981         * sunos.c: Add undef of valid to avoid problem on SunOS.
7982
7983 Tue Jul 14 15:30:59 1998  Richard Henderson  <rth@cygnus.com>
7984
7985         * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
7986
7987 Tue Jul 14 11:22:21 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7988
7989         * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
7990         R_68K_PCxx and R_68K_xx relocations.  Make sure that
7991         ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
7992         (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
7993         R_68K_xx relocations.
7994         (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
7995         that has no plt entry.
7996         (elf_m68k_relocate_section): Ignore the plt offset in a static
7997         link.
7998         * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
7999         an ignored symbol.
8000         (elf_gc_common_finalize_got_offsets): Set the got offsets also in
8001         a static link.
8002
8003         * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
8004         types.
8005         (howto_table, reloc_map): Add entries for them.
8006         (elf_m68k_check_relocs): Handle them.  Implement reference
8007         counting for got and plt entries.
8008         (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
8009         (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
8010         symbols.
8011         (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
8012         (elf_m68k_relocate_section): Handle the new reloc types.
8013         (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
8014         elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
8015         * elflink.h (elf_link_add_object_symbols): When creating an
8016         indirect reference for symbol versioning also copy the plt
8017         offset.
8018         (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
8019         flag also reset the plt offset.
8020         (elf_link_assign_sym_version): Likewise.
8021         (elf_gc_common_finalize_got_offsets): Increment the got offset by
8022         the size of the entry in bytes.
8023         (elf_gc_allocate_got_offsets): Likewise.
8024
8025 Tue Jul 14 11:18:14 1998  Ian Lance Taylor  <ian@cygnus.com>
8026
8027         * elflink.h (elf_gc_sections): Return true rather than falling off
8028         the bottom.
8029
8030         * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
8031         xmalloc.
8032
8033 Mon Jul 13 11:06:31 1998  Nick Clifton  <nickc@cygnus.com>
8034
8035         * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
8036         comment describing when it should be enabled.
8037         Changed definition of USER_LABEL_PREFIX to "", to fall into line
8038         with GCC sources.
8039
8040 Mon Jul 13 13:06:54 1998  Ian Lance Taylor  <ian@cygnus.com>
8041
8042         * ieee.c (ieee_slurp_external_symbols): Handle call optimization
8043         information ATN records.
8044
8045 Fri Jul 10 16:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
8046
8047         * ieee.c (ieee_slurp_external_symbols): Select an appropriate
8048         section for an absolute symbol in a fully linked file.  Based on
8049         patch from Christian Holland <CHolland@de.lucent.com>.
8050
8051 Wed Jul  8 11:29:56 1998  Manfred Hollstein  <manfred@s-direktnet.de>
8052
8053         * coff-m88k.c (m88k_special_reloc): Don't lose the information
8054         that a symbol is undefined.
8055
8056 Tue Jul  7 21:47:02 1998  Jeffrey A Law  (law@cygnus.com)
8057
8058         * som.c (som_bfd_gc_sections): Define.
8059
8060 Mon Jul  6 11:35:50 1998  Nick Clifton  <nickc@cygnus.com>
8061
8062         * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
8063         overflows in ARM_26D patches, since they have already been
8064         implmented.  Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
8065
8066 Sat Jul  4 12:25:36 1998  Ian Lance Taylor  <ian@cygnus.com>
8067
8068         * coffcode.h (coff_write_object_contents): If we have any long
8069         section names, call coff_write_symbols even if there are no
8070         symbols.
8071
8072 Fri Jul  3 13:11:35 1998  Ian Lance Taylor  <ian@cygnus.com>
8073
8074         * elf.c (copy_private_bfd_data): Only set phdr_included once for a
8075         PT_LOAD segment, rather than only setting it once for the entire
8076         file.
8077
8078         * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
8079         rather than ignoring every phdr with a p_paddr of 0, ignore all
8080         the phdrs if they all have a p_paddr of 0.
8081
8082         * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
8083         section was discarded from the link.
8084
8085 Fri Jul  3 14:39:05 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
8086
8087         * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
8088
8089 Fri Jul  3 14:35:48 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
8090
8091         * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
8092         floating point operations.
8093
8094 Thu Jul  2 18:37:25 1998  Ian Lance Taylor  <ian@cygnus.com>
8095
8096         * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
8097         function symbols.
8098
8099 Thu Jul  2 14:59:42 1998  Klaus Kaempf  <kkaempf@rmi.de>
8100
8101         Merge of vax/vms (read-only) support
8102         * configure.com: Support Vax target.
8103         * makefile.vms: Support Vax target.
8104         * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
8105         * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
8106         support.
8107         * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
8108         support.
8109         * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
8110         support.
8111         * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
8112         support.
8113         * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
8114         support.
8115         * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
8116         * targets.c (bfd_target_ovax_flavour): New flavour.
8117         (vms_alpha_vec): Renamed from evax_alpha_vec.
8118         (vms_vax_vec): New.
8119         (target_vector): Update accordingly.
8120         * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
8121         evax_alpha_vec.
8122         (vax*-*-*vms*): New target.
8123         * Makefile.am: Update for renamed files.  Rebuild dependencies.
8124         * bfd-in2.h: Rebuild.
8125         * configure.in, Makefile.in, aclocal.m4: Rebuild.
8126
8127 Thu Jul  2 13:31:55 1998  Ian Lance Taylor  <ian@cygnus.com>
8128
8129         Based on patch from Matt Semersky <matts@scd.hp.com>:
8130         * linker.c (_bfd_generic_final_link): Force a trailing NULL
8131         pointer on abfd->outsymbols.
8132         (generic_add_output_symbol): Handle NULL sym parameter.
8133
8134 Wed Jul  1 17:05:53 1998  Nick Clifton  <nickc@cygnus.com>
8135
8136         * elf.c (copy_private_bfd_data): Add support for changing VMA or
8137         LMA of sections.
8138
8139 Wed Jul  1 16:58:50 1998  Ian Lance Taylor  <ian@cygnus.com>
8140
8141         * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
8142         when handling 32 bit immediate relocs.
8143         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8144
8145 Tue Jun 30 09:55:03 1998  Jeffrey A Law  (law@cygnus.com)
8146
8147         * section.c (STD_SECTION): Account for recently added gc_mark
8148         field in struct asection.
8149
8150         * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
8151         (bfd_elf32_bfd_merge_private_bfd_data): Define.
8152
8153 Thu Jun 25 18:31:41 1998  Richard Henderson  <rth@cygnus.com>
8154
8155         ELF Section-level Garbage Collection:
8156         * bfd.c (bfd_gc_sections): New.
8157         * aout-adobe.c: Hook to default implementation.
8158         * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
8159         * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
8160         * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
8161         * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
8162         * tekhex.c, versados.c: Likewise.
8163         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
8164         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
8165
8166         * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
8167         (bfd_generic_gc_sections): New.
8168         * section.c (SEC_KEEP): New.
8169         (asection): Add gc_mark member.
8170
8171         * elfcode.h (elf_gc*): New name remappings.
8172         * elflink.h (elf_link_input_bfd): Don't set contents on stabs
8173         sections to be excluded.
8174         (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
8175         (elf_gc_propogate_vtable_entries_used): New.
8176         (elf_gc_smash_unused_vtentry_relocs): New.
8177         (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
8178         (elf_gc_common_finalize_got_offsets): New.
8179         (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
8180         * elfxx-target.h: Add and default gc hooks.
8181
8182         * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
8183         for unions.
8184         (struct elf_obj_tdata): Likewise for local_got_offsets.
8185         * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
8186         * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
8187         * elf64-sparc.c, elflink.h: Likewise.
8188
8189         * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
8190         (ELF_LINK_HASH_MARK): Define.
8191         (struct elf_backend_data): Add GC hooks.
8192         * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
8193
8194         * elf-m10300.c (mn10300_elf_check_relocs): New.
8195         (mn10300_elf_gc_mark_hook): New.
8196         (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
8197         (elf_mn10300_howto, mn10300_reloc_map): Handle them.
8198         (mn10300_elf_final_link_relocate): Likewise.
8199         (mn10300_elf_relocate_section): Likewise.
8200         (elf_backend_can_gc_sections): Define.
8201         * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
8202         (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
8203         (bfd_elf32_bfd_reloc_type_lookup): Handle them.
8204         (mips_info_to_howto_rel): Likewise.
8205         (mips_elf_relocate_section): Likewise.
8206         (mips_elf_check_relocs): Likewise.
8207         (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
8208         (elf_backend_can_gc_sections): Define.
8209         * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
8210         (ppc_elf_howto_raw): Handle them.
8211         (ppc_elf_reloc_type_lookup): Likewise.
8212         (ppc_elf_relocate_section): Likewise.
8213         (ppc_elf_check_relocs): Reference count .got and .plt entries.
8214         Handle new vtable relocs.
8215         (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
8216         (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
8217         (elf_backend_can_gc_sections): Define.
8218
8219 Fri Jun 26 10:48:23 1998  Jeffrey A Law  (law@cygnus.com)
8220
8221         * archures.c (bfd_mach_mn10300): Define.
8222         * elf-m10300.c: Include elf/mn10300.h
8223         (elf_mn10300_mach): New function.
8224         (_bfd_mn10300_elf_final_write_processing): Likewise.
8225         (_bfd_mn10300_elf_object_p): Likewise.
8226         (elf_backendfinal_write_processing): Define.
8227         (elf_backend_object_p): Likewise.
8228
8229 Thu Jun 25 18:31:08 1998  Nick Clifton  <nickc@cygnus.com>
8230
8231         * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
8232         relocation.
8233
8234 Wed Jun 24 17:17:57 1998  Ian Lance Taylor  <ian@cygnus.com>
8235
8236         * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
8237         link_next field, not the next field.
8238
8239 Sun Jun 21 19:38:39 1998  Ian Lance Taylor  <ian@cygnus.com>
8240
8241         * elf.c (map_sections_to_segments): Check the section address
8242         against the phdr size both with and without a modulo of
8243         maxpagesize.
8244
8245 Fri Jun 19 17:08:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8246
8247         * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
8248         linker created empty input section if the output section has the
8249         same name.
8250
8251         * elflink.h (elf_link_output_extsym): Print an error message if
8252         _bfd_elf_section_from_bfd_section fails.
8253
8254         * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
8255         failure.
8256
8257 Tue Jun 16 11:55:55 1998  Ian Lance Taylor  <ian@cygnus.com>
8258
8259         * elf.c (copy_private_bfd_data): Improve handling of Solaris
8260         native linker output.  Avoid putting an empty section in more than
8261         one segment.
8262
8263 Fri Jun 12 13:30:17 1998  Tom Tromey  <tromey@cygnus.com>
8264
8265         * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
8266         ($(PACKAGE).pot): Unconditionally depend on POTFILES.
8267
8268 Fri Jun 12 13:34:02 1998  Doug Evans  <devans@canuck.cygnus.com>
8269
8270         * elf.c (swap_out_syms): New arg relocatable_p.
8271         Don't add section VMA to symbols for relocatable output.
8272         (_bfd_elf_compute_section_file_positions): Update call to
8273         swap_out_syms.
8274
8275 Mon Jun  8 15:20:57 1998  Nick Clifton  <nickc@cygnus.com>
8276
8277         * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
8278         against 'addend' be signed rather than unsigned.
8279
8280 Sat Jun  6 00:31:21 1998  Nick Clifton  <nickc@cygnus.com>
8281
8282         * elf32-m32r.c: Add prototyps for static functions.
8283
8284         * coff-arm.c: Add prototypes for static functions.
8285
8286 Fri Jun  5 17:21:51 1998  Nick Clifton  <nickc@cygnus.com>
8287
8288         * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
8289         LMA is used to order sections in a segment.
8290
8291         * elf32-v850.c: Add prototypes for static functions.
8292         Change type of addend parameter to bfd_vma in various functions.
8293
8294 Fri Jun  5 18:09:58 1998  Ian Lance Taylor  <ian@cygnus.com>
8295
8296         * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
8297         complain_overflow_signed instead of complain_overflow_bitfield.
8298
8299 Fri Jun  5 15:11:11 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8300
8301         * elf.c (elf_map_symbols): Don't add section VMA to symbol value
8302         when comparing against 0.
8303
8304 Wed Jun  3 17:52:49 1998  Ian Lance Taylor  <ian@cygnus.com>
8305
8306         * Makefile.am (config.status): New target.
8307         * Makefile.in: Rebuild.
8308
8309 Wed Jun  3 12:18:24 1998  Stan Cox  <scox@equinox.cygnus.com>
8310
8311         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
8312         error if previous object endianness doesn't match current object.
8313
8314 Tue Jun  2 17:50:59 1998  Nick Clifton  <nickc@cygnus.com>
8315
8316         * elf32-v850.c (v850_elf_print_private_bfd_data): Call
8317         _bfd_elf_print_private)bfd_data ().
8318
8319 Tue Jun  2 15:29:35 1998  Ian Lance Taylor  <ian@cygnus.com>
8320
8321         * elflink.h (elf_merge_symbol): Don't always set type_change_ok
8322         and size_change_ok.
8323         (elf_link_add_object_symbols): Set type_change_ok and
8324         size_change_ok before calling elf_merge_symbol.
8325
8326         * elf32-mips.c (mips_elf_relocate_section): If we issue an
8327         undefined symbol error, don't also issue an overflow error.
8328
8329 Tue Jun  2 13:51:00 1998  Geoff Keating  <geoffk@ozemail.com.au>
8330
8331         * elf32-ppc.c (ppc_elf_relocate_section): The target of an
8332         R_PPC_LOCAL24PC relocation should be local; if not, print an error
8333         message instead of crashing.
8334
8335 Mon Jun  1 18:23:12 1998  Yuli Barcohen  <yuli.barcohen@telrad.co.il>
8336
8337         * archures.c (bfd_mach_cpu32): Define.
8338         (bfd_default_scan): Add case for 68060.  Fix 68332 case to use
8339         bfd_mach_cpu32.
8340         * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
8341         * ieee.c: Include <ctype.h>.
8342         (ieee_object_p): Parse out process ID string to make it more
8343         likely to be acceptable for bfd_scan_arch.
8344         * bfd-in2.h: Rebuild.
8345
8346 Mon Jun  1 11:12:02 1998  Nick Clifton  <nickc@cygnus.com>
8347
8348         * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
8349         _bfd_elf_print_private_bfd_data() so that the program header will
8350         be displayed.
8351
8352 Mon Jun  1 12:14:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8353
8354         * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
8355         0x68.  Reindent.  Add some comments.
8356
8357 Fri May 29 09:58:08 1998  Nick Clifton  <nickc@cygnus.com>
8358
8359         * elf.c (copy_private_bfd_data): Adjust physical address of
8360         segment in output BFD to contain LMAs of its sections.
8361
8362 Tue May 26 19:37:47 1998  Stan Cox  <scox@equinox.cygnus.com>
8363
8364         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
8365         elf32_sparc_relocate_section): Added R_SPARC_32LE for little
8366         endian data 32 bit relocations.
8367         (elf32_sparc_merge_private_bfd_data): Check if linking little
8368         endian objects with big endian objects.
8369         (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
8370         (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
8371         * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
8372         * reloc.c: Same.
8373         * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
8374         * archures.c (bfd_mach_sparc_sparclite_le): New.
8375         * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
8376
8377 Thu May 21 16:59:28 1998  Nick Clifton  <nickc@cygnus.com>
8378
8379         * peicode.h (add_data_entry): Fix precedence of operators in if ()
8380         statement.
8381
8382 Tue May 19 18:41:19 1998  Ian Lance Taylor  <ian@cygnus.com>
8383
8384         * bfd-in.h: Move over patch to bfd-in2.h.
8385
8386         * reloc.c (bfd_check_overflow): Add casts before shifts which may
8387         not fit in 32 bits.
8388         (_bfd_relocate_contents): Likewise.
8389
8390 Mon May 18 14:44:15 1998  Nick Clifton  <nickc@cygnus.com>
8391
8392         * peicode.h (add_data_entry): If the section has no private data
8393         then do not create a Data Dictionary entry for it.
8394
8395 Mon May 18 00:09:28 1998  Richard Henderson  <rth@cygnus.com>
8396
8397         * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
8398         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
8399         elf64_alpha_size_got_sections): Rewrite, handling multiple got
8400         subsections during relaxation more correctly.
8401
8402 Thu May 14 14:22:58 1998  Nick Clifton  <nickc@cygnus.com>
8403
8404         * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
8405         Add extra argument to bfd_arm_process_before_allocation ().
8406         * bfd-in.h: Reflect changes made in bfd-in2.h.
8407         * coffgen.c (bfd_coff_set_symbol_class): New function.  Set the
8408         coff class of a BFD symbol.
8409         * coff-arm.c: Add support for interworking between Thumb code and
8410         non-interworking aware ARM code.
8411
8412 Sun May 10 22:33:59 1998  Jeffrey A Law  (law@cygnus.com)
8413
8414         * po/Make-in (install-info): New target.
8415
8416 Thu May  7 17:40:56 1998  Ian Lance Taylor  <ian@cygnus.com>
8417
8418         * filemode.c: Remove; not used.
8419
8420         If sysdep.h includes a header file, don't include it again:
8421         * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
8422         <errno.h>.
8423         * aoutx.h: Don't include <string.h>.  Use "sysdep.h" rather than
8424         <sysdep.h>.
8425         * archive.c: Don't include <string.h> or <errno.h>.
8426         * evax-alpha.c; Don't include <stdio.h>.
8427         * evax-egsd.c: Likewise.
8428         * evax-etir.c: Likewise.
8429         * evax-misc.c: Likewise.
8430         * evax-emh.c: Likewise.  Also, don't include <sys/types.h>.
8431         * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
8432         <errno.h>.
8433         * hpux-core.c: Likewise.
8434         * netbsd-core.c: Likewise.
8435         * som.c: Likewise.
8436         * libbfd.c: Don't include <sys/types.h>.
8437         * nlmcode.h: Don't include <string.h>.
8438         * osf-core.c: Don't include <string.h> or <stdio.h>.
8439         * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
8440         <errno.h>, or <unistd.h>.
8441         * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
8442
8443 Thu May  7 13:12:50 1998  Klaus Kaempf  <kkaempf@progis.de>
8444
8445         * configure.com: If the version number can not be found in
8446         configure.in, set it to "unknown" rather than "2.8.1".
8447
8448 Wed May  6 09:46:05 1998  Gavin Koch  <gavin@cygnus.com>
8449
8450         * elf32-mips.c (elf_mips_mach): New.
8451         (_bfd_mips_elf_object_p): Use elf_mips_mach.
8452         (_bfd_mips_elf_final_write_processing): Use the names
8453         of machines, rather than the numbers.  Set both the ARCH
8454         and MACH in e_flags.  Handle a few more specific machines.
8455         (_bfd_mips_elf_merge_private_bfd_data): Merge both
8456         EF_MIPS_ARCH and EF_MIPS_MACH.
8457
8458 Tue May  5 21:01:53 1998  Richard Henderson  <rth@cygnus.com>
8459
8460         * syms.c (bfd_is_local_label): Revert last change.
8461         * srec.c (srec_write_symbols): Discard debugging symbols.
8462
8463 Tue May  5 23:36:06 1998  Ian Lance Taylor  <ian@cygnus.com>
8464
8465         * som.c: Include <ctype.h>.
8466         * som.h: Don't include sysdep.h.
8467
8468 Tue May  5 18:29:24 1998  Tom Tromey  <tromey@cygnus.com>
8469
8470         * libbfd.h: Rebuilt.
8471         * libbfd-in.h: Removed gettext includes and defines.
8472         * sysdep.h: Moved gettext-related includes and defines here.
8473
8474 Tue May  5 16:47:54 1998  Richard Henderson  <rth@cygnus.com>
8475
8476         * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
8477         an ad-hoc test.  Kill bogus #if 0 code.
8478         * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
8479
8480 Mon May  4 16:10:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8481
8482         * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
8483         when generating a normal executable for a symbol defined in a
8484         regular file.  When copying a reloc into the output file, adjust
8485         the addend for a PC relative reloc against a global symbol.
8486
8487 Mon May  4 10:08:18 1998  Tom Tromey  <tromey@cygnus.com>
8488
8489         * libbfd.h: Rebuilt.
8490         * libbfd-in.h (_): Define as dgettext.
8491
8492 Mon May  4 11:02:23 1998  Ian Lance Taylor  <ian@cygnus.com>
8493
8494         * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
8495         not signed.
8496         * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
8497         when declaring parameter types.
8498         (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
8499
8500 Wed Apr 29 15:35:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8501
8502         * config.bfd: If we include any ELF targets in targ_defvec and/or
8503         targ_selvecs, then add the generic ELF targets to targ_selvecs.
8504         * elf32-gen.c (dummy): New static const variable.
8505         (elf_generic_info_to_howto): New static function.
8506         (elf_generic_info_to_howto_rel): New static function.
8507         (elf_info_to_howto): Define as elf_generic_info_to_howto.
8508         (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
8509         * elf64-gen.c: Same changes as elf32-gen.c.
8510         * elfcode.h (elf_object_p): For the generic target, ignore a
8511         failure of bfd_default_set_arch_mach.  Fix indentation a bit.
8512
8513 Tue Apr 28 20:05:52 1998  Ian Lance Taylor  <ian@cygnus.com>
8514
8515         * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
8516         * configure: Rebuild.
8517
8518 Tue Apr 28 12:16:57 1998  Jason Molenda  (crash@bugshack.cygnus.com)
8519
8520         * config.bfd:  Update OSR5/Unixware patterns.
8521
8522 Mon Apr 27 18:02:24 1998  Richard Henderson  <rth@cygnus.com>
8523
8524         * elf.c (assign_file_positions_for_segments): Allow for holes
8525         between sections added by a link script.
8526
8527 Mon Apr 27 11:49:55 1998  Ian Lance Taylor  <ian@cygnus.com>
8528
8529         * configure.in: Change version number to 2.9.4
8530         * configure: Rebuild.
8531
8532         Based on patch from H.J. Lu <hjl@gnu.org>:
8533         * elf.c (bfd_elf_get_bfd_needed_list): New function.
8534         * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
8535         * bfd-in2.h: Rebuild.
8536
8537 Sat Apr 25 20:07:53 1998  Richard Henderson  <rth@cygnus.com>
8538
8539         * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
8540         Change all users.
8541
8542 Sat Apr 25 18:29:07 1998  Richard Henderson  <rth@cygnus.com>
8543
8544         * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
8545         (elf64_alpha_relax_section): Fill them in.
8546         (elf64_alpha_relax_opt_call): Implement more than a stub.
8547         (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
8548         alignment on .scommon.
8549         (elf64_alpha_merge_gots): Merge use counts as well.
8550
8551 Sat Apr 25 14:07:29 1998  Richard Henderson  <rth@cygnus.com>
8552
8553         * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
8554         for calculating a local symbol's address.
8555         (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
8556         Set the .got's cooked size as well as the raw size.
8557
8558 Fri Apr 24 09:16:00 1998  Nick Clifton  <nickc@cygnus.com>
8559
8560         * elf32-v850.c (v850_elf_print_private_bfd_data): Add
8561         internationalisation of printed information.
8562
8563         * coff-arm.c (coff_arm_print_private_bfd_data): Add
8564         internationalisation of printed information.
8565
8566 Fri Apr 24 12:09:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8567
8568         * syms.c (struct indexentry): Change directory_name, file_name,
8569         and function_name fields to char *.
8570         (struct stab_find_info): Change cached_file_name field to char *.
8571
8572 Thu Apr 23 08:13:04 1998  Nick Clifton  <nickc@cygnus.com>
8573
8574         * peicode.h (dir_names): Add missing N_() macros to dir_names array.
8575
8576 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8577
8578         * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
8579
8580 Wed Apr 22 17:48:48 1998  Ian Lance Taylor  <ian@cygnus.com>
8581
8582         * Makefile.am (install-data-local): Make $(includedir).
8583         * Makefile.in: Rebuild.
8584
8585 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8586
8587         * libbfd-in.h: Use `gettext' and not `dgettext' for now.
8588
8589 Wed Apr 22 12:53:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8590
8591         * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
8592         * Makefile.in: Rebuild.
8593
8594         * bfd-in2.h: Rebuild for Nick's changes.
8595
8596 Tue Apr 21 23:11:51 1998  Richard Henderson  <rth@cygnus.com>
8597
8598         * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
8599         change wrt length == max_namelen.
8600
8601 Tue Apr 21 21:19:36 1998  Tom Tromey  <tromey@scribbles.cygnus.com>
8602
8603         * Many files: Added gettext invocations around user-visible
8604         strings.
8605         * libbfd-in.h: Added gettext includes and defines.
8606         * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
8607         HAVE_LC_MESSAGES): Define.
8608         * configure.in: Call CY_GNU_GETTEXT.  Create po/Makefile.in and
8609         po/Makefile.
8610         * Makefile.am (SUBDIRS): Added po.
8611         (POTFILES): New macro.
8612         (po/POTFILES.in): New target.
8613         (SOURCE_HFILES): New macro.
8614         (HFILES): Use it.
8615         * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
8616
8617 Tue Apr 21 13:38:18 1998 Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8618
8619         * elfcore.h (bfd_prstatus):  Copy core_prstatus from the first
8620         NT_PRSTATUS note section encountered, it contains the status of
8621         the currently executing thread when the core file was written.
8622
8623 Tue Apr 21 10:00:12 1998  Nick Clifton  <nickc@cygnus.com>
8624
8625         * libcoff.h: Add extra parameter to
8626         bfd_coff_link_output_has_begun overrideable function.
8627         * cofflink.c: Pass extra parameter to
8628         bfd_coff_link_output_has_begun function.
8629         * bfd-in.h: Add prototypes for exported ARM interworking
8630         functions.
8631         * peicode.h: ARM specific code reorganised to conform to BFD
8632         coding conventions.
8633         * coffcode.h: ARM specific code reorganised to conform to BFD
8634         coding conventions.
8635         * coff-arm.c: Code reorganised to conform to the BFD coding
8636         conventions.  Global variables have been moved into an ARM
8637         specific hash table structure and a new function:
8638         bfd_arm_get_bfd_for_interworking() has been created which is
8639         called from the linker scripts.
8640
8641 Tue Apr 21 00:11:51 1998  Richard Henderson  <rth@cygnus.com>
8642
8643         * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
8644
8645         * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
8646         elf64_alpha_relax_find_reloc_ofs.  Changed all callers.
8647         (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
8648         (elf64_alpha_size_got_sections): Don't merge .got sections twice.
8649
8650 Sat Apr 18 01:21:04 1998  Stan Cox  <scox@cygnus.com>
8651
8652         * config.bfd: Added sparc86x support.
8653
8654 Fri Apr 17 22:29:04 1998  Ian Lance Taylor  <ian@cygnus.com>
8655
8656         * elf32-mips.c (mips_elf_relocate_section): Do not complain about
8657         an out of range pc-relative jump/call to an undefined weak symbol.
8658
8659 Thu Apr 16 13:49:00 1998  Richard Henderson  <rth@cygnus.com>
8660
8661         * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
8662         comparisons signed.
8663
8664 Thu Apr 16 11:43:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8665
8666         * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
8667         an error other than bfd_error_system_call, set the error to
8668         bfd_error_wrong_format.
8669
8670         * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
8671         bfd_elf32_powerpcle_vec.
8672
8673         * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
8674         program segments are zero, don't set p_paddr_valid.
8675
8676 Wed Apr 15 22:15:16 1998  Richard Henderson  <rth@cygnus.com>
8677
8678         * elf64-alpha.c: Initial implementation of relaxation --
8679         (struct alpha_elf_link_hash_entry): Add use_count member.
8680         (elf64_alpha_check_relocs): Initialize and increment it.
8681         (elf64_alpha_can_merge_gots): Check it when considering merging.
8682         (elf64_alpha_merge_gots): Drop entries with zero use.
8683         (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8684         (elf64_alpha_always_size_sections): Split out got sizing ...
8685         (elf64_alpha_size_got_sections): ... here.  New function.
8686         (elf64_alpha_relax_find_reloc_ofs): New function.
8687         (elf64_alpha_relax_with_lituse): Likewise.
8688         (elf64_alpha_relax_without_lituse): Likewise.
8689         (elf64_alpha_relax_opt_call): Likewise.
8690         (elf64_alpha_relax_section): Likewise.
8691         (elf64_alpha_add_symbol_hook): Likewise.
8692         (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
8693         (elf64_alpha_relocate_section): Likewise.
8694         (bfd_elf64_bfd_relax_section): Define.
8695         (elf_backend_add_symbol_hook): Likewise.
8696
8697 Wed Apr 15 16:08:46 1998  Richard Henderson  <rth@cygnus.com>
8698
8699         * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
8700         * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
8701         (ELF_MACHINE_ALT1): New.  Set to EM_OLD_SPARC64.
8702
8703 Wed Apr 15 11:34:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8704
8705         * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
8706         * configure: Rebuild.
8707
8708 Mon Apr 13 16:46:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8709
8710         * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
8711         (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
8712         * configure.in: Define and substitute WIN32LDFLAGS and
8713         WIN32LIBADD.
8714         * aclocal.m4: Rebuild with new libtool.
8715         * configure, Makefile.in: Rebuild.
8716
8717 Fri Apr 10 13:44:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8718
8719         * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
8720         before any other symbols in the same section.
8721
8722 Wed Apr  8 14:50:23 1998  Michael Meissner  <meissner@cygnus.com>
8723
8724         * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
8725         systems.
8726
8727 Tue Apr  7 16:25:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
8728
8729         * dwarf2.c (comp_unit): Move it earlier in the source. Add
8730         addr_size.
8731         (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
8732         Use addr_size for address size, rather than sizeof(bfd_vma).
8733         (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
8734         Fix call to read_address.
8735         (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
8736         Scrap other unneeded arguments.  Fix call to read_address.
8737         (scan_unit_for_functions): Fix call to read_attribute.
8738         (parse_comp_unit): We now handle more values for addr_size.
8739         Set addr_size in unit.  Fix call to read_attribute and
8740         decode_line_info.
8741
8742 Tue Apr  7 15:44:47 1998  Gavin Romig-Koch <gavin@cygnus.com>
8743
8744         * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
8745
8746 Tue Apr  7 12:35:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8747
8748         * archures.c (bfd_default_scan): Add m68k cases back to default
8749         switch, reverting patch of March 25, since IEEE support depends
8750         upon them.
8751
8752 Mon Apr  6 14:06:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8753
8754         * Makefile.am (diststuff): New target.
8755         * Makefile.in: Rebuild.
8756
8757 Sun Apr  5 16:21:44 1998  Jeffrey A Law  (law@cygnus.com)
8758
8759         * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
8760         som_offset when we have an extended name table.
8761
8762 Sun Apr  5 16:04:39 1998  H.J. Lu  <hjl@gnu.org>
8763
8764         * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
8765         trying to copy it.
8766         * Makefile.in: Rebuild.
8767
8768 Fri Apr  3 11:09:42 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8769
8770         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
8771         symbols when creating a shared library.
8772         (elf_m68k_adjust_dynindx): New function, used by above code.
8773         (elf_m68k_finish_dynamic_sections): Initialize the section
8774         symbols.
8775         (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
8776
8777 Wed Apr  1 16:04:02 1998  Nick Clifton  <nickc@cygnus.com>
8778
8779         * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
8780         value 11.
8781
8782 Wed Apr  1 13:36:58 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8783
8784         * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
8785         assertion.
8786
8787 Tue Mar 31 00:12:12 1998  Jeffrey A Law  (law@cygnus.com)
8788
8789         * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
8790         absolute symbols.
8791
8792 Mon Mar 30 12:46:15 1998  Ian Lance Taylor  <ian@cygnus.com>
8793
8794         * configure.in: Set version to 2.9.1.
8795         * configure: Rebuild.
8796
8797         * Branched binutils 2.9.
8798
8799 Mon Mar 30 12:20:50 1998  Brent Baccala  <baccala@freesoft.org>
8800
8801         * syms.c (ENABLE_CACHING): Define.
8802         (struct indexentry): Define.
8803         (struct stab_cache): Remove.
8804         (cmpindexentry): New static function.
8805         (struct stab_find_info): Add new fields: indextable,
8806         indextablesize, cached_indexentry, cached_offset, cached_stab, and
8807         cached_file_name.  Remove fields: file_cache, function_cache, and
8808         line_cache.
8809         (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
8810         index table and search it.
8811
8812 Mon Mar 30 10:39:34 1998  Ian Lance Taylor  <ian@cygnus.com>
8813
8814         * elf.c (_bfd_elf_copy_private_section_data): Call
8815         copy_private_bfd_data once we've seen the last SEC_ALLOC section.
8816
8817         * cpu-mips.c: Remove trailing comma at end of enumeration list.
8818
8819 Sat Mar 28 16:33:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8820
8821         * coff-arm.c: Define all globally visible variables and functions
8822         only when COFF_WITH_PE is not defined.
8823         * configure.in (armpe_little_vec, armpe_big_vec): Add
8824         coff-arm.lo.
8825         * configure: Rebuild.
8826
8827 Fri Mar 27 16:06:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8828
8829         Fix some gcc -Wall warnings:
8830         * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
8831         * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
8832         * archures.c (bfd_default_scan): Likewise.
8833         * bfd.c (bfd_scan_vma): Likewise.
8834         * binary.c (mangle_name): Likewise
8835         * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
8836         * coff-sh.c (sh_relocate_section): Likewise.
8837         * coff-stgo32.c (create_go32_stub): Likewise.
8838         * coffcode.h (coff_slurp_line_table): Likewise.
8839         * ecoff.c (_bfd_ecoff_write_armap): Likewise.
8840         * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
8841         (assign_file_positions_for_segments): Likewise.
8842         * elf32-mips.c (mips_elf_relocate_section): Likewise.
8843         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
8844         * oasys.c (oasys_write_sections): Likewise.
8845         * ppcboot.c (ppcboot_object_p): Likewise.
8846         (mangle_name): Likewise.
8847         * riscix.c (riscix_fix_pcrel_26): Likewise.
8848         * srec.c (srec_scan): Likewise.
8849         * stabs.c (_bfd_write_section_stabs): Likewise.
8850         * sunos.c (sunos_add_dynamic_symbols): Likewise.
8851         * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
8852         switch.  Declare parameters for function pointers.
8853         * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
8854         warning.
8855         * elf.c (elf_sort_sections): Likewise.
8856         * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
8857         Add default cases to switches.
8858         (coff_arm_relocate_section): Remove unused local variables.
8859         Always set rstat.
8860         (coff_arm_bfd_set_private_flags): Change flag variable to type
8861         flagword.
8862         * coff-mips.c (mips_relocate_section): Initialize use_lo.
8863         * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
8864         (dump_toc): Change cat to const, and initialize it.
8865         * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
8866         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8867         (sh_elf_relocate_section): Initialize r_symndx.
8868         * coffcode.h (coff_compute_section_file_positions): Only declare
8869         old_sofar if ALIGN_SECTIONS_IN_FILE.
8870         (coff_write_object_contents): Initialize csym.
8871         * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
8872         * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
8873         switch.
8874         * dwarf2.c: Include libiberty.h.
8875         (read_2_signed_bytes, read_4_signed_bytes): Comment out.
8876         (decode_line_info): Remove unused local variables.
8877         * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
8878         (m32r_elf_relocate_section): Likewise.
8879         * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
8880         (v850_elf_reloc): Likewise.
8881         * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
8882         (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
8883         * elf.c (assign_file_positions_for_segments): Always set adjust.
8884         * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr.  Fully
8885         parenthesize expression.
8886         * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
8887         (m32r_elf_object_p): Return a value.
8888         (m32r_elf_print_private_bfd_data): Change fprintf format string.
8889         * elf32-mips.c (mips_elf_final_link): Initialize last.
8890         (mips_elf_finish_dynamic_sections): Initialize last and dindx.
8891         * elf32-v850.c (v850_elf_object_p): Return a value.
8892         (v850_elf_print_private_bfd_data): Change fprintf format string.
8893         * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
8894         unsigned long.
8895         * elflink.h (elf_link_add_object_symbols): Change vernum to
8896         unsigned int, and initialize it.  Change fprintf format string.
8897         (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
8898         when setting or comparing to soname_indx.
8899         (elf_create_pointer_linker_section): Change num_symbols to
8900         unsigned int.
8901         * libcoff-in.h (coff_data_type): Change flags to flagword.
8902         * peicode.h (pe_print_idata): Initialize idx.  Change j to
8903         bfd_size_type.  Initialize hint_member.  Remove useless test to
8904         time_stamp.
8905         (pe_print_edata): Change num_functions and num_names in struct
8906         EDT_type to unsigned long.  Remove cast.  Change fprintf format
8907         string.
8908         * ppcboot.c (ppcboot_object_p): Change i to size_t.
8909         * reloc.c (bfd_get_reloc_size): Change return type to unsigned
8910         int.
8911         * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
8912         int *.  Update uses.  Change j to long.
8913         * bfd-in2.h, libcoff.h: Rebuild.
8914
8915 Fri Mar 27 10:10:46 1998  Catherine Moore <clm@cygnus.com>
8916
8917         * elf32-v850.c Remove definition of USE_REL.
8918         (v850_elf_info_to_howto_rela): New function.
8919         (v850_elf_perform_relocation):  Renamed from
8920         v850_elf_store_addend_in_insn.  Removed replace argument.
8921         (v850_elf_reloc): store the relocation in the addend field instead
8922         of the insn.
8923         (v850_elf_final_link_relocate):  Now calls
8924         v850_elf_perform_relocation.
8925         (v850_elf_relocate_section):  Remove code to generate REL
8926         relocations.
8927
8928 Thu Mar 26 13:32:17 1998  Ian Lance Taylor  <ian@cygnus.com>
8929
8930         * coffcode.h (coff_new_section_hook): Set the type and storage
8931         class in the native symbol information allocated for a new section
8932         symbol.
8933
8934 Thu Mar 26 10:13:41 1998  Nick Clifton  <nickc@cygnus.com>
8935
8936         * peicode.h: Chain together calls to
8937         coff_bfd_copy_private_bfd_data and
8938         coff_bfd_print_private_bfd_data.
8939
8940         * coff-arm.c: Add prototypes for
8941         coff_arm_bfd_print_private_bfd_data and
8942         coff_arm_bfd_copy_private_bfd_data.
8943
8944 Wed Mar 25 15:45:55 1998  Nick Clifton  <nickc@cygnus.com>
8945
8946         * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
8947         build.
8948
8949         * peicode.h: Call arm-coff private data functions after handling
8950         pe private data.
8951
8952         * coff-arm.c: Turn statics into globals so that they can be shared
8953         both pe and pei backends.
8954
8955 Wed Mar 25 15:19:38 1998  Ian Lance Taylor  <ian@cygnus.com>
8956
8957         * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
8958         plain numbers.
8959         (sunos_write_object_contents): Likewise.
8960         * aoutx.h (NAME(aout,machine_type)): Likewise.
8961         * coffcode.h (coff_set_arch_mach_hook): Likewise.
8962
8963 Wed Mar 25 13:59:24 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8964
8965         * archures.c (bfd_mach_m68*): Add definitions for various m68k
8966         variants.
8967         (bfd_default_scan): Remove m68k special cases.
8968         * bfd-in2.h: Rebuild.
8969         * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
8970         than plain numbers.
8971         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
8972         * cpu-m68k.c (arch_info_struct): Likewise.  Add entry for
8973         m68k:68000.
8974         (bfd_m68k_arch): Set mach field to zero to signal no explicit
8975         selection, change printable_name to just "m68k" and make that the
8976         default instead of m68k:68020.
8977
8978         * aout-tic30.c (NAME): Define this to avoid multiple definitions
8979         from aoutx.h.
8980         (MY_get_section_contents): Define as aout_32_get_section_contents
8981         rather than NAME(aout,get_section_contents).
8982
8983         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
8984
8985         * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
8986         and call bfd_default_set_arch_mach to do the real work.
8987
8988 Wed Mar 25 10:41:35 1998  Richard Henderson  <rth@cygnus.com>
8989
8990         * bout.c (BALX): Include return register g14 as part of the insn.
8991         (BALX_MASK): New.
8992         (calljx_callback): Use it.
8993
8994 Wed Mar 25 11:19:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8995
8996         * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
8997         * libbfd.h: Rebuild.
8998
8999         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
9000         byte_count to unsigned int.
9001         (mn10300_elf_relax_section): Initialize internal_relocs.  Remove
9002         unused local variables.
9003
9004         * evax-alpha.c (evax_close_and_cleanup): Remove unused local
9005         variables er and er1.
9006
9007         * cpu-v850.c: Include <ctype.h>.
9008         (scan): Case isdigit argument to unsigned char.
9009
9010         From Yan Meroth <YAN.MEROTH@st.com>:
9011         * ihex.c (ihex_scan): Add extbase variable so that getting an
9012         extended linear address record does not ignore any previous
9013         extended address.
9014         (ihex_write_object_contents): When writing out an extended linear
9015         address record, zero out any previous extended address.
9016
9017 Tue Mar 24 16:09:43 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9018
9019         * ieee.c (do_one): Check section before dereferencing it.
9020         (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
9021         (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
9022
9023 Mon Mar 23 18:51:47 1998  Joel Sherrill  <joel@OARcorp.com>
9024
9025         * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
9026
9027 Mon Mar 23 14:23:36 1998  Nick Clifton  <nickc@cygnus.com>
9028
9029         * coff-arm.c: Add interworking functions to pe backends.
9030
9031 Fri Mar 20 18:47:20 1998  Ian Lance Taylor  <ian@cygnus.com>
9032
9033         * configure.in: Use AM_DISABLE_SHARED.
9034         * aclocal.m4, configure: Rebuild with libtool 1.2.
9035
9036 Fri Mar 20 11:25:41 1998  Nick Clifton  <nickc@cygnus.com>
9037
9038         * coff-arm.c (coff_arm_relocate_section): Better error messages
9039         when interowrking conflucts occur.  Courtesy of Jonathan Walton
9040         and Tony Thompson.
9041         (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
9042         relocations.  Patch courtesy of Jonathan Walton and Tony
9043         Thompson.
9044
9045 Fri Mar 20 02:26:43 1998  Richard Henderson  <rth@cygnus.com>
9046
9047         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
9048         part of Feb 22 change controling when to override the existing
9049         symbol with the .plt entry.
9050
9051 Wed Mar 18 09:26:25 1998  Nick Clifton  <nickc@cygnus.com>
9052
9053         * config.bfd (targ_cpu): Add thumb-pe target.
9054
9055         * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
9056         functions in PE build.
9057
9058 Sun Mar  8 23:37:26 1998  Stan Cox  <scox@equinox.cygnus.com>
9059
9060         * config.bfd (sparclite-*-elf*): Added.
9061
9062 Mon Feb 23 19:31:19 1998  Ian Lance Taylor  <ian@cygnus.com>
9063
9064         * configure.in: Add elf.lo to elf shell variable.
9065         * Makefile.am (BFD_LIBS): Remove elf.lo.
9066         (BFD_LIBS_CFILES): Remove elf.c.
9067         (BFD32_BACKENDS): Add elf.lo.
9068         (BFD32_BACKENDS_CFILES): Add elf.c.
9069         * configure, Makefile.in: Rebuild.
9070
9071 1998-02-23 15:53  Richard Henderson  <rth@cygnus.com>
9072
9073         * elf32-i386.c (elf_i386_relocate_section): A pc-relative
9074         relocation against a non-local symbol should not have a dynamic
9075         relocation.
9076
9077 Mon Feb 23 16:17:08 1998  Ian Lance Taylor  <ian@cygnus.com>
9078
9079         * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
9080         COFF filehdr flags.
9081         (pe_print_private_bfd_data): Print PE flags.  From Mikey
9082         <jeffdb@netzone.com>.
9083
9084 Sun Feb 22 20:39:00 1998  Richard Henderson  <rth@cygnus.com>
9085
9086         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
9087         a plt entry when we can determine that we authoritatively define
9088         the symbol.
9089
9090 Sun Feb 22 20:33:05 1998  Richard Henderson  <rth@cygnus.com>
9091
9092         * configure.in (COREFILE selection): Remove sparc-*-linux*.  They
9093         don't actually use trad-core, but a SunOS-style core file handled
9094         by gdb directly.
9095         * hosts/sparclinux.h: Remove.
9096
9097 Wed Feb 18 15:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
9098
9099         * peicode.h (pe_print_idata): If there is no .idata section, look
9100         for the import tables in some other section.  Make the initial
9101         label line up better with the data.  Print the import address
9102         table even if there is no import name table.  If the import
9103         address table holds actual addresses, print them.
9104
9105 Tue Feb 17 12:58:34 1998  Ian Lance Taylor  <ian@cygnus.com>
9106
9107         * libbfd.c (bfd_seek): If fseek fails, save errno around call to
9108         bfd_tell.  If errno is EINVAL, set bfd_error_file_truncated, not
9109         bfd_error_system_call.
9110
9111 Fri Feb 13 13:11:33 1998  Ian Lance Taylor  <ian@cygnus.com>
9112
9113         * Makefile.am (AUTOMAKE_OPTIONS): Define.
9114         * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
9115
9116         From H.J. Lu <hjl@gnu.org>:
9117         * Makefile.am (libbfd_la_LDFLAGS): Define.
9118         * Makefile.in: Rebuild.
9119
9120 Thu Feb 12 17:31:11 1998  Ian Lance Taylor  <ian@cygnus.com>
9121
9122         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
9123         * netbsd.h (MACHTYPE_OK): Define.
9124         (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
9125         calling N_SET_MACHTYPE, rather than having a switch.
9126         * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
9127         and M_ALPHA_NETBSD.
9128         * i386netbsd.c (MACHTYPE_OK): Don't define.
9129         (DEFAULT_MID): Define.
9130         * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
9131         (MACHTYPE_OK): Don't define.
9132         (DEFAULT_MID): Define.
9133         * m68knetbsd.c: (MACHTYPE_OK): Don't define.
9134         (DEFAULT_MID): Define.
9135         * ns32knetbsd.c (MACHTYPE_OK): Don't define.
9136         (DEFAULT_MID): Define.
9137         * sparcnetbsd.c (MACHTYPE_OK): Don't define.
9138         (DEFAULT_MID): Define.
9139
9140         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
9141         * vaxnetbsd.c: New file.
9142         * netbsd-core.c: Clean up.  Remove unused macros.  Use netbsd
9143         rather than netbsd_core.
9144         * targets.c (vaxnetbsd_vec): Declare.
9145         (bfd_target_vector): Add vaxnetbsd_vec.  If NETBSD_CORE is
9146         defined, add netbsd_core_vec.
9147         * configure.in: Set COREFILE for alpha*-*-netbsd* and
9148         powerpc-*-netbsd* to netbsd-core.lo.  If COREFILE is
9149         netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
9150         * config.bfd (alpha*-*-netbsd*): New target.
9151         * Makefile.am: Rebuild dependencies.
9152         (BFD32_BACKENDS): Add vaxnetbsd.lo.
9153         (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
9154         * configure, Makefile.in: Rebuild.
9155
9156         * configure.host: Remove the old shared library build stuff.  We
9157         now use libtool instead.
9158
9159 Wed Feb 11 17:13:09 1998  Richard Henderson  <rth@cygnus.com>
9160
9161         * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
9162
9163 Tue Feb 10 19:23:28 1998  H.J. Lu  <hjl@gnu.org>
9164
9165         * configure.in: Take stab-syms.lo out of sparclinux_vec list.
9166         * configure: Rebuild.
9167
9168 Tue Feb 10 15:16:38 1998  Nick Clifton  <nickc@cygnus.com>
9169         * elf32-v850.c (remember_hi16s_reloc): New function.
9170         (find_remembered_hi16s_reloc): New function.
9171         (v850_elf_store_addend_in_insn): Use the above new functions to
9172         match up HI6S relocs with LO16 relocs.
9173
9174 Tue Feb 10 15:01:39 1998  Ian Lance Taylor  <ian@cygnus.com>
9175
9176         * configure.in: Change -linux* to -linux-gnu*.
9177         * config.bfd, configure.host: Likewise.
9178         * configure: Rebuild.
9179
9180 Mon Feb  9 19:40:59 1998  Nick Clifton  <nickc@cygnus.com>
9181
9182         * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
9183         LO16/HI16S bug and improve comments about what is going on.
9184
9185 Sat Feb  7 15:27:03 1998  Ian Lance Taylor  <ian@cygnus.com>
9186
9187         * configure, aclocal.m4: Rebuild with new libtool.
9188
9189 Fri Feb  6 14:48:20 1998  Nick Clifton  <nickc@cygnus.com>
9190
9191         * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
9192         when merging v850 code into v850e/v850ea code.  Do not initialise
9193         output flags if the input is the default architecture.
9194
9195 Fri Feb  6 11:50:22 1998  Jeffrey A Law  (law@cygnus.com)
9196
9197         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
9198         get the size from bfd_arch_bits_per_address instead of directly
9199         from the isa.
9200
9201 Thu Feb  5 14:21:34 1998  Michael Meissner  <meissner@cygnus.com>
9202
9203         * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
9204         to wrap, just return all 1's bits instead.
9205         * libbfd.h: Regenerate.
9206
9207 Thu Feb  5 11:51:05 1998  Ian Lance Taylor  <ian@cygnus.com>
9208
9209         * coff-i386.c (coff_pe_i386_relocate_section): New static function
9210         if COFF_WITH_PE.
9211         (coff_relocate_section): If COFF_WITH_PE, define as
9212         coff_pe_i386_relocate_section.
9213         * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
9214         skip empty sections, to match coff_write_object_contents.
9215
9216         * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
9217         rather than swapping out r_offset twice.  From Luke Deller
9218         <luked@cse.unsw.edu.au>.
9219
9220 Wed Feb  4 19:11:28 1998  Ian Lance Taylor  <ian@cygnus.com>
9221
9222         * configure.in: Set libtool_enable_shared rather than
9223         libtool_shared.  Remove diversion hack.
9224         * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
9225         with new libtool.
9226
9227 Wed Feb  4 16:10:21 1998  Brent Baccala  <baccala@freesoft.org>
9228
9229         * syms.c (struct stab_cache): Define.
9230         (struct stab_find_info): Remove cached_offset, cached_stab,
9231         cached_str, and cached_stroff fields.  Add file_cache,
9232         function_cache, and line_cache fields.
9233         (_bfd_stab_section_find_nearest_line): Use extensive caching to
9234         speed up searches.
9235
9236 Wed Feb  4 13:34:22 1998  Ian Lance Taylor  <ian@cygnus.com>
9237
9238         * peicode.h (pe_print_idata): Check for import of ordinal rather
9239         than name.
9240         (pe_print_edata): If there is no .edata section, look for the
9241         export data in some other section.
9242
9243 Mon Feb  2 20:05:42 1998  Jason Molenda  (crash@bugshack.cygnus.com)
9244
9245         * configure.in: Change version to 2.8.4.
9246         * configure: Regenerated.
9247
9248 Mon Feb  2 17:39:39 1998  Steve Haworth  <steve@pm.cse.rmit.EDU.AU>
9249
9250         Add tms320c30 support:
9251         * cpu-tic30.c: New file.
9252         * aout-tic30.c: New file.
9253         * coff-tic30.c: New file.
9254         * archures.c (bfd_arch_tic30): Define.
9255         (bfd_tic30_arch): Declare.
9256         (bfd_archures_list): Add bfd_tic30_arch.
9257         * targets.c (bfd_target_vector): Add tic30_aout_vec and
9258         tic30_coff_vec.
9259         * reloc.c (BFD_RELOC_TIC30_LDP): Define.
9260         * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
9261         (coff_set_flags): Likewise.
9262         * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
9263         * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
9264         * Makefile.am: Rebuild dependencies.
9265         (ALL_MACHINES): Add cpu-tic30.lo.
9266         (ALL_MACHINES_CFILES): Add cpu-tic30.c.
9267         (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
9268         (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
9269         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
9270
9271 Mon Feb  2 12:25:12 1998  Nick Clifton  <nickc@cygnus.com>
9272
9273         * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
9274         to lag behind LO16 reloc by a couple of instructions.
9275
9276 Mon Feb  2 14:09:46 1998  Ian Lance Taylor  <ian@cygnus.com>
9277
9278         * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
9279         make to reexamine the file timestamp.
9280         ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
9281
9282         * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
9283         0x100000.
9284
9285 Fri Jan 30 19:07:07 1998  Geoff Keating  <geoffk@ozemail.com.au>
9286
9287         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
9288         to create .dynsbss and .rela.sbss sections.
9289         (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
9290         copied from dynamic objects into .sbss.
9291         (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
9292         use it.  Correct typo of .rela.sdata2.
9293         (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
9294         put the data, which may now be in .sbss.
9295         (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
9296         (elf_backend_create_dynamic_sections): Define as
9297         ppc_elf_create_dynamic_sections.
9298
9299         * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
9300         against _GLOBAL_OFFSET_TABLE_.
9301         (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
9302         shared libraries which refer to local symbols.  Make sure that the
9303         test for allocating space for a reloc in a shared object is the
9304         same as the test for emitting a reloc.
9305
9306 Thu Jan 29 15:55:35 1998  J.J. van der Heijden  <J.J.vanderHeijden@student.utwente.nl>
9307
9308         * config.bfd (i[3456]-*-mingw32*): New target.
9309         * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
9310         * aclocal.m4, configure: Rebuild.
9311
9312 Wed Jan 28 13:41:26 1998  Ian Lance Taylor  <ian@cygnus.com>
9313
9314         * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
9315         have a bfd_object.
9316
9317 Tue Jan 27 21:43:55 1998  Richard Henderson  <rth@cygnus.com>
9318
9319         Sparc v9 ABI compliant PLT:
9320         * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
9321         (plt_templates, sparc64_elf_build_plt_entry): Delete.
9322         (LARGE_PLT_THRESHOLD): New define.
9323         (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
9324         (sparc64_elf_build_plt): New function.
9325         (sparc64_elf_plt_entry_offset): Likewise.
9326         (sparc64_elf_plt_ptr_offset): Likewise.
9327         (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
9328         contain the index for convenience.  Skip the initial entries
9329         in .rela.plt.
9330         (sparc64_elf_size_dynamic_sections): Zero the allocated contents
9331         memory for the benefit of .rela.plt.
9332         (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
9333         (sparc64_elf_finish_dynamic_symbol): Kill template stuff.  Use
9334         sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
9335         (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
9336         Call sparc64_elf_build_plt.
9337         (elf_backend_want_got_plt): No.
9338         (elf_backend_plt_readonly): No.
9339         (elf_backend_plt_alignment): 8.
9340
9341         * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
9342         * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
9343         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
9344         to be called.
9345
9346 Tue Jan 27 21:45:15 1998  Jeffrey A Law  (law@cygnus.com)
9347
9348         * archures.c (bfd_mach_mips*): Add definitions for various MIPS
9349         processors.
9350         * cpu-mips.c (arch_info_struct): Add mips variants.
9351         * bfd-in2.h: Rebuilt.
9352
9353 Tue Jan 27 15:06:04 1998  Nick Clifton  <nickc@cygnus.com>
9354
9355         * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
9356         t2a3_b_insn.
9357
9358 Tue Jan 27 12:47:27 1998  Robert Lipe  <robertl@dgii.com>
9359
9360         * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
9361         (i[3456]86sco3.2v5*coff): New target.
9362
9363 Mon Jan 26 15:41:30 1998  Ian Lance Taylor  <ian@cygnus.com>
9364
9365         * bfd-in2.h: Rebuild with changes to chew--tab expansion.
9366
9367 Thu Jan 22 21:26:48 1998  Richard Henderson  <rth@cygnus.com>
9368
9369         * bfd.c (bfd_get_error_handler): Add orthogonal function.
9370         * bfd-in2.h: Regenerate.
9371
9372 Thu Jan 22 21:13:39 1998  Richard Henderson  <rth@cygnus.com>
9373
9374         * tekhex.c (tekhex_write_object_contents): Check for no symbols.
9375
9376 Wed Jan 21 21:19:03 1998  Ian Lance Taylor  <ian@cygnus.com>
9377
9378         * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
9379         adjust addend for an output common symbol (from Jimmy Blair
9380         <jimmyb@wrs.com>).  If COFF_WITH_PE, adjust addend for PC relative
9381         defined symbol to counteract adjustment made in generic relocation
9382         code.
9383
9384         * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
9385
9386 Wed Jan 21 21:16:06 1998  Manfred Hollstein  <manfred@s-direktnet.de>
9387
9388         * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
9389         (GET_SCNDHR_NLNNO): Likewise.
9390
9391 Mon Jan 19 12:49:52 1998  Ian Lance Taylor  <ian@cygnus.com>
9392
9393         * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
9394
9395 Wed Jan 14 17:23:27 1998  Nick Clifton  <nickc@cygnus.com>
9396
9397         * elf32-m32r.c: Add macros to handle NOP insertion.
9398
9399 Wed Jan 14 16:15:22 1998  Richard Henderson  <rth@cygnus.com>
9400
9401         * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
9402         (xcoff_mark): Likewise.
9403         (xcoff_build_ldsyms): Mark absolute symbols.
9404
9405 Wed Jan 14 16:03:11 1998  Richard Henderson  <rth@cygnus.com>
9406
9407         * bout.c (b_out_write_object_contents): Sort symbols before output
9408         to keep {CALL,BAL}NAME symbols adjacent.
9409         (b_out_symbol_cmp): New function.
9410
9411 For older changes see ChangeLog-9697
9412 \f
9413 Local Variables:
9414 mode: change-log
9415 left-margin: 8
9416 fill-column: 74
9417 version-control: never
9418 End: