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