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