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