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