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