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