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