* elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
[external/binutils.git] / bfd / ChangeLog
1 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2
3         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4
5 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
6
7         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
8         (sparc64_elf_relocate_section): Likewise.
9
10 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
11
12         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
13         similar to R_SPARC_32.
14         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
15
16 2001-02-08  H.J. Lu  <hjl@gnu.org>
17
18         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
19         relocation entries for weak definitions when building DSO with
20         -Bsymbolic.
21
22 2001-02-08  Richard Henderson  <rth@redhat.com>
23
24         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
25         before visibility.  Locally defined protected symbols are not
26         dynamic.
27
28 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
29
30         * config.bfd: Enable coff64 for rs6000-*.  Patch from
31         <hzoli@austin.ibm.com>.
32
33 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
34
35         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
36         found, do not attempt to find dwarf2 info before returning.
37
38 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
39
40         * elflink.h (is_global_symbol_definition): Rename to
41         is_global_data_symbol_definition and have it reject function
42         symbols.
43         (elf_link_is_defined_archive_symbol): Use renamed function.
44
45 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
46
47         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
48         * libbfd.h (bfd_target_vector): Likewise.
49         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
50         make static; create pointer reference named bfd_target_vector.
51         (_bfd_target_vector_entries): Calculate this based on the array
52         typed _bfd_target_vector.
53
54 2001-02-06  H.J. Lu  <hjl@gnu.org>
55
56         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
57         internal symbols are not dynamic.
58         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
59
60 2001-02-06  Nick Clifton  <nickc@redhat.com>
61
62         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
63         that it will not be pulled into the list of files that make up
64         po/POTFILES.in.
65         * Makefile.in: Regenerate.
66         * po/bfd.pot:  Regenerate.
67
68 2001-02-06  H.J. Lu  <hjl@gnu.org>
69
70         * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
71         checking.
72         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
73         external_PEI_IMAGE_hdr.
74
75 2001-02-06  Kazu Hirata  <kazu@hxi.com>
76
77         * elf-m10200.c: Fix formatting.
78
79 2001-02-04  Nick Clifton  <nickc@redhat.com>
80
81         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
82         rel, it will be handled later on.
83
84 2001-02-02  Fred Fish  <fnf@ninemoons.com>
85
86         * Makefile.in: Fix typo.
87
88 2001-02-01  Kazu Hirata  <kazu@hxi.com>
89
90         * elf-m10300.c: Fix formatting.
91
92 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
93
94         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
95         (elf_backend_get_symbol_type): Define.
96         (elf64_hppa_object_p): Set architecture and machine from elf
97         header flags.
98
99 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
100
101         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
102         before mdebug.
103
104 2001-01-26  Richard Henderson  <rth@redhat.com>
105
106         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
107         for non-default visibility.
108         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
109         delete ugly macro and replace with pretty function.
110
111 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
112
113         * coff-go32.c: Update copyright.
114         * coff-stgo32.c: Likewise.
115         * coff-go32.c (COFF_LONG_FILENAMES): Define.
116         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
117         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
118         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
119
120 2001-01-25  Kazu Hirata  <kazu@hxi.com>
121
122         * bfd-in2.h: Rebuild.
123         * libbfd.h: Likewise.
124
125 2001-01-23  H.J. Lu  <hjl@gnu.org>
126
127         * bfd-in2.h: Rebuild.
128
129 2001-01-23  H.J. Lu  <hjl@gnu.org>
130
131         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
132         is NULL or PRIV(vms_rec) is outside of the buffer.
133
134 2001-01-23  Kazu Hirata  <kazu@hxi.com>
135
136         * coff64-rs6000.c: Fix formatting.
137         * coff-arm.c: Likewise.
138         * coffgen.c: Likewise.
139         * cofflink.c: Likewise.
140         * coff-mcore.c: Likewise.
141         * coff-mips.c: Likewise.
142         * coff-pmac.c: Likewise.
143         * coff-ppc.c: Likewise.
144         * coff-rs6000.c: Likewise.
145         * elf32.c: Likewise.
146         * elf32-fr30.c: Likewise.
147         * elf32-i370.c: Likewise.
148         * elf32-i860.c: Likewise.
149         * elf32-m32r.c: Likewise.
150         * elf32-m68k.c: Likewise.
151         * elf32-mcore.c: Likewise.
152         * elf32-ppc.c: Likewise.
153         * elf32-sh.c: Likewise.
154         * elf32-v850.c: Likewise.
155         * elf64-alpha.c: Likewise.
156         * elf64-sparc.c: Likewise.
157         * elflink.c: Likewise.
158         * elflink.h: Likewise.
159         * elf-m10200.c: Likewise.
160         * elf-m10300.c: Likewise.
161         * elfxx-ia64.c: Likewise.
162
163         * aoutx.h: Fix formatting.
164         * bfd.c: Likewise.
165         * bfd-in2.h: Likewise.
166         * bfd-in.h: Likewise.
167         * cpu-i386.c: Likewise.
168         * cpu-m68hc11.c: Likewise.
169         * dwarf2.c: Likewise.
170         * elf64-x86-64.c: Likewise.
171         * format.c: Likewise.
172         * freebsd.h: Likewise.
173         * hash.c: Likewise.
174         * hp300hpux.c: Likewise.
175         * hppabsd-core.c: Likewise.
176         * hpux-core.c: Likewise.
177
178 2001-01-22  Bo Thorsen  <bo@suse.de>
179
180         * elf64-x86-64.c: Added PIC support for X86-64.
181         (elf64_x86_64_link_hash_newfunc): Function added.
182         (elf64_x86_64_link_hash_table_create): Likewise.
183         (elf64_x86_64_check_relocs): Likewise.
184         (elf64_x86_64_gc_mark_hook): Likewise.
185         (elf64_x86_64_gc_sweep_hook): Likewise.
186         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
187         (elf64_x86_64_size_dynamic_sections): Likewise.
188         (elf64_x86_64_discard_copies): Likewise.
189         (elf64_x86_64_finish_dynamic_symbol): Likewise.
190         (elf64_x86_64_finish_dynamic_sections): Likewise.
191         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
192
193 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
194
195         * Makefile.am (install-data-local): Make use of $(DESTDIR).
196         * Makefile.in: Regenerate.
197
198 2001-01-21  Kazu Hirata  <kazu@hxi.com>
199
200         * coff-a29k.c: Fix formatting.
201
202 2001-01-19  H.J. Lu  <hjl@gnu.org>
203
204         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
205         relocation section names.
206         (elf_i386_relocate_section): Report files with bad relocation
207         section names and return false.
208
209 2001-01-17  Bo Thorsen  <bo@suse.de>
210
211         * targets.c: Alphabetize list of xvecs.
212
213 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
214
215         * config.bfd: Add linux target variant for elfxx-hppa.
216         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
217         bfd_elf64_hppa_linux_vec.
218         * configure: Regenerate.
219         * elf64-hppa.c: Include elf64-target.h again to support linux
220         target variant.
221         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
222         * elf32-hppa.c: Include elf32-target.h again to support linux
223         target variant.
224         (elf32_hppa_post_process_headers): New function.
225         (elf_backend_post_process_headers): Define.
226         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
227         bfd_elf32_hppa_linux_vec.
228
229         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
230         and data_segment_base fields.
231         (elf32_hppa_link_hash_table_create ): Init them.
232         (elf32_hppa_check_relocs): Update comments.
233         (hppa_record_segment_addr): New function.
234         (elf32_hppa_relocate_section): Call it.
235         (final_link_relocate): Handle R_PARISC_SEGREL32.
236         (elf32_hppa_final_link): New function.
237         (bfd_elf32_bfd_final_link): Define to call it.
238         (hppa_unwind_entry_compare): New function.
239         * cache.c (bfd_open_file): Create files in write+read mode.
240
241         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
242         SEGREL32 and numerous other relocs.  Change duplicate
243         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
244
245         * opncls.c (bfd_fdopenr): Add parens like the comment says around
246         O_ACCMODE.
247
248         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
249         .plt entries for DT_INIT and DT_FINI.
250         (elf32_hppa_finish_dynamic_sections): Remove special handling of
251         DT_INIT and DT_FINI.
252
253         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
254         offsets for stub .plt access if wide mode.  Check offset in range.
255
256 2001-01-13  Nick Clifton  <nickc@redhat.com>
257
258         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
259         line.
260
261         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
262         line.
263
264 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
265
266         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
267         * configure: Regenerate.
268
269 2001-01-11  Peter Targett  <peter.targett@arccores.com>
270
271         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
272         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
273         * cpu-arc.c (arch_info_struct): Add entries for variants.
274         (bfd_arc_arch) Set default to bfd_mach_arc_5.
275         (arc_get_mach) Don't assume machine names prefixed arc- before
276         testing.
277         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
278         selections.
279         (arc_elf_final_write_processing) Likewise.
280         (ELF_MACHINE_CODE) Use EM_ARC.
281
282 2001-01-10  Nick Clifton  <nickc@redhat.com>
283
284         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
285
286 2001-01-07  Philip Blundell  <philb@gnu.org>
287
288         * README: Replace `bug-gnu-utils@gnu.org' with
289         `bug-binutils@gnu.org'.
290
291 2001-01-04  Kazu Hirata  <kazu@hxi.com>
292
293         * som.c: Fix formatting.
294
295 2001-01-03  Kazu Hirata  <kazu@hxi.com>
296
297         * ecoffswap.h: Fix formatting.
298         * elf-bfd.h: Likewise.
299         * elfarm-nabi.c: Likewise.
300         * elfarm-oabi.c: Likewise.
301         * elfcode.h: Likewise.
302         * elfcore.h: Likewise.
303         * elflink.c: Likewise.
304         * elflink.h: Likewise.
305         * elfxx-ia64.c: Likewise.
306         * elfxx-target.h: Likewise.
307         * libbfd.c: Likewise
308         * linker.c: Likewise.
309         * lynx-core.c: Likewise.
310
311 2001-01-02  Kazu Hirata  <kazu@hxi.com>
312
313         * pc532-mach.c: Fix formatting.
314         * pe-arm.c: Likewise.
315         * pe-i386.c: Likewise.
316         * pe-mips.c: Likewise.
317         * pe-ppc.c: Likewise.
318         * pe-sh.c: Likewise.
319         * pei-mips.c: Likewise.
320         * pei-sh.c: Likewise.
321         * peicode.h: Likewise.
322         * ppcboot.c: Likewise.
323         * ptrace-core.c: Likewise.
324
325 2001-01-01  Kazu Hirata  <kazu@hxi.com>
326
327         * reloc.c: Fix formatting.
328         * riscix.c: Likewise.
329         * rs6000-core.c: Likewise.
330         * xcoff-target.h: Likewise.
331
332 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
333
334         * elfcode.h (elf_object_p): Also restore the bfd mach field on
335         error, by calling bfd_default_set_arch_mach with incoming
336         values.
337
338 2000-12-26  Kazu Hirata  <kazu@hxi.com>
339
340         * vaxnetbsd.c: Fix formatting.
341         * versados.c: Likewise.
342         * vms-gsd.c: Likewise.
343         * vms-hdr.c: Likewise.
344         * vms-misc.c: Likewise.
345
346 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
347
348         * archive.c (coff_write_armap): Don't write more than symbol_count
349         `archive_member_file_ptr's.
350
351 2000-12-25  Kazu Hirata  <kazu@hxi.com>
352
353         * vms-tir.c: Fix formatting.
354
355 2000-12-23  Kazu Hirata  <kazu@hxi.com>
356
357         * vms.c: Fix formatting.
358         * vms.h: Likewise.
359
360 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
361
362         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
363
364         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
365
366         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
367         arithmetic.
368
369         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
370
371         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
372
373 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
374
375         * libbfd.c (bfd_get_bits): Added
376         (bfd_put_bits): Likewise
377         * bfd-in.h: Declared the above.
378         * bfd-in2.h: Regenerated.
379
380 2000-12-20  Kazu Hirata  <kazu@hxi.com>
381
382         * targets.c: Fix formatting.
383         * tekhex.c: Likewise.
384         * trad-core.c: Likewise.
385
386 2000-12-19  Kazu Hirata  <kazu@hxi.com>
387
388         * sco5-core.c: Fix formatting.
389         * section.c: Likewise.
390         * sparclinux.c: Likewise.
391         * sparclynx.c: Likewise.
392         * sparcnetbsd.c: Likewise.
393         * srec.c: Likewise.
394         * stabs.c: Likewise.
395         * stab-syms.c: Likewise.
396         * sunos.c: Likewise.
397         * syms.c: Likewise.
398         * sysdep.h: Likewise.
399
400 2000-12-18  Nick Clifton  <nickc@redhat.com>
401
402         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
403         defined.
404         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
405         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
406
407 2000-12-18  Nick Clifton  <nickc@redhat.com>
408
409         * vms-misc.c (_bfd_vms_get_record): Add default case to
410         file_format switch.
411
412 2000-12-15  Miloslav Trmac <mitr@volny.cz>
413
414         * elfcore.h (elf_core_file_p): Move to the start of the program
415         headers before attempting to read them.
416
417 2000-12-14  Kazu Hirata  <kazu@hxi.com>
418
419         * peigen.c: Fix formatting.
420         * som.c: Likewise.
421         * som.h: Likewise.
422
423 2000-12-13  Kazu Hirata  <kazu@hxi.com>
424
425         * peigen.c: Fix formatting.
426
427 2000-12-12  Jim Wilson  <wilson@redhat.com>
428
429         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
430
431 2000-12-08  Mark Salter  <msalter@redhat.com>
432
433         * binary.c (binary_set_section_contents): Ignore sections
434         with zero size.
435
436 2000-12-12  Kazu Hirata  <kazu@hxi.com>
437
438         * m68klinux.c: Fix formatting.
439         * m68knetbsd.c: Likewise.
440         * mipsbsd.c: Likewise.
441         * netbsd-core.c: Likewise.
442         * netbsd.h: Likewise.
443         * newsos3.c: Likewise.
444         * nlm32-alpha.c: Likewise.
445         * nlm32-i386.c: Likewise.
446         * nlm32-ppc.c: Likewise.
447         * nlm32-sparc.c: Likewise.
448         * nlmcode.h: Likewise.
449         * nlmswap.h: Likewise.
450         * nlm-target.h: Likewise.
451         * ns32knetbsd.c: Likewise.
452
453 2000-12-10  Fred Fish  <fnf@be.com>
454
455         * elflink.h (elf_link_output_extsym): Don't complain about undefined
456         symbols in shared objects if allow_shlib_undefined is true.
457
458 2000-12-12  Nick Clifton  <nickc@redhat.com>
459
460         * cpu-sh.c: Fix formattng.
461         * elf.c: Fix formattng.
462         * elf32-mips.c: Fix formattng.
463         * elf32-sh.c: Fix formattng.
464         * elf64-alpha.c: Fix formattng.
465
466 2000-12-09  Nick Clifton  <nickc@redhat.com>
467
468         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
469         dwarf2_find_line_info as last parameter to invocation of
470         _bfd_dwarf2_find_nearest_line.
471         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
472         dwarf2_find_line_info as last parameter to invocation of
473         _bfd_dwarf2_find_nearest_line.
474
475 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
476
477         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
478         (BFD_LIBS): ...to here.
479         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
480         (BFD_LIBS_CFILES): ...to here.
481         * Makefile.in: Regenerate.
482         * configure.in: Remove dwarf.lo from the elf shell variable.
483         * configure: Regenerate.
484         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
485         * libcoff.h: Regenerate.
486         * coffgen.c (coff_find_nearest_line): Call
487         _bfd_dwarf2_find_nearest_line.
488         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
489         accordingly.
490         (read_abbrevs): Likewise
491         (decode_line_info): Likewise.
492         (parse_comp_unit): Likewise.
493         (comp_unit_find_nearest_line): Likewise.
494         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
495         * libbfd.h: Regenerate.
496         * elf.c (_bfd_elf_find_nearest_line): Update call.
497         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
498         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
499         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
500         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
501         (styp_to_sec_flags): Handle DWARF2 sections.
502         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
503         to _bfd_find_nearest_line.
504         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
505         call to _bfd_find_nearest_line.
506
507 2000-12-08  Kazu Hirata  <kazu@hxi.com>
508
509         * coffgen.c: Fix formatting.
510         * elf-m10300.c: Likewise.
511         * elf32-i386.c: Likewise.
512         * elf32-i960.c: Likewise.
513         * elf32-m68k.c: Likewise.
514         * elf32-mcore.c: Likewise.
515         * elf32-ppc.c: Likewise.
516         * elf32-sh.c: Likewise.
517         * elf32-sparc.c: Likewise.
518         * elf32-v850.c: Likewise.
519         * elf64-alpha.c: Likewise.
520         * elf64-hppa.c: Likewise.
521         * elf64-mips.c: Likewise.
522         * elf64-sparc.c: Likewise.
523
524 2000-12-07  Kazu Hirata  <kazu@hxi.com>
525
526         * elf32-ppc.c: Fix formatting.
527         * elf64-x86-64.c: Likewise.
528
529 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
530
531         From  Ralf Baechle  <ralf@gnu.org>
532
533         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
534         BFDs containing no sections or empty .text, .data or .bss sections
535         to be merged, regardless of their flags.
536
537 2000-12-06  Kazu Hirata  <kazu@hxi.com>
538
539         * elf32-m32r.c: Fix formatting.
540         * elf32-m68hc11.c: Likewise.
541         * elf32-m68hc12.c: Likewise.
542         * elf32-m68k.c: Likewise.
543         * elf32-mcore.c: Likewise.
544         * elf32-pj.c: Likewise.
545         * elf32-ppc.c: Likewise.
546
547 2000-12-05  Kazu Hirata  <kazu@hxi.com>
548
549         * elf32-fr30.c: Fix formatting.
550         * elf32-hppa.c: Likewise.
551         * elf32-i370.c: Likewise.
552         * elf32-i386.c: Likewise.
553         * elf32-i860.c: Likewise.
554         * elf32-i960.c: Likewise.
555
556 2000-12-03  Kazu Hirata  <kazu@hxi.com>
557
558         * elf32-arm.h: Fix formatting.
559         * elf32-avr.c: Likewise.
560         * elf32-cris.c: Likewise.
561         * elf32-d10v.c: Likewise.
562         * elf32-d30v.c: Likewise.
563         * elf-hppa.h: Likewise.
564         * elf-m10200.c: Likewise.
565         * elf-m10300.c: Likewise.
566
567 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
568
569         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
570         bfd_mach_mips32_4k.  Update FIXME comment.
571         * archures.c (bfd_mach_mips32): New constant.
572         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
573         the latter, renumber it.
574         * bfd-in2.h (bfd_mach_mips32): New constant.
575         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
576         the latter, renumber it.
577         * cpu-mips.c (I_mips32): New constant.
578         (I_mips4K, I_mips32_4k): Rename the former to the latter.
579         (arch_info_struct): Add bfd_mach_mips32 entry, replace
580         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
581         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
582         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
583         with E_MIPS_MACH_MIPS32_4K.
584         (_bfd_mips_elf_final_write_processing): Replace
585         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
586         bfd_mach_mips32 case.
587         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
588         comparison with support for MIPS32.
589         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
590         MIPS32.
591
592         * aoutx.h (NAME(aout,machine_type)): Add cases for
593         bfd_mach_mips5 and bfd_mach_mips64.
594         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
595         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
596         * cpu_mips.c (I_mips5, I_mips64): New definitions.
597         (arch_info_struct): Add entries for bfd_mach_mips5 and
598         bfd_mach_mips64.
599         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
600         _bfd_mips_elf_print_private_bfd_data): Add cases for
601         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
602         (_bfd_mips_elf_final_write_processing): Add cases for
603         bfd_mach_mips5 and bfd_mach_mips64.
604
605         * bfd/aoutx.h (NAME(aout,machine_type)): Add a
606         bfd_mach_mips_sb1 case.
607         * bfd/archures.c (bfd_mach_mips_sb1): New constant.
608         * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant.
609         * bfd/cpu-mips.c (I_sb1): New constant.
610         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
611         * bfd/elf32-mips.c (elf_mips_mach): Add case for
612         E_MIPS_MACH_SB1.
613         (_bfd_mips_elf_final_write_processing): Add case for
614         bfd_mach_mips_sb1.
615
616 2000-12-01  Joel Sherrill <joel@OARcorp.com>
617
618         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
619         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
620         (sparc*-*-rtems*): Switched from a.out to ELF.
621
622 2000-11-30  Jan Hubicka  <jh@suse.cz>
623
624         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
625         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
626         (elf64-x86-64.lo): Add dependencies.
627         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
628         bfd_mach_x86_64_intel_syntax.
629         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
630         * config.bfd (x86_64): Add.
631         * configure.in: Add support for bfd_elf64_x86_64_vec.
632         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
633         (bfd_i386_arch, i8086_ar): Link in.
634         * elf64-x86-64.c: New file.
635         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
636         * targets.c (bfd_elf64_x86_64_vec): Add.
637         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
638
639 2000-11-30  Kazu Hirata  <kazu@hxi.com>
640
641         * xcofflink.c: Fix formatting.
642
643 2000-11-28  Kazu Hirata  <kazu@hxi.com>
644
645         * aoutx.h: Fix formatting.
646         * bfd-in.h: Likewise.
647         * bfd-in2.h: Likewise.
648         * cache.c: Likewise.
649         * cisco-core.c: Likewise.
650         * coff64-rs6000.c: Likewise.
651         * coffcode.h: Likewise.
652         * coffswap.h: Likewise.
653         * corefile.c: Likewise.
654         * elf32-mips.c: Likewise.
655
656 2000-11-27  Kazu Hirata  <kazu@hxi.com>
657
658         * aout-adobe.c: Fix formatting.
659         * coff64-rs6000.c: Likewise.
660         * coffgen.c: Likewise.
661         * cofflink.c: Likewise.
662
663 2000-11-27  Philip Blundell  <pb@futuretv.com>
664
665         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
666         (obj_coff_strings_written): New accessor macro for above.
667         * libcoff.h: Regenerate.
668         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
669         strings.
670         * coffcode.h (coff_write_object_contents): No need to write out
671         the string table if it's already been done.
672
673 2000-11-22  Philip Blundell  <pb@futuretv.com>
674
675         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
676         weak undefined symbols.
677
678 2000-11-24  Nick Clifton  <nickc@redhat.com>
679
680         * archures.c (bfd_mach_arm_5TE): Define.
681         (bfd_mach_arm+XScale): Define.
682         * bfd-in2.h: Regenerate.
683
684         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
685         BFD_RELOC_ARM_PCREL_BLX.
686
687         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
688         XScale machine numbers.
689
690         * config.bfd (xscale-elf): Add target.
691         (xscale-coff): Add target.
692
693         * cpu-arm.c: Add xscale machine name.
694         Add v5t, v5te and XScale machine numbers.
695
696 2000-11-23  Kazu Hirata  <kazu@hxi.com>
697
698         * aix386-core.c: Fix formatting.
699
700 2000-11-22  Jim Wilson  <wilson@redhat.com>
701
702         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
703         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
704         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
705         (ins_imms_scaled): Initialize sign_bit at function entry.
706         (elf64_ia64_operands): Add missing initializers.
707         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
708         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
709         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
710         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
711         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
712         parameters.
713         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
714         and free_extsyms at function entry.
715         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
716         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
717         (get_got): Delete unused local srel.
718         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
719         (elfNN_ia64_relocate_section): Delete unused local dynindx.
720
721 2000-11-21  Kazu Hirata  <kazu@hxi.com>
722
723         * coff-a29k.c: Fix formatting.
724         * coff-h8500.c: Likewise.
725         * coff-i960.c: Likewise.
726         * coff-ppc.c: Likewise.
727         * coff-rs6000.c: Likewise.
728         * coff-stgo32.c: Likewise.
729         * coff-tic54x.c: Likewise.
730         * coff-w65.c: Likewise.
731         * cpu-h8500.c: Likewise.
732         * cpu-hppa.c: Likewise.
733         * cpu-ns32k.c: Likewise.
734         * ecoff.c: Likewise.
735         * ecofflink.c: Likewise.
736
737 2000-11-21  Nick Clifton  <nickc@redhat.com>
738
739         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
740         remove possibility of infinite loop.
741
742 2000-11-20  Kazu Hirata  <kazu@hxi.com>
743
744         * aix386-core.c: Fix formatting.
745         * aout-adobe.c: Likewise.
746         * aout-arm.c: Likewise.
747         * aout-encap.c: Likewise.
748         * aout-ns32k.c: Likewise.
749         * aout-target.h: Likewise.
750         * aout-tic30.c: Likewise.
751         * aoutf1.h: Likewise.
752         * aoutx.h: Likewise.
753         * archive.c: Likewise.
754         * bfd-in.h: Likewise.
755         * bfd-in2.h: Likewise.
756         * bfd.c: Likewise.
757         * bout.c: Likewise.
758
759 2000-11-17  H.J. Lu  <hjl@gnu.org>
760
761         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
762         pltoff entries for DT_INIT and DT_FINI.
763         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
764         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
765         entries.
766
767 2000-11-16  Richard Henderson  <rth@redhat.com>
768
769         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
770         (allocate_dynrel_entries): Likewise.
771         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
772         (set_pltoff_entry): Likewise.
773         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
774         (elfNN_ia64_reloc_type_lookup): Likewise.
775         (elfNN_ia64_install_value): Likewise.
776         (elfNN_ia64_relocate_section): Likewise.
777         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
778         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
779
780 2000-11-16  Kazu Hirata  <kazu@hxi.com>
781
782         * cpu-a29k.c: Fix formatting.
783         * cpu-alpha.c: Likewise.
784         * cpu-arm.c: Likewise.
785         * cpu-avr.c: Likewise.
786         * cpu-d10v.c: Likewise.
787         * cpu-h8500.c: Likewise.
788         * cpu-hppa.c: Likewise.
789         * cpu-i370.c: Likewise.
790         * cpu-i386.c: Likewise.
791         * cpu-i960.c: Likewise.
792         * cpu-ia64-opc.c: Likewise.
793         * cpu-ia64.c: Likewise.
794         * cpu-m32r.c: Likewise.
795         * cpu-m68hc11.c: Likewise.
796         * cpu-m68hc12.c: Likewise.
797         * cpu-m68k.c: Likewise.
798         * cpu-m88k.c: Likewise.
799         * cpu-mips.c: Likewise.
800         * cpu-ns32k.c: Likewise.
801         * cpu-pj.c: Likewise.
802         * cpu-powerpc.c: Likewise.
803         * cpu-sh.c: Likewise.
804         * cpu-sparc.c: Likewise.
805         * cpu-tic54x.c: Likewise.
806         * cpu-v850.c: Likewise.
807         * cpu-vax.c: Likewise.
808         * cpu-w65.c: Likewise.
809         * cpu-we32k.c: Likewise.
810         * cpu-z8k.c: Likewise.
811         * dwarf1.c: Likewise.
812         * dwarf2.c: Likewise.
813
814 2000-11-15  Kazu Hirata  <kazu@hxi.com>
815
816         * coff-arm.c: Fix formatting.
817         * coff-ppc.c: Likewise.
818         * coff-rs6000.c: Likewise.
819         * coff-sh.c: Likewise.
820         * coff-sparc.c: Likewise.
821         * coff-tic30.c: Likewise.
822         * coff-tic54x.c: Likewise.
823         * coff-tic80.c: Likewise.
824         * coff-w65.c: Likewise.
825         * coff-we32k.c: Likewise.
826         * coff-z8k.c: Likewise.
827
828 2000-11-15  Richard Henderson  <rth@redhat.com>
829
830         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
831         section with the same ALLOC|LOAD flags as the source section.
832
833 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
834
835         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
836         by STO_ALPHA constants.
837
838 2000-11-14  Kazu Hirata  <kazu@hxi.com>
839
840         * coff-pmac.c: Fix formatting.
841         * coff-ppc.c: Likewise.
842
843 2000-11-13  H.J. Lu  <hjl@gnu.org>
844
845         * elflink.h (elf_link_add_object_symbols): Also add indirect
846         symbols for common symbols with the default version.
847
848 2000-11-09  Philip Blundell  <pb@futuretv.com>
849
850         * section.c (STD_SECTION): Set gc_mark flag.
851
852 2000-11-11  Kazu Hirata  <kazu@hxi.com>
853
854         * coff-i960.c: Likewise.
855         * coff-m68k.c: Likewise.
856         * coff-m88k.c: Likewise.
857         * coff-mcore.c: Likewise.
858         * coff-mips.c: Likewise.
859
860 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
861
862         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
863
864 2000-11-10  Kazu Hirata  <kazu@hxi.com>
865
866         * coff-h8300.c: Fix formatting.
867         * coff-h8500.c: Likewise.
868         * coff-i386.c: Likewise.
869         * coff-i860.c: Likewise.
870         * coff-i960.c: Likewise.
871         * coff-ia64.c: Likewise.
872
873 2000-11-09  Kazu Hirata  <kazu@hxi.com>
874
875         * archive.c: Fix formatting.
876         * archures.c: Likewise.
877
878 2000-11-07  Richard Henderson  <rth@redhat.com>
879
880         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
881         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
882         * section.c (bfd_set_section_contents): Call memcpy if
883         section->contents set and location not equal to contents plus offset.
884
885 2000-11-08  Kazu Hirata  <kazu@hxi.com>
886
887         * bfd-in.h: Fix formatting.
888         * bfd-in2.h: Likewise.
889         * bfd.c: Likewise.
890         * binary.c: Likewise.
891         * bout.c: Likewise.
892         * coff-a29k.c: Likewise.
893         * coff-alpha.c: Likewise.
894         * coff-apollo.c: Likewise.
895         * coff-aux.c: Likewise.
896
897 2000-11-07  Kazu Hirata  <kazu@hxi.com>
898
899         * aix386-core.c: Fix formatting.
900         * aoutf1.h: Likewise.
901         * aoutx.h: Likewise.
902         * archures.c: Likewise.
903         * armnetbsd.c: Likewise.
904
905 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
906
907         * coff-h8300.c (special): Adjust reloc address.
908
909 2000-11-06  Steve Ellcey <sje@cup.hp.com>
910
911         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
912         to differentiate elf32 and elf64 on ia64.
913         * bfd-in2.h: Regenerate.
914         * config.bfd: Add target for "ia64*-*-hpux*".
915         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
916         * configure: Regenerate.
917         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
918         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
919
920         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
921         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
922         * Makefile.in: Regnerate.
923         * elf64-ia64.c: Deleted.
924         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
925
926 2000-11-06  Kazu Hirata  <kazu@hxi.com>
927
928         * aout-adobe.c: Fix formatting.
929         * aout-arm.c: Likewise.
930         * aout-cris.c: Likewise.
931         * aout-encap.c: Likewise.
932         * aout-ns32k.c: Likewise.
933         * aout-target.h: Likewise.
934         * aout-tic30.c: Likewise.
935
936 2000-11-05  Philip Blundell  <philb@gnu.org>
937
938         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
939         BFDs containing no sections to be merged, regardless of their flags.
940
941 2000-11-04  Philip Blundell  <philb@gnu.org>
942
943         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
944         if a relocation for an undefined symbol also results in an
945         overflow.
946
947 2000-11-06  Christopher Faylor <cgf@cygnus.com>
948
949         * config.bfd: Add support for Sun Chorus.
950
951 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
952
953         * configure.in: Recognize alpha-*-freebsd*.
954         * configure: Regenerate.
955
956 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
957
958         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
959         (Chunk): New global variable set by a parameter in objcopy.c.
960         (S3Forced): New global variable set by a parameter in
961         objcopy.c.
962         (srec_set_section_contents): If S3Forced is true, always generate
963         S3 records.
964         (srec_write_section): Use 'Chunk' to limit maximum length of S
965         records.
966
967 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
968
969         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
970         * Makefile.in: Regenerate.
971         * bfd-in2.h: Regenerate.
972         * po/bfd.pot: Regenerate.
973
974 2000-10-31  Philip Blundell  <philb@gnu.org>
975
976         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
977         EF_SOFT_FLOAT if it is defined.
978
979 2000-10-27  Philip Blundell  <philb@gnu.org>
980
981         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
982         attempts to mix PIC code with non-PIC, just mark the output as
983         being position dependent.
984         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
985         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
986         all mismatches, not just the first one.
987
988 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
989
990         * ieee.c (ieee_archive_p): Plug one of many possible
991         memory leaks in error handling.
992
993 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
994
995         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
996         elf32_sparc_object_p, elf32_sparc_final_write_processing):
997         Support v8plusb.
998         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
999         sparc64_elf_object_p): Support v9b.
1000         * archures.c: Declare v8plusb and v9b machines.
1001         * bfd-in2.h: Ditto.
1002         * cpu-sparc.c: Ditto.
1003
1004 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1005
1006         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
1007         of a GOT reloc.
1008
1009         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
1010         (SYMBOL_CALLS_LOCAL): New macro.
1011         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1012         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
1013         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1014         (ppc_elf_relocate_section): Use flag variable to determine
1015         whether the relocation refers to a local symbol.
1016         Test whether a PLTREL24 reloc will produce a reloc by looking
1017         to see whether a PLT entry was made.
1018
1019 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1020
1021         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
1022         entries that could serve as a definition for a weak symbol.
1023
1024 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
1025
1026         From  Ralf Baechle  <ralf@gnu.org>
1027
1028         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
1029         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
1030         against local symbols.
1031         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
1032
1033 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
1034
1035         * section.c (struct sec): Add kept_section.
1036         (struct bfd_comdat_info): Remove sec, we can use above.
1037         (STD_SECTION): Add initializer.
1038         (bfd_make_section_anyway): Init here too.
1039
1040         * bfd-in2.h: Regenerate.
1041
1042         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
1043         zeroing of `flags'.
1044         (elf_link_input_bfd): Set all asection->symbol->value's here, and
1045         fudge values for discarded link-once section symbols.
1046
1047         * elf64-hppa.c: Include alloca-conf.h
1048
1049 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
1050
1051         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
1052
1053         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
1054
1055 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
1056
1057         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
1058
1059 2000-10-10  Tom Rix <trix@redhat.com>
1060
1061         * section.c (bfd_make_section_anyway): Release newsect ptr when
1062         newsect->symbol fails to alloc.  Use bfd_release instead of free.
1063
1064 2000-10-09  Richard Henderson  <rth@cygnus.com
1065
1066         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
1067         (elf64_ia64_unwind_entry_compare): New.
1068         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
1069
1070 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
1071
1072         * elflink.h (size_dynamic_sections): Don't create various tags if
1073         .dynstr is excluded from the link.  Don't set first dynsym entry
1074         if dynsymcount is zero.
1075         (elf_bfd_final_link): Don't try to swap out dynamic syms if
1076         .dynsym excluded from the link.  Don't try to write any dynamic
1077         sections excluded from the link.
1078
1079         * elf.c (swap_out_syms): Handle global section symbols.
1080
1081 2000-10-05  DJ Delorie  <dj@redhat.com>
1082
1083         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
1084         * coffcode.h (coff_set_alignment_hook): read extended reloc count
1085         (coff_write_relocs): write extended reloc count
1086         (coff_write_object_contents): account for extended relocs
1087
1088 2000-10-05  Jim Wilson  <wilson@cygnus.com>
1089
1090         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
1091         field.
1092         * elf.c (_bfd_elf_make_section_from_shdr): Call the
1093         elf_backend_section_flags function.
1094         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
1095         code.
1096         (elf64_ia64_section_flags): New function containing flag conversion
1097         code.
1098         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
1099         * elfxx-target.h (elf_backend_section_flags): Define.
1100         (elfNN_bed): Initialize elf_backend_section_flags field.
1101
1102 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
1103
1104         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
1105         _bfd_elf32_gc_record_vtable.  Correct a comment.
1106
1107 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
1108
1109         From  Ralf Baechle  <ralf@gnu.org>
1110
1111         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
1112         produces binaries with got[1] = 0x80000001 to differenciate them
1113         for the dynamic linker from the broken binaries produced by old
1114         versions.
1115
1116 2000-09-30  Petr Sorfa <petrs@sco.com>
1117
1118         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
1119         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
1120         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
1121         * configure: Regenerate.
1122
1123 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
1124
1125         Define two bfd_targets for absence and presence of leading
1126         underscore on symbols.  Make sure to only link same kind.
1127         * elf32-cris.c (cris_elf_object_p,
1128         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
1129         cris_elf_merge_private_bfd_data): New.
1130         (elf_backend_object_p, elf_backend_final_write_processing,
1131         bfd_elf32_bfd_print_private_bfd_data,
1132         bfd_elf32_bfd_merge_private_bfd_data): Define.
1133         <Target vector definition>: Include elf32-target.h twice with
1134         different macro settings:
1135         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
1136         bfd_elf32_us_cris_vec.
1137         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
1138         (elf_symbol_leading_char): First as 0, then '_'.
1139         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
1140         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
1141         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
1142         * configure: Regenerate.
1143         * targets.c: Declare bfd_elf32_us_cris_vec.
1144         * po/bfd.pot: Regenerate.
1145
1146 2000-09-29  Momchil Velikov  <velco@fadata.bg>
1147
1148         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
1149         R_ARM_THM_PC22 relocations.
1150
1151 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
1152
1153         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
1154
1155 2000-09-29  Momchil Velikov <velco@fadata.bg>
1156
1157         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
1158         is has the SEC_HAS_CONTENTS flag set.
1159
1160 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
1161             Hans-Peter Nilsson  <hp@axis.com>
1162
1163         * aout-cris.c (N_TXTADDR): Define.
1164
1165 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
1166
1167         * som.c: Include alloca-conf.h.
1168         * Makefile.am: "make dep-am"
1169         * Makefile.in: Regenerate.
1170
1171 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
1172
1173         * elf32-hppa.c (plt_stub): New.
1174         (PLT_STUB_ENTRY): Define.
1175         (elf32_hppa_link_hash_table): Change multi_subspace to packed
1176         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
1177         (elf32_hppa_link_hash_table_create): Init to suit.
1178         (elf32_hppa_check_relocs): Set has_12bit_branch and
1179         has_17bit_branch as appropriate.
1180         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
1181         non-local functions.
1182         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
1183         Add space for plt_stub as needed.
1184         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
1185         functions at plt_stub.
1186         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
1187         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
1188
1189         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
1190         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
1191         of fixed size, and if negative, disable handling of input sections
1192         before stub section.  Set up default stub group size depending
1193         on detected branch relocs.
1194         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
1195         ensure different offsets from sym_value aren't rounded to
1196         different 2k blocks.  Use lrsel and rrsel for other stubs too for
1197         consistency rather than necessity.
1198         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
1199         (final_link_relocate): Likewise.
1200         (elf32_hppa_relocate_section): Likewise.
1201
1202         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
1203         (_bfd_elf_hppa_gen_reloc_type): Generate them.
1204         (elf_hppa_final_link_relocate): Handle them.
1205         (elf_hppa_relocate_insn): Likewise.
1206         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
1207
1208 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
1209
1210         * elfcode.h (elf_object_p): Preserve and clear abfd section
1211         information.  Restore at error.
1212
1213 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
1214
1215         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
1216         is empty, make sure that its rva also 0. NT loader dislikes
1217         having otherwise.
1218
1219 2000-09-26  Steve Ellcey <sje@cup.hp.com>
1220
1221         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
1222         global by default.
1223
1224 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
1225
1226         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
1227         currently unused RELATIVE_DYNAMIC_RELOCS code.
1228         (hppa_discard_copies): Likewise.
1229         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
1230         comments.  Don't check non-code output sections for stub grouping.
1231
1232 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
1233
1234         * section.c (bfd_get_unique_section_name): Return NULL if
1235         bfd_malloc fails.
1236
1237 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1238
1239         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
1240         instruction sequence to actually work.
1241         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
1242         accordingly.
1243
1244 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
1245
1246         * elf32-sh.c (sh_elf_relocate_section): Use
1247         _bfd_final_link_relocate to apply the relocation against a section
1248         symbol, when doing relocatable links.
1249
1250 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
1251
1252         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
1253         to id_sec.
1254         (stub_hash_newfunc): Here too.
1255         (hppa_add_stub): And here.
1256         (elf32_hppa_link_hash_table): Remove stub_section_created,
1257         reloc_section_created, first_init_sec and first_fini_sec.  Add
1258         stub_group.
1259         (elf32_hppa_link_hash_table_create): Init to suit.
1260         (hppa_get_stub_entry): Add support for grouping stub sections.
1261         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
1262         section code.  Index stub vars by section->id.
1263         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
1264         exit paths.  Zap allocation of above removed vars.  Refine
1265         link-once test.
1266
1267         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
1268         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
1269         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
1270         rather than pointer to bfd_link_info.
1271         (hppa_add_stub): Likewise.
1272         (final_link_relocate): Likewise.
1273
1274 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
1275
1276         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
1277         link-once sections.
1278
1279 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
1280
1281         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
1282         ld/emulparams/shelf.sh.
1283
1284 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1285
1286         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
1287         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
1288         * bfd-in2.h: Regenerate.
1289
1290 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
1291
1292         * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
1293         LITUSE relocations incorrectly if -relax is specified on the ld
1294         command line and the displacement field of the load or store
1295         instruction is non-zero. (Patch by paul.winalski@compaq.com)
1296
1297 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
1298
1299         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
1300         first_fini_sec here.
1301         (elf32_hppa_size_stubs): Instead correctly find the first .init
1302         and .fini section here.
1303
1304 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
1305
1306         * elf32-hppa.c (clobber_millicode_symbols): New function.
1307         (elf32_hppa_size_dynamic_sections): Call it.
1308
1309 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
1310
1311         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
1312         packed.  Add plabel, plt_abs packed booleans.
1313         (hppa_link_hash_newfunc): Init new fields.
1314         (PLABEL_PLT_ENTRY_SIZE): Define.
1315         (hppa_stub_name): Use size_t len vars.
1316         (hppa_add_stub): Likewise.
1317         (elf32_hppa_build_stubs): Likewise.
1318         (hppa_build_one_stub): Kill some compiler warnings.
1319         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
1320         if dynamic linking.  Munge the local plt offsets into
1321         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
1322         size_t len vars.  Add assert for plabel addend.
1323         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
1324         (elf32_hppa_hide_symbol): New function.
1325         (elf_backend_hide_symbol): Define.
1326         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
1327         with h->plabel set.  Don't make plt entries to have dynamic syms
1328         when they have been forced local.  If plt entry is used by a
1329         plabel, make it PLABEL_PLT_ENTRY_SIZE.
1330         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
1331         Set up .plt offsets for local syms.
1332         (elf32_hppa_relocate_section): Initialise plt entries for local
1333         syms.  Leave weak undefined plabels zero.  Make global plabel
1334         relocs against function symbol, and leave the addend zero.
1335         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
1336         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
1337         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
1338         relocs instead of SEGREL32 for dynamic got relocs.
1339         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
1340         (elf_backend_got_header_size): Adjust.
1341         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
1342
1343         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
1344         (hppa_type_of_stub): Use it instead of #if 0
1345         (hppa_discard_copies): Use it here too.
1346         (elf32_hppa_size_dynamic_sections): And here.
1347
1348         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
1349         (elf32_hppa_link_hash_table_create): And here.
1350         (hppa_build_one_stub): And here.  Instead keep track of stub
1351         offset using _raw_size.
1352         (elf32_hppa_size_stubs): Likewise.
1353         (elf32_hppa_build_stubs): Likewise.
1354         (hppa_size_one_stub): Likewise.  Resize reloc section too.
1355
1356         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
1357         first_fini_sec handling.  Don't search for reloc section or set
1358         hplink->reloc_section_created here.
1359         (elf32_hppa_size_stubs): Instead search for reloc sections, and
1360         set reloc_section_created here.
1361         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
1362         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
1363         and DT_FINI.
1364         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
1365
1366         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
1367         with `hplink->root.'.
1368         (elf32_hppa_check_relocs): Likewise.
1369         (elf32_hppa_gc_sweep_hook): Likewise.
1370         (elf32_hppa_adjust_dynamic_symbol): Likewise.
1371         (hppa_handle_PIC_calls): Likewise.
1372         (elf32_hppa_size_dynamic_sections): Likewise.
1373         (elf32_hppa_set_gp): Likewise.
1374         (elf32_hppa_relocate_section): Likewise.
1375         (elf32_hppa_finish_dynamic_symbol): Likewise.
1376         (elf32_hppa_finish_dynamic_sections): Likewise.
1377
1378         From  David Huggins-Daines  <dhd@linuxcare.com>
1379         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
1380         defined weak symbols in shared links.
1381         (final_link_relocate): Calls to defined weak symbols in shared
1382         objects must go via import stubs, as the target might not be known
1383         at link time.
1384
1385 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
1386
1387         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
1388         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
1389         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
1390         the original entries with EMPTY_HOWTOs, and added new ones to fill
1391         in the gap.
1392         (sh_elf_info_to_howto): Make sure the new gap isn't used.
1393         (sh_elf_relocate_section): Likewise.
1394
1395 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
1396
1397         * cpu-mips.c (arch_info_struct): Add mips:4K
1398         * bfd-in2.h (bfd_mach_mips4K): New define.
1399         * archures.c: Add bfd_mach_mips4K to comment.
1400         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
1401         E_MIPS_ARCH_2 for bfd_mach_mips4K.
1402
1403 2000-09-13  Marco Franzen <marcof@thyron.com>
1404
1405         * som.c (som_write_symbol_strings): Do not used fixed buffers,
1406         use size_t as a counter.
1407         (som_write_space_strings): Similarly.
1408
1409 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
1410
1411         * elf32-i860.c (elf32_i860_relocate_pc26): New function
1412         and prototype.
1413         (elf32_i860_relocate_section): Invoke new function from here.
1414
1415 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1416
1417         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
1418         static.
1419
1420 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1421
1422         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
1423         target section name instead of dumping core when the target symbol is
1424         undefined.
1425
1426 2000-09-09  Kazu Hirata  <kazu@hxi.com>
1427
1428         * riscix.c: Remove DEFUN.
1429
1430 2000-09-08  Nick Clifton  <nickc@redhat.com>
1431
1432         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
1433         initialise flags in output bfd if the input bfd is the default
1434         architecture with the default flags.
1435
1436 2000-09-08  Kazu Hirata  <kazu@hxi.com>
1437
1438         * archive.c: Fix formatting.
1439         * coff-arm.c: Likewise.
1440         * doc/chew.c: Likewise.
1441
1442 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
1443
1444         * section.c (bfd_get_unique_section_name): Put a dot before the
1445         numeric suffix.
1446
1447 2000-09-07  Kazu Hirata  <kazu@hxi.com>
1448
1449         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
1450         * elf.c: Fix formatting.
1451
1452 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
1453
1454         * config.bfd (sh-*-linux*): Added.
1455         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
1456         * targets.c: Declare them.
1457         * elf32-sh-lin.c: New file.
1458         * Makefile.am: Compile it.
1459         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
1460         * configure, Makefile.in: Rebuilt.
1461
1462 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
1463
1464         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
1465         pseduo-section when determining where the TOC ends.
1466
1467         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
1468         output x_tvndx as it is only two bytes wide.
1469
1470         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
1471         reloc is 26 or 32 bits wide.
1472
1473         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
1474         for relocs that don't change anything.  Also look at the full
1475         6 bits of bitsize.
1476
1477 2000-09-06  Philip Blundell  <philb@gnu.org>
1478
1479         * config.bfd (arm*-*-uclinux*): New target.
1480
1481 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
1482
1483         * configure: Rebuilt with new libtool.m4.
1484
1485 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
1486
1487         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
1488         word for variable name.
1489         * bfd-in2.h: Regenerate.
1490
1491 2000-09-05  Nick Clifton  <nickc@redhat.com>
1492
1493         * config.in: Regenerate.
1494         * libbfd.h: Regenerate.
1495         * po/bfd.pot: Regenerate.
1496         * doc/bfdint.texi: Remove CVS date string - it foils compares with
1497         local versions.
1498
1499 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
1500
1501         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
1502
1503 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
1504
1505         Shared library and PIC support.
1506         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
1507         (GOT_ENTRY_SIZE): New.
1508         (ELF_DYNAMIC_INTERPRETER): New.
1509         (STUB_SUFFIX): Define.
1510         (LONG_BRANCH_PIC_IN_SHLIB): Define.
1511         (RELATIVE_DYNAMIC_RELOCS): Define.
1512         (enum elf32_hppa_stub_type): New.
1513         (struct elf32_hppa_stub_hash_entry): Rename offset to
1514         stub_offset.  Add a number of new fields.
1515         (struct elf32_hppa_link_hash_entry): New.
1516         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
1517         global_value.
1518         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
1519         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
1520         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
1521         new fields.
1522         (hppa_link_hash_newfunc): New function.
1523         (elf32_hppa_link_hash_table_create): Use above function. Init new
1524         fields.
1525         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
1526         instead of addend, and remove sym_name from args.  Don't use
1527         symbol name for local syms, instead use sym index.
1528         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
1529         stub type rather than size.  Pass in hash and handle import stub
1530         case.  Also pass in reloc instead of offset so we can calculate
1531         PCREL22F and PCREL12F branches properly.
1532         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
1533         import and export stubs too.
1534         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
1535         import and export stub sizing.
1536         (elf32_hppa_check_relocs): New function.
1537         (elf32_hppa_adjust_dynamic_symbol): New function.
1538         (hppa_discard_copies): New function.
1539         (elf32_hppa_size_dynamic_sections): New function.
1540         (elf_backend_size_dynamic_sections): Define.
1541         (elf32_hppa_finish_dynamic_symbol): New function.
1542         (elf_backend_finish_dynamic_symbol): Define.
1543         (elf32_hppa_size_stubs): Stash params in link hash table, and move
1544         some local vars into the link hash table too.  For shared links,
1545         trundle over function syms, generating export stubs.  Handle
1546         PCREL22F branches.  Break out stub creation code from here..
1547         (hppa_add_stub): .. to here.  New function.
1548         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
1549         call the bfd linker.  Use elf_gp to record global pointer.
1550         Calculate a value from sections if $global$ is missing.
1551         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
1552         (elf32_hppa_gc_mark_hook): New function.
1553         (elf_backend_gc_mark_hook): Define.
1554         (elf32_hppa_gc_sweep_hook): New function.
1555         (elf_backend_gc_sweep_hook): Define.
1556         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
1557         Add rel to args, and remove howto, input_bfd, offset, addend,
1558         sym_name as we can recalculate these locally.  Handle calls to
1559         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
1560         handling of undefined weak syms.  Check that stubs are in range.
1561         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
1562         message on hitting a DPREL21L reloc that needs fixing.  Subtract
1563         off PC for PCREL14F.  Break out code that does a stub lookup from
1564         here..
1565         (hppa_get_stub_entry): ..to here.  New function.
1566         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
1567         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
1568         relocs, etc. etc.
1569         (elf32_hppa_finish_dynamic_sections): New function.
1570         (elf_backend_finish_dynamic_sections): Define.
1571         (elf_backend_final_write_processing) Define.
1572         (hppa_handle_PIC_calls): New function.
1573         (elf32_hppa_build_stubs): Call it.  Pass link_info to
1574         hppa_build_one_stub.
1575         (elf32_hppa_create_dynamic_sections): New function
1576         to create .plt and .got then set .plt flags correctly.
1577         (elf_backend_create_dynamic_sections): Define.
1578         (elf32_hppa_object_p): New function.
1579         (elf_backend_object_p): Define.
1580         (elf32_hppa_elf_get_symbol_type): New function.
1581         (elf_backend_get_symbol_type): Define.
1582         (elf_backend_can_gc_sections): Define.
1583         (elf_backend_want_got_plt): Define.
1584         (elf_backend_plt_alignment): Set to 2.
1585         (elf_backend_plt_readonly): Define.
1586         (elf_backend_want_plt_sym): Define.
1587         (elf_backend_got_header_size): Reserve one entry.
1588
1589         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
1590         (elf32_hppa_size_stubs): Pass in multi_subspace.
1591         (elf32_hppa_set_gp): Declare.
1592
1593         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
1594         (bfd_get_unique_section_name): New function.
1595         * bfd_in2.h: Regenerate.
1596
1597         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
1598         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
1599         comment.
1600
1601         From  David Huggins-Daines  <dhd@linuxcare.com>
1602         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
1603         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
1604         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
1605         been updated in finish_dynamic_symbol before modifying function
1606         symbol.
1607
1608         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
1609         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
1610         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
1611         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
1612         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
1613         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
1614         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
1615         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
1616
1617         From David Huggins-Daines  <dhd@linuxcare.com>
1618         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
1619         style of local labels as well.
1620
1621 2000-09-03  Philip Blundell  <philb@gnu.org>
1622
1623         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
1624         references to undefined symbols in debugging sections.
1625
1626 2000-09-02  H.J. Lu  <hjl@gnu.org>
1627
1628         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1629         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
1630         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
1631         section.
1632
1633 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
1634
1635         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
1636         (elf32_i860_is_local_label_name): New function and prototype.
1637
1638 2000-09-02  Nick Clifton  <nickc@redhat.com>
1639
1640         * configure.in: Increase version number to 2.10.91.
1641         * configure: Regenerate.
1642         * aclocal.m4: Regenerate.
1643         * config.in: Regenerate.
1644         * po/bfd.pot: Regenerate.
1645
1646 2000-09-02  Daniel Berlin <dberlin@redhat.com>
1647
1648         * elf.c (_bfd_elf_make_section_from_shdr): Add
1649         .gnu.linkobce.wi. to the list of debug section names.
1650
1651 2000-09-02  Nick Clifton  <nickc@redhat.com>
1652
1653         * dwarf2.c (find_debug_info): New function: Locate a section
1654         containing dwarf2 debug information.
1655         (bfd_dwarf2_find_nearest_line): Find all sections containing
1656         debug information and include them in the stash.
1657
1658 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
1659
1660         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
1661         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
1662         (sh_reloc_map): Add new relocs.
1663         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
1664         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
1665         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
1666         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
1667         functions.
1668         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
1669         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1670         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
1671         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1672         New array constants.
1673         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
1674         New variables.
1675         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1676         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
1677         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
1678         elf_sh_plt_reloc_offset): Define.
1679         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
1680         elf_sh_link_hash_table): New structs.
1681         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
1682         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
1683         relocation types.
1684         (elf_backend_create_dynamic_sections,
1685         bfd_elf32_bfd_link_hash_table_create,
1686         elf_backend_adjust_dynamic_symbol,
1687         elf_backend_size_dynamic_sections,
1688         elf_backend_finish_dynamic_symbol,
1689         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1690         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1691         elf_backend_got_header_size, elf_backend_plt_header_size):
1692         Define.
1693         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1694         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
1695         New relocs.
1696         * bfd-in2.h, libbfd.h: Rebuilt.
1697
1698 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
1699
1700         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
1701         change.
1702
1703 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
1704
1705         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
1706         not initialized, set them to indicate the SH1 instruction set.
1707
1708 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
1709
1710         * acinclude.m4: Include libtool and gettext macros from the
1711         top level.
1712         * aclocal.m4, configure: Rebuilt.
1713
1714 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
1715
1716         * elf.c: Eliminate references to __sparcv9 macro; replace with
1717         autoconf variables HAVE_PSINFO32_T etc.
1718         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
1719         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
1720         * config.in: Ditto.
1721         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
1722         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
1723         * aclocal.m4: Ditto.
1724         * configure: Regenerate.
1725
1726 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
1727
1728         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
1729         for any shared link, not just shared -Bsymbolic.
1730         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
1731         any shared link, and pass link info to it.
1732         (elf_i386_size_dynamic_sections): Update comment.
1733         (elf_i386_discard_copies): Modify to discard relocs for symbols
1734         that have been forced local.
1735         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
1736         that have been forced local.
1737
1738 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
1739
1740         * elflink.h (elf_link_add_object_symbols): Allow common
1741         symbols to have an alignment of 1 if explicitly requested, and
1742         not overridden by other definitions.
1743
1744 2000-08-22  Doug Kwan <dkwan@transmeta.com>
1745
1746         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
1747         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
1748
1749 2000-08-22  H.J. Lu  <hjl@gnu.org>
1750
1751         * elf-bfd.h (elf_link_hash_table): Add runpath.
1752
1753         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
1754         * bfd-in2.h: Rebuilt.
1755
1756         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
1757         "runpath" field to NULL.
1758         (bfd_elf_get_runpath_list): New function.
1759
1760         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
1761         DT_RUNPATH entries.
1762
1763 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
1764
1765         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
1766         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
1767         explicitly.  Improve validation of r_type.
1768
1769 2000-08-21  H.J. Lu  <hjl@gnu.org>
1770
1771         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
1772         dynamic allocated content space.  Add a comment to remind us that
1773         one day this ought to be fixed.
1774         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1775         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1776         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1777
1778 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
1779
1780         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
1781         field with the newly relocated value instead of adding it to the
1782         existing immediate field.
1783         (elf32_i860_relocate_splitn): Likewise.
1784         (elf32_i860_relocate_highadj): Likewise.
1785
1786 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
1787
1788         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
1789         was previously just a stub).
1790
1791 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
1792
1793         * elflink.c (_bfd_elf_create_got_section): Don't abort().
1794         Formatting fixes.
1795         (_bfd_elf_create_dynamic_sections): Likewise.
1796
1797 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
1798
1799         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
1800         for undefined symbols to be the beginning of the section.
1801
1802         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
1803         four extra entries at the beginning of the .rela.plt section.
1804         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
1805         section to account for the four reserved entries in the .plt section.
1806
1807 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
1808
1809         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
1810         to the list of NOPs we recognize after a branch-and-link.
1811         Use the ori NOP when one is needed.
1812
1813         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
1814         for large archives.
1815
1816 2000-08-14  Jim Wilson  <wilson@cygnus.com>
1817
1818         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
1819         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
1820         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
1821         EF_IA_64_ABSOLUTE.
1822
1823 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
1824
1825         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
1826
1827 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
1828
1829         * elf32-i860.c (elf32_i860_relocate_section): New function.
1830         (i860_final_link_relocate): New function.
1831         (elf32_i860_relocate_splitn): New function.
1832         (elf32_i860_relocate_pc16): New function.
1833         (elf32_i860_relocate_highadj): New function.
1834         (elf32_i860_howto): Minor adjustments to some relocations.
1835         (elf_info_to_howto_rel): Define.
1836         (elf_backend_relocate_section): Define.
1837
1838 2000-08-10  Nick Clifton  <nickc@cygnus.com>
1839
1840         * elf32-arm.h: Fix formatting.
1841
1842 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
1843
1844         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
1845
1846 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
1847
1848         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
1849
1850 2000-08-07  Kazu Hirata  <kazu@hxi.com>
1851
1852         * ieee.c (ieee_write_debug_part): Rewrite a comment.
1853         * elf64-ia64.c: Fix a typo.
1854
1855 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
1856
1857         * elf32-i860 (elf32_i860_howto_table): New structure.
1858         (lookup_howto): New function.
1859         (elf32_i860_reloc_type_lookup): New function.
1860         (elf32_i860_info_to_howto_rela): New function.
1861         (elf_code_to_howto_index): New structure.
1862         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
1863         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
1864         elf32_i860_reloc_type_lookup.
1865
1866 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
1867
1868         * som.c (struct fixup_format): Constify `format'.
1869         (som_hppa_howto_table): Use SOM_HOWTO macro.
1870         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
1871         (som_bfd_reloc_type_lookup): Likewise.
1872         (compare_subspaces): Remove unused `count1', `count2'.
1873         (som_begin_writing): Remove unused `total_reloc_size'.
1874         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
1875         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
1876         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
1877         (som_find_nearest_line): Decorate unused parameter(s).
1878         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
1879         (som_bfd_link_split_section): Likewise.
1880
1881 2000-08-03  Nick Clifton  <nickc@cygnus.com>
1882
1883         * section.c: Restore backed out code.
1884         * elf.c: Restore backed out code.
1885         (copy_private_bfd_data): Fix bug preventing stipped dynamic
1886         binaries from working.
1887         * bfd-in2.h: Regenerate.
1888
1889 2000-08-03  H.J. Lu  <hjl@gnu.org>
1890
1891         * section.c: Back out the change made by Nick Clifton
1892         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
1893         binaries.
1894         * bfd-in2.h: Likewise.
1895         * elf.c: Likewise.
1896
1897 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
1898
1899         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
1900
1901 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
1902
1903         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
1904         * bfd-in2.h, libbfd.h: Regenerate.
1905
1906 2000-07-31  Nick Clifton  <nickc@cygnus.com>
1907
1908         * section.c (struct sec): Add new boolean field 'segment_mark'.
1909         (STD_SECTION): Initialise new field to zero.
1910
1911         * bfd-in2.h: Regenerate.
1912
1913         * elf.c (copy_private_bfd_data): Reorganise section to segment
1914         mapping to cope with moved sections requiring new segments,
1915         and overlapping segments.
1916         (SEGMENT_END): New macro: Return the end address of a segment.
1917         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
1918         contains a section by comparing their VMA addresses.
1919         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
1920         contains a section by comparing their LMA addresses.
1921         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
1922         section should be included in a segment.
1923         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
1924         follows another in memory.
1925         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
1926         segments overlap.
1927
1928 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
1929
1930         * cpu-i860.c: Added comments.
1931
1932         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
1933         bfd_elf32_i860_little_vec.
1934         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
1935         (ELF_MAXPAGESIZE): Changed to 4096.
1936
1937         * targets.c (bfd_elf32_i860_little_vec): Declaration of
1938         new target.
1939         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
1940
1941         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
1942         config for little endian elf32 i860.
1943         (targ_defvec): Define for the new config above
1944         as "bfd_elf32_i860_little_vec".
1945         (targ_selvecs): Define for the new config above
1946         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
1947
1948         * configure.in (bfd_elf32_i860_little_vec): Added recognition
1949         of new target vec.
1950
1951         * configure: Regenerated.
1952
1953 2000-07-27  H.J. Lu  <hjl@gnu.org>
1954
1955         * elflink.h (elf_merge_symbol): Take one more argument,
1956         dt_needed, to indicate if the symbol comes from a DT_NEEDED
1957         entry. Don't overide the existing weak definition if dt_needed
1958         is true.
1959         (elf_link_add_object_symbols): Pass dt_needed to
1960         elf_merge_symbol ().
1961
1962 2000-07-27  Nick Clifton  <nickc@cygnus.com>
1963
1964         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
1965         allocated contents.
1966
1967 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
1968
1969         * configure.host (*-*-aix*): AIX has 'long long' always.
1970
1971         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
1972         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
1973         (xcoff_write_archive_contents_big): Don't update the offset
1974         of the symbol table, xcoff_write_armap will do it.
1975
1976 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
1977
1978         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
1979         of dynobj for SGI_COMPAT checks.
1980
1981 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1982
1983         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
1984         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
1985         * bfd-in2.h: Regenerate.
1986
1987 2000-07-21  Nick Clifton  <nickc@cygnus.com>
1988
1989         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
1990         range symbol indices in relocs and issue an error message.
1991
1992 2000-07-20  H.J. Lu  <hjl@gnu.org>
1993
1994         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
1995         info->new_dtags when setting DT_FLAGS_1. It will only be set
1996         by the new linker options. It shouldn't break anything.
1997
1998 2000-07-20  H.J. Lu  <hjl@gnu.org>
1999
2000         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
2001         only if info->new_dtags is true.
2002
2003 2000-07-20  H.J. Lu  <hjl@gnu.org>
2004
2005         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
2006         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2007
2008 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
2009
2010         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
2011         (ALL_MACHINES_CFILES): Add cpu-cris.c.
2012         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
2013         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
2014         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
2015         * Makefile.in: Rebuild.
2016         * aclocal.m4: Rebuild.
2017         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
2018         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
2019         (bfd_cris_arch): Declare.
2020         (bfd_archures_list): Add bfd_cris_arch.
2021         * bfd-in2.h: Rebuild.
2022         * config.bfd: (cris-*-*): New target.
2023         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
2024         * configure: Rebuild.
2025         * elf.c (prep_headers): Add bfd_arch_cris.
2026         * libbfd.h: Rebuild.
2027         * libaout.h (enum machine_type): Add M_CRIS.
2028         * reloc.c: Add CRIS relocations.
2029         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
2030         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
2031         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
2032         * po/POTFILES.in, po/bfd.pot: Regenerate.
2033
2034 2000-07-19  H.J. Lu  <hjl@gnu.org>
2035
2036         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
2037         DF_TEXTREL if DT_TEXTREL is set.
2038         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2039         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2040         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2041         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
2042         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2043         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2044         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2045         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2046         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
2047         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
2048
2049         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
2050         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
2051         DT_RPATH is set.
2052         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2053
2054 2000-07-19  H.J. Lu  <hjl@gnu.org>
2055
2056         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
2057         * bfd-in2.h: Rebuild.
2058
2059         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
2060         (elf_dt_soname): New.
2061
2062         * elf.c (bfd_elf_set_dt_needed_soname): New.
2063
2064         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
2065         entry if the shared object loaded by DT_NEEDED is used to
2066         resolve the reference in a regular object.
2067
2068 2000-07-19  H.J. Lu  <hjl@gnu.org>
2069
2070         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
2071         DT_DEPAUDIT and DT_AUDIT as strings.
2072
2073 2000-07-19  Nick Clifton  <nickc@cygnus.com>
2074
2075         * format.c: Fix formatting.
2076
2077 2000-07-19  H.J. Lu  <hjl@gnu.org>
2078
2079         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2080
2081 2000-07-19  H.J. Lu  <hjl@gnu.org>
2082
2083         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
2084         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
2085         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
2086         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
2087         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
2088         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
2089         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2090
2091 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
2092
2093         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
2094         renamed functions from here...
2095         (assign_section_numbers): Use renamed functions.
2096         (prep_headers): Use renamed functions.
2097
2098         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
2099         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
2100         * bfd-in2.h: Regenerate.
2101
2102 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2103
2104         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
2105         parenthesis in if statement.
2106
2107 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
2108
2109         Enable the support for Traditional MIPS.
2110         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
2111         return ict_none appropriately for traditional mips targets.
2112         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
2113         (STUB_MOVE): Conditionalize for traditonal mips.
2114         (STUB_LI16): Likewise.
2115         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
2116         room for RTPROC header.
2117         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
2118         the permission for the PT_DYNAMIC as read, write and execute.
2119         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
2120         for traditonal mips.
2121         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
2122         _DYNAMIC_LINKING for traditonal mips.
2123         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
2124         in case of traditonal mips.
2125         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
2126         entry is required. For a function if PLT is not required then set the
2127         corresponding hash table entry to 0.
2128         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
2129         traditonal mips.
2130         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
2131         shared object set the value to 0.
2132         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
2133         _DYNAMIC_LINKING for traditonal mips.
2134         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
2135         for traditonal mips.
2136
2137 2000-07-15  H.J. Lu  <hjl@gnu.org>
2138
2139         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
2140
2141 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
2142
2143         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
2144         out a structure that is BFD_IN_MEMORY.
2145
2146 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
2147
2148         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
2149         bfd pointer.  Print section id instead of bfd pointer for local
2150         syms.  Prefix addend with `+' for global syms as well as local.
2151         Correct calculation of name component lengths.
2152         (elf64_hppa_check_relocs): Update call to get_dyn_name.
2153
2154         From David Huggins-Daines  <dhd@linuxcare.com>
2155         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
2156         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
2157         (elf64_hppa_modify_segment_map): Likewise.
2158
2159 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2160
2161         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
2162         addresses to be "naturally" sign extended.  Return -1 if unknown.
2163         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
2164         * bfd-in2.h: Regenerate.
2165
2166 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2167
2168         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
2169         and ECOF_SIGNED_64 to list ways to extract an offset.
2170         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
2171         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
2172         Update.
2173         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
2174         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
2175
2176 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2177
2178         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
2179         bfd_get_start_address.
2180         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
2181         (elf_swap_ehdr_out): Ditto.
2182
2183 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
2184
2185         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
2186         compatibility with older binutils.
2187
2188 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
2189
2190         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
2191         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
2192
2193         From Ryan Bradetich  <rbradetich@uswest.net>
2194         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
2195         (parse_line_table): Ditto.
2196         (_bfd_dwarf1_find_nearest_line): Ditto.
2197         * syms.c (cmpindexentry): Remove extra `*' from params.
2198
2199 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
2200
2201         * elf32-mips.c (sort_dynamic_relocs): New Function.
2202         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
2203         via qsort to sort the dynamic relocations in increasing r_symndx
2204         value.
2205
2206 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
2207
2208         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
2209         ATTRIBUTE_UNUSED to unused args.
2210         (get_opd): Likewise.
2211         (get_plt): Likewise.
2212         (get_dlt): Likewise.
2213         (get_stub): Likewise.
2214         (elf64_hppa_adjust_dynamic_symbol): Likewise.
2215         (elf64_hppa_link_output_symbol_hook): Likewise.
2216         (elf64_hppa_check_relocs): Delete unused var.
2217         (elf64_hppa_size_dynamic_sections): Likewise.
2218         (elf64_hppa_finalize_opd): Likewise.
2219         (elf64_hppa_finalize_dynreloc): Likewise.
2220         (elf64_hppa_modify_segment_map): Likewise.
2221         (elf64_hppa_finish_dynamic_sections): Likewise.
2222
2223         * elf-hppa.h (elf_hppa_final_write_processing): Add
2224         ATTRIBUTE_UNUSED to unused args.
2225         (elf_hppa_final_link_relocate): Likewise.
2226         (elf_hppa_record_segment_addrs): Add paretheses.
2227         (elf_hppa_relocate_section): Constify dyn_name.
2228
2229         From  David Huggins-Daines  <dhd@linuxcare.com>
2230         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
2231         rearrange case statement so that it gets preferred to 32-bit ones.
2232
2233         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
2234         asection->id instead of address of asection structure.
2235         (elf32_hppa_size_stubs): Likewise.
2236
2237         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
2238         for .init* and .fini*.
2239
2240         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
2241         and addends used in stub names to 32 bits.
2242         (elf32_hppa_size_stubs): Likewise.
2243
2244         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
2245         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
2246         not bfd_put_64.  Fix minor comment typo and formatting.
2247
2248         Changes to create multiple linker stubs, positioned immediately
2249         before the section where they are required.
2250         * elf32-hppa.c: Don't include hppa_stubs.h.
2251         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
2252         (elf32_hppa_stub_hash_table): Delete.
2253         (elf32_hppa_link_hash_entry): Delete.
2254         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
2255         stub_hash_table, and store the struct here rather than a pointer.
2256         Delete output_symbol_count.  Add offset array.  Change
2257         global_value to a bfd_vma.
2258         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
2259         (elf32_hppa_stub_hash_traverse): Delete.
2260         (elf32_hppa_name_of_stub): Delete.
2261         (elf32_hppa_link_hash_lookup): Delete.
2262         (elf32_hppa_link_hash_traverse): Delete.
2263         (elf32_hppa_stub_hash_table_init): Delete.
2264         (elf32_hppa_size_of_stub): Pass input section and offset rather
2265         than location and calculate location here.  Don't pass name as all
2266         stubs are now the same size.
2267         (elf32_hppa_stub_hash_newfunc): Init new fields.
2268         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
2269         too.
2270         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
2271         comparing against ints.  Rewrite stub handling code.
2272         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
2273         Case enums to int before comparing against ints.  Remove
2274         bfd_reloc_dangerous case.
2275         (elf32_hppa_build_one_stub): Rewrite.
2276         (elf32_hppa_size_one_stub): New function.
2277         (elf32_hppa_build_stubs): Rewrite.
2278         (elf32_hppa_size_stubs): Pass in linker call-back functions.
2279         Rewrite stub-handling specific code.
2280
2281         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
2282
2283         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
2284
2285         * hppa_stubs.h: Delete.
2286         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
2287         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
2288         * Makefile.in: Regenerate.
2289
2290         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
2291         e_nlrsel.
2292
2293         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
2294
2295         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
2296         and section name for bfd_reloc_notsupported error message.
2297         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
2298         bfd_reloc_notsupported.
2299         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
2300
2301         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
2302         undefined weak symbols for all relocs.
2303         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
2304         offsets are relative to one past the delay slot.
2305         (elf32_hppa_size_stubs): Account for reloc addend when calculating
2306         branch destination.  Put addend into stub name too.
2307         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
2308         adjust by 8 when deciding whether a linker stub is needed.  Put
2309         addend into stub name as for above.
2310
2311         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
2312         various args and vars.
2313         (elf32_hppa_bfd_final_link_relocate): Here too.
2314         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
2315         inner block var to avoid shadowing.
2316
2317         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
2318         unsigned.
2319         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
2320         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
2321         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
2322
2323         * libhppa.h: Change practically all unsigned ints to plain ints.
2324         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
2325         prototypes.
2326
2327         From Ryan Bradetich  <rbradetich@uswest.net>
2328         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
2329         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
2330         suit above.
2331         From  David Huggins-Daines  <dhd@linuxcare.com>
2332         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
2333         to the new OP_* ones.
2334
2335         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
2336         error exit.  Bail out earlier on plabel relocs that we aren't
2337         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
2338         string, and then don't free our copy.
2339         (elf32_hppa_build_one_stub): Make insn unsigned int.
2340
2341         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
2342         available with BL, not BE and BLE.
2343
2344         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
2345         code for elf arg relocs.
2346         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
2347         argument with elf_link_hash_entry h.  Handle undefined weak
2348         symbols.  Move $global$ lookup from here...
2349         (elf32_hppa_relocate_section): ...to here.  Return correct error
2350         message for non-handled relocs.
2351         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
2352         wrong test was -0x3ffff to +0x40000.
2353
2354         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
2355         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
2356         Handle them as such.
2357         (elf_hppa_relocate_insn): Fix a typo.
2358
2359         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
2360         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2361         assemble_17, assemble_21): Delete.
2362         Supply defines for all 64 possible opcodes.
2363         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
2364         formats.  Handle COMICLR.
2365         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
2366         -10, -16, 16, 22.
2367
2368         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
2369         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
2370         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
2371         to suit.
2372         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
2373         the local syms - did this code get deleted accidentally?  Ignore
2374         undefined and undefweak syms.
2375
2376         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
2377         block.  Use it instead of elf64_hppa_hash_table (info).
2378         (elf_hppa_final_link_relocate): Use hppa_info instead of
2379         elf64_hppa_hash_table (info).
2380
2381         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2382         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2383         (hppa_rebuild_insn): Mask immediate bits here instead.
2384         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2385
2386 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
2387
2388         * section.c (struct sec): Add id field.  Tidy comment formatting.
2389         (bfd_make_section_anyway): Set id.
2390         (STD_SECTION): Init id too.
2391         Change CONST to const throughout.
2392         * archures.c (bfd_arch_info): Tidy comment.
2393         (bfd_arch_list): Change a CONST to const.
2394         * libbfd-in.h: Tidy comments and replace CONST with const.
2395         * elf-bfd.h: Likewise.
2396         * libbfd.h: Regenerate.
2397         * bfd-in2.h: Regenerate.
2398         * libcoff.h: Regenerate.
2399
2400 2000-07-07  DJ Delorie  <dj@redhat.com>
2401
2402         * archive.c (_bfd_write_archive_contents): Add an informative
2403         comment.
2404
2405 2000-07-06  Kazu Hirata  <kazu@hxi.com>
2406
2407         * srec.c: Fix formatting.
2408
2409 2000-06-05  DJ Delorie  <dj@redhat.com>
2410
2411         * MAINTAINERS: new
2412
2413 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
2414
2415         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
2416         value of PC-relative offsets.
2417
2418 2000-07-03  Jim Wilson  <wilson@cygnus.com>
2419
2420         * elf64-alpha.c (alpha_elf_size_info): New.
2421         (elf_backend_size_info): Define to alpha_elf_size_info.
2422         * elfcode.h (elf_size_info): Change hash bucket size to 4.
2423
2424 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
2425
2426         * elf32-mips.c: Include elf32-target.h again for the traditional
2427         MIPS targets.
2428
2429 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
2430
2431         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
2432         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
2433         (avr_info_to_howto_rela): Likewise.
2434         (elf32_avr_gc_mark_hook): Likewise.
2435         (elf32_avr_gc_sweep_hook): Likewise.
2436         (elf32_avr_relocate_section): Likewise.
2437
2438 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
2439
2440         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
2441         an external symbol for a non-shared, non-relocatable link.
2442
2443 2000-07-03  Nick Clifton  <nickc@redhat.com>
2444
2445         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
2446         is an external symbol.
2447         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
2448         external symbol.
2449
2450 2000-07-03  Kazu Hirata  <kazu@hxi.com>
2451
2452         * reloc16.c: Fix formatting.
2453
2454 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
2455
2456         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
2457         to add a new target for traditional mips i.e
2458         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
2459         * configure.in: Likewise.
2460         * configure: Rebuild.
2461         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
2462         bfd_target_vector.
2463         (bfd_elf32_tradlittlemips_vec): Likewise.
2464         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
2465         to see that elfNN_bed does not get redefined even if the target file
2466         is included twice for a chip. See elf32-mips.c.
2467
2468 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
2469
2470         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
2471         (CLEANFILES): Add DEPA.
2472         * Makefile.in: Regenerate.
2473
2474 2000-06-30  DJ Delorie  <dj@cygnus.com>
2475
2476         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
2477         can't assume the PE header is at 0x80.
2478
2479 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
2480
2481         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
2482
2483 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
2484
2485         * go32stub.h: Update stub.
2486
2487 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
2488
2489         * archures.c (bfd_mach_avr5): Define.
2490         * bfd-in2.h (bfd_mach_avr5): Define.
2491         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
2492         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
2493         (compatible): Update comment.  Add missing test.
2494         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
2495         for avr2 and avr4.  Simplify 8K wrap code.
2496         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
2497         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
2498
2499 2000-06-26  Kazu Hirata  <kazu@hxi.com>
2500
2501         * coff-h8300.c: Fix formatting.
2502         * cpu-h8300.c: Likewise.
2503
2504 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
2505
2506         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
2507         for local symbols whose names are unknown.
2508
2509 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
2510
2511         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
2512         find one.
2513         * Makefile.in: Regenerate.
2514         * doc/Makefile.in: Regenerate.
2515
2516 2000-06-20  H.J. Lu  <hjl@gnu.org>
2517
2518         * Makefile.am: Rebuild dependency.
2519         * Makefile.in: Rebuild.
2520
2521 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2522
2523         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
2524         (elf_backend_copy_indirect_symbol): Map to the new function.
2525
2526 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
2527
2528         * archive.c (normalize): Correct pointer comparison when checking
2529         for backslashes.
2530         (bfd_bsd_truncate_arname): Likewise.
2531         (bfd_gnu_truncate_arname): Likewise.
2532
2533 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
2534
2535         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
2536         sections elf_{text,data}_{section,symbol}.
2537         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
2538         (_bfd_mips_elf_hide_symbol): New function.
2539         (elf_backend_hide_symbol): Map to the new function.
2540         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
2541         definitions of mips_elf_{text,data}_{section,symbol}.
2542         (mips_elf_local_relocation_p): Try to find the direct symbol
2543         based on new check_forced argument.
2544         (mips_elf_calculate_relocation): Use new version of
2545         mips_elf_local_relocation_p.
2546         (mips_elf_relocate_section): Likewise.
2547         (_bfd_mips_elf_relocate_section): Likewise.
2548         (mips_elf_sort_hash_table): Only assert that have enough GOT
2549         space.
2550         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
2551         entry if the relocation based on the new external argument.
2552         (mips_elf_create_dynamic_relocation): Assert that we have a
2553         section contents allocated where we can swap out the dynamic
2554         relocations.
2555         (mips_elf_calculate_relocation): Find the real hash-table entry
2556         correctly by using h->root.root.type.  Only create a dynamic
2557         relocation entry if the symbol is defined in a shared library.
2558         Create an external GOT entry for the GOT16 relocation if the
2559         symbol was forced local.
2560         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
2561         dynamic index if the symbol was forced local.
2562
2563 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2564
2565         * elf32-mips.c: Fix typos in comments.
2566
2567 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
2568
2569         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
2570         CORE_VERSION_1.
2571
2572 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
2573
2574         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
2575         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
2576         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
2577         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
2578         (bfd_elf32_m68hc11_vec): Likewise.
2579         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
2580         Supports 68hc11 & 68hc12  at the same time.
2581         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
2582         bfd_target_vector.
2583         (bfd_elf32_m68hc11_vec): Likewise.
2584         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
2585         * archures.c (bfd_m68hc12_arch): Define and register in global list
2586         (bfd_m68hc11_arch): Likewise.
2587         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
2588         BFD_RELOC_M68HC11_3B): Define.
2589         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
2590         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
2591
2592 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2593
2594         * elf_bfd.h (struct elf_backend_data): Add info argument to
2595         elf_backend_hide_symbol.
2596         (_bfd_elf_link_hash_hide_symbol): Likewise.
2597         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
2598         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
2599         * elflink.h (elf_link_add_object_symbols): Likewise.
2600         (elf_link_assign_sym_version): Likewise.
2601
2602 2000-06-18  H.J. Lu  <hjl@gnu.org>
2603
2604         * coff-i386.c (coff_i386_reloc): Don't return in case of
2605         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
2606         Compensate PE relocations when linking with non-PE object
2607         files to generate a non-PE executable.
2608
2609 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
2610
2611         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
2612         GOT entries if we're doing a static link or -Bsymbolic link.
2613
2614 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
2615
2616         * elflink.h (elf_link_adjust_relocs): Check for and call backend
2617         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
2618         available.
2619         (elf_link_output_relocs): Likewise.
2620         (elf_reloc_link_order): Likewise.
2621
2622 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2623
2624         * archures.c (enum bfd_architecture): #define constants for
2625         PowerPc and RS6000 machine numbers.
2626         * bfd-in2.h: Regenerate.
2627         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
2628         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
2629         and RS6000 machine numbers using #defined constants from
2630         archures.c.
2631         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
2632         machine numbers using #defined constants from archures.c.  Add
2633         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
2634         64-bit words in 620 entry.
2635         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
2636         RSC, and RS2.
2637         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
2638
2639 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
2640
2641         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
2642         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
2643         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
2644
2645 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2646
2647         * bfd-in.h (bfd_family_coff): Define.
2648         * bfd-in2.h: Regenerate.
2649         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
2650         coff_find_nearest_line): Check COFFness using bfd_family_coff()
2651         instead of bfd_target_coff_flavour.
2652         * cofflink.c (_bfd_coff_final_link): Likewise.
2653         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
2654         exclude XCOFF files.
2655         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2656         Likewise.
2657         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
2658         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
2659         * xcofflink.c (XCOFF_XVECP): Delete.
2660         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
2661         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
2662         bfd_xcoff_record_link_assignment,
2663         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
2664         check for bfd_target_xcoff_flavour.
2665
2666 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2667
2668         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
2669         files on AIX 4.3.
2670         (read_hdr): New function.
2671         (rs6000coff_core_p): Store mstsave or __context64 struct instead
2672         of trying to extract individual registers.  Set abfd->arch_info
2673         to match the architecture that created the core file.
2674         (rs6000coff_get_section_contents): Delete.
2675         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
2676
2677 2000-06-14  H.J. Lu  <hjl@gnu.org>
2678
2679         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
2680         is NULL.
2681
2682 2000-06-13  H.J. Lu  <hjl@gnu.org>
2683
2684         * configure: Regenerate.
2685
2686 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
2687
2688         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
2689         armpei_little_vec.
2690
2691 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
2692
2693         * configure.in (VERSION): Update to show this is the CVS mainline.
2694
2695 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
2696
2697         * elf32-d10v.c: Include elf/d10v.h
2698         (enum reloc_type): Delete.
2699         * elf32-d30v.c: Include elf/d30v.h
2700         (enum reloc_type): Delete.
2701
2702         * Makefile.am: Run "make dep-am" to regenerate dependencies.
2703         * Makefile.in: Regenerate.
2704
2705         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
2706         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
2707         move HOWTOs into elf_howto_table.
2708         (R_386_standard, R_386_ext_offset): Define.
2709         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
2710         (elf_i386_reloc_type_lookup): Modify calculation of index into
2711         elf_howto_table since we've removed the padding.
2712         (elf_i386_info_to_howto_rel): Likewise.
2713         (elf_i386_relocate_section): Likewise.
2714
2715 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2716
2717         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
2718
2719 2000-06-05  H.J. Lu  <hjl@gnu.org>
2720
2721         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
2722         an error when seeing an undefined symbol with hidden/internal
2723         attribute. It is handled in *_relocate_section ().
2724
2725 2000-06-05  H.J. Lu  <hjl@gnu.org>
2726
2727         * elflink.h (elf_fix_symbol_flags): Follow the link for the
2728         indirect symbol for the ELF_LINK_NON_ELF bit.
2729         (elf_link_output_extsym): Don't output the indirect symbol even
2730         if the ELF_LINK_NON_ELF bit is set.
2731
2732 2000-06-01  J.T. Conklin  <jtc@redback.com>
2733
2734         * config.bfd (i[3456]86-*-netbsdelf*): New target.
2735         (i[3456]86-*-netbsdaout*): New target.
2736         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
2737         (i[3456]86-*-openbsd*): Likewise.
2738
2739 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
2740
2741         * trad-core.c: From hpux-core.c, include <dirent.h> or
2742         <sys/ndir.h> when possible.
2743
2744 2000-05-31  Nick Clifton  <nickc@cygnus.com>
2745
2746         * opintl.h (_(String)): Explain why dgettext is used instead
2747         of gettext.
2748
2749 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
2750
2751         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
2752         definitions.  We must not assume they are sorted in the file
2753         according to their index numbers.
2754
2755 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
2756
2757         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
2758         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
2759         R_PARISC_DIR17F are for absolute branches; Handle them as such.
2760
2761 2000-05-30  Nick Clifton  <nickc@cygnus.com>
2762
2763         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
2764         80960CA, 80960MC as valid machine names.
2765
2766 2000-05-30  H.J. Lu  <hjl@gnu.org>
2767
2768         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
2769         visibility bits if the symbol is undefined. Correctly handle
2770         weak undefined symbols with hidden and internal attributes.
2771
2772         * elflink.h (elf_link_add_object_symbols): Always turn the
2773         symbol into local if it has the hidden or internal attribute.
2774
2775 2000-05-29  Philip Blundell  <philb@gnu.org>
2776
2777         * ppcboot.c:  Add packed attribute if compiling with GCC.
2778
2779 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
2780
2781         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
2782
2783 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
2784
2785         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
2786         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
2787         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
2788         a few old comments.
2789
2790 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
2791
2792         * Makefile.am: Update dependencies with "make dep-am"
2793         * Makefile.in: Regenerate.
2794
2795         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
2796         bindtextdomain): Replace defines with those from intl/libgettext.h
2797         to quieten gcc warnings.
2798
2799 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
2800
2801         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
2802
2803         * archive.c (normalize, bfd_bsd_truncate_arname,
2804         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
2805         file names with backslashes.
2806
2807         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
2808         before opening it.
2809
2810         * sysdep.h: Include filenames.h.
2811
2812 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
2813
2814         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
2815
2816 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
2817
2818         * elf64-sparc.c (sparc64_elf_relax_section): New.
2819         (sparc64_elf_relocate_section): Optimize tail call into branch always
2820         if possible.
2821         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2822         (elf32_sparc_relax_section): New.
2823
2824 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
2825
2826         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
2827         Remove unusued variables.
2828         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
2829         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
2830         previous fix, so that shared libs really don't influence targets
2831         extension mask and memory model.
2832
2833 2000-05-23  H.J. Lu  <hjl@gnu.org>
2834
2835         * elf64-alpha.c (elf64_alpha_relocate_section): Check
2836         h->root.other not h->other.
2837         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2838
2839         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
2840
2841 2000-05-23  H.J. Lu  <hjl@gnu.org>
2842
2843         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
2844         undefined symbol with the non-default visibility attributes.
2845         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2846         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2847         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2848         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2849         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2850         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2851         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2852         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2853         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2854         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
2855         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2856
2857 2000-05-22  Richard Henderson  <rth@cygnus.com>
2858
2859         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
2860         PCREL22, PCREL64I.  Zero size of special relocs.
2861         (elf64_ia64_reloc_type_lookup): Likewise.
2862         (USE_BRL, oor_brl, oor_ip): New.
2863         (elf64_ia64_relax_section): New.
2864         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
2865         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
2866         (elf64_ia64_relocate_section): Likewise.
2867         (bfd_elf64_bfd_relax_section): New.
2868         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
2869         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
2870         * bfd-in2.h, libbfd.h: Regenerate.
2871
2872 2000-05-22  Nick Clifton  <nickc@cygnus.com>
2873
2874         * configure.in : Add peigen.lo to MIPS PE targets.
2875         * configure: Regenerate.
2876
2877 2000-05-22  Momchil Velikov  <velco@fadata.bg>
2878
2879         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
2880         only if it is known for both input and output bfds. Separate
2881         error message strings as in some languages, it may be necessary
2882         to change more than one place in the string to change between
2883         'big' and 'little'.
2884
2885         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
2886         endianess checks, call _bfd_generic_verify_endian_match() instead.
2887
2888         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2889
2890         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
2891
2892         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
2893         endianess before checking bfd flavours.
2894
2895 2000-05-22  H.J. Lu  <hjl@gnu.org>
2896
2897         * elflink.h (elf_link_output_extsym): Clear the visibility
2898         field for symbols not defined locally.
2899
2900 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
2901
2902         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2903         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2904         (hppa_rebuild_insn): Mask immediate bits here instead.
2905         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2906
2907 2000-05-18  Momchil Velikov <velco@fadata.bg>
2908
2909         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
2910         relocs for an executable, ensure that they are virtual addresses.
2911
2912 2000-05-18  Jeffrey A Law  (law@cygnus.com)
2913
2914         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
2915
2916 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
2917             Rick Gorton             <gorton@scrugs.lkg.dec.com>
2918
2919         * elflink.h: Add emitrelocations support: when enabled, relocation
2920         information and relocation sections are put into final output
2921         executables.  If the emitrelocations flag is set, do the following:
2922         (elf_bfd_final_link): Emit relocation sections.
2923         (elf_link_input_bfd): Compute relocation section contents.
2924         (elf_gc_sections): Don't clean relocation sections.
2925
2926 2000-05-16  Catherine Moore  <clm@cygnus.com>
2927
2928         * som.c (som_decode_symclass):  Recognize weak symbols.
2929
2930 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
2931
2932         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
2933         read idata section only from dataoff.
2934         (pe_print_edata): Correctly check for valid eat_member.
2935
2936 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
2937
2938         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
2939
2940 2000-05-14  Philip Blundell  <philb@gnu.org>
2941
2942         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
2943
2944 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
2945
2946         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
2947
2948         * peigen.c (pe_print_idata): Look for .idata section and print
2949         info even if data directory has zero entries.  Read idata section
2950         starting from dataoff, and adjust all data offsets to suit.  Cast
2951         all bfd_vma vars to unsigned long before passing to fprintf.
2952         * peigen.c (pe_print_edata): Similarly, look for .edata section
2953         and print info even if data directory has zero entries.  Cast
2954         all bfd_vma vars to unsigned long before passing to fprintf.
2955
2956         From Szabolcs Szakacsits <szaka@F-Secure.com>
2957         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
2958         directory size which may be bogus.
2959         * peigen.c (pe_print_edata): Similarly.
2960
2961 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
2962
2963         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
2964         section is empty.
2965         (copy_private_bfd_data): Allow for space possibly taken up by elf
2966         headers when calculating segment physical address from lma.
2967
2968 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
2969
2970         * versados.c (versados_scan): Init stringlen and pass_2_done.
2971
2972         * trad-core.c (trad_unix_core_file_p): Return
2973         bfd_error_wrong_format rather than bfd_error_file_truncated.
2974
2975         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
2976         add_data_entry.  DataDirectory virtual address is relative.
2977         (pe_print_idata): Account for relative DataDirectory virtual
2978         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
2979         (pe_print_edata): Similarly.
2980
2981         From Szabolcs Szakacsits <szaka@F-Secure.com>
2982         * peigen.c (dir_names): Add Delay Import Directory.
2983         (pe_print_idata):  Always search for bfd section containing
2984         idata address rather than looking up section name.  Print this
2985         section name rather than .idata.
2986         (pe_print_edata): Similarly.  Also print some fields as %08lx.
2987         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
2988         Win32Version.
2989
2990 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
2991
2992         * xcoff.h: Rename to xcoff-target.h
2993         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
2994         * coff-rs6000.c: Ditto.
2995         * coff64-rs6000.c: Ditto.
2996         * coff-pmac.c: Ditto.
2997         * Makefile.in: Regenerate.
2998
2999 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
3000
3001         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
3002         Change U802TOC64MAGIC to U803XTOCMAGIC.
3003
3004 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
3005
3006         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
3007         * bfd-in.h: Prototype bfd_elf_get_arch_size.
3008         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
3009
3010 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
3011
3012         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
3013
3014 2000-05-03  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3015
3016         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
3017         hidden and internal symbols.
3018         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
3019         visibility.
3020         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
3021         assign a PLT or GOT entry to symbols with hidden and
3022         internal visibility.
3023
3024 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
3025
3026         * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
3027         the .bss section.
3028         * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3029
3030 2000-05-02  H.J. Lu  <hjl@gnu.org>
3031
3032         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
3033         ELFOSABI_SYSV.
3034
3035 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3036
3037         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
3038         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
3039         dependencies.
3040         * Makefile.in: Regenerate.
3041
3042 2000-05-01  Jim Wilson  <wilson@cygnus.com>
3043
3044         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
3045         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
3046         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
3047         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
3048         * Makefile.in: Rebuild.
3049
3050 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3051
3052         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
3053         doesn't work very well.
3054
3055         * elf-hppa.h (elf_hppa_internal_shdr): Define.
3056         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
3057         Set hdr->s_type to 1 if ARCH_SIZE == 32.
3058         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
3059         (elf_hppa_info_to_howto): Likewise.
3060         (elf_hppa_info_to_howto_rel): Likewise.
3061         (elf_hppa_reloc_type_lookup): Likewise.
3062         (elf_hppa_is_local_label_name): Likewise.
3063         (elf_hppa_fake_sections): Likewise.
3064         (elf_hppa_final_write_processing): Likewise.
3065         (elf_hppa_howto_table): Fully initialise all entries.
3066         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
3067         (elf_hppa_info_to_howto): Likewise.
3068         (elf_hppa_info_to_howto_rel): Likewise.
3069         (elf_hppa_reloc_type_lookup): Likewise.
3070         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
3071         elf_hppa_unmark_useless_dynamic_symbols,
3072         elf_hppa_remark_useless_dynamic_symbols,
3073         elf_hppa_record_segment_addrs, elf_hppa_final_link,
3074         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
3075         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
3076         elf32-hppa.c mess is cleaned up.
3077         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
3078         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
3079         r_field then call hppa_field_adjust inline func with variable
3080         r_field arg, instead call hppa_field_adjust with fixed arg.
3081         In case R_PARISC_PCREL22F, don't set r_field.
3082         (elf_hppa_relocate_insn): Change args and return type to unsigned
3083         int.  Call re_assemble_* funcs to do the work.
3084
3085         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
3086         sign extending.
3087
3088         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
3089         extending.
3090         (sign_extend): Mask first before sign extending.
3091         (low_sign_extend): Rewrite without condition expression.
3092         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
3093         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
3094         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3095         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
3096         result as function return value rather than through pointer arg.
3097         Accept unsigned int args, and return unsigned int.
3098         (re_assemble_3): New.  Combines function of dis_assemble_3 with
3099         re-assembly of opcode and immediate.
3100         (re_assemble_12): Likewise.
3101         (re_assemble_16): Likewise.
3102         (re_assemble_17): Likewise.
3103         (re_assemble_21): Likewise.
3104         (re_assemble_22): Likewise.
3105         (hppa_field_adjust): Rewrite and document, paying attention to
3106         size of types and signed/unsigned issues.
3107         (get_opcode): Shift before masking.
3108         (FDLW): Rename to FLDW.
3109         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
3110         (hppa_rebuild_insn): Change args and return value to unsigned
3111         int.  Make use of re_assemble_*.  Correct case 11.
3112
3113         * dep-in.sed: Handle ../opcodes/.
3114         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
3115         elf64-hppa.h, hppa_stubs.h, xcoff.h.
3116         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
3117         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
3118         elfarm-nabi.lo dependencies outside of auto-dependency area.
3119         Regenerate dependencies.
3120         * Makefile.in: Regenerate.
3121
3122         * configure.in (TRAD_HEADER): Test non-null before
3123         AC_DEFINE_UNQUOTED.
3124         * configure: Regenerate.
3125
3126         * reloc.c: Fix mis-spelling in comment.
3127
3128 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
3129
3130         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
3131         * vms.c (vms_openr_next_archived_file): Return NULL.
3132
3133 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3134
3135         * coffcode.h Copy changes mistakenly done to libcoff.h in
3136         4/24/2000 patch.
3137
3138 2000-04-29  Andreas Jaeger  <aj@suse.de>
3139
3140         * libbfd-in.h: Correctly check GCC version.
3141         * bfd-in.h: Likewise.
3142         * libhppa.h: Likewise.
3143         * libbfd.h: Regenerate.
3144         * bfd-in2.h: Regenerate.
3145
3146 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3147
3148         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
3149         coffdu-rs6000.{lo,c}.
3150         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
3151         on xcoff.h
3152         * Makefile.in: Regenerate.
3153         * xcoff.h: New file.
3154         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
3155         * coff-rs6000.c: Move all declarations and defines that are
3156         common to the xcoff backends into xcoff.h
3157         * coff64-rs6000.c: Ditto,
3158
3159 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3160
3161         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
3162         _bfd_coff_force_symnames in strings and
3163         _bfd_coff_debug_string_prefix_length to their default values.
3164         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
3165
3166 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3167
3168         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
3169         _bfd_coff_force_symnames in strings and
3170         _bfd_coff_debug_string_prefix_length to their default values.
3171
3172 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
3173
3174         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
3175         Check local_got_refcounts before dereferencing.
3176
3177         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
3178         before deciding we don't need R_PPC_PLT32 relocation.
3179         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
3180         dereferencing.
3181
3182         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
3183
3184         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
3185         .plt entries.
3186         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
3187         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
3188         (elf_i386_relocate_section): Allow for .plt to go missing.
3189         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
3190         can use a relative reloc for got as elf_i386_relocate_section.
3191         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
3192
3193 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
3194
3195         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
3196
3197 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
3198
3199         * Makefile.am (coff64-rs6000.lo): New rule.
3200         * Makefile.in: Regenerate.
3201         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
3202         xcoff_is_local_label_name, xcoff_rtype2howto,
3203         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
3204         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
3205         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
3206         (NO_COFF_SYMBOLS): Define.
3207         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
3208         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
3209         internally.
3210         (MINUS_ONE): New macro.
3211         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
3212         relocation.
3213         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
3214         coff_SWAP_aux_out): Map to the new functions.
3215         * coff64-rs6000.c: New file.
3216         * libcoff.h (bfd_coff_backend_data): Add new fields
3217         _bfd_coff_force_symnames_in_strings and
3218         _bfd_coff_debug_string_prefix_length.
3219         (bfd_coff_force_symnames_in_strings,
3220         bfd_coff_debug_string_prefix_length): New macros for above fields.
3221         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
3222         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
3223         of using coff_swap_sym_in directly.
3224         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
3225         (coff_set_flags) Set magic for XCOFF64.
3226         (coff_compute_section_file_positions): Add symbol name length to
3227         string section length if bfd_coff_debug_string_prefix_length is
3228         true.
3229         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
3230         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
3231         using coff_swap_lineno_in directly.
3232         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
3233         and _bfd_coff_debug_string_prefix_length fields.
3234         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
3235         symbol names into strings table when
3236         bfd_coff_force_symnames_in_strings is true.
3237         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
3238         SET_RELOC_VADDR): New macros.
3239         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
3240         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
3241         code.
3242         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
3243         changes within RS6000COFF_C specific code.
3244         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
3245         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
3246         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3247         Extend existing hack on target name.
3248         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
3249         target name.
3250         * coff-tic54x.c (ticof): Keep up to date with new fields
3251         in bfd_coff_backend_data.
3252         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
3253         targ_selvecs to include rs6000coff64_vec for rs6000.
3254         * configure.in: Add rs6000coff64_vec case.
3255         * cpu-powerpc.c: New bfd_arch_info_type.
3256
3257 2000-04-24  Jeffrey A Law  (law@cygnus.com)
3258
3259         * config.bfd: Only disable elf32-hppa vectors, not all of the
3260         BSD and OSF configuration support.  Provide (disabled) clauses
3261         for PA64 support.
3262         * configure.in: Add clause for PA64 support.
3263         * configure: Rebuilt.
3264
3265         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
3266         (bfd_elf64_hppa_vec): Declare.
3267
3268         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
3269         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
3270         (elf64-hppa.lo): Add dependencies.
3271         * Makefile.in: Rebuilt.
3272
3273         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
3274
3275 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
3276
3277         * libhppa.h (dis_assemble_16): New function.
3278         (pa_arch): Added pa20w element.
3279
3280 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
3281
3282         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
3283         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
3284         bfd_elf64_slurp_reloc_table.
3285
3286         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
3287         definitions to get external names.
3288         (elf_write_relocs): Renamed from write_relocs and make global.
3289         (elf_slurp_reloc_table): Make global.
3290         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
3291
3292         * archive.c (hpux_uid_gid_encode): New function.
3293         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
3294         defined and the ID is greater than 99999.
3295         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
3296         special uid/gid fields into 32 bit values.
3297
3298 2000-04-21  Matthew Green  <mrg@cygnus.com>
3299
3300         * config.bfd: Add NetBSD/sparc64 support.
3301
3302 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
3303                           David Mosberger  <davidm@hpl.hp.com>
3304                           Timothy Wall <twall@cygnus.com>
3305                           Jim Wilson  <wilson@cygnus.com>
3306
3307         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
3308         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
3309         (BFD64_BACKENDS): Add elf64-ia64.lo.
3310         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
3311         (cpu-ia64.lo, elf64-ia64.lo): New rules.
3312         * Makefile.in: Rebuild.
3313         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
3314         (bfd_ia64_arch): Declare.
3315         (bfd_archures_list): Add bfd_ia64_arch.
3316         * bfd-in2.h: Rebuild.
3317         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
3318         * configure: Rebuild.
3319         * configure.host: (ia64-*-linux*): New host.
3320         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
3321         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
3322         * elf.c (prep_headers): Add bfd_arch_ia64.
3323         * libbfd.h: Rebuild.
3324         * reloc.c: Add IA-64 relocations.
3325         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
3326         Declare.
3327         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
3328         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
3329
3330 2000-04-21  Richard Henderson  <rth@cygnus.com>
3331
3332         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
3333         contents when performing a partial link.
3334         (bfd_elf_d30v_reloc_21): Likewise.
3335
3336 2000-04-20  H.J. Lu  <hjl@gnu.org>
3337
3338         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
3339         patch to symbols defined by a shared object.
3340         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
3341
3342 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3343
3344         K&R compiler fixes.
3345         * dwarf2.c (concat_filename): Avoid string literal concatenation.
3346         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
3347
3348 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
3349
3350         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
3351         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
3352         (coff-ia64.lo): Add dependency.
3353         * Makefile.in: Regenerate.
3354         * coff-ia64.c: New file.
3355         * efi-app-ia32.c: Ditto.
3356         * efi-app-ia64.c: Ditto.
3357         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
3358         (coff_set_flags): Ditto.
3359         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
3360         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
3361         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
3362         * configure: Regenerate.
3363         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
3364         (PUT_OPTHDR_IMAGE_BASE): Ditto.
3365         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
3366         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
3367         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
3368         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
3369         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
3370         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
3371         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
3372         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
3373         (GET_PDATA_ENTRY): Ditto.
3374         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
3375         data_start.  Use above macros to read fields that are 64 bit wide for
3376         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
3377         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
3378         FileAlignment and SectionAlignment to minimum alignment if they
3379         are zero.
3380         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
3381         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
3382         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
3383         Use above macros to write fields that are 64 bit wide for
3384         COFF_WITH_PEP64.
3385         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
3386         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
3387         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
3388         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
3389         begin address, end address, and unwind info address only.  Use
3390         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
3391         print addresses.
3392         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
3393         HIGH3ADJ relocation names.
3394         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
3395         * targets.c: Declare bfd_efi_app_ia32_vec and
3396         bfd_efi_app_ia64_vec.
3397         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
3398         bfd_efi_app_ia64_vec.
3399
3400 2000-04-17  Timothy Wall  <twall@cygnus.com>
3401
3402         * bfd-in2.h: Add prototypes for tic54x load page access.
3403         * bfd-in.h: Regenerate.
3404         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
3405         in customized _set_arch_mach function.
3406         * coffcode.h (coff_set_alignment_hook): Set section load page if
3407         the appropriate macro is defined.
3408         (write_object_contents): Read section load page.
3409
3410 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
3411
3412         * elf32-hppa.h: Update copyright date.
3413
3414         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
3415         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
3416
3417         * elf32-d30v.c (MAX32): Don't use LL suffix.
3418         (MIN32): Define in terms of MAX32.
3419         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
3420
3421         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
3422         expression.
3423
3424         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
3425
3426 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
3427
3428         * dep-in.sed: Match space before file name, not after.
3429         * Makefile.am: Regenerate dependencies.
3430         * Makefile.in: Regenerate.
3431
3432         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
3433         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
3434         extend without an if statement.
3435
3436 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
3437
3438         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
3439         signed quantites.
3440         * elf32-mips.c (gprel16_with_gp): Likewise.
3441         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
3442         here using -0x40000, not (int)0xfffc0000.
3443         (elf32_hppa_size_of_stub): Likewise.
3444
3445 2000-04-11  Timothy Wall  <twall@cygnus.com>
3446
3447         * coff-tic54x.c: Now builds with all targets.
3448         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
3449         * Makefile.in: Regenerate.
3450         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
3451         unitialized variable.
3452
3453 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
3454
3455         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
3456         --enable-build-warnings option.
3457         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
3458         * Makefile.in, configure: Re-generate.
3459
3460 2000-04-07  Nick Clifton  <nickc@cygnus.com>
3461
3462         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
3463         BFD_RELOC_THUMB_PCREL_BLX.
3464
3465         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3466         R_ARM_XPC25 and R_ARM_THM_PC22.
3467
3468         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
3469         R_ARM_XPC25 and R_ARM_THM_XPC22.
3470         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
3471         R_ARM_[XPC25|THM_XPC22].
3472
3473         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
3474         elf/arm-oabi.h to elf/arm.h
3475
3476         * Makefile.am: Fix dependency for elfarm-oabi.c
3477         * Makefile.in: Regenerate.
3478
3479         * bfd-in2.h: Regenerate.
3480         * libbfd.h: Regenerate.
3481
3482 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3483
3484         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
3485         and restore it on failure.  Release newly allocated tdata on
3486         failure.
3487
3488 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
3489
3490         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
3491         (decode_line_info): Set it.  Report error if unit->line_offset is
3492         equal to or larger than it.
3493
3494 2000-04-07  Timothy Wall  <twall@cygnus.com>
3495
3496         * targets.c: Added vecs for tic54x.
3497         * reloc.c: Added relocs for tic54x.
3498         * libbfd.h: Regenerated.
3499         * configure: Add TI COFF vecs for tic54x.
3500         * configure.in: Ditto.
3501         * config.bfd (targ_cpu): Recognize new tic54x target.
3502         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
3503         * bfd-in2.h: Add tic54x target and relocations.
3504         * Makefile.am, Makefile.in: Add tic54x target.
3505         * archures.c (bfd_archures_list): Add tic54x target.
3506         * coff-tic54x.c: New.
3507         * cpu-tic54x.c: New.
3508
3509 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3510
3511         * elfcore.h (elf_core_file_p): call backend_object_p which
3512         thereby gets an opportunity to update the arch/machine type.
3513
3514 2000-04-06  Timothy Wall  <twall@cygnus.com>
3515
3516         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
3517         class.  Handle SEC_CLINK and SEC_BLOCK flags.
3518         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
3519         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
3520
3521 2000-04-06  Nick Clifton  <nickc@cygnus.com>
3522
3523         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
3524         EF_INTERWORK if this is an unknown EABI.
3525         (elf32_arm_merge_private_bfd_data): Check EABI version
3526         numbers.  Only check EF_xxx flags if the EABI version number
3527         is unknown.
3528         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
3529         if the EABI version number is unknown.
3530         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
3531         if the EABI version number is unknown.
3532
3533 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3534
3535         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
3536         BFD_RELOC_SH_LOOP_END.
3537         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
3538         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
3539         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
3540         (sh_elf_reloc_loop): New function.
3541         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
3542         any more.
3543         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
3544         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
3545         * bfd-in2.h, libbfd.h: Regenerate.
3546
3547 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
3548
3549         * po/bfd.pot: Regenerate.
3550
3551         * Makefile.am: Remove extraneous mkdep comment.
3552         (MKDEP): Use gcc -MM rather than mkdep.
3553         (DEP): Quote when passing vars to sub-make.  Add warning
3554         message to end.
3555         (DEP1): Rewrite for "gcc -MM".
3556         (CLEANFILES): Add DEP2.
3557         Update dependencies.
3558         * Makefile.in: Regenerate.
3559
3560 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
3561
3562         * configure.in: Added corefile support for AIX 4.3.  In particular,
3563         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
3564         compiling rs6000-core.c.
3565         * configure: Regenerated.
3566
3567 2000-04-03  H.J. Lu  <hjl@gnu.org>
3568
3569         * cache.c (bfd_open_file): Unlink the output file only if
3570         it has non-zero size.
3571
3572 2000-04-01  Ken Block USG  <block@zk3.dec.com>
3573
3574         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
3575         relative relocations for non-loaded sections in shared objects.
3576         (elf64_alpha_check_relocs): Similarly.
3577
3578 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
3579
3580         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
3581         BFD_RELOC_16 to switch for extended relocs.
3582         (MY_swap_ext_reloc_in): New.
3583         (MY_swap_ext_reloc_out): New.
3584         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
3585         than NAME(aout,swap_ext_reloc_in) for extended relocs.
3586         (NAME(aout,squirt_out_relocs)): Similarly use
3587         MY_swap_ext_reloc_out.
3588         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
3589
3590 2000-04-03  Kazu Hirata  <kazu@hxi.com>
3591
3592         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
3593         the R_PCRWORD_B case.
3594
3595 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
3596
3597         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
3598         on some targets.
3599         * ihex.c : Ditto.
3600
3601 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
3602
3603         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
3604         HOWTO references to bfd_elf_generic_reloc, that have
3605         partial_inplace == true, now use the new function.  The function
3606         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
3607         extends its fixes to the R_M32R_{16,24,32} relocs.
3608         The new logic in m32r_elf_lo16_reloc() has been removed, and
3609         it instead calls the new routine to obtain that functionality.
3610
3611 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
3612
3613         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
3614         elf32_avr_check_relocs, avr_final_link_relocate,
3615         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
3616         elf32_avr_object_p): Add prototypes.
3617         (elf32_avr_gc_mark_hook): Add default for h->root.type.
3618         (bfd_elf_avr_final_write_processing): Make static.
3619
3620 2000-03-27  Denis Chertykov  <denisc@overta.ru>
3621
3622         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
3623         * archures.c (bfd_architecture): Add AVR architecture.
3624         (bfd_archures_list): Add reference to AVR architecture info.
3625         * elf.c (prep_headers): Handle bfd_arch_avr.
3626         * reloc.c: Add various AVR relocation enums.
3627         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
3628         list.
3629         * Makefile.am: Add support for AVR elf.
3630         * configure.in: Likewise.
3631         * config.bfd: Likewise.
3632         * Makefile.in: Regenerate.
3633         * configure: This too.
3634         * bfd-in2.h: And this.
3635         * libbfd.h: And this.
3636
3637 2000-03-24  H.J. Lu  <hjl@gnu.org>
3638
3639         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
3640         (elf64_alpha_find_reloc_at_ofs): Likewise.
3641
3642 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
3643
3644         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
3645         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
3646         allowable range used to be -2**(n-1) to 2**n-1.
3647         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
3648         "boolean overflow" with "bfd_reloc_status_type flag".
3649
3650 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
3651
3652         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
3653
3654 2000-03-14  Kazu Hirata  <kazu@hxi.com>
3655
3656         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
3657         of shrinks properly, including the last reloc.
3658
3659 2000-03-13  Kazu Hirata  <kazu@hxi.com>
3660
3661         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
3662         check for R_MOVL2.
3663
3664 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
3665
3666         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
3667         a format mismatch rather than an "error" from bfd_read such as
3668         bfd_error_file_truncated.
3669
3670 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
3671
3672         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
3673         sign-extension and big-endian compensation for
3674         R_MIPS_64 even in ld -r.
3675
3676 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
3677
3678         * elf32-mips.c (mips_elf_next_relocation): Rename from
3679         mips_elf_next_lo16_relocation, and generalize to look
3680         for any relocation type.
3681         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
3682         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
3683         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
3684         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
3685         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
3686         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
3687         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
3688         (mips_rtype_to_howto): Likewise.
3689         (mips_elf_calculate_relocation): Handle new relocs.
3690         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
3691         are paired.  The addend for R_MIPS_GNU_REL16_S2
3692         is shifted right two bits.
3693
3694 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
3695
3696         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
3697         comment, and ensure it doesn't happen again.
3698         (bfd_install_relocation): Same here.
3699         (_bfd_relocate_contents): Don't bother assigning unused signmask
3700         shift result.  Fix typos in comments.
3701         Remove trailing whitespace throughout file.
3702
3703 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
3704
3705         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
3706         * bfd-in2.h: Rebuild.
3707
3708 2000-03-06  Nick Clifton  <nickc@cygnus.com>
3709
3710         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
3711         sym_ptr_ptr fields.
3712         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
3713         (SIZEOF_ILF_STRINGS): Redefine.
3714         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
3715         relative reloc, as opposed to a section relative reloc.
3716         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
3717         not C_LABEL.
3718         Add length of symbol's prefix to string pointer.
3719         Store a pointer to the symbol in the symbol pointer table.
3720         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
3721         Initialise the symbol pointer table.
3722         Store the hint in the Hint/Name table.
3723         Make the jump reloc be symbol realtive, not section relative.
3724         Create an import symbol for imported code.
3725
3726 2000-03-06  Catherine Moore  <clm@cygnus.com>
3727
3728         * elf.c (swap_out_syms):  Check for null type_ptr.
3729
3730 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
3731
3732         * aout-target.h (MY(write_object_contents)): Remove unused
3733         and unusable "#if CHOOSE_RELOC_SIZE".
3734         * pc532-mach.c (MY(write_object_contents)): Ditto.
3735         * netbsd.h (MY(write_object_contents)): Ditto.
3736         * hp300hpux.c (MY(write_object_contents)): Ditto.
3737         * freebsd.h (MY(write_object_contents)): Ditto.
3738         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
3739
3740 2000-02-29  H.J. Lu  <hjl@gnu.org>
3741
3742         * peicode.h (jtab): Make it static.
3743
3744         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
3745         defined and COFF_IMAGE_WITH_PE is not defined.
3746         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
3747         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
3748
3749 2000-03-01  Nick Clifton  <nickc@cygnus.com>
3750
3751         * coff-arm.c (bfd_arm_process_before_allocation): Make
3752         'symndx' signed to prevent compile time warning.
3753
3754         * coff-mcore.c: Remove unused prototype for pe_object_p.
3755
3756         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
3757         functions that are not used when COFF_IMAGE_WITH_PE is
3758         defined.
3759         (struct sh_opcode): Change type of 'flags' field to unsigned
3760         long so that it can hold the USESAS flag.
3761
3762         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
3763
3764         * elf-m10300.c (mn10300_elf_relax_section): Initialise
3765         'sym_sec'.
3766
3767         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
3768         parameters.
3769         Remove unusued variables and code.
3770         (elf_backend_add_symbol_hook): Fix prototype.
3771
3772         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
3773         'srelgot'.
3774
3775         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
3776         'oldinst'.
3777
3778         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
3779         parameters.
3780         Remove unusued variables and code.
3781         (elf_backend_add_symbol_hook): Fix prototype.
3782
3783         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
3784
3785         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
3786         to unused function parameter.
3787
3788         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
3789         parameters.
3790         Use EMPTY_HOWTO to initialise empty howto slots.
3791         Remove unused variables.
3792
3793         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
3794
3795 2000-03-01  H.J. Lu  <hjl@gnu.org>
3796
3797         * aoutx.h (aout_link_input_section_std): Pass "true" to
3798         the undefined_symbol callback.
3799         (aout_link_input_section_ext): Likewise.
3800         * bout.c (get_value): Likewise.
3801         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3802         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
3803         Likewise.
3804         (alpha_relocate_section): Likewise.
3805         * coff-arm.c (coff_arm_relocate_section): Likewise.
3806         * coff-i960.c (coff_i960_relocate_section): Likewise.
3807         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3808         * coff-mips.c (mips_relocate_section): Likewise.
3809         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3810         * coff-sh.c (sh_relocate_section): Likewise.
3811         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3812         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
3813         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3814         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3815         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3816         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3817         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3818         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3819         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3820         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3821         * elf32-sh.c (sh_elf_relocate_section): Likewise.
3822         * elf32-v850.c (v850_elf_relocate_section): Likewise.
3823         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
3824         * elflink.h (elf_link_output_extsym): Likewise.
3825         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
3826         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
3827         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
3828
3829         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
3830         undefined_symbol callback when building shared library with
3831         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
3832         "true".
3833         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3834         * elf32-i386.c (elf_i386_relocate_section): Likewise.
3835         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3836         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3837         (elf32_mips_get_relocated_section_content): Likewise.
3838         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3839         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3840         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3841         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3842
3843 2000-02-28  Nick Clifton  <nickc@cygnus.com>
3844
3845         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
3846         * Makefile.in: Regenerate.
3847
3848         * configure.in: Add support for mips and sh pe vectors.
3849         * configure: regenerate.
3850
3851         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
3852         targets.
3853
3854         * targets.c: Add mips and sh pe vectors.
3855
3856         * libpei.h (coff_final_link_postscript): Only define if not
3857         already defined.
3858
3859         * coffcode.h: Add support for WinCE magic numbers.
3860
3861         * peigen.c (pe_print_reloc): Update comment and rearrange
3862         appending of newline character.
3863
3864         * peicode.h: Add support for Image Library Format.
3865         (pe_ILF_vars): Structure containing data used by ILF code.
3866         (pe_ILF_make_a_section): New function.  Create a section based
3867         on ILF data.
3868         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
3869         ILF data.
3870         (pe_ILF_make_a_symbol): New function.  Create a symbol based
3871         on ILF data.
3872         (pe_ILF_save_relocs): New function.  Store the relocs created
3873         by pe_ILF_make_a_reloc in a section.
3874         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
3875         an ILF object.
3876         (pe_ILF_object_p): New function.  Return a bfd_target pointer
3877         for an ILF object.
3878         (pe_bfd_object_p): If an ILF object is detected call
3879         pe_ILF_object_p on it.
3880
3881         * coff-arm.c: Add support for WinCE relocs which are different
3882         from normal ARM COFF relocs.
3883         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
3884
3885         * coff-sh.c: Add support for sh-pe target.
3886         * pe-sh.c: New file.  Support code for sh-pe target.
3887         * pei-sh.c: New file.  Support code for sh-pe target.
3888
3889         * pe-mips.c: New file.  Support code for mips-pe target.
3890         * pei-mips.c: New file.  Support code for mips-pe target.
3891
3892 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
3893
3894         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
3895         architecture if the object causing the bump is dynamic.
3896         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
3897         and also don't it for memory ordering.
3898         (sparc64_elf_write_relocs): Take src_rela out of the loop.
3899
3900 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
3901
3902         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
3903         calling bfd_get_section_size_before_reloc.
3904         (decode_line_info): Likewise.
3905         (_bfd_dwarf2_find_nearest_line): Likewise.
3906
3907 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
3908
3909         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
3910         name of the libtool directory.
3911         * Makefile.in: Rebuild.
3912
3913 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
3914
3915         * som.c (SOM_HOWTO): Define.
3916         (som_hppa_howto_table): Use it.
3917
3918 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3919
3920         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
3921
3922         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
3923
3924 2000-02-24  Catherine Moore  <clm@cygnus.com>
3925
3926         * som.c (som_misc_symbol_info):  Add field
3927         secondary_def.
3928         (som_bfd_derive_misc_symbol_info):  Initialize
3929         secondary_def.
3930         (som_build_and_write_symbol_table): Keep track
3931         of secondary_def field.
3932         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
3933         if secondary_def field is set.
3934         (som_bfd_ar_write_symbol_stuff): Initialize
3935         secondary_def.
3936
3937 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
3938
3939         * dwarf2.c (read_address): Read 16-bits addresses.
3940         (parse_comp_unit): Accept addr_size == 2.
3941
3942 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
3943
3944         * bfd-in.h: Update copyright date.
3945
3946 2000-02-23  Linas Vepstas <linas@linas.org>
3947
3948         * cpu-i370.c: New file.
3949         * elf32-i370.c:  New file.
3950         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
3951         (bfd_i370_arch): New.
3952         (bfd_archures_list): Add bfd_i370_arch.
3953         * elf.c (prep_headers): Add bfd_arch_i370.
3954         * Makefile.am: Add support for IBM 370 elf.
3955         * config.bfd: Likewise.
3956         * configure.in: Likewise.
3957         * libbfd.h (bfd_reloc_code_real_names): Likewise.
3958         * reloc.c (bfd_reloc_code_type): Likewise.
3959         * targets.c: Likewise.
3960
3961         * Makefile.in: Regenerate.
3962         * configure: Regenerate.
3963         * bfd-in2.h: Regenerate.
3964
3965 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
3966
3967         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
3968         invalid relocation types, and change them to R_386_NONE.
3969
3970 2000-02-22  H.J. Lu  <hjl@gnu.org>
3971
3972         * elflink.h (elf_link_add_object_symbols): If a version symbol is
3973         not defined, don't add a second ELF_VER_CHR.
3974
3975         * elflink.h (elf_bfd_final_link): Call output_extsym for global
3976         symbols converted to local symbols even when stripping all
3977         symbols.
3978         (elf_link_output_extsym): Process global symbols converted to
3979         local symbols even if they are being stripped.
3980
3981 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
3982
3983         * archures.c (bfd_octets_per_byte): Return unsigned int.
3984         (bfd_arch_mach_octets_per_byte): Ditto.
3985         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
3986         comparison warning.
3987         * section.c (bfd_get_section_size_before_reloc): Quell signed
3988         vs. unsigned comparison warning.
3989         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
3990         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
3991         change.  What was I thinking?
3992         * bfd-in2.h: Regenerate.
3993
3994         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
3995         (elf_gc_sections): Same here.
3996         (elf_gc_common_finalize_got_offsets): And here.
3997
3998 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
3999
4000         ELF HPPA doesn't work at present; remove it until it does.
4001         * config.bfd: Comment out setting targ_defvec to
4002         bfd_elf32_hppa_vec.
4003         * Makefile.am: Rebuild dependencies.
4004         (BFD32_BACKENDS): Remove elf32-hppa.lo.
4005         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
4006         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
4007         * Makefile.in: Rebuild.
4008         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
4009
4010 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4011
4012         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
4013         is no bfd_free().  Revert bfd_free part of previous change.
4014
4015 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4016
4017         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
4018         arrays.
4019         (coff_compute_section_file_positions): Use bfd_free to pair
4020         bfd_malloc.
4021         (coff_write_object_contents): Likewise.
4022
4023         * coff-rs6000.c (xcoff_howto_table_16): New variable.
4024         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
4025
4026 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
4027
4028         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
4029         (xcoff_ar_file_hdr_big): New structure.
4030         (SIZEOF_AR_FILE_HDR_BIG): New macro.
4031         (xcoff_ar_hdr_big): New structure.
4032         (SIZEOF_AR_HDR_BIG): New macro.
4033         (xcoff_big_format_p): New macro.
4034         (xcoff_ardata_big): New macro.
4035         (arch_xhdr_big): New macro.
4036         (xcoff_slurp_armap): Handle large archives.
4037         (xcoff_archive_p): Detect large archives.
4038         (xcoff_read_ar_hdr): Handle large archives.
4039         (xcoff_openr_next_archived_file): Handle large archives.
4040         (xcoff_generic_stat_arch_elt): Handle large archives.
4041         (xcoff_write_armap_old): Rename from xcoff_write_armap.
4042         (xcoff_write_armap_big): New function.
4043         (xcoff_write_armap): New function, dispatch to _old or _big.
4044         (xcoff_write_archive_contents_old): Rename from
4045         xcoff_write_archive_contents.
4046         (xcoff_write_archive_contents_big): New function.
4047         (xcoff_write_archive_contents): New function, dispatch to _old or
4048         _big.
4049
4050 2000-02-18  Richard Henderson  <rth@cygnus.com>
4051
4052         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
4053         and hide_symbol members.
4054         (elf_link_hash_copy_indirect): Remove.
4055         (elf_link_hash_hide_symbol): Remove.
4056         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
4057         and elf_backend_hide_symbol.
4058         (_bfd_elf_link_hash_copy_indirect): Declare.
4059         (_bfd_elf_link_hash_hide_symbol): Declare.
4060         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
4061         (_bfd_elf_link_hash_hide_symbol): Likewise.
4062         (_bfd_elf_link_hash_table_init): Don't init killed members.
4063         * elflink.h (elf_link_add_object_symbols): Use the bed function
4064         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
4065         (elf_link_assign_sym_version): Likewise.
4066         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
4067         (elf_backend_hide_symbol): Likewise.
4068         (elfNN_bed): Update for new members.
4069
4070 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
4071
4072         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
4073         STACK_END_ADDR): Define for new core file format.
4074         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
4075         for handling the vagaries of the various core file structures used
4076         by AIX over the years.
4077         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
4078         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
4079         core_dumpx structure.
4080
4081 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
4082
4083         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
4084         (bfd_mach_sh3_dsp): Likewise.
4085         (bfd_mach_sh4): Reinstate.
4086         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
4087         * bfd-in2.h: Regenerate.
4088         * coff-sh.c (struct sh_opcode): flags is no longer short.
4089         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
4090         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
4091         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
4092         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
4093         (sh_opcodes): No longer const.
4094         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
4095         (sh_insn_uses_reg): Check for USESAS and USESR8.
4096         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
4097         (_bfd_sh_align_load_span): Return early for SH4.
4098         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
4099         Take into account that field b of a parallel processing insn
4100         could be mistaken for a separate insn.
4101         * cpu-sh.c (arch_info_struct): New array elements for
4102         sh2, sh-dsp and sh3-dsp.
4103         Reinstate element for sh4.
4104         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
4105         (SH4_NEXT): Reinstate.
4106         (SH3_NEXT, SH3E_NEXT): Adjust.
4107         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
4108         * elf32-sh.c (sh_elf_set_private_flags): New function.
4109         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
4110         (sh_elf_merge_private_data): New function.
4111         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
4112         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4113         (bfd_elf32_bfd_merge_private_bfd_data): Change to
4114         sh_elf_merge_private_data.
4115
4116 2000-02-13  Richard Henderson  <rth@cygnus.com>
4117
4118         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
4119         hide_symbol members.
4120         (elf_link_hash_copy_indirect): New.
4121         (elf_link_hash_hide_symbol): New.
4122         * elflink.h (elf_link_add_object_symbols): Break out copy from
4123         indirect new new symbol to elf.c.
4124         (elf_link_assign_sym_version): Break out privatization of
4125         non-exported symbol to elf.c.
4126         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
4127         (_bfd_elf_link_hash_hide_symbol): New.
4128         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
4129
4130 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
4131
4132         * section.c (_bfd_strip_section_from_output): Add info parameter.
4133         If it passed as non-NULL, use it to check whether any input BFD
4134         has an input section which uses this output section.  Change all
4135         callers.
4136         * bfd-in2.h: Rebuild.
4137
4138         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
4139         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
4140         1999-11-29.
4141         * bfd-in2.h: Rebuild.
4142
4143 2000-02-10  Timothy Wall  <twall@cygnus.com>
4144
4145         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
4146         allow final modifications of swapped-in symbol.
4147         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
4148         * coffcode.h (coff_write_relocs): Use macro
4149         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
4150         symbol index should be set to -1.
4151
4152 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
4153
4154         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
4155         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
4156         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
4157         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
4158         sh_insns_uses_or_sets_freg): New functions.
4159         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
4160         * (sh_insns_conflict): Use new functions and new macros to
4161         detect conflicts when two instructions both set same integer registers,
4162         both set same fp register, and both set special register.
4163
4164 2000-02-09  Timothy Wall  <twall@cygnus.com>
4165
4166         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
4167         swapping in sections, so that the swapping routines have access to
4168         the arch/mach info.
4169
4170 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
4171
4172         * coff-go32.c: Update comment. Update copyright.
4173
4174 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
4175
4176         * syms.c (bfd_decode_symclass)
4177         Two new class characters were added - 'V' and 'v'.  The
4178         meaning of 'W' is now restricted to just weak non-object
4179         symbols.  This allows differentiation between, for example,
4180         weak functions vs weak objects.  nm for example now dumps:
4181         'W' = weak global
4182         'w' = weak unresolved
4183         'V' = weak global object
4184         'v' = weak unresolved object
4185
4186         (bfd_is_undefined_symclass): New function.  Return true if the
4187         given symbol class represents and undefined/unresolved symbol.
4188
4189         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
4190         unresolved symbols.
4191
4192         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
4193
4194         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
4195         STT_ARM_16BIT flag set, but it is not attached to a data object
4196         return STT_ARM_16BIT so that it will be treated as code by the
4197         disassembler.
4198
4199 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
4200
4201         * coff-i386.c (i3coff_object_p): Remove prototype.
4202         Update copyright.
4203
4204         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
4205         to name.  Update copyright.
4206
4207         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
4208         assignment to avoid warning.  Update copyright.
4209
4210 2000-01-24  Robert Lipe  (robertl@sco.com)
4211
4212         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
4213         instead of using GNU C extension.
4214
4215 2000-01-21  Nick Clifton  <nickc@cygnus.com>
4216
4217         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
4218         amount from a bfd_in_memory structure.
4219         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
4220         structure.
4221
4222 2000-01-14  Nick Clifton  <nickc@cygnus.com>
4223
4224         * linker.c (default_indirect_link_order): oops - fix incorrectly
4225         applied patch from Tim Wall.
4226
4227 2000-01-13  Timothy Wall (twall@tiac.net>
4228
4229         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
4230         = scnhsz, filhsz, relsz, aoutsz, etc)
4231
4232         * coffswap.h: Ditto.
4233
4234 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4235
4236         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
4237         interwork thumb to arm stub.
4238
4239 2000-01-13  Timothy Wall (twall@tiac.net>
4240
4241         * archures.c (bfd_octets_per_byte): New function: Return
4242         target byte size.
4243         (bfd_arch_mach_octets_per_byte): New function: Return target
4244         byte size.
4245
4246         * section.c: Distinguish between octets and bytes for usage of
4247         _cooked_size,  _raw_size, and output_offset.  Clarify
4248         description of bfd_set_section_contents.
4249
4250         * bfd-in2.h: Regenerate.
4251
4252         * coffgen.c: Indicate that the offset parameter is in bytes, not
4253         octets.
4254
4255         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
4256         where appropriate to get the octet offset when calling
4257         bfd_set_section_contents.
4258         (bfd_coff_reloc_link_order): Ditto.
4259
4260         * linker.c (bfd_generic_reloc_link_order): Ditto.
4261         (_bfd_default_link_order): Ditto.
4262
4263         * reloc.c (bfd_perform_relocation):  Distinguish between octets
4264         and bytes.  Use octets when indexing into octet data; use bytes
4265         when calculating target addresses.
4266         (bfd_install_relocation): Ditto.
4267
4268         * srec.c (srec_write_section): Ditto.
4269
4270 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4271
4272         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
4273         3 to 2.  This allows 4 byte sized sections, which is necessary for
4274         dlltool to build functioning DLLs.
4275
4276 2000-01-10  Philip Blundell  <pb@futuretv.com>
4277
4278         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
4279         (arm*-*-conix*): New target.
4280
4281 2000-01-10  Egor Duda  <deo@logos-m.ru>
4282
4283         * config.bfd: Include elf32_i386 vector to target list for cygwin
4284         and mingw.
4285
4286         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
4287         * configure.in: Test for structure win32_pstatus_t in
4288         <sys/procfs.h>
4289         * configure: Regenerate.
4290
4291         * elf.c (elfcore_grok_win32pstatus): New function: process
4292         win32_pstatus_t notes in elf core file.
4293         (elfcore_grok_note): Detect win32_pstatus notes.
4294
4295 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
4296
4297         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
4298         visibility.
4299         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
4300         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
4301
4302 For older changes see ChangeLog-9899
4303 \f
4304 Local Variables:
4305 mode: change-log
4306 left-margin: 8
4307 fill-column: 74
4308 version-control: never
4309 End: