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