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