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