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